rpms/konq-plugins/F-9 konq-plugins-4.0.3-searchbar-crash.patch, NONE, 1.1 konq-plugins.spec, 1.3, 1.4

Kevin Kofler (kkofler) fedora-extras-commits at redhat.com
Sun May 4 19:22:20 UTC 2008


Author: kkofler

Update of /cvs/pkgs/rpms/konq-plugins/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv4255/F-9

Modified Files:
	konq-plugins.spec 
Added Files:
	konq-plugins-4.0.3-searchbar-crash.patch 
Log Message:
* Sun May 04 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.0.3-0.3.20080409svn
- fix searchbar plugin crash (#445144)

konq-plugins-4.0.3-searchbar-crash.patch:

--- NEW FILE konq-plugins-4.0.3-searchbar-crash.patch ---
Index: searchbar/searchbar.cpp
===================================================================
--- searchbar/searchbar.cpp	(revision 794424)
+++ searchbar/searchbar.cpp	(revision 794423)
@@ -36,6 +36,7 @@
 #include <kurifilter.h>
 #include <kservice.h>
 #include <kparts/mainwindow.h>
+#include <kparts/partmanager.h>
 #include <kactioncollection.h>
 
 #include <qpainter.h>
@@ -89,8 +90,16 @@
 
 	configurationChanged();
 
-        // parent is the KonqMainWindow and we want to listen to PartActivateEvent events.
-        parent->installEventFilter(this);
+	KParts::MainWindow *mainWin = static_cast<KParts::MainWindow*>(parent);
+
+	//Grab the part manager. Don't know of any other way, and neither does Tronical, so..
+	KParts::PartManager *partMan = qFindChild<KParts::PartManager*>(mainWin, QString());
+	if (partMan)
+	{
+		connect(partMan, SIGNAL(activePartChanged(KParts::Part*)),
+		                 SLOT  (partChanged      (KParts::Part*)));
+		partChanged(partMan->activePart());
+	}
 }
 
 SearchBarPlugin::~SearchBarPlugin()
@@ -114,11 +123,8 @@
 
 bool SearchBarPlugin::eventFilter(QObject *o, QEvent *e)
 {
-    if (qobject_cast<KMainWindow*>(o) && KParts::PartActivateEvent::test(e)) {
-        KParts::PartActivateEvent* partEvent = static_cast<KParts::PartActivateEvent *>(e);
-        m_part = qobject_cast<KParts::ReadOnlyPart *>(partEvent->part());
-    }
-    else if(o == m_searchCombo->lineEdit() && e->type() == QEvent::KeyPress) {
+	if( o==m_searchCombo->lineEdit() && e->type() == QEvent::KeyPress )
+	{
 		QKeyEvent *k = (QKeyEvent *)e;
 		if(k->modifiers() & Qt::ControlModifier)
 		{


Index: konq-plugins.spec
===================================================================
RCS file: /cvs/pkgs/rpms/konq-plugins/F-9/konq-plugins.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- konq-plugins.spec	16 Apr 2008 18:00:43 -0000	1.3
+++ konq-plugins.spec	4 May 2008 19:21:42 -0000	1.4
@@ -5,7 +5,7 @@
 
 Name:           konq-plugins
 Version:        4.0.3 
-Release:        0.2.%{svn_date}svn%{?dist}
+Release:        0.3.%{svn_date}svn%{?dist}
 Summary:        Additional plugins that interact with konqueror
 
 Group:          Applications/Internet
@@ -31,6 +31,9 @@
 Patch0:         konq-plugins-4.0.2-cmakelists.patch
 # Install the documentation into the right subdir
 Patch1:         konq-plugins-4.0.1-docsdir.patch
+# Revert (relevant parts of) http://websvn.kde.org/?view=rev&revision=794424
+# Fixes searchbar plugin crash (#445144)
+Patch2:         konq-plugins-4.0.3-searchbar-crash.patch
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
@@ -69,6 +72,7 @@
 
 %patch0 -p1 -b .cmakelists
 %patch1 -p1 -b .docsdir
+%patch2 -p0 -b .searchbar-crash
 
 %build
 mkdir -p %{_target_platform}
@@ -131,6 +135,9 @@
 %{_kde4_appsdir}/konqueror/icons/oxygen/*/actions/google.*
 
 %changelog
+* Sun May 04 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.0.3-0.3.20080409svn
+- fix searchbar plugin crash (#445144)
+
 * Wed Apr 16 2008 Kevin Kofler <Kevin at tigcc.ticalc.org> - 4.0.3-0.2.20080409svn
 - rebuild because of corrupt PPC RPM causing signing failure (#442761)
 




More information about the fedora-extras-commits mailing list