From eba0c488594036363cde41c1a1f559d61ce21d27 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 8 Dec 2022 06:36:46 +0200 Subject: [PATCH] generic: adjust to KToolInvocation changes Signed-off-by: Ivailo Monev --- kcminit/main.cpp | 3 +-- kcontrol/input/main.cpp | 5 ++--- kcontrol/input/xcursor/themepage.cpp | 3 +-- kcontrol/krdb/krdb.cpp | 3 +-- kdontchangethehostname/khostname.cpp | 3 +-- 5 files changed, 6 insertions(+), 11 deletions(-) diff --git a/kcminit/main.cpp b/kcminit/main.cpp index 0e4f1feb..15804102 100644 --- a/kcminit/main.cpp +++ b/kcminit/main.cpp @@ -38,7 +38,6 @@ #include #include #include -#include #ifdef Q_WS_X11 #include @@ -193,7 +192,7 @@ KCMInit::KCMInit( KCmdLineArgs* args ) // Pass env. var to klauncher. QString name = "KDE_MULTIHEAD"; QString value = multihead ? "true" : "false"; - KToolInvocation::klauncher()->setLaunchEnv(name, value); + KToolInvocation::self()->setLaunchEnv(name, value); setenv( name.toLatin1().constData(), value.toLatin1().constData(), 1 ); // apply effect also to itself if( startup ) diff --git a/kcontrol/input/main.cpp b/kcontrol/input/main.cpp index 5053e24b..c5ad55c9 100644 --- a/kcontrol/input/main.cpp +++ b/kcontrol/input/main.cpp @@ -32,7 +32,6 @@ #include #include -#include #include #ifdef HAVE_XCURSOR @@ -78,9 +77,9 @@ extern "C" // Tell klauncher to set the XCURSOR_THEME and XCURSOR_SIZE environment // variables when launching applications. if(!theme.isEmpty()) - KToolInvocation::klauncher()->setLaunchEnv("XCURSOR_THEME", theme); + KToolInvocation::self()->setLaunchEnv("XCURSOR_THEME", theme); if( !size.isEmpty()) - KToolInvocation::klauncher()->setLaunchEnv("XCURSOR_SIZE", size); + KToolInvocation::self()->setLaunchEnv("XCURSOR_SIZE", size); #endif diff --git a/kcontrol/input/xcursor/themepage.cpp b/kcontrol/input/xcursor/themepage.cpp index 7dbf1292..97a01992 100644 --- a/kcontrol/input/xcursor/themepage.cpp +++ b/kcontrol/input/xcursor/themepage.cpp @@ -31,7 +31,6 @@ #include #include -#include #include "../../krdb/krdb.h" #include @@ -259,7 +258,7 @@ bool ThemePage::applyTheme(const CursorTheme *theme, const int size) QByteArray themeName = QFile::encodeName(theme->name()); // Set up the proper launch environment for newly started apps - KToolInvocation::klauncher()->setLaunchEnv("XCURSOR_THEME", themeName); + KToolInvocation::self()->setLaunchEnv("XCURSOR_THEME", themeName); // Update the Xcursor X resources runRdb(0); diff --git a/kcontrol/krdb/krdb.cpp b/kcontrol/krdb/krdb.cpp index f0aadbd4..6c7c97c8 100644 --- a/kcontrol/krdb/krdb.cpp +++ b/kcontrol/krdb/krdb.cpp @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -98,7 +97,7 @@ static void applyGtkStyles(bool active, int version) // Pass env. var to klauncher. QString name = gtkEnvVar(version); QString value = list.join(":"); - KToolInvocation::klauncher()->setLaunchEnv(name, value); + KToolInvocation::self()->setLaunchEnv(name, value); } // ----------------------------------------------------------------------------- diff --git a/kdontchangethehostname/khostname.cpp b/kdontchangethehostname/khostname.cpp index 1404867c..04d32402 100644 --- a/kdontchangethehostname/khostname.cpp +++ b/kdontchangethehostname/khostname.cpp @@ -33,7 +33,6 @@ #include #include #include -#include #include #include @@ -168,7 +167,7 @@ void KHostName::changeSessionManager() return; } sm = "local/"+newName+sm.mid(i); - KToolInvocation::klauncher()->setLaunchEnv(QString::fromLatin1("SESSION_MANAGER"), sm); + KToolInvocation::self()->setLaunchEnv(QString::fromLatin1("SESSION_MANAGER"), sm); } int main(int argc, char **argv)