aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/quickdialogs/qquickfontdialogimpl/tst_qquickfontdialogimpl.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QQuickTest: add and use active focus macrosMitch Curtis2025-04-251-1/+1
| | | | | | | | | | | | | Also add support for popups (when controlstestutils_p.h is included). [ChangeLog][Qt Quick Test] Added QVERIFY_ACTIVE_FOCUS and QTRY_VERIFY_ACTIVE_FOCUS macros that can be used to get detailed failure messages for when QQuickItem::hasActiveFocus should be true but isn't. Task-number: QTBUG-133858 Change-Id: I30c67a84ccc16e3969bac5661648d0062bc3d62c Reviewed-by: Mitch Curtis <[email protected]>
* Enable popup windows for QtQuick.DialogsOliver Eftevaag2024-07-231-5/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | The dialogs in QtQuick.Dialogs look so much better on desktop systems, when they appear inside real top level windows. This change enables the feature for all QtQuick.Dialogs types, and makes manual changes to each dialog, to make sure that they look good. This includes changes that hides the title from the header, since the title can now appear inside the window decoration instead. Lots of tests had to be changed, as a result, to properly generate and deliver events to the correct items. In addition, I've added some helper functions to dialogHelper, to handle cases we're we need to wait for a popup window to appear. Showing popups with dedicated windows, takes longer than simply creating a new item in an existing window. [ChangeLog] All dialogs in QtQuick.Dialogs will now use popup windows, if able. Fixes: QTBUG-126006 Pick-to: 6.8 Change-Id: Ieca6ae643d4f97b1bed648e448bbcd236a50e7e7 Reviewed-by: Mitch Curtis <[email protected]>
* Fix binding loop that occurs in QtQuickDialogs using popup windowsOliver Eftevaag2024-07-191-44/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | Here's a vague description of the loop: 1. The implicitWidth binding of QQuickDialog needs to be evaluated. Call setImplictWidth(). 2. QQuickPopupItem::geometryChange() and QQuickPopup::geometryChange() are called, 3. QQuickPopupPositioner::reposition() is called. 4. QQuickPopupPrivate::windowInsets() is called, to be used as positional offsets. This ends up calling QQuickControl::background(). 5. Because of deferred execution, the background wasn't already initialized. Needs to be lazily initialized instead. 6. QQuickPopup::setBackground() and QQuickPopup::implicitBackgroundWidthChanged() are called. 7. Reevaluate implicitWidth binding. 8. Theoretically back to 1. which is why it's a loop. The fix here, is to avoid calling QQuickControl::background() in QQuickPopupPrivate::windowInsets(), but instead access the data directly, if the background is executing. Pick-to: 6.8 Change-Id: I89f5f92cd9f2dc5f78070a3cf1e21dc6bfdd10f7 Reviewed-by: Mitch Curtis <[email protected]> Reviewed-by: Fabian Kosmale <[email protected]>
* Unblacklist tst_qquickfontdialogimpl::settingUnderlineAndStrikeoutEffectsDoris Verria2024-06-181-0/+2
| | | | | | | | | | | | | | | A font change in the font dialog will trigger a font change in the sample text's textEdit. This may change the size of the text edit, and require a relayout of the dialog's items. That is what was happenning in tst_qquickfontdialogimpl:: settingUnderlineAndStrikeoutEffects and causing a failure to click a button because the items hadn't finished the relayout. To fix, before triggering any mouse events after the font change, we need to wait for a polish event using qWaitForPolish. Fixes: QTBUG-126375 Change-Id: Icb69a64bd27a78852b509213f792f2ee2f3bcf4f Reviewed-by: Mitch Curtis <[email protected]>
* Correct license for test filesLucie Gérard2024-02-271-1/+1
| | | | | | | | | | | | | | According to QUIP-18 [1], all test files should be LicenseRef-Qt-Commercial OR GPL-3.0-only [1]: https://contribute.qt-project.org/quips/18 Pick-to: 6.7 Task-number: QTBUG-121787 Change-Id: I26d72e8de04d4c7c57b3b7838af5d033265de5ba Reviewed-by: Shawn Rutledge <[email protected]> Reviewed-by: Kai Köhne <[email protected]> Reviewed-by: Ulf Hermann <[email protected]>
* Port from container::count() and length() to size()Marc Mutz2022-10-071-14/+14
| | | | | | | | | | | | | | | | | | | | This is a semantic patch using ClangTidyTransformator as in qtbase/df9d882d41b741fef7c5beeddb0abe9d904443d8: auto QtContainerClass = anyOf( expr(hasType(cxxRecordDecl(isSameOrDerivedFrom(hasAnyName(classes))))).bind(o), expr(hasType(namedDecl(hasAnyName(<classes>)))).bind(o)); makeRule(cxxMemberCallExpr(on(QtContainerClass), callee(cxxMethodDecl(hasAnyName({"count", "length"), parameterCountIs(0))))), changeTo(cat(access(o, cat("size"), "()"))), cat("use 'size()' instead of 'count()/length()'")) a.k.a qt-port-to-std-compatible-api with config Scope: 'Container', with the extended set of container classes recognized. Change-Id: Idb1f75dfe2323bd1d9e8b4d58d54f1b4b80c7ed7 Reviewed-by: Fabian Kosmale <[email protected]>
* Add convenience API for making QQmlDataTest-based tests fail on warningsMitch Curtis2022-07-051-1/+4
| | | | | | | | | | | | | | | | | | | | After this patch, if a QQmlDataTest-derived class passes FailOnWarningsPolicy::FailOnWarnings to the base constructor, any non-empty warning encountered by that test will result in a test failure. This avoids the need to duplicate the catch-all regex in tests that want to fail on warnings. The goal is to gradually enable failure-on-warnings over time. Leave comments and explicitly pass DoNotFailOnWarnings for tests that should never fail on warnings. Task-number: QTBUG-98718 Pick-to: 6.2 6.3 6.4 Change-Id: I4b647d93a0f28ac891c4bdb19ef74569f2918e8f Reviewed-by: Ulf Hermann <[email protected]>
* Use SPDX license identifiersLucie Gérard2022-06-111-27/+2
| | | | | | | | | | | | 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. Pick-to: 6.4 Task-number: QTBUG-67283 Change-Id: I63563bbeb6f60f89d2c99660400dca7fab78a294 Reviewed-by: Shawn Rutledge <[email protected]>
* Restructure Qt Quick Dialogs testsMitch Curtis2021-12-231-0/+624
- Move contents of tests/auto/quickcontrols2/dialogs to tests/auto/quickdialogs. - Move tests/manual/quickcontrols2/dialogs to tests/manual/quickdialogs/dialogs. This makes the dialogs tests consistent with other modules that have their own "top-level" test directories. Fixes: QTBUG-99034 Pick-to: 6.2 6.3 Change-Id: I4ba155433507870fa607100af1b7957f8430727c Reviewed-by: Volker Hilsheimer <[email protected]>