aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols2impl
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2021-11-24 14:57:40 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-01-05 21:23:20 +0000
commita318e6f354c8c4c504c4da42737268bf9f1bae9c (patch)
tree355d62ef2b6e717bdd563ff1ec12e3de4f2dc6bc /src/quickcontrols2impl
parent0d0499dfc99383e3f00b1d8f0e092583851d5a25 (diff)
Replace currentFile(s) with selectedFile(s)
selectedFile can represent the currently-selected file (if the platform supports it), and so we can free up "currentFolder" for FolderDialog now that it means the folder that is being displayed, rather than the folder that is currently selected. [ChangeLog][QtQuickDialogs] FileDialog's currentFile and currentFiles properties have been deprecated. The selectedFile and selectedFiles properties now refer to the currently selected file(s), as well as the final selection. Fixes: QTBUG-98562 Task-number: QTBUG-87798 Change-Id: Ic66481332338f21169a9f63617cf4db4be83265d Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit 13399bd54d084ed837ec061ca9315dbd173f3b48) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/quickcontrols2impl')
-rw-r--r--src/quickcontrols2impl/qquickplatformtheme.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/quickcontrols2impl/qquickplatformtheme.cpp b/src/quickcontrols2impl/qquickplatformtheme.cpp
index b636b36397..e9b903d038 100644
--- a/src/quickcontrols2impl/qquickplatformtheme.cpp
+++ b/src/quickcontrols2impl/qquickplatformtheme.cpp
@@ -56,11 +56,16 @@ QQuickPlatformTheme::QQuickPlatformTheme(QObject *parent) :
QVariant QQuickPlatformTheme::themeHint(QPlatformTheme::ThemeHint themeHint) const
{
- if (themeHint == QPlatformTheme::ShowDirectoriesFirst) {
- // Allow tests to force this value, otherwise they get very messy and difficult to understand.
+ // Allow tests to force some theme hint values, otherwise they get very messy and difficult to understand.
+ switch (themeHint) {
+ case QPlatformTheme::ShowDirectoriesFirst: {
const QVariant showDirsFirst = qEnvironmentVariable("QT_QUICK_DIALOGS_SHOW_DIRS_FIRST");
if (showDirsFirst.isValid() && showDirsFirst.canConvert<bool>())
return showDirsFirst;
+ break;
+ }
+ default:
+ break;
}
return QGuiApplicationPrivate::platformTheme()->themeHint(themeHint);
}