profile/ivi/qtbase.git
12 years agoWindows - fix connecting to a socket using IPv4 mapped IPv6
Shane Kearns [Fri, 17 Feb 2012 20:33:57 +0000 (20:33 +0000)]
Windows - fix connecting to a socket using IPv4 mapped IPv6

Connecting to an IPv4 mapped IPv6 address (e.g. ::FFFF:127.0.0.1)
requires the IPV6_V6ONLY socket option to be cleared.
This was causing tst_qtcpserver::ipv6ServerMapped autotest to fail.
The same change is not required on MacOS X - the test passes there.

Task-number: QTBUG-24351
Change-Id: I6c08b19f0daa12765da2d44792ffb17299322695
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.
Friedemann Kleint [Mon, 20 Feb 2012 14:36:57 +0000 (15:36 +0100)]
Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.

Forward-declare instead.

Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoFix warning about converting false to pointer value.
Friedemann Kleint [Mon, 20 Feb 2012 14:44:21 +0000 (15:44 +0100)]
Fix warning about converting false to pointer value.

Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoMake sure that we pick up xcb from pkg-config
Jørgen Lind [Tue, 14 Feb 2012 15:38:32 +0000 (16:38 +0100)]
Make sure that we pick up xcb from pkg-config

and run the configure checks with the values

Change-Id: Ie8e0072c686c6a7dce1d02e25a9c1abce4679d34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove Native Client special casing from configure.
Morten Johan Sorvig [Mon, 20 Feb 2012 11:05:17 +0000 (12:05 +0100)]
Remove Native Client special casing from configure.

Change-Id: I20f044b267b6c18e5a3050de22710c45e7573cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove QAccessibleInterface::relationTo().
Jan-Arve Saether [Mon, 20 Feb 2012 13:42:41 +0000 (14:42 +0100)]
Remove QAccessibleInterface::relationTo().

QAccessibleInterface::relations() replaces both relatedTo() and
some of the RelationFlags that navigate() handled before.

Change-Id: I4b9d2c28ba3d753efe7cc9bfa0ad68bed3ee02fd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoUpdated for accessibility
Jan-Arve Saether [Mon, 20 Feb 2012 10:19:10 +0000 (11:19 +0100)]
Updated for accessibility

Change-Id: I13b5c2f293e9c1c238c7b7c6aae9d26f5c150f24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoPort QDBusAdaptorConnector meta-object to revision 6
Kent Hansen [Sat, 18 Feb 2012 20:33:28 +0000 (21:33 +0100)]
Port QDBusAdaptorConnector meta-object to revision 6

We want to drop support for old revisions in Qt 5.

This commit brings the QDBusAdaptorConnector meta-object in sync with
current moc output.

The QtDBus implementation was assuming that the relaySlot() slot
would be created at index methodOffset() in the meta-object, but
since revision 4 that's no longer the case (signals always come
first). Made the code more robust by actually querying the
meta-object what the index is.

Change-Id: Ie0791680cc2e9e5fb1472c4462c391f92ea22ea6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoRemove unused QtDBus meta-object extensions
Kent Hansen [Fri, 17 Feb 2012 22:00:41 +0000 (23:00 +0100)]
Remove unused QtDBus meta-object extensions

The inputSignature and outputSignature fields were not being used
anymore.

All tests still pass.

Change-Id: Icbc8fdcd5179a2b1b4843d58b90af925f6bef133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()
Marc Mutz [Thu, 16 Feb 2012 06:42:11 +0000 (07:42 +0100)]
QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()

There's no reason for them not to be, and it's a prerequisite
for making these functions constexpr.

Change-Id: I03c9965147b51014c7af60a4c2d7f25a3f6e21a7
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoMove QTypeInfo out of qglobal.h and into a separate header
Bradley T. Hughes [Sat, 4 Feb 2012 13:32:16 +0000 (14:32 +0100)]
Move QTypeInfo out of qglobal.h and into a separate header

qtypeinfo.h is still included from qglobal.h, and defines QTypeInfo
as well as all the specializations for built-in and default Qt types.

Change-Id: I24116174de288a730cbb7aa2f80d346d2b2f9408
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoAdded note in QPlatformWindow::setGeometry() docs about position policy.
Samuel Rødal [Fri, 17 Feb 2012 15:58:09 +0000 (16:58 +0100)]
Added note in QPlatformWindow::setGeometry() docs about position policy.

Change-Id: I0ac76b7aac1aa717592c34f414b1dd8fbee92be2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agouic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Marc Mutz [Sun, 11 Dec 2011 15:55:01 +0000 (16:55 +0100)]
uic: use QStringLiteral() instead of QString::fromUtf8() where applicable

Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.

This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.

Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.

This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.

The autotest baseline has been updated with the new expected results.

Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix LSB mkspec
Harald Fernengel [Mon, 20 Feb 2012 08:25:24 +0000 (09:25 +0100)]
Fix LSB mkspec

Use the standard g++ specs, just override the compiler name

Change-Id: I4adacd7204d3880155bdfc3405e20f322ad593ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agofix QProcess for Windows XP
Joerg Bornemann [Mon, 20 Feb 2012 11:31:37 +0000 (12:31 +0100)]
fix QProcess for Windows XP

CreateNamedPipe supports the flag PIPE_REJECT_REMOTE_CLIENTS since
Windows Vista. On earlier Windows versions the system call would fail
with ERROR_INVALID_PARAMETER.

This does not open a security hole on Windows XP as there can be only
one pipe instance.

Change-Id: I5a1c7fdf756678009857317c7b563c884afeef2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoEnsure the directory exists to receive a deprecated header.
Matthew Vogt [Sun, 19 Feb 2012 23:40:12 +0000 (09:40 +1000)]
Ensure the directory exists to receive a deprecated header.

When creating a deprecated header, create the directory it will be
located in, if it does not yet exist.

Change-Id: Id0ac7327e7dfe5b3e34b431c7bc3844b72251a3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoRemove QAccessibleInterface::navigate()
Jan-Arve Saether [Sat, 18 Feb 2012 22:29:24 +0000 (23:29 +0100)]
Remove QAccessibleInterface::navigate()

This is replaced by parent(), child() and relations()

Change-Id: Iabff6ec56176a1ca8465d6480860f6e0174fd134
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoUse standard unix mutexes on LSB
Harald Fernengel [Mon, 20 Feb 2012 08:37:07 +0000 (09:37 +0100)]
Use standard unix mutexes on LSB

LSB doesn't allow syscalls, so fall back to the normal _unix
implementation

Change-Id: I8aba6147da8b46e3f85b0454cf9aca219811c9fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMove QMetaMethod::parameterTypes() implementation to helper function
Kent Hansen [Sun, 19 Feb 2012 18:34:50 +0000 (19:34 +0100)]
Move QMetaMethod::parameterTypes() implementation to helper function

Because of an upcoming change to the meta-object data format, the
ability to extract parameter types from a signature will be needed by
meta-object builders (such as QMetaObjectBuilder) soon.

Change-Id: I1f21b2be41761a5db2f1a05976fad29eb3aebb03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoPort QSignalEventGenerator meta-object to revision 6
Kent Hansen [Sat, 18 Feb 2012 20:15:45 +0000 (21:15 +0100)]
Port QSignalEventGenerator meta-object to revision 6

We want to drop support for old revisions in Qt 5.

This commit brings the QSignalEventGenerator meta-object in sync with
current moc output.

Change-Id: Id5f4954b08cf49169850bd77543b2a7ab8274c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoUse QMetaMethod::isValid() to check method validity
Kent Hansen [Fri, 17 Feb 2012 21:26:27 +0000 (22:26 +0100)]
Use QMetaMethod::isValid() to check method validity

The signature() method will soon be replaced by a function that
returns a QByteArray rather than a pointer, and calling it will be
more expensive than calling isValid(). Plus, isValid() looks nicer.

Change-Id: I6844988c84dcadf876fc86bc71c8b310a21f88de
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoAdd QMetaMethod::isValid() function
Kent Hansen [Fri, 17 Feb 2012 21:12:05 +0000 (22:12 +0100)]
Add QMetaMethod::isValid() function

This function provides a proper way of determining whether a function
returned by QMetaObject::method() is valid. (Checking whether
signature() returns a 0 pointer, which e.g. testlib does, is not an
ideal API -- especially given that signature() will soon be removed
and replaced by a function that returns a QByteArray.)

Change-Id: I644f476b09904925f2042945f5d0ad744482b682
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoFix typo in QByteArray(QConstByteArrayData) constructor
Kent Hansen [Sun, 19 Feb 2012 18:02:16 +0000 (19:02 +0100)]
Fix typo in QByteArray(QConstByteArrayData) constructor

There is no "str" member in QConstByteArrayData, it should be "ba".

Change-Id: Ife76460e9332733480c1ceded21e78388656092d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDon't call metaObject() several times
Kent Hansen [Fri, 17 Feb 2012 20:48:52 +0000 (21:48 +0100)]
Don't call metaObject() several times

It's sufficient to call it once per invokeMethod.

Change-Id: I1db826027eca87c799f216d65e27c801a23e64e2
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSmall moc cleanup: Pass lists by const reference
Kent Hansen [Sun, 19 Feb 2012 17:52:19 +0000 (18:52 +0100)]
Small moc cleanup: Pass lists by const reference

generateFunctions() shouldn't (and doesn't) modify the list of
functions, so the list should be passed by const reference.

Change-Id: If5ff810e5623e734816c3089eb8b3fd4f54f2345
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agomoc: Get rid of implicit conversions to const char *
Kent Hansen [Sat, 18 Feb 2012 17:51:46 +0000 (18:51 +0100)]
moc: Get rid of implicit conversions to const char *

moc mostly operates on QByteArrays. When an actual const char * is
needed, it should be explicit.

Change-Id: I0b3e262830128306688f4512a4b59ce8966c2579
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoMinuscule moc cleanup: Don't declare i in function scope
Kent Hansen [Mon, 20 Feb 2012 05:48:17 +0000 (06:48 +0100)]
Minuscule moc cleanup: Don't declare i in function scope

This is not C.
Furthermore, the function-level i was already shadowed in several
places by "for (int i = 0; ..." blocks later in the function.

Change-Id: Ic1777f78d9838bc2921d68337be05de454bbeabe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoDon't force CFG_ENDIAN to "auto" on Mac.
Morten Johan Sorvig [Fri, 17 Feb 2012 13:21:37 +0000 (14:21 +0100)]
Don't force CFG_ENDIAN to "auto" on Mac.

We no longer support universal ppc/x86 builds.

Change-Id: I8c4a1d087d02da1ad80d91a7a04147b37e81d74f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoDon't use -rpath-link when building on Mac.
Morten Johan Sorvig [Fri, 17 Feb 2012 13:34:25 +0000 (14:34 +0100)]
Don't use -rpath-link when building on Mac.

The logic here was wrong: test if the
target linker supports -rpath-link, and then set
it for both host and target via mkspecs/qmodule.pri.

Change-Id: Ie4da7ed2e06e784f9edb65a27290913ab838a8c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoFix compilation with MinGW-w64
Jonathan Liu [Sun, 19 Feb 2012 11:33:35 +0000 (22:33 +1100)]
Fix compilation with MinGW-w64

This fixes a "cast from 'void*' to 'int' loses precision" error and adds
a missing argument to qWarning.

Change-Id: I38544c4e317a3f6d1ecf26ebb3e35c66b1878d24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoRename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWER
Bradley T. Hughes [Fri, 17 Feb 2012 13:17:54 +0000 (14:17 +0100)]
Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWER

IBM's POWER and the PowerPC architecture have been merged into a single
ISA, the Power ISA (see http://www.power.org). Use this unified name in
Qt.

Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoqwidget_p.h: Remove DontSetCompositionMode from the internal flags
Holger Hans Peter Freyther [Sun, 19 Feb 2012 18:20:49 +0000 (19:20 +0100)]
qwidget_p.h: Remove DontSetCompositionMode from the internal flags

This flag was used by QWS to set or not set the composition mode
when filling the background. E.g. this was used by 'transparent'
windows to set the alpha bits. QPA didn't have this enabled in 4.8,
the code paths are gone in Qt5 and it is the responsibility of the
QPlatformBackingStore to initialize the alpha bits properly.

Change-Id: I4011d842b718d6a40b19922b5f75c597e63079c8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqpa: Verify that the platform returns a WId that is not WId(0)
Holger Hans Peter Freyther [Wed, 1 Feb 2012 12:32:53 +0000 (13:32 +0100)]
qpa: Verify that the platform returns a WId that is not WId(0)

This is motivated by visiting a customer that re-implemented the
::winId method and returned WId(0) that resulted in a crash. Currently
there is only a comment inside the implementation of the ::winId
default implementation. Add a note to the API documentation, add
a Q_ASSERT to check if our assumption holds true.

Change-Id: I8607a4efc4f561f7849c976cd2454f6fbcb20eaa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove dead method.
Richard Moore [Sun, 19 Feb 2012 16:31:39 +0000 (16:31 +0000)]
Remove dead method.

Fix Qt 5 TODO

Change-Id: I9a12cc07ebc7c039bbeb53922b0539f177b226f8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoChanged qabstractnetworkcache unittest to use TESTDATA
Kurt Korbatits [Mon, 20 Feb 2012 04:05:47 +0000 (14:05 +1000)]
Changed qabstractnetworkcache unittest to use TESTDATA

- Changed qabstractnetworkcache to install testdata

Change-Id: I8f2ae6103214755ee7898dbc0ee50c0e4d7d45ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoModify helper functions to remove embedded QSKIP call and return status.
Toby Tomkins [Mon, 20 Feb 2012 03:29:13 +0000 (13:29 +1000)]
Modify helper functions to remove embedded QSKIP call and return status.

The helper functions contained QSKIP macros which do not also skip their
parent function. These QSKIP function were removed and replaced with a
return success value.

Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoSet tst_qtoolbutton triggered function skipped.
Toby Tomkins [Mon, 20 Feb 2012 05:46:46 +0000 (15:46 +1000)]
Set tst_qtoolbutton triggered function skipped.

This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.

Task-number: QTBUG-24374

Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoMake QLocale autotest pass for shadow builds.
Jason McDonald [Mon, 20 Feb 2012 01:39:31 +0000 (11:39 +1000)]
Make QLocale autotest pass for shadow builds.

For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.

This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.

Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: Report one test result per benchmark test.
Jason McDonald [Fri, 17 Feb 2012 03:39:30 +0000 (13:39 +1000)]
testlib: Report one test result per benchmark test.

Prior to this commit, a benchmark test could report 0..n passes and 0..m
fails or skips, where n is the number of accumulation iterations used to
collect benchmark data and m is the number of times the test function
was invoked.  Depending on the type of benchmark measurer being used,
this could result in a very large volume of test output and inconsistent
pass, fail and skip counts between test runs.

This commit changes the behaviour so that each benchmark test reports
one pass, fail or skip, regardless of the number of iterations used to
collect benchmark data.

This commit also prevents benchmark data being reported in the test
output if the benchmark test failed or skipped, as any benchmark data is
of dubious value in such cases.

The latter change in behaviour requires a minor modification to the
badxml selftest, which now tests quoting of literal strings in xml test
output for both passing and failing benchmarks.

Finally, this commit also adds a new selftest specifically for verifying
correct behaviour for benchmarks that fail or skip.

Task-number: QTBUG-24313
Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFixed qobject unittest to work from installation directory
Kurt Korbatits [Mon, 20 Feb 2012 00:18:01 +0000 (10:18 +1000)]
Fixed qobject unittest to work from installation directory

- Made test depend on subprogram to make sure it was there when
  test ran.
- install signalbug subprogram

Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agotestlib: Add selftests for XPASS and XFAIL involving QCOMPARE.
Jason McDonald [Mon, 20 Feb 2012 00:15:57 +0000 (10:15 +1000)]
testlib: Add selftests for XPASS and XFAIL involving QCOMPARE.

Change-Id: I4f897b411aaa51ff453208eda50e12665489074b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agotestlib: make XPASS output slightly less confusing.
Jason McDonald [Fri, 17 Feb 2012 05:11:20 +0000 (15:11 +1000)]
testlib: make XPASS output slightly less confusing.

Prior to this commit, when an unexpected pass occurred the test output
showed the message "XPASS : tst_foo::function() 'expr' returned FALSE",
where the problem was actually that the expression evaluated to true
when it was expected to be false.

This commit changes the output to make it clear that the expression
evaluated to true unexpectedly.

Task-number: QTBUG-22118
Change-Id: Id22c178073d3b75789675ca37a8ef019029b1f91
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove unnecessary image height adjustments from layout.
Andrew den Exter [Mon, 20 Feb 2012 00:50:06 +0000 (10:50 +1000)]
Remove unnecessary image height adjustments from layout.

cb8445f0323b0eefbb04f1d8adad81a00b53abd8 removes an implied +1 from
document line height so we need to remove the compensating -1 from
image ascent/descent for image heights to be correct..

Change-Id: I310c06bcf1ce2eefef42c2828faa0eb435ad71cf
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
12 years agoSpeed up tst_QWaitCondition
Bradley T. Hughes [Thu, 16 Feb 2012 08:47:32 +0000 (09:47 +0100)]
Speed up tst_QWaitCondition

Reduce the thread and iteration counts to make this test execute faster.
This change reduces the runtime to 14 seconds (from 5 minutes, 38
seconds).

Change-Id: Id5ea056cfd33022da5a06809f0598a5cdb02b27b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoImport QMimeType / QMimeDatabase into QtCore.
David Faure [Sat, 18 Feb 2012 15:00:09 +0000 (16:00 +0100)]
Import QMimeType / QMimeDatabase into QtCore.

History of the development before the import:
ssh://codereview.qt-project.org/playground/mimetypes.git

Mimetype definitions come from shared-mime-info where available (UNIX systems),
loaded using a mmap'ed binary cache generated by update-mime-database.
As a fallback if no cache is found, we parse the raw XML files otherwise.

This makes the MIME type support fast and with very low memory usage on UNIX,
and it makes it easy to use on Windows (no dependency on shared-mime-info,
Qt even includes a freedesktop.xml file to use if none are found on the system).

Change-Id: I27b05008216ff936dc463bd80d3893422bfb940e
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agomake configure ignore $CC and $CXX
Oswald Buddenhagen [Mon, 30 Jan 2012 21:11:43 +0000 (22:11 +0100)]
make configure ignore $CC and $CXX

this was inconsistent with how qmake itself works, and was actually
wreaking havoc.

Change-Id: I5aa83cc88ffe7141cc0c31b03b76c48274f1ebdb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoIntroduced QWindow::isExposed().
Gunnar Sletta [Fri, 17 Feb 2012 10:30:56 +0000 (11:30 +0100)]
Introduced QWindow::isExposed().

The visible property along with show/hideEvent tracks the
windows visibility from the application perspective and is
really a request. The exposeEvent() along with the isExposed()
accessor is used to notify the application of the actual
state of the window in the windowing system.

Change-Id: I7f5b7ed74a168e34aaa21ce0ae9042ddfb0bf6d8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoAdding hasHeightForWidth as a virtual Widget funcion
Thorbjørn Lund Martsum [Mon, 6 Feb 2012 08:24:50 +0000 (09:24 +0100)]
Adding hasHeightForWidth as a virtual Widget funcion

Just implements what the note states (and removes the private function)

Change-Id: I9a6fd5134460712accf09ba01691df8b9b1f5d0d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoAdded error reporting to QJsonParser
Andrew Christian [Fri, 17 Feb 2012 20:38:23 +0000 (15:38 -0500)]
Added error reporting to QJsonParser

Change-Id: Ib2390c0faf1ed7ada3fc185abce83740ad112929
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoQEasingCurve: return QVector for cubic spline representation
Marc Mutz [Wed, 15 Feb 2012 17:55:25 +0000 (18:55 +0100)]
QEasingCurve: return QVector for cubic spline representation

QEasingCurve internally holds the spline data in a
QVector<QPointF>. For the return from cubicBezierSpline(),
the vector is transformed into a QList<QPointF>.

This involves copying, and into an inefficient (for QPointF
payloads) container at that, so deprecate cubicBezierSpline()
in favour of a new toCubicSpline() returning the QVector
directly.

Change-Id: Ie4827fe7c6e289ad97a0b09772e47298779c76ca
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoTrivial doc fix
Richard Moore [Sat, 18 Feb 2012 10:57:42 +0000 (10:57 +0000)]
Trivial doc fix

Change-Id: I9b63e0b63f225b245eec68ea4211cb0f2ccf9bb5
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoDocument Q_PROCESSOR_* macros
Bradley T. Hughes [Fri, 17 Feb 2012 08:41:35 +0000 (09:41 +0100)]
Document Q_PROCESSOR_* macros

All known processors and their variants/revisions are documented. I
added Q_PROCESSOR_MIPS_V based on the MIPS64 online documentation, which
documents MIPS64 as a superset of MIPS IV and MIPS V.

Change-Id: Ie2796d4f03499283aa2c96d60f5e37bd74a36ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix qclipboard autotest on Windows.
Friedemann Kleint [Wed, 15 Feb 2012 11:34:04 +0000 (12:34 +0100)]
Fix qclipboard autotest on Windows.

Emit changed signal only if the clipboard is not owned,
in which case QClipboard does it.

Task-number: QTBUG-24184
Change-Id: I27420583a718a5f8cd93b9d361b1e422a75df300
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix error handling in QHostInfo windows backend
Shane Kearns [Fri, 17 Feb 2012 15:14:01 +0000 (15:14 +0000)]
Fix error handling in QHostInfo windows backend

If the DNS server returns a non authoritative host not found response,
then windows returns WSATRY_AGAIN error code.
This is now reported as HostNotFound and not UnknownError

Change-Id: I212985acd4e85ff4b2bdb6c57ec403405a7695fb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoWindows: Fix QWindow-test.
Friedemann Kleint [Fri, 17 Feb 2012 15:08:17 +0000 (16:08 +0100)]
Windows: Fix QWindow-test.

- Save & Restore style and geometry when switching to
  full screen and back since it is not a real state on
  Windows.
- Obey the positioning policy in setGeometry.

Task-number: QTBUG-24185

Change-Id: I18dea4fd372e0b2e46273a7a27e0c6f4f4bde771
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoqnamespace.qdoc: Add doco for new values of Qt::MouseButton
Rick Stockton [Tue, 14 Feb 2012 16:52:09 +0000 (08:52 -0800)]
qnamespace.qdoc: Add doco for new values of Qt::MouseButton

QtTBUG-22642 added about 25 new values for the Qt::MouseButton Enum.
This change adds documentation for the new values. Note that the
special value 'Qt::AllButtons' is documented at the top (next to
the other special value, 'Qt::NoButton'.) The new internal value
'Qt::MaxMouseButton' is listed as a \omitvalue.

Task Number: QTBUG-22642

Change-Id: Iaec623754156fff8a2c73e357fef82e1fe36354b
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoOnly define QT_NAMESPACE if it is used.
Stephen Kelly [Wed, 15 Feb 2012 21:12:41 +0000 (22:12 +0100)]
Only define QT_NAMESPACE if it is used.

Fixes non-namespaced builds.

Change-Id: I0ec3c29f58042313dfa864f15c2b2d47914cdedb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
12 years agoEnsure that Qt public headers compile with strict flags
David Faure [Fri, 17 Feb 2012 08:05:39 +0000 (09:05 +0100)]
Ensure that Qt public headers compile with strict flags

Those from
http://wiki.qt-project.org/Coding_Conventions#Conventions_for_public_header_files
(unfortunatey -Wold-style-cast cannot be used due to the glibc macro bswap_16)
and many Qt defines that disable casts.

Change-Id: I97ac707a101df9819e8c031fa75a31b30e20247f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQProcess documentation typo fix and improvement.
Rafael Roquetto [Fri, 17 Feb 2012 11:17:30 +0000 (12:17 +0100)]
QProcess documentation typo fix and improvement.

The word 'momentaneously' does not exist.

Change-Id: I3d2201d5b7b3a01af5989bb1c3fcd55110d5482c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Till Adam <till@kdab.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoMention QT_NO_STL in the QString documentation
Simon A. Eugster [Tue, 14 Feb 2012 18:04:11 +0000 (19:04 +0100)]
Mention QT_NO_STL in the QString documentation

Defining QT_NO_STL disables STL functions (toStdString() etc.) too.

Change-Id: Id5c8e12d933af6af63ee7f80fa2d5d7577cd689a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoNo need to stat with QFile::exists before QFile::open, for reading.
David Faure [Fri, 17 Feb 2012 13:16:55 +0000 (14:16 +0100)]
No need to stat with QFile::exists before QFile::open, for reading.

Change-Id: I14ca7f8a377bca39004defc96d69d62c151181f5
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jeremy Katz <jeremy.katz@nokia.com>
12 years agoRemove unnecessary locking from QNetworkProxy constructor
Shane Kearns [Thu, 16 Feb 2012 17:02:11 +0000 (17:02 +0000)]
Remove unnecessary locking from QNetworkProxy constructor

QGlobalNetworkProxy (a singleton) had two phase construction, with
the second phase being called from QNetworkProxy's constructor.
This isn't necessary, and has been reported as causing deadlocks.

Although constructing socket engine handlers has side effects
(they add themselves to a list on construction and remove themselves
on destruction), this appears to be safe. The socket engine handlers
are only used while holding the list mutex, and any socket engines
created don't have any reference to the factory that created them.

With the new version, it is possible that two instances of
QHttpSocketEngineHandler and QSocks5SocketEngineHandler exist
temporarily if a Q_GLOBAL_STATIC initialisation race occurs.
This appears safe, because the loser of the race deletes its
handlers, which remove themselves from the global list as above.

Task-number: QTBUG-13088
Change-Id: I8cf520da717d8ab7d862ab89c6de13aea6d60ac3
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix warnings about missing file.
Friedemann Kleint [Fri, 17 Feb 2012 10:59:48 +0000 (11:59 +0100)]
Fix warnings about missing file.

Change-Id: I8644d2b80bab9c18f666d742da389e84bf3f124c
Reviewed-by: Xizhi Zhu <xizhi.zhu@nokia.com>
12 years agoFix handling of urls containing username/password in QNetworkAccessManager
Shane Kearns [Wed, 15 Feb 2012 17:24:14 +0000 (17:24 +0000)]
Fix handling of urls containing username/password in QNetworkAccessManager

QNetworkAccessManager was ignoring the supplied credentials, although
webkit seems to support these urls at a higher level.

Following the behaviour of browsers:
We use supplied credentials if authentication is required.
We add supplied credentials to the authentication cache.
We emit authenticationRequired signal if the credentials were wrong.
We do not use previously cached credentials for that url

Synchronous http requests fail, if the credentials were wrong.

Task-number: QTBUG-18107
Change-Id: If46e8eab1511ba8a0f4bbe0d4efaabc4df0b8ab4
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFix incorrect use of QObject::disconnect in synchronous http request
Shane Kearns [Wed, 15 Feb 2012 17:58:11 +0000 (17:58 +0000)]
Fix incorrect use of QObject::disconnect in synchronous http request

In certain circumstances, this could cause the request to time out
(and repeatedly send bad authentication credentials to the server)
instead of failing with AuthenticationRequiredError.

Change-Id: Iff66b32f1d7268f21fd77b6620aae4b5d49d857f
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoUpdate documentation to show NTLMv2 is supported
Shane Kearns [Wed, 15 Feb 2012 15:34:09 +0000 (15:34 +0000)]
Update documentation to show NTLMv2 is supported

This feature was implemented in 4.8, but documentation was not
updated at the time.

Task-number: QTBUG-18181
Change-Id: I657d7ab7aaf43b73b7bf8fd1cb76086522cf5c2b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQSize/QSizeF: add const versions of scale()/transpose()
Marc Mutz [Thu, 16 Feb 2012 15:38:52 +0000 (16:38 +0100)]
QSize/QSizeF: add const versions of scale()/transpose()

Non-mutating functions can (potentially) be constexpr.
On top of that, they often make for more readable code.

Change-Id: I3547327cf5a7162737353a864a1025d0d02ccc2f
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Reviewed-by: David Faure <faure@kde.org>
12 years agoMake 'nmake check' succeed for widgets tests
Miikka Heikkinen [Thu, 16 Feb 2012 11:36:27 +0000 (13:36 +0200)]
Make 'nmake check' succeed for widgets tests

Marked a bunch of tests insignificant, and skipped one crashing test
case in QApplication test, as that couldn't be made to pass simply by
marking the test insignificant.

Once the underlying issues are fixed, the tests need to be re-enabled.

Task-number: QTBUG-24203
Change-Id: I9aea4fa207d307793445efdcaead72219fbf6c4f
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix another typo in the evdev keyboard plugin.
Friedemann Kleint [Fri, 17 Feb 2012 12:59:20 +0000 (13:59 +0100)]
Fix another typo in the evdev keyboard plugin.

Amend 3296b7327bd84f420df7e5561d192c0a8d0bb409

Change-Id: Ide58a6b8cbd980eda6ff91948c8f4fb45a30e527
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoWidgets: Remove obsolete QGuiPlatformPlugin.
Friedemann Kleint [Tue, 14 Feb 2012 15:46:31 +0000 (16:46 +0100)]
Widgets: Remove obsolete QGuiPlatformPlugin.

It has been superseeded by QPlatformTheme.

Task-number: QTBUG-24204
Change-Id: I8c4131c7bfd8201e747984d772ed8042610192b8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoDisable 'check' target generation for network autotests for Windows.
Miikka Heikkinen [Fri, 17 Feb 2012 10:28:50 +0000 (12:28 +0200)]
Disable 'check' target generation for network autotests for Windows.

A number of network autotests are unstable in Windows, so don't
generate check target for them as is done for mac.

Once the tests are acceptably stable, this needs to be reverted.

Change-Id: I18262e28ce40eba541aecf3cfb651bff34698ead
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoFix "check" target when load(testcase) is used in .pro file.
Miikka Heikkinen [Fri, 17 Feb 2012 08:48:22 +0000 (10:48 +0200)]
Fix "check" target when load(testcase) is used in .pro file.

The "check" target always depended on debug-check on projects that
explicitly loaded the testcase.prf, even if Qt was configured with
-release parameter. This obviously caused build failure. Changed the
testcase.prf to check which configuration is preferred using
CONFIG(debug, debug|release) like is done with similar cases in other
.prf files.

Task-number: QTBUG-24332
Change-Id: Ib5140b106e99efe51932bdd5a48914786de23230
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoQt 5 plugin system: Fix handling of namespaced plugin classes.
Friedemann Kleint [Fri, 17 Feb 2012 10:01:26 +0000 (11:01 +0100)]
Qt 5 plugin system: Fix handling of namespaced plugin classes.

- Add 'using namespace' to moc code as was the case in 4.8.

Change-Id: I26cba9ad74bf05eecc5205714c32c3176695e3b4
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoClean up default arch setting on Mac OS X
Bradley T. Hughes [Wed, 15 Feb 2012 12:49:55 +0000 (13:49 +0100)]
Clean up default arch setting on Mac OS X

Remove config.tests/mac/defaultarch.test, but do the same type of
default arch detection, only using the qmake binary instead of compiling
an empty file. Qt 5 will only support 10.6 and up, which means we
only support i386 and x86_64 now.

Change-Id: I24949ac803b965c523b1ee45cf769e266dcde134
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoFortune client example - list all IP addresses
Shane Kearns [Wed, 15 Feb 2012 20:12:15 +0000 (20:12 +0000)]
Fortune client example - list all IP addresses

The first IP address on the machine might not be a usable one.
Changed the QLineEdit to a QComboBox, and populated it with
all IP addresses of the machine, along with the machine names
if they are configured.

Task-number: QTBUG-13121
Change-Id: I7c443f5ce6efb0d0b525c5abad1671d3dcbba33c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFixed API in QWindow: visible() -> isVisible().
Samuel Rødal [Fri, 17 Feb 2012 09:19:35 +0000 (10:19 +0100)]
Fixed API in QWindow: visible() -> isVisible().

Change-Id: I14706abb8441c153f738563cb1a46205fdb2dae6
QWindow::visible() did not follow the API guidelines.
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoQStandardPaths implementation configured using JSON
Jeremy Katz [Wed, 15 Feb 2012 17:49:31 +0000 (18:49 +0100)]
QStandardPaths implementation configured using JSON

The default JSON file is /etc/user-dirs.json, but may be
overridden by setting PATH_CONFIG_HOME to the file to be used.

This provides functionality similar to the XDG based QStandardPaths,
but uses a JSON file to define paths, rather than the XDG A=B
format. Values other than HomeLocation and TempLocation may be
specified by removing the "Location" postfix, converting to upper
case, and separating words with _. Values are independent. For example,
CacheLocation does not depend on GenericCacheLocation.

Variables specified as ${[^{]*} will be replaced with environment
variables.

Change-Id: I374f5e6bae498dbfa9cb4ecadf915b05fb91fc34
Reviewed-by: David Faure <faure@kde.org>
12 years agoWindows: Fix compilation with -qtnamespace
Kai Koehne [Fri, 17 Feb 2012 09:10:27 +0000 (10:10 +0100)]
Windows: Fix compilation with -qtnamespace

Change-Id: I00ba88887100b699d620875d868f8a769259a768
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoExpect failure in tst_QStyleSheetStyle::hoverColors()
Bradley T. Hughes [Thu, 16 Feb 2012 13:18:10 +0000 (14:18 +0100)]
Expect failure in tst_QStyleSheetStyle::hoverColors()

This is similar to the focusColors() failures in QTBUG-23686.

Task-number: QTBUG-23686
Change-Id: I1f01a4e41e61a7a664309be34cfa4fe916a92b15
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip tst_QGuiApplication::focusObject() on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:40:02 +0000 (09:40 +0100)]
Skip tst_QGuiApplication::focusObject() on Mac OS X

This test fails intermittently, and at random locations.

Task-number: QTBUG-24322
Change-Id: Ied6dd4d1593066debc0fb48c6ca2a17a1f4d51b7
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip all tst_QFontDialog tests on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:35:53 +0000 (09:35 +0100)]
Skip all tst_QFontDialog tests on Mac OS X

All of these tests currently hang.

Task-number: QTBUG-24321
Change-Id: I7664b57f6539d4c03008701da66e193019a4440a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip hanging tst_QColorDialog test, expect failing test on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:31:59 +0000 (09:31 +0100)]
Skip hanging tst_QColorDialog test, expect failing test on Mac OS X

tst_QColorDialog::native_activeModalWidget() hangs, so skip this test.
tst_QColorDialog::task247349_alpha() fails, so XFAIL this failure.

Task-number: QTBUG-24320
Change-Id: Ie4d69e07063e9a648ec4fa3337274143a52ea3e3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoSkip hanging/failing tst_QApplication tests on Mac OS X
Bradley T. Hughes [Thu, 16 Feb 2012 08:22:39 +0000 (09:22 +0100)]
Skip hanging/failing tst_QApplication tests on Mac OS X

The first block of tst_QApplication::quitOnLastWindowClosed() hangs
on Mac OS X, so skip that block for now.

tst_QApplication::testDeleteLAter() both hangs and fails on Mac OS X,
so skip the test and XFAIL the failure.

Task-number: QTBUG-24318
Task-number: QTBUG-24319
Change-Id: Ice11292d84e63215f1bb9e03f3ef369943d1d887
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoRemove unused config.tests from config.tests/mac/*
Bradley T. Hughes [Wed, 15 Feb 2012 11:51:15 +0000 (12:51 +0100)]
Remove unused config.tests from config.tests/mac/*

The xarch.test and crc.test are not run by configure, so remove them
along with the related CFG_MACH_XARCH and QT_NAMESPACE_MAC_CRC configure
variables.

The kEventClassQt variable in qt_mac_p.h is also unused now, so remove
it as well.

Change-Id: I596ab9b493ce3164b6a4d40e8942479efc91b60d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoExpect tst_QSettings::ctor(native) failures on Mac OS X
Bradley T. Hughes [Tue, 14 Feb 2012 07:46:22 +0000 (08:46 +0100)]
Expect tst_QSettings::ctor(native) failures on Mac OS X

The default constructor for QSettings does not set NoAccess status, even
if the organization domain, organization name, and application name are
empty. Instead of trying to fix QSettings, keep the existing behavior,
and test for it.

Failures from tst_QSettings no longer need to be ignored, so
mac:CONFIG+=insignificant_test has been removed from the .pro file.

Task-number: QTBUG-22745
Change-Id: Ic9f8b6821c483c217e1ef2ece704be2da169e340
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoAdd palette() and further hints to QtGui/QPlatformTheme.
Friedemann Kleint [Fri, 10 Feb 2012 16:17:36 +0000 (17:17 +0100)]
Add palette() and further hints to QtGui/QPlatformTheme.

- Move palette() from deprecated QtWidgets/QGuiPlatformPlugin
  to  QtGui/QPlatformTheme, Make it return a const * since
  QPalette does not have isNull().
- Initialize QGuiApplication::palette() and
  QApplication::systemPalette() from it.
- Do not initialize QPalette from QGuiApplication::palette()
  unless app_pal is non-null (default to Qt::black if it is 0).
  This avoids initialization order crashes/recursions in the
  QPA plugin. Streamline initialization function.
- Remove styleName(), systemIconThemeName() and iconSearchPaths()
  from QGuiPlatformPlugin and re-add them as
  QPlatformTheme::themeHint().
- Remove styleHint() from QGuiPlatformPlugin, add it to
  QPlatformTheme::themeHint().
- Add UNIX themes with factory function (Generic,
  KDE, Gnome), taking it from Qt 4.8 code (stripping the
  KDE 3 code).
- Implement Windows palettes.

Task-number: QTBUG-24204

Change-Id: Ie27ec035df4f84c42deaffc4816b2e53ce705462
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoPlugin loader: Output offending plugin name in warning.
Friedemann Kleint [Fri, 17 Feb 2012 07:48:05 +0000 (08:48 +0100)]
Plugin loader: Output offending plugin name in warning.

Change-Id: I0aba0cf04f703b893459af55263685c5548a92f9
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoConvert jpeg plugin to new format
Lars Knoll [Fri, 10 Feb 2012 09:57:48 +0000 (10:57 +0100)]
Convert jpeg plugin to new format

Change-Id: Icadeb366c39a71dac948904197464f7e0b4272b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConvert ico plugin to new format.
Lars Knoll [Fri, 10 Feb 2012 09:54:01 +0000 (10:54 +0100)]
Convert ico plugin to new format.

Change-Id: Ib0fb7bb9f853e39cd62b693bb5b43ae15f750d84
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoConvert GIF plugin to the new format
Lars Knoll [Thu, 9 Feb 2012 20:34:26 +0000 (21:34 +0100)]
Convert GIF plugin to the new format

Change-Id: I3adf1d2402a07213cb4cb5193c465bd820919bd1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoEnables QProcess back on QNX.
Rafael Roquetto [Wed, 15 Feb 2012 15:52:43 +0000 (16:52 +0100)]
Enables QProcess back on QNX.

Because fork()/vfork() on QNX are not supported on multithreaded applications,
QProcess had been disabled on this platform. The corresponding code has now
been replaced with functions that wrap around spawn().

Change-Id: I46091b7d41f322a5cad07d17893aa929c84941ef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoStatic plugins don't break QFactoryLoader::keys()
Lincoln Ramsay [Fri, 17 Feb 2012 06:31:06 +0000 (16:31 +1000)]
Static plugins don't break QFactoryLoader::keys()

The = means that a single, static, compat plugin replaces the list of
keys (eg. from previously checked static plugins or from dynamic plugins).

Using += prevents this undesirable behaviour.

Change-Id: I3a40752c08dddbfe81444ca9c782b633e9742ab9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoChanged qnetworkreply unittest to work from install directory
Kurt Korbatits [Tue, 14 Feb 2012 01:46:03 +0000 (11:46 +1000)]
Changed qnetworkreply unittest to work from install directory

- made subdir test depend on echo
- remove SRCDIR and changed to use TESTDATA and QFINDTESTDATA
- added waitForFinish() to handle slow networks
- removed core module header from echo subprogram and replaced
  with needed header only
- Added ipv6 skip to connectToIPV6Address() if not available
- Added check QT_BUILD_INTERNAL and skip tests if backend
  not available
- Skip permission tests if run as root
- Removed win32 debug and release directory locations so that
  application is in known location relative to test data

Change-Id: I58c3c2fca3cd2fee72fdb81d016bb4fd7fe08ac2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemoved rfc3252.txt from networkselftest unittest
Kurt Korbatits [Wed, 15 Feb 2012 23:32:06 +0000 (09:32 +1000)]
Removed rfc3252.txt from networkselftest unittest

- no longer needed after test that used it was removed

Change-Id: I63fc8a9db07f9250507becb9bf6c2aefe0fdc254
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix naming of plugins for QPA plugins and use new plugin system.
Friedemann Kleint [Thu, 16 Feb 2012 14:30:37 +0000 (15:30 +0100)]
Fix naming of plugins for QPA plugins and use new plugin system.

- Fix naming "com.nokia" -> "org.qt-project" in platform
  integration & platform theme.
- Adapt Windows, XCB, Cocoa, Minimal.

Change-Id: I7834f5c3d94473b6f06c1bffee074a70ee25f426
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove usages of QT_ARCH and QT_ARCH_* from qtbase
Bradley T. Hughes [Fri, 10 Feb 2012 14:50:47 +0000 (15:50 +0100)]
Remove usages of QT_ARCH and QT_ARCH_* from qtbase

The architecture is detected at compile time based on the predefined
macros from the compiler. Don't use QT_ARCH in .pro, .pri, or .prf
files.  The PNG_NO_ASSEMBLER_CODE define from libpng.pri is not present
in the current copy of src/3rdparty/libpng, so no change in
functionality is expected.

The conditional for the SUPPORT_JIT define in pcre.pri is moved to
src/3rdparty/pcre/config.h, again so that we can use the compiler's
predefined macros to detect the architecture at compile time.

Replace QT_ARCH_ARM, QT_ARCH_MIPS, and QT_ARCH_SPARC with their
Q_PROCESSOR_* equivalents.

Replace QT_ARCH_INTEGRITY, QT_ARCH_VXWORKS, and QT_ARCH_WINDOWSCE with
their Q_OS_* equivalents.

Note that this commit also effectively disables the SPARC atomic
implementation. An inline implementation for SPARC needs to be added,
or we remove the current code and instead rely on the GCC intrinsic or
C++11 std::atomic support on SPARC.

Note also that this commit does not remove QT_ARCH from configure or
qconfig.h. This will continue to be set until all Qt 5 projects can be
moved away from using QT_ARCH.

Change-Id: I5de747cc4436d21941329974cff3016970f497b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoSome small doc fixes, typos and removal of one incorrect paragraph
Andy Shaw [Fri, 3 Feb 2012 22:53:31 +0000 (23:53 +0100)]
Some small doc fixes, typos and removal of one incorrect paragraph

The QTextStream paragraph that is removed referred to something that is
incorrect.  This was confirmed for Windows, Linux and Mac.

Change-Id: Ibac8f82482f2060308b5b8485d6da228bdf52fe6
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
(cherry picked from commit 80cebfde10cf34dcc0777c24f1b3ff37cad20181)

12 years agoDon't render glyph with FT with fetchMetricsOnly
Jiang Jiang [Wed, 15 Feb 2012 13:41:07 +0000 (14:41 +0100)]
Don't render glyph with FT with fetchMetricsOnly

Neither rendering with outline nor fetchMetricsOnly requires the
rendering from FreeType so we don't need to render them or cache
it. It should speed up recalcAdvances() quite a lot.

Change-Id: I0f623cb4f79da2edf6e9c9634a2f22fb0c66823c
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoEnsure that QSqlDatabase::database() is still thread-safe
Andy Shaw [Thu, 10 Nov 2011 06:56:57 +0000 (07:56 +0100)]
Ensure that QSqlDatabase::database() is still thread-safe

QSqlDatabase::database() is documented to be thread-safe and when the
driver is queried for the numericalPrecisionPolicy set then it can
comprimise the thread-safety.

Since the driver itself (if one is set) will be queried for the
numericalPrecisionPolicy when numericalPrecisionPolicy() is called on
the QSqlDatabase then we can have it fallback to the default instead
rather than taking the driver's own setting.

Task-number: QTBUG-13423
(cherry picked from commit e7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2)
Change-Id: Ie7e9fca6c0cd1d0869029fc6e9d7605234ee5bb2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
12 years agoEnsure the header's context menu is in sync with the visible sections
Andy Shaw [Fri, 3 Feb 2012 23:45:33 +0000 (00:45 +0100)]
Ensure the header's context menu is in sync with the visible sections

When the filedialog was reshown the context menu for the header was not
in sync with the sections that were actually visible.  This ensures that
it is in sync after the state of the header is restored.

Task-number: QTBUG-23271

Change-Id: Ia1546bf300d43a5822482f63de99eb52b674bf52
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
(cherry picked from commit 2e220e4603d6a0c21efee3a884be76e9f2d7ebb7)