~aacid/qtmir/fix_leaks_application_manager_test

« back to all changes in this revision

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

  • Committer: CI Train Bot
  • Author(s): Alan Griffiths
  • Date: 2016-05-20 08:41:29 UTC
  • mfrom: (484.2.11 qtmir0)
  • Revision ID: ci-train-bot@canonical.com-20160520084129-co95olzpjkt1z4lh
Reduce coupling to MirServer - it has  been misused as a context object.
Approved by: Alan Griffiths, Unity8 CI Bot, Daniel d'Andrada

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
// QPA mirserver
33
33
#include "nativeinterface.h"
34
 
#include "mirserver.h"
35
34
#include "sessionlistener.h"
36
35
#include "logging.h"
37
36
#include "creationhints.h"
38
37
 
 
38
// mir
 
39
#include <mir/scene/surface.h>
 
40
 
 
41
 
39
42
Q_LOGGING_CATEGORY(QTMIR_SURFACES, "qtmir.surfaces")
40
43
 
41
44
namespace ms = mir::scene;
66
69
        }
67
70
 
68
71
        SessionListener *sessionListener = static_cast<SessionListener*>(nativeInterface->nativeResourceForIntegration("SessionListener"));
69
 
        MirShell *shell = static_cast<MirShell*>(nativeInterface->nativeResourceForIntegration("Shell"));
 
72
        mir::shell::Shell *shell = static_cast<mir::shell::Shell*>(nativeInterface->nativeResourceForIntegration("Shell"));
70
73
 
71
 
        instance = new MirSurfaceManager(nativeInterface->mirServer(), shell, SessionManager::singleton());
 
74
        instance = new MirSurfaceManager(shell, SessionManager::singleton());
72
75
 
73
76
        connectToSessionListener(instance, sessionListener);
74
77
    }
76
79
}
77
80
 
78
81
MirSurfaceManager::MirSurfaceManager(
79
 
        const QSharedPointer<MirServer>& mirServer,
80
 
        MirShell *shell,
 
82
        mir::shell::Shell* shell,
81
83
        SessionManager* sessionManager,
82
 
        QObject *parent)
 
84
        QObject* parent)
83
85
    : QObject(parent)
84
 
    , m_mirServer(mirServer)
85
86
    , m_shell(shell)
86
87
    , m_sessionManager(sessionManager)
87
88
{