2020-09-27 18:38:33 +00:00
|
|
|
/*
|
|
|
|
Sailfin: a Jellyfin client written using Qt
|
|
|
|
Copyright (C) 2020 Chris Josten
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
This library is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
Lesser General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU Lesser General Public
|
|
|
|
License along with this library; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|
|
|
*/
|
|
|
|
|
2020-09-15 14:53:13 +00:00
|
|
|
#ifdef QT_QML_DEBUG
|
|
|
|
#include <QtQuick>
|
|
|
|
#endif
|
|
|
|
|
2021-02-20 22:20:39 +00:00
|
|
|
#include <QQmlDebuggingEnabler>
|
2021-02-17 01:28:37 +00:00
|
|
|
#include <QCommandLineOption>
|
|
|
|
#include <QCommandLineParser>
|
2021-01-14 16:43:42 +00:00
|
|
|
#include <QDebug>
|
2020-09-15 14:53:13 +00:00
|
|
|
#include <QJSEngine>
|
|
|
|
#include <QGuiApplication>
|
|
|
|
#include <QQuickView>
|
|
|
|
#include <QQmlEngine>
|
2021-02-17 01:28:37 +00:00
|
|
|
#include <QString>
|
2020-09-15 14:53:13 +00:00
|
|
|
|
|
|
|
#include <sailfishapp.h>
|
|
|
|
|
|
|
|
int main(int argc, char *argv[]) {
|
2021-02-21 04:02:05 +00:00
|
|
|
//QQmlDebuggingEnabler enabler;
|
|
|
|
//enabler.startTcpDebugServer(9999);
|
2020-09-15 14:53:13 +00:00
|
|
|
// SailfishApp::main() will display "qml/harbour-sailfin.qml", if you need more
|
|
|
|
// control over initialization, you can use:
|
|
|
|
//
|
|
|
|
// - SailfishApp::application(int, char *[]) to get the QGuiApplication *
|
|
|
|
// - SailfishApp::createView() to get a new QQuickView * instance
|
|
|
|
// - SailfishApp::pathTo(QString) to get a QUrl to a resource file
|
|
|
|
// - SailfishApp::pathToMainQml() to get a QUrl to the main QML file
|
|
|
|
//
|
|
|
|
// To display the view, call "show()" (will show fullscreen on device).
|
|
|
|
QGuiApplication *app = SailfishApp::application(argc, argv);
|
2021-02-17 01:28:37 +00:00
|
|
|
app->setOrganizationName("nl.netsoj.chris");
|
|
|
|
app->setOrganizationDomain("nl.netsoj.chris");
|
|
|
|
app->setApplicationName("Sailfin");
|
|
|
|
//: Application display name
|
|
|
|
app->setApplicationDisplayName(QObject::tr("Sailfin"));
|
|
|
|
|
|
|
|
QCommandLineParser cmdParser;
|
|
|
|
cmdParser.addHelpOption();
|
|
|
|
cmdParser.addVersionOption();
|
|
|
|
|
2020-09-15 14:53:13 +00:00
|
|
|
QQuickView *view = SailfishApp::createView();
|
|
|
|
view->setSource(SailfishApp::pathToMainQml());
|
|
|
|
view->show();
|
|
|
|
|
|
|
|
return app->exec();
|
|
|
|
}
|