Fix Bug 358855 - message list column widths lost when program closed
[kdepim.git] / sieveeditor / main.cpp
blob40d65a670c93f59d64b0b2469dc4b60d96af34ac
1 /*
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
17 02110-1301, USA.
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"));
37 migrate.migrate();
39 KLocalizedString::setApplicationDomain("sieveeditor");
41 KAboutData aboutData(QStringLiteral("sieveeditor"),
42 i18n("KSieve Editor"),
43 QStringLiteral(KDEPIM_VERSION),
44 i18n("Sieve Editor"),
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);
56 parser.process(app);
57 aboutData.processCommandLine(&parser);
59 KDBusService service(KDBusService::Unique);
61 SieveEditorMainWindow *mw = new SieveEditorMainWindow();
62 mw->show();
63 int val = app.exec();
64 return val;