Commit Graph

24477 Commits

Author SHA1 Message Date
Thiago Macieira
d01d08971a Fix the remainingTime() result after the first activation of a QTimer
On Windows, t->timeout was updated only once, at creation time, so the
timer would always show as "overdue" after the first activation.

The timer is updated to indicate the full remaining time during the slot
activation, which is the behavior of the Unix and Glib dispatchers.

Task-number: QTBUG-46940
Change-Id: I255870833a024a36adf6ffff13ecadb021c4358c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 03:20:29 +00:00
Thiago Macieira
1ac0c4a2f7 Make the Windows qt_msectime() function return 64-bit
32-bit integers overflow after 49.7 days.

Task-number: QTBUG-43777
Change-Id: Ief8943bc86ba32e5a66b48604c583031af95ad42
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-07-08 03:20:19 +00:00
Tasuku Suzuki
1e8a5c1083 remove Build date from qt_core_boilerplate()
db631a88a0 deprecated that.

Change-Id: Id54dc1049004bdaed26925883250038516a6bcbf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-08 01:17:07 +00:00
Frederik Gladhorn
290e875fd9 Test QAction::autoRepeat
Sending several key presses with repeat=true should trigger the action
several times, unless autoRepeat is set to false.

Change-Id: I6469bbd78a608a87852554882c1632ce34422662
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-07 22:26:31 +00:00
Frederik Gladhorn
99afd9dd4c Fix QAction::setAutoRepeat(false)
When cleaning up the shortcut override code, in
d7ca800a87 passing on the autorepeat flags
from the native event was accidentally dropped in the call to
QWindowSystemInterface::tryHandleShortcutEvent.

Task-number: QTBUG-46569
Change-Id: Ib053e11e582de630a1fc1b754f8d10d995c88026
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@theqtcompany.com>
2015-07-07 22:26:11 +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
Alejandro Exojo
219d99fb25 doc: Fix and improve QMetaMethod::tag
Make the example and the explanations a bit more detailed about the
purpose of the feature, and fix the example, as it was not calling
metaObject() on the example object.

Change-Id: Ibf3331ed85601274f43794e3a4143e0d6b86a479
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-06 17:23:20 +00:00
Jake Petroules
0784a2c4ae Fix typo in configure.
The option is named securetransport, not secure-transport.

Change-Id: I5efdde6d751cbc7e9717c6bfe0add93c5dbd2ec9
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-06 16:00:19 +00:00
Jian Liang
6f244dc84d Fix memory leak in QJpegHandlerPrivate
Since the introduction of jpeg auto transform, it is possible to read jpeg
header after its state was changed from ReadHeaer to Ready which will lead
to creating some resources again without releasing them.
For example, if you call QImageReader::setAutoTransform(true) and then
call QImageReader::read(), QJpegHandlerPrivate::readJpegHeader() will be
called twice and it will allocate resource again without releasing the old
one.
This patch add a new state ReadingEnd to prevent the header from being
read twice.

Change-Id: If2497f6e3668958c0c792a66e1b77eb2773584a2
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@theqtcompany.com>
2015-07-06 14:53:35 +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
Bjoern Breitmeyer
8a928783b9 Added Mkspec for Toradex WEC2013 SDK
Change-Id: I738c422ba5f1c1293ce54f53548af62458dda22b
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@theqtcompany.com>
2015-07-06 10:57:17 +00:00
Eskil Abrahamsen Blomfeldt
47113a1f36 DirectWrite: Fix crash when loading QRawFont from data
In Qt 4, we would create and destroy the DirectWrite factory for
each time we load the font data from a QRawFont. This factory
would then be passed to the font engine ctor. However, in Qt 5,
some things have been refactored, and the font engine will now
try to use the factory stored in the sharedFontData(). This
would cause dereferencing a null pointer because we didn't
initialize the data before constructing the font engine.

[ChangeLog][Windows][Text] Fixed crash in DirectWrite engine
when constructing a QRawFont from raw font data.

Task-number: QTBUG-46963
Change-Id: I4813c7f818c9df5707c27f5b6ce507649d902270
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2015-07-06 10:23:10 +00:00
Sean Harmer
a05d8c73ff Fix accidental fall through in QOpenGLTexture::set[Compressed]Data()
Task-number: QTBUG-46826
Change-Id: Ie04e69cc5af05650ec6aa42f534f494049a54ee8
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Mike Krus <mike.krus@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-04 13:31:55 +00:00
Marc Mutz
861dca57d7 QTextLayout: deprecate QList API for additionalFormat
This is a separate commit to allow other modules to do the transition
before this may vanish or cause a warning.

Change-Id: I556837bf0d2c667f067f4e1fa7918bd1a3f55025
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-07-04 06:03:59 +00:00
Marc Mutz
9cb68cdea0 Make QWidget *=0, Qt::WindowFlags f=0 functions use Q_NULLPTR
This is in preparation of adding -Wzero-as-null-pointer-constant (or similar)
to the headers check.

Task-number: QTBUG-45291
Change-Id: If9721e8b1ab3b4cd6e3e366362cae314f451bbed
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2015-07-04 06:03:52 +00:00
Marc Mutz
c3addaca17 QtXml: 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: Id65c5a13d66e08937e6115e8c5b37923c8489f1a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:44 +00:00
Marc Mutz
160f4191d4 Micro-optimize QKeySequence datastream operator (II)
Instead of reading a QList with the keys and then assigning the list
contents to the keysequence internals without any further checking
(not even for the size of the list, even though op<< creates lists
with just one element), do the processing by hand.

The greatest benefit is that there is are no memory allocations
anymore, except for the detach and whatever QDataStream does
internally.

The other benefit is that the output key sequence is not touched
until the necessary values have been successfully read. This
includes the detach. For this, some very basic error checking has
been added.

Also removed the magic number 4 in favor of the recently introduced
QKeySequencePrivate::MaxKeyCount.

Change-Id: If70f75cc043468d2774a7bb03eebdbf39422043a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:39 +00:00
Marc Mutz
b196573c9a Fix QVector move assignment to return a reference
... instead of a copy.

This has been there since before Qt 5.0.

A quick grep shows it's the only instance of this mistake
in Qt.

Change-Id: I341df34f67544b8ed719254bd57237a9599efb46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2015-07-04 06:03:33 +00:00
Marc Mutz
f9bcaeb808 QtDBus: 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: If258b503c5ce335ecc22a5176d3e2b21aa7a278a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-04 06:03:29 +00:00
Sérgio Martins
ebe4ab04ca Use const-ref in foreach if T is big or non-trivial
Criteria: Linux x86_64, sizeof(T) > 8

Change-Id: I78c2b776ff219fa1ff6632fde17ae25fae66c54e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-04 06:03:21 +00:00
Venugopal Shivashankar
fdcea3a7ca Doc: Updated the footer in the online template
Also fixed a broken facebook like image link in the footer.

Change-Id: I51e9b46d3e90763c41a125bf26ee4dccd375e744
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2015-07-01 12:26:37 +00:00
Kai Koehne
04b9f86561 Doc: Give advice on foreach vs range-based for
Task-number: QTBUG-41636
Change-Id: I28c1424e7f4c1c4da596bcae66283b60f471a8ee
Reviewed-by: Martin Smith <martin.smith@digia.com>
2015-07-01 12:13:28 +00:00
Mitch Curtis
5a3fe3e97a Remove stray period in QGraphicsItem documentation.
Change-Id: I2f66be1c54bb6b57b9ca41ba619e14d78443f81d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2015-07-01 10:40:31 +00:00
Eskil Abrahamsen Blomfeldt
d3ac51573f doc: Fix error in QOpenGLShaderProgram example
The addShader() function takes a pointer.

Change-Id: Ibd6549ff06cb3bd86096e90ab2637845f032fc68
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
2015-07-01 10:27:50 +00:00
Liang Qi
0698f876ca Merge "Merge remote-tracking branch 'origin/5.5' into dev" into refs/staging/dev 2015-07-01 09:59:28 +00:00
Allan Sandfeld Jensen
cd297f99a2 Fix A2RGB30 compositing tests
With two alpha-bits half opacity can not be represented, so we must use
one third (85) instead of half (127).

Change-Id: I2b3f1c983a3034196bf2604840945ad3a81f5b38
Reviewed-by: Liang Qi <liang.qi@theqtcompany.com>
2015-07-01 09:59:26 +00:00
Liang Qi
0aa2d318b1 Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/corelib/global/qglobal.cpp
	src/corelib/global/qglobal.h
	src/corelib/global/qsysinfo.h
	src/corelib/global/qsystemdetection.h
	src/corelib/kernel/qobjectdefs.h
	src/plugins/plugins.pro
	tests/auto/widgets/itemviews/qlistview/qlistview.pro

Change-Id: Ib55aa79d707c4c1453fb9d697f6cf92211ed665c
2015-07-01 11:05:26 +02:00
Marc Mutz
6251d4dafc QtCore: 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: I0cc388ef9faf45cbcf425ad0dc77db3060c104a8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-07-01 05:50:41 +00:00