summaryrefslogtreecommitdiffstats
path: root/src/widgets/dialogs
diff options
context:
space:
mode:
authorAlexander Volkov <avolkov@astralinux.ru>2021-10-18 22:25:07 +0300
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-10-19 20:13:14 +0000
commit056e807bb199d66989b92aef2de4334baf6a4817 (patch)
tree69a941c7443ccc3d3cab9ef39a55cf97cc5ce99f /src/widgets/dialogs
parentedfb0922ea697ca96a3a61d029c64eb4de98e967 (diff)
Fix correspondence between QFileDialog::Option and QFileDialogOption::FileDialogOptions
It was broken by fe4a5a27e09b8109381e52aa1b71135a916dff1a. Pick-to: 6.2 Change-Id: I77da7ec9cdedc80a72b7f11980950a8bebfdaf3b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r--src/widgets/dialogs/qfiledialog.cpp7
-rw-r--r--src/widgets/dialogs/qfiledialog.h1
2 files changed, 8 insertions, 0 deletions
diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp
index 2dbd7c07f8..935cfeb409 100644
--- a/src/widgets/dialogs/qfiledialog.cpp
+++ b/src/widgets/dialogs/qfiledialog.cpp
@@ -830,6 +830,13 @@ void QFileDialog::setOptions(Options options)
QFileDialog::Options QFileDialog::options() const
{
Q_D(const QFileDialog);
+ static_assert((int)QFileDialog::ShowDirsOnly == (int)QFileDialogOptions::ShowDirsOnly);
+ static_assert((int)QFileDialog::DontResolveSymlinks == (int)QFileDialogOptions::DontResolveSymlinks);
+ static_assert((int)QFileDialog::DontConfirmOverwrite == (int)QFileDialogOptions::DontConfirmOverwrite);
+ static_assert((int)QFileDialog::DontUseNativeDialog == (int)QFileDialogOptions::DontUseNativeDialog);
+ static_assert((int)QFileDialog::ReadOnly == (int)QFileDialogOptions::ReadOnly);
+ static_assert((int)QFileDialog::HideNameFilterDetails == (int)QFileDialogOptions::HideNameFilterDetails);
+ static_assert((int)QFileDialog::DontUseCustomDirectoryIcons == (int)QFileDialogOptions::DontUseCustomDirectoryIcons);
return QFileDialog::Options(int(d->options->options()));
}
diff --git a/src/widgets/dialogs/qfiledialog.h b/src/widgets/dialogs/qfiledialog.h
index 0a6b9e62ef..73136c3707 100644
--- a/src/widgets/dialogs/qfiledialog.h
+++ b/src/widgets/dialogs/qfiledialog.h
@@ -79,6 +79,7 @@ public:
Q_ENUM(AcceptMode)
enum DialogLabel { LookIn, FileName, FileType, Accept, Reject };
+ // keep this in sync with QFileDialogOption::FileDialogOptions
enum Option
{
ShowDirsOnly = 0x00000001,