summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-073-16/+23
|\ | | | | | | Change-Id: Idf2bef470663864069bbf7e41af07b534936863a
| * Revise dates of Pacific/Kiritimati's day-skip transitionEdward Welbourne2018-04-061-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The TZ database has recently revised its ccount of when they skipped a day to cross the international date line, from skipping Jan 1st 1995 to skipping December 31st 1994. So Move the before-days check to December 30th; and correct the Feb 2nd that was meant to be Jan 2nd (and does need to remain so, for compatibility with systems with out of date data). Task-number: QTBUG-67497 Change-Id: I5b9483c553205817f995f91793662a5a85e03192 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * QMimeDatabase: fix assert when fetching data for invalid mimetypeDavid Faure2018-04-061-0/+2
| | | | | | | | | | | | | | | | | | The Q_ASSERT(mimePrivate.fromCache) at qmimedatabase.cpp:218 which I added in commit 7a5644d648, was being triggered when calling comment() for invalid mimetypes such as db.mimeTypeForName(""). Change-Id: I8037041a4b435d2a5ba24ec94b7858e38b2f0bf2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QLocale: Avoid manual deletesKari Oikarinen2018-04-061-14/+19
| | | | | | | | | | | | | | | | | | Also use data-driven test to reduce duplication. Change-Id: I9516e52267cb3c7b239030fd73dbbf23ac8f52f7 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-063-10/+30
|\| | | | | | | Change-Id: Ic811cd444e523b904211797112bba6aaec85dddd
| * Kludge QLocale test order to fix fall-out from setDefault()Edward Welbourne2018-04-051-10/+28
| | | | | | | | | | | | | | | | | | | | | | This makes an irreversible global change: tests that do it will mess with other tests. So make sure they're all last. This required splitting up one test; and revealed another that secretly depended on being run with C as default locale. Task-number: QTBUG-67276 Change-Id: Ic24ef48b2c9bd5c37c1f11260b437628019624ca Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
| * Hide global qtlogging.ini from autotestKai Koehne2018-04-052-0/+2
| | | | | | | | | | | | | | | | | | | | Do not let a global qtlogging.ini interfere with an autotest. This works around an issue on Ubuntu 17.10 Task-number: QTBUG-67385 Change-Id: I0d02835eb7a561b43fe0b98f4383c170c6d51303 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Joni Jäntti <joni.jantti@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-04-053-30/+31
|\| | | | | | | Change-Id: I954bd6418bc862a04691240c0f1766f6ce033640
| * tst_QStateMachine: Don't use unconditional waitsv5.11.0-beta3Kari Oikarinen2018-04-041-2/+5
| | | | | | | | | | | | | | | | Instead use QSignalSpy to wait directly for the expected events. Change-Id: I319302ea7177fe690b5d885347c505454904518e Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
| * tst_QThread: Use QTRY_VERIFY instead of qWaitsKari Oikarinen2018-04-031-6/+2
| | | | | | | | | | | | | | | | | | | | These two places were sort of manually implementing QTRY_VERIFY except that they never time out. Change-Id: I136e6c7400194327c0475c6acfc019825ccec1b5 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
| * tst_QFutureWatcher: Avoid unconditional qWait()sKari Oikarinen2018-04-031-22/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use QSignalSpy::wait or QTRY_VERIFY instead. This shaved off ~200 ms of the running time of the test and is more reliable. Some unconditional qWait()s still remain in this test. They are giving an opportunity for the wrong thing to happen and thus are not waiting for any specific condition to be fulfilled. Task-number: QTBUG-63992 Change-Id: I25a4470fe8d6a5b8b5039b3ed77321d24faa1707 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | Add wildcard-to-regexp support to QRegularExpressionSamuel Gaist2018-03-302-0/+82
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method will make QRegularExpression on par with QRegExp and will allow to replace this class when a wildcard expression can be set through an API (e.g. QSortFilterProxyModel::setFilterWildcard). For other use cases, see QTBUG-34052. [ChangeLog][QRegularExpression] Implemented support for wildcard patterns. Warning: QRegularExpression might not give the exact same result as QRegExp as its implementation follows strictly the glob patterns definition for the wildcard expressions. Change-Id: I5ed4617ca679159430c3d46da3449f6b3100e366 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-03-285-12/+153
|\| | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_mouse.mm src/testlib/testlib.pro Change-Id: Ia0ce4243418fe6a485b0f290c67bd433b3b04ff2
| * Animation: Fix case where QEasingCurve::valueForProgress returns nanSvenn-Arne Dragly2018-03-261-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, we would divide by zero in BezierEase::findTForX if factorT3 was zero when solving the cubic equation. This change fixes the problem by adding solutions for the special cases where the cubic equation can be reduced to a quadratic or linear equation. This change also adds tests that cover cases where the equation becomes quadratic, linear or invalid. Task-number: QTBUG-67061 Change-Id: I2b59f7e0392eb807663c3c8927509fd8b226ebc7 Reviewed-by: Christian Stromme <christian.stromme@qt.io>
| * fixup oversight in rvalue overloads of operator+=() and operator<<()Eric Lemanissier2018-03-262-9/+73
| | | | | | | | | | | | | | ammends 4dee5446bee9c7417bf6f5dc44294a0b7238a9ba Change-Id: Ia0ca27644eb71815a93d6e76681b8a9e61a4e7ab Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * tst_QWinEventNotifier: fix flakinessAlex Trotsenko2018-03-231-3/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | disableNotifiersInActivatedSlot(disable_signaled2) fails, if a signaled state of the event #2 is detected prior to the event #1. In this case, we get a timeout on waiting for event #1 which was disabled by the first notification. So, accept a disabled state of the notifier in condition for successful exit from the loop. Change-Id: I8a2fe76f8ec9362556d1ca1fe0be39a93ed58977 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
| * Blacklist tst_QProcess::softExitInSlots on WindowsKari Oikarinen2018-03-231-0/+3
| | | | | | | | | | | | | | | | Task-number: QTBUG-66903 Task-number: QTBUG-66216 Change-Id: I4a36d6f4b980f016e11fd7a8840dbc60a2964e83 Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io> Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Allow QWinEventNotifier to coexist with waiting functionsAlex Trotsenko2018-03-271-0/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many subclasses of QIODevice have a functionality to block execution until some asynchronous I/O operation completes. In case we are using QWinEventNotifier, a typical reimplemented waitFor{ReadyRead |BytesWritten}() function could look like: if (WaitForSingleObject(notifier.handle(),...) == WAIT_OBJECT_0) { notifier.setEnabled(false); ResetEvent(notifier.handle()); bool res = GetOverlappedResult(...); ... return true; } Despite the fact that the operation ends synchronously, it leaves the notifier in a state that indicates it has received the event, so its next call to setEnabled(true) will produce a fake notification. So, we should reset a notifier's history before enabling it again. Change-Id: I62a9dd809ce6a7a40e9d8038f2a49299b36f8142 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* | Add QTimer::connectTo(), a shorthand way of connecting to timeout()Sergio Martins2018-03-251-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a couple of Qt classes where you almost always use the same signal, for example QTimer::timeout, QPushButton::clicked, and QAction::triggered. Simply doing timer.connectTo([]{}) is much more convenient, less tedious and even fun. Not overloading connect() as it would be confusing to see the receiver as first argument. And not naming it onTimeout, as that's a popular way of doing it in other frameworks. People would assume you could use on* with any signal. If we ever have on* it should be all or nothing. [ChangeLog][QtCore] Added QTimer::connectTo(), a shorthand way of connecting to the timeout() signal. Change-Id: Ida57e5442b13d50972ed585c3ea7be07e3d8e8d2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-211-0/+69
|\| | | | | | | Change-Id: I35a6555e3885e489f88aa9b4b0142e1017f7a959
| * QSemaphore: fix deadlock when the woken up thread wakes up anotherThiago Macieira2018-03-191-0/+69
| | | | | | | | | | | | | | | | | | | | | | | | When the thread that got woken up by release() is supposed to release() to wake up another thread, we were deadlocking. This happened because we cleared the bit indicating that there was contention when the first release(). Instead of storing a single bit, we now store the number of threads waiting. Task-number: QTBUG-66875 Change-Id: I72f5230ad59948f784eafffd15193873502ecba4 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | Add nullptr comparison to Q{Explicitly,}SharedDataPointerThiago Macieira2018-03-181-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QSharedDataPointer] Added operator== for nullptr. [ChangeLog][QtCore][QExplicitlySharedDataPointer] Added operator== for nullptr. Task-number: QTBUG-66635 Task-number: QTBUG-66946 Change-Id: I72f5230ad59948f784eafffd151a18e34384d844 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-171-3/+5
|\| | | | | | | Change-Id: Id3e318f276fc56b5105561a1904cc242b663e9e4
| * QIpAddress: reject IPv6 addresses with more than 4 hex digitsThiago Macieira2018-03-161-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Matches glibc commit 9a0cc8c1bd7645bf3c988890ffb59639c07a5812. [ChangeLog][QtCore][QUrl] Fixed a bug in parsing IPv6 addresses with more than 4 hex digits in a component. [ChangeLog][QtNetwork][QHostAddress] Fixed a bug in parsing IPv6 addresses with more than 4 hex digits in a component. [1] https://sourceware.org/git/?p=glibc.git;a=commit;h=9a0cc8c1bd7645bf3c988890ffb59639c07a5812 Change-Id: I2701038131d91eb108aebb3bec16278e4efe3de2 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-151-6/+12
|\| | | | | | | Change-Id: I8b5a10d897a926078895ae41f48cdbd2474902b8
| * Make sure QDir::absoluteFilePath("/dir") includes a drive on MSEdward Welbourne2018-03-121-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QDir::isAbsolutePath(name) thinks any path starting with a slash is absolute; however, to return a valid absolute path, we need to put a drive prefix onto such a name. So use QFileSystemEntry::isAbsolute() for that check (it believes in the need for a drive, or UNC prefix) and handle the absolute-but-for-drive case when it arises. Add a regression test and make related changes to existing tests. Task-number: QTBUG-50839 Change-Id: Id5d2b2586bb1423fa2d9375a298a4bb5241cffe0 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | QSFPM: Faster row removesTim Angus2018-03-131-39/+173
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the source model of a QSortFilterProxyModel has rows removed, a mapping is performed in order to figure out which corresponding rows in the sorted and filtered view of the model are affected. In doing so it constructs a vector of removal intervals which are subsequently used to emit rowsRemoved signals. In the case where many rows are removed (e.g. all of them), many removal intervals are identified that are often adjacent and could be simplified, which is what this patch does. i.e. instead of emitting 3 rowsRemoved for 0-3, 4-6, 7-12, now a single rowsRemoved is emitted for 0-12. Change-Id: Ia503091cc4928378c88257cd8b431582e9ff454e Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-103-2/+44
|\| | | | | | | Change-Id: Ia2441257c23169f8ca6a3933b2371255e1ba64e6
| * add missing tests of rvalue overloads for QVarLengthArray and QVectorv5.11.0-beta2Eric Lemanissier2018-03-102-2/+25
| | | | | | | | | | | | | | they were missing in dd58ddd5d97f0663d5fafb7e81bff4fc7db13ba7 Change-Id: I52a2f855ead7716f8fe887524b27d4bd258f43d3 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
| * Allow use of template class instances inheriting from a Q_GADGET in QmlNils Jeisecke2018-03-101-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Q_GADGET macro cannot be used in templates. It can however be useful to derive a template class from a Q_GADGET enabled base class to benefit from type safety features in C++ (e.g. the class could represent an id or handle for some C++ type). For proper wrapping of a QVariant with a gadget value in a QJSValue, the QMetaType::IsGadget flag must be set for the registered template instance type - which does not happen prior to the fix because IsGadgetHelper requires qt_check_for_QGADGET_macro to be defined in the registered class but not in an ancestor class - in other words: The class must declare Q_GADGET. To overcome this, IsGadgetHelper/IsPointerToGadgetHelper can now differentiate between a Q_GADGET flagged class (allowing automatic registration) and a derived class, e.g. a template class (forcing Q_DECLARE_METATYPE to be used explicitly). [ChangeLog][QtCore][QMetaObject] It is now possible to use template class instances inheriting from a Q_GADGET in Qml Task-number: QTBUG-66744 Change-Id: I7632ad45cff79fa422b3f852ca0b963f35fab155 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | Adjust tst_QTimeZone's Q_OS_WIN #if-ery now that ICU is the defaultEdward Welbourne2018-03-092-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Various tests were adapted to Q_OS_WIN to take account of the deficiencies in its TZ APIs; which are now bypassed when ICU is configured, as we use it instead. Replace some #if-ery on a local define with QT_CONFIG(icu) and QMAKE_USE_PRIVATE += icu here, to match in corelib/tools/tools.pri Task-number: QTBUG-66367 Change-Id: Ia93abdeb7d12046310f0bb4a78c2669f8eecbbc2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
* | tst_qstorageinfo: Don't add extra newlines when printing volumesTor Arne Vestbø2018-03-071-1/+1
| | | | | | | | | | | | | | The printVolumes function already adds line endings. Change-Id: Id2553f881ccc0ab3c8b8fc77d3096dd5d968abda Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | tst_qsettings: Check case sensitivity of actual settings fileTor Arne Vestbø2018-03-071-1/+1
| | | | | | | | | | | | | | | | Instead of the current working directory, which doesn't necessarily match the location of the settings file. Change-Id: Idffe2e87190cc9b6027fbba3b84e9dbf72ccf2f6 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | implement non-member operator+ for iteratorsEric Lemanissier2018-03-062-0/+8
| | | | | | | | | | | | | | | | | | all of these iterator classes already have a member operator+, which allows iter+int. This commits addes non-member operator+, which allows int+iter, and forwards to the member QList and QArrayData iterators now satisfy RandomAccessIterator concept Change-Id: I25c1dd8cea299e735d5a5e288dbe23dc1d7a1933 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-025-5/+90
|\| | | | | | | Change-Id: I967eca8f34584fca3a1e5696978e70f620582a2a
| * QLocale: Update the system private on QLocale default constructor if neededAlbert Astals Cid2018-03-021-0/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When first starting an Android app we have invocation order issue, to load the platform plugin we create the default QLocale (needed by the resource locator code to see if :/qt/etc/qt.conf exists) so when the android platform plugin loads and creates its own QSystemLocale, the QLocale defaultLocalePrivate is already created and pointing to globalLocaleData which means that systemData won't be called and thus the code that triggers the call to QLocalePrivate::updateSystemPrivate won't be called when calling QLocale(). I thought of two ways of fixing this, one was calling QLocalePrivate::updateSystemPrivatea() from the QAndroidSystemLocale constructor, but giving the responsibility to not break things to the plugin seems a little fragile, so making the check on QLocale() seems better. Without this patch an Android app doing QApplication app(argc, argv); qDebug() << QLocale().name(); qDebug() << QLocale().name(); qDebug() << QLocale::system().name(); qDebug() << QLocale().name(); would print "" "" "ca_ES" "ca_ES" now it correctly prints "ca_ES" the four times. Task-number: QTBUG-41385 Change-Id: I2cf419f59aa008fa3aca11295fe7d42c40bcc32e Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * qstringapisymmetry: Fix XML parsing failing on invalid encodingsFriedemann Kleint2018-03-021-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | Evaluating testlib's XML output in COIN would fail with: "XML syntax error on line 7520: invalid UTF-8" for the toLatin1() tests due to some Latin1/UTF8 mixup. Add a helper function to convert the data to plain ASCII. Task-number: QTQAINFRA-1797 Change-Id: I1c64878d4c2a67b8c2689905b5ffe6707b5963c1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * tst_QLibrary: Ensure installation order of testdata libsKari Oikarinen2018-03-022-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test executable was not flaky in the normal sense that when run, it sometimes passes and sometimes fails. Instead, in some builds it would fail consistently and in some builds it would pass consistently. The first test to fail was version(ok00, default to last version) which gives "mylib" as the library name and -1 as the library version. The description implies that QLibrary selects the biggest or last used version when given -1. However, versions less than 0 are not used at all. Instead the loading uses only the name to select the library. Change the description to match. So why did the test sometimes pass, sometimes fail? The test uses two library projects lib and lib2 which install two different major versions of libmylib. That includes the symbolic links: libmylib.so -> libmylib.so.1.0.0* libmylib.so.1 -> libmylib.so.1.0.0* libmylib.so.1.0 -> libmylib.so.1.0.0* libmylib.so.1.0.0* libmylib.so -> libmylib.so.2.0.0* libmylib.so.2 -> libmylib.so.2.0.0* libmylib.so.2.0 -> libmylib.so.2.0.0* libmylib.so.2.0.0* The key thing being that both set the libmylib.so symbolic link. In a multithreaded installation it's undefined which happens to set the link last. The test code expected libmylib.so to point to libmylib.so.2.0.0. Ensure that by building and installing lib2 after lib. Task-number: QTBUG-66722 Task-number: QTBUG-66216 Change-Id: Ic513c772902273049c28e43fc1d83d550aafcd23 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * JSON: remove braces from UUID text representationsThiago Macieira2018-03-021-0/+2
| | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QJsonValue] fromVariant() conversion now converts from QUrl and QUuid using special encoding forms to ensure best JSON compatibility. Change-Id: I56b444f9d6274221a3b7fffd150cdc5ca1f87ff1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * QJsonValue: use the fully-encoded form of a URL in fromVariant()Thiago Macieira2018-03-021-0/+20
| | | | | | | | | | | | | | For compatibility with other parsers that may expect it to be so. Change-Id: I56b444f9d6274221a3b7fffd150cd66390f98fd5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-03-021-0/+25
|\| | | | | | | Change-Id: I42ec9e6aafc203465cbeb88af70c7af26b7df8ed
| * QMimeDatabase: fix regression in alias resolvingDavid Faure2018-02-281-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | The refactoring to support multiple providers broke alias resolving (e.g. "text/directory" would be an invalid mimetype, instead of being resolved to "text/vcard"). The unittest didn't catch it because most of it was running with a single mime directory (and therefore a single provider, in the new model). Fixed by re-running a number of test methods once we have a second mime directory. Change-Id: Ib5da89ba79c11ed41813b2aff4bc71c30afcde7d Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-241-1/+1
|\| | | | | | | Change-Id: Icddf8720dae2cf594e16bcddab4d1cafc9d094c0
| * Fix thread_local testSamuli Piippo2018-02-231-1/+1
| | | | | | | | | | | | | | | | If _Thread_local is used on a block-scope declaration, it must be combined with either static or extern to decide linkage. Change-Id: I228b3520767197c6cdf5134ff5a666ab2aca33ea Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-221-1/+3
|\| | | | | | | Change-Id: Iec636692e8b7d1fe1bc0476e49c5054a5892d639
| * tst_QMimeDatabase: detect executables as shared libraries tooThiago Macieira2018-02-211-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They can be, if compiled with -Wl,-pie. Example: $ file /usr/bin/ping /usr/bin/ping: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.2.0 And you can't detect via the interpreter, since libraries can have them too: $ file /lib64/libc-2.26.so libQt5Core.so.5.11.0 /lib64/libc-2.26.so: ELF 64-bit LSB shared object, x86-64, version 1 (GNU/Linux), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2 libQt5Core.so.5.11.0: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 3.17.0 Change-Id: I940917d6763842499b18fffd15143bb80ce0e531 Reviewed-by: David Faure <david.faure@kdab.com>
* | Merge remote-tracking branch 'origin/5.11' into devQt Forward Merge Bot2018-02-211-1/+7
|\| | | | | | | Change-Id: I9c90d71fde002544fd97df7e8a2690953cf9f817
| * Merge remote-tracking branch 'origin/5.10.1' into 5.11Liang Qi2018-02-191-1/+7
| |\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/sqldrivers/psql/qsql_psql.cpp Change-Id: I070b455078b41e75c46562fcea5676d6218cd00c
| | * QString: fix comparisons to null strings in ucstricmpThiago Macieira2018-02-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 8f52ad9fe084eee26869e4a94a678076845a6f58 ("ucstricmp: compare null and empty strings equal") made sure empties and nulls would compare equally, but may have broken the null vs non-empty comparison (which was not tested). The commit message also said that it expected all callers to handle null before calling into those functions, but that's not the case for QStringView created from a null QString: the incoming "a" pointer was null. So just remove the checks for null pointers and rely on the size checks doing the right thing. [ChangeLog][QtCore][QString] Fixed a regression from 5.9 that caused comparing default-constructed QStrings to be sorted after non-empty strings. Task-number: QTBUG-65939 Change-Id: I56b444f9d6274221a3b7fffd150c83ad46c599b6 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* | | QByteArray: Add functions isUpper() and isLower() for Latin1 byte arraysAndre Hartmann2018-02-171-0/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QByteArray] Added QByteArray::isUpper() and QByteArray::isLower() to check if a byte array contains only uppercase or only lowercase Latin1 letters. Change-Id: I7ab3c775bc714138d4be259ac6fa2cfc70467ed4 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>