From 7436d8b71b213306da533bcafc899633791ef60c Mon Sep 17 00:00:00 2001 From: Gerry Boland Date: Mon, 10 Aug 2015 13:03:29 +0100 Subject: authorizeSession incorreectly edits desktopFilePath supplied by desktop_file_hint --- src/modules/Unity/Application/application_manager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/modules/Unity/Application/application_manager.cpp b/src/modules/Unity/Application/application_manager.cpp index ea316e7..a760883 100644 --- a/src/modules/Unity/Application/application_manager.cpp +++ b/src/modules/Unity/Application/application_manager.cpp @@ -736,7 +736,7 @@ void ApplicationManager::authorizeSession(const quint64 pid, bool &authorized) return; } - QString desktopFileName = info->getParameter("--desktop_file_hint="); + const QString desktopFileName = info->getParameter("--desktop_file_hint="); if (desktopFileName.isNull()) { qCritical() << "ApplicationManager REJECTED connection from app with pid" << pid @@ -747,7 +747,7 @@ void ApplicationManager::authorizeSession(const quint64 pid, bool &authorized) qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << desktopFileName; // Guess appId from the desktop file hint - QString appId = toShortAppIdIfPossible(desktopFileName.remove(QRegExp(".desktop$")).split('/').last()); + const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$"))); // FIXME: right now we support --desktop_file_hint=appId for historical reasons. So let's try that in // case we didn't get an existing .desktop file path -- cgit v1.2.3