Make it compiles when deprecated method are disabled. Add more find package
[kdepim.git] / blogilo / src / main.cpp
blob2362c0fe165c36f7ef5cb523eb1d71ca5681c7d9
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 "blogilo-version.h"
27 #include "constants.h"
28 #include "blogilomigrateapplication.h"
30 #include <QApplication>
31 #include <KCrash>
32 #include <KLocalizedString>
33 #include <kaboutdata.h>
34 #include <QCommandLineParser>
35 #include <kdbusservice.h>
36 #include <kdelibs4configmigrator.h>
38 int main(int argc, char *argv[])
40 QApplication app(argc, argv);
41 app.setAttribute(Qt::AA_UseHighDpiPixmaps, true);
42 app.setAttribute(Qt::AA_EnableHighDpiScaling);
44 BlogiloMigrateApplication migrate;
45 migrate.migrate();
47 QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("blogilo")));
48 KLocalizedString::setApplicationDomain("blogilo");
49 KAboutData about(QStringLiteral("blogilo"), i18n("Blogilo"), QStringLiteral(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 KCrash::initialize();
60 QCommandLineParser parser;
61 KAboutData::setApplicationData(about);
62 parser.addVersionOption();
63 parser.addHelpOption();
64 about.setupCommandLine(&parser);
65 parser.process(app);
66 about.processCommandLine(&parser);
68 global_init();
70 KDBusService service(KDBusService::Unique);
72 MainWindow *bilbo = new MainWindow;
74 bilbo->show();
75 int r = app.exec();
77 global_end();
78 return r;