From 95d29c76f921168236e4eb501c3a4606bb7277d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Cie=C5=9Blak?= Date: Wed, 1 Mar 2023 13:46:56 +0100 Subject: [PATCH] fix(Storybook): Register StatusQ types for Storybook/qmlTests Closes: #9690 --- storybook/CMakeLists.txt | 2 +- storybook/qmlTests/main.cpp | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/storybook/CMakeLists.txt b/storybook/CMakeLists.txt index bddcf74240..30a86b0c0a 100644 --- a/storybook/CMakeLists.txt +++ b/storybook/CMakeLists.txt @@ -87,7 +87,7 @@ add_executable(QmlTests target_compile_definitions(QmlTests PRIVATE QML_IMPORT_ROOT="${CMAKE_CURRENT_LIST_DIR}" PRIVATE -DQUICK_TEST_SOURCE_DIR="${CMAKE_CURRENT_SOURCE_DIR}/qmlTests") -target_link_libraries(QmlTests PRIVATE Qt5::QuickTest Qt5::Qml) +target_link_libraries(QmlTests PRIVATE Qt5::QuickTest Qt5::Qml ${PROJECT_LIB}) add_test(NAME QmlTests COMMAND QmlTests) list(APPEND QML_DIRS "${CMAKE_SOURCE_DIR}/../ui/StatusQ/src") diff --git a/storybook/qmlTests/main.cpp b/storybook/qmlTests/main.cpp index cb833891d9..514ee45bd8 100644 --- a/storybook/qmlTests/main.cpp +++ b/storybook/qmlTests/main.cpp @@ -2,6 +2,8 @@ #include #include "src/TextUtils.h" +#include "StatusQ/typesregistration.h" + class Setup : public QObject { Q_OBJECT @@ -21,6 +23,8 @@ public slots: engine->addImportPath(path); qmlRegisterSingletonType("TextUtils", 1, 0, "TextUtils", &TextUtils::qmlInstance); + + registerStatusQTypes(); } };