kdeconnect-kde/app/main.cpp

51 lines
1.9 KiB
C++
Raw Normal View History

2018-10-11 21:52:42 +01:00
/**
* Copyright (C) 2018 Aleix Pol Gonzalez <aleixpol@kde.org>
2015-06-13 00:30:38 +01:00
*
2018-10-11 21:52:42 +01:00
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License or (at your option) version 3 or any later version
* accepted by the membership of KDE e.V. (or its successor approved
* by the membership of KDE e.V.), which shall act as a proxy
* defined in Section 14 of version 3 of the license.
2015-06-13 00:30:38 +01:00
*
2018-10-11 21:52:42 +01:00
* This program is distributed in the hope that it will be useful,
2015-06-13 00:30:38 +01:00
* but WITHOUT ANY WARRANTY; without even the implied warranty of
2018-10-11 21:52:42 +01:00
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
2015-06-13 00:30:38 +01:00
*
2018-10-11 21:52:42 +01:00
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
2015-06-13 00:30:38 +01:00
*/
#include <QApplication>
#include <QQmlApplicationEngine>
#include <QCommandLineParser>
#include <KAboutData>
#include <KLocalizedString>
#include <KLocalizedContext>
#include <QtQml>
2015-06-13 00:30:38 +01:00
int main(int argc, char* argv[])
2015-06-13 00:30:38 +01:00
{
QApplication app(argc, argv);
2017-02-08 13:58:31 +00:00
KAboutData aboutData(QStringLiteral("kdeconnect.app"), i18n("KDE Connect App"), QStringLiteral("1.0"), i18n("KDE Connect App"), KAboutLicense::GPL, i18n("(c) 2015, Aleix Pol Gonzalez"));
aboutData.addAuthor(i18n("Aleix Pol Gonzalez"), i18n("Maintainer"), QStringLiteral("aleixpol@kde.org"));
2015-06-13 00:30:38 +01:00
KAboutData::setApplicationData(aboutData);
{
QCommandLineParser parser;
aboutData.setupCommandLine(&parser);
parser.addVersionOption();
parser.addHelpOption();
parser.process(app);
aboutData.processCommandLine(&parser);
}
2018-10-11 21:52:42 +01:00
QQmlApplicationEngine engine;
engine.rootContext()->setContextObject(new KLocalizedContext(&engine));
engine.load(QUrl(QStringLiteral("qrc:/qml/main.qml")));
2015-06-13 00:30:38 +01:00
return app.exec();
}