[rkward-cvs] SF.net SVN: rkward:[3692] trunk/rkward/rkward/windows/rkhtmlwindow.cpp

tfry at users.sourceforge.net tfry at users.sourceforge.net
Fri Jun 17 11:48:50 UTC 2011


Revision: 3692
          http://rkward.svn.sourceforge.net/rkward/?rev=3692&view=rev
Author:   tfry
Date:     2011-06-17 11:48:50 +0000 (Fri, 17 Jun 2011)

Log Message:
-----------
Workaround for http://www.mail-archive.com/rkward-devel@lists.sourceforge.net/msg01345.html

Modified Paths:
--------------
    trunk/rkward/rkward/windows/rkhtmlwindow.cpp

Modified: trunk/rkward/rkward/windows/rkhtmlwindow.cpp
===================================================================
--- trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2011-06-16 17:22:24 UTC (rev 3691)
+++ trunk/rkward/rkward/windows/rkhtmlwindow.cpp	2011-06-17 11:48:50 UTC (rev 3692)
@@ -22,7 +22,7 @@
 #include <klocale.h>
 #include <kiconloader.h>
 #include <kmessagebox.h>
-#include <kparts/partmanager.h>
+#include <kparts/plugin.h>
 #include <kactioncollection.h>
 #include <kdirwatch.h>
 #include <kmimetype.h>
@@ -92,6 +92,15 @@
 RKHTMLWindow::~RKHTMLWindow () {
 	RK_TRACE (APP);
 
+// WORKAROUND for annoying kdelibs bug (KDE 4.0 up to at least KDE 4.6): Status bar icons added by plugins typically do not get deleted in case the KParts::StatusBarExtension
+// has already been deleted, first. See http://www.mail-archive.com/rkward-devel@lists.sourceforge.net/msg01345.html . Therefore, delete the plugins, explicitely, while the
+// StatusBarExtension is still alive...
+	foreach (KParts::Plugin *plugin, KParts::Plugin::pluginObjects (khtmlpart)) {
+		delete plugin;
+	}
+// I hope this does not come back to bite us one day... If it does, here's a safer variant, which simply hides the problem (the way it is hidden in konqueror, among others):
+// 	RKWardMainWindow::getMain ()->partManager ()->setActivePart (0);
+// WORKAROUND end
 	delete khtmlpart;
 }
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the rkward-tracker mailing list