~dandrader/qtmir/mirSurface

« back to all changes in this revision

Viewing changes to src/modules/Unity/Application/application_manager.cpp

  • Committer: CI Train Bot
  • Author(s): Gerry Boland
  • Date: 2015-08-12 11:35:54 UTC
  • mfrom: (349.2.1 debugger)
  • Revision ID: ci-train-bot@canonical.com-20150812113554-4h08l92k114ichgb
authorizeSession incorrectly edits desktopFilePath supplied by desktop_file_hint Fixes: #1483225
Approved by: Daniel d'Andrada, PS Jenkins bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
576
576
        return;
577
577
    }
578
578
 
579
 
    QString desktopFileName = info->getParameter("--desktop_file_hint=");
 
579
    const QString desktopFileName = info->getParameter("--desktop_file_hint=");
580
580
 
581
581
    if (desktopFileName.isNull()) {
582
582
        qCritical() << "ApplicationManager REJECTED connection from app with pid" << pid
587
587
    qCDebug(QTMIR_APPLICATIONS) << "Process supplied desktop_file_hint, loading:" << desktopFileName;
588
588
 
589
589
    // Guess appId from the desktop file hint
590
 
    QString appId = toShortAppIdIfPossible(desktopFileName.remove(QRegExp(".desktop$")).split('/').last());
 
590
    const QString appId = toShortAppIdIfPossible(desktopFileName.split('/').last().remove(QRegExp(".desktop$")));
591
591
 
592
592
    // FIXME: right now we support --desktop_file_hint=appId for historical reasons. So let's try that in
593
593
    // case we didn't get an existing .desktop file path