SVN_SILENT made messages (.desktop file) - always resolve ours
[kdepim.git] / kalarm / main.cpp
blob72ad1c2b72382be0fae0fe17eb1eaebdb56c9e0f
1 /*
2 * main.cpp
3 * Program: kalarm
4 * Copyright © 2001-2016 by David Jarvie <djarvie@kde.org>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
21 #include "kalarm.h"
23 #include "kalarmapp.h"
24 #include "kalarmmigrateapplication.h"
25 #include "kalarm_debug.h"
27 #include <kalarmcal/version.h>
29 #include <KAboutData>
30 #include <KLocalizedString>
32 #include <QDir>
34 #include <stdlib.h>
36 #define PROGRAM_NAME "kalarm"
38 int main(int argc, char* argv[])
40 KAlarmMigrateApplication migrate;
41 migrate.migrate();
43 KAlarmApp* app = KAlarmApp::create(argc, argv);
44 QStringList args = app->arguments();
45 app->setAttribute(Qt::AA_UseHighDpiPixmaps, true);
46 #if QT_VERSION >= 0x050600
47 app->setAttribute(Qt::AA_EnableHighDpiScaling);
48 #endif
50 KLocalizedString::setApplicationDomain("kalarm");
51 KAboutData aboutData(QStringLiteral(PROGRAM_NAME), i18n("KAlarm"),
52 QStringLiteral(KALARM_VERSION),
53 i18n("Personal alarm message, command and email scheduler for KDE"),
54 KAboutLicense::GPL,
55 ki18n("Copyright 2001-%1, David Jarvie").subs(2016).toString(), QString(),
56 QStringLiteral("http://www.astrojar.org.uk/kalarm"));
57 aboutData.addAuthor(i18n("David Jarvie"), i18n("Author"), QStringLiteral("djarvie@kde.org"));
58 aboutData.setOrganizationDomain("kde.org");
59 KAboutData::setApplicationData(aboutData);
61 qCDebug(KALARM_LOG) << "initialising";
63 app->activate(args, QDir::currentPath());
64 app->restoreSession();
65 return app->exec();
68 namespace KAlarm
71 /******************************************************************************
72 * Return the current KAlarm version number.
74 int Version()
76 static int version = 0;
77 if (!version)
78 version = KAlarmCal::getVersionNumber(QStringLiteral(KALARM_VERSION));
79 return version;
82 } // namespace KAlarm
84 // vim: et sw=4: