aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qquickapplicationwindow/tst_qquickapplicationwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Restructure tests in preparation for merging into qtdeclarativeMitch Curtis2021-07-221-946/+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>
* Add recursion guard to QQuickApplicationWindowPrivate::relayout()Jan Arve Sæther2021-06-161-0/+37
| | | | | | | | | | | | | relayout() might change the size of the header, footer or contentitem When one of those items changes, QQuickApplicationWindowPrivate will get notified by that through QQuickApplicationWindowPrivate::itemGeometryChanged(). itemGeometryChanged() will then call relayout()... (*recursed*). Pick-to: 5.15 6.2 Task-number: QTBUG-87708 Change-Id: I9403952e776afb2be37d009642c65b5520c79341 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Don't copy or assign QKeyEvent instancesVolker Hilsheimer2020-11-111-36/+48
| | | | | Change-Id: Id16f972a7f2c0f3c9c9d2fe1d14b9e0830a85a0a Reviewed-by: Lars Knoll <lars.knoll@qt.io>
* Make tests explicitly use Basic where necessaryMitch Curtis2020-10-071-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | The previous commit changes the how the default style is set, and since the tests all assumed that Basic was the default, we now need to ensure it is explicitly set. If we want to, we can revert this patch (or file-by-file) later and ensure that these tests work with all styles. For now, just keep things working as they used to. Tests that use QTEST_QUICKCONTROLS_MAIN are not changed, as they already run with all built-in styles. Tests that don't use types that will cause issues, like tst_qquickcolor, do not need to be changed. tst_snippets can be run manually to produce screenshots, so we specify its style in a qtquickcontrols2.conf file to allow it to be overridden by e.g. application arguments (QQuickStyle::setStyle() takes precedence over all other approaches of setting a style). Change-Id: Ifae7e959f89a41a757c170272038fad139bba04f Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
* auto tests: remove all versioning from the test dataRichard Moe Gustavsen2020-09-041-3/+3
| | | | | | | | | | | | The problem is that QtQuick.Controls.macos is only available with revision 6.0. And when importing e.g QtQuick.Controls 2.15, we try to load a style with the same revision. But it simply doesn't exist. So remove all versioning from the tests to also support testing newer styles. Change-Id: I666a93ab03ec4c5dcf2055a363547f8cdac8d25e Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Register C++ types declarativelyMitch Curtis2020-08-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Adapt to the new way of registering C++ types. The types need to be seen at compile time so that code can be generated that invokes them. This patch: - Adds QML_* macros where applicable. - Adapts the build system files to the new way of registering modules. - Splits up the QtQuick.Controls[.*].impl files into their own plugins, as we can only register one QML module per .pro file. - Removes C++ type registration calls in every plugin. - Moves private types from src/quickcontrols2/quickcontrols2.pro to src/quickcontrols2/impl/quickcontrols2-impl.pro. Some of these types need to be exposed to QML, but quickcontrols2.pro is already in use to declare the QtQuick.Controls import (and also provides the public C++ QQuickStyle API), and the new QML_IMPORT_NAME/VERSION syntax only allows one module per project. As some of the types that need to be exposed to QML are also referenced by some C++ code (e.g. tests, etc.), we just move all of the private types to the new library. Follow-up patches will register the QML types declaratively. Task-number: QTBUG-82922 Change-Id: Iaf9ee106237d61701d57a8896f3822304c8151a6 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* ApplicationWindow: remove deprecated overlay APIMitch Curtis2020-06-081-19/+0
| | | | | | | | | | [ChangeLog][Controls][ApplicationWindow] The deprecated overlay properties and attached API were removed. Use the Overlay attached type instead. Task-number: QTBUG-84715 Change-Id: I0781ea55ea502ffe5277385e82492291724d2090 Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
* Skip tests that use graphical effects on Win 7Mitch Curtis2020-05-261-0/+3
| | | | | | | | | It's not clear why these fail, but we can live without the test on Windows 7. Fixes: QTBUG-84443 Change-Id: Ib18dfc8e12528c5086d07d6018cda93fb6e8d30c Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Reduce dependencies on QtGraphicalEffectsMitch Curtis2020-05-131-0/+3
| | | | | | | | - Make QtGraphicalEffects optional in tests - Mention that QtGraphicalEffects is required for relevant examples Change-Id: I3ac7d06add931e0a10c3df7edc4e458ba5519c75 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* tst_QQuickApplicationWindow: remove workaroundMitch Curtis2018-10-261-5/+0
| | | | | | | | | | 30fcc735 introduced this to work around a crash that was apparently caused by 4c71db75. The commit that added the workaround is now three years old, and removing it fixes a crash that is blocking CI. Change-Id: Iefbb32e00d57e5ad86c43977e10120fdc92a3635 Fixes: QTBUG-70064 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Create and init QQuickTheme from QtQuickControls2PluginJ-P Nurmi2018-05-221-1/+1
| | | | | | | | | | | | | | | Instead of creating and setting the QQuickTheme instance from each style plugin (e.g. QtQuickControls2MaterialStylePlugin), create the QQuickTheme instance in QtQuickControls2Plugin when the style is being resolved, and just pass the instance to be initialized by the style plugin(s). This avoids the problem that QQuickTheme API was virtual, and sub-classes created from plugins would have vtables destroyed before the QQuickTheme was destroyed. Task-number: QTBUG-67062 Task-number: QTBUG-68087 Change-Id: I19e9ced5296b708c2668c30163389cb3da6be7cf Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: rename themeFont() and themePalette()J-P Nurmi2018-05-221-1/+1
| | | | | | | We don't have the conflicting virtual getters anymore. Change-Id: Ia20bfa0a0b1aa67c35a23270eb0241018f8e0ada Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: add setters to make getters non-virtualJ-P Nurmi2018-05-221-7/+2
| | | | | | | | | | This allows us to add more themable attributes (on the side of fonts and palettes) after the QQuickTheme API has been made public, because it won't require adding virtuals. Only the resolve() method is virtual. Task-number: QTBUG-67062 Change-Id: I6a5cc8d15aeaa5a9a0fe9b6d2591077f8822daac Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Rename QQuickTheme::current to instanceJ-P Nurmi2018-05-161-2/+2
| | | | | | | | Avoid giving a wrong impression that the theme instance could be changed on the fly. Change-Id: Ifb5078422385d2f15da6a416d89cc9d6f46b0f40 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Add QQuickTheme::ScopeJ-P Nurmi2018-03-151-3/+3
| | | | | | | | | | | Replace the old enums that were originally copied from QPlatformTheme, including irrelevant entries for DockWidget, MdiSubWindow, MessageBox, with a unified enum that will be matched to cover everything needed for theming fonts and palettes for Qt Quick Controls 2. Task-number: QTBUG-67062 Change-Id: Ia99d092f28c00210c0c7f24d4241eb5a5d9ceb5b Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: cleanup the APIJ-P Nurmi2018-03-151-1/+1
| | | | | | Task-number: QTBUG-67062 Change-Id: Id2f821bd41b72f7bce9885295e89c322eb3332f4 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* QQuickTheme: don't inherit QPlatformThemeJ-P Nurmi2018-02-271-6/+5
| | | | | | | | | | | | | | | | Use QPlatformTheme as a fallback instead of inheriting from it. This way, Qt Quick Controls 2 themes don't mess up the fonts and palettes of Qt Quick Controls 1 and Qt Widgets applications. Note: QQuickTheme::Font and QQuickTheme::Palette enums are copies of the respective enums in QPlatformTheme, for now. This is the simplest first step, but later on, we can have our own set of enums that cover controls, such as Switch, that were previously entirely missing from QPlatformTheme. Task-number: QTBUG-51921 Change-Id: I8efe0ba2d03d65bc12b55b533ba9f2fab5320348 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Promote QQuick(Proxy)Theme from libQQC2 to libQQT2J-P Nurmi2018-02-151-1/+1
| | | | | | | | | | QQuickTheme needs to be part of libQtQuickTemplates to be able to provide dark and light palettes (and later, icons). Task-number: QTBUG-63331 Change-Id: If7d3d279a07b6daf6701a1d3cd3686bec1d094b4 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
* Merge remote-tracking branch 'origin/5.9' into 5.10J-P Nurmi2017-09-271-3/+65
| | | | | | | | | | Conflicts: .gitignore tests/auto/auto.pro tests/auto/qquickmenu/tst_qquickmenu.cpp tests/auto/qquickpopup/tst_qquickpopup.cpp Change-Id: I7e5a7b39d890796fd63a7b24ae19765ab41fecda
* Rename tst_applicationwindow to tst_QQuickApplicationWindowJ-P Nurmi2017-09-271-0/+838
Change-Id: If9fc2bb41cf251af71479b25656240e0d3c238d8 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>