2021-03-29 12:27:37 +00:00
|
|
|
#ifndef QT_DEBUG
|
2021-03-04 16:26:51 +00:00
|
|
|
#include <QtQuick>
|
2021-03-29 12:27:37 +00:00
|
|
|
#endif
|
2021-03-04 16:26:51 +00:00
|
|
|
|
2021-02-16 17:01:17 +00:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QQmlApplicationEngine>
|
2020-10-08 01:00:08 +00:00
|
|
|
#include <QGuiApplication>
|
2021-02-16 17:01:17 +00:00
|
|
|
#include <QString>
|
|
|
|
|
2021-03-28 02:00:00 +00:00
|
|
|
#include <QtCore/qloggingcategory.h>
|
|
|
|
|
2020-10-25 18:58:02 +00:00
|
|
|
#include <JellyfinQt/jellyfin.h>
|
2020-10-08 01:00:08 +00:00
|
|
|
|
|
|
|
int main(int argc, char** argv) {
|
|
|
|
QGuiApplication app(argc, argv);
|
2021-02-16 17:01:17 +00:00
|
|
|
app.setApplicationDisplayName(QStringLiteral("Sailfin QtQuick"));
|
2021-09-04 20:23:54 +00:00
|
|
|
app.setApplicationName("Sailfin QtQuick");
|
|
|
|
app.setOrganizationDomain("nl.netsoj.chris");
|
|
|
|
app.setOrganizationName("Chris Josten");
|
2021-02-16 17:01:17 +00:00
|
|
|
|
2021-09-09 00:18:10 +00:00
|
|
|
qSetMessagePattern("[%{time yyyyMMdd h:mm:ss.zzz} %{if-debug}D%{endif}%{if-info}I%{endif}%{if-warning}W%{endif}%{if-critical}C%{endif}%{if-fatal}F%{endif}] %{if-category}<%{category}> %{endif} %{message}");
|
|
|
|
|
2021-03-28 02:00:00 +00:00
|
|
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
|
|
|
|
// Disable Qt nagging about "implicitly defined onFoo properties in connections are deprecated",
|
|
|
|
// as we cannot yet move towards a newer version.
|
|
|
|
QLoggingCategory::setFilterRules("qt.qml.connections=false");
|
|
|
|
#endif
|
|
|
|
|
2021-02-16 17:01:17 +00:00
|
|
|
qDebug() << "Creating engine";
|
|
|
|
QQmlApplicationEngine engine;
|
|
|
|
|
|
|
|
qDebug() << "Registering types";
|
2021-09-04 20:23:54 +00:00
|
|
|
Jellyfin::JellyfinPlugin plugin;
|
|
|
|
plugin.registerTypes("nl.netsoj.chris.Jellyfin");
|
2020-10-08 01:00:08 +00:00
|
|
|
|
2021-02-16 17:01:17 +00:00
|
|
|
qDebug() << "Loading file";
|
|
|
|
engine.load(QStringLiteral("qrc:/qml/main.qml"));
|
|
|
|
qDebug() << "Entering event loop";
|
2020-10-08 01:00:08 +00:00
|
|
|
return app.exec();
|
|
|
|
}
|