]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/dolphinmainwindow.cpp
Fixed the signal connection that emits completed in Dolphin's KPart
[dolphin.git] / src / dolphinmainwindow.cpp
index c62d685f602b563c775f4a51b94ad0b662d52bfb..6800daefbefc5d60ab5eee6fc6bd4572c012f31d 100644 (file)
@@ -67,6 +67,7 @@
 #include <KIcon>
 #include <KIconLoader>
 #include <KIO/NetAccess>
+#include <KIO/JobUiDelegate>
 #include <KInputDialog>
 #include <KLocale>
 #include <KProtocolManager>
@@ -1284,11 +1285,14 @@ void DolphinMainWindow::handleUrl(const KUrl& url)
     } else if (KProtocolManager::supportsListing(url)) {
         // stat the URL to see if it is a dir or not
         m_lastHandleUrlStatJob = KIO::stat(url, KIO::HideProgressInfo);
+        if (m_lastHandleUrlStatJob->ui()) {
+            m_lastHandleUrlStatJob->ui()->setWindow(this);
+        }
         connect(m_lastHandleUrlStatJob, SIGNAL(result(KJob*)),
                 this, SLOT(slotHandleUrlStatFinished(KJob*)));
 
     } else {
-        new KRun(url, this);
+        new KRun(url, this); // Automatically deletes itself after being finished
     }
 }
 
@@ -1300,7 +1304,7 @@ void DolphinMainWindow::slotHandleUrlStatFinished(KJob* job)
     if (entry.isDir()) {
         activeViewContainer()->setUrl(url);
     } else {
-        new KRun(url, this);
+        new KRun(url, this);  // Automatically deletes itself after being finished
     }
 }