diff options
author | Gerry Boland <gerry.boland@canonical.com> | 2015-08-10 13:03:29 +0100 |
---|---|---|
committer | Gerry Boland <gerry.boland@canonical.com> | 2015-08-10 13:03:29 +0100 |
commit | 7436d8b71b213306da533bcafc899633791ef60c (patch) | |
tree | 7894e8a4fac7d0afd1478c83c9108244c174959f | |
parent | bd0811e3ab5618a4a7bd6f01d8e6163fe6228a34 (diff) |
authorizeSession incorreectly edits desktopFilePath supplied by desktop_file_hint
-rw-r--r-- | src/modules/Unity/Application/application_manager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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 |