AusweisApp2/test/qml/QmlTestRunner.cpp

31 lines
575 B
C++
Raw Normal View History

2017-12-20 14:54:05 +01:00
/*
2019-05-22 10:08:38 +02:00
* \copyright Copyright (c) 2016-2019 Governikus GmbH & Co. KG, Germany
2017-12-20 14:54:05 +01:00
*/
2019-09-30 17:22:19 +02:00
#include "LogHandler.h"
2019-01-03 15:06:22 +01:00
#include "ResourceLoader.h"
#include "UIPlugInQml.h"
2019-09-30 17:22:19 +02:00
#include <QLoggingCategory>
2017-12-20 14:54:05 +01:00
#include <QtGui/QtGui>
#include <QtQuickTest>
2019-01-03 15:06:22 +01:00
using namespace governikus;
2019-09-30 17:22:19 +02:00
Q_DECLARE_LOGGING_CATEGORY(init)
2019-01-03 15:06:22 +01:00
static void preRoutine()
{
2019-09-30 17:22:19 +02:00
auto& logHandler = *Env::getSingleton<LogHandler>();
qCDebug(init) << "LogHandler initialized" << logHandler;
2019-01-03 15:06:22 +01:00
ResourceLoader::getInstance().init();
UIPlugInQml::registerQmlTypes();
}
Q_COREAPP_STARTUP_FUNCTION(preRoutine)
2017-12-20 14:54:05 +01:00
QUICK_TEST_MAIN(qml)