Commit Graph

24238 Commits

Author SHA1 Message Date
Frederik Gladhorn
a2c829f339 Disable spdy test on Windows
The test is crashing regularly (see bugreport).
Currently the test is not run in the regular CI system, that is why
the failures were not noticed.

Task-number: QTBUG-47128
Change-Id: I70d4ada0872316cc63d7629bb9ab2d055d70cf2a
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-10 16:38:07 +00:00
Alex Trotsenko
964d767976 QRingBuffer::reserveFront(): do not leave empty array in buffer list
Fix the corner case when called on empty buffer.

Change-Id: I1316de7fbe69f3db40a7fdde06336e53d82675c9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-10 16:34:53 +00:00
Milian Wolff
a576ef4c3d Optimize moc: Implement fast operator== for Symbols.
Previously, this allocated temporary QByteArrays in the frequent
QVector<Symbols>::indexOf calls (macro.arguments.indexOf(s)).

Now, the we reuse the fast SubArray::operator== implementation.

Change-Id: Idbc6e3cf5fd353e8e36d51ba88d31e4c3bfd121d
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-10 12:42:59 +00:00
Marc Mutz
58f0b6b5a8 qdoc: don't hold ParsedParameter in a QList
ParsedParameter is larger than a void*, so holding it in QList
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking it movable, and holding in a QVector instead.

Change-Id: I5b1bea9ef7b796a790d8e86404531ae19a4aca66
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-10 12:21:07 +00:00
Marc Mutz
32a5026f36 QtDBus: replace some inefficient QLists with QVector
QDBusIntrospection::Argument and the QPair are larger than a void*, so holding
them in QLists is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references to elements
therein never are invalidated.

Fix by marking the types movable, if not already done, and holding them in
QVector instead.

Change-Id: I1cf88287cc3a1d87e1fcd5061ed8d6d19d2f0722
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-10 12:21:02 +00:00
Keith Gardner
6094ae1ff5 Added QVersionNumber to QtCore's public API
[ChangeLog][QtCore] Added QVersionNumber.

Change-Id: I11acc1fae3dc9368a72593afcfa2e462c53a620e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Keith Gardner <kreios4004@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-10 00:47:03 +00:00
Frederik Gladhorn
8c7a9bfbbc Do not support static QIcon instances
There was an attempt to allow static instances of QIcon in
7727a4355876607a1a022ff54e2570dae883f79c (Qt 4). This patch does only
solve some of the corner cases and broke with
aa5f70c00a. Since the "breakage" has been
there for two years, let's officially declare it unsupported instead of
trying to work around the issue.

Change-Id: I61e12fd03953763ee2e70eae58bcaecabdcb85b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-09 10:53:29 +00:00
James Turner
130c2baa93 Add ability for QIcons to be marked as template images.
This allows end users to create QSystemTrayIcons that are properly
displayed as monochrome images on OS X, which is especially important
on Yosemite and above when Dark Mode is turned on.

[ChangeLog][QtGui][QIcon] Add ability for QIcons to be marked
as template images. This allows end users to create QSystemTrayIcons
that are properly displayed as monochrome images on OS X, which is
especially important on Yosemite and above when Dark Mode is turned on.


Task-number: QTBUG-42109
Change-Id: I095fb71355ffa572d0abb4769341f68b89b877c4
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
2015-07-09 10:53:17 +00:00
Marc Mutz
bd4ff0b552 QXmlSimpleReader: mark some types as primitive
They are held in QStack, thus QVector.

Change-Id: I0673b68632b384d6428e881e24ff830d12aecfab
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-09 05:48:36 +00:00
Tobias Koenig
f80b103910 Haiku: Fix QWaitCondition on Haiku
The latest version of Haiku provides the implementation
for pthread_condattr_setclock, so we can enable the code
in QWaitCondition again to make it use the monotonic clock
correctly.

Change-Id: Ibb9ad33d873c3b34f2c516087c4e0aeac04cc83f
Reviewed-by: Augustin Cavalier <waddlesplash@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 18:01:07 +00:00
Thorbjørn Martsum
b9438e6cbd QComboBox::setView only delete the old view if it is a child
We have ownership for a reason - and there seems to be
no good reason not to accept it here.

[ChangeLog][QtWidgets][QComboBox] QComboBox::setView no longer
deletes the old view directly. It now checks the ownership first.

Change-Id: Icb5e5c0a6e9dc93c1d1c1a90ff57fbcc0786aa60
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-07-08 17:37:33 +00:00
Morten Johan Sørvig
6a6d793d85 Bring back OS X key handling.
Change-Id: I15c8972d09db18f47d17cddb65dda5d1b829e54e
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-07-08 12:45:13 +00:00
Morten Johan Sørvig
c7d9d8cfe6 Remove Q_DEAD_CODE_FROM_QT4_MAC section
Its not known if the call to flush() is required in
Qt 5. It has been compiled out until now; remove it.

Change-Id: I7033e02af8ac7ea2a357d1287e368b541d1d6776
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-08 12:44:50 +00:00
Morten Johan Sørvig
ac95c1b38b Remove Q_DEAD_CODE_FROM_QT4 sections.
Change-Id: Ia29bd4f2c6837dbfb7c5833dfd4f5ec42a33622d
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-08 12:44:41 +00:00
Morten Johan Sørvig
03546e2e89 Remove Q_DEAD_CODE_FROM_QT4_MAC sections
Change-Id: I483446c9eac8aa617b94e54f1e61f77a4eba7683
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-07-08 12:43:46 +00:00
Morten Johan Sørvig
ba89cbc101 Remove Q_DEAD_CODE_FROM_QT4_MAC section
Change-Id: I1c41dfbfe22117c159471759811bb96351e2762d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-07-08 12:43:35 +00:00
Marc Mutz
5e1b12066a QtSql: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Ie14e5280c430b6a254f8f686534450c1e5995374
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2015-07-08 12:32:16 +00:00
Sérgio Martins
e326cd8d4d Fix inefficient code foreaching on container.values()
Saves one full iteration and memory allocation.

Change-Id: Ice527499b5f5f62bd1e47d76fdf40119948ee3a1
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-08 12:32:08 +00:00
Marc Mutz
712d605c43 Compile with !QT_SUPPORTS(UNSHARABLE_CONTAINERS)
'Unsharable' isn't available, then.

Change-Id: Ifab3b2306379c651bfcd8381836a8f7eadbdc6d6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 12:31:15 +00:00
Marc Mutz
521ad6048f qmake: polish some function objects
... by marking the ctors (if any) explicit and the
function-call operator const.

Change-Id: Ia65fbad0dfdccbb31d630a5501c4d6f0f5aa3623
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-08 12:31:08 +00:00
Marc Mutz
51bf806b41 qmake: mark some types movable
They are already held in QVector.

Change-Id: Ib1266956c860ecd4671501ab12ab932a8ce9b7d6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-08 12:31:00 +00:00
Marc Mutz
f7544e8478 QtDBus: mark QDBusAdaptorConnector::AdaptorData as primitive
It is held in QVector.

Change-Id: I56e95f9a3a64d3e79914098873a382d233754fa3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 12:30:55 +00:00
Bjoern Breitmeyer
5d939a9493 Introduce QT_NO_WINCE_NUIOUSER for WEC2013
Nuiouser.h seems to be missing in WEC2013.
But it can be re-enabled according to Gunnar,
thus disable it conditionally.

Change-Id: I01be629fc309f04d2a43a9153c124a4e332b6ed0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Roth
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-07-08 12:16:09 +00:00
Erik Verbruggen
1ab5f763f0 StateMachine: Move Q...Private::get to _p.h file.
Micro optimization, because it's called a lot.

Change-Id: I50f775b39393f1f450e09ae9dc59a77d584f3c10
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-08 12:05:34 +00:00
Marc Mutz
641de5ab50 QDBusConnection: fix misleading placement of Q_DECLARE_FLAGS
Was placed under an unrelated enum. Move it to the
correct one.

Change-Id: I0cf1ffc678c4cffae16660acde95183d5ebcad03
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-07-08 11:22:28 +00:00
Marc Mutz
cd18e93845 platformsupport/linuxaccessibility: fix uses of inefficient QLists
These types are larger than a void*, so holding them in QLists
is needlessly inefficient. Worse, the code could come to depend
on the fragile property of (inefficient) QLists that references
to elements therein never are invalidated.

Fix by marking them movable, and holding in a QVector instead.

Change-Id: I3d5cf78c1597bd1b743ed3692aaa5e2e750a85f9
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2015-07-08 10:58:00 +00:00
Martin Smith
1477345990 qdoc: Make private friend public
A friend operator was declared as a friend in the private part of the
class. qdoc thought this meant the operator should be private and
therefore should not be documented. But the friend operator should be
documented, despite being declared in the private part of the
class. This update changes qdoc so that it always treats a friend as
public.

Change-Id: I7f8bcf0c0fdffd32f67041f7d1a03eefa2a8b924
Task-number: QTBUG-46983
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-07 12:59:09 +00:00
Martin Smith
0e16b6b598 qdoc: Removed debug code
The debug code in puredocparser.cpp and qmlvisitor.cpp was no linger needed.

Change-Id: Idac0b7afe58febb2f89cdce7928b0d806a02d67e
Task-number: QTBUG-46958
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-07 12:59:04 +00:00
Martin Smith
68dec6461e qdoc: Parsing of inline friends
Some functions in qstring.h are marked with both friend and inline,
and qdoc ignores them when it sees the friend keyword. Then, when qdoc
finds the documentation for the functions in the cpp file, it reports
an error that it can't associate the documentation with anything it
saw in a .h file.

This update corrects that problem. It also improves qdoc's parsing of
other inline functions in other files.

Change-Id: If94e403809af3ee3238eac0f2861b027197d6d3c
Task-number: QTBUG-46531
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-07 12:59:00 +00:00
Martin Smith
6384c4e940 qdoc:Fixed a few qdoc errors
Fixed a few qdoc error messages caused by errors in qmetatype.cpp and
qtextlayout.cpp and qtestcase.cpp and qpointer.cpp

Change-Id: I662aa25bedba057e125e289c34787e81793941ff
Task-number: QTBUG-46939
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-07 12:58:55 +00:00
Morten Johan Sørvig
899153b6f9 Run tst_qwindow::positioningDuringMinimized on OSX
The test passes.

Change-Id: Ic1a0aa4b861eb6fe18fed3d5b5cd4481b9f5fbad
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2015-07-07 12:52:24 +00:00
Olivier Goffart
b138645cc6 QMainWindowLayout::hover does not need to return a value
The return value of the function is never used

Change-Id: I75e51bce36eedd42f5527ddb86efd434fe11551d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-07 12:29:30 +00:00
Marc Mutz
596e157d3c QQuaternion: perform some operations in memory order
The order of member variables is wp, xp, yp, zp. When performing
operations that touch all members, do so in declaration (=memory)
order.

Might enable autovectorization. Probably leads to slightly
better cache behavior.

Change-Id: Id9541e5a8011c349f5d24c5e9322bb232a7607b6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:54 +00:00
Marc Mutz
84770d6375 QVector: mark const variants of begin()/end() nothrow
Change-Id: Id08e692bbfedb43911ffbbfdf09aa6b68a4aa1f9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:48 +00:00
Marc Mutz
a11b631752 QtCore: mark some more types as movable/primitive
These are already held in QVectors.

Change-Id: I6fe831ba5b75d792fd13e63ef0d2e178b52e1107
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:42 +00:00
Marc Mutz
8b5cdc20be QProcessEnvironment: fix op==
Not all empty states were considered equal.

[ChangeLog][QtCore][QProcessEnvironment] Fixed a bug in
operator== involving different empty states.

Change-Id: I13c3200897847475bde2f963db0d2c587336b8a7
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:33 +00:00
Marc Mutz
6aa89ddf5e QProcessEnvironment: add a check for inserting into self
Wasn't checked, and with all the mutex locking going
on under the hood, we better rule out that there's a
deadlock.

Change-Id: I5a2ef1a524fb42b7840c9f3c18395cde05b7ef28
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:28 +00:00
Marc Mutz
ef0778d097 Mark QTextStreamManipulator ctors constexpr nothrow
And use Q_NULLPTR and the ctor-init-list.

Found while looking into QTBUG-45291.

Change-Id: Ie6db7c2ffe4e054781f0666da593df898b8000e0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:23 +00:00
Marc Mutz
48d7a53abf QLabelPrivate: separate data and function members, avoid padding
sizeof(QLabelPrivate) only goes down from 640 to 632 (on 64-bit),
but we now have a non-conditional data member as the last member,
so the ctor-init-list doesn't look quite so ugly anymore.

Change-Id: I51f7e56d92cfcca4f35128595c829e2f3f887c72
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-07 05:22:18 +00:00
Marc Mutz
3d788fc0f1 QLabelPrivate: de-inline ctor
...and move most of the init() code into the ctor-init-list.

Saves 176B of text size on Linux AMD64 GCC 4.9 optimized C++11
builds.

Change-Id: I6cd42e19c40a031456eaf626e32619aed1758a6c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-07 05:22:13 +00:00
Marc Mutz
f405352fee QByteArray: add {const_,reverse_iterator}, {c,}r{begin,end}()
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.

[ChangeLog][QtCore][QByteArray] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: Id5aefb52635f029305135afcd99db0b036a7af82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:08 +00:00
Marc Mutz
92d5733c78 QString: add {const_,reverse_iterator}, {c,}r{begin,end}()
Had to mark {,c,const}{begin,end}() inline, since they are, and mingw
complains about inconsistent dllimport attributes.

[ChangeLog][QtCore][QString] Added rbegin(), crbegin(), rend(), crend(),
and reverse_iterator and const_reverse_iterator typedefs.

Task-number: QTBUG-25919
Change-Id: I1d48729c76e510c1e49c0e5dc41691aa662fdf21
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-07 05:22:04 +00:00
Bjoern Breitmeyer
683d817ada Introduce QT_NO_WINCE_SHELLSDK for WEC builds.
ShellSDK isn't always available in WEC2013 and
sadly the define that should tell us if it is
isn't enough as the headers would be in the SDK
but the lib doesn't need to have the symbols.

Change-Id: Iccd11eafd0dbd22ee421c9a08f05bfc2fc5bdd49
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-06 14:31:45 +00:00
Ulf Hermann
2839e8d010 dbus: allow dbus_shutdown() on QT_NO_LIBRARY && QT_LINKED_LIBDBUS
If you statically link in a dbus library you'll have dbus_shutdown()
available.

Change-Id: Ieeded63838423a14a5530a4edb0ea46dc9b58d18
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
2015-07-06 14:15:53 +00:00
Ulf Hermann
2ca151a8d1 configure: Put qml-debug option into QT_CONFIG
This way we can exclude the connection plugins from being compiled
if it's off.

Change-Id: Ic5ea1d35ea9f5929420268a1aefebf0464d8520b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2015-07-06 14:15:39 +00:00
Marc Mutz
49403ef7a2 QIcon: use (Qt-) canonical form of move special member functions
In particular the move constructor now performs only
two instead of four assignments.

Change-Id: I033d75635288fbd44060a1ba5f2da23b7e7729f6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-06 12:47:09 +00:00
Marc Mutz
82f48c7d32 QtTestLib: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Since QtTestLib has a lot of templates and macros, not all uses of 0 as nullptr
might have been detected by the headersclean check.

Task-number: QTBUG-45291
Change-Id: I21e9d8822e3a708010938e8d5ef2fd42ae6c8c68
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-06 12:46:26 +00:00
Marc Mutz
283f19924d QtWidgets: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: Ie67d235151ca8d4ef5e721c9cf4a6fd32bd167a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-06 11:33:05 +00:00
Marc Mutz
3e2953e05a QtDBus: mark some types as movable come Qt 6
Marking them movable now would make QLists of these types BiC.

Change-Id: I7ae06aec596b349ee05e48f24a077af743450669
Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-06 11:32:51 +00:00
Marc Mutz
db5e672acc QtOpenGL: Use Q_NULLPTR instead of 0 in all public headers
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: I16c93bd36c242a6d402cf7622820e91eac782772
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2015-07-06 11:32:44 +00:00