Commit d5856546 authored by David Jarvie's avatar David Jarvie
Browse files

Add suffix to version number, and tidy version related code

parent d06e79c5
......@@ -5,7 +5,6 @@ set(RELEASE_SERVICE_VERSION "20.07.40")
set(KALARM_VERSION "3.0.0")
project(kalarm VERSION ${KALARM_VERSION})
set(KALARM_FULL_VERSION "${KALARM_VERSION} (KDE Apps ${RELEASE_SERVICE_VERSION})")
set(KF5_MIN_VERSION "5.70.0")
......
......@@ -8,7 +8,6 @@
#ifndef KALARM_VERSION_STRING_H
#define KALARM_VERSION_STRING_H
#define KALARM_FULL_VERSION "@KALARM_FULL_VERSION@"
#define RELEASE_SERVICE_VERSION "@RELEASE_SERVICE_VERSION@"
#endif
/*
* kalarm.h - global header file
* Program: kalarm
* Copyright © 2001-2019 by David Jarvie <djarvie@kde.org>
* Copyright © 2001-2020 David Jarvie <djarvie@kde.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
......@@ -21,17 +21,17 @@
#ifndef KALARM_H
#define KALARM_H
#define VERSION_SUFFIX ""
#define KALARM_VERSION VERSION VERSION_SUFFIX
#include "config-kalarm.h"
#if FILE_RESOURCES
#define VERSION_SUFFIX "F"
#else
#define VERSION_SUFFIX "A"
#endif
#define KALARM_VERSION VERSION VERSION_SUFFIX
#define KALARM_FULL_VERSION KALARM_VERSION " (KDE Apps " RELEASE_SERVICE_VERSION ")"
#define KALARM_NAME "KAlarm"
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application
namespace KAlarm
{
/** Return current KAlarm version number as an integer. */
int Version();
}
#endif // KALARM_H
......@@ -23,8 +23,6 @@
#include "kalarmapp.h"
#include "kalarm_debug.h"
#include <KAlarmCal/Version>
#include <KAboutData>
#include <KLocalizedString>
#include <KDBusService>
......@@ -55,7 +53,7 @@ int main(int argc, char* argv[])
QStringLiteral(KALARM_FULL_VERSION),
i18n("Personal alarm message, command and email scheduler by KDE"),
KAboutLicense::GPL,
ki18n("Copyright 2001-%1, David Jarvie").subs(2020).toString(), QString(),
ki18n("Copyright 2001-%1, David Jarvie").subs(QStringLiteral("2020")).toString(), QString(),
QStringLiteral("http://www.astrojar.org.uk/kalarm"));
aboutData.addAuthor(i18n("David Jarvie"), i18n("Author"), QStringLiteral("djarvie@kde.org"));
aboutData.setOrganizationDomain("kde.org");
......@@ -85,20 +83,4 @@ int main(int argc, char* argv[])
return app->exec();
}
namespace KAlarm
{
/******************************************************************************
* Return the current KAlarm version number.
*/
int Version()
{
static int version = 0;
if (!version)
version = KAlarmCal::getVersionNumber(QStringLiteral(KALARM_VERSION));
return version;
}
} // namespace KAlarm
// vim: et sw=4:
......@@ -21,8 +21,6 @@
#ifndef TEMPLATELISTVIEW_H
#define TEMPLATELISTVIEW_H
#include "kalarm.h"
#include "eventlistview.h"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment