profile/ivi/qtbase.git
12 years agoChanged qsslcertificate unittest to work from install directory
Kurt Korbatits [Wed, 15 Feb 2012 22:13:13 +0000 (08:13 +1000)]
Changed qsslcertificate unittest to work from install directory

- Changed to use TESTDATA and QFINDTESTDATA instead of SRCDIR

Change-Id: I1957ef287ba2f337b5e0b2c6245d872eacb6316f
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged qcryptographichash unittest to work from installation directory
Kurt Korbatits [Wed, 15 Feb 2012 04:30:16 +0000 (14:30 +1000)]
Changed qcryptographichash unittest to work from installation directory

- Changed qcryptographichash to use TESTDATA and QFINDTESTDATA

Change-Id: Ic3a1bdccc9f81605c648dab2a642421d17f7fe80
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged json unittest to work from installation directory
Kurt Korbatits [Wed, 15 Feb 2012 04:22:48 +0000 (14:22 +1000)]
Changed json unittest to work from installation directory

- Changed json unittest to use TESTDATA and QFINDTESTDATA

Change-Id: Id29f8257565f409fa184ba465f25bc8454e2b7fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoAdd support for querying an elided sub-string from QTextEngine.
Andrew den Exter [Wed, 15 Feb 2012 01:32:59 +0000 (11:32 +1000)]
Add support for querying an elided sub-string from QTextEngine.

The QML Text element attempts to layout text first without eliding and
only builds an elided string for the last visible line.  This allows
it to re-use the already generated layout information to build the
elided string rather than doing a second layout of the relevant text.

Change-Id: Ieee45902d0c129853abe822c465eece4d634a028
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoUse english name to match font in windows platform
jian liang [Mon, 13 Feb 2012 13:26:28 +0000 (21:26 +0800)]
Use english name to match font in windows platform

In windows platform, simplified chinese envrionment, the default font
family name is "SimSun" which is not in the font list generated by
EnumFontFamiliesEx(), this will cause chinese font can't be displayed.

This patch will generate font's english name during font enumeration in
windows platform, and take font's english name into consideration in font
matching. The english name generation code is taken from Qt4.8

Change-Id: Ie939ec0c8c08c628a835c7a53fb22d0545626d9c
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQDial: Fix crash when singleStep-property is 0.
Friedemann Kleint [Fri, 9 Dec 2011 08:02:48 +0000 (09:02 +0100)]
QDial: Fix crash when singleStep-property is 0.

Task-number: QTBUG-23072

Change-Id: I296b46af23420b24fa5460b9660e33bf203ea29f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
(cherry picked from commit 6d370a19e367d0ccec59db5c34cbe2e3f7cfc586)
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoEliminate duplicate data row names in dbus, tools and xml autotests.
Jason McDonald [Tue, 14 Feb 2012 03:13:05 +0000 (13:13 +1000)]
Eliminate duplicate data row names in dbus, tools and xml autotests.

Change-Id: Ic734435f57bb4f2160ecb3bc645e642207931a99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEliminate duplicate data row names in network autotests
Jason McDonald [Tue, 14 Feb 2012 03:10:02 +0000 (13:10 +1000)]
Eliminate duplicate data row names in network autotests

Change-Id: Icbfc24309a182f37268232fc3c299d35d6d6a0ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Remove obsolete version of QSKIP macro.
Jason McDonald [Mon, 13 Feb 2012 03:34:21 +0000 (13:34 +1000)]
testlib: Remove obsolete version of QSKIP macro.

A variadic version of the QSKIP macro has been left in qtestlib for
a transitional period to give upstream projects time to catch up with
the removal of the function from the API.  This transitional period is
now finished.

Task-number: QTBUG-21652
Change-Id: Ib1a9158c2efbae05ffd0e69e72879f6387d4b2e8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove code related to test location.
Jason McDonald [Tue, 7 Feb 2012 02:50:54 +0000 (12:50 +1000)]
Remove code related to test location.

Testlib no longer does anything with the test location, and neither do
any of Qt's tests, so the code is no longer needed.

Change-Id: I1a464116179f3e26efadad6901f00f3c33e0ce84
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse static-less QMetaType API in QVariant.
Jędrzej Nowacki [Mon, 9 Jan 2012 10:36:03 +0000 (11:36 +0100)]
Use static-less QMetaType API in QVariant.

This patch improves performance when constructing a custom type in
a QVariant by ~ 7-20% (instructions count) depending on the type size
and metatype attributes.

Change-Id: Ic2707ff5abd689b66e23c1794f111504bf9b3b01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoImplement new static less API for QMetaType.
Jędrzej Nowacki [Tue, 20 Dec 2011 16:11:46 +0000 (17:11 +0100)]
Implement new static less API for QMetaType.

Currently QMetaType API contains almost only static methods. This works
nice until someone needs more information or needs to do more operations
on a type. In this case every function call has to do type dispatch.

This API allows to avoid redundant type dispatching, by caching a
type information in a QMetaType instance. It gives significant
performance boost especially for custom types (up to 9x).

Change-Id: I223d066268402e072e41ca1d0a3e7bc160655d7f
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRedirect libjpeg messages via qWarning
Donald Carr [Tue, 14 Feb 2012 21:55:48 +0000 (21:55 +0000)]
Redirect libjpeg messages via qWarning

This allows us to catch spurious libjpeg warnings via the installation of a
message handler

Change-Id: I82f3257118b5fbdf66550be80e72f75e9a24d3c1
Reviewed-by: Girish Ramakrishnan <girish.1.ramakrishnan@nokia.com>
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQt Network: Added the \inmodule command in the class documentation.
Michalina Ziemba [Tue, 14 Feb 2012 12:27:58 +0000 (13:27 +0100)]
Qt Network: Added the \inmodule command in the class documentation.

-Some of the public classes were missing the \inmodule command.
-Fixed a sentence.

Change-Id: I88ebe12680c744e32253dc01c5ddb4292267caf9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoDrop QFile::fileEngine
João Abecasis [Sat, 4 Feb 2012 00:10:55 +0000 (01:10 +0100)]
Drop QFile::fileEngine

The function was already marked as internal.

By moving access to the underlying file engine to private API this
supports the effort to completely drop file engines from public API. In
the future, the goal is to completely drop the file-engine abstraction
as it exists today.

Change-Id: I332fa56e70c87e83c1e08bb9f75e04df7c93fec7
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Anselmo L. S. Melo <anselmo.melo@openbossa.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFixed tst_QFile when redirecting stdin/stdout/stderr to/from files.
Rohan McGovern [Wed, 15 Feb 2012 07:56:30 +0000 (17:56 +1000)]
Fixed tst_QFile when redirecting stdin/stdout/stderr to/from files.

openStandardStreamsBufferedStreams would fail if standard streams were
redirected to a file (e.g. ./tst_qfile > testlog.txt).

openStandardStreamsFileDescriptors already has a workaround, so apply it
here too.

Change-Id: Iffe9d7864909e489e77c1114e80c4e3bc70a8722
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoqmetaobjectbuilder: Store only unique strings in the string table
Kent Hansen [Mon, 6 Feb 2012 14:38:34 +0000 (15:38 +0100)]
qmetaobjectbuilder: Store only unique strings in the string table

Do like moc: If the string has already been entered into the table,
just return its position, don't make a new copy. This can save
space, for example, if there are several properties of the same type;
the typename only occurs once in the string table but will be
referenced by several property descriptors.

Change-Id: Ic0087697716cab1c6449ea51c0c758a6fd1a1c82
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoDon't hardcode the number 14 in meta-object generators
Kent Hansen [Mon, 6 Feb 2012 07:32:59 +0000 (08:32 +0100)]
Don't hardcode the number 14 in meta-object generators

14 is the number of fields (ints) in the QMetaObjectPrivate struct
as of revision 6.

Use the calculated number of fields instead, so that the code will
still be correct when more fields are added in future revisions.

Change-Id: I4f2c2bfc125f3fabc8e8caedf5c6ba6c17a34d06
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoqmetaobjectbuilder: Add asserts to confirm validity
Kent Hansen [Sun, 5 Feb 2012 21:38:56 +0000 (22:38 +0100)]
qmetaobjectbuilder: Add asserts to confirm validity

buildMetaObject() can operate in two "modes", based on whether a
buffer to write the meta-object into is passed or not. Add asserts
to make sure that the intermediate meta-data indexes are correct
in both "modes", and that the final size in "write mode" matches
the size that was computed in the preceding non-writing pass.

The asserts make it easier to catch obvious problems when changing
buildMetaObject() to generate a new meta-object revision.

Change-Id: Ief7c74e6f6fca836587e831b06072d6aa98c7193
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoInclude headers before QT_BEGIN_NAMESPACE.
Xizhi Zhu [Tue, 14 Feb 2012 21:32:52 +0000 (22:32 +0100)]
Include headers before QT_BEGIN_NAMESPACE.

Change-Id: Icaef1cb280d2968e4a35c93375749d2d9feff856
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoAdd missing private headers to .pri.
Xizhi Zhu [Tue, 14 Feb 2012 21:21:35 +0000 (22:21 +0100)]
Add missing private headers to .pri.

Change-Id: Ia0f37953124198dce000adad9dfae051925d526e
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoFix ref counted window close handling.
Stephen Kelly [Sat, 11 Feb 2012 00:33:55 +0000 (01:33 +0100)]
Fix ref counted window close handling.

Instead of refcounting QWindow visibility, we ask the Application
subclass whether quitting is appropriate.

Task-Id: QTBUG-24120
Change-Id: Idd19cc1a3e5742fddded89c7638aaaa5e47c568d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agobootstrap configure.exe on windows
Oswald Buddenhagen [Wed, 8 Feb 2012 10:38:07 +0000 (11:38 +0100)]
bootstrap configure.exe on windows

it is *ugly* to have the binary in the repository.
this adds a few seconds to the windows build, as the configure needs to
be rebuilt, obviously. that's almost negligible.

Change-Id: I40ffde23b3c3af2b6bab3e78cd0a9f433214b563
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd QMetaType::FirstCoreType enum value.
Jędrzej Nowacki [Mon, 13 Feb 2012 12:01:59 +0000 (13:01 +0100)]
Add QMetaType::FirstCoreType enum value.

We should not assume that the first type id is 0.

Change-Id: I17ba6ba57e97ebd495904bfd11235fe458f214e5
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoAdd a ThemeChange event.
Friedemann Kleint [Tue, 14 Feb 2012 10:52:05 +0000 (11:52 +0100)]
Add a ThemeChange event.

- Pass it from QWindowSystemInterface via QWindow to the widgets.
- Add handler code from 4.8 / qapplication_win.cpp to qwidget.cpp.

Change-Id: Ic759563aa00cb93fe014c1bf41020446c1927dec
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoMove the removal of the Quit event to QWindow.
Stephen Kelly [Sat, 11 Feb 2012 00:10:07 +0000 (01:10 +0100)]
Move the removal of the Quit event to QWindow.

Change-Id: If524127ba9dab9ef065aaf4079294295eef8e49b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMake the cmake tests work with a namespace build.
Stephen Kelly [Fri, 10 Feb 2012 15:40:12 +0000 (16:40 +0100)]
Make the cmake tests work with a namespace build.

Change-Id: I6858c324548373c57963b5ef137772a1f780ec78
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoQHeaderView::moveSection performance boost
Thorbjørn Lund Martsum [Thu, 29 Dec 2011 07:59:37 +0000 (08:59 +0100)]
QHeaderView::moveSection performance boost

The patch also speeds up swapSections and hideSection a lot.

It work by eliminating the Span. (That is forcing each 'Span'
to have exactly one element) That saves a lot of loops since
we can often lookup info fast - and/or change it fast.

Since it is often a complexity change, it is difficult to
put %-increase on. (The most used linear function is
recalcSectionStartPos() - and it has a very low constant)

However comparing with the new benchmark (2500 rows)
swapSection, showHideSection and moveSection are about
20-40 factors faster. (Yes, it is a lot faster!)

In the benchmark moveSection is about 300 factors faster.

Beside being a far better model it is also far more simple.

This fix partly solves:
Task-number: QTBUG-19092

Change-Id: I8deeb9315276d15c68e8a27d5dcb8e0c0badf367
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoFix tst_QFileDialog2 for Windows 7.
Miikka Heikkinen [Wed, 15 Feb 2012 11:23:22 +0000 (13:23 +0200)]
Fix tst_QFileDialog2 for Windows 7.

There are no rights for typical user or even administrator to write
directly under c:\ root in windows without rights elevation, so
completionOnLevelAfterRoot() test case failed. Changed the test case
to use an existing directory.

Task-number: QTBUG-24289
Change-Id: I6a8dfc9d1d6ae798b3b9049c542b45fdbdbd9a8c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRemove XFAIL in QGraphicsWidget test for Windows
Miikka Heikkinen [Wed, 15 Feb 2012 13:22:35 +0000 (15:22 +0200)]
Remove XFAIL in QGraphicsWidget test for Windows

The XFAILed initStyleOption() case passes on Windows, so do not XFAIL
it there.

Task-number: QTBUG-24297
Change-Id: I9615c408aa7e72b5eb8fe9739903594e45eb5fd7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoImplement new plugin mechanism
Lars Knoll [Mon, 6 Feb 2012 22:36:17 +0000 (23:36 +0100)]
Implement new plugin mechanism

moc can now embed meta information about the plugin
inside the plugin itself. This information can
be queried by Qt without having to load the plugin.

Source compatibility with the old plugin loading
mechanism is still there, but will be removed before
Qt 5.0.

Change-Id: I03e4196ddfed07d0fe94acca40d5de8a6ce7f920
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd JSON support to the bootstrap library
Lars Knoll [Mon, 6 Feb 2012 09:36:48 +0000 (10:36 +0100)]
Add JSON support to the bootstrap library

The JSON support will get used in moc to support
the creation of plugin metadata that's embedded
into the plugin itself.

Change-Id: I3bc52b16ca0a43bc8bf9141b450045c6183b7823
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd autotest for QMetaMethod introspection
Kent Hansen [Mon, 13 Feb 2012 10:48:03 +0000 (11:48 +0100)]
Add autotest for QMetaMethod introspection

This autotest checks that meta-methods can be properly inspected
(signature, return type, parameter types, etc.).

Change-Id: I13dc75ec5123280e94ec738dade3f54e427fdbaa
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoCorrected the size of mipmaps in framebuffer objects.
Kim Motoyoshi Kalland [Wed, 15 Feb 2012 11:45:08 +0000 (12:45 +0100)]
Corrected the size of mipmaps in framebuffer objects.

Change-Id: Ia3c0daefc6537b12be7f9072e7defc0631794690
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove a couple of QtGui/QtGui header entries
Andy Shaw [Tue, 14 Feb 2012 15:39:08 +0000 (16:39 +0100)]
Remove a couple of QtGui/QtGui header entries

Removed a couple of header entries since they were causing build
problems on Mac.  Additionally it is a bit much to include QtGui/QtGui
in a private header file.  Added in an include to QCache and QGradient
which was necessary afterwards.

Change-Id: I442efc799a4c81b50ec30d58f1aedfb08e686fcb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdded support for resetting QOpenGLFramebufferObject attachments.
Samuel Rødal [Tue, 14 Feb 2012 18:43:46 +0000 (19:43 +0100)]
Added support for resetting QOpenGLFramebufferObject attachments.

As the documentation says, this can be useful to free or recreate
attachments when needed. For example, it might be useful to free stencil
and depth attachments to free up resources when not rendering to the
framebuffer object.

Change-Id: Ib267024fdd380a788c256eb8fb86e0f8832329e0
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
12 years agoStabilize QFileSystemWatcher test.
Friedemann Kleint [Tue, 14 Feb 2012 14:52:49 +0000 (15:52 +0100)]
Stabilize QFileSystemWatcher test.

- Run each test in a temporary directory, avoid writing test
  files in source/build tree and prevents tests being influenced
  by left-overs from previous runs and locks of the application
  on the current directory.
- Modify test to be able to use absolute paths to the temporary
  directory.
- Skip parts of test removeFileAndUnWatch if a race condition
  occurs.

Task-number: QTBUG-24029
Change-Id: I215cc2e0fe6f92d2ffe597b01cdc9c9a39e3c5b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoVarious documentation fixes ported from Qt 4.8
Teemu Katajisto [Thu, 9 Feb 2012 08:17:53 +0000 (10:17 +0200)]
Various documentation fixes ported from Qt 4.8

Final set of selected documentation fixes for qtbase
from Qt 4.8 commit bacae725e584f51ee2fd83af7bef3e4515de9587

Task-number: QTBUG-13362
Task-number: QTBUG-18356
Task-number: QTBUG-18417
Task-number: QTBUG-18664
Task-number: QTBUG-21562
Task-number: QTBUG-22094
Task-number: QTBUG-18741
Task-number: QTBUG-15921
Task-number: QTBUG-15738

Change-Id: I3bd33bb7ce7aa991913ba82f3ea0e4b124f3ee41
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agotst_QVariant passes on Mac OS X
Bradley T. Hughes [Tue, 14 Feb 2012 10:31:37 +0000 (11:31 +0100)]
tst_QVariant passes on Mac OS X

Do not mark with insignificant_test anymore.

Task-number: QTBUG-22747
Change-Id: I4ef6d5d7e1189b03fd1ab812a0839e3709686e1b
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoTest template-based connect() with qmetaobjectbuilder
Kent Hansen [Sat, 4 Feb 2012 21:51:41 +0000 (22:51 +0100)]
Test template-based connect() with qmetaobjectbuilder

For template-based connect(), the meta-object is resolved at
compile-time (the virtual metaObject() function isn't called).
But we can make it work by copying the members of the dynamically
constructed meta-object to the statically defined one.

Change-Id: Ia4d3263a89008e36e187c584db6d25d9042f32b3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoqmetaobjectbuilder: Add support for revisioned methods and properties
Kent Hansen [Sat, 4 Feb 2012 20:39:38 +0000 (21:39 +0100)]
qmetaobjectbuilder: Add support for revisioned methods and properties

moc supports it, so qmetaobjectbuilder should too.

Change-Id: I01475794e928b5a1b659f0dab044933948186971
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
12 years agoFix compilation with MinGW
Jonathan Liu [Tue, 14 Feb 2012 12:27:32 +0000 (23:27 +1100)]
Fix compilation with MinGW

Some headers and constants are available in MinGW-w64 that are not
available in the official MinGW. STATE_SYSTEM_HASPOPUP and
STATE_SYSTEM_PROTECTED constants are defined if they are not already
defined by including oleacc.h. _CrtSetReportMode is not used and
crtdbg.h is not included when using official MinGW as crtdbg.h is
missing from official MinGW.

Change-Id: Ie7f3f3726a1663d0fdeb6ee17b86873ae3f61860
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFixed typo.
Rohan McGovern [Sun, 12 Feb 2012 23:43:29 +0000 (09:43 +1000)]
Fixed typo.

keyboar -> keyboard

Change-Id: Ia305237ac92ac5b0d5c8b0d3cc638292238cec02
Reviewed-by: Johannes Zellner <johannes.zellner@nokia.com>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agoEliminate duplicate data row names in widgets autotests.
Jason McDonald [Tue, 14 Feb 2012 03:03:16 +0000 (13:03 +1000)]
Eliminate duplicate data row names in widgets autotests.

Change-Id: I82bab3cc39320014fac6732c7b60233b262cb30d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoQSqlTableModel::indexInQuery(): fix for inserted rows
Mark Brand [Mon, 13 Feb 2012 07:46:23 +0000 (08:46 +0100)]
QSqlTableModel::indexInQuery(): fix for inserted rows

Should return invalid QModelIndex since inserted row does not map to
query.

Change-Id: Ib1d15cf4198a7063717fb3f3b594b2b1d8a54dfe
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlRelationalTableModelPrivate: simplify field name translation
Mark Brand [Mon, 13 Feb 2012 08:26:21 +0000 (09:26 +0100)]
QSqlRelationalTableModelPrivate: simplify field name translation

It's not appropriate to use indexInQuery() here. First of all,
the row might be an inserted row, and thus not be in the query.
The intent was probably to get the column position in the query,
but this is certainly not row dependent. Furthermore, if there
are inserted or removed columns, these are managed within
QSqlQueryModel.

Change-Id: I89668655b263747a5b849136404112e911722b3d
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::submitAll(): avoid resubmiting successful changes
Mark Brand [Fri, 10 Feb 2012 02:08:36 +0000 (03:08 +0100)]
QSqlTableModel::submitAll(): avoid resubmiting successful changes

Consider what happens the 1st change succeeds and the 2nd fails. No
select will be done. When submitAll() is called again, the 1st will
still seem to be pending. It will fail or have unexpected effects if
the primary values were changed.

The solution is to avoid resubmitting successful changes. We leave
them in the cache so they stay visible. Submitted changes cannot
be reverted of course.

Change-Id: Ibf400555effa1c3801d02f8713b4b69856ede23a
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: do not store primaryValues in change cache
Mark Brand [Fri, 10 Feb 2012 01:36:29 +0000 (02:36 +0100)]
QSqlTableModel: do not store primaryValues in change cache

They can be generated on demand regardless of edit strategy.

Change-Id: I1e1853e93cc453f1486b65ce577f00141b9c5c47
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::primaryValues(): take care of row mapping
Mark Brand [Mon, 13 Feb 2012 08:57:56 +0000 (09:57 +0100)]
QSqlTableModel::primaryValues(): take care of row mapping

There is no reason for the caller to be concerned with this.
primaryValues() now takes advantage of the fact that QSqlQueryModel
uses indexInQuery which was recently made virtual.

Change-Id: I7d856ee05f55c3199fd17c618e559320d0582989
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::commitAll(): replace row removal hack
Mark Brand [Thu, 9 Feb 2012 23:47:33 +0000 (00:47 +0100)]
QSqlTableModel::commitAll(): replace row removal hack

The purpose of the hack was to fool QSqlQueryModel into signaling the
removal of extra rows via rowsRemoved(). The extra rows are the
inserted rows generated by QSqlTableModel.

While it is important to signal the removal of all the rows before
requerying after committing changes, there is a cleaner way. The
table model should remove its rows before the query model removes its
rows.

Iterating backwards avoids having to decrement row numbers above ones
being removed.

Expected test results have been adjusted for these changes.

Change-Id: I0e8aa81f5e7b8fea5922f5ffd1cfb4a932313a10
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel: deduplicate and optimize counting of inserts
Mark Brand [Thu, 9 Feb 2012 14:33:43 +0000 (15:33 +0100)]
QSqlTableModel: deduplicate and optimize counting of inserts

Reading STL iteration code is painful enough if you only have
to do it once.
Thiago suggested remembering the end iterator for performance.

Change-Id: Ic2cdc480f591932ea420e692a4d2796d49f05313
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSql*Model: make indexInQuery() virtual
Mark Brand [Thu, 9 Feb 2012 13:53:35 +0000 (14:53 +0100)]
QSql*Model: make indexInQuery() virtual

Qt 5 seems like an excellent opportunity to simplify logic and separate
concerns by making indexInQuery() virtual. Note that this wasn't my
idea, but was mentioned in a helpful comment.

Change-Id: Ie29ead110def45297c32de3ce6d07a8eefb08d8c
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoAllow the QLocalServer to listen to a native descriptor
Andrew Stanley-Jones [Thu, 9 Feb 2012 14:51:22 +0000 (15:51 +0100)]
Allow the QLocalServer to listen to a native descriptor

QLocalServer could only listen to sockets it created.
Thi is not always possible as sockets may be passed
by socketpair() or have to be created locally by
other means.  This adds a similar feature to QLocalSocket
where a native descriptor maybe used.

Change-Id: I43b0af179b3b868dd164d4e1fd312ff4546cf9ff
Reviewed-by: Michalina Ziemba <michalina.ziemba@nokia.com>
Reviewed-by: Tapani Mikola <tapani.mikola@nokia.com>
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
12 years agoRemove fileLineEndingTest from networkselftest.
Miikka Heikkinen [Tue, 14 Feb 2012 13:47:27 +0000 (15:47 +0200)]
Remove fileLineEndingTest from networkselftest.

The fileLineEndingTest case doesn't test network in any way and it is
conceptually wrong, too, as any tests where line endings are an issue
should be handled with .gitattributes rather than forcing user to
check out the repo with unix line endings.

Task-number: QTBUG-24271
Change-Id: I73986993edc227cb68b8f61d51cc1cf458d20989
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoProduce unimplemented warning for QOpenGLBuffer::map only once
Alex Wilson [Tue, 14 Feb 2012 03:25:26 +0000 (13:25 +1000)]
Produce unimplemented warning for QOpenGLBuffer::map only once

Change-Id: Ia4f136e964e4e0ca326f462b0996ef3d1b843cf6
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoOptimize memory consumption for simple GPOS tables
Eskil Abrahamsen Blomfeldt [Tue, 14 Feb 2012 12:01:23 +0000 (13:01 +0100)]
Optimize memory consumption for simple GPOS tables

Sometimes GPOS tables are used for kerning and can grow quite
large if the font is unoptimized. In that case, allocating the
maximum size for each ValueRecord will have a great impact on
memory consumption. For GPOS tables which do not contain device
tables, we only allocate the memory actually need to store the
data instead.

While it would be possible to optimize memory for GPOS tables that
contain device tables as well, this is not a part of this patch.

Change-Id: Id665b2821675ef955c497c782f09f99af765b8a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAbort FTP download, not the whole application
Shane Kearns [Tue, 14 Feb 2012 20:12:42 +0000 (20:12 +0000)]
Abort FTP download, not the whole application

An old coding error meant that the C runtime abort() function was
being called instead of QFtp::abort() when cancelling an FTP download
using QNetworkReply::close()

Task-number: QTBUG-22820
Change-Id: Ib97fda9769b2b55a08c042c66c4444cb6216d2b1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixes QTemporaryDir compilation error under QNX.
Rafael Roquetto [Tue, 14 Feb 2012 16:44:44 +0000 (17:44 +0100)]
Fixes QTemporaryDir compilation error under QNX.

Checking for Q_OS_QNX as well upon QFileSystemEngine inclusion.

Change-Id: Ia0e0d7344abaae6dd6375528f0cc17dbefafe8d8
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove needless line "#define d d_ptr"
Kent Hansen [Mon, 13 Feb 2012 13:43:40 +0000 (14:43 +0100)]
Remove needless line "#define d d_ptr"

There was a time when qsslsocket.h declared its private slots as

Q_PRIVATE_SLOT(d, void _q_connectedSlot())

But now they are correctly declared as

Q_PRIVATE_SLOT(d_func(), void _q_connectedSlot())

so the "#define d d_ptr" hack isn't needed.
Specifically, the define would break moc-generated code that refers
to the member d of a structure (which a future moc revision does,
namely QByteArrayData::d).

Change-Id: Ic94fa4d523fb17e8088973cfc0d090d5cce97267
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoStore only unique strings in the QtDBus meta-object string table
Kent Hansen [Mon, 6 Feb 2012 18:00:13 +0000 (19:00 +0100)]
Store only unique strings in the QtDBus meta-object string table

Do like moc: If the string has already been entered into the table,
just return its position, don't make a new copy. This can save
space, for example, if there are several properties of the same type;
the typename only occurs once in the string table but will be
referenced by several property descriptors.

Change-Id: I63e5c73d28ba117fd00a5261d0e89f3a3d83df9a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoMove desktopSettingsAware to QGuiApplication.
Friedemann Kleint [Tue, 14 Feb 2012 07:55:02 +0000 (08:55 +0100)]
Move desktopSettingsAware to QGuiApplication.

For use by the QPA plugins.

Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Reviewed-by: Morten Sørvig <morten.sorvig@nokia.com>
Task-number: QTBUG-24204

Change-Id: I7f35274eedb55fcb60ad289768234bc302286d01
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWindows: Fixed helper process finding in network tests
Miikka Heikkinen [Mon, 13 Feb 2012 14:45:13 +0000 (16:45 +0200)]
Windows: Fixed helper process finding in network tests

Helper processes were not found properly on all network tests
when the test was run with "nmake check":

- tst_qtcpsocket
- tst_qtcpserver
- tst_qnetworksession
- tst_qnetworkreply

Task-number: QTBUG-24199
Task-number: QTBUG-24203
Task-number: QTBUG-24226
Task-number: QTBUG-24231
Task-number: QTBUG-24232

Change-Id: Ia4451b5a5e3fe9f81aba3837baf8292411f995d8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agofix whitespace in qnamespace.qdoc
Rick Stockton [Tue, 14 Feb 2012 17:02:10 +0000 (09:02 -0800)]
fix whitespace in qnamespace.qdoc

repair instances of (1) trailing ws; and (2) tabs+spaces.

Task-number: QTBUG-22642

Change-Id: I775c6e1c65625340f6279bcff042dd8e74271021
Reviewed-by: Rick Stockton <rickstockton@reno-computerhelp.com>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
12 years agoFix online status checking in generic bearer plugin.
Xizhi Zhu [Wed, 18 Jan 2012 20:38:17 +0000 (21:38 +0100)]
Fix online status checking in generic bearer plugin.

QNetworkInterface::IsUp means the interface is up, but not necessarily
connected. QNetworkInterface::IsRunning means the interface is up and
connected.

Task-number: QTBUG-22873
Change-Id: Ieb544058814520b4292b496de2e4672214f3d00a
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoMove QtConcurrent configuration to a single file
João Abecasis [Sun, 5 Feb 2012 23:40:36 +0000 (00:40 +0100)]
Move QtConcurrent configuration to a single file

This file lives in src/concurrent, alongside the rest of the library. Relevant
configuration was moved out of qglobal.h, as it isn't relevant for other
parties and thus isn't needed there.

This introduces a global header that all QtConcurrent headers now include. This
header includes qglobal.h and defines library-specific configuration for all to
follow.

Change-Id: If6f11e7bbc6139d29004eb1602bd579b75b637c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoCompile
Bradley T. Hughes [Tue, 14 Feb 2012 06:48:34 +0000 (07:48 +0100)]
Compile

mHackedPanel is not declared anywhere in the Cocoa dialog helpers.

Change-Id: I3ba5dd429aa9fe5833b19c1e081425ec4020658d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoupdate comment on test
Mark Brand [Mon, 13 Feb 2012 13:16:01 +0000 (14:16 +0100)]
update comment on test

Fix up for f5e1da12f0e7bdeee4db74acc52dfabeb12a4e31.

Change-Id: I3a730ce7e47d71551a46cc105ba2d1fe4e33b65b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoQSqlTableModel::primaryValues(): make const
Mark Brand [Mon, 13 Feb 2012 08:42:27 +0000 (09:42 +0100)]
QSqlTableModel::primaryValues(): make const

Change-Id: I6d53beb2b177dc5c71c74755f2fb602ab87502c0
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoEliminate duplicate data row names in gui autotests.
Jason McDonald [Tue, 14 Feb 2012 02:20:56 +0000 (12:20 +1000)]
Eliminate duplicate data row names in gui autotests.

Change-Id: I1b39a7d13399ea8d47369203e9617810a34c0097
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEliminate duplicate data row names from corelib autotests.
Jason McDonald [Tue, 14 Feb 2012 01:52:40 +0000 (11:52 +1000)]
Eliminate duplicate data row names from corelib autotests.

Change-Id: I57a37f19746b76c6c9c3534f5c66c5a5478dae24
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoEliminate duplicate data row names in utf8 autotest.
Jason McDonald [Mon, 13 Feb 2012 06:27:10 +0000 (16:27 +1000)]
Eliminate duplicate data row names in utf8 autotest.

Change-Id: I30dfd4b93ab1e5430b5bc7fc25fe6aea0e0cc551
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix duplicate data row name in tst_QTextCodec::utf8Codec test.
Jason McDonald [Mon, 13 Feb 2012 06:17:17 +0000 (16:17 +1000)]
Fix duplicate data row name in tst_QTextCodec::utf8Codec test.

Rename rows using naming convention used elsewhere in this test.

Change-Id: I8e669cedcc2058cf84cee976c8a0a478bc1cea0a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoUse meaningful data row names in tst_QTextCodec::fromUnicode test.
Jason McDonald [Mon, 13 Feb 2012 06:07:18 +0000 (16:07 +1000)]
Use meaningful data row names in tst_QTextCodec::fromUnicode test.

Use the codec name instead of just numbering the rows. This eliminates
some duplicate row names.  Two duplicate rows have also been removed --
for the WINSAMI2 row, the last value in the row is different, making one
copy do a subset of the testing done by the other, so the row that did
less testing was removed.

Change-Id: I859f681a627e8d3839ca8a4ba09d541bec43d9fb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd QCocoaColor- and FontDialogHelper
Christoph Schleifenbaum [Tue, 31 Jan 2012 15:15:51 +0000 (16:15 +0100)]
Add QCocoaColor- and FontDialogHelper

Change-Id: Ie6e648e9e1f4ffbb34d73f9afdd6cc77e86bc3d1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoDon't hard-code paths to /usr/X11R6 in linux-mkspecs
Tor Arne Vestbø [Mon, 13 Feb 2012 13:35:58 +0000 (14:35 +0100)]
Don't hard-code paths to /usr/X11R6 in linux-mkspecs

It was causing issues when cross-compiling with a sysroot, as the paths
were not prefixed with the sysroot. The right include paths should be
taken care of by pkgconfig anyways.

Change-Id: I2cf7bf6377c88e6bf3b015100444d082530337ec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoReduce PLATFORM_MAC usage in the configure script
Morten Johan Sorvig [Tue, 3 Jan 2012 19:54:57 +0000 (20:54 +0100)]
Reduce PLATFORM_MAC usage in the configure script

All platforms are PLATFORM_QPA now, so we want to
remove PLATFORM_MAC.

Do one of two things: either remove the
PLATFORM_MAC code path or test on BUILD_ON_MAC
instead.

Change-Id: I6037a1a5f79498d9e0b5c2607e3698319fc7f68f
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agoAdded static keyword to blend_transformed_tiled_argb/rgb565().
Kim Motoyoshi Kalland [Mon, 13 Feb 2012 14:30:54 +0000 (15:30 +0100)]
Added static keyword to blend_transformed_tiled_argb/rgb565().

Change-Id: I43745c672d5d31ef89901234c04bf2433269462c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd a testcase of a list of UUIDs in string form.
Robin Burchell [Sun, 22 Jan 2012 12:46:13 +0000 (14:46 +0200)]
Add a testcase of a list of UUIDs in string form.

UUIDs are a good testcase, because the textual content is all fairly similar.
This also changes data generation to be a little neater now that we're starting
to get multiple pieces of data.

Change-Id: Ie4100a1ca4dbe7bf1cd73de883a9854377ac2f5e
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoRemoved unused qStorePixel[] array.
Kim Motoyoshi Kalland [Mon, 13 Feb 2012 15:01:11 +0000 (16:01 +0100)]
Removed unused qStorePixel[] array.

Change-Id: I9c9df19fcf06b127aaebb7ab093221e1b254ab9e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix host endian detection when compiling with sysroot
Simon Hausmann [Mon, 13 Feb 2012 10:55:39 +0000 (11:55 +0100)]
Fix host endian detection when compiling with sysroot

Apply the sysroot argument for the endian test only for the test used
for detecting the target endianness, don't use --sysroot for the host
detection.

Change-Id: I53edda6ebfd06e73cc64f2561b707bd2ba052ae7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoMake "nmake check" pass for network tests in Windows.
Miikka Heikkinen [Mon, 13 Feb 2012 14:53:24 +0000 (16:53 +0200)]
Make "nmake check" pass for network tests in Windows.

 Marked two tests insignificant due to failures, these need to be
fixed later and then re-enabled:
- tst_qnetworkreply
- tst_qsslsocket

Task-number: QTBUG-24203
Change-Id: I9647833bf15fe5a340d7ef59e1dcb007a92677dc
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse newly-added QFileInfo::isNativePath
João Abecasis [Sat, 4 Feb 2012 00:00:51 +0000 (01:00 +0100)]
Use newly-added QFileInfo::isNativePath

Don't indirect over internal API.

With QAbstractFileEngine and friends on the way out, QFile is losing its
(marked internal) virtual fileEngine() function and the file engine
can't be queried for LocalDiskFlag. That information is now available
through QFileInfo, instead.

Change-Id: I48827a96fd8cd748055ad5f075912fc8e1c5ef7f
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoAdd QFileInfo::isNativePath
João Abecasis [Wed, 8 Feb 2012 10:28:30 +0000 (11:28 +0100)]
Add QFileInfo::isNativePath

This function returns true if the file path can be used directly with
native APIs, modulo encoding and path separator conversions. This is
important for applications that interface with other libraries or simply
need to use native APIs together with Qt.

Traditionally, this information was available in QAbstractFileEngine and
forced users to explicitly create an engine or use internal API such as
QFile::fileEngine to access the underlying engine and this piece of
information.

Given its usefulness, exposing the information in a more visible place
is more appropriate. This reduces the need for people to know or care
about implementation details, like file engines...

The existing isLocalFs test was updated and repurposed to use the new
API, instead of relying on file engines and internal implementation
details of QFileInfo.

Change-Id: I65f497bb25741f6f7ea4d2c3b3562c8c4aab8bea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix tst_QSocketNotifier on Mac OS X
Bradley T. Hughes [Wed, 8 Feb 2012 11:26:09 +0000 (12:26 +0100)]
Fix tst_QSocketNotifier on Mac OS X

Socket notifier behavior is very OS-dependent. QtNetwork uses non-
immediately (it will return -1 w/ errno=EINPROGRESS). We have to wait
with select(2) to indicate that the connection is ready, then call
connect(2) again. When this happens, we need another call to select(2)
to get notification on the listening socket so that we can call
accept(2) to complete the connection.

The mixingWithTimers() failure happens due to the test expecting a
single processEvents() call to be able to completely connect a TCP
socket. But as described above, this may not happen. The test should
QTRY_COMPARE() to give the test a chance to let all this happen.

The posixSockets() test can fail due to the same connect() behavior. The
test already has a comment about the write notifier behavior being very
OS dependent. This caused the first enterLoop() to return too early,
before the read notifier fired (which is what the test is checking for,
that the read notifier fired). Move creation of the write notifier to
where we expect it to fire, just before writing to the posix socket.

In the same test, the read notifier inside QTcpSocket may not fire after
the write notifier on the posix socket. Use the waitForReadyRead()
function to give the socket a chance to read the data written to the
posix socket.

Change-Id: I541e6ee9a39a92ce3acf6b9ffee51079febe43e4
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
12 years agoCleanup HEADERS+=... in src/corelib/arch/arch.pri
Bradley T. Hughes [Fri, 10 Feb 2012 13:34:12 +0000 (14:34 +0100)]
Cleanup HEADERS+=... in src/corelib/arch/arch.pri

Include all qatomic_*.h files in HEADERS, since we don't know which
include the compiler will end up choosing in the end (operating system
specific includes are still conditionally included, though).

Change-Id: I4241e40ad51d34dede04be0c4ee95378d6f3d037
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd src/corelib/arch/qatomic_unix.h and qatomic_unix.cpp
Bradley T. Hughes [Fri, 10 Feb 2012 13:27:34 +0000 (14:27 +0100)]
Add src/corelib/arch/qatomic_unix.h and qatomic_unix.cpp

This provides a fallback implementation on UNIX when the Q_PROCESSOR_*
and Q_CC_*/Q_COMPILER_* checks fail to find an implementation.

Note that we always compile qatomic_unix.cpp, but code is only included
when QATOMIC_UNIX_H is defined (meaning the checks above did not find an
implementation).

Change-Id: I8ce047847206003b4fa96eb3fb76b1c2ffbc2dfc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove qatomic_arch.h
Bradley T. Hughes [Mon, 13 Feb 2012 05:49:56 +0000 (06:49 +0100)]
Remove qatomic_arch.h

Make qbasicatomic.h include the OS/compiler/processor dependent
implementation.

For implementations that have not yet been ported to declare a
QAtomicOps, they need to #include <QtCore/qoldbasicatomic.h>, and the
new QBasicAtomicInteger and QBasicAtomicPointer should not be declared.

Change-Id: Ia951834484c9f8dfa75131592e5e716b68ff989b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove Windows specific code from qoldbasicatomic.h
Bradley T. Hughes [Mon, 13 Feb 2012 05:56:30 +0000 (06:56 +0100)]
Remove Windows specific code from qoldbasicatomic.h

This header is not used on Windows anymore, so remove the dead #ifdefs.

Change-Id: I76cfbd13c9fff0eab87cc69e8ca1e0d5ccab9e3a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove the generic atomic implementation
Bradley T. Hughes [Fri, 10 Feb 2012 13:11:26 +0000 (14:11 +0100)]
Remove the generic atomic implementation

This implementation is not used on Windows, and needs to be updated
on UNIX for processors that we do not support (this will be done in
a separate commit).

Change-Id: I471d0ed00f4e8b89ecfa400796a2dbe2330935c6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoAdd missing crtdbg.h include
Jonathan Liu [Sat, 11 Feb 2012 10:52:07 +0000 (21:52 +1100)]
Add missing crtdbg.h include

_CrtSetReportMode requires crtdbg.h to be included.

Change-Id: I7e2cbdf7e3087bbe115cd6a51024422b619ac552
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoReshuffle code between qglobal, qlogging
Kai Koehne [Fri, 10 Feb 2012 14:54:50 +0000 (15:54 +0100)]
Reshuffle code between qglobal, qlogging

Make the content of the .h, .cpp files match.

Change-Id: Ib2506aeff74281ec4bcbf04d21da451038391203
Reviewed-by: David Faure <faure@kde.org>
12 years agoFix qmake compilation
Olivier Goffart [Mon, 13 Feb 2012 09:32:40 +0000 (10:32 +0100)]
Fix qmake compilation

No need to error out in bootstrapped mode because we don't use -fPIC

Change-Id: I0cc2889c75b41968edfd8e801b9161a1eb63f6ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove HP PA-RISC atomic implementation.
Bradley T. Hughes [Fri, 10 Feb 2012 10:16:41 +0000 (11:16 +0100)]
Remove HP PA-RISC atomic implementation.

This architecture is obsolete and discontinued.

Support for PA-RISC can be re-added if needed, but it would be preferred
to use the GCC intrinsic support from qatomic_gcc.h (on Linux/HPPA, for
example).

Change-Id: I952e521a2c8c68840df0d44843b5487d5c20b135
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove the SH atomic implementation...
Bradley T. Hughes [Fri, 10 Feb 2012 11:18:41 +0000 (12:18 +0100)]
Remove the SH atomic implementation...

... but keep SH-4a, which provides a more efficient implementation. The
implementation removed here was very similar to the code removed by
commit dc5388e79b71d796c1207681235cf007c39810bd.

Support for SH can be provided by qatomic_gcc.h, or re-added in the
future if absolutely necessary.

Change-Id: Ic38b57c9513fc9c3c99ba7e102780a3939b735b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove out-of-line atomic implementation for PowerPC
Bradley T. Hughes [Fri, 10 Feb 2012 10:31:34 +0000 (11:31 +0100)]
Remove out-of-line atomic implementation for PowerPC

Only support inline assembler with GCC. Support for xlC or other
compilers is not provided or tested. The files in
src/corelib/arch/vxworks only supported out-of-line PowerPC, so
remove it as well.

The xlC compiler seems to support GNU-style inline assembly, which we
prefer. Anyone wishing to support that compiler again should first test
if the inline assembly (the prefered method) works. See

http://publib.boulder.ibm.com/infocenter/lnxpcomp/v8v101/topic/com.ibm.xlcpp8l.doc/language/ref/asm.htm#asm

Change-Id: I70e56c0b06428bfb6538ca5e101baebd870f92f5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove out-of-line atomic implementation for Alpha
Bradley T. Hughes [Fri, 10 Feb 2012 10:25:32 +0000 (11:25 +0100)]
Remove out-of-line atomic implementation for Alpha

This implementation has not been tested or supported at all during
the Qt 4.x lifetime. Do not bring it with us into Qt 5.x. Only
inline assembler with GCC is supported.

Change-Id: I31b48721bb7f4c96f4a777da604d80cc63c6fd79
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFixed compile with -qtnamespace
Rohan McGovern [Sun, 12 Feb 2012 23:42:08 +0000 (09:42 +1000)]
Fixed compile with -qtnamespace

Add missing (unbalanced) macros.
Some files had QT_BEGIN_NAMESPACE without a corresponding
QT_END_NAMESPACE.

Change-Id: I50226a37a3710eda80ad76320d11efee39aa1fd8
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
12 years agotestlib: Count passes, fails and skips consistently.
Jason McDonald [Thu, 2 Feb 2012 07:08:44 +0000 (17:08 +1000)]
testlib: Count passes, fails and skips consistently.

For data-driven tests, testlib previously counted one fail or skip for
each data row that failed or skipped, while it counted only one pass
for a test function where all rows passed and counted no passes for a
test function where some rows passed and some rows failed. A similar
problem also existed for benchmark tests, which could run multiple
iterations of the same test, with each fail and skip being counted but
only a single pass being counted for the entire series of iterations.

This commit makes testlib count one pass, fail or skip for each data
row.  Test functions that are not data-driven count one result for the
test function, as before.  Benchmark tests count one pass, fail or skip
per iteration.

A side-effect of this change is that the test output in plain text, xml
and light xml formats now shows a result for every data row and
benchmark iteration executed, allowing post-processors to correctly
calculate the total number of tests executed.  Previously, individual
rows were not shown in the test output if they passed, making such
calculations impossible.

The only change to the xunitxml output format is to correct a bug where
no test result was recorded for a test function if the last data row
was skipped and all other rows passed -- in which case the overall
result should be a pass.  Note that there is also a pre-existing bug
in the xunit logger, where no result is reported if all rows are
skipped; that bug is unaffected by this commit.

Task-number: QTBUG-21848
Task-number: QTBUG-22124
Change-Id: I7e17177e10d6e89e55b9684c159bd506f21d002b
Reviewed-by: Ed Baak <ed.baak@nokia.com>
12 years agoCodeCoverage: Handle QTest based subtests.
Caroline Chao [Thu, 2 Feb 2012 09:12:21 +0000 (10:12 +0100)]
CodeCoverage: Handle QTest based subtests.

Set QT_TESTCOCOON_ACTIVE environment variable when the coverage is installed
for a test and unset it when the coverage data is saved. Tests that run when
QT_TESTCOCOON_ACTIVE is set are subtests and will not be considered as
stand-alone tests for the coverage.

When a test is run as a subtest its coverage data will not be saved for
itself but for the main test it is merged with. Also its status will not be
reported since only the status of the main test is expected in the test report,
e.g. the test tests/auto/testlib/selftests.

Change-Id: Icfdf99300aae18040e1a3441a8af21f68df4c0db
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoCompile without OpenGL.
Samuel Rødal [Mon, 6 Feb 2012 10:48:46 +0000 (11:48 +0100)]
Compile without OpenGL.

Since a GLuint returning virtual was added to QPlatformOpenGLContext
we need to make sure it's protected by #ifndef QT_NO_OPENGL.

Change-Id: Id2f56ccdccc3863986250ee1b3aa7efccf88ba5c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>