diff --git a/src/plugins/screenshot/screenshotdbusinterface2.cpp b/src/plugins/screenshot/screenshotdbusinterface2.cpp index 0d11d7a1d7..9d8a28645e 100644 --- a/src/plugins/screenshot/screenshotdbusinterface2.cpp +++ b/src/plugins/screenshot/screenshotdbusinterface2.cpp @@ -176,7 +176,7 @@ public: QVariantMap attributes() const override; private: - Output *m_screen; + QString m_name; }; class ScreenShotSourceArea2 : public ScreenShotSource2 @@ -197,7 +197,7 @@ public: QVariantMap attributes() const override; private: - EffectWindow *m_window; + QUuid m_internalId; }; class ScreenShotSinkPipe2 : public QObject @@ -248,14 +248,14 @@ ScreenShotSourceScreen2::ScreenShotSourceScreen2(ScreenShotEffect *effect, Output *screen, ScreenShotFlags flags) : ScreenShotSource2(effect->scheduleScreenShot(screen, flags)) - , m_screen(screen) + , m_name(screen->name()) { } QVariantMap ScreenShotSourceScreen2::attributes() const { return QVariantMap{ - {QStringLiteral("screen"), m_screen->name()}, + {QStringLiteral("screen"), m_name}, }; } @@ -270,14 +270,14 @@ ScreenShotSourceWindow2::ScreenShotSourceWindow2(ScreenShotEffect *effect, EffectWindow *window, ScreenShotFlags flags) : ScreenShotSource2(effect->scheduleScreenShot(window, flags)) - , m_window(window) + , m_internalId(window->internalId()) { } QVariantMap ScreenShotSourceWindow2::attributes() const { return QVariantMap{ - {QStringLiteral("windowId"), m_window->internalId().toString()}, + {QStringLiteral("windowId"), m_internalId.toString()}, }; }