Blob Blame History Raw
From a02df05e4bd083f98147c86f88da2f818fc6c9f4 Mon Sep 17 00:00:00 2001
From: Alex Merry <alex.merry@kde.org>
Date: Tue, 15 Dec 2015 19:26:47 +0000
Subject: [PATCH 1/3] Revert "backport commit
 b72fc5e56579035bf987075e16324ef95ef8e3d4"

This reverts commit 4f7ea2f770cf062ef22293fbb21a086f3e0cbfcb.

This change seems to be causing more problems than it fixes - it's
probably just too big of a behaviour change for kdelibs. Which means
that akregator will probably keep randomly crashing, but the alternative
seems to be various other applications consistently crashing at exit.

If we can fix those applications (Kopete in particular), we can consider
re-applying this afterwards.

BUG: 355275
---
 kparts/part.cpp           | 2 +-
 kparts/tests/parttest.cpp | 2 --
 2 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/kparts/part.cpp b/kparts/part.cpp
index 2cfee81..20089d4 100644
--- a/kparts/part.cpp
+++ b/kparts/part.cpp
@@ -350,7 +350,7 @@ void Part::slotWidgetDestroyed()
     d->m_widget = 0;
     if (d->m_autoDeletePart) {
         kDebug(1000) << "deleting part" << objectName();
-        this->deleteLater();
+        delete this; // ouch, this should probably be deleteLater()
     }
 }
 
diff --git a/kparts/tests/parttest.cpp b/kparts/tests/parttest.cpp
index 232aa07..e48b578 100644
--- a/kparts/tests/parttest.cpp
+++ b/kparts/tests/parttest.cpp
@@ -48,7 +48,6 @@ void PartTest::testAutoDeletePart()
     KParts::Part* part = new TestPart(0, 0);
     QPointer<KParts::Part> partPointer(part);
     delete part->widget();
-    QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
     QVERIFY(partPointer.isNull());
 }
 
@@ -58,7 +57,6 @@ void PartTest::testAutoDeleteWidget()
     QPointer<KParts::Part> partPointer(part);
     QPointer<QWidget> widgetPointer(part->widget());
     delete part;
-    QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
     QVERIFY(widgetPointer.isNull());
 }
 
-- 
2.5.0