diff options
Diffstat (limited to 'tests/auto/widgets/dialogs')
15 files changed, 261 insertions, 2 deletions
diff --git a/tests/auto/widgets/dialogs/CMakeLists.txt b/tests/auto/widgets/dialogs/CMakeLists.txt new file mode 100644 index 0000000000..508093e7ad --- /dev/null +++ b/tests/auto/widgets/dialogs/CMakeLists.txt @@ -0,0 +1,19 @@ +add_subdirectory(qcolordialog) +add_subdirectory(qdialog) +add_subdirectory(qerrormessage) +if (NOT WINRT) + add_subdirectory(qfiledialog) + add_subdirectory(qfiledialog2) + add_subdirectory(qmessagebox) +endif() +if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR NOT WIN32) + add_subdirectory(qfilesystemmodel) +endif() +add_subdirectory(qfontdialog) +add_subdirectory(qinputdialog) +add_subdirectory(qprogressdialog) +if (QT_FEATURE_private_tests) + add_subdirectory(qsidebar) +endif() +add_subdirectory(qwizard) + diff --git a/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt new file mode 100644 index 0000000000..81ffdeff90 --- /dev/null +++ b/tests/auto/widgets/dialogs/qcolordialog/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qcolordialog.pro. + +##################################################################### +## tst_qcolordialog Test: +##################################################################### + +add_qt_test(tst_qcolordialog + SOURCES + tst_qcolordialog.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets +) diff --git a/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt new file mode 100644 index 0000000000..2c003f6fb6 --- /dev/null +++ b/tests/auto/widgets/dialogs/qdialog/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qdialog.pro. + +##################################################################### +## tst_qdialog Test: +##################################################################### + +add_qt_test(tst_qdialog + SOURCES + tst_qdialog.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets +) diff --git a/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt new file mode 100644 index 0000000000..9463020c66 --- /dev/null +++ b/tests/auto/widgets/dialogs/qerrormessage/CMakeLists.txt @@ -0,0 +1,16 @@ +# Generated from qerrormessage.pro. + +##################################################################### +## tst_qerrormessage Test: +##################################################################### + +add_qt_test(tst_qerrormessage + SOURCES + tst_qerrormessage.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qerrormessage.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt new file mode 100644 index 0000000000..7b6d004776 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfiledialog/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qfiledialog.pro. + +##################################################################### +## tst_qfiledialog Test: +##################################################################### + +add_qt_test(tst_qfiledialog + SOURCES + tst_qfiledialog.cpp + DEFINES + SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt new file mode 100644 index 0000000000..2fb610a784 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfiledialog2/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qfiledialog2.pro. + +##################################################################### +## tst_qfiledialog2 Test: +##################################################################### + +add_qt_test(tst_qfiledialog2 + SOURCES + tst_qfiledialog2.cpp + DEFINES + SRCDIR=\\\"${CMAKE_CURRENT_SOURCE_DIR}/\\\" + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt new file mode 100644 index 0000000000..38c0547390 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/CMakeLists.txt @@ -0,0 +1,27 @@ +# Generated from qfilesystemmodel.pro. + +##################################################################### +## tst_qfilesystemmodel Test: +##################################################################### + +add_qt_test(tst_qfilesystemmodel + SOURCES + ../../../../shared/emulationdetector.h + tst_qfilesystemmodel.cpp + INCLUDE_DIRECTORIES + ../../../../shared + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::Widgets + Qt::WidgetsPrivate +) + +## Scopes: +##################################################################### + +#### Keys ignored in scope 2:.:.:qfilesystemmodel.pro:WIN32: +# testcase.timeout = "900" + +#### Keys ignored in scope 3:.:.:qfilesystemmodel.pro:APPLE_OSX: +# testcase.timeout = "900" diff --git a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp index 2c0b3f2bcb..63bf103725 100644 --- a/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp +++ b/tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp @@ -1071,7 +1071,7 @@ void tst_QFileSystemModel::roleNames() QVERIFY(roles.contains(role)); QFETCH(QByteArray, roleName); - QCOMPARE(roles.values(role).count(), 1); + QCOMPARE(roles.contains(role), true); QCOMPARE(roles.value(role), roleName); } diff --git a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt new file mode 100644 index 0000000000..af858c8946 --- /dev/null +++ b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt @@ -0,0 +1,39 @@ +# Generated from qfontdialog.pro. + +##################################################################### +## tst_qfontdialog Test: +##################################################################### + +add_qt_test(tst_qfontdialog + SOURCES + tst_qfontdialog.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets + Qt::WidgetsPrivate +) + +# Resources: +set_source_files_properties("../../../shared/resources/test.ttf" + PROPERTIES QT_RESOURCE_ALIAS "test.ttf" +) +set_source_files_properties("../../../shared/resources/testfont.ttf" + PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf" +) +set(testfonts_resource_files + "../../../shared/resources/test.ttf" + "../../../shared/resources/testfont.ttf" +) + +add_qt_resource(tst_qfontdialog "testfonts" + PREFIX + "/" + FILES + ${testfonts_resource_files} +) + + +## Scopes: +##################################################################### diff --git a/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt new file mode 100644 index 0000000000..7cd02a04c0 --- /dev/null +++ b/tests/auto/widgets/dialogs/qinputdialog/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qinputdialog.pro. + +##################################################################### +## tst_qinputdialog Test: +##################################################################### + +add_qt_test(tst_qinputdialog + SOURCES + tst_qinputdialog.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt new file mode 100644 index 0000000000..ae12c58ca2 --- /dev/null +++ b/tests/auto/widgets/dialogs/qmessagebox/CMakeLists.txt @@ -0,0 +1,18 @@ +# Generated from qmessagebox.pro. + +##################################################################### +## tst_qmessagebox Test: +##################################################################### + +add_qt_test(tst_qmessagebox + SOURCES + tst_qmessagebox.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets +) + +#### Keys ignored in scope 1:.:.:qmessagebox.pro:<TRUE>: +# TEMPLATE = "app" diff --git a/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt new file mode 100644 index 0000000000..2f20ff0d81 --- /dev/null +++ b/tests/auto/widgets/dialogs/qprogressdialog/CMakeLists.txt @@ -0,0 +1,13 @@ +# Generated from qprogressdialog.pro. + +##################################################################### +## tst_qprogressdialog Test: +##################################################################### + +add_qt_test(tst_qprogressdialog + SOURCES + tst_qprogressdialog.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets +) diff --git a/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt new file mode 100644 index 0000000000..d1e2a6686c --- /dev/null +++ b/tests/auto/widgets/dialogs/qsidebar/CMakeLists.txt @@ -0,0 +1,15 @@ +# Generated from qsidebar.pro. + +##################################################################### +## tst_qsidebar Test: +##################################################################### + +add_qt_test(tst_qsidebar + SOURCES + tst_qsidebar.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::Widgets + Qt::WidgetsPrivate +) diff --git a/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt new file mode 100644 index 0000000000..bbe7bddd9d --- /dev/null +++ b/tests/auto/widgets/dialogs/qwizard/CMakeLists.txt @@ -0,0 +1,30 @@ +# Generated from qwizard.pro. + +##################################################################### +## tst_qwizard Test: +##################################################################### + +add_qt_test(tst_qwizard + SOURCES + tst_qwizard.cpp + tst_qwizard_2.cpp + PUBLIC_LIBRARIES + Qt::Gui + Qt::Widgets +) + +# Resources: +set(qwizard_resource_files + "images/background.png" + "images/banner.png" + "images/logo.png" + "images/watermark.png" +) + +add_qt_resource(tst_qwizard "qwizard" + PREFIX + "/" + FILES + ${qwizard_resource_files} +) + diff --git a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp index 78616009a2..5b7ded0ecb 100644 --- a/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp +++ b/tests/auto/widgets/dialogs/qwizard/tst_qwizard.cpp @@ -96,8 +96,9 @@ private slots: void task248107_backButton(); void task255350_fieldObjectDestroyed(); void taskQTBUG_25691_fieldObjectDestroyed2(); +#if QT_CONFIG(shortcut) void taskQTBUG_46894_nextButtonShortcut(); - +#endif /* Things that could be added: @@ -2703,6 +2704,8 @@ void tst_QWizard::taskQTBUG_25691_fieldObjectDestroyed2() ::taskQTBUG_25691_fieldObjectDestroyed2(); } +#if QT_CONFIG(shortcut) + void tst_QWizard::taskQTBUG_46894_nextButtonShortcut() { for (int i = 0; i < QWizard::NStyles; ++i) { @@ -2717,5 +2720,7 @@ void tst_QWizard::taskQTBUG_46894_nextButtonShortcut() } } +#endif // QT_CONFIG(shortcut) + QTEST_MAIN(tst_QWizard) #include "tst_qwizard.moc" |