Commit 80a2a418 authored by David Jarvie's avatar David Jarvie
Browse files

Rationalise use of product ID macros

parent 0c4470d2
Pipeline #163821 passed with stage
in 3 minutes and 9 seconds
/*
* kalarm.h - global header file
* Program: kalarm
* SPDX-FileCopyrightText: 2001-2020 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-2022 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#pragma once
#include "config-kalarm.h"
#define VERSION_SUFFIX ""
#define KALARM_VERSION VERSION VERSION_SUFFIX
#define KALARM_FULL_VERSION KALARM_VERSION " (KDE Apps " RELEASE_SERVICE_VERSION ")"
#define VERSION_SUFFIX ""
#define KALARM_VERSION VERSION VERSION_SUFFIX
#define KALARM_NAME "KAlarm"
#define KALARM_NAME "KAlarm" // untranslated KAlarm display name
#define KALARM_DBUS_SERVICE "org.kde.kalarm" // D-Bus service name of KAlarm application
......@@ -15,6 +15,7 @@
#include "kalarmcal_debug.h"
#include <KCalendarCore/Alarm>
#include <KCalendarCore/CalFormat>
#include <KCalendarCore/MemoryCalendar>
#include <KLocalizedString>
......@@ -56,6 +57,7 @@ const QByteArray APPNAME("KALARM");
void setProductId(const QByteArray& progName, const QByteArray& progVersion)
{
Private::mIcalProductId = QByteArray("-//K Desktop Environment//NONSGML " + progName + " " + progVersion + "//EN");
KCalendarCore::CalFormat::setApplication(QString::fromLatin1(progName), QString::fromLatin1(Private::mIcalProductId));
}
QByteArray icalProductId()
......
......@@ -40,7 +40,7 @@ int main(int argc, char* argv[])
KLocalizedString::setApplicationDomain("kalarm");
KAboutData aboutData(QStringLiteral(PROGRAM_NAME), i18n(KALARM_NAME),
QStringLiteral(KALARM_FULL_VERSION),
QStringLiteral(KALARM_VERSION " (KDE Gear " RELEASE_SERVICE_VERSION ")"),
i18n("Personal alarm message, command and email scheduler by KDE"),
KAboutLicense::GPL,
ki18n("Copyright © 2001-%1, David Jarvie").subs(QStringLiteral("2022")).toString(), QString());
......
/*
* resourcescalendar.cpp - KAlarm calendar resources access
* Program: kalarm
* SPDX-FileCopyrightText: 2001-2021 David Jarvie <djarvie@kde.org>
* SPDX-FileCopyrightText: 2001-2022 David Jarvie <djarvie@kde.org>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
......@@ -36,7 +36,6 @@ void ResourcesCalendar::initialise(const QByteArray& appName, const QByteArray&
if (!mInstance)
{
KACalendar::setProductId(appName, appVersion);
KCalendarCore::CalFormat::setApplication(QString::fromLatin1(appName), QString::fromLatin1(KACalendar::icalProductId()));
mInstance = new ResourcesCalendar();
}
}
......
Supports Markdown
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