summaryrefslogtreecommitdiffstats
path: root/tests/auto/corelib
Commit message (Collapse)AuthorAgeFilesLines
* qsettings: add Advapi32 lib to Windows ICC buildsAlexander Shevchenko2018-02-151-1/+1
| | | | | | | | Fix 'unresolved external symbol __imp_Reg*' errors for builds using Windows ICC. Change-Id: I99cb6d53c45cadb31b5675182753f168a7bf4ea3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Merge remote-tracking branch 'origin/5.10' into 5.11Liang Qi2018-02-151-4/+60
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/corelib.pro src/corelib/global/qrandom.cpp src/network/access/qhttpnetworkrequest_p.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoansmenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/offscreen/qoffscreenintegration.h src/widgets/kernel/qaction.cpp src/widgets/widgets.pro Done-with: Andy Shaw <andy.shaw@qt.io> Change-Id: Ib01547cf4184023f19858ccf0ce7fb824fed2a8d
| * Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-02-021-0/+1
| |\ | | | | | | | | | | | | | | | | | | Conflicts: tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp Change-Id: Ia28ea4f29d308ba3aa16c2a86ffc57049c6ea590
| * | Revert "QVariant: convert QDateTime and QTime to string with milliseconds"Thiago Macieira2018-02-011-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ab1e50757454b5afda2f6dec52d2eb16a32d4798. That was supposed to be a minor behavior change, but ends up having visible effects such as QtXmlPatterns xs:dateTime type now reporting sub-second fractions. So we're reverting in 5.10 and re-applying in 5.11. Change-Id: I741e49459c9a688c1c329d6cbd521cd4a0b2aa84 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Fix asserts and crashes in QWinEventNotifier activation loopJoerg Bornemann2018-01-261-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The backwards iteration was done under the assumption that the only valid modification of the winEventNotifierList in a slot connected to activated() would be the removal of the notifier itself. This is wrong. Instead, iterate forwards, like before 85403d0a, and check the index against the current list size in every iteration. This ensures that we do not run out of bounds while the list is modified. Also, retry the activation loop if the list was modified by a slot connected to activated(). This ensures that all notifiers with signaled handles are activated. Task-number: QTBUG-65940 Change-Id: I25f305463b9234f391abc51fe0628d02f49b6931 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
| * | QVariant: convert QDateTime and QTime to string with millisecondsThiago Macieira2018-01-251-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | This way, it's lossless. Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | Remove dead code from tst_qwineventnotifier.cppJoerg Bornemann2018-01-251-4/+0
| | | | | | | | | | | | | | | | | | | | | The idx member of EventWithNotifier is unused. Change-Id: I0f5aacaaad4b4e82c57ff7bb020586944014f139 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-2423-33/+33
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/global/qglobal.cpp src/corelib/global/qrandom.cpp tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp Change-Id: Icc10543a1f2db5d640d01796bfec70a63517a6b2
* | \ \ Merge "Merge remote-tracking branch 'origin/5.9' into 5.11" into ↵Liang Qi2018-02-1426-35/+56
|\ \ \ \ | | | | | | | | | | | | | | | refs/staging/5.11
| * \ \ \ Merge remote-tracking branch 'origin/5.9' into 5.11Liang Qi2018-02-1426-35/+56
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf src/corelib/animation/qvariantanimation.cpp src/corelib/global/qglobal.cpp src/corelib/global/qlogging.cpp src/corelib/io/qprocess_win.cpp src/corelib/json/qjsonarray.cpp src/corelib/tools/qsimd_p.h src/corelib/tools/qtimezoneprivate_p.h src/corelib/xml/qxmlstream_p.h src/gui/kernel/qsimpledrag.cpp src/gui/kernel/qsimpledrag_p.h src/plugins/generic/generic.pro src/plugins/platforms/cocoa/qcocoamenu.mm src/widgets/styles/qmacstyle_mac.mm tests/auto/concurrent/qtconcurrentmap/BLACKLIST tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/widgets/dialogs/qmessagebox/BLACKLIST Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
| | * | | | Skip tst_QFile::largeUncFileSupportKari Oikarinen2018-02-121-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If more than one VM tries to run the test at the same time, it times out. These sharing violations were attempted to be worked around in 1c3dc8cfb, but the workaround just leads to timeout, not success. Task-number: QTQAINFRA-1727 Task-number: QTBUG-66216 Change-Id: If8bfd60dbb6575843680971d45b1c82e5beff534 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
| | * | | | tst_QSharedPointer: Fix termination of external processes on WindowsFriedemann Kleint2018-02-081-2/+13
| | | |_|/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Timeouts with subsequent failures to delete the temporary directories have been observed in COIN. Previously, QProcess:terminate() was used to end the processes, which does not have any effect on console processes on Windows. Add a helper function which resorts to kill() on failure to terminate(). Change-Id: I05539d1703280d34b392f2e8ff8565b9a04d703c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| | * | | Clean-up in QDateTime's parsing of ISODate{,WithMs}Edward Welbourne2018-02-011-0/+4
| | | |/ | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Actually check that there's a T where ISO 8601 wants it (instead of just skipping over whatever's there), with something after it; move some declarations later; add some comments; and use the QStringRef API more cleanly (so that it's easier to see what's going on). Simplify a loop condition to avoid the need for a post-loop fix-up. This incidentally prevents an assertion failure (which brought the mess to my attention) parsing a short string as an ISO date-time; if there's a T with nothing after it, we won't try to read at index -1 in the following text. (The actual fail seen had a Z where the T should have been, with nothing after it.) Add tests for invalid ISOdate cases that triggered the assertion. Task-number: QTBUG-66076 Change-Id: Ided9adf62a56d98f144bdf91b40f918e22bd82cd Reviewed-by: Israel Lins Albuquerque <israelins85@yahoo.com.br> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> (cherry picked from commit a9c111ed8c30a5a8fec3f02244f0d5a4bd08e931)
| | * | Support for Q_OS_ANDROID_EMBEDDED and android-embedded build flagsOtto Ryynänen2018-01-2023-33/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Embedded Android build (Boot to Qt Android injection) is defined by having both Q_OS_ANDROID and Q_OS_ANDROID_EMBEDDED flags defined, as well as having Qt config android-embedded. This commit enables the possibility to build embedded Android builds. (i.e. Qt build for Android baselayer only, without JNI) Change-Id: I8406e959fdf1c8d9efebbbe53f1a391fa25f336a Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* | | | Fix crash in tst_QStateMachine::dontProcessSlotsWhenMachineIsNotRunningKari Oikarinen2018-02-141-3/+6
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The test sometimes ended up with: QThread: Destroyed while thread is still running Received a fatal error. This was because as a member variable of the local struct the QThread object was sometimes destructed before the signal connection quitting it was handled. Fix that by making sure that the thread is finished before finishing the test. Also moved connecting to the state machine's signal to be before starting the machine. Because the counting of QStateMachine::finished signal could hit 1 after the first signal is emitted and the test could pass without the code working, check that both of the signals have been emitted. Task-number: QTBUG-66372 Task-number: QTBUG-66216 Change-Id: If14141e39f37541032ddd8c6471daf40a77b0469 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | qtbase: cleanup BLACKLIST filesChristian Ehrlicher2018-02-132-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleanup BLACKLIST files which contain entries for CI-systems which are no longer active: - opensuse-13.1 - opensuse-42.1 - osx-10.8 - osx-10.9 - osx-10.10 - rhel-7.1 - rhel-7.2 - rhel-7.3 - ubuntu-14.04 - windows msvc-2010 Change-Id: I25590b0807a4454f9dc92aa4ea61300f7c9af56b Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | qtbase: Remove BLACKLIST files which are no longer activeChristian Ehrlicher2018-02-121-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove BLACKLIST files which are no longer valid because the mentioned CI systems are no longer active: - opensuse-13.1 - opensuse-42.1 - rhel-7.1 - rhel-7.2 - rhel-7.3 - ubuntu-14.04 or the testcases are no longer available: - QTBUG_14292_filesystem in qactiongroup Change-Id: I80a4397059fafba169096440fdc07d45c76a1ed8 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* | | Merge remote-tracking branch 'origin/dev' into 5.11Liang Qi2018-02-105152-40/+237
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/corelib/tools/qvarlengtharray.qdoc src/corelib/tools/qvector.qdoc Resolved documentation changes in favor of 017569f702b6dd0, which keeps the move overloads along with its const-ref sibling. Change-Id: I0835b0b3211a418e5e50defc4cf315f0964fab79
| * | | QString:: add remove() overload taking QLatin1StringAnton Kudryavtsev2018-02-021-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QString] Added remove() overload taking QLatin1String Change-Id: I11ddb8b8603144effe44f89d0d02e131a255122c Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | QMimeType: remove unwanted *.bin as preferredSuffix for octet-streamDavid Faure2018-01-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This leads to an automatically appended .bin when saving a file. https://bugs.freedesktop.org/show_bug.cgi?id=101667 https://bugs.kde.org/382437 Fixed upstream in shared-mime-info 1.10 Change-Id: I125a0bc72c91a082706bf2bf149adcf63ff1ec6b Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Create corelib/serialization and move existing file formats into itThiago Macieira2018-01-265145-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is in preparation to adding CBOR support. We don't need yet another dir for CBOR and placing it in src/corelib/json is just wrong. Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
| * | | QListWidgetItem/QStandardItem: pass role to dataChanged() signalChristian Ehrlicher2018-01-261-18/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | QAbstractItemModel::dataChanged() gained an optional role parameter with Qt5 which was not filled within QListWidgetItem/QStandardItem setData() functions Task-number: QTBUG-55903 Task-number: QTBUG-63766 Change-Id: I4da9346ef8401cc8633dc4b2ea7d00451d1e3942 Reviewed-by: Luca Beldi <v.ronin@yahoo.it> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
| * | | tst_qvarlengtharray: Add missing includeOliver Wolff2018-01-261-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The include is needed for std::unique_ptr on winrt. Change-Id: I72a28bd0951cc947ac65877ccc35f464c757c444 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io> Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
| * | | Add support for converting from std::variantAllan Sandfeld Jensen2018-01-252-2/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adds inline handling of the C++17 type std::variant, so the type will be resolved if converted into a QVariant. Change-Id: I31809d70d7f347277389d42a3695836ec7a32d02 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Update the overflow functions to include qsizetypeThiago Macieira2018-01-241-9/+145
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 29bc68cf169b8cf87d306a1c72e12eb9b6fbfce7 added support for unsigned and commit 5ff7a3d96e0ce0dcb3d388b53d038cdd40c7a975 later added support for int. This commit adds support for qsizetype, which isn't int on 64-bit platforms. We do this by reorganizing the code and using the generic version of __builtin_{add,sub,mul}_overflow from GCC 5 and Clang 3.8, which ICC 18 seems to support now too on Linux. That leaves older versions of GCC and Clang, as well as MSVC, ICC on Windows, and the GHS compiler, to use the generic implementations, as I've removed the assembly code those versions of GCC and Clang on x86 are now uncommon. Note: any older version of ICC probably breaks. We only support the latest. Change-Id: I9e2892cb6c374e93bcb7fffd14fc11bcd5f067a7 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* | | | QVariant: convert QDateTime and QTime to string with millisecondsThiago Macieira2018-02-051-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This way, it's lossless. This commit is a cherry-pick of ab1e50757454b5afda2f6dec52d2eb16a32d4798, which was reverted. [ChangeLog][QtCore][QVariant] Conversions of QDateTime to strings now contain the millisecond components. Change-Id: I5e421e32396d44e4b39efffd150b744e40fff3a1 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
* | | | QUuid: add a way to get the string form without the bracesThiago Macieira2018-02-031-0/+16
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While we're at it, add a way to get it without the dashes too. I'm calling it "id128", as in "128-bit ID", as seen in journald's sd_id128_t type and the sd_id128_xxx() API. [ChangeLog][QtCore][QUuid] Added a parameter to both toString() and toByteArray() to allow controlling the use or not of the braces and dashes in the string form. Change-Id: I56b444f9d6274221a3b7fffd150cde706cfc5098 Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-202-30/+62
|\ \ \ | | |/ | |/| | | | | | | | | | | | | Conflicts: tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
| * | Test for leaks in QMetaObject::invoke with functorsOlivier Goffart2018-01-141-25/+55
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-65462 Change-Id: Ifa9735f5610a6df3ceabd286a0321e87bbd05ca3 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Skip a date-time test when we don't know what result it should giveEdward Welbourne2018-01-121-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The operator_eqeq(data13) test expected the local-time epoch and UTC epoch to agree precisely if the localTimeType set by the test's constructor says local time is UTC; however, when the local zone is *sometimes* ahead of (or behind) UTC, due to DST, localTimeType is duly set to indicate that, which doesn't preclude the zone agreeing with UTC at the epoch. This indeed happens for Europe/London, which agrees on the epoch but was ahead a few months later. So we can't determine what outcome to expect based solely on localTimeType, although we can be sure of a match when local time is UTC. So skip this test when local time isn't UTC (and document what's going on a bit better). Task-number: QTBUG-65435 Change-Id: Id9b8aa0402f2a2b410e0234f6eca4ab0d1010bc4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add rvalue overload of insert/prepend to QVarLengthArray and QVectorAllan Sandfeld Jensen2018-01-202-9/+194
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improves performance and STL compatibility by adding rvalue versions of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVector] Added rvalue overloads of prepend and insert. [ChangeLog][QtCore][QVarLengthArray] Can now contain movable but non-copyable types, such as std::unique_ptr. Change-Id: I6c946acc5b67502c91c52ac5dea67cedb1af93a5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Test Russia's post-DST transitions are reported correctlyEdward Welbourne2018-01-191-0/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression test for bugs resulting from failure to take account of the MS TZ APIs fake-DST handling of standard-time transitions happening during DST. Has to skip the 2014 test on Win7, as it's so old it doesn't know about the (for it) "future" transition. Task-number: QTBUG-42021 Change-Id: I853b86d03a86f0269371bf1622bf63882fb8ee5d Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Add QIODevice::NewOnly and QIODevice::ExistingOnly OpenMode flagsd3fault2018-01-171-0/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QFile::open is called with the NewOnly flag, the call will fail if the file already exists. As usual, if the file does not exist, it will be created. Like QTemporaryFile, there is a guarantee from the operating system that you are not accidentally creating a new file on top of an older file. When QFile::open is called with the ExistingOnly flag, the call will fail if the file does not exist. The ExistingOnly flag only provides new functionality when used with the WriteOnly flag. For ReadOnly it provides no change in functionality, as ReadOnly by itself already never creates. Task-number: QTBUG-52244 Change-Id: I8e3206728f245f95172c225bf297023fb078fc6d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Add QModelIndex::siblingAtColumn and ::siblingAtRowAndre Somers2018-01-122-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Data in item models is most often organized in rows, where each column contains an attribute of the item represented by the row. Often when sibling is used, it is to request another piece of data from the same row. Having a specialized version makes this easier and less awkward to do, simplifying auto sibling = index.sibling(index.row(), columnOfInterest); to auto sibling = index.siblingAtColumn(columnOfInterest); For symmetry reasons, siblingAtRow(rowOfInterest) was also added. Change-Id: Ib203b2cdb16154cbb2680d16fb5c6a7538f33d07 Reviewed-by: Topi Reiniö <topi.reinio@qt.io> Reviewed-by: David Faure <david.faure@kdab.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-113-36/+23
|\| | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/3rdparty/harfbuzz-ng/src/hb-private.hh src/sql/doc/snippets/code/doc_src_sql-driver.cpp src/sql/doc/src/sql-driver.qdoc Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
| * | Fix license headersJani Heikkinen2018-01-112-33/+23
| | | | | | | | | | | | | | | | | | | | | | | | Remove usage of outdated header.LGPL21 and replace those with proper one (header.LGPL in src, header.GPL-EXCEPT in tests) Change-Id: Ia4d1c0d84b77f09787fe7c30670747a1fe2aff29 Reviewed-by: Liang Qi <liang.qi@qt.io>
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-091-3/+0
| |\| | | | | | | | | | Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
| | * Revert "Blacklist tst_QDateTime::operator_eqeq"Edward Welbourne2018-01-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove black-listing of test; the problem was due to misconfigured time-zone on the CI system - it was on some zone that presently coincides with UTC, not actually on UTC as supposed. This reverts commit 597b96b8fa2fc8b9331db8ecc85d742be83fbec5. Change-Id: I72ad1dfa38532362c05aef33cd874f7f79879a41 Reviewed-by: Tony Sarajärvi <tony.sarajarvi@qt.io>
* | | QAbstractItemModelTester: fix the autotestsGiuseppe D'Angelo2018-01-094-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | Move the modeltest autotest in the right place, and fix the other autotests that were using it to use the version now in QtTestLib. Change-Id: Ic6838945f616d580f357c872ce0956c341be3b16 Reviewed-by: David Faure <david.faure@kdab.com>
* | | Introduce QAbstractItemModel::checkIndex()Giuseppe D'Angelo2018-01-082-1/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When implementing a custom model there's the habit, in each and every function that takes a QModelIndex, to carefully checking the index passed by the caller. This index is checked for "legality" (*): does the index belong to this model, is the index pointing to an existing row and column, and so on. These checks are hand-rolled and, as such, slightly different and possibly incomplete (i.e. wrong) every time. What's worse, these checks are implemented via "ordinary" code (if statements). However, passing an illegal index to a QAIM function is a precondition violation, and as such does not (and must not) be checked in ordinary conditions, as it triggers undefined behavior. On the other hand, while debugging a custom model or a custom hierarchy of (proxy) models, having such checks in place can be a significant aid. Enter checkIndex(): a debugging helper for QAbstractItemModel and its subclasses. checkIndex() centralizes the checks for legality of a given index. User code is free to assert on it, or have some other fallback mechanism in case a check fails. (*) Using "legality" here instead of "validity" in order to avoid confusion between QModelIndex::isValid() and what checkIndex() really does. [ChangeLog][QtCore][QAbstractItemModel] Added QAbstractItemModel::checkIndex(), a debugging function for QAbstractItemModel subclasses. Change-Id: I1eea0586b1ac3ededdbfbf46759145022dc5ad86 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com> Reviewed-by: David Faure <david.faure@kdab.com>
* | | QStringBuilder: add support for QStringViewMarc Mutz2018-01-081-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for QStringView. Change-Id: I5b6803397b107ef69d198a935b3ba4339ac95087 Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringBuilder: add support for char16_t{,*,[]}Marc Mutz2018-01-081-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore][QStringBuilder] Added support for char16_t characters and strings. Change-Id: Iee727f07226f2a326ae0df28d44930336cd8f71e Reviewed-by: Milian Wolff <milian.wolff@kdab.com> Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | QStringBuilder: clean up testMarc Mutz2018-01-071-36/+102
| | | | | | | | | | | | | | | | | | | | | | | | Add some macros to enable systematic testing of QStringBuilder expressions. Change-Id: I6b7dbcb4a4ca0d1aebdfe7cb9861af881c0cd346 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* | | Tests: Raise minimum supported MSVC version to 2015Friedemann Kleint2018-01-044-20/+4
| | | | | | | | | | | | | | | | | | | | | | | | Remove code for older versions and streamline #ifdefs. Task-number: QTBUG-51673 Change-Id: If456567691538b1a1f452111814c5f9eba401c43 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* | | Merge remote-tracking branch 'origin/5.10' into devLiang Qi2018-01-041-0/+0
|\| | | | | | | | | | | Change-Id: I644cd82b0d952b7d139e0228bf5017f147db77e7
| * | Merge remote-tracking branch 'origin/5.9' into 5.10Liang Qi2018-01-041-0/+0
| |\| | | | | | | | | | Change-Id: I3fa5c9e216201bdf7da260c395f65d7fb95cba0b
| | * Fix source code file permissionsSimon Hausmann2018-01-021-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | Fix permissions after commit ffc8409aa58c04c1dd140001976b55925ac959f6 - our source files are not executable. Change-Id: Idc5103704256b6f73857b645c323492beaabe879 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | | Update Text segmentation and line break data to Unicode 10.0Lars Knoll2018-01-034-3835/+5833
| | | | | | | | | | | | | | | | | | | | | | | | Also adjusted the text segmentation and line break algorithms so that they can handle the new data, and pass the test suite. Change-Id: Ib727fd80003e34e96458d7a681996de3fa3691e7 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Update QString::isRightToLeft() to take directional hints into accountLars Knoll2018-01-031-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure we properly handle both directional embeddings as well as directional isolates to determine the direction of the string. According to the latest version of the Unicode bidi algorithm, parts of the string contained inside an directional isolate is to be ignored when determining the paragraph direction. Embedding markers themselves are to be ignored as well, but not the characters inside an explicit directional embedding or override. This is also some required pre-work to get our BiDi algorithm updated to the latest version of the standard. Move the implementation to QStringView and implement the methods in QString and QStringRef through that implementation. Task-number: QTBUG-57743 Change-Id: I7f24e09198e22d6359c6534c9ae40a904e94c46e Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com> Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* | | Merge "Merge remote-tracking branch 'origin/5.10' into dev" into ↵Liang Qi2018-01-0216-91/+271
|\ \ \ | | | | | | | | | | | | refs/staging/dev