Merge lp:~alan-griffiths/unity-mir/dont-use-ApplicationSession into lp:unity-mir
- dont-use-ApplicationSession
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Alan Griffiths |
Approved revision: | 144 |
Merged at revision: | 147 |
Proposed branch: | lp:~alan-griffiths/unity-mir/dont-use-ApplicationSession |
Merge into: | lp:unity-mir |
Prerequisite: | lp:~alan-griffiths/unity-mir/we-dont-need-SurfaceBuilder |
Diff against target: |
324 lines (+40/-42) 8 files modified
src/modules/Unity/Application/application.cpp (+3/-3) src/modules/Unity/Application/application.h (+4/-4) src/modules/Unity/Application/application_manager.cpp (+8/-7) src/modules/Unity/Application/application_manager.h (+4/-5) src/modules/Unity/Application/mirsurfacemanager.cpp (+5/-2) src/modules/Unity/Application/mirsurfacemanager.h (+3/-3) src/unity-mir/sessionlistener.cpp (+8/-12) src/unity-mir/sessionlistener.h (+5/-6) |
To merge this branch: | bzr merge lp:~alan-griffiths/unity-mir/dont-use-ApplicationSession |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Gerry Boland (community) | Approve | ||
PS Jenkins bot (community) | continuous-integration | Approve | |
Review via email:
|
Commit message
ApplicationSession is a Mir implementation class that shouldn't be used by unity-mir, use shell::session instead
Description of the change
ApplicationSession is a Mir implementation class that shouldn't be used by unity-mir, use shell::session instead
NB this change is dependent on pending Mir changes (libmirserver-dev >= 0.1.1)
- 140. By Alan Griffiths
-
Don't use mir::shell:
:ApplicationSes sion - 141. By Alan Griffiths
-
Don't use mir::shell:
:ApplicationSes sion or SessionManager - 142. By Alan Griffiths
-
As in Rome...
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gerry Boland (gerboland) wrote : | # |
I think you got everything :)
Please add explicit version dependence on libmirserver-dev to the debian/control file.
- 143. By Alan Griffiths
-
merge lp:unity-mir
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alan Griffiths (alan-griffiths) wrote : | # |
> I think you got everything :)
>
> Please add explicit version dependence on libmirserver-dev to the
> debian/control file.
I was relying on something like (it didn't exist when I proposed this) https:/
Merging current trunk in should address that.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:143
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Gerry Boland (gerboland) wrote : | # |
Missed stuff:
src/unity-
qRegisterMetaTy
would be best to keep the Qt Metatype name matching the actual type.
src/modules/
you could remove the "class ApplicationSess
- 144. By Alan Griffiths
-
tidy up stuff Gerry spotted in review
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Alan Griffiths (alan-griffiths) wrote : | # |
> Missed stuff:
sorted, thanks
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
PS Jenkins bot (ps-jenkins) wrote : | # |
PASSED: Continuous integration, rev:144
http://
Executed test runs:
SUCCESS: http://
SUCCESS: http://
deb: http://
SUCCESS: http://
Click here to trigger a rebuild:
http://
Preview Diff
1 | === modified file 'src/modules/Unity/Application/application.cpp' | |||
2 | --- src/modules/Unity/Application/application.cpp 2013-09-27 10:20:47 +0000 | |||
3 | +++ src/modules/Unity/Application/application.cpp 2013-11-20 14:40:05 +0000 | |||
4 | @@ -24,7 +24,7 @@ | |||
5 | 24 | #include "logging.h" | 24 | #include "logging.h" |
6 | 25 | 25 | ||
7 | 26 | // mir | 26 | // mir |
9 | 27 | #include <mir/shell/application_session.h> | 27 | #include <mir/shell/session.h> |
10 | 28 | 28 | ||
11 | 29 | Application::Application(const QString &appId, Application::State state, | 29 | Application::Application(const QString &appId, Application::State state, |
12 | 30 | const QStringList &arguments, QObject *parent) | 30 | const QStringList &arguments, QObject *parent) |
13 | @@ -121,7 +121,7 @@ | |||
14 | 121 | return m_fullscreen; | 121 | return m_fullscreen; |
15 | 122 | } | 122 | } |
16 | 123 | 123 | ||
18 | 124 | std::shared_ptr<mir::shell::ApplicationSession> Application::session() const | 124 | std::shared_ptr<mir::shell::Session> Application::session() const |
19 | 125 | { | 125 | { |
20 | 126 | return m_session; | 126 | return m_session; |
21 | 127 | } | 127 | } |
22 | @@ -136,7 +136,7 @@ | |||
23 | 136 | m_pid = pid; | 136 | m_pid = pid; |
24 | 137 | } | 137 | } |
25 | 138 | 138 | ||
27 | 139 | void Application::setSession(const std::shared_ptr<mir::shell::ApplicationSession>& session) | 139 | void Application::setSession(const std::shared_ptr<mir::shell::Session>& session) |
28 | 140 | { | 140 | { |
29 | 141 | DLOG("Application::setSession (this=%p, session=%p)", this, session.get()); | 141 | DLOG("Application::setSession (this=%p, session=%p)", this, session.get()); |
30 | 142 | 142 | ||
31 | 143 | 143 | ||
32 | === modified file 'src/modules/Unity/Application/application.h' | |||
33 | --- src/modules/Unity/Application/application.h 2013-10-11 11:06:58 +0000 | |||
34 | +++ src/modules/Unity/Application/application.h 2013-11-20 14:40:05 +0000 | |||
35 | @@ -33,7 +33,7 @@ | |||
36 | 33 | class QImage; | 33 | class QImage; |
37 | 34 | class DesktopFileReader; | 34 | class DesktopFileReader; |
38 | 35 | class TaskController; | 35 | class TaskController; |
40 | 36 | namespace mir { namespace shell { class ApplicationSession; }} | 36 | namespace mir { namespace shell { class Session; }} |
41 | 37 | 37 | ||
42 | 38 | class Application : public unity::shell::application::ApplicationInfoInterface { | 38 | class Application : public unity::shell::application::ApplicationInfoInterface { |
43 | 39 | Q_OBJECT | 39 | Q_OBJECT |
44 | @@ -62,7 +62,7 @@ | |||
45 | 62 | QString desktopFile() const; | 62 | QString desktopFile() const; |
46 | 63 | QString exec() const; | 63 | QString exec() const; |
47 | 64 | bool fullscreen() const; | 64 | bool fullscreen() const; |
49 | 65 | std::shared_ptr<mir::shell::ApplicationSession> session() const; | 65 | std::shared_ptr<mir::shell::Session> session() const; |
50 | 66 | 66 | ||
51 | 67 | public Q_SLOTS: | 67 | public Q_SLOTS: |
52 | 68 | void suspend(); | 68 | void suspend(); |
53 | @@ -79,7 +79,7 @@ | |||
54 | 79 | void setState(State state); | 79 | void setState(State state); |
55 | 80 | void setFocused(bool focus); | 80 | void setFocused(bool focus); |
56 | 81 | void setFullscreen(bool fullscreen); | 81 | void setFullscreen(bool fullscreen); |
58 | 82 | void setSession(const std::shared_ptr<mir::shell::ApplicationSession>& session); | 82 | void setSession(const std::shared_ptr<mir::shell::Session>& session); |
59 | 83 | void setSessionName(const QString& name); | 83 | void setSessionName(const QString& name); |
60 | 84 | 84 | ||
61 | 85 | DesktopFileReader* m_desktopData; | 85 | DesktopFileReader* m_desktopData; |
62 | @@ -88,7 +88,7 @@ | |||
63 | 88 | State m_state; | 88 | State m_state; |
64 | 89 | bool m_focused; | 89 | bool m_focused; |
65 | 90 | bool m_fullscreen; | 90 | bool m_fullscreen; |
67 | 91 | std::shared_ptr<mir::shell::ApplicationSession> m_session; | 91 | std::shared_ptr<mir::shell::Session> m_session; |
68 | 92 | QString m_sessionName; | 92 | QString m_sessionName; |
69 | 93 | QStringList m_arguments; | 93 | QStringList m_arguments; |
70 | 94 | QTimer* m_suspendTimer; | 94 | QTimer* m_suspendTimer; |
71 | 95 | 95 | ||
72 | === modified file 'src/modules/Unity/Application/application_manager.cpp' | |||
73 | --- src/modules/Unity/Application/application_manager.cpp 2013-10-16 16:23:42 +0000 | |||
74 | +++ src/modules/Unity/Application/application_manager.cpp 2013-11-20 14:40:05 +0000 | |||
75 | @@ -29,7 +29,8 @@ | |||
76 | 29 | #include "logging.h" | 29 | #include "logging.h" |
77 | 30 | 30 | ||
78 | 31 | // mir | 31 | // mir |
80 | 32 | #include <mir/shell/session_manager.h> | 32 | #include <mir/shell/session.h> |
81 | 33 | #include <mir/shell/focus_controller.h> | ||
82 | 33 | #include <mir/shell/surface.h> | 34 | #include <mir/shell/surface.h> |
83 | 34 | 35 | ||
84 | 35 | // Qt | 36 | // Qt |
85 | @@ -172,7 +173,7 @@ | |||
86 | 172 | int from = m_applications.indexOf(application); | 173 | int from = m_applications.indexOf(application); |
87 | 173 | move(from, m_applications.length()-1); | 174 | move(from, m_applications.length()-1); |
88 | 174 | } else { | 175 | } else { |
90 | 175 | m_mirServer->the_session_manager()->set_focus_to(application->session()); | 176 | m_mirServer->the_focus_controller()->set_focus_to(application->session()); |
91 | 176 | } | 177 | } |
92 | 177 | 178 | ||
93 | 178 | // FIXME(dandrader): lying here. The operation is async. So we will only know whether | 179 | // FIXME(dandrader): lying here. The operation is async. So we will only know whether |
94 | @@ -186,7 +187,7 @@ | |||
95 | 186 | DLOG("ApplicationManager::unfocusCurrentApplication (this=%p)", this); | 187 | DLOG("ApplicationManager::unfocusCurrentApplication (this=%p)", this); |
96 | 187 | 188 | ||
97 | 188 | m_applicationToBeFocused = nullptr; | 189 | m_applicationToBeFocused = nullptr; |
99 | 189 | m_mirServer->the_session_manager()->set_focus_to(NULL); //FIXME(greyback) | 190 | m_mirServer->the_focus_controller()->set_focus_to(NULL); //FIXME(greyback) |
100 | 190 | } | 191 | } |
101 | 191 | 192 | ||
102 | 192 | Application* ApplicationManager::startApplication(const QString &appId, | 193 | Application* ApplicationManager::startApplication(const QString &appId, |
103 | @@ -437,7 +438,7 @@ | |||
104 | 437 | authorized = true; | 438 | authorized = true; |
105 | 438 | } | 439 | } |
106 | 439 | 440 | ||
108 | 440 | void ApplicationManager::onSessionStarting(std::shared_ptr<msh::ApplicationSession> const& session) | 441 | void ApplicationManager::onSessionStarting(std::shared_ptr<msh::Session> const& session) |
109 | 441 | { | 442 | { |
110 | 442 | DLOG("ApplicationManager::onSessionStarting (this=%p, application=%s)", this, session->name().c_str()); | 443 | DLOG("ApplicationManager::onSessionStarting (this=%p, application=%s)", this, session->name().c_str()); |
111 | 443 | 444 | ||
112 | @@ -457,7 +458,7 @@ | |||
113 | 457 | } | 458 | } |
114 | 458 | } | 459 | } |
115 | 459 | 460 | ||
117 | 460 | void ApplicationManager::onSessionStopping(std::shared_ptr<msh::ApplicationSession> const& session) | 461 | void ApplicationManager::onSessionStopping(std::shared_ptr<msh::Session> const& session) |
118 | 461 | { | 462 | { |
119 | 462 | DLOG("ApplicationManager::onSessionStopping (this=%p, application=%s)", this, session->name().c_str()); | 463 | DLOG("ApplicationManager::onSessionStopping (this=%p, application=%s)", this, session->name().c_str()); |
120 | 463 | 464 | ||
121 | @@ -478,7 +479,7 @@ | |||
122 | 478 | } | 479 | } |
123 | 479 | } | 480 | } |
124 | 480 | 481 | ||
126 | 481 | void ApplicationManager::onSessionFocused(std::shared_ptr<msh::ApplicationSession> const& session) | 482 | void ApplicationManager::onSessionFocused(std::shared_ptr<msh::Session> const& session) |
127 | 482 | { | 483 | { |
128 | 483 | DLOG("ApplicationManager::onSessionFocused (this=%p, application=%s)", this, session->name().c_str()); | 484 | DLOG("ApplicationManager::onSessionFocused (this=%p, application=%s)", this, session->name().c_str()); |
129 | 484 | Application* application = findApplicationWithSession(session); | 485 | Application* application = findApplicationWithSession(session); |
130 | @@ -520,7 +521,7 @@ | |||
131 | 520 | } | 521 | } |
132 | 521 | } | 522 | } |
133 | 522 | 523 | ||
135 | 523 | void ApplicationManager::onSessionCreatedSurface(msh::ApplicationSession const* session, | 524 | void ApplicationManager::onSessionCreatedSurface(msh::Session const* session, |
136 | 524 | std::shared_ptr<msh::Surface> const& surface) | 525 | std::shared_ptr<msh::Surface> const& surface) |
137 | 525 | { | 526 | { |
138 | 526 | DLOG("ApplicationManager::onSessionCreatedSurface (this=%p)", this); | 527 | DLOG("ApplicationManager::onSessionCreatedSurface (this=%p)", this); |
139 | 527 | 528 | ||
140 | === modified file 'src/modules/Unity/Application/application_manager.h' | |||
141 | --- src/modules/Unity/Application/application_manager.h 2013-10-11 14:23:22 +0000 | |||
142 | +++ src/modules/Unity/Application/application_manager.h 2013-11-20 14:40:05 +0000 | |||
143 | @@ -37,7 +37,6 @@ | |||
144 | 37 | 37 | ||
145 | 38 | namespace mir { | 38 | namespace mir { |
146 | 39 | namespace shell { | 39 | namespace shell { |
147 | 40 | class ApplicationSession; | ||
148 | 41 | class Session; | 40 | class Session; |
149 | 42 | class Surface; | 41 | class Surface; |
150 | 43 | } | 42 | } |
151 | @@ -84,12 +83,12 @@ | |||
152 | 84 | public Q_SLOTS: | 83 | public Q_SLOTS: |
153 | 85 | void authorizeSession(const quint64 pid, bool &authorized); | 84 | void authorizeSession(const quint64 pid, bool &authorized); |
154 | 86 | 85 | ||
158 | 87 | void onSessionStarting(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 86 | void onSessionStarting(std::shared_ptr<mir::shell::Session> const& session); |
159 | 88 | void onSessionStopping(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 87 | void onSessionStopping(std::shared_ptr<mir::shell::Session> const& session); |
160 | 89 | void onSessionFocused(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 88 | void onSessionFocused(std::shared_ptr<mir::shell::Session> const& session); |
161 | 90 | void onSessionUnfocused(); | 89 | void onSessionUnfocused(); |
162 | 91 | 90 | ||
164 | 92 | void onSessionCreatedSurface(mir::shell::ApplicationSession const*, std::shared_ptr<mir::shell::Surface> const&); | 91 | void onSessionCreatedSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const&); |
165 | 93 | 92 | ||
166 | 94 | void onProcessStartReportReceived(const QString& appId, const bool failure); | 93 | void onProcessStartReportReceived(const QString& appId, const bool failure); |
167 | 95 | void onProcessStopped(const QString& appId, const bool unexpected); | 94 | void onProcessStopped(const QString& appId, const bool unexpected); |
168 | 96 | 95 | ||
169 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.cpp' | |||
170 | --- src/modules/Unity/Application/mirsurfacemanager.cpp 2013-10-30 16:40:38 +0000 | |||
171 | +++ src/modules/Unity/Application/mirsurfacemanager.cpp 2013-11-20 14:40:05 +0000 | |||
172 | @@ -31,6 +31,9 @@ | |||
173 | 31 | #include "focussetter.h" | 31 | #include "focussetter.h" |
174 | 32 | #include "logging.h" | 32 | #include "logging.h" |
175 | 33 | 33 | ||
176 | 34 | // mir | ||
177 | 35 | #include <mir/shell/session.h> | ||
178 | 36 | |||
179 | 34 | namespace msh = mir::shell; | 37 | namespace msh = mir::shell; |
180 | 35 | 38 | ||
181 | 36 | MirSurfaceManager *MirSurfaceManager::the_surface_manager = nullptr; | 39 | MirSurfaceManager *MirSurfaceManager::the_surface_manager = nullptr; |
182 | @@ -96,7 +99,7 @@ | |||
183 | 96 | } | 99 | } |
184 | 97 | } | 100 | } |
185 | 98 | 101 | ||
187 | 99 | void MirSurfaceManager::sessionCreatedSurface(mir::shell::ApplicationSession const* session, std::shared_ptr<mir::shell::Surface> const& surface) | 102 | void MirSurfaceManager::sessionCreatedSurface(mir::shell::Session const* session, std::shared_ptr<mir::shell::Surface> const& surface) |
188 | 100 | { | 103 | { |
189 | 101 | DLOG("MirSurfaceManager::sessionCreatedSurface (this=%p) with surface name '%s'", this, surface->name().c_str()); | 104 | DLOG("MirSurfaceManager::sessionCreatedSurface (this=%p) with surface name '%s'", this, surface->name().c_str()); |
190 | 102 | ApplicationManager* appMgr = static_cast<ApplicationManager*>(ApplicationManager::singleton()); | 105 | ApplicationManager* appMgr = static_cast<ApplicationManager*>(ApplicationManager::singleton()); |
191 | @@ -107,7 +110,7 @@ | |||
192 | 107 | Q_EMIT surfaceCreated(qmlSurface); | 110 | Q_EMIT surfaceCreated(qmlSurface); |
193 | 108 | } | 111 | } |
194 | 109 | 112 | ||
196 | 110 | void MirSurfaceManager::sessionDestroyingSurface(mir::shell::ApplicationSession const*, std::shared_ptr<mir::shell::Surface> const& surface) | 113 | void MirSurfaceManager::sessionDestroyingSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const& surface) |
197 | 111 | { | 114 | { |
198 | 112 | DLOG("MirSurfaceManager::sessionDestroyingSurface (this=%p) with surface name '%s'", this, surface->name().c_str()); | 115 | DLOG("MirSurfaceManager::sessionDestroyingSurface (this=%p) with surface name '%s'", this, surface->name().c_str()); |
199 | 113 | 116 | ||
200 | 114 | 117 | ||
201 | === modified file 'src/modules/Unity/Application/mirsurfacemanager.h' | |||
202 | --- src/modules/Unity/Application/mirsurfacemanager.h 2013-10-18 09:25:20 +0000 | |||
203 | +++ src/modules/Unity/Application/mirsurfacemanager.h 2013-11-20 14:40:05 +0000 | |||
204 | @@ -30,7 +30,7 @@ | |||
205 | 30 | #include "mirsurface.h" | 30 | #include "mirsurface.h" |
206 | 31 | 31 | ||
207 | 32 | class ShellServerConfiguration; | 32 | class ShellServerConfiguration; |
209 | 33 | namespace mir { namespace shell { class Surface; class ApplicationSession; }} | 33 | namespace mir { namespace shell { class Surface; class Session; }} |
210 | 34 | 34 | ||
211 | 35 | class MirSurfaceManager : public QObject | 35 | class MirSurfaceManager : public QObject |
212 | 36 | { | 36 | { |
213 | @@ -54,8 +54,8 @@ | |||
214 | 54 | // void fullscreenSurfaceChanged(); | 54 | // void fullscreenSurfaceChanged(); |
215 | 55 | 55 | ||
216 | 56 | public Q_SLOTS: | 56 | public Q_SLOTS: |
219 | 57 | void sessionCreatedSurface(mir::shell::ApplicationSession const* session, std::shared_ptr<mir::shell::Surface> const&); | 57 | void sessionCreatedSurface(mir::shell::Session const* session, std::shared_ptr<mir::shell::Surface> const&); |
220 | 58 | void sessionDestroyingSurface(mir::shell::ApplicationSession const*, std::shared_ptr<mir::shell::Surface> const&); | 58 | void sessionDestroyingSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const&); |
221 | 59 | void shellSurfaceCreated(std::shared_ptr<mir::shell::Surface> const&); | 59 | void shellSurfaceCreated(std::shared_ptr<mir::shell::Surface> const&); |
222 | 60 | 60 | ||
223 | 61 | void surfaceAttributeChanged(mir::shell::Surface const*, MirSurfaceAttrib, int); | 61 | void surfaceAttributeChanged(mir::shell::Surface const*, MirSurfaceAttrib, int); |
224 | 62 | 62 | ||
225 | === modified file 'src/unity-mir/sessionlistener.cpp' | |||
226 | --- src/unity-mir/sessionlistener.cpp 2013-08-09 13:16:13 +0000 | |||
227 | +++ src/unity-mir/sessionlistener.cpp 2013-11-20 14:40:05 +0000 | |||
228 | @@ -17,18 +17,16 @@ | |||
229 | 17 | #include "sessionlistener.h" | 17 | #include "sessionlistener.h" |
230 | 18 | #include "logging.h" | 18 | #include "logging.h" |
231 | 19 | 19 | ||
232 | 20 | #include <mir/shell/application_session.h> | ||
233 | 21 | |||
234 | 22 | namespace msh = mir::shell; | 20 | namespace msh = mir::shell; |
235 | 23 | 21 | ||
237 | 24 | Q_DECLARE_METATYPE(std::shared_ptr<msh::ApplicationSession>) | 22 | Q_DECLARE_METATYPE(std::shared_ptr<msh::Session>) |
238 | 25 | 23 | ||
239 | 26 | SessionListener::SessionListener(QObject *parent) : | 24 | SessionListener::SessionListener(QObject *parent) : |
240 | 27 | QObject(parent) | 25 | QObject(parent) |
241 | 28 | { | 26 | { |
242 | 29 | DLOG("SessionListener::SessionListener (this=%p)", this); | 27 | DLOG("SessionListener::SessionListener (this=%p)", this); |
243 | 30 | // need to register type to send over threads with signal/slot | 28 | // need to register type to send over threads with signal/slot |
245 | 31 | qRegisterMetaType<std::shared_ptr<msh::ApplicationSession>>("std::shared_ptr<mir::shell::ApplicationSession>"); | 29 | qRegisterMetaType<std::shared_ptr<msh::Session>>("std::shared_ptr<mir::shell::Session>"); |
246 | 32 | } | 30 | } |
247 | 33 | 31 | ||
248 | 34 | SessionListener::~SessionListener() | 32 | SessionListener::~SessionListener() |
249 | @@ -36,24 +34,24 @@ | |||
250 | 36 | DLOG("SessionListener::~SessionListener (this=%p)", this); | 34 | DLOG("SessionListener::~SessionListener (this=%p)", this); |
251 | 37 | } | 35 | } |
252 | 38 | 36 | ||
254 | 39 | // Mir's default SurfaceManager calls these methods with instance of msh::ApplicationSession | 37 | // Mir's default SurfaceManager calls these methods with instance of msh::Session |
255 | 40 | // it is not a plain msh::Session | 38 | // it is not a plain msh::Session |
256 | 41 | void SessionListener::starting(std::shared_ptr<msh::Session> const& session) | 39 | void SessionListener::starting(std::shared_ptr<msh::Session> const& session) |
257 | 42 | { | 40 | { |
258 | 43 | DLOG("SessionListener::starting (this=%p, session=%p)", this, (void*)session.get()); | 41 | DLOG("SessionListener::starting (this=%p, session=%p)", this, (void*)session.get()); |
260 | 44 | Q_EMIT sessionStarting(std::static_pointer_cast<msh::ApplicationSession>(session)); | 42 | Q_EMIT sessionStarting(std::static_pointer_cast<msh::Session>(session)); |
261 | 45 | } | 43 | } |
262 | 46 | 44 | ||
263 | 47 | void SessionListener::stopping(std::shared_ptr<msh::Session> const& session) | 45 | void SessionListener::stopping(std::shared_ptr<msh::Session> const& session) |
264 | 48 | { | 46 | { |
265 | 49 | DLOG("SessionListener::stopping (this=%p, session=%p)", this, (void*)session.get()); | 47 | DLOG("SessionListener::stopping (this=%p, session=%p)", this, (void*)session.get()); |
267 | 50 | Q_EMIT sessionStopping(std::static_pointer_cast<msh::ApplicationSession>(session)); | 48 | Q_EMIT sessionStopping(std::static_pointer_cast<msh::Session>(session)); |
268 | 51 | } | 49 | } |
269 | 52 | 50 | ||
270 | 53 | void SessionListener::focused(std::shared_ptr<msh::Session> const& session) | 51 | void SessionListener::focused(std::shared_ptr<msh::Session> const& session) |
271 | 54 | { | 52 | { |
272 | 55 | DLOG("SessionListener::focused (this=%p, session=%p)", this, (void*)session.get()); | 53 | DLOG("SessionListener::focused (this=%p, session=%p)", this, (void*)session.get()); |
274 | 56 | Q_EMIT sessionFocused(std::static_pointer_cast<msh::ApplicationSession>(session)); | 54 | Q_EMIT sessionFocused(std::static_pointer_cast<msh::Session>(session)); |
275 | 57 | } | 55 | } |
276 | 58 | 56 | ||
277 | 59 | void SessionListener::unfocused() | 57 | void SessionListener::unfocused() |
278 | @@ -65,13 +63,11 @@ | |||
279 | 65 | void SessionListener::surface_created(msh::Session& session, std::shared_ptr<msh::Surface> const& surface) | 63 | void SessionListener::surface_created(msh::Session& session, std::shared_ptr<msh::Surface> const& surface) |
280 | 66 | { | 64 | { |
281 | 67 | DLOG("SessionListener::surface_created (this=%p, session=%p, surface=%p)", this, &session, (void*)surface.get()); | 65 | DLOG("SessionListener::surface_created (this=%p, session=%p, surface=%p)", this, &session, (void*)surface.get()); |
284 | 68 | msh::ApplicationSession &appSession = dynamic_cast<msh::ApplicationSession &>(session); | 66 | Q_EMIT sessionCreatedSurface(&session, surface); |
283 | 69 | Q_EMIT sessionCreatedSurface(&appSession, surface); | ||
285 | 70 | } | 67 | } |
286 | 71 | 68 | ||
287 | 72 | void SessionListener::destroying_surface(msh::Session& session, std::shared_ptr<mir::shell::Surface> const& surface) | 69 | void SessionListener::destroying_surface(msh::Session& session, std::shared_ptr<mir::shell::Surface> const& surface) |
288 | 73 | { | 70 | { |
289 | 74 | DLOG("SessionListener::destroying_surface (this=%p, session=%p, surface=%p)", this, &session, (void*)surface.get()); | 71 | DLOG("SessionListener::destroying_surface (this=%p, session=%p, surface=%p)", this, &session, (void*)surface.get()); |
292 | 75 | msh::ApplicationSession &appSession = dynamic_cast<msh::ApplicationSession &>(session); | 72 | Q_EMIT sessionDestroyingSurface(&session, surface); |
291 | 76 | Q_EMIT sessionDestroyingSurface(&appSession, surface); | ||
293 | 77 | } | 73 | } |
294 | 78 | 74 | ||
295 | === modified file 'src/unity-mir/sessionlistener.h' | |||
296 | --- src/unity-mir/sessionlistener.h 2013-08-09 13:16:13 +0000 | |||
297 | +++ src/unity-mir/sessionlistener.h 2013-11-20 14:40:05 +0000 | |||
298 | @@ -20,7 +20,6 @@ | |||
299 | 20 | #include <QObject> | 20 | #include <QObject> |
300 | 21 | 21 | ||
301 | 22 | #include "mir/shell/session_listener.h" | 22 | #include "mir/shell/session_listener.h" |
302 | 23 | #include "mir/shell/application_session.h" | ||
303 | 24 | 23 | ||
304 | 25 | class SessionListener : public QObject, public mir::shell::SessionListener | 24 | class SessionListener : public QObject, public mir::shell::SessionListener |
305 | 26 | { | 25 | { |
306 | @@ -38,13 +37,13 @@ | |||
307 | 38 | void destroying_surface(mir::shell::Session&, std::shared_ptr<mir::shell::Surface> const&) override; | 37 | void destroying_surface(mir::shell::Session&, std::shared_ptr<mir::shell::Surface> const&) override; |
308 | 39 | 38 | ||
309 | 40 | Q_SIGNALS: | 39 | Q_SIGNALS: |
313 | 41 | void sessionStarting(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 40 | void sessionStarting(std::shared_ptr<mir::shell::Session> const& session); |
314 | 42 | void sessionStopping(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 41 | void sessionStopping(std::shared_ptr<mir::shell::Session> const& session); |
315 | 43 | void sessionFocused(std::shared_ptr<mir::shell::ApplicationSession> const& session); | 42 | void sessionFocused(std::shared_ptr<mir::shell::Session> const& session); |
316 | 44 | void sessionUnfocused(); | 43 | void sessionUnfocused(); |
317 | 45 | 44 | ||
320 | 46 | void sessionCreatedSurface(mir::shell::ApplicationSession const*, std::shared_ptr<mir::shell::Surface> const&); | 45 | void sessionCreatedSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const&); |
321 | 47 | void sessionDestroyingSurface(mir::shell::ApplicationSession const*, std::shared_ptr<mir::shell::Surface> const&); | 46 | void sessionDestroyingSurface(mir::shell::Session const*, std::shared_ptr<mir::shell::Surface> const&); |
322 | 48 | }; | 47 | }; |
323 | 49 | 48 | ||
324 | 50 | #endif // SESSIONLISTENER_H | 49 | #endif // SESSIONLISTENER_H |
FAILED: Continuous integration, rev:142 jenkins. qa.ubuntu. com/job/ unity-mir- ci/153/ jenkins. qa.ubuntu. com/job/ unity-mir- trusty- amd64-ci/ 14/console jenkins. qa.ubuntu. com/job/ unity-mir- trusty- armhf-ci/ 14/console jenkins. qa.ubuntu. com/job/ unity-mir- trusty- i386-ci/ 14/console
http://
Executed test runs:
FAILURE: http://
FAILURE: http://
FAILURE: http://
Click here to trigger a rebuild: s-jenkins: 8080/job/ unity-mir- ci/153/ rebuild
http://