diff options
Diffstat (limited to 'tests/manual/dialogs')
-rw-r--r-- | tests/manual/dialogs/CMakeLists.txt | 38 | ||||
-rw-r--r-- | tests/manual/dialogs/dialogs.pro | 8 | ||||
-rw-r--r-- | tests/manual/dialogs/messageboxpanel.cpp | 6 | ||||
-rw-r--r-- | tests/manual/dialogs/printdialogpanel.cpp | 3 | ||||
-rw-r--r-- | tests/manual/dialogs/wizardpanel.cpp | 2 |
5 files changed, 47 insertions, 10 deletions
diff --git a/tests/manual/dialogs/CMakeLists.txt b/tests/manual/dialogs/CMakeLists.txt new file mode 100644 index 0000000000..ef000529a5 --- /dev/null +++ b/tests/manual/dialogs/CMakeLists.txt @@ -0,0 +1,38 @@ +# Generated from dialogs.pro. + +##################################################################### +## dialogs Binary: +##################################################################### + +add_qt_manual_test(dialogs + GUI + SOURCES + colordialogpanel.cpp colordialogpanel.h + filedialogpanel.cpp filedialogpanel.h + fontdialogpanel.cpp fontdialogpanel.h + main.cpp + messageboxpanel.cpp messageboxpanel.h + utils.cpp utils.h + wizardpanel.cpp wizardpanel.h + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:dialogs.pro:<TRUE>: +# TEMPLATE = "app" + +## Scopes: +##################################################################### + +extend_target(dialogs CONDITION TARGET Qt::PrintSupport + PUBLIC_LIBRARIES + Qt::PrintSupport +) + +extend_target(dialogs CONDITION NOT (QT_FEATURE_printer EQUAL FALSE) + SOURCES + printdialogpanel.cpp printdialogpanel.h printdialogpanel.ui + ENABLE_AUTOGEN_TOOLS + uic +) diff --git a/tests/manual/dialogs/dialogs.pro b/tests/manual/dialogs/dialogs.pro index d765b8cf05..1beedc251e 100644 --- a/tests/manual/dialogs/dialogs.pro +++ b/tests/manual/dialogs/dialogs.pro @@ -1,9 +1,5 @@ -QT += core gui - -greaterThan(QT_MAJOR_VERSION, 4) { - QT += widgets - qtHaveModule(printsupport): QT += printsupport -} +QT += core gui widgets +qtHaveModule(printsupport): QT += printsupport TARGET = dialogs TEMPLATE = app diff --git a/tests/manual/dialogs/messageboxpanel.cpp b/tests/manual/dialogs/messageboxpanel.cpp index ef6731cd74..6a305523ea 100644 --- a/tests/manual/dialogs/messageboxpanel.cpp +++ b/tests/manual/dialogs/messageboxpanel.cpp @@ -39,6 +39,8 @@ #include <QLineEdit> #include <QLabel> #include <QCheckBox> +#include <QRegularExpressionValidator> +#include <QRegularExpression> MessageBoxPanel::MessageBoxPanel(QWidget *parent) : QWidget(parent) ,m_iconComboBox(new QComboBox) @@ -80,7 +82,7 @@ MessageBoxPanel::MessageBoxPanel(QWidget *parent) : QWidget(parent) // buttons mask optionsLayout->addWidget(new QLabel(QString::fromLatin1("Message box button mask (in hex)"))); - m_validator = new QRegExpValidator(QRegExp("0[xX]?[0-9a-fA-F]+"), this); + m_validator = new QRegularExpressionValidator(QRegularExpression("0[xX]?[0-9a-fA-F]+"), this); m_buttonsMask->setMaxLength(10); m_buttonsMask->setValidator(m_validator); m_buttonsMask->setText(QString::fromLatin1("0x00300400")); @@ -133,7 +135,7 @@ void MessageBoxPanel::setupMessageBox(QMessageBox &box) bool ok; QMessageBox::StandardButtons btns = (QMessageBox::StandardButtons) btnHexText.toUInt(&ok, 16); box.setStandardButtons((QMessageBox::StandardButtons) btns); - if (box.standardButtons() == (QMessageBox::StandardButtons) 0) + if (box.standardButtons() == QMessageBox::StandardButtons()) box.setStandardButtons(QMessageBox::Ok); // just to have something. #if QT_VERSION >= 0x050000 diff --git a/tests/manual/dialogs/printdialogpanel.cpp b/tests/manual/dialogs/printdialogpanel.cpp index b7447e3d64..dcd8b43bf3 100644 --- a/tests/manual/dialogs/printdialogpanel.cpp +++ b/tests/manual/dialogs/printdialogpanel.cpp @@ -190,7 +190,8 @@ QTextStream &operator<<(QTextStream &s, const QSizeF &size) QTextStream &operator<<(QTextStream &s, const QRectF &rect) { - s << rect.width() << 'x' << rect.height() << forcesign << rect.x() << rect.y() << noforcesign; + s << rect.width() << 'x' << rect.height() << Qt::forcesign << rect.x() << rect.y() + << Qt::noforcesign; return s; } diff --git a/tests/manual/dialogs/wizardpanel.cpp b/tests/manual/dialogs/wizardpanel.cpp index 0e5a18fe8c..8e8af5f556 100644 --- a/tests/manual/dialogs/wizardpanel.cpp +++ b/tests/manual/dialogs/wizardpanel.cpp @@ -198,7 +198,7 @@ void WizardOptionsControl::setWizardOptions(int options) class Wizard : public QWizard { Q_OBJECT public: - explicit Wizard(QWidget *parent = 0, Qt::WindowFlags flags = 0); + explicit Wizard(QWidget *parent = nullptr, Qt::WindowFlags flags = Qt::WindowFlags()); public slots: void changeWizardStyle(int newStyle); |