UTPassMirror/main.cpp

32 lines
681 B
C++
Raw Normal View History

2019-03-13 18:38:12 +00:00
#include <QGuiApplication>
#include <QCoreApplication>
#include <QUrl>
#include <QString>
#include <QQuickView>
2019-03-15 16:53:40 +00:00
#include <QtQml>
2019-03-13 18:38:12 +00:00
2019-03-23 19:53:02 +00:00
#ifdef TEST_RUNNER
#include <QtQuickTest/quicktest.h>
#endif
2019-03-13 18:38:12 +00:00
int main(int argc, char *argv[])
{
2019-03-23 19:53:02 +00:00
#ifndef TEST_RUNNER
2019-03-13 18:38:12 +00:00
qDebug() << "Starting app from main.cpp";
2019-03-23 19:53:02 +00:00
new QGuiApplication(argc, argv);
2019-03-13 18:38:12 +00:00
2019-03-23 19:53:02 +00:00
QGuiApplication::setApplicationName("utpass.qrouland");
2019-03-13 18:38:12 +00:00
auto *view = new QQuickView();
view->setSource(QUrl(QStringLiteral("qml/Main.qml")));
view->show();
2019-03-23 19:53:02 +00:00
2019-03-13 18:38:12 +00:00
return QGuiApplication::exec();
2019-03-23 19:53:02 +00:00
#else
qDebug() << "Starting tests from main.cpp";
return quick_test_main(argc, argv, "Tests", "tests/unit");
#endif
2019-03-13 18:38:12 +00:00
}