2 Copyright (C) 2013-2016 Montel Laurent <montel@kde.org>
4 This program is free software; you can redistribute it and/or
5 modify it under the terms of the GNU General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; see the file COPYING. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
19 #include "grantleeeditor-version.h"
20 #include "contacteditormainwindow.h"
21 #include <qapplication.h>
22 #include <kaboutdata.h>
23 #include <KDBusService>
24 #include <KLocalizedString>
25 #include <Kdelibs4ConfigMigrator>
26 #include <QCommandLineParser>
29 int main(int argc
, char **argv
)
31 QApplication
app(argc
, argv
);
32 app
.setAttribute(Qt::AA_UseHighDpiPixmaps
, true);
33 app
.setAttribute(Qt::AA_EnableHighDpiScaling
);
37 Kdelibs4ConfigMigrator
migrate(QStringLiteral("contactthemeeditor"));
38 migrate
.setConfigFiles(QStringList() << QStringLiteral("contactthemeeditorrc"));
39 migrate
.setUiFiles(QStringList() << QStringLiteral("contactthemeeditorui.rc"));
42 KLocalizedString::setApplicationDomain("contactthemeeditor");
43 KAboutData
aboutData(QStringLiteral("contactthemeeditor"),
44 i18n("Contact Theme Editor"),
45 QStringLiteral(GRANTLEEEDITOR_VERSION
),
46 i18n("Contact Theme Editor"),
47 KAboutLicense::GPL_V2
,
48 i18n("Copyright © 2013-2016 contactthemeeditor authors"));
49 aboutData
.addAuthor(i18n("Laurent Montel"), i18n("Maintainer"), QStringLiteral("montel@kde.org"));
50 QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kaddressbook")));
51 aboutData
.setOrganizationDomain(QByteArray("kde.org"));
52 aboutData
.setProductName(QByteArray("contactthemeeditor"));
54 KAboutData::setApplicationData(aboutData
);
56 QCommandLineParser parser
;
57 parser
.addVersionOption();
58 parser
.addHelpOption();
59 aboutData
.setupCommandLine(&parser
);
62 aboutData
.processCommandLine(&parser
);
66 ContactEditorMainWindow
*mw
= new ContactEditorMainWindow();
68 const int ret
= app
.exec();