Add AA_EnableHighDpiScaling
[kdepim.git] / blogilo / src / main.cpp
blob5a2c23d577b5a4846e1f5f60d2c4b073fcd6d6a8
1 /*
2 This file is part of Blogilo, A KDE Blogging Client
4 Copyright (C) 2008-2010 Mehrdad Momeny <mehrdad.momeny@gmail.com>
5 Copyright (C) 2008-2010 Golnaz Nilieh <g382nilieh@gmail.com>
7 This program is free software; you can redistribute it and/or
8 modify it under the terms of the GNU General Public License as
9 published by the Free Software Foundation; either version 2 of
10 the License or (at your option) version 3 or any later version
11 accepted by the membership of KDE e.V. (or its successor approved
12 by the membership of KDE e.V.), which shall act as a proxy
13 defined in Section 14 of version 3 of the license.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, see http://www.gnu.org/licenses/
24 #include "mainwindow.h"
25 #include "global.h"
26 #include "constants.h"
27 #include "blogilomigrateapplication.h"
29 #include <QApplication>
30 #include <KLocalizedString>
31 #include <kaboutdata.h>
32 #include <QCommandLineParser>
33 #include <kdbusservice.h>
34 #include <kdelibs4configmigrator.h>
36 int main(int argc, char *argv[])
38 QApplication app(argc, argv);
39 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
40 #if QT_VERSION >= 0x050600
41 app.setAttribute(Qt::AA_EnableHighDpiScaling);
42 #endif
44 BlogiloMigrateApplication migrate;
45 migrate.migrate();
47 QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("blogilo")));
48 KLocalizedString::setApplicationDomain("blogilo");
49 KAboutData about(QStringLiteral("blogilo"), i18n("Blogilo"), VERSION, i18n("A KDE Blogging Client"),
50 KAboutLicense::GPL_V2, i18n("Copyright © 2008–2016 Blogilo authors"));
51 about.addAuthor(i18n("Mehrdad Momeny"), i18n("Core Developer"), QStringLiteral("mehrdad.momeny@gmail.com"));
52 about.addAuthor(i18n("Golnaz Nilieh"), i18n("Core Developer"), QStringLiteral("g382nilieh@gmail.com"));
53 about.addAuthor(i18n("Laurent Montel"), i18n("Core Developer"), QStringLiteral("montel@kde.org"));
54 about.addCredit(i18n("Roozbeh Shafiee"), i18n("Icon designer"), QStringLiteral("roozbeh@roozbehonline.com"));
55 about.addCredit(i18n("Sajjad Baroodkoo"), i18n("Icon designer"), QStringLiteral("sajjad@graphit.ir"));
57 about.setTranslator(i18nc("NAME OF TRANSLATORS", "Your names"),
58 i18nc("EMAIL OF TRANSLATORS", "Your emails"));
59 QCommandLineParser parser;
60 KAboutData::setApplicationData(about);
61 parser.addVersionOption();
62 parser.addHelpOption();
63 about.setupCommandLine(&parser);
64 parser.process(app);
65 about.processCommandLine(&parser);
67 global_init();
69 KDBusService service(KDBusService::Unique);
71 MainWindow *bilbo = new MainWindow;
73 bilbo->show();
74 int r = app.exec();
76 global_end();
77 return r;