~dbarth/ubuntu-system-settings-online-accounts/inline-plugin

« back to all changes in this revision

Viewing changes to src/panel-request.cpp

  • Committer: Alberto Mardegan
  • Date: 2014-05-30 13:18:48 UTC
  • mfrom: (117.1.6 window-raising)
  • Revision ID: alberto.mardegan@canonical.com-20140530131848-anfktlo4kd1ab1pn
When processing completes, raise the caller application

Under unity8, use QDesktopServices to raise the application which invoked OA. Also, avoid queuing requests to open OA from the System Settings.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include "globals.h"
24
24
#include "panel-request.h"
25
25
 
 
26
#include <QDesktopServices>
 
27
#include <QGuiApplication>
26
28
#include <QStandardPaths>
27
29
#include <QQmlContext>
28
30
#include <QQmlEngine>
101
103
 
102
104
    if (!visible) {
103
105
        q->setResult(QVariantMap());
 
106
        /* FIXME HACK: remove when window reparenting is implemented */
 
107
        if (QGuiApplication::platformName().startsWith("ubuntu")) {
 
108
            QDesktopServices::openUrl(QUrl("application:///ubuntu-system-settings.desktop"));
 
109
        }
104
110
    }
105
111
}
106
112