]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Let's remove the connect errors because of the KJob/KIO::Job split.
authorKevin Ottens <ervin@kde.org>
Sat, 25 Nov 2006 17:30:07 +0000 (17:30 +0000)
committerKevin Ottens <ervin@kde.org>
Sat, 25 Nov 2006 17:30:07 +0000 (17:30 +0000)
svn path=/trunk/playground/utils/dolphin/; revision=607764

src/dolphin.cpp
src/dolphin.h
src/undomanager.cpp
src/undomanager.h
src/urlnavigatorbutton.cpp
src/urlnavigatorbutton.h

index ac1f067a4914c492e3dcfa96d994907101358c5b..db4f468890d5da720041f21d64e909a045a6864e 100644 (file)
@@ -555,10 +555,10 @@ void Dolphin::deleteItems()
                                                        ) == KMessageBox::Continue;
     if (del) {
         KIO::Job* job = KIO::del(list);
-        connect(job, SIGNAL(result(KIO::Job*)),
-                this, SLOT(slotHandleJobError(KIO::Job*)));
-        connect(job, SIGNAL(result(KIO::Job*)),
-                this, SLOT(slotDeleteFileFinished(KIO::Job*)));
+        connect(job, SIGNAL(result(KJob*)),
+                this, SLOT(slotHandleJobError(KJob*)));
+        connect(job, SIGNAL(result(KJob*)),
+                this, SLOT(slotDeleteFileFinished(KJob*)));
     }
 }
 
@@ -586,7 +586,7 @@ void Dolphin::quit()
     close();
 }
 
-void Dolphin::slotHandleJobError(KIO::Job* job)
+void Dolphin::slotHandleJobError(KJob* job)
 {
     if (job->error() != 0) {
         m_activeView->statusBar()->setMessage(job->errorString(),
@@ -594,7 +594,7 @@ void Dolphin::slotHandleJobError(KIO::Job* job)
     }
 }
 
-void Dolphin::slotDeleteFileFinished(KIO::Job* job)
+void Dolphin::slotDeleteFileFinished(KJob* job)
 {
     if (job->error() == 0) {
         m_activeView->statusBar()->setMessage(i18n("Delete operation completed."),
@@ -1000,7 +1000,7 @@ void Dolphin::editSettings()
     dlg.exec();
 }
 
-void Dolphin::addUndoOperation(KIO::Job* job)
+void Dolphin::addUndoOperation(KJob* job)
 {
     if (job->error() != 0) {
         slotHandleJobError(job);
@@ -1028,7 +1028,12 @@ void Dolphin::addUndoOperation(KIO::Job* job)
                 // all source Urls must be updated with the trash Url. E. g. when moving
                 // a file "test.txt" and a second file "test.txt" to the trash,
                 // then the filenames in the trash are "0-test.txt" and "1-test.txt".
-                QMap<QString, QString> metaData = job->metaData();
+                QMap<QString, QString> metaData;
+                KIO::Job *kiojob = qobject_cast<KIO::Job*>( job );
+                if ( kiojob )
+                {
+                    metaData = kiojob->metaData();
+                }
                 KUrl::List newSourceUrls;
 
                 KUrl::List sourceUrls = command.source();
@@ -1613,8 +1618,8 @@ void Dolphin::addPendingUndoJob(KIO::Job* job,
                                 const KUrl::List& source,
                                 const KUrl& dest)
 {
-    connect(job, SIGNAL(result(KIO::Job*)),
-            this, SLOT(addUndoOperation(KIO::Job*)));
+    connect(job, SIGNAL(result(KJob*)),
+            this, SLOT(addUndoOperation(KJob*)));
 
     UndoInfo undoInfo;
     undoInfo.id = job->progressId();
index c1e481a5de50d24a70ed89816fbcfb295e6edb78..0013b4de8c29e8a290dbbeed4fd7f73075967795 100644 (file)
@@ -215,13 +215,13 @@ private slots:
      * Shows the error information of the job \a job
      * in the status bar.
      */
-    void slotHandleJobError(KIO::Job* job);
+    void slotHandleJobError(KJob* job);
 
     /**
      * Indicates in the status bar that the delete operation
      * of the job \a job has been finished.
      */
-    void slotDeleteFileFinished(KIO::Job* job);
+    void slotDeleteFileFinished(KJob* job);
 
     /**
      * Updates the state of the 'Undo' menu action dependent
@@ -366,7 +366,7 @@ private slots:
      * Adds the undo operation given by \a job
      * to the UndoManager.
      */
-    void addUndoOperation(KIO::Job* job);
+    void addUndoOperation(KJob* job);
 
 
     void toggleSidebar();
index cf7d97713912dcb18bd7a60576990f8bd767e6d5..4e3ec054bed4093320dc2669e5edb01b0a9f08fd 100644 (file)
@@ -313,8 +313,8 @@ void UndoManager::redo()
         if (job != 0) {
             // Execute the jobs in a synchronous manner and forward the progress
             // information to the Dolphin statusbar.
-            connect(job, SIGNAL(percent(KIO::Job*, unsigned long)),
-                    this, SLOT(slotPercent(KIO::Job*, unsigned long)));
+            connect(job, SIGNAL(percent(KJob*, unsigned long)),
+                    this, SLOT(slotPercent(KJob*, unsigned long)));
             KIO::NetAccess::synchronousRun(job, &dolphin);
         }
 
@@ -358,7 +358,7 @@ QString UndoManager::commandText(const DolphinCommand& command) const
     return text;
 }
 
-void UndoManager::slotPercent(KIO::Job* /* job */, unsigned long /* percent */)
+void UndoManager::slotPercent(KJob* /* job */, unsigned long /* percent */)
 {
     // It is not allowed to update the progress indicator in the context
     // of this slot, hence do an asynchronous triggering.
index 145c232e1a3fef9d04c7786b129a2907607f7e27..ac2c2bb37c7ab0d52adf8e06103c24acffa5c46e 100644 (file)
@@ -165,7 +165,7 @@ private slots:
      * Delegates the updating of the progress information
      * to UndoManager::updateProgress().
      */
-    void slotPercent(KIO::Job* job, unsigned long percent);
+    void slotPercent(KJob* job, unsigned long percent);
 
     /**
      * Updates the progress information of the statusbar
index fab2b81e97d6a66973f69a8743d3f6d86c146688..f9c5b407b68b7bcb8ead7c0cd883aa4d4b4f71c9 100644 (file)
@@ -282,7 +282,7 @@ void UrlNavigatorButton::startListJob()
 
     connect(m_listJob, SIGNAL(entries(KIO::Job*, const KIO::UDSEntryList &)),
             this, SLOT(entriesList(KIO::Job*, const KIO::UDSEntryList&)));
-    connect(m_listJob, SIGNAL(result(KIO::Job*)), this, SLOT(listJobFinished(KIO::Job*)));
+    connect(m_listJob, SIGNAL(result(KJob*)), this, SLOT(listJobFinished(KJob*)));
 }
 
 void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& entries)
@@ -330,7 +330,7 @@ void UrlNavigatorButton::entriesList(KIO::Job* job, const KIO::UDSEntryList& ent
     m_subdirs.sort();
 }
 
-void UrlNavigatorButton::listJobFinished(KIO::Job* job)
+void UrlNavigatorButton::listJobFinished(KJob* job)
 {
     if (job != m_listJob) {
         return;
index 5ce54b31d41c07f23ee2c5c734ea85f35c8b1fb8..f0a69ea34f1b9ddfc321f8e1de9855eaf4476716 100644 (file)
@@ -75,7 +75,7 @@ private slots:
     void stopPopupDelay();
     void startListJob();
     void entriesList(KIO::Job* job, const KIO::UDSEntryList& entries);
-    void listJobFinished(KIO::Job* job);
+    void listJobFinished(KJob* job);
 
 private:
     int arrowWidth() const;