[PATCH] Take care also of the KJob::finished signal in KPart - it also fixes Ark's BUG 187538

Alessandro Diaferia alediaferia at gmail.com
Mon Apr 6 12:16:27 BST 2009


A one line-patch that fixes a crash for Ark: when the user stops the job via
the notification handler the m_job var should be set to 0 in order to avoid
future crashes when exiting the application. This doesn't get done until the
finished signal is connected to the proper slot.

Hope this is useful.

-- 
Alessandro Diaferia
KDE Developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20090406/5c3c0137/attachment.htm>
-------------- next part --------------
Index: part.cpp
===================================================================
--- part.cpp	(revision 949906)
+++ part.cpp	(working copy)
@@ -585,6 +585,7 @@ bool ReadOnlyPart::openUrl( const KUrl &
         d->m_job->ui()->setWindow( widget() ? widget()->topLevelWidget() : 0 );
         emit started( d->m_job );
         connect( d->m_job, SIGNAL( result( KJob * ) ), this, SLOT( _k_slotJobFinished ( KJob * ) ) );
+        connect( d->m_job, SIGNAL( finished( KJob * ) ), this, SLOT( _k_slotJobFinished ( KJob * ) ) );
         connect(d->m_job, SIGNAL(mimetype(KIO::Job *, const QString &)),
                 this, SLOT(_k_slotGotMimeType(KIO::Job *, const QString&)));
         return true;


More information about the kde-core-devel mailing list