summaryrefslogtreecommitdiffstats
path: root/tests/auto
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'origin/5.15' into devLiang Qi2020-02-13108-252/+1311
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: examples/widgets/graphicsview/boxes/scene.h src/corelib/Qt5CoreMacros.cmake src/corelib/Qt6CoreMacros.cmake src/network/ssl/qsslsocket.cpp src/network/ssl/qsslsocket.h src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp src/testlib/CMakeLists.txt src/testlib/.prev_CMakeLists.txt tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp Disabled building manual tests with CMake for now, because qmake doesn't do it, and it confuses people. Done-With: Alexandru Croitor <alexandru.croitor@qt.io> Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io> Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
| * Detect double timer during single timeout in registerTimer test, and skipVolker Hilsheimer2020-02-121-5/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We observe this happening on macOS in the CI system, and it might happen if a VM doesn't get CPU cycles for long enough time so that two timers time out. Then event processing will process two timer events, and we overwrite the timerIdFromEvent with the second event. Instead, skip the test when this happens. This is an ammendment to 5c520f4b0ad4b539dc0184c764ca9f12c98730d9 Change-Id: Ibc1169b5458c8dce9d4fe9ce715f49c396e17b86 Fixes: QTBUG-71751 Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Deprecate one overload of QInputDialog::getDouble() for 5.15Jan Arve Sæther2020-02-121-3/+4
| | | | | | | | | | | | | | ...and merge the two overloads of getDouble() in Qt6 Change-Id: I55faa2ff222b41e48889a0ef14dd00a6da691c36 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-121-2/+158
| |\ | | | | | | | | | Change-Id: I8caee4d1ce0eed27d905194df3c3d46c5d07d2b0
| | * Extend tst_qstringapisymmetry for member compare()Marc Mutz2020-02-091-2/+158
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few surprises: - QByteArray::compare() are missing noexcept (will add) - ibid., called with non-ascii content and CaseInsensitive fails (this was discussed on the ML, with tentative agreement that it's a feature, not a bug; waiting for QUtf8String(View) for a fix, then). - As was the case when we did this exercise with the relational operators, QString(Ref)/QChar is not noexcept (will fix) These have been QEXPECT_FAIL'ed. Not much of the cartesian product is implemented at all, yet. These have been #ifdef'ed with NOT_YET_IMPLEMENTED to see what's still missing. Change-Id: I7d9b21e292b98f980aacdc6248e88188f7472ba2 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Stabilize QFileSystemModel::dirsBeforeFiles testVolker Hilsheimer2020-02-111-10/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the test operate in its own temporary directory, so that entries left behind by other test functions don't impact this test. Also, call QFileSystemModel::sort explicitly; it would otherwise only be done once through a single-shot timer, and the test processes events until the model is populated, which might not process that delayed sorting. Since dirsBeforeFiles tests the sorting algorithm and not the sorting logic, best to do this explicitly. In case of sort failure, print diagnostics. Change-Id: I44c2b82ef1330cc8787aed2b5cbf109ef3a67876 Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io> Fixes: QTBUG-75452 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | QLocalSocket: Deprecate 'error' signal, use 'errorOccurred' insteadv5.15.0-alpha1Alexander Akulich2020-02-111-6/+6
| | | | | | | | | | | | | | | | | | | | | [ChangeLog][Deprecation Notice] QLocalSocket::error() (the signal) is deprecated; superseded by errorOccurred() Change-Id: I579c07564f5c470cf2867864755e0a26e6afce3b Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | Revert "QLocalSocket - deprecate ambiguous 'error' overloads"Alexander Akulich2020-02-112-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 0de6c26ac17c90f513329fdbe87ef036fc25925a. The patch fixes ambiguity between a getter and a signal by changing the getter name, but we still have to rename the signal to follow the signals naming convention. Revert the commit to keep the getter as is and change the signal name instead. Change-Id: I67dbb5cada25da473bdd02e71b1e2d9bd03f039e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
| * | QComboBox: deprecate currentIndexChanged(const QString&)Vitaly Fanaskov2020-02-111-12/+8
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-81845 Change-Id: Ia0ff5321423a5d3d4853bd425dd7236926f16047 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | QTranslator: Expose language of translation fileKai Koehne2020-02-102-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows for instance to show the current UI language in the UI, or to load additional translations that match the .qm file by other means. This is especially useful in the case of QTranslator::load(QLocale(), ...), in which case different language and country combinations might be tried. Another option is to inspect the file name via QTranslator::filePath(); however, this is more error-prone, and might also miss information (if the .qm file name doesn't have a country suffix, or no suffix at all). Change-Id: I6f565d53d8f50e21241ccae6c4de264747ac8f81 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | QTranslator: Expose origin file of the translationKai Koehne2020-02-101-1/+5
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-36608 Change-Id: I8ef0968404370b8fc25dc8b4c1e2c9e4484ae55c Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | testlib: Improve error message when detecting line count mismatchTor Arne Vestbø2020-02-101-2/+2
| | | | | | | | | | | | | | | Change-Id: I0e19b4c0dd7aa77063e02e6aac7e345dd7c8a5f5 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | std::chrono overload added to QStateMachine::postDelayedEvent()Dmitriy Purgin2020-02-101-0/+162
| | | | | | | | | | | | | | | | | | | | | | | | | | | Some Qt classes already accept std::chrono durations in their methods (see, for example, QTimer). The proposed change adds an overload with std::chrono::milliseconds to QStateMachine::postDelayedEvent(). Change-Id: I360fd2bb54fedc7415e9ec17e096095be3604d41 Reviewed-by: Erik Verbruggen <erik.verbruggen@me.com>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-082-4/+47
| |\| | | | | | | | | | Change-Id: I5d80d84d1fd9f52e7c8e4895cc34d4d29043f400
| | * QComboBox: send font change event to popup menu when font changedWang Chuan2020-02-071-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The font change in QComboBox might cause incorrect appearance of popup menu since it doesn't notify popup menu to relayout itself Fixes the issue by send font change event to the item view of popup menu when received a font change event in QComboBox Fixes: QTBUG-75846 Change-Id: I4821015cca95a7e233a22262596a6fbf27f10aef Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| | * uic/Python: Add imports for Q(Date)Time, QKeySequenceFriedemann Kleint2020-02-061-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Those types are used as properties of Q(Date)TimeEdit, QKeySequenceEdit. Fixes: PYSIDE-1215 Change-Id: I8b9ffebb8229fff447aa7dd6bee6e037d708333c Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| * | On Windows 7, fall back to SHFileOperation to avoid confirmation dialogsVolker Hilsheimer2020-02-071-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving a file to the trash should preferably done via IFileOperation. However, the implementation on Windows 7 ignores the operation flags that request the shell not to show any confirmation dialogs or other UI elements. SHFileOperation is an old API that doesn't show any UI, but has the limitation that it doesn't report the location of the file in the trash after the move. So an application cannot restore the file, but the user can do so via Explorer. Overall, the better compromise is to not have dialogs at the expense of not being able to report the new path. This allows us to run the unit test on Windows 7 as well. Change-Id: Ib8e651a69e2c6750f668b52d2a70925d156cc8ae Fixes: QTBUG-81927 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Discover the conditions under which registerTimer is flaky, and skipVolker Hilsheimer2020-02-071-0/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS, the registerTimer test case fails frequently, and blocks valid integrations. With this change we try to detect the condition and skip the test. Change-Id: Id2065f606abfd431971becf63034a4c1f0fdb9e5 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| * | testlib: Move subtest argument handling to individual testsTor Arne Vestbø2020-02-0616-85/+115
| | | | | | | | | | | | | | | | | | | | | | | | The test orchestrator shouldn't have to deal with the individual options needed for each test. Change-Id: I78bbf4850cc649e625bd08a7aedf02267ba1314d Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
| * | Reduce scope of testlib selftest regular expressionsTor Arne Vestbø2020-02-061-4/+2
| | | | | | | | | | | | | | | | | | Change-Id: I2fd7a39684bde44d82c4d877086f606413d68520 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Remove tst prefix for testlib selftestsTor Arne Vestbø2020-02-062-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | These tests are apparently not run at the moment, otherwise they would have failed to even start, but they should definitely not have the tst prefix. Change-Id: Iafcec2764ebb3570e6bc6ebfba27d92a94639893 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Configure the MS-Win long time format rather than assuming we know itEdward Welbourne2020-02-061-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In tst_QLocale::windowsDefaultLocale(), we configure the long and short date formats and the short time format eccentrically, then verify that QLocale::system() does actually get these eccentric formats. However, we did not configure the long time format (whose MS-API name doesn't match that of the other formats), so had to rely on a guess at the system locale's format. That, however, is not robust; so now configure the long time format, too. Removed a duplicated test, at the same time. Fixes: QTBUG-36306 Change-Id: I04dc22c7eb1b58af55412b598873868f79e9c74f Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-02-064-5/+68
| |\ \
| | * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-064-5/+68
| | |\| | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/network/ssl/qsslsocket_openssl_symbols.cpp Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
| | | * tst_qnetworkreply: Print proxy warning to stderr instead of stdoutMorten Johan Sørvig2020-02-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This way we produce valid xml also for the no-proxy case. Change-Id: I5a277255d22c3814fe463c0cd013c04ddc6ad919 Reviewed-by: André Hartmann <aha_1980@gmx.de>
| | | * widgets: Don't create winId when the widget is being destroyedVaL Doroshchuk2020-02-051-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When QWidget is being destroyed, its winId is cleared, and a QEvent::WinIdChange is sent. If a listener of this event reacted by calling winId() again, we might crash. A crash can be observed when this child widget is destroyed in dtor of its parent. E.g. here is a hierarchy of widgets: 1:QWidget 2:QObject 3:QWidget 4:QWidget If a listener subscribed for WinIdChange events from (4), and there is a connection to destroy (4) when (2) is destroyed. This will lead to infinite loop: 1. QWidget::~QWidget 2. QWidget::destroy 3. QWidgetPrivate::setWinId(0) 4. QCoreApplication::sendEvent(q, QEvent::WinIdChange); 5. eventFilter 6. QWidget::winId 7. QWidgetPrivate::createWinId (this=0x555555957600) at kernel/qwidget.cpp:2380 8. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 9. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163 10. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 11. QWidget::create (this=0x5555558f2010, window=0, initializeWindow=true, destroyOldWindow=true) at kernel/qwidget.cpp:1163 12. QWidgetPrivate::createWinId (this=0x55555596b040) at kernel/qwidget.cpp:2387 Fixes: QTBUG-81849 Change-Id: Ib4c33ac97d9a79c701431ae107bddfb22720ba0d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | | * uic/Python: Set form object name correctlyFriedemann Kleint2020-02-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add missing "not" for the isEmpty() check. Fixes: PYSIDE-1210 Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
| | | * Take care of NULL data from QStringView in QCollatorEdward Welbourne2020-02-051-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Back-ends need to catch NULL data so as not to call system APIs with invalid pointers. [ChangeLog][QtCore][QCollator] Fixed a regression introduced in 5.14.0 that caused QCollator not to operate with default-constructed QStrings and print a warning on Windows. Fixes: QTBUG-81673 Change-Id: I2eafe1e188b436afcca3cf2ecdf98bba707c44c9 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | | Maintain at least 500ms timestamp distance between each test functionJan Arve Sæther2020-02-061-1/+66
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we had one test function that just did tst_Mouse::f1() { QTest::mouseMove(w, QPoint(0,0)); } and another test function that did tst_Mouse::f2() { QTest::mouseMove(w, QPoint(500,500)); } their corresponding event timestamps were only 1 apart from each other. This meant that any code that tried to estimate the velocity of a mouse cursor would get a really high velocity estimate inside f2(). This would come as a surprise to most people. So to avoid this, we add a 500 ms timestamp delay between each test function call. In theory this could also prevent generating a mouseDoubleClickEvent when a pair of test functions containing a press-release sequence was run, but there is a separate pre-existing mechanism to handle that case. Change-Id: Icd4fc35853c09f080466d22411208c7b5c4174b5 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| * | Add QFile::moveToTrash, which moves a file to the trashVolker Hilsheimer2020-02-051-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the nature of QFile just operating on a file path, this also works for paths that are actually directories. The test covers files from different locations on which this operation should typically succeed, but tries to handle the case where trashing files will fail because of the file system structure. On Windows 7, running the test will open a confirmation dialog as the implementation of IFileOperation doesn't respect the various flags. This might depend on the specific Windows 7 patch level, and the option to always use SHFileOperation on that platform needs to be evaluated further. [ChangeLog][QtCore][QFile] Introduce QFile::moveToTrash to allow applications to move files to the trash. Change-Id: I45019040c25b30f7db293b6933c63aca2f319514 Fixes: QTBUG-47703 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Address failing test case for internal implementation of moveToTrashVolker Hilsheimer2020-02-042-174/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This ammends 601ce9e08aa92b273f1a6daf0bdbc67dbf9b4e5f, which added a new test case for the internal Qt APIs. The test was not getting executed by coin as it wasn't included in the io.pro file, and trying to fix that generates link errors on Windows, since these internal APIs depend on other internal APIs. Short of bootstrapping much of QtCore into this test case, the only sensible option is to remove this test case again, and cover the testing when the public API is added in a follow up commit. At the same time, address those failures that were discovered on platforms that could build the test, and fix compilation on iOS platforms in Coin. Change-Id: Id31b43c9df9f205476c48bccb6b87c7a53ed15c5 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | Merge remote-tracking branch 'origin/5.14' into 5.15Qt Forward Merge Bot2020-02-046-13/+116
| |\| | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: .qmake.conf examples/widgets/widgets/imageviewer/imageviewer.cpp src/corelib/text/qchar.cpp src/corelib/time/qdatetime.cpp Change-Id: I9762f5c4ff650799219729d6aee79ac07ce9024a
| | * Enable system locale to skip digit-grouping if configured to do soEdward Welbourne2020-02-031-13/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On macOS it's possible to configure the system locale to not do digit grouping (separating "thousands", in most western locales); it then returns an empty string when asked for the grouping character, which QLocale's system-configuration then ignored, falling back on using the base UI locale's grouping separator. This could lead to the same separator being used for decimal and grouping, which should never happen, least of all when configured to not group at all. In order to notice when this happens, query() must take care to return an empty QString (as a QVariant, which is then non-null) when it *has* a value for the locale property, and that value is empty, as opposed to a null QVariant when it doesn't find a configured value. The caller can then distinguish the two cases. Furthermore, the group and decimal separators need to be distinct, so we need to take care to avoid cases where the system overrides one with what the CLDR has given for the other and doesn't over-ride that other. Only presently implemented for macOS and MS-Win, since the (other) Unix implementation of the system locale returns single QChar values for the numeric tokens - see QTBUG-69324, QTBUG-81053. Fixes: QTBUG-80459 Change-Id: Ic3fbb0fb86e974604a60781378b09abc13bab15d Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
| | * Markdown importer: properly set hyperlinksGiuseppe D'Angelo2020-02-032-0/+26
| | | | | | | | | | | | | | | | | | | | | | | | The "title" in markdown is the tooltip, not the name attribute of a link. Also, tell the char format that it's an anchor. Change-Id: I2978848ec6705fe16376d6fe17f31007cce4b801 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
| | * Blacklist failing tests on macOS 10.14Morten Johan Sørvig2020-01-302-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | These tests fail locally, and have been reported to fail on the CI system. Change-Id: Ia76bb15c288af4171ebe47b3c30f3651a63df3f2 Task-number: QTBUG-75786 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
| | * QGraphicsProxyWidget: fix handling of proxy focusGiuseppe D'Angelo2020-01-291-0/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a widget inside a QGPW has a proxy focus, the code would keep sending focus in events to the proxy even if the proxy was already focused. Amend the check in place to prevent this from happening. Change-Id: Id28d3bfe4f396da5c9477df713441ca7d506662f Fixes: QTBUG-51856 Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
| * | testlib: Clarify that our XUnit reporter is actually a JUnit reporterTor Arne Vestbø2020-02-0352-21/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reporter was probably named 'xunit' based on the historical use of xUnit to refer to testing frameworks derived from Smalltalk's SUnit. These frameworks typically added their own prefix, e.g. JUnit for Java, RUnit for R, etc. The most popular of these was the JUnit framework, and the corresponding XML output produced by the Ant built tool became somewhat of a de facto standard, which is probably why we chose to model our reporter after it. Nowadays however, naming it 'xunit' is problematic as there is actually a testing famework named xUnit.net, typically shortened to, you guessed it: xunit. Test report consumers will typically have a junit mode, and an xunit mode, and the latter could easily be mistaken for what testlib outputs, unless we clarify this. The clarification also allows us to safely extend our support for the JUnit XML format to incorporate some elements that are nowadays common, but where we are lagging behind the standard. [ChangeLog][QTestLib] The formerly named 'xunitxml' test reporter has been renamed to what it actually is: a JUnit test reporter, and is now triggered by passing -o junitxml to the test binary. Change-Id: Ieb20d3d2b5905c74e55b98174948cc70870c0ef9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | QSignalMapper: deprecate overridden signalsVitaly Fanaskov2020-02-011-7/+7
| | | | | | | | | | | | | | | | | | | | | Task-number: QTBUG-80906 Change-Id: I9beab78d8fe8dfc712969f65792f50360a890287 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
| * | QScopeGuard: Fix build failures with qScopeGuard()Kari Oikarinen2020-02-011-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Partially reverts 4f077b7e5ff1081afc0e362bdab6522c2b7ee43b. Can't overload with forwarding references and lvalue references. Use a single forwarding reference overload, but take care of not trying to create a QScopeGuard of reference type and forward instead of moving. Add tests to ensure calling with both lvalues and rvalues is possible. Change-Id: Ia034afe0a8feb08246c2c7c154a85cae37421c98 Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | Fix unused argument warning in testTor Arne Vestbø2020-02-012-2/+2
| | | | | | | | | | | | | | | Change-Id: I9f55efee82f8d855d89977b3e4db32855e110c87 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
| * | tst_QDataStream::readQCursor(): Replace deprecated QCursor APISze Howe Koh2020-02-011-12/+12
| | | | | | | | | | | | | | | | | | Task-number: QTBUG-48701 Change-Id: I4205d278b1cd6b088f8f58020f6a5e49a7f1ca33 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
| * | Allow creating a valid QColorSpace one value at a timeAllan Sandfeld Jensen2020-02-011-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The change to using setters left a quirk from the previous un-mutable design where you couldn't set values on an invalid color space and create a valid one. This changes that so it works as expected for an imperative API, but is also needed for the declarative QML bindings. Change-Id: I246cfc38b364b156238151c42c1df82a3f1cc9d3 Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
| * | Add a constructor for QRunnable from anonymous functionsAllan Sandfeld Jensen2020-01-311-6/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This makes it easier to create one without having to create a derivative class. The patch also adds a path to avoid using QRunnable directly in QThreadPool. Change-Id: I9caa7dabb6f641b547d4771c863aa6ab7f01b704 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
| * | Deprecate locale-related DateFormat enum membersEdward Welbourne2020-01-313-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | Qt 6 shall remove all locale-dependence from Q(Date|Time)+. Task-number: QTBUG-80441 Change-Id: Iebaaa2bd776bccfe0d73c15f36cbdd456b71ca59 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
| * | Clarify handling of unspecified year in two QCalendar methodsEdward Welbourne2020-01-311-1/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ChangeLog][QtCore] QCalendar::monthsInYear(QCalendar::Unspecified) now returns maximumMonthsInYear(). QCalendar::daysInYear() now makes clear that its handling of unspecified year is undefined. Change-Id: Ifef8723193868c666f6afeb7f190af4929d30dea Reviewed-by: Paul Wicking <paul.wicking@qt.io> Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
| * | Deprecate QDateTime(const QDate &) in favor of QDate::startOfDay()Edward Welbourne2020-01-301-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It needed re-implemented in terms of the new API (in case QTime(0, 0) was skipped, on the date in question, by a spring-forwrd), which makes it redundant (and supports choice of spec and zone or offset, which it did not). Change-Id: I1e3c3e794632c234f254be754ed6e4ebdaaaa6bc Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
| * | QScopeGuard: Make constructor publicKari Oikarinen2020-01-302-6/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With Class Template Argument Deduction users might want to use the constructor itself instead of a separate helper function. In both cases it's possible to let the compiler deduce the template arguments. Try to make the usefulness of the helper function in the absence of CTAD still clear in the documentation. Change-Id: I9b07983c1fb276a6dd9e7ed4c3e606764e9b68ca Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
| * | Implement moving of a single file system entry to the trashVolker Hilsheimer2020-01-302-0/+174
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This implements the operation for Windows, macOS, and Unix, for now only as a private API (since QFileSystemEngine is private). This adds the capability as a testable function; public API to be agreed on and added in a separate commit. The Unix implementation follows the freedesktop.org specification [1] version 1.0. [1] https://specifications.freedesktop.org/trash-spec/trashspec-1.0.html On macOS and Windows, native APIs are used, with each having some limitations: * on macOS, the file in the trash won't have a "put back" option, as we don't use Finder automation, for the reasons provided in the comments * on Windows, we might not be able to use the modern IFileOperation API, e.g. if Qt is built with mingw which doesn't seem to provide the interface definition; the fallback doesn't provide access to the file name in the trash The test case creates files and directories, and moves them to the trash. As part of the cleanup routine, it deletes all file system entries created. If run on Windows without IFileOperations support, this will add a file in the trash for each test run, filling up hard drive space. Task-number: QTBUG-47703 Change-Id: I5f5f4e578be2f45d7da84f70a03acbe1a12a1231 Reviewed-by: Vitaly Fanaskov <vitaly.fanaskov@qt.io>
| * | QNetworkAccessManager: deprecate bearer related functionsMårten Nordheim2020-01-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Qt6 QNAM will no longer use bearer in any way so we deprecate it now. Also mark bearermanagement-conditioned sections for removal in Qt6, the _q_networksession property is part of how QNAM passes the QNetworkSession around. Task-number: QTBUG-81609 Change-Id: I04aad9dd96482c6822dffba1b9af7aa58961149c Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
| * | Merge "Merge remote-tracking branch 'origin/5.14' into 5.15"Qt Forward Merge Bot2020-01-291-0/+24
| |\ \