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.
23 #include "kalarmapp.h"
24 #include "kalarmmigrateapplication.h"
25 #include "kalarm_debug.h"
27 #include <kalarmcal/version.h>
30 #include <KLocalizedString>
36 #define PROGRAM_NAME "kalarm"
38 int main(int argc
, char* argv
[])
40 KAlarmMigrateApplication 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
);
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"),
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();
71 /******************************************************************************
72 * Return the current KAlarm version number.
76 static int version
= 0;
78 version
= KAlarmCal::getVersionNumber(QStringLiteral(KALARM_VERSION
));