diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-02-09 16:24:24 +0100 |
---|---|---|
committer | Alexey Edelev <alexey.edelev@qt.io> | 2022-02-11 21:54:44 +0100 |
commit | fdf5d11ff6f3f5034d7d7f7664f4cc76deb26ef5 (patch) | |
tree | 22e1c4b93f718930b8c40c2ab68f1b2bc790f97e /tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt | |
parent | 52492ff7209d2c91cbd0d549282459b58fbf3b0f (diff) |
CMake: Add BUILTIN_TESTDATA option to qt_internal_add_test
Multiple tests use qt_internal_add_resource that copies the
functionality that is already implemented inside the
qt_internal_add_test function. Simplify these test by replacing
the qt_internal_add_resource call with the new BUILTIN_TESTDATA
option.
Change-Id: I18475b817d6f87264f0de53817d6c26c5ccab4e2
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt')
-rw-r--r-- | tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt index 4e231cc6cc..cc19461d7a 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt +++ b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt @@ -4,17 +4,6 @@ ## tst_qfontdialog Test: ##################################################################### -qt_internal_add_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" @@ -27,13 +16,18 @@ set(testfonts_resource_files "../../../shared/resources/testfont.ttf" ) -qt_internal_add_resource(tst_qfontdialog "testfonts" - PREFIX - "/" - FILES - ${testfonts_resource_files} +qt_internal_add_test(tst_qfontdialog + SOURCES + tst_qfontdialog.cpp + PUBLIC_LIBRARIES + Qt::CorePrivate + Qt::Gui + Qt::GuiPrivate + Qt::Widgets + Qt::WidgetsPrivate + TESTDATA ${testfonts_resource_files} + BUILTIN_TESTDATA ) - ## Scopes: ##################################################################### |