diff --git a/scene_opengl.h b/scene_opengl.h --- a/scene_opengl.h +++ b/scene_opengl.h @@ -141,9 +141,6 @@ virtual void updateProjectionMatrix() override; void paintCursor() override; -private Q_SLOTS: - void resetLanczosFilter(); - private: void performPaintWindow(EffectWindowImpl* w, int mask, QRegion region, WindowPaintData& data); QMatrix4x4 createProjectionMatrix() const; diff --git a/scene_opengl.cpp b/scene_opengl.cpp --- a/scene_opengl.cpp +++ b/scene_opengl.cpp @@ -1185,21 +1185,19 @@ if (mask & PAINT_WINDOW_LANCZOS) { if (!m_lanczosFilter) { m_lanczosFilter = new LanczosFilter(this); - // recreate the lanczos filter when the screen gets resized - connect(screens(), SIGNAL(changed()), SLOT(resetLanczosFilter())); + // reset the lanczos filter when the screen gets resized + // it will get created next paint + connect(screens(), &Screens::changed, this, [this]() { + makeOpenGLContextCurrent(); + delete m_lanczosFilter; + m_lanczosFilter = NULL; + }); } m_lanczosFilter->performPaint(w, mask, region, data); } else w->sceneWindow()->performPaint(mask, region, data); } -void SceneOpenGL2::resetLanczosFilter() -{ - // TODO: Qt5 - replace by a lambda slot - delete m_lanczosFilter; - m_lanczosFilter = NULL; -} - //**************************************** // SceneOpenGL::Texture //****************************************