mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-24 13:32:22 +00:00
fix(Storybook): Register StatusQ types for Storybook/qmlTests
Closes: #9690
This commit is contained in:
parent
a0170a3fda
commit
95d29c76f9
@ -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")
|
||||
|
@ -2,6 +2,8 @@
|
||||
#include <QQmlEngine>
|
||||
#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>("TextUtils", 1, 0, "TextUtils", &TextUtils::qmlInstance);
|
||||
|
||||
registerStatusQTypes();
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user