diff options
author | Gerry Boland <gerry.boland@canonical.com> | 2015-08-12 11:35:54 +0000 |
---|---|---|
committer | CI Train Bot <ci-train-bot@canonical.com> | 2015-08-12 11:35:54 +0000 |
commit | 7b699706694125751aadd14b574685e52fd7bbb4 (patch) | |
tree | d8d09960775ca7cde4c2a1eda0d2b4569a571313 | |
parent | e6375102adf246e1d604b6b5749867127e52203b (diff) | |
parent | 7436d8b71b213306da533bcafc899633791ef60c (diff) |
authorizeSession incorrectly edits desktopFilePath supplied by desktop_file_hint Fixes: #1483225
Approved by: Daniel d'Andrada, PS Jenkins bot
-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 0624552..ba8bc9a 100644 --- a/src/modules/Unity/Application/application_manager.cpp +++ b/src/modules/Unity/Application/application_manager.cpp @@ -576,7 +576,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 @@ -587,7 +587,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 |