kinit: do not deep-copy QString object in KLauncher::start_service()

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2022-05-25 13:27:22 +03:00
parent bf28b99836
commit 45b86486d3
3 changed files with 1 additions and 3 deletions

View file

@ -15,7 +15,6 @@ check_variable_exists(__progname HAVE___PROGNAME)
check_variable_exists(__progname_full HAVE___PROGNAME_FULL)
check_function_exists(setproctitle HAVE_SETPROCTITLE)
# used by 4 executables in this file
set(KINIT_SOCKET_LIBRARY)
if(HAVE_SOCKET_LIBRARY)
set(KINIT_SOCKET_LIBRARY socket)

View file

@ -753,7 +753,7 @@ KLauncher::start_service(KService::Ptr service, const QStringList &_urls,
// For the first file we launch the application in the
// usual way. The reported result is based on this
// application.
foreach(const QString it, urls) {
foreach(const QString &it, urls) {
QByteArray startup_id2 = startup_id;
const QStringList singleUrl(it);
if( !startup_id2.isEmpty() && startup_id2 != "0" )

View file

@ -57,7 +57,6 @@ public Q_SLOTS: // METHODS
void setLaunchEnv(const QString &name, const QString &value);
int start_service_by_desktop_name(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
int start_service_by_desktop_path(const QString &serviceName, const QStringList &urls, const QStringList &envs, const QString &startup_id, bool blind, const QDBusMessage &msg, QString &dbusServiceName, QString &error, qint64 &pid);
// Deprecated, to be removed in KDE5.
void waitForSlave(qint64 pid, const QDBusMessage &msg);
void terminate_kdeinit();
Q_SIGNALS: // SIGNALS