2 Copyright (c) 2013-2015 Montel Laurent <montel@kde.org>
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #include "kdepim-version.h"
22 #include "sieveeditormainwindow.h"
23 #include <kaboutdata.h>
24 #include <KLocalizedString>
25 #include <Kdelibs4ConfigMigrator>
26 #include <QApplication>
27 #include <KDBusService>
28 #include <QCommandLineParser>
30 int main(int argc
, char **argv
)
32 QApplication
app(argc
, argv
);
33 app
.setAttribute(Qt::AA_UseHighDpiPixmaps
, true);
34 Kdelibs4ConfigMigrator
migrate(QStringLiteral("sieveeditor"));
35 migrate
.setConfigFiles(QStringList() << QStringLiteral("sieveeditorrc") << QStringLiteral("sievetemplaterc"));
36 migrate
.setUiFiles(QStringList() << QStringLiteral("sieveeditorui.rc"));
39 KLocalizedString::setApplicationDomain("sieveeditor");
41 KAboutData
aboutData(QStringLiteral("sieveeditor"),
42 i18n("KSieve Editor"),
43 QStringLiteral(KDEPIM_VERSION
),
45 KAboutLicense::GPL_V2
,
46 i18n("Copyright © 2013-2015 sieveeditor authors"));
47 aboutData
.addAuthor(i18n("Laurent Montel"), i18n("Maintainer"), QStringLiteral("montel@kde.org"));
49 QApplication::setWindowIcon(QIcon::fromTheme(QStringLiteral("kmail")));
50 KAboutData::setApplicationData(aboutData
);
52 QCommandLineParser parser
;
53 parser
.addVersionOption();
54 parser
.addHelpOption();
55 aboutData
.setupCommandLine(&parser
);
57 aboutData
.processCommandLine(&parser
);
59 KDBusService
service(KDBusService::Unique
);
61 SieveEditorMainWindow
*mw
= new SieveEditorMainWindow();