aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/controls/data/tst_dialog.qml
Commit message (Collapse)AuthorAgeFilesLines
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-221-494/+0
| | | | | | | Task-number: QTBUG-95173 Change-Id: I541dc26cf2cdd6f2640824f693f7d059445367d9 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Skip failing test_focusLeavingDialog function on offscreen platformMitch Curtis2021-01-141-0/+3
| | | | | | | Fixes: QTBUG-89909 Pick-to: 6.0 Change-Id: I09876b50d4a7d53e1e9c220d44753ab84592a62a Reviewed-by: Samuli Piippo <samuli.piippo@qt.io>
* Allow the preparation of the exit transition even if it did have focusAndy Shaw2020-09-151-0/+18
| | | | | | | | | | | | | This amends 1a5a0a591c35dcf498a232a802087683f2244ecb so that it only sets the hadActiveFocusBeforeExitTransition variable if it is false, ensuring that it is correctly handled later on if it is true from before. This handles a case of closing, opening and then closing again in one function call. Pick-to: 5.15 Task-number: QTBUG-85884 Change-Id: Ied4ca33045b005f5f666e63d85fb603e9350d982 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Dialog: emit accepted()/rejected() before closed()Mitch Curtis2020-09-021-2/+25
| | | | | | | | | | | | | | | | | | | | | | Before this patch, the documentation stated the following for e.g. accept(): "Closes the dialog and emits the accepted() signal." In practice, styles that have enter and/or exit transitions for Dialog result in closed() being emitted after accepted() (and rejected()). As there is no way to guarantee this particular order, we should be consistent and swap it around so that accepted()/rejected() are emitted first. [ChangeLog][Important Behavior Changes] Dialog's accepted() and rejected() signals are now emitted before closed() when calling done(), accept() and reject(). Fixes: QTBUG-85748 Change-Id: I706dda8de28c350d65e3188787af8f66a2c5f07d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* Remove all version numbers from QML importsMitch Curtis2020-08-261-4/+4
| | | | | | | | | As of Qt 6, the latest version will be used by default. This saves us a lot of effort in terms of version bumps. Task-number: QTBUG-82922 Change-Id: I74eba8185ec3ccc75bc293d4b2ea87d59e2d9928 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
* Prevent against re-entering prepareExitTransition after a focus changeAndy Shaw2020-08-191-0/+36
| | | | | | | | | | | | | | | | | When a popup is hidden, then it will trigger a prepareExitTransition which can cause the active focus to be lost. If the popup's visibility is tied to that fact then it can retrigger the transition which means the active focus does not go back to where it should. Therefore, we check if hadActiveFocusBeforeExitTransition is false before going through that process as then it will only be called the first time the popup is hidden. Pick-to: 5.15 Fixes: QTBUG-85884 Change-Id: I68054aeb48447617b4235ce6467514a17f1073ba Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* QQuickPage: fix a typo to avoid a crashLiang Qi2018-11-091-0/+13
| | | | | | | | | when setting null to footer Fixes: QTBUG-71444 Change-Id: Id4b0a3fd7aa104357674b4e2be6206894f8878da Reviewed-by: J-P Nurmi <jpnurmi@gmail.com> Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Tie minor version of all imports to Qt's minor versionMitch Curtis2018-11-021-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change makes all Qt Quick Controls 2 imports match the current Qt minor version, which is 12 as of this patch. It also updates all other Qt Quick imports to match. This will also make future version bumps easier as all version numbers in existing code/docs will match. The following commands were used to verify that no old versions remain: for i in `seq 0 11`; do git grep "import QtGraphicalEffects.*1.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick 2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Layouts 1.$i$"; done for i in `seq 0 5`; do git grep "import QtQuick.Controls.*2.$i$"; done for i in `seq 0 11`; do git grep "import QtQuick.Templates 2.$i as T$"; done [ChangeLog] From Qt 5.12 onwards, all import versions in Qt Quick Controls 2 follow the same minor version as Qt's minor version number. For example, the import version for Qt 5.12 is: "import QtQuick.Controls 2.12". Change-Id: I6d87573f20912e041d9c3b7c773cc7bf7b152ec3 Fixes: QTBUG-71095 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* skip tst_dialog::reject() instead of blacklisting itMitch Curtis2017-08-221-0/+2
| | | | | | | | | | | | Running this test causes tests after it to fail, mainly those related to hover. Since we need to fix the root cause of the recent failures before the release, it shouldn’t matter too much that this test isn’t run for a bit. Task-number: QTBUG-62549 Change-Id: Id8fd00e9049890ae47504c3e4b4ea3dda8ac60ef Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
* QQuickDialog: add missing standard button signalsJ-P Nurmi2017-05-191-0/+38
| | | | | | | | | | | | | | | | There were no signals at all for the following standard buttons: - Apply - Discard - Help - Reset/RestoreDefaults [ChangeLog][Controls][Dialog] Added missing applied(), discarded(), helpRequested(), and reset() signals that are emitted when the respective standard buttons are clicked. Task-number: QTBUG-59423 Change-Id: I744a445be2c3506470bdd023e6909f483cc2520a Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Incorporate QQuickDialog::result from QQuickPlatformDialogJ-P Nurmi2017-05-181-0/+2
| | | | | | | | | | | | The experimental QQuickPlatformDialog in Qt.labs.platform had a bit more elaborate accepted vs. rejected dialog result handling. Copy the same logic to QQuickDialog in QtQuick.Controls. [ChangeLog][Controls][Dialog] Added "result" property that holds whether the dialog was previously accepted or rejected. Change-Id: I2c55848b5eeaad2130d32a337c2590212736f22c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_dialog: get rid of waitForRendering()J-P Nurmi2017-04-271-4/+20
| | | | | | | | | | | | The intention is to wait until a dialog and its content is fully open and visible. While waitForRendering() does the job, it can sometimes take a bit of unnecessary extra time. Using SignalSpy to wait for opened() allows the test to continue immediately after the enter transition is finished. Change-Id: I86f2d524c616981148988f67dfed09c79002f7a9 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Update license headers to silence qtqa/tst_license warningsJ-P Nurmi2017-02-241-2/+12
| | | | | | | | | | Sync with the qtbase/header.XXX. The license headers were matching qtbase/header.XXX-OLD, which makes qtqa/tst_license flood warnings: Old license being used for foo.qdoc Change-Id: I199bf303a2d648e0d5f7bc01cb0814a5f945eeff Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* tst_controls: update import versions for controls and templatesJ-P Nurmi2017-01-121-2/+2
| | | | | Change-Id: I104bc44c361351719449cab94dcb14c96e91e32f Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.8' into devJ-P Nurmi2017-01-111-1/+1
|\ | | | | | | Change-Id: If797ac58344b20e8de4379343131c097247ba2f2
| * Welcome to 2017J-P Nurmi2017-01-091-1/+1
| | | | | | | | | | Change-Id: If68cff4efacc7dc5719c8b8e61937e85e9076870 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* | tst_dialog: use TestCase's new createTemporaryObject functionsMitch Curtis2016-12-191-24/+11
|/ | | | | | | | This ensures that the appropriate objects are destroyed at the end of each test function, even if the test fails. Change-Id: Id164652edf88a487b6eb630768144e4a23650658 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Dialog: emit rejected() when closed interactivelyMitch Curtis2016-11-101-0/+44
| | | | | | | | | | | | | | | This is what QDialog does, for example. This allows applications to perform some actions that must be done when the dialog is closed. For example, clearing any unsaved changes in a shortcut editor dialog. [ChangeLog][Controls][Dialog] Dialog now emits rejected() when closed interactively. Task-number: QTBUG-56928 Change-Id: Iad4e2fe984323d0b9fdfd17ee3746043b5eaf849 Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
* Popup: add spacing support for Dialogv5.8.0-beta1J-P Nurmi2016-10-261-0/+44
| | | | | | | | | | | This helps to get the dialog layout right (a separate follow-up commit), because we don't need to mess with the paddings of the header, content, and footer, based on their existence and visibility, but we can also adjust the spacing which gets automatically added between the building blocks when they exist and are visible. Change-Id: Ie8b587eeb9d0fb4a8f42baf957879d40bbd3385c Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickDialog::titleJ-P Nurmi2016-10-261-1/+1
| | | | | | | | | | | | Dialog is incomplete without built-in support for title. All dialogs in the examples, screenshots, webinars, and blog posts have had a custom title. The Material and Universal designs both have specs for dialog titles. This commit adds support for dialog titles with appropriate looks (padding & font) out of the box. Task-number: QTBUG-56711 Change-Id: I248150313f1ce629a7105fdbe1c70c8fcd69e1cc Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickDialog: simplify the button box handlingJ-P Nurmi2016-10-261-45/+6
| | | | | | | | | | Just fill in the footer with a button box by default from the styles. This makes the next step easier, to provide also a default title bar in the header. Task-number: QTBUG-56711 Change-Id: I621a61f29f9ba2fe4b7e907d81da5988133a98c8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Dialog: fix implicit size calculationJ-P Nurmi2016-10-241-0/+79
| | | | | | | Header and footer visibility must be taken into account. Change-Id: Id9bab1d66c126247df77effb153fefa3a78a1d79 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add DialogJ-P Nurmi2016-07-181-0/+218
[ChangeLog][Controls] Added Dialog to provide convenience for handling dialog popups. Dialog integrates with DialogButtonBox, and provides convenient accepted() and rejected() signals. Task-number: QTBUG-51090 Change-Id: I776516738b82c0e5726769c054d6f2a956fb616d Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>