Lukáš Tinkl a3c9012f4a feat: [UI - Swap] Create swap input component
- new panel created: `SwapInputPanel`
- some cleanups to the needed stores
- created a SB page demonstrating the use of 2 panels and the
`SwapExchangeButton`
- created QML tests

Fixes #14781
2024-06-06 11:13:18 +02:00

39 lines
1.1 KiB
C++

#include <QQmlEngine>
#include <QtQuickTest>
#include "src/TextUtils.h"
class Setup : public QObject
{
Q_OBJECT
public slots:
void qmlEngineAvailable(QQmlEngine *engine) {
// custom code that needs QQmlEngine, register QML types, add import paths,...
QGuiApplication::setOrganizationName(QStringLiteral("Status"));
QGuiApplication::setOrganizationDomain(QStringLiteral("status.im"));
const QStringList additionalImportPaths {
STATUSQ_MODULE_IMPORT_PATH,
QML_IMPORT_ROOT + QStringLiteral("/../ui/app"),
QML_IMPORT_ROOT + QStringLiteral("/../ui/imports"),
QML_IMPORT_ROOT + QStringLiteral("/stubs"),
QML_IMPORT_ROOT + QStringLiteral("/src")
};
for (const auto& path : additionalImportPaths)
engine->addImportPath(path);
qmlRegisterSingletonType<TextUtils>("TextUtils", 1, 0, "TextUtils", &TextUtils::qmlInstance);
QStandardPaths::setTestModeEnabled(true);
QLocale::setDefault(QLocale(QLocale::English, QLocale::UnitedStates));
}
};
QUICK_TEST_MAIN_WITH_SETUP(QmlTests, Setup)
#include "main.moc"