Commit 2e830894 authored by Nicolas Fella's avatar Nicolas Fella
Browse files

[kcms/touchpad] Cleanup version handling

Instead of defining a TOUCHPAD_KCM_VERSION and adding a header for it
use PROJECT_VERSION directly and let ECM generate a header.

Remove the version from applet and dataengine desktop files. For the
applet it is broken anyway since the file is never configured. Since
apparently nobody noticed until now it makes me question how useful the
version info is, especially given it's the same as the Plasma version.
parent 95d4252b
......@@ -23,6 +23,7 @@ include(ECMMarkAsTest)
include(ECMMarkNonGuiExecutable)
include(ECMOptionalAddSubdirectory)
include(ECMQtDeclareLoggingCategory)
include(ECMSetupVersion)
include(FeatureSummary)
include(CheckIncludeFiles)
include(KDEClangFormat)
......@@ -193,6 +194,8 @@ pkg_check_modules(IBUS "ibus-1.0>=1.5.0" IMPORTED_TARGET)
pkg_check_modules(GOBJECT gobject-2.0 IMPORTED_TARGET)
pkg_check_modules(SCIM scim IMPORTED_TARGET)
ecm_setup_version(${PROJECT_VERSION} VARIABLE_PREFIX PLASMA VERSION_HEADER plasma_version.h)
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
configure_file(config-workspace.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-workspace.h)
......
# KI18N Translation Domain for this library
add_definitions(-DTRANSLATION_DOMAIN=\"kcm_touchpad\")
set(TOUCHPAD_KCM_VERSION ${PROJECT_VERSION})
add_subdirectory(icon)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/version.h.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/version.h"
)
SET(SRCS
plugins.cpp
touchpadbackend.cpp
......
......@@ -3,10 +3,6 @@ add_definitions(-DTRANSLATION_DOMAIN="plasma_applet_touchpad")
plasma_install_package(qml touchpad)
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/dataengine.desktop"
"${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop"
)
set(Applet_SRCS
touchpadengine.cpp
touchpadservice.cpp
......@@ -26,7 +22,7 @@ target_link_libraries(plasma_engine_touchpad
Qt::DBus
)
kcoreaddons_desktop_to_json(plasma_engine_touchpad ${CMAKE_CURRENT_BINARY_DIR}/plasma-dataengine-touchpad.desktop SERVICE_TYPES kcmodule.desktop)
kcoreaddons_desktop_to_json(plasma_engine_touchpad plasma-dataengine-touchpad.desktop SERVICE_TYPES kcmodule.desktop)
install(TARGETS plasma_engine_touchpad
DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/dataengine
......
......@@ -52,7 +52,6 @@ X-KDE-PluginInfo-Name=touchpad
X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Author=Alexander Mezin
X-KDE-PluginInfo-Email=mezin.alexander@gmail.com
X-KDE-PluginInfo-Version=@TOUCHPAD_KCM_VERSION@
X-KDE-PluginInfo-Website=https://projects.kde.org/projects/playground/utils/kcm-touchpad/
X-KDE-PluginInfo-License=GPL-2.0+
X-KDE-PluginInfo-EnabledByDefault=true
......@@ -151,7 +151,6 @@ X-KDE-PluginInfo-Category=System Information
X-KDE-PluginInfo-Email=mezin.alexander@gmail.com
X-KDE-PluginInfo-License=GPL-2.0+
X-KDE-PluginInfo-Name=touchpad
X-KDE-PluginInfo-Version=@TOUCHPAD_KCM_VERSION@
X-KDE-PluginInfo-Website=https://projects.kde.org/projects/playground/utils/kcm-touchpad/
X-KDE-ServiceTypes=Plasma/Applet
X-Plasma-API=declarativeappletscript
......
......@@ -33,14 +33,14 @@
#include "../touchpadconfigcontainer.h"
#include "touchpadbackend.h"
#include "version.h"
#include "plasma_version.h"
TouchpadConfigLibinput::TouchpadConfigLibinput(TouchpadConfigContainer *parent, TouchpadBackend *backend, const QVariantList & /*args*/)
: TouchpadConfigPlugin(parent, backend)
{
KAboutData *data = new KAboutData(QStringLiteral("kcm_touchpad"),
i18n("Touchpad KCM"),
TOUCHPAD_KCM_VERSION,
PLASMA_VERSION_STRING,
i18n("System Settings module for managing your touchpad"),
KAboutLicense::GPL_V2,
i18n("Copyright © 2016 Roman Gilg"),
......
......@@ -39,7 +39,7 @@
#include "touchpadbackend.h"
#include "touchpadinterface.h"
#include "version.h"
#include "plasma_version.h"
void touchpadApplySavedConfig()
{
......@@ -103,7 +103,7 @@ TouchpadConfigXlib::TouchpadConfigXlib(TouchpadConfigContainer *parent, Touchpad
{
KAboutData *data = new KAboutData(QStringLiteral("kcm_touchpad"),
i18n("Touchpad KCM"),
TOUCHPAD_KCM_VERSION,
PLASMA_VERSION_STRING,
i18n("System Settings module, daemon and Plasma applet for managing your touchpad"),
KAboutLicense::GPL_V2,
i18n("Copyright © 2013 Alexander Mezin"),
......
#ifndef VERSION_H
#define VERSION_H
#define TOUCHPAD_KCM_VERSION "@TOUCHPAD_KCM_VERSION@"
#endif // VERSION_H
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