on xenial help sign in
removed SurfaceManager::onSurfaceAboutToBeDestroyed
commitfcca2b65e418c9f8a44550a518f4ee24e8c47ab4 authorNick Dedekind <nicholas.dedekind@gmail.com> dateWed 13 Aug 2014, 15:42 (12 years ago) parent2276543
2 files changed+3−8
tests/mocks/Unity/Application/SurfaceManager.cpp+3−6 tests/mocks/Unity/Application/SurfaceManager.h−2
tests/mocks/Unity/Application/SurfaceManager.cpp+3−6
@@ -46,7 +46,9 @@ MirSurfaceItem *SurfaceManager::createSurface(const QString& name,
4646 state,
4747 screenshot);
4848 registerSurface(surface);
49− connect(surface, &MirSurfaceItem::aboutToBeDestroyed, this, &SurfaceManager::onSurfaceAboutToBeDestroyed);
49+ connect(surface, &MirSurfaceItem::aboutToBeDestroyed, this, [&] {
50+ Q_EMIT surfaceDestroyed(qobject_cast<MirSurfaceItem*>(sender()));
51+ });
5052 Q_EMIT surfaceCreated(surface);
5153 return surface;
5254}
@@ -59,11 +61,6 @@ void SurfaceManager::registerSurface(MirSurfaceItem *surface)
5961 this, &SurfaceManager::hideInputMethod);
6062}
6163
62−void SurfaceManager::onSurfaceAboutToBeDestroyed()
63−{
64− Q_EMIT surfaceDestroyed(qobject_cast<MirSurfaceItem*>(sender()));
65−}
66−
6764void SurfaceManager::showInputMethod()
6865{
6966 inputMethodSurface()->setState(MirSurfaceItem::Restored);
tests/mocks/Unity/Application/SurfaceManager.h−2
@@ -52,8 +52,6 @@ private Q_SLOTS:
5252 void showInputMethod();
5353 void hideInputMethod();
5454
55− void onSurfaceAboutToBeDestroyed();
56−
5755private:
5856 static SurfaceManager *the_surface_manager;
5957 VirtualKeyboard *m_virtualKeyboard;