diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dceb163fb..f203255a38 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -383,11 +383,6 @@ option(KWIN_BUILD_TABBOX "Enable building of KWin Tabbox functionality" ON) cmake_dependent_option(KWIN_BUILD_ACTIVITIES "Enable building of KWin with kactivities support" ON "KF5Activities_FOUND" OFF) cmake_dependent_option(KWIN_BUILD_RUNNERS "Enable building of KWin with krunner support" ON "KF5Runner_FOUND" OFF) -# Binary name of KWin -set(KWIN_NAME "kwin") -set(KWIN_INTERNAL_NAME_X11 "kwin_x11") -set(KWIN_INTERNAL_NAME_WAYLAND "kwin_wayland") - set(HAVE_EPOXY_GLX ${epoxy_HAS_GLX}) # for kwin internal things diff --git a/autotests/integration/globalshortcuts_test.cpp b/autotests/integration/globalshortcuts_test.cpp index 5377b87141..f22094fa64 100644 --- a/autotests/integration/globalshortcuts_test.cpp +++ b/autotests/integration/globalshortcuts_test.cpp @@ -138,7 +138,7 @@ void GlobalShortcutsTest::testNonLatinLayout() const QKeySequence seq(qtModifier + qtKey); std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName("globalshortcuts-test-non-latin-layout"); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); @@ -162,7 +162,7 @@ void GlobalShortcutsTest::testConsumedShift() // this test verifies that a shortcut with a consumed shift modifier triggers // create the action std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(QStringLiteral("globalshortcuts-test-consumed-shift")); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::Key_Percent}, KGlobalAccel::NoAutoloading); @@ -185,7 +185,7 @@ void GlobalShortcutsTest::testRepeatedTrigger() // in addition pressing another key should stop triggering the shortcut std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(QStringLiteral("globalshortcuts-test-consumed-shift")); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::Key_Percent}, KGlobalAccel::NoAutoloading); @@ -244,7 +244,7 @@ void GlobalShortcutsTest::testMetaShiftW() { // BUG 370341 std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(QStringLiteral("globalshortcuts-test-meta-shift-w")); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::META | Qt::SHIFT | Qt::Key_W}, KGlobalAccel::NoAutoloading); @@ -268,7 +268,7 @@ void GlobalShortcutsTest::testComponseKey() { // BUG 390110 std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(QStringLiteral("globalshortcuts-accent")); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::NoModifier}, KGlobalAccel::NoAutoloading); diff --git a/autotests/integration/lockscreen.cpp b/autotests/integration/lockscreen.cpp index 7b4a2be107..d128746b57 100644 --- a/autotests/integration/lockscreen.cpp +++ b/autotests/integration/lockscreen.cpp @@ -679,7 +679,7 @@ void LockScreenTest::testKeyboardShortcut() using namespace KWayland::Client; std::unique_ptr action(new QAction(nullptr)); QSignalSpy actionSpy(action.get(), &QAction::triggered); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName("LockScreenTest::testKeyboardShortcut"); KGlobalAccel::self()->setDefaultShortcut(action.get(), QList{Qt::CTRL | Qt::META | Qt::ALT | Qt::Key_Space}); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::CTRL | Qt::META | Qt::ALT | Qt::Key_Space}, diff --git a/autotests/integration/no_global_shortcuts_test.cpp b/autotests/integration/no_global_shortcuts_test.cpp index e3f36fa990..bd13044358 100644 --- a/autotests/integration/no_global_shortcuts_test.cpp +++ b/autotests/integration/no_global_shortcuts_test.cpp @@ -171,7 +171,7 @@ void NoGlobalShortcutsTest::testTrigger() void NoGlobalShortcutsTest::testKGlobalAccel() { std::unique_ptr action(new QAction(nullptr)); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(QStringLiteral("globalshortcuts-test-meta-shift-w")); QSignalSpy triggeredSpy(action.get(), &QAction::triggered); KGlobalAccel::self()->setShortcut(action.get(), QList{Qt::META | Qt::SHIFT | Qt::Key_W}, KGlobalAccel::NoAutoloading); diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index b33b10a399..2c47c406d7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -339,9 +339,9 @@ if (PipeWire_FOUND) target_link_libraries(kwin_wayland KWinScreencastPlugin) endif() -install(FILES kwin.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} RENAME ${KWIN_NAME}.kcfg) +install(FILES kwin.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) if (KWIN_BUILD_NOTIFICATIONS) - install(FILES kwin.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR} RENAME ${KWIN_NAME}.notifyrc) + install(FILES kwin.notifyrc DESTINATION ${KDE_INSTALL_KNOTIFYRCDIR}) endif() install( FILES diff --git a/src/config-kwin.h.cmake b/src/config-kwin.h.cmake index a99a195fd7..26609d4f94 100644 --- a/src/config-kwin.h.cmake +++ b/src/config-kwin.h.cmake @@ -6,9 +6,7 @@ #cmakedefine01 KWIN_BUILD_SCREENLOCKER #cmakedefine01 KWIN_BUILD_TABBOX #cmakedefine01 KWIN_BUILD_ACTIVITIES -#define KWIN_NAME "${KWIN_NAME}" -#define KWIN_INTERNAL_NAME_X11 "${KWIN_INTERNAL_NAME_X11}" -#define KWIN_CONFIG "${KWIN_NAME}rc" +#define KWIN_CONFIG "kwinrc" #define KWIN_VERSION_STRING "${PROJECT_VERSION}" #define XCB_VERSION_STRING "${XCB_VERSION}" #define KWIN_KILLER_BIN "${CMAKE_INSTALL_FULL_LIBEXECDIR}/kwin_killer_helper" diff --git a/src/effects.cpp b/src/effects.cpp index 39d38ac2e6..9dfb0040f8 100644 --- a/src/effects.cpp +++ b/src/effects.cpp @@ -2332,7 +2332,7 @@ EffectFrameQuickScene::EffectFrameQuickScene(EffectFrameStyle style, bool static break; } - const QString defaultPath = QStringLiteral(KWIN_NAME "/frames/plasma/frame_%1.qml").arg(name); + const QString defaultPath = QStringLiteral("kwin/frames/plasma/frame_%1.qml").arg(name); // TODO read from kwinApp()->config() "QmlPath" like Outline/OnScreenNotification // *if* someone really needs this to be configurable. const QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, defaultPath); diff --git a/src/effects/CMakeLists.txt b/src/effects/CMakeLists.txt index e88fb78105..6c94003704 100644 --- a/src/effects/CMakeLists.txt +++ b/src/effects/CMakeLists.txt @@ -34,7 +34,7 @@ macro(KWIN4_ADD_EFFECT_MODULE name) kcoreaddons_add_plugin(${name} STATIC SOURCES ${ARGN} INSTALL_NAMESPACE "kwin/effects/plugins") set_property(TARGET ${name} PROPERTY POSITION_INDEPENDENT_CODE ON) kwin_strip_builtin_effect_metadata(${name} metadata.json) - install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/builtin-effects/${name}/) + install(FILES metadata.json DESTINATION ${KDE_INSTALL_DATADIR}/kwin/builtin-effects/${name}/) endmacro() # Install the KWin/Effect service type diff --git a/src/input.cpp b/src/input.cpp index e4d550122c..46fb9c2388 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -1960,7 +1960,7 @@ public: connect(input(), &InputRedirection::deviceRemoved, this, &TabletInputFilter::removeDevice); auto tabletNextOutput = new QAction(this); - tabletNextOutput->setProperty("componentName", QStringLiteral(KWIN_NAME)); + tabletNextOutput->setProperty("componentName", QStringLiteral("kwin")); tabletNextOutput->setText(i18n("Move the tablet to the next output")); tabletNextOutput->setObjectName(QStringLiteral("Move Tablet to Next Output")); KGlobalAccel::setGlobalShortcut(tabletNextOutput, QList()); diff --git a/src/libkwineffects/CMakeLists.txt b/src/libkwineffects/CMakeLists.txt index c475f5ab24..116e94f0d6 100644 --- a/src/libkwineffects/CMakeLists.txt +++ b/src/libkwineffects/CMakeLists.txt @@ -40,7 +40,6 @@ set_target_properties(kwineffects PROPERTIES VERSION ${KWINEFFECTS_VERSION} SOVERSION ${KWINEFFECTS_SOVERSION} ) -set_target_properties(kwineffects PROPERTIES OUTPUT_NAME ${KWIN_NAME}effects) install(TARGETS kwineffects EXPORT KWinEffectsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) @@ -60,7 +59,6 @@ target_link_libraries(kwinglutils PUBLIC XCB::XCB KF5::CoreAddons KF5::ConfigCor set_target_properties(kwinglutils PROPERTIES VERSION ${KWINEFFECTS_VERSION} SOVERSION ${KWINEFFECTS_SOVERSION} - OUTPUT_NAME ${KWIN_NAME}glutils ) install(TARGETS kwinglutils EXPORT KWinEffectsTargets ${KDE_INSTALL_TARGETS_DEFAULT_ARGS}) diff --git a/src/main.cpp b/src/main.cpp index 7259309e88..96b776f7c8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -170,7 +170,7 @@ bool Application::wasCrash() void Application::createAboutData() { - KAboutData aboutData(QStringLiteral(KWIN_NAME), // The program name used internally + KAboutData aboutData(QStringLiteral("kwin"), // The program name used internally i18n("KWin"), // A displayable program name string QStringLiteral(KWIN_VERSION_STRING), // The program version string i18n("KDE window manager"), // Short description of what the app does diff --git a/src/main_x11.cpp b/src/main_x11.cpp index f00aff8279..34d49eeb0a 100644 --- a/src/main_x11.cpp +++ b/src/main_x11.cpp @@ -74,7 +74,7 @@ public: addWM(QStringLiteral("metacity")); addWM(QStringLiteral("openbox")); addWM(QStringLiteral("fvwm2")); - addWM(QStringLiteral(KWIN_INTERNAL_NAME_X11)); + addWM(QStringLiteral("kwin_x11")); QVBoxLayout *mainLayout = new QVBoxLayout(this); mainLayout->addWidget(mainWidget); @@ -283,7 +283,7 @@ void ApplicationX11::crashChecking() if (crashes >= 4) { // Something has gone seriously wrong AlternativeWMDialog dialog; - QString cmd = QStringLiteral(KWIN_INTERNAL_NAME_X11); + QString cmd = QStringLiteral("kwin_x11"); if (dialog.exec() == QDialog::Accepted) { cmd = dialog.selectedWM(); } else { diff --git a/src/onscreennotification.cpp b/src/onscreennotification.cpp index 7be6147be9..08ae528f7e 100644 --- a/src/onscreennotification.cpp +++ b/src/onscreennotification.cpp @@ -173,7 +173,7 @@ void OnScreenNotification::ensureQmlComponent() } m_qmlComponent.reset(new QQmlComponent(m_qmlEngine)); const QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, - m_config->group(QStringLiteral("OnScreenNotification")).readEntry("QmlPath", QStringLiteral(KWIN_NAME "/onscreennotification/plasma/main.qml"))); + m_config->group(QStringLiteral("OnScreenNotification")).readEntry("QmlPath", QStringLiteral("kwin/onscreennotification/plasma/main.qml"))); if (fileName.isEmpty()) { return; } diff --git a/src/outline.cpp b/src/outline.cpp index aebfecdd13..406d67620b 100644 --- a/src/outline.cpp +++ b/src/outline.cpp @@ -169,7 +169,7 @@ void CompositedOutlineVisual::show() if (!m_qmlComponent) { m_qmlComponent = std::make_unique(Scripting::self()->qmlEngine()); const QString fileName = QStandardPaths::locate(QStandardPaths::GenericDataLocation, - kwinApp()->config()->group(QStringLiteral("Outline")).readEntry("QmlPath", QStringLiteral(KWIN_NAME "/outline/plasma/outline.qml"))); + kwinApp()->config()->group(QStringLiteral("Outline")).readEntry("QmlPath", QStringLiteral("kwin/outline/plasma/outline.qml"))); if (fileName.isEmpty()) { qCDebug(KWIN_CORE) << "Could not locate outline.qml"; return; diff --git a/src/plugins/kdecorations/aurorae/src/aurorae.cpp b/src/plugins/kdecorations/aurorae/src/aurorae.cpp index 1ca1b890ad..3b44d8ede1 100644 --- a/src/plugins/kdecorations/aurorae/src/aurorae.cpp +++ b/src/plugins/kdecorations/aurorae/src/aurorae.cpp @@ -105,7 +105,7 @@ void Helper::unref() } static const QString s_defaultTheme = QStringLiteral("kwin4_decoration_qml_plastik"); -static const QString s_qmlPackageFolder = QStringLiteral(KWIN_NAME "/decorations/"); +static const QString s_qmlPackageFolder = QStringLiteral("kwin/decorations/"); /* * KDecoration2::BorderSize doesn't map to the indices used for the Aurorae SVG Button Sizes. * BorderSize defines None and NoSideBorder as index 0 and 1. These do not make sense for Button diff --git a/src/plugins/kdecorations/aurorae/themes/plastik/CMakeLists.txt b/src/plugins/kdecorations/aurorae/themes/plastik/CMakeLists.txt index 58eb7f5bd4..ba368375de 100644 --- a/src/plugins/kdecorations/aurorae/themes/plastik/CMakeLists.txt +++ b/src/plugins/kdecorations/aurorae/themes/plastik/CMakeLists.txt @@ -1,6 +1,6 @@ add_subdirectory(code) install(DIRECTORY package/ - DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/decorations/kwin4_decoration_qml_plastik) + DESTINATION ${KDE_INSTALL_DATADIR}/kwin/decorations/kwin4_decoration_qml_plastik) file(COPY package/ DESTINATION ${CMAKE_BINARY_DIR}/bin/kwin/decorations/kwin4_decoration_qml_plastik) diff --git a/src/plugins/nightcolor/CMakeLists.txt b/src/plugins/nightcolor/CMakeLists.txt index 92e4668e1a..4a88e7f795 100644 --- a/src/plugins/nightcolor/CMakeLists.txt +++ b/src/plugins/nightcolor/CMakeLists.txt @@ -27,6 +27,6 @@ endif() target_link_libraries(KWinNightColorPlugin kwin) -install(FILES nightcolorsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR} RENAME ${KWIN_NAME}_colorcorrect.kcfg) +install(FILES nightcolorsettings.kcfg DESTINATION ${KDE_INSTALL_KCFGDIR}) install(FILES org.kde.kwin.ColorCorrect.xml DESTINATION ${KDE_INSTALL_DBUSINTERFACEDIR}) install(TARGETS KWinNightColorPlugin DESTINATION ${KDE_INSTALL_PLUGINDIR}/kwin/plugins/) diff --git a/src/plugins/nightcolor/nightcolormanager.cpp b/src/plugins/nightcolor/nightcolormanager.cpp index e037abf481..4db18fb5fb 100644 --- a/src/plugins/nightcolor/nightcolormanager.cpp +++ b/src/plugins/nightcolor/nightcolormanager.cpp @@ -87,13 +87,13 @@ NightColorManager::NightColorManager() // legacy shortcut with localized key (to avoid breaking existing config) if (i18n("Toggle Night Color") != QStringLiteral("Toggle Night Color")) { QAction toggleActionLegacy; - toggleActionLegacy.setProperty("componentName", QStringLiteral(KWIN_NAME)); + toggleActionLegacy.setProperty("componentName", QStringLiteral("kwin")); toggleActionLegacy.setObjectName(i18n("Toggle Night Color")); KGlobalAccel::self()->removeAllShortcuts(&toggleActionLegacy); } QAction *toggleAction = new QAction(this); - toggleAction->setProperty("componentName", QStringLiteral(KWIN_NAME)); + toggleAction->setProperty("componentName", QStringLiteral("kwin")); toggleAction->setObjectName(QStringLiteral("Toggle Night Color")); toggleAction->setText(i18n("Toggle Night Color")); KGlobalAccel::setGlobalShortcut(toggleAction, QList()); diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt index 3b9e8ff0f6..308f00b90d 100644 --- a/src/qml/CMakeLists.txt +++ b/src/qml/CMakeLists.txt @@ -1,3 +1,3 @@ -install(DIRECTORY outline/plasma DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/outline) -install(DIRECTORY onscreennotification/plasma DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/onscreennotification) -install(DIRECTORY frames/plasma DESTINATION ${KDE_INSTALL_DATADIR}/${KWIN_NAME}/frames) +install(DIRECTORY outline/plasma DESTINATION ${KDE_INSTALL_DATADIR}/kwin/outline) +install(DIRECTORY onscreennotification/plasma DESTINATION ${KDE_INSTALL_DATADIR}/kwin/onscreennotification) +install(DIRECTORY frames/plasma DESTINATION ${KDE_INSTALL_DATADIR}/kwin/frames) diff --git a/src/rules.cpp b/src/rules.cpp index 4c4e7d5bbd..a441f2a851 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -970,7 +970,7 @@ void RuleBook::load() { deleteAll(); if (!m_config) { - m_config = KSharedConfig::openConfig(QStringLiteral(KWIN_NAME "rulesrc"), KConfig::NoGlobals); + m_config = KSharedConfig::openConfig(QStringLiteral("kwinrulesrc"), KConfig::NoGlobals); } else { m_config->reparseConfiguration(); } diff --git a/src/scripting/genericscriptedconfig.cpp b/src/scripting/genericscriptedconfig.cpp index 0a5d3c650f..0811066afa 100644 --- a/src/scripting/genericscriptedconfig.cpp +++ b/src/scripting/genericscriptedconfig.cpp @@ -64,7 +64,7 @@ void GenericScriptedConfig::createUi() QVBoxLayout *layout = new QVBoxLayout(this); const QString packageRoot = QStandardPaths::locate(QStandardPaths::GenericDataLocation, - QLatin1String(KWIN_NAME) + QLatin1Char('/') + typeName() + QLatin1Char('/') + m_packageName, + QLatin1String("kwin/") + typeName() + QLatin1Char('/') + m_packageName, QStandardPaths::LocateDirectory); if (packageRoot.isEmpty()) { layout->addWidget(new QLabel(i18nc("Error message", "Could not locate package metadata"))); diff --git a/src/scripting/scriptedeffect.cpp b/src/scripting/scriptedeffect.cpp index ec55b90393..c794e25f6c 100644 --- a/src/scripting/scriptedeffect.cpp +++ b/src/scripting/scriptedeffect.cpp @@ -162,7 +162,7 @@ ScriptedEffect *ScriptedEffect::create(const KPluginMetaData &effect) return nullptr; } const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, - QLatin1String(KWIN_NAME "/effects/") + name + QLatin1String("/contents/") + scriptName); + QLatin1String("kwin/effects/") + name + QLatin1String("/contents/") + scriptName); if (scriptFile.isNull()) { qCDebug(KWIN_SCRIPTING) << "Could not locate the effect script"; return nullptr; @@ -225,7 +225,7 @@ bool ScriptedEffect::init(const QString &effectName, const QString &pathToScript m_scriptFile = pathToScript; // does the effect contain an KConfigXT file? - const QString kconfigXTFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String(KWIN_NAME "/effects/") + m_effectName + QLatin1String("/contents/config/main.xml")); + const QString kconfigXTFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("kwin/effects/") + m_effectName + QLatin1String("/contents/config/main.xml")); if (!kconfigXTFile.isNull()) { KConfigGroup cg = QCoreApplication::instance()->property("config").value()->group(QStringLiteral("Effect-%1").arg(m_effectName)); QFile xmlFile(kconfigXTFile); @@ -802,7 +802,7 @@ uint ScriptedEffect::addFragmentShader(ShaderTrait traits, const QString &fragme m_engine->throwError(QStringLiteral("Failed to make OpenGL context current")); return 0; } - const QString shaderDir{QLatin1String(KWIN_NAME "/effects/") + m_effectName + QLatin1String("/contents/shaders/")}; + const QString shaderDir{QLatin1String("kwin/effects/") + m_effectName + QLatin1String("/contents/shaders/")}; const QString fragment = fragmentShaderFile.isEmpty() ? QString{} : QStandardPaths::locate(QStandardPaths::GenericDataLocation, shaderDir + fragmentShaderFile); auto shader = ShaderManager::instance()->generateShaderFromFile(static_cast(int(traits)), {}, fragment); diff --git a/src/scripting/scripting.cpp b/src/scripting/scripting.cpp index 12e277ad49..1e83f3964d 100644 --- a/src/scripting/scripting.cpp +++ b/src/scripting/scripting.cpp @@ -748,7 +748,7 @@ LoadScriptList KWin::Scripting::queryScriptsToLoad() s_started = true; } QMap pluginStates = KConfigGroup(_config, "Plugins").entryMap(); - const QString scriptFolder = QStringLiteral(KWIN_NAME "/scripts/"); + const QString scriptFolder = QStringLiteral("kwin/scripts/"); const auto offers = KPackage::PackageLoader::self()->listPackages(QStringLiteral("KWin/Script"), scriptFolder); LoadScriptList scriptsToLoad; diff --git a/src/tabbox/tabbox.cpp b/src/tabbox/tabbox.cpp index eb7adfcb78..9375eca360 100644 --- a/src/tabbox/tabbox.cpp +++ b/src/tabbox/tabbox.cpp @@ -509,7 +509,7 @@ template void TabBox::key(const KLazyLocalizedString &actionName, Slot slot, const QKeySequence &shortcut) { QAction *a = new QAction(this); - a->setProperty("componentName", QStringLiteral(KWIN_NAME)); + a->setProperty("componentName", QStringLiteral("kwin")); a->setObjectName(QString::fromUtf8(actionName.untranslatedText())); a->setText(actionName.toString()); KGlobalAccel::self()->setGlobalShortcut(a, QList() << shortcut); diff --git a/src/tabbox/tabboxhandler.cpp b/src/tabbox/tabboxhandler.cpp index 592f5dc7ec..cd8b3d4893 100644 --- a/src/tabbox/tabboxhandler.cpp +++ b/src/tabbox/tabboxhandler.cpp @@ -244,7 +244,7 @@ QObject *TabBoxHandlerPrivate::createSwitcherItem(bool desktopMode) .arg(config.layoutName(), desktopMode ? QStringLiteral("desktopswitcher/DesktopSwitcher.qml") : QStringLiteral("windowswitcher/WindowSwitcher.qml"))); if (file.isNull()) { - const QString folderName = QLatin1String(KWIN_NAME) + (desktopMode ? QLatin1String("/desktoptabbox/") : QLatin1String("/tabbox/")); + const QString folderName = desktopMode ? QLatin1String("kwin/desktoptabbox/") : QLatin1String("kwin/tabbox/"); auto findSwitcher = [this, desktopMode, folderName] { const QString type = desktopMode ? QStringLiteral("KWin/DesktopSwitcher") : QStringLiteral("KWin/WindowSwitcher"); auto offers = KPackage::PackageLoader::self()->findPackages(type, folderName, diff --git a/src/useractions.cpp b/src/useractions.cpp index 2dc1e2209a..d70da452c9 100644 --- a/src/useractions.cpp +++ b/src/useractions.cpp @@ -963,7 +963,7 @@ template void Workspace::initShortcut(const QString &actionName, const QString &description, const QKeySequence &shortcut, T *receiver, Slot slot) { QAction *a = new QAction(this); - a->setProperty("componentName", QStringLiteral(KWIN_NAME)); + a->setProperty("componentName", QStringLiteral("kwin")); a->setObjectName(actionName); a->setText(description); KGlobalAccel::self()->setDefaultShortcut(a, QList() << shortcut); @@ -1178,7 +1178,7 @@ void Workspace::windowShortcutUpdated(Window *window) if (!window->shortcut().isEmpty()) { if (action == nullptr) { // new shortcut action = new QAction(this); - action->setProperty("componentName", QStringLiteral(KWIN_NAME)); + action->setProperty("componentName", QStringLiteral("kwin")); action->setObjectName(key); action->setText(i18n("Activate Window (%1)", window->caption())); connect(action, &QAction::triggered, window, std::bind(&Workspace::activateWindow, this, window, true)); diff --git a/src/virtualdesktops.cpp b/src/virtualdesktops.cpp index b8090c48f4..9907a5a022 100644 --- a/src/virtualdesktops.cpp +++ b/src/virtualdesktops.cpp @@ -905,7 +905,7 @@ void VirtualDesktopManager::initSwitchToShortcuts() QAction *VirtualDesktopManager::addAction(const QString &name, const KLocalizedString &label, uint value, const QKeySequence &key, void (VirtualDesktopManager::*slot)()) { QAction *a = new QAction(this); - a->setProperty("componentName", QStringLiteral(KWIN_NAME)); + a->setProperty("componentName", QStringLiteral("kwin")); a->setObjectName(name.arg(value)); a->setText(label.subs(value).toString()); a->setData(value); @@ -917,7 +917,7 @@ QAction *VirtualDesktopManager::addAction(const QString &name, const KLocalizedS QAction *VirtualDesktopManager::addAction(const QString &name, const QString &label, void (VirtualDesktopManager::*slot)()) { QAction *a = new QAction(this); - a->setProperty("componentName", QStringLiteral(KWIN_NAME)); + a->setProperty("componentName", QStringLiteral("kwin")); a->setObjectName(name); a->setText(label); KGlobalAccel::setGlobalShortcut(a, QKeySequence());