~mir-team/qtmir/trunk

« back to all changes in this revision

Viewing changes to src/platforms/mirserver/qmirserver.h

  • Committer: Bileto Bot
  • Author(s): Albert Astals Cid, Gerry Boland
  • Date: 2017-03-20 21:15:13 UTC
  • mfrom: (606.4.12 make_sure_surface_not_null)
  • Revision ID: ci-train-bot@canonical.com-20170320211513-z7v3z0ldes3gtcc0
Check for find() result not being null before using it

We do it in onWindowReady, onWindowMoved, onWindowFocusChanged, etc so no reason to not do it in onWindowRemoved

Approved by: Lukáš Tinkl, Unity8 CI Bot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*
2
 
 * Copyright (C) 2013-2015 Canonical, Ltd.
 
2
 * Copyright (C) 2013-2017 Canonical, Ltd.
3
3
 *
4
4
 * This program is free software: you can redistribute it and/or modify it under
5
5
 * the terms of the GNU Lesser General Public License version 3, as published by
21
21
#include <QObject>
22
22
#include <QWeakPointer>
23
23
 
 
24
#include <memory>
 
25
 
 
26
// qtmir
 
27
namespace qtmir { class PromptSessionManager; }
 
28
 
24
29
class QMirServerPrivate;
25
 
class MirServer;
26
 
class ScreenController;
 
30
class ScreensController;
 
31
class ScreensModel;
 
32
class QPlatformOpenGLContext;
 
33
class QOpenGLContext;
27
34
 
28
35
class QMirServer: public QObject
29
36
{
30
37
    Q_OBJECT
31
38
 
32
39
public:
33
 
    QMirServer(const QStringList &arguments, QObject* parent=0);
 
40
    QMirServer(QObject *parent = nullptr);
34
41
    virtual ~QMirServer();
35
42
 
36
 
    bool start();
 
43
    void start();
37
44
    Q_SLOT void stop();
38
45
    bool isRunning() const;
39
46
 
40
 
    QWeakPointer<MirServer> mirServer() const;
41
 
 
42
 
    QWeakPointer<ScreenController> screenController() const;
 
47
    QSharedPointer<ScreensModel> screensModel() const;
 
48
    QPlatformOpenGLContext *createPlatformOpenGLContext(QOpenGLContext *context) const;
 
49
    void *nativeResourceForIntegration(const QByteArray &resource) const;
 
50
    std::shared_ptr<qtmir::PromptSessionManager> thePromptSessionManager() const;
43
51
 
44
52
Q_SIGNALS:
45
53
    void started();