Hello community,

here is the log from the commit of package plasma-framework for 
openSUSE:Factory checked in at 2018-05-06 15:00:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/plasma-framework (Old)
 and      /work/SRC/openSUSE:Factory/.plasma-framework.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "plasma-framework"

Sun May  6 15:00:50 2018 rev:59 rq:603979 version:5.45.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/plasma-framework/plasma-framework.changes        
2018-04-19 15:19:50.174529195 +0200
+++ /work/SRC/openSUSE:Factory/.plasma-framework.new/plasma-framework.changes   
2018-05-06 15:00:51.670363383 +0200
@@ -1,0 +2,23 @@
+Fri May  4 10:50:48 UTC 2018 - wba...@tmo.at
+
+- Remove outdated calendar.svgz from the Air and Oxygen themes to
+  fix showing event markers in the calendar (boo#1091832)
+- Add Air-Oxygen-themes-Bump-version.patch to raise the version of
+  these 2 themes, otherwise Plasma would reuse existing caches
+  rendering the above fix ineffective
+
+-------------------------------------------------------------------
+Fri May  4 08:55:32 UTC 2018 - fab...@ritter-vogt.de
+
+- Add patches to fix window thumbnails on Nvidia:
+  * 0001-Revert-windowthumbnail-Use-gamma-correct-scaling.patch
+  * 0002-Revert-windowthumbnail-Use-mipmap-texture-filtering.patch
+
+-------------------------------------------------------------------
+Thu May  3 11:10:11 UTC 2018 - wba...@tmo.at
+
+- Add Dont-alter-memory-management-to-hide-an-item.patch to fix a
+  possible Plasma crash when changing the desktop layout
+  (kde#391642)
+
+-------------------------------------------------------------------

New:
----
  0001-Revert-windowthumbnail-Use-gamma-correct-scaling.patch
  0002-Revert-windowthumbnail-Use-mipmap-texture-filtering.patch
  Air-Oxygen-themes-Bump-version.patch
  Dont-alter-memory-management-to-hide-an-item.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ plasma-framework.spec ++++++
--- /var/tmp/diff_new_pack.OQUyHU/_old  2018-05-06 15:00:52.502332849 +0200
+++ /var/tmp/diff_new_pack.OQUyHU/_new  2018-05-06 15:00:52.506332702 +0200
@@ -32,6 +32,13 @@
 Url:            https://projects.kde.org/plasma-framework
 Source:         
http://download.kde.org/stable/frameworks/%{_tar_path}/%{name}-%{version}.tar.xz
 Source1:        baselibs.conf
+# PATCH-FIX-UPSTREAM
+Patch0:         Dont-alter-memory-management-to-hide-an-item.patch
+# PATCH-FIX-UPSTREAM
+Patch1:         0001-Revert-windowthumbnail-Use-gamma-correct-scaling.patch
+Patch2:         0002-Revert-windowthumbnail-Use-mipmap-texture-filtering.patch
+# PATCH-FIX-UPSTREAM
+Patch3:         Air-Oxygen-themes-Bump-version.patch
 BuildRequires:  extra-cmake-modules >= %{_kf5_bugfix_version}
 BuildRequires:  fdupes
 BuildRequires:  kactivities5-devel >= 5.19.0
@@ -128,6 +135,10 @@
 %lang_package
 %prep
 %setup -q
+%autopatch -p1
+
+# these files are outdated and break showing event markers in Plasma's 
calendar, have been removed upstream for 5.46
+rm src/desktoptheme/air/widgets/calendar.svgz 
src/desktoptheme/oxygen/widgets/calendar.svgz
 
 %build
   %cmake_kf5 -d build

++++++ 0001-Revert-windowthumbnail-Use-gamma-correct-scaling.patch ++++++
>From f7c1752ae1204f1ef9f5e917308ea1cf388dc2fe Mon Sep 17 00:00:00 2001
From: David Edmundson <k...@davidedmundson.co.uk>
Date: Tue, 1 May 2018 23:48:55 +0100
Subject: [PATCH 1/2] Revert "windowthumbnail: Use gamma correct scaling"

This reverts commit 42d3fde1eef6866640cee8671b07dc81fa2df28c.
---
 src/declarativeimports/core/windowthumbnail.cpp | 34 +++----------------------
 1 file changed, 4 insertions(+), 30 deletions(-)

diff --git a/src/declarativeimports/core/windowthumbnail.cpp 
b/src/declarativeimports/core/windowthumbnail.cpp
index 5f687b98e..906455d96 100644
--- a/src/declarativeimports/core/windowthumbnail.cpp
+++ b/src/declarativeimports/core/windowthumbnail.cpp
@@ -440,20 +440,13 @@ bool 
WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode)
         static bool haveTextureStorage = !ctx->isOpenGLES() &&
                                           
ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_storage"));
 
-        static bool sRGB = !ctx->isOpenGLES() &&
-                            
ctx->hasExtension(QByteArrayLiteral("GL_ARB_framebuffer_sRGB")) &&
-                            
ctx->hasExtension(QByteArrayLiteral("GL_EXT_texture_sRGB_decode"));
-
         // Save the GL state
-        GLuint prevReadFb = 0, prevDrawFb = 0, prevTex2D = 0, prevScissorTest 
= 0, prevFramebufferSrgb = 0;
+        GLuint prevReadFb = 0, prevDrawFb = 0, prevTex2D = 0, prevScissorTest 
= 0;
         funcs->glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (GLint *) 
&prevReadFb);
         funcs->glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (GLint *) 
&prevDrawFb);
         funcs->glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *) &prevTex2D);
         funcs->glGetIntegerv(GL_SCISSOR_TEST, (GLint *) &prevScissorTest);
 
-        if (sRGB)
-            funcs->glGetIntegerv(GL_FRAMEBUFFER_SRGB, (GLint *) 
&prevFramebufferSrgb);
-
         if (m_glxPixmap == XCB_PIXMAP_NONE) {
             xcb_connection_t *c = QX11Info::connection();
             auto attrCookie = xcb_get_window_attributes_unchecked(c, m_winId);
@@ -488,9 +481,9 @@ bool WindowThumbnail::windowToTextureGLX(WindowTextureNode 
*textureNode)
             funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, levels 
- 1);
 
             if (haveTextureStorage)
-                extraFuncs->glTexStorage2D(GL_TEXTURE_2D, levels, sRGB ? 
GL_SRGB8_ALPHA8 : GL_RGBA8, width, height);
+                extraFuncs->glTexStorage2D(GL_TEXTURE_2D, levels, GL_RGBA8, 
width, height);
             else
-                funcs->glTexImage2D(GL_TEXTURE_2D, 0, sRGB ? GL_SRGB8_ALPHA8 : 
GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
+                funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 
0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
 
             GLuint framebuffers[2];
             funcs->glGenFramebuffers(2, framebuffers);
@@ -514,10 +507,6 @@ bool WindowThumbnail::windowToTextureGLX(WindowTextureNode 
*textureNode)
         funcs->glFramebufferTexture2D(GL_READ_FRAMEBUFFER, 
GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0);
         funcs->glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, 
GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_mipmaps, 0);
 
-        // Disable sRGB encoding so there is no conversion in the blit
-        if (sRGB && prevFramebufferSrgb)
-            glDisable(GL_FRAMEBUFFER_SRGB);
-
         if (prevScissorTest)
             glDisable(GL_SCISSOR_TEST);
 
@@ -525,25 +514,10 @@ bool 
WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode)
                                       0, 0, size.width(), size.height(),
                                       GL_COLOR_BUFFER_BIT, GL_NEAREST);
 
-        funcs->glBindTexture(GL_TEXTURE_2D, m_mipmaps);
-
-        if (sRGB) {
-            // Enable sRGB encoding and decoding when generating the mipmaps
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT, 
GL_DECODE_EXT);
-            funcs->glEnable(GL_FRAMEBUFFER_SRGB);
-        }
-
         // Regenerate the miplevels
+        funcs->glBindTexture(GL_TEXTURE_2D, m_mipmaps);
         funcs->glGenerateMipmap(GL_TEXTURE_2D);
 
-        if (sRGB) {
-            // Disable sRGB decoding again, so the texture is rendered 
correctly in the QtQuick scene
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_SRGB_DECODE_EXT, 
GL_SKIP_DECODE_EXT);
-
-            if (!prevFramebufferSrgb)
-                funcs->glDisable(GL_FRAMEBUFFER_SRGB);
-        }
-
         // Restore the GL state
         funcs->glBindFramebuffer(GL_READ_FRAMEBUFFER, prevReadFb);
         funcs->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, prevDrawFb);
-- 
2.16.2

++++++ 0002-Revert-windowthumbnail-Use-mipmap-texture-filtering.patch ++++++
>From 505295ce4b4887625295cdb70891949e28e087e8 Mon Sep 17 00:00:00 2001
From: David Edmundson <k...@davidedmundson.co.uk>
Date: Thu, 3 May 2018 23:14:24 +0100
Subject: [PATCH 2/2] Revert "windowthumbnail: Use mipmap texture filtering"

This reverts commit 612494e2b2e9265d33ce148332d5f490b024a3bd.

This caused a huge regression for some drivers breaking functionality
completely. Better to revert for now, and try again when we have it
fully working.

See 393241
---
 src/declarativeimports/core/windowthumbnail.cpp | 130 +-----------------------
 src/declarativeimports/core/windowthumbnail.h   |   3 -
 2 files changed, 5 insertions(+), 128 deletions(-)

diff --git a/src/declarativeimports/core/windowthumbnail.cpp 
b/src/declarativeimports/core/windowthumbnail.cpp
index 906455d96..f9e955479 100644
--- a/src/declarativeimports/core/windowthumbnail.cpp
+++ b/src/declarativeimports/core/windowthumbnail.cpp
@@ -23,13 +23,9 @@
 #include <QGuiApplication>
 #include <QIcon>
 #include <QOpenGLContext>
-#include <QOpenGLFunctions>
-#include <QOpenGLExtraFunctions>
 #include <QQuickWindow>
 #include <QRunnable>
 
-#include <cmath>
-
 // X11
 #if HAVE_XCB_COMPOSITE
 #include <QX11Info>
@@ -57,9 +53,6 @@ namespace Plasma
 class DiscardGlxPixmapRunnable : public QRunnable {
 public:
     DiscardGlxPixmapRunnable(
-        uint,
-        uint,
-        uint,
         uint,
         QFunctionPointer,
         xcb_pixmap_t
@@ -67,20 +60,13 @@ public:
     void run() Q_DECL_OVERRIDE;
 private:
     uint m_texture;
-    uint m_mipmaps;
-    uint m_readFb;
-    uint m_drawFb;
     QFunctionPointer m_releaseTexImage;
     xcb_pixmap_t m_glxPixmap;
 };
 
-DiscardGlxPixmapRunnable::DiscardGlxPixmapRunnable(uint texture, uint mipmaps, 
uint readFb, uint drawFb,
-                                                   QFunctionPointer 
deleteFunction, xcb_pixmap_t pixmap)
+DiscardGlxPixmapRunnable::DiscardGlxPixmapRunnable(uint texture, 
QFunctionPointer deleteFunction, xcb_pixmap_t pixmap)
     : QRunnable(),
     m_texture(texture),
-    m_mipmaps(mipmaps),
-    m_readFb(readFb),
-    m_drawFb(drawFb),
     m_releaseTexImage(deleteFunction),
     m_glxPixmap(pixmap)
 {}
@@ -91,12 +77,7 @@ void DiscardGlxPixmapRunnable::run()
         Display *d = QX11Info::display();
         ((glXReleaseTexImageEXT_func)(m_releaseTexImage))(d, m_glxPixmap, 
GLX_FRONT_LEFT_EXT);
         glXDestroyPixmap(d, m_glxPixmap);
-
-        GLuint textures[] = { m_texture, m_mipmaps };
-        GLuint framebuffers[] = { m_readFb, m_drawFb };
-
-        glDeleteTextures(2, textures);
-        QOpenGLContext::currentContext()->functions()->glDeleteFramebuffers(2, 
framebuffers);
+        glDeleteTextures(1, &m_texture);
     }
 }
 #endif //HAVE_GLX
@@ -133,27 +114,6 @@ void DiscardEglPixmapRunnable::run()
 #endif//HAVE_EGL
 #endif //HAVE_XCB_COMPOSITE
 
-// QSGSimpleTextureNode does not support mipmap filtering, so this is the
-// only way to prevent it from setting TEXTURE_MIN_FILTER to LINEAR.
-class ThumbnailTexture : public QSGTexture
-{
-public:
-    ThumbnailTexture(int texture, const QSize &size) : m_texture(texture), 
m_size(size) {}
-    void bind() override final { glBindTexture(GL_TEXTURE_2D, m_texture); }
-    bool hasAlphaChannel() const override final { return true; }
-    bool hasMipmaps() const override final { return true; }
-    int textureId() const override final { return m_texture; }
-    QSize textureSize() const override final { return m_size; }
-
-private:
-    int m_texture;
-    QSize m_size;
-};
-
-
-// ------------------------------------------------------------------
-
-
 WindowTextureNode::WindowTextureNode()
     : QSGSimpleTextureNode()
 {
@@ -185,9 +145,6 @@ WindowThumbnail::WindowThumbnail(QQuickItem *parent)
     , m_damage(XCB_NONE)
     , m_pixmap(XCB_PIXMAP_NONE)
     , m_texture(0)
-    , m_mipmaps(0)
-    , m_readFb(0)
-    , m_drawFb(0)
 #if HAVE_GLX
     , m_glxPixmap(XCB_PIXMAP_NONE)
     , m_bindTexImage(nullptr)
@@ -277,9 +234,6 @@ void WindowThumbnail::releaseResources()
 #if HAVE_GLX
     if (m_glxPixmap != XCB_PIXMAP_NONE) {
         window()->scheduleRenderJob(new DiscardGlxPixmapRunnable(m_texture,
-                                                        m_mipmaps,
-                                                        m_readFb,
-                                                        m_drawFb,
                                                         m_releaseTexImage,
                                                         m_glxPixmap),
                                                         m_renderStage);
@@ -431,22 +385,6 @@ bool WindowThumbnail::windowToTextureGLX(WindowTextureNode 
*textureNode)
         if (!m_bindTexImage || !m_releaseTexImage) {
             return false;
         }
-
-        QOpenGLContext *ctx = QOpenGLContext::currentContext();
-
-        QOpenGLFunctions *funcs = ctx->functions();
-        QOpenGLExtraFunctions *extraFuncs = ctx->extraFunctions();
-
-        static bool haveTextureStorage = !ctx->isOpenGLES() &&
-                                          
ctx->hasExtension(QByteArrayLiteral("GL_ARB_texture_storage"));
-
-        // Save the GL state
-        GLuint prevReadFb = 0, prevDrawFb = 0, prevTex2D = 0, prevScissorTest 
= 0;
-        funcs->glGetIntegerv(GL_READ_FRAMEBUFFER_BINDING, (GLint *) 
&prevReadFb);
-        funcs->glGetIntegerv(GL_DRAW_FRAMEBUFFER_BINDING, (GLint *) 
&prevDrawFb);
-        funcs->glGetIntegerv(GL_TEXTURE_BINDING_2D, (GLint *) &prevTex2D);
-        funcs->glGetIntegerv(GL_SCISSOR_TEST, (GLint *) &prevScissorTest);
-
         if (m_glxPixmap == XCB_PIXMAP_NONE) {
             xcb_connection_t *c = QX11Info::connection();
             auto attrCookie = xcb_get_window_attributes_unchecked(c, m_winId);
@@ -469,64 +407,10 @@ bool 
WindowThumbnail::windowToTextureGLX(WindowTextureNode *textureNode)
                 return false;
             }
 
-            const uint32_t width = geo->width;
-            const uint32_t height = geo->height;
-            const uint32_t levels = std::log2(std::min(width, height)) + 1;
-
-            funcs->glBindTexture(GL_TEXTURE_2D, m_mipmaps);
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, 
GL_LINEAR_MIPMAP_LINEAR);
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 
GL_LINEAR);
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, 
GL_CLAMP_TO_EDGE);
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, 
GL_CLAMP_TO_EDGE);
-            funcs->glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAX_LEVEL, levels 
- 1);
-
-            if (haveTextureStorage)
-                extraFuncs->glTexStorage2D(GL_TEXTURE_2D, levels, GL_RGBA8, 
width, height);
-            else
-                funcs->glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 
0, GL_RGBA, GL_UNSIGNED_BYTE, nullptr);
-
-            GLuint framebuffers[2];
-            funcs->glGenFramebuffers(2, framebuffers);
-
-            m_readFb = framebuffers[0];
-            m_drawFb = framebuffers[1];
-
-            ThumbnailTexture *texture = new ThumbnailTexture(m_mipmaps, 
QSize(width, height));
-            textureNode->reset(texture);
+            textureNode->reset(window()->createTextureFromId(m_texture, 
QSize(geo->width, geo->height), QQuickWindow::TextureCanUseAtlas));
         }
-
-        funcs->glBindTexture(GL_TEXTURE_2D, m_texture);
+        textureNode->texture()->bind();
         bindGLXTexture();
-
-        const QSize size = textureNode->texture()->textureSize();
-
-        // Blit the window texture to the mipmap texture
-        funcs->glBindFramebuffer(GL_READ_FRAMEBUFFER, m_readFb);
-        funcs->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, m_drawFb);
-
-        funcs->glFramebufferTexture2D(GL_READ_FRAMEBUFFER, 
GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_texture, 0);
-        funcs->glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, 
GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, m_mipmaps, 0);
-
-        if (prevScissorTest)
-            glDisable(GL_SCISSOR_TEST);
-
-        extraFuncs->glBlitFramebuffer(0, 0, size.width(), size.height(),
-                                      0, 0, size.width(), size.height(),
-                                      GL_COLOR_BUFFER_BIT, GL_NEAREST);
-
-        // Regenerate the miplevels
-        funcs->glBindTexture(GL_TEXTURE_2D, m_mipmaps);
-        funcs->glGenerateMipmap(GL_TEXTURE_2D);
-
-        // Restore the GL state
-        funcs->glBindFramebuffer(GL_READ_FRAMEBUFFER, prevReadFb);
-        funcs->glBindFramebuffer(GL_DRAW_FRAMEBUFFER, prevDrawFb);
-
-        funcs->glBindTexture(GL_TEXTURE_2D, prevTex2D);
-
-        if (prevScissorTest)
-            glEnable(GL_SCISSOR_TEST);
-
         return true;
     }
     return false;
@@ -917,11 +801,7 @@ bool WindowThumbnail::loadGLXTexture()
         return false;
     }
 
-    GLuint textures[2];
-    glGenTextures(2, textures);
-
-    m_texture = textures[0];
-    m_mipmaps = textures[1];
+    glGenTextures(1, &m_texture);
 
     const int attrs[] = {
         GLX_TEXTURE_FORMAT_EXT, info->textureFormat,
diff --git a/src/declarativeimports/core/windowthumbnail.h 
b/src/declarativeimports/core/windowthumbnail.h
index be2eab6a2..bd667af58 100644
--- a/src/declarativeimports/core/windowthumbnail.h
+++ b/src/declarativeimports/core/windowthumbnail.h
@@ -126,9 +126,6 @@ private:
 
 /*The following must *only* be used from the render thread*/
     uint m_texture;
-    uint m_mipmaps;
-    uint m_readFb;
-    uint m_drawFb;
 #if HAVE_GLX
     bool windowToTextureGLX(WindowTextureNode *textureNode);
     void resolveGLXFunctions();
-- 
2.16.2

++++++ Air-Oxygen-themes-Bump-version.patch ++++++
>From af9a4680aa147ff883f73ced150610dd7ec2b6e4 Mon Sep 17 00:00:00 2001
From: "Friedrich W. H. Kossebau" <kosse...@kde.org>
Date: Thu, 3 May 2018 16:24:42 +0200
Subject: [Air & Oxygen themes] Bump version for calendar event marker fix

---
 src/desktoptheme/air/metadata.desktop    | 2 +-
 src/desktoptheme/oxygen/metadata.desktop | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/desktoptheme/air/metadata.desktop 
b/src/desktoptheme/air/metadata.desktop
index a38faef..c48acd9 100644
--- a/src/desktoptheme/air/metadata.desktop
+++ b/src/desktoptheme/air/metadata.desktop
@@ -95,7 +95,7 @@ Comment[zh_TW]=吸一口新鮮空氣
 X-KDE-PluginInfo-Author=The Oxygen Project
 X-KDE-PluginInfo-Email=kde-arti...@kde.org
 X-KDE-PluginInfo-Name=air
-X-KDE-PluginInfo-Version=1.2
+X-KDE-PluginInfo-Version=1.3
 X-KDE-PluginInfo-Website=http://plasma.kde.org
 X-KDE-PluginInfo-Category=
 X-KDE-PluginInfo-Depends=
diff --git a/src/desktoptheme/oxygen/metadata.desktop 
b/src/desktoptheme/oxygen/metadata.desktop
index 54b232a..c8b0776 100644
--- a/src/desktoptheme/oxygen/metadata.desktop
+++ b/src/desktoptheme/oxygen/metadata.desktop
@@ -95,7 +95,7 @@ Comment[zh_TW]=以 Oxygen 樣式完成的外觀主題
 X-KDE-PluginInfo-Author=The Oxygen Project
 X-KDE-PluginInfo-Email=kde-arti...@kde.org
 X-KDE-PluginInfo-Name=oxygen
-X-KDE-PluginInfo-Version=1.0
+X-KDE-PluginInfo-Version=1.1
 X-KDE-PluginInfo-Website=http://plasma.kde.org
 X-KDE-PluginInfo-Category=
 X-KDE-PluginInfo-Depends=
-- 
cgit v0.11.2

++++++ Dont-alter-memory-management-to-hide-an-item.patch ++++++
>From 2785916d01b26f5e9747bdf38428adce0a121842 Mon Sep 17 00:00:00 2001
From: David Edmundson <k...@davidedmundson.co.uk>
Date: Tue, 10 Apr 2018 14:38:52 +0100
Subject: Don't alter memory management to hide an item

Summary:
The original owner of a graphics item is the declarative applet script which
is owned and deleted by the applet.

Reparenting the containmentquickitem to the containment doesn't really
solve anything useful, we were originally effectively owned by the
containment(an applet subclass) not the view anyway.

This code also accidentally moves the destruction of the applet from being in
::~Applet to being in ::~QObject of the relevant containment. This
causes a big problem if the AppletQuickItem tries to access the applet
in it's own destructor. The applet object still exists, but use of
Applet member variables is not valid.

The new preloading code does this, leading to a crash.

BUG: 391642

Test Plan:
Changed desktop to folder twice
Changed activities twice

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: rikmills, #frameworks

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D12064
---
 src/plasmaquick/containmentview.cpp | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/plasmaquick/containmentview.cpp 
b/src/plasmaquick/containmentview.cpp
index 91c81dd..d5a3623 100644
--- a/src/plasmaquick/containmentview.cpp
+++ b/src/plasmaquick/containmentview.cpp
@@ -75,11 +75,8 @@ void 
ContainmentViewPrivate::setContainment(Plasma::Containment *cont)
     if (containment) {
         QObject::disconnect(containment, 0, q, 0);
         QObject *oldGraphicObject = 
containment->property("_plasma_graphicObject").value<QObject *>();
-        if (oldGraphicObject) {
-//             qDebug() << "Old graphics Object:" << oldGraphicObject << "Old 
containment" << containment.data();
-            //make sure the graphic object won't die with us
-            //FIXME:we need a way to reparent to *NO* graphics item, but this 
makes Qt crash
-            oldGraphicObject->setParent(containment);
+        if (auto item = qobject_cast<QQuickItem*>(oldGraphicObject)) {
+            item->setVisible(false);
         }
         containment->reactToScreenChange();
     }
-- 
cgit v0.11.2


Reply via email to