Commit 972eb26d authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

Add KAboutData

Ensures correct app info is set, for example when crashing

Differential Revision: https://phabricator.kde.org/D19162
parent a1a422c9
......@@ -10,6 +10,7 @@ set(KF5_MIN_VERSION "5.56.0")
find_package(ECM ${KF5_MIN_VERSION} REQUIRED NO_MODULE)
set(CMAKE_MODULE_PATH ${ECM_MODULE_PATH} ${ECM_KDE_MODULE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
include(ECMSetupVersion)
include(FeatureSummary)
include(KDEInstallDirs)
include(KDECMakeSettings)
......
......@@ -10,6 +10,10 @@ set(POWERDEVIL_CORE_VERSION_MINOR 0)
set(POWERDEVIL_CORE_VERSION_MICRO 0)
set(POWERDEVIL_CORE_VERSION_STRING ${POWERDEVIL_CORE_VERSION_MAJOR}.${POWERDEVIL_CORE_VERSION_MINOR}.${POWERDEVIL_CORE_VERSION_MICRO})
ecm_setup_version(${POWERDEVIL_CORE_VERSION_STRING} VARIABLE_PREFIX POWERDEVIL
VERSION_HEADER "${CMAKE_CURRENT_BINARY_DIR}/powerdevil_version.h"
)
# Add bundled actions
set(powerdevil_bundled_actions_SRCS
powerdevil_debug.cpp
......
......@@ -25,6 +25,7 @@
#include "powerdevilcore.h"
#include "powerdevil_debug.h"
#include "powerdevil_version.h"
#include <QTimer>
#include <QDBusConnection>
......@@ -59,17 +60,20 @@ PowerDevilApp::~PowerDevilApp()
void PowerDevilApp::init()
{
// KGlobal::insertCatalog("powerdevil");
// KAboutData aboutData("powerdevil", "powerdevil", ki18n("KDE Power Management System"),
// PROJECT_VERSION, ki18n("KDE Power Management System is PowerDevil, an "
// "advanced, modular and lightweight Power Management "
// "daemon"),
// KAboutData::License_GPL, ki18n("(c) 2010 MetalWorkers Co."),
// KLocalizedString(), "http://www.kde.org");
//
// aboutData.addAuthor(ki18n( "Dario Freddi" ), ki18n("Maintainer"), "drf@kde.org",
// "http://drfav.wordpress.com");
KLocalizedString::setApplicationDomain("powerdevil");
KAboutData aboutData(QStringLiteral("powerdevil"), i18n("KDE Power Management System"), QStringLiteral(POWERDEVIL_VERSION_STRING),
i18nc("@title", "PowerDevil, an advanced, modular and lightweight power management daemon"),
KAboutLicense::GPL,
i18nc("@info:credit", "(c) 2015-2019 Kai Uwe Broulik"));
aboutData.addAuthor(i18nc("@info:credit", "Kai Uwe Broulik"),
i18nc("@info:credit", "Maintainer"),
QStringLiteral("kde@privat.broulik.de"));
aboutData.addAuthor(i18nc("@info:credit", "Dario Freddi"),
i18nc("@info:credit", "Previous maintainer"),
QStringLiteral("drf@kde.org"));
KAboutData::setApplicationData(aboutData);
if (QDBusConnection::systemBus().interface()->isServiceRegistered(QLatin1String("org.freedesktop.PowerManagement")) ||
QDBusConnection::systemBus().interface()->isServiceRegistered(QLatin1String("com.novell.powersave")) ||
......
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