~canonical-platform-qa/ubuntu-system-settings-online-accounts/launch_fixture

« back to all changes in this revision

Viewing changes to src/panel-request.cpp

  • Committer: CI bot
  • Author(s): Alberto Mardegan
  • Date: 2014-05-30 13:30:01 UTC
  • mfrom: (107.1.13 master)
  • Revision ID: ps-jenkins@lists.canonical.com-20140530133001-an9lfy1dc1pfkifd
Release development branch

Features landing with this branch:
- Updating the ACL when applications are enabled/disabled in System Settings
- Write profile information in the XML files installed by click hooks
- Run tests with Python 3 autopilot.
- Merge signon-ui into online-accounts-ui 

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 * with this program.  If not, see <http://www.gnu.org/licenses/>.
19
19
 */
20
20
 
 
21
#include "application-manager.h"
21
22
#include "debug.h"
22
23
#include "globals.h"
23
24
#include "panel-request.h"
24
25
 
 
26
#include <QDesktopServices>
 
27
#include <QGuiApplication>
25
28
#include <QStandardPaths>
26
29
#include <QQmlContext>
27
30
#include <QQmlEngine>
85
88
                                "/accounts/qml-plugins/"));
86
89
    context->setContextProperty("pluginOptions", QVariantMap());
87
90
    context->setContextProperty("mainWindow", m_view);
 
91
    context->setContextProperty("ApplicationManager",
 
92
                                ApplicationManager::instance());
88
93
 
89
94
    m_view->setSource(QUrl(QStringLiteral("qrc:/qml/MainPage.qml")));
90
95
    q->setWindow(m_view);
98
103
 
99
104
    if (!visible) {
100
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
        }
101
110
    }
102
111
}
103
112