diff options
Diffstat (limited to 'tests/manual/dialogs')
-rw-r--r-- | tests/manual/dialogs/CMakeLists.txt | 10 | ||||
-rw-r--r-- | tests/manual/dialogs/colordialogpanel.cpp | 4 | ||||
-rw-r--r-- | tests/manual/dialogs/colordialogpanel.h | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/filedialogpanel.cpp | 15 | ||||
-rw-r--r-- | tests/manual/dialogs/filedialogpanel.h | 9 | ||||
-rw-r--r-- | tests/manual/dialogs/fontdialogpanel.cpp | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/fontdialogpanel.h | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/main.cpp | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/messageboxpanel.cpp | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/messageboxpanel.h | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.cpp | 4 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.h | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/utils.cpp | 4 | ||||
-rw-r--r-- | tests/manual/dialogs/utils.h | 2 | ||||
-rw-r--r-- | tests/manual/dialogs/wizardpanel.cpp | 6 | ||||
-rw-r--r-- | tests/manual/dialogs/wizardpanel.h | 2 |
16 files changed, 45 insertions, 25 deletions
diff --git a/tests/manual/dialogs/CMakeLists.txt b/tests/manual/dialogs/CMakeLists.txt index 992b0d1b59..1900b68540 100644 --- a/tests/manual/dialogs/CMakeLists.txt +++ b/tests/manual/dialogs/CMakeLists.txt @@ -1,8 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -# Generated from dialogs.pro. - ##################################################################### ## dialogs Binary: ##################################################################### @@ -17,14 +15,14 @@ qt_internal_add_manual_test(dialogs messageboxpanel.cpp messageboxpanel.h utils.cpp utils.h wizardpanel.cpp wizardpanel.h + NO_PCH_SOURCES + filedialogpanel.cpp # undef QT_NO_FOREACH + utils.cpp # undef QT_NO_FOREACH LIBRARIES Qt::Gui Qt::Widgets ) -#### Keys ignored in scope 1:.:.:dialogs.pro:<TRUE>: -# TEMPLATE = "app" - ## Scopes: ##################################################################### @@ -36,6 +34,8 @@ qt_internal_extend_target(dialogs CONDITION TARGET Qt::PrintSupport qt_internal_extend_target(dialogs CONDITION NOT (QT_FEATURE_printer EQUAL FALSE) SOURCES printdialogpanel.cpp printdialogpanel.h printdialogpanel.ui + NO_PCH_SOURCES + printdialogpanel.cpp # undef QT_NO_FOREACH ENABLE_AUTOGEN_TOOLS uic ) diff --git a/tests/manual/dialogs/colordialogpanel.cpp b/tests/manual/dialogs/colordialogpanel.cpp index 2508193e0a..c9052263b6 100644 --- a/tests/manual/dialogs/colordialogpanel.cpp +++ b/tests/manual/dialogs/colordialogpanel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "colordialogpanel.h" #include "utils.h" @@ -52,7 +52,7 @@ public: { } - QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override { if (role == Qt::DisplayRole) { QString name = data(index, Qt::EditRole).toString(); diff --git a/tests/manual/dialogs/colordialogpanel.h b/tests/manual/dialogs/colordialogpanel.h index 3f61df5acd..06eff59945 100644 --- a/tests/manual/dialogs/colordialogpanel.h +++ b/tests/manual/dialogs/colordialogpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef COLORDIALOGPANEL_H #define COLORDIALOGPANEL_H diff --git a/tests/manual/dialogs/filedialogpanel.cpp b/tests/manual/dialogs/filedialogpanel.cpp index f7e2cfa638..2f47c5ad0a 100644 --- a/tests/manual/dialogs/filedialogpanel.cpp +++ b/tests/manual/dialogs/filedialogpanel.cpp @@ -1,5 +1,7 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "filedialogpanel.h" #include "utils.h" @@ -84,6 +86,7 @@ FileDialogPanel::FileDialogPanel(QWidget *parent) , m_resolveSymLinks(new QCheckBox(tr("Resolve symlinks"))) , m_native(new QCheckBox(tr("Use native dialog"))) , m_customDirIcons(new QCheckBox(tr("Don't use custom directory icons"))) + , m_noIconProvider(new QCheckBox(tr("Null icon provider"))) , m_acceptMode(createCombo(this, acceptModeComboData, sizeof(acceptModeComboData)/sizeof(FlagData))) , m_fileMode(createCombo(this, fileModeComboData, sizeof(fileModeComboData)/sizeof(FlagData))) , m_viewMode(createCombo(this, viewModeComboData, sizeof(viewModeComboData)/sizeof(FlagData))) @@ -111,6 +114,7 @@ FileDialogPanel::FileDialogPanel(QWidget *parent) optionsLayout->addRow(m_resolveSymLinks); optionsLayout->addRow(m_readOnly); optionsLayout->addRow(m_customDirIcons); + optionsLayout->addRow(m_noIconProvider); // Files QGroupBox *filesGroupBox = new QGroupBox(tr("Files / Filters")); @@ -415,12 +419,19 @@ void FileDialogPanel::restoreDefaults() l->restoreDefault(&d); } -void FileDialogPanel::applySettings(QFileDialog *d) const +void FileDialogPanel::applySettings(QFileDialog *d) { d->setAcceptMode(comboBoxValue<QFileDialog::AcceptMode>(m_acceptMode)); d->setViewMode(comboBoxValue<QFileDialog::ViewMode>(m_viewMode)); d->setFileMode(comboBoxValue<QFileDialog::FileMode>(m_fileMode)); d->setOptions(options()); + if (m_noIconProvider->isChecked()) { + m_origIconProvider = d->iconProvider(); + d->setIconProvider(nullptr); + } else if (m_origIconProvider) { + d->setIconProvider(m_origIconProvider); + } + d->setDefaultSuffix(m_defaultSuffix->text().trimmed()); const QString directory = m_directory->text().trimmed(); if (!directory.isEmpty()) diff --git a/tests/manual/dialogs/filedialogpanel.h b/tests/manual/dialogs/filedialogpanel.h index 1cce1dfdd1..3acf193121 100644 --- a/tests/manual/dialogs/filedialogpanel.h +++ b/tests/manual/dialogs/filedialogpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef FILEDIALOGPANEL_H #define FILEDIALOGPANEL_H @@ -9,6 +9,8 @@ #include <QPointer> QT_BEGIN_NAMESPACE + +class QAbstractFileIconProvider; class QPushButton; class QCheckBox; class QComboBox; @@ -52,7 +54,7 @@ private: QString filterString() const; QFileDialog::Options options() const; QStringList allowedSchemes() const; - void applySettings(QFileDialog *d) const; + void applySettings(QFileDialog *d); QFormLayout *filesLayout; QCheckBox *m_showDirsOnly; @@ -62,6 +64,9 @@ private: QCheckBox *m_resolveSymLinks; QCheckBox *m_native; QCheckBox *m_customDirIcons; + QCheckBox *m_noIconProvider = nullptr; + QAbstractFileIconProvider *m_origIconProvider = nullptr; + QComboBox *m_acceptMode; QComboBox *m_fileMode; QComboBox *m_viewMode; diff --git a/tests/manual/dialogs/fontdialogpanel.cpp b/tests/manual/dialogs/fontdialogpanel.cpp index df896fcccd..4d599c456d 100644 --- a/tests/manual/dialogs/fontdialogpanel.cpp +++ b/tests/manual/dialogs/fontdialogpanel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "fontdialogpanel.h" #include "utils.h" diff --git a/tests/manual/dialogs/fontdialogpanel.h b/tests/manual/dialogs/fontdialogpanel.h index 895d741f2f..db3f2fc3f4 100644 --- a/tests/manual/dialogs/fontdialogpanel.h +++ b/tests/manual/dialogs/fontdialogpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef FONTDIALOGPANEL_H #define FONTDIALOGPANEL_H diff --git a/tests/manual/dialogs/main.cpp b/tests/manual/dialogs/main.cpp index 4816db125d..d8b3f3c567 100644 --- a/tests/manual/dialogs/main.cpp +++ b/tests/manual/dialogs/main.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "filedialogpanel.h" #include "colordialogpanel.h" diff --git a/tests/manual/dialogs/messageboxpanel.cpp b/tests/manual/dialogs/messageboxpanel.cpp index 50f386ee0c..1d03072123 100644 --- a/tests/manual/dialogs/messageboxpanel.cpp +++ b/tests/manual/dialogs/messageboxpanel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2013 Thorbjørn Lund Martsum - tmartsum[at]gmail.com -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "messageboxpanel.h" diff --git a/tests/manual/dialogs/messageboxpanel.h b/tests/manual/dialogs/messageboxpanel.h index 41db6cdebd..c84657562b 100644 --- a/tests/manual/dialogs/messageboxpanel.h +++ b/tests/manual/dialogs/messageboxpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2013 2013 Thorbjørn Lund Martsum - tmartsum[at]gmail.com -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef MESSAGEBOXPANEL_H #define MESSAGEBOXPANEL_H diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp index 6fe2eeab14..716faa48c6 100644 --- a/tests/manual/dialogs/printdialogpanel.cpp +++ b/tests/manual/dialogs/printdialogpanel.cpp @@ -1,5 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #ifndef QT_NO_PRINTER diff --git a/tests/manual/dialogs/printdialogpanel.h b/tests/manual/dialogs/printdialogpanel.h index 3ae48524e8..a8d54e8aa2 100644 --- a/tests/manual/dialogs/printdialogpanel.h +++ b/tests/manual/dialogs/printdialogpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2021 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef PRINTDIALOGPANEL_H #define PRINTDIALOGPANEL_H diff --git a/tests/manual/dialogs/utils.cpp b/tests/manual/dialogs/utils.cpp index 9ac5f66a85..bfb61cd8df 100644 --- a/tests/manual/dialogs/utils.cpp +++ b/tests/manual/dialogs/utils.cpp @@ -1,5 +1,7 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only + +#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses #include "utils.h" diff --git a/tests/manual/dialogs/utils.h b/tests/manual/dialogs/utils.h index 83362958b2..3db08ce44e 100644 --- a/tests/manual/dialogs/utils.h +++ b/tests/manual/dialogs/utils.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef UTILS_H #define UTILS_H diff --git a/tests/manual/dialogs/wizardpanel.cpp b/tests/manual/dialogs/wizardpanel.cpp index 36605de9fa..5e413960e3 100644 --- a/tests/manual/dialogs/wizardpanel.cpp +++ b/tests/manual/dialogs/wizardpanel.cpp @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "wizardpanel.h" @@ -191,7 +191,7 @@ class WizardPage : public QWizardPage public: explicit WizardPage(const QString &title, QWidget *parent = nullptr); - void initializePage(); + void initializePage() override; private: WizardStyleControl *m_styleControl; @@ -229,7 +229,7 @@ Wizard::Wizard(QWidget *parent, Qt::WindowFlags flags) addPage(new WizardPage(tr("Page 3"), this)); } -// A dialog using a Wizard as child widget (emulating Qt Designer). +// A dialog using a Wizard as child widget (emulating Qt Widgets Designer). class WizardEmbeddingDialog : public QDialog { public: explicit WizardEmbeddingDialog(QWidget *parent = nullptr); diff --git a/tests/manual/dialogs/wizardpanel.h b/tests/manual/dialogs/wizardpanel.h index e802fb10ea..42765aeaef 100644 --- a/tests/manual/dialogs/wizardpanel.h +++ b/tests/manual/dialogs/wizardpanel.h @@ -1,5 +1,5 @@ // Copyright (C) 2016 The Qt Company Ltd. -// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 +// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #ifndef WIZARDPANEL_H #define WIZARDPANEL_H |