summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* darwin: Add Foundation conversion functions for QRect/QRectFTor Arne Vestbø2016-06-1015-47/+80
| | | | | | | | | | The fromCGRect function was left out for QRect, as the foundation type is using CGFloats internally. Clients should use an explicit QRectF::toRect() when potentially throwing away precision. Change-Id: I0d4c5c5a4e6a45ea3287e3f37a00b69b0bfdefcf Reviewed-by: Jake Petroules <jake.petroules@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
* Add move constructor to QDateTimeThiago Macieira2016-06-102-2/+26
| | | | | | | | | | | | | | | | | The move constructor is slightly more interesting than the copy constructor because we can reset other to a short data state on 64-bit systems. The assembly of that function is simply: mov (%rsi),%rax mov %rax,(%rdi) movq $0x1,(%rsi) retq The move-assignment operator for QDateTime was already there. There's no need for one for QDateTime::Data since it's never called. Change-Id: I06bae9392f534e45b3f1ffff144dffdd7f23b170 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Allow QDateTime to shrink back to short data mode on copyThiago Macieira2016-06-101-5/+30
| | | | | | | | | | We won't shrink on manipulation when we have memory allocated, but it's a good idea to create a non-shared copy if we can. It's an unlikely scenario, though, because it requires the QDateTime object to have been set to a large state then manipulated back into a small state. Change-Id: I06bae9392f534e45b3f1ffff144dfee755bafa01 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move the QDateTime file static functions to their right placeThiago Macieira2016-06-101-178/+170
| | | | | | | | | The file has an organization, so let's follow it. This commit has no other changes besides moving code around. Change-Id: I06bae9392f534e45b3f1ffff144e0b1f6dd72622 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Long live the short QDateTime optimizationThiago Macieira2016-06-103-75/+280
| | | | | | | | | | | | | | | | Well, maybe not for so long: we may want to revisit it for Qt 6. At the very least, we should enlarge the size of QDateTime on 32-bit system so that they too can benefit from the optimization. With this optimization, on 64-bit systems, the most common uses of QDateTime now no longer allocate memory at all. The range is slightly reduced from 584,554,049 years to 2,283,414 years around 1970. The other drawback is that calling QDateTime::offsetFromUtc() on a localtime now needs to recalculate the offset, instead of using the cached offset. (QDateTime::toMSecsSinceEpoch() didn't use the cache). Change-Id: Id5480807d25e49e78b79ffff144a8b2c9af91814 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDateTimePrivate refactor: static'fy the date/time manipulatorsThiago Macieira2016-06-102-86/+91
| | | | | | | | | | | | | | | This commit moves QDateTimePrivate functions setTimeSpec, setDateTime, getDateTime, checkValidDateTime and refreshDateTime outside the class. Like the previous commit, this is done in preparation for the "Short QDateTime Optimization" as the "msecs" field will be placed in the short data, if possible. By making them file-level static, this also improves code generation, as the compiler doesn't know whether it has to emit the class members for out-of-line use or not. Change-Id: I06bae9392f534e45b3f1ffff144df4d73cbc9184 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDateTimePrivate refactor: static'fy access to d->m_statusThiago Macieira2016-06-102-89/+109
| | | | | | | | | | | This commit changes most accesses to the d->m_status (including d->spec() and d->setSpec() uses) to use new static functions. This is done in preparation to the "Short QDateTime Optimization" as the status byte will be kept in the short data. Change-Id: I06bae9392f534e45b3f1ffff144dbd795d03227a Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Refactor & simplify QDateTime::setMSecsSinceEpochThiago Macieira2016-06-101-13/+20
| | | | | | Change-Id: I06bae9392f534e45b3f1ffff144df5ce1aa52636 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Refactor & simplify QDateTimePrivate::refreshDateTime()Thiago Macieira2016-06-101-31/+25
| | | | | Change-Id: I06bae9392f534e45b3f1ffff144df51ae6159a97 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Simplify the QDateTimePrivate::setTimeSpec() functionThiago Macieira2016-06-101-16/+11
| | | | | | Change-Id: I06bae9392f534e45b3f1ffff144df36cc98b5f3f Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDateTime: fix the massageAdjustedDateTime differentlyThiago Macieira2016-06-101-16/+6
| | | | | | | | | Instead of using a macro for maybe passing an extra parameter, pass the d pointer and let the function decide what to use and what not to use. Change-Id: I06bae9392f534e45b3f1ffff144dbeb68a30cb48 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Move QDateTimePrivate::toMSecsSinceEpoch() code into QDateTimeThiago Macieira2016-06-102-35/+27
| | | | | | Change-Id: I06bae9392f534e45b3f1ffff144dbad485814779 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove QDateTimePrivate::isNull{Date,Time}()Thiago Macieira2016-06-102-7/+5
| | | | | | | | | | They're superfluous, since b491fab02a6a67fcd18d8076ac802d2f8c4f6972 removed the distinction between null and invalid. Just use the isValidXxx equivalents. Change-Id: I06bae9392f534e45b3f1ffff144db9badad010fd Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Stop QDateTimePrivate from inheriting QSharedDataThiago Macieira2016-06-102-6/+7
| | | | | | | | | | | | | | | | | | | | | | We're going to have to stop using QSharedDataPointer because of the upcoming short-datetime-optimization. By dropping the inheritance, I am also able to rearrange the members and remove the padding hole that existed. The second padding hole was removed in the previous commit, which merged two 32-bit fields into one. On 64-bit systems, there's no way around a remaining 4-byte hole somewhere due to the odd number of 32-bit members. I chose to leave it in the middle of the struct, before the m_timeZone member, instead of tail padding, so that the layout of the first members structure are the same in bootstrapped and non-bootstrapped builds. That should help debugging the bootstrapped tools in Qt Creator. It's also now the same in 32- and in 64-bit systems. Change-Id: Id69569111e7d4e619e22ffff144b1fba708885f7 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QDateTimePrivate: merge the time spec, DST status and validity flagsThiago Macieira2016-06-104-71/+66
| | | | | | | | | | | | Storing them in a single byte is the first step towards the Short QDateTime Optimization. The bump in the "private version" by 10 is to accommodate possible changes in the Qt 5.7 branch. Change-Id: Id5480807d25e49e78b79ffff144a59420457bcf0 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Disable QSslDiffieHellmanParameters tests for QT_NO_SSL buildsAndré Klitzing2016-06-102-2/+8
| | | | | Change-Id: Ie0b7e9c819ddd1627709f64c30c8d2374bf50c9b Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* add QTest::createTouchDevice()Shawn Rutledge2016-06-102-0/+12
| | | | | | | | | This enables creation of autotests which use touch events, without using private API. Task-number: QTBUG-44030 Change-Id: If8fe89f8423aaafd9e6501e231c33580b9365eb8 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* autotests: use QTest::createTouchDevice()Shawn Rutledge2016-06-1010-108/+57
| | | | | | Task-number: QTBUG-44030 Change-Id: I514c1294a0ff6587b825982a8bb354104c214120 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Blacklist tst_QWindow tests for Ubuntu 16.04Milla Pohjanheimo2016-06-101-0/+3
| | | | | | | | | | | | | Blacklisting tests positioning(default), modalWindowPosition() and modalWindowEnterEventOnHide_QTBUG35109() Task-number: QTBUG-53156 QTBUG-54001 QTBUG-35109 Change-Id: Ib0c50a356a1928afbd12a1ec3650f80f65b81265 Reviewed-by: Heikki Halmet <heikki.halmet@qt.io>
* QString: use new QL1S::at() in lastIndexOf()Anton Kudryavtsev2016-06-091-2/+2
| | | | | | | | | Make overloaded lastIndexOf() functions more homogeneous. Change-Id: If45aac88b43d26baf7f93caec3662a1085e26b97 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* Remove QWidgetBackingStore::fullUpdatePendingAllan Sandfeld Jensen2016-06-092-21/+4
| | | | | | | This was no longer used and always false. Change-Id: I981055e6cc736cfe3432914c173c8b3edc31b46e Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Aarch64: vectorize ascii de-/encoding.Erik Verbruggen2016-06-091-1/+72
| | | | | | | | | | | This works only on Aarch64, because the vaddv instruction is only available on 64bit ARM. Doing something equivalent on 32bit ARM has the high chance to run into micro-architecture differences: on an Cortex-a8, transferring a single vector element from NEON to the regular CPU registers takes 20 cycles(!). Change-Id: Iccbfe84da82abb9b10f3f3dc35c8b950df69e251 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fixed a bug where IM reported wrong anchor rectangleJan Arve Saether2016-06-091-1/+1
| | | | | | | | | | The problem was that in some cases, the cursor position was used to calculate the anchor rectangle instead of the anchor position. This caused selection handles to be shown at the wrong position. Change-Id: I8d866b644fc3c4d530529b7f468d16ae1088cd98 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
* QElapsedTimer: Remove legacy code dealing with Windows pre-Vista and CEThiago Macieira2016-06-081-39/+10
| | | | | | | | | | | | | | | GetTickCount64 is available on Windows Vista and WinRT. Since Windows CE is no longer supported on dev, we don't need to dynamically resolve the function anymore. What's more, QueryCounterFrequency is documented to never fail since Windows XP, so we haven't needed GetTickCount64 for years (no clue when we dropped support for Win2k). Change-Id: I115db302eb114bed8cd1fffd14558a81353d2aed Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* QStringRef: add missing relational operators against QByteArrayMarc Mutz2016-06-083-3/+38
| | | | | | | | | | | | | | | | | | | | | QStringRef op QByteArray was ambiguous between bool QStringRef::operator op(const char*) const bool operator op(const QStringRef&, const QString&) QByteArray op QStringRef was ambiguous between bool operator op(const QString&, const QStringRef&) bool operator op(const char*, const QStringRef&) Fix by providing more overloads. [ChangeLog][QtCore] Disambiguated the relational operators comparing QByteArray with QStringRef (and vice versa). Change-Id: I1cfa9ecfdd8b4102e652593faf35f6098289bc34 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* QString: fix QChar <> QLatin1String relational operators for non-US-ASCIIMarc Mutz2016-06-082-14/+18
| | | | | | | | | | | | | The implementation used the QString::compare_helper(QChar*, int, char*, int) overload, which, however, interprets the rhs as a UTF-8 sequence, not as Latin-1. Fix by using the (QChar*, int, QLatin1String) overload. Extend the test to cover this case, too. Change-Id: I59b26d63d0caec036b80ef8818c75d0cebe519d2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Remove QSysInfo code related to unsupported versions of Windows.Jake Petroules2016-06-081-111/+13
| | | | | Change-Id: Ia28f17146d61724dbea73939793dfbd503546e56 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* tst_qstringapisymmetry: cover QByteArray, const char*, tooMarc Mutz2016-06-081-2/+87
| | | | | | | | | As in 032efc2cb20e163a2daf8aef9eb8df2b757d17dc, which added the API-symmetry test, define the missing relational operators locally in the test harness until they are fixed in the library. Change-Id: Ic2688e6b6b3e028a9c29f1a5eb01058375ef3fe9 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* QSharedPointer/QWeakPointer/QScopedPointer: add comparison against nullptrGiuseppe D'Angelo2016-06-087-1/+231
| | | | | | | | Some constructors were added, but the comparison operators were missing. The STL has them, so we ought have them too. Change-Id: I030c14a3b355988f509716b4b1b1a835b3ab9481 Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Use built-ins for qPopulationCount on MSVC and recent Clang versions.Erik Verbruggen2016-06-081-23/+52
| | | | | Change-Id: Ib7e5f1129dda664d81f8a59bfa851ae70ef04542 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Set ssl in QT_CONFIG when openssl is enabledLars Knoll2016-06-082-31/+31
| | | | | | | | Makes things symmetrical with the windows configure and cleans up the logic in ssl.pri Change-Id: I4a373afe78e904de7d04baea38c250ff0c9d5062 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* QSharedPointer/QWeakPointer/QScopedPointer: plaster API with Q_DECL_NOTHROWGiuseppe D'Angelo2016-06-072-34/+33
| | | | | | | Some methods were already marked, this adds noexcept to even more methods. Change-Id: I420bb1cc985058c7976ce3a1f251fadbba7ddceb Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Make QCryptographicHash a Q_GADGET.Richard J. Moore2016-06-071-0/+3
| | | | | | | This makes the hash algorithm play nicely with qDebug. Change-Id: I6db651cd5c73e8be65442dd68d6b865dcb975f4c Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Fix Infinite loop in QGraphicsScene::focusNextPrevChildJoão de Deus Morgado2016-06-072-1/+28
| | | | | | Task-number: QTBUG-42915 Change-Id: Ie380e0d77453bcdb68e92dcffe8278f169da27bc Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com>
* Simplify Foundation conversion function documentationTor Arne Vestbø2016-06-061-25/+22
| | | | | | | | The \fn command to specify the function signature is not needed when the documentation precedes the function itself. Change-Id: I9de0d1ae73af443f0beded77538d62cea85b5e72 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
* Remove output of QT_PRODUCT_LICENSEKEYLars Knoll2016-06-061-1/+0
| | | | | | | | This is not being used anywhere anymore. Change-Id: I4d8ded9e9f6c28b594930bd1ea9347ba2db8a2e8 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove some dead codeLars Knoll2016-06-061-5/+0
| | | | | | | | CFG_WEBKIT is never set to anything (removed in 1b716724f, 2012), so simply remove the dead code path. Change-Id: I63ef7cc6a2bf2fbf9ceb63f1a54e28882ec6e01e Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* Remove obsolete a.out code after QT_AOUT_UNDERSCORE is goneRalf Nolden2016-06-061-12/+1
| | | | | | | | | | Old versions of OpenBSD and NetBSD mkspecs had the QT_AOUT_UNDERSCORE define declared in their qplatformdefs.h to support systems still using a.out format. As those systems are long obsolete and the defines are removed, remove the obsolete code, too. Change-Id: Ia9e2f2d6de81fb182ef4c995b29062afe570b8b9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Refactor xcb configure logicGatis Paeglis2016-06-061-41/+57
| | | | | | | | | | | | | | | - This is more readable in my opinion. - Fixes the bug where configure script would fail in certain cases for CFG_XCB="auto" by complaining of missing xcb dependencies. "auto" should not fail, in case of missing dependencies it should set CFG_XCB to "no". - Error messages are more accurate. Task-number: QTBUG-47624 Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com> Change-Id: I0572be4ad441931b7c771246bbd70f819d810d22 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* make the xcb-xkb compile test more specificOswald Buddenhagen2016-06-061-0/+3
| | | | | | | try hard to detect only 1.10 and up. Change-Id: I14517a42b810604f65c07df74f2ef9e840393a38 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Remove all code paths related to unsupported Apple platforms.Jake Petroules2016-06-0429-761/+191
| | | | | | | | | Now that the minimum deployment target (and thus SDK) is 10.9 for OS X and 7.0 for iOS, all code paths affecting platform versions lower than the aforementioned are removed. Change-Id: Id985c7259c4ac069319d88f2c29c9559ae9e8641 Reviewed-by: Jake Petroules <jake.petroules@qt.io>
* QObject::connect: reduce generated code size for statics and functorsThiago Macieira2016-06-031-9/+7
| | | | | | | | | | | Instead of placing the assignment of false in the impl() function, move it to the inline QSlotObjectBase::compare() function. That means it's assigned in one place (two, actually, inside qobject.cpp), instead of for every static member, non-member or functor we connect or disconnect. Change-Id: I87e17314d8b24ae983b1fffd1453623ad4c4dcb2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Remove some code for cross building from MingW to SolarisLars Knoll2016-06-031-7/+3
| | | | | | | I don't think anybody would do this today. Change-Id: Id4eb69fb0a38bbd2a28099b66896e55d2b8c9022 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
* move xcb 1.5 compile check from qpa/xcb-syslibs to qpa/xcbOswald Buddenhagen2016-06-032-3/+4
| | | | | | | | the test should be executed in every case. configure's use of pkg-config implies that intention. Change-Id: I722c88da5c2a0f2cc1f926d796093b78cd79bea8 Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
* Add Q_FLAG for QDBusServiceWatcher::WatchMode.Volker Krause2016-06-031-0/+1
| | | | | | | This is needed for generic property access to work correctly. Change-Id: I76613ace730985001fc5fe1bb1b3fa5c6a8bdf70 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Install some eglfsdeviceintegration headers, as a private moduleGiulio Camuffo2016-06-0349-172/+239
| | | | | | | | This allows external integrations to be developed against it. Also uniforms all class names as QEglFSFoo. Change-Id: I72ff37c0fcdf1ccd37110b4c36874d6c99b2e743 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: stop using _beginthreadex on regular buildsThiago Macieira2016-06-022-37/+13
| | | | | | | | | | | | | | | | | | | | | | | This commit also reverts fecaa6aae83a3ffa8f1fd41c5aa8275a1bfa7c9b. The Microsoft documentation says _beginthreadex and _endthreadex are used to initialize the C/C++ runtime and are necessary when linking to libcmt(d).lib (that is, when using the -MT or -MTd options). For regular builds linking against the .dll runtime, there should be no impact. Inspection of the CRT source code which gets installed with Visual Studio or Windows SDK proves that. It's preferable to use CreateThread directly as _endthreadex will try to call FreeLibraryAndExitThread, which can cause a deadlock if we try to wait for the thread to exit from a global destructor. For -MT builds, since there can be no DLLs, it's not a problem to continue to use _beginthreadex and follow Microsoft's recommendation. Task-number: QTBUG-53031 Change-Id: Id5480807d25e49e78b79ffff144af62c3c59dfe0 Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Remove reliance on QSysInfo::[Mac|Windows]Version in QSysInfo itself.Jake Petroules2016-06-021-51/+103
| | | | | | | | Those enumerations and their associates are being deprecated, and so the backing of their replacements cannot rely on it. Change-Id: Id544aa757313065f435b5e66cd0475975cd5b825 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Simplify constructor code of QTemporaryFile.Friedemann Kleint2016-06-022-19/+13
| | | | | | | | Pass the name as parameter to the constructor of QTemporaryFilePrivate and use delegation in the convenience constructors. Change-Id: I4087600b804fe22910b4985a59a02547f54a6acd Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
* Blacklisting pendingCallWhenDisconnected on OpenSUSE 42.1Milla Pohjanheimo2016-06-021-0/+2
| | | | | | | | | | We need to get QtWayland in the CI asap, and that's why we need to blacklist every test that fails in the CI without really looking what's the problem behind it. Sorry for that! Task-number: QTBUG-53786 Change-Id: I64102c35ad879df07a692a112163f318ffb2f658 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>