summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/dialogs
Commit message (Collapse)AuthorAgeFilesLines
...
* CMake: Don't use PUBLIC_LIBRARIES for tests and test helpersAlexandru Croitor2022-07-2811-11/+11
| | | | | Change-Id: I9b7404e1d3a78fe0726ec0f5ce1461f6c209e90d Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
* Use SPDX license identifiersLucie Gérard2022-05-1613-351/+26
| | | | | | | | | | | | | Replace the current license disclaimer in files by a SPDX-License-Identifier. Files that have to be modified by hand are modified. License files are organized under LICENSES directory. Task-number: QTBUG-67283 Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Lars Knoll <lars.knoll@qt.io> Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
* Activate tst_qmessagebox for AndroidAndreas Buhr2022-04-051-1/+1
| | | | | | | | | | | | tst_qmessagebox was disabled because it crashed. It does not any more. Now it hangs, which is a new problem. Fixes: QTBUG-87671 Task-number: QTBUG-101217 Pick-to: 6.2 6.3 Change-Id: Iec15cf82a4112ee79182ec091622e40147bd3e7f Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
* Android: re-enable skipped testsIvan Solovev2022-03-291-4/+0
| | | | | | | | | | | | | Now when 71b3d18ea7962a01413966f793e8187c9e91685e is merged, we can re-enable the previously skipped tests, as they do not crash anymore. Task-number: QTBUG-101423 Task-number: QTBUG-101321 Task-number: QTBUG-87417 Pick-to: 6.3 6.2 Change-Id: I6b4b3619b0af5e48b5e92b514bc0ab6586a76d51 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Tests: Do not depend on transitive includesFabian Kosmale2022-03-171-0/+1
| | | | | Change-Id: Ibc6a948480a904913a5427e6408d4d296784fb4f Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
* Add setCurrentId in QWizardAxel Spoerl2022-03-121-0/+40
| | | | | | | | | setCurrentId(int id) implemented incl. forward skip warning respective test added in tst_qwizard Fixes: QTBUG-99488 Change-Id: Ieaf31698baf1e8ec97484b4a221c8587385c9fb3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Deprecate {QString, QByteArray}::count()Sona Kurazyan2022-03-122-2/+2
| | | | | | | | | | | | And remove their uses. [ChangeLog][QtCore][Deprecation Notice] Deprecated QString::count() and QByteArray::count() that take no parameters, to avoid confusion with the algorithm overloads of the same name. They can be replaced by size() or length() methods. Change-Id: I6541e3235ab58cf750d89568d66d3b1d9bbd4a04 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Android: temporary skip tst_QDialog::dialogInGraphicsViewIvan Solovev2022-03-021-0/+4
| | | | | | | | | | | This test crashed and prevents other testcases from execution. The test requires a proper fix, but that's not trivial, so skipping to enable more tests in the CI for now. Task-number: QTBUG-101321 Pick-to: 6.3 6.2 Change-Id: I1bd4b1182cc868a36391a718457eae647675fc17 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Android: skip tst_QDialog::snapToDefaultButtonIvan Solovev2022-03-022-3/+3
| | | | | | | | | | | This test uses the cursor. However we have no cursor support on Android. Skip the test instead of blacklisting it, because that is the correct behavior. Fixes: QTBUG-87389 Pick-to: 6.3 6.2 Change-Id: I1a2d2dd406b3d7da1bc70b51c2072a83d9a29ca5 Reviewed-by: Andreas Buhr <andreas.buhr@qt.io>
* Activate tst_qfiledialog for AndroidAndreas Buhr2022-02-283-1/+27
| | | | | | | | | | | tst_qfiledialog was disabled because it crashed. It does not any more. Task-number: QTBUG-87671 Task-number: QTBUG-101194 Pick-to: 6.2 6.3 Change-Id: Icfda2cd01677f3a076b74429fcf66a1de79d2aa9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* CMake: Add BUILTIN_TESTDATA option to qt_internal_add_testAlexey Edelev2022-02-112-31/+20
| | | | | | | | | | | Multiple tests use qt_internal_add_resource that copies the functionality that is already implemented inside the qt_internal_add_test function. Simplify these test by replacing the qt_internal_add_resource call with the new BUILTIN_TESTDATA option. Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Deprecate QContextMenuEvent and QMouseEvent ctors without globalPosShawn Rutledge2022-02-051-1/+1
| | | | | | | | | | | | | As with QHoverEvent, it's better to require globalPos rather than "initialized to QCursor::pos(), which may not be appropriate" as the docs have pointed out for many years now. This removes the remaining calls to QCursor::pos() in event constructors. Task-number: QTBUG-52430 Task-number: QTBUG-69433 Task-number: QTBUG-100324 Change-Id: I076dae56f37abaad7085cc95dddee453a80a45f3 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove unused .qrc filesJoerg Bornemann2022-01-172-14/+0
| | | | | | | | Task-number: QTBUG-94446 Change-Id: I136d8b4ab070a832866aa50b5701fc6bd863df8a Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Alexey Edelev <alexey.edelev@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* QFileDialog: Fix adding default suffix when file path contains dotAlexander Volkov2021-11-121-0/+16
| | | | | | | | | | Check that a file name, not the full path, contains a dot. Fixes: QTBUG-59401 Pick-to: 5.15 6.2 Change-Id: I193b2ae457a3ac6a460524dbf200786eb3461cef Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Activate tst_QDialog::showAsTool test on macOSVolker Hilsheimer2021-10-111-3/+2
| | | | | | | | | | | The skip-reason only cites Qt/X11. Convert the #ifdef into a platform name check instead. The test also fails with the offscreen plugin, so skip it for that as well. Pick-to: 6.2 Change-Id: I49607b89f4b32359e81e1d9aadff2c3e03035c53 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* QDialog: respect WA_ShowWithoutActivatingVolker Hilsheimer2021-10-111-0/+29
| | | | | | | | | | | | | | | | | | QDialog overrides setVisible to set focus on the default push button, or (if there is no such button), make the first autoDefault push button the default button. QDialog also explicitly sends a FocusIn event to the focus widget in the dialog. All this should not be done if the dialog does not become active after getting shown, which will be prevented if the WA_ShowWithoutActivating attribute is set. Add a test case. Fixes: QTBUG-8857 Pick-to: 6.2 Change-Id: If47021a4721a280ba45e95b43d0424cdacd9b4ea Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Don't clear focus if setParent doesn't change the parentVolker Hilsheimer2021-09-281-0/+18
| | | | | | | | | | | | | | | | | | | | QWidget::setParent might be called to change the window flags, without changing the parent. For those cases, we don't have to clear the focus. Decouple the newParent state from the wasCreated flag. In most places where newParent was tested, wasCreated was either tested previously and can't be false anyway, or the code executed is irrelevant for widgets that are not yet created (there can't be a paint manager). In the remaining case, test wasCreated explicitly to maintain existing logic. Add test for the cases where the previous code broke the focus, both for QWidget and QDialog. Fixes: QTBUG-93005 Pick-to: 6.2 Change-Id: I39dc179c2d348054de3927aa8b69eecef4935511 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io> Reviewed-by: Doris Verria <doris.verria@qt.io>
* Remove conditioning on Android embeddedEdward Welbourne2021-09-171-2/+2
| | | | | | | | It is no longer handled separately from Android. This effectively reverts commit 6d50f746fe05a7008b63818e77784dd0c99270a1 Change-Id: Ic2d75b8c5a09895810913311ab2fe3355d4d2983 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
* Close QDialog via QWidget::close()Tor Arne Vestbø2021-09-161-2/+4
| | | | | | | | | | | | | | | By going via QWidget::close() we ensure that if there's a QWidgetWindow backing the dialog (which is almost always the case), we will plumb down to QWindow::close(), resulting in QEvent::Close events to the QWindow. Since we don't want QDialog subclasses to receive a call to a closeEvent override that they didn't receive before (and which they might interpret as rejection or cancellation), install a temporary event filter that eats the QCloseEvent resulting from the call to close(). Task-number: QTBUG-53286 Change-Id: Ie8f6f0cb3160acfd5865dc74f0a7b6d87f838724 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* macOS: Don't show QMessageBox::about(Qt) as modal windowsTor Arne Vestbø2021-09-091-2/+11
| | | | | | | | | | | | | | | | The system behavior is to not show these kinds of dialogs as modal, and we've documented that for QMessageBox. However, calling show() instead of exec() is not enough, as the default constructor of QMessageBox will set the modality of the widget to application-modal. We need to explicitly override this. [ChangLog][macOS] QMessageBox::about(Qt) now shows dialog non-modal, as documented. Pick-to: 6.2 Change-Id: I6bb59efb81feb23122276a9eede71b2f20c9d7c6 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Add more QDialog unit test related to closing a dialogVolker Hilsheimer2021-09-051-0/+170
| | | | | | | | | | | | | | | | | QDialog today only hides itself during reject and accept, it doesn't close itself properly. This is problematic, as it doesn't close the QWindow. However, fixing this behavior must not result in duplicate calls to virtual function, or additional calls to virtual functions (such as closeEvent) without explicitly flagging the change in the changelog. Add more tests to document existing behavior so that we can identify such changes and verify the desired side effects. Pick-to: 6.2 Change-Id: I1f30701cd766eb3c7957751b51e8579d4542dd16 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* QMessageBox: Reset clickedButton for each invocation of the dialogTor Arne Vestbø2021-09-041-0/+23
| | | | | | | | | | When showing a messagebox that has already been show we don't want to keep around the clicked button of the previous invocation. Pick-to: 6.2 Change-Id: Ib6f6293d40ab338c550ea344094db871ccf45c46 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
* tests: Remove unused SRCDIR definesIevgenii Meshcheriakov2021-08-171-2/+0
| | | | | | | | | | | Remove SRCDIR defines from tests that don't use them. There is a standard define called QT_TESTCASE_SOURCEDIR that is available to all tests and serves the same purpose. Pick-to: 6.2 Change-Id: I2aa237739c011495e31641cca525dc0eeef3c870 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* tests: Use QT_TESTCASE_SOURCEDIR defineIevgenii Meshcheriakov2021-08-112-3/+1
| | | | | | | | | Replace custom SRCDIR define with QT_TESTCASE_SOURCEDIR. The latter is automatically available to all tests to use and serves the same purpose but is not terminated by a slash. Change-Id: I62896d0fd84ac63ac1b74a459ec1646c6bde0a46 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
* testlib: Deprecate QWARN() in favor of qWarning()Tor Arne Vestbø2021-08-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | The QtTest best practices documentations recommends using output mechanisms such as qDebug() and qWarning() for diagnostic messages, and this is also what most of our own tests do. The QWARN() macro and corresponding internal QTest::qWarn() function was added when QtTest was first implemented, but was likely meant as an internal implementation detail, like its cousin QTestLog::info(), which does not have any corresponding macro. This theory is backed by our own QtTest self-test (tst_silent) describing the output from QWARN() as "an internal testlib warning". The only difference between QWARN() and qWarning(), besides the much richer feature set of the latter, is that qWarning() will not pass on file and line number information in release mode, but QWARN() will. This is an acceptable loss of functionality, considering that the user can override this behavior by defining QT_MESSAGELOGCONTEXT. [ChangeLog][QtTest] QWARN() has been deprecated in favor of qWarning() Pick-to: 6.2 Change-Id: I5a2431ce48c47392244560dd520953b9fc735c85 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* Fix wrong C-style cast, use correct QTest::keyClick overloadVolker Hilsheimer2021-04-281-1/+1
| | | | | Change-Id: Ic1e170a5f63da76067a48c3775c47e202948b616 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Mark obsolete QMessageBox members as deprecatedVolker Hilsheimer2021-04-231-0/+9
| | | | | | | | | | | | | | | | Those overloads have been documented as obsolete, but never been deprecated. Add the deprecation macros to trigger warnings as of Qt 6.2. The overloads taking a single StandardButton should not be deprecated until Qt 7, as otherwise porting from old to new API will require an unnecessary cast to StandardButtons for calls with only a single enum value. The unit test explicitly tests the deprecated members, so disable warnings there. Fixes: QTBUG-92483 Change-Id: I283ddce4681eafda2378607f999946e56bbb777e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Re-layout QProgressDialog when setting the cancel buttonQiang Li2021-04-191-0/+24
| | | | | | | | | | | | | | Setting a cancel button on QProgressDialog more than once caused the layout to be invalid. The layout was only applied when the dialog resizes or the style changes, but not when a new cancel button is set. The solution is to update the layout() before showing the dialog when adopting new child widgets. Fixes: QTBUG-19983 Pick-to: 6.0 6.1 Change-Id: Id8fb1ac56e94a9bd97d4559a2e8d4835856fd7d0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_QDialog::keepPositionOnClose on WaylandEskil Abrahamsen Blomfeldt2021-03-111-1/+2
| | | | | | | | | | | | | | | | | The test assumed that dialog.move() would actually move the dialog box to the requested location, which is an invalid assumption on Wayland. Since the objective of the test is not to check if move() works this way, but to check whether the dialog box shows up in the same location when it is re-shown, we actually fetch the pos after showing it the first time, rather than assume this is the same as the requested one. Task-number: QTBUG-91418 Change-Id: Ifa21fa08429f198988f90d7ee328e4f35a4764c2 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
* Windows: Fix dialog moving up after closing/reshowingFriedemann Kleint2021-01-151-0/+22
| | | | | | | | | | | | A resize event delivered after closing the platform window was causing the stored frame margins to be cleared. Bail out of QWidgetWindow::updateMargins() if the platform window is null. Pick-to: 5.15 Fixes: QTBUG-79147 Change-Id: Iebbc90c3cccafa209cd720baedf45affb3f3c2b8 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Remove .prev_CMakeLists.txt filesJoerg Bornemann2021-01-121-17/+0
| | | | | | | | | | Those serve no purpose anymore, now that the .pro files are gone. Task-number: QTBUG-88742 Change-Id: I39943327b8c9871785b58e9973e4e7602371793e Reviewed-by: Cristian Adam <cristian.adam@qt.io> Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Remove the qmake project filesJoerg Bornemann2021-01-0712-104/+0
| | | | | | | | | | | | | | | | Remove the qmake project files for most of Qt. Leave the qmake project files for examples, because we still test those in the CI to ensure qmake does not regress. Also leave the qmake project files for utils and other minor parts that lack CMake project files. Task-number: QTBUG-88742 Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
* Replace QtTest headers with QTestDavid Skoland2020-12-2212-12/+29
| | | | | | | | | | | Complete search and replace of QtTest and QtTest/QtTest with QTest, as QtTest includes the whole module. Replace all such instances with correct header includes. See Jira task for more discussion. Fixes: QTBUG-88831 Change-Id: I981cfae18a1cabcabcabee376016b086d9d01f44 Pick-to: 6.0 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Fix tst_qfiledialog2 in case directory ~/foo existsAndreas Buhr2020-11-241-2/+2
| | | | | | | | | | | One test in tst_qfiledialog2 only succeeded if the directory "~/foo" did not exist. This patch changes the path used to "~/Vugiu1co" which has hopefully a much lower probability of existing. The string "Vugiu1co" is taken from a call to "pwgen". Pick-to: 6.0 Change-Id: Ia82b07902a91eb908a74aa90cdbdf4761d432d9a Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
* Android: exclude tests crashing at startAssam Boudjelthia2020-11-163-2/+27
| | | | | | | | | | | These tests are failing with "java.lang.UnsatisfiedLinkError: dlopen failed: invalid ELF file" at the start, excluding them now to enable Android testing until they're fixed later. Task-number: QTBUG-87671 Task-number: QTBUG-87025 Change-Id: Ida7d7158fccdc31df1f9689f77fde832964d732f Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Android: blacklist a list of failing tests for androidAssam Boudjelthia2020-11-043-0/+11
| | | | | | | | | | | | | | | | We want to re-enable Android tests in QTQAINFRA-3867. However, many tests are failing already preventing that from happening. QTBUG-87025 is currently keeping track (links) to all of those failing tests. The current proposal is to hide those failing tests, and enable Android test running in COIN for other tests. After, that try to fix them one by one, and at the same time we can make sure no more failing tests go unnoticed. Task-number: QTBUG-87025 Change-Id: Ic1fe9fdd167cbcfd99efce9a09c69c344a36bbe4 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
* Get rid of all instance usage of QFontDatabaseVolker Hilsheimer2020-11-031-2/+1
| | | | | | | | All QFontDatabase APIs are static, use them accordingly. Task-number: QTBUG-88114 Change-Id: I0e4a7508646037e6e2812611262eed8b6d7ad3de Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
* Another round of replacing 0 with nullptrAllan Sandfeld Jensen2020-10-077-19/+19
| | | | | | | | | This time based on grepping to also include documentation, tests and examples previously missed by the automatic tool. Change-Id: Ied1703f4bcc470fbc275f759ed5b7c588a5c4e9f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFlags: remove deprecated constructorEdward Welbourne2020-10-031-1/+1
| | | | | | | | Fix remaining places that still exercised it. Task-number: QTBUG-85700 Change-Id: I84562f53439197141343831c0b9f88983689e6bf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Fix compiler warnings from QKeyCombinationLars Knoll2020-09-281-2/+2
| | | | | | | | Change lots of code to avoid the deprecated operator+() or implicit casts to int. Change-Id: I0c343cd5b28603afdf1214eefb85e928313345e2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* CMake: Regenerate projects to use new qt_internal_ APIAlexandru Croitor2020-09-2311-13/+13
| | | | | | | | | | | Modify special case locations to use the new API as well. Clean up some stale .prev files that are not needed anymore. Clean up some project files that are not used anymore. Task-number: QTBUG-86815 Change-Id: I9947da921f98686023c6bb053dfcc101851276b5 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Add reentrancy guard for processEvents() in QProgressDialog::setValue()Christian Heimlich2020-09-211-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Current implementation of QProgressDialog always calls QCoreApplication::processEvents() when the user calls QProgressDialog::setValue() if the PD is modal. For most cases this is fine, but when using a Qt::WindowModal PD with setValue() connected to a signal in another thread using Qt::QueuedConnection a reentrancy issue is present if setValue() is triggered too frequently as the execution of its previous call may not have finished. If this happens too many times in a row a stack overflow will occur. Current documentation notes this potential issue but offers no way it avoid it while still using QProgressDialog (user must implement a custom dialog) without resorting to using Qt::BlockingQueuedConnection, which unnecessarily reduces performance. Introduces the boolean reentrancy guard "processingEvents" that is checked before calling QCoreApplication::processEvents() in a modal PD when setValue() is used. It is set before the first call to processEvents() and cleared after that call returns. This ensures that only one invocation of processEvents() is possible from within setValue() at a time, and thereby minimizes iterations of the main event loop and eliminates the aforementioned stack overflow condition. See - https://forum.qt.io/topic/118292/ Fixes: QTBUG-10561 Pick-to: 5.15 Change-Id: Ifa9b91cbb66881981356954ead0906bdc91fab60 Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
* Remove most compiler warnings about missing overridesLars Knoll2020-09-117-22/+25
| | | | | | | | | | | | Remove around 1000 compiler warnings about missing overrides in our auto tests. This significantly reduce the compiler warning noise in our auto tests, so that one can actually better see the real problems inbetween. Change-Id: Id0c04dba43fcaf55d8cd2b5c6697358857c31bf9 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Port from devicePixelRatioF() to devicePixelRatio()Morten Johan Sørvig2020-09-101-1/+1
| | | | | | | This ports all of QtBase. Change-Id: If6712da44d7749b97b74f4614a04fac360f69d9e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Move QFileSystemModel into QtGuiVolker Hilsheimer2020-08-259-1260/+11
| | | | | | | | | | | | | | This requires a QAbstractFileIconProvider in QtGui, as the standard QFileIconProvider depends on QStyle, and cannot be moved out of QtWidgets. QAbstractFileIconProvider returns strings for file types, but returns no icons yet. Support for a default icon set might be added in a follow-up commit. Change-Id: Ib9d095cd612fdcf04db62f2e40709fcffe3dc2b7 Fixes: QTBUG-66177 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Make QFontDatabase member functions staticEskil Abrahamsen Blomfeldt2020-08-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | QFontDatabase is a singleton and all instances would share a single, mutex-protected global data pointer. But some functions were implemented as non-static functions. This caused a lot of code on the form QFontDatabase().families(...) since there was no static access. Other functions were implemented as static. To consolidate, we make all functions static. This should be source-compatible, but not binary compatible. [ChangeLog][QtGui][Fonts] Some functions in QFontDatabase were in principle static, but previously not implemented as such. All member functions have now been made static, so that constructing objects of QFontDatabase is no longer necessary to access certain functionality. Fixes: QTBUG-83284 Change-Id: Ifd8c15016281c71f631b53387402c942cd9c43f6 Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
* Fix warnings about unused variables and functions in testsTor Arne Vestbø2020-07-261-1/+1
| | | | | Change-Id: Ia758a91384083c13fb4d743f500fef7a6629dfd5 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
* CMake: Regenerate tests with new qt_ prefixed APIsAlexandru Croitor2020-07-0912-14/+14
| | | | | | | | Use pro2cmake with '--api-version 2' to force regenerate projects to use the new prefixed qt_foo APIs. Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* Add ; to Q_UNUSEDLars Schmertmann2020-07-071-1/+1
| | | | | | | | This is required to remove the ; from the macro with Qt 6. Task-number: QTBUG-82978 Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* QFileDialog: remove deprecated mode QFileDialog::DirectoryOnlyChristian Ehrlicher2020-06-262-11/+1
| | | | | Change-Id: Ia06e80c1bbed3e5bb80793aebd0a4780eb81a36b Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>