]> cloud.milkyroute.net Git - dolphin.git/commitdiff
Remove the "retrieved items" code from UpdateItemStatesThread and VersionControlObserver.
authorEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Thu, 16 Jan 2014 11:55:42 +0000 (12:55 +0100)
committerEmmanuel Pescosta <emmanuelpescosta099@gmail.com>
Thu, 16 Jan 2014 11:55:42 +0000 (12:55 +0100)
Showing an error message, makes no sense in this case - the user can see it when all items are "unversioned".
The plugins still have the ability to show error/warning messages on real errors. (and only where it makes sense ;)

REVIEW: 114992
FIXED-IN: 4.13

src/views/versioncontrol/updateitemstatesthread.cpp
src/views/versioncontrol/updateitemstatesthread.h
src/views/versioncontrol/versioncontrolobserver.cpp

index db50aa2e8bbae35e05c6f8c0d0c6fbfb8c7608b0..6bc3890988f910c304f2b0f157b4e866cf6cf27b 100644 (file)
@@ -28,7 +28,6 @@ UpdateItemStatesThread::UpdateItemStatesThread(KVersionControlPlugin* plugin,
     QThread(),
     m_globalPluginMutex(0),
     m_plugin(plugin),
-    m_retrievedItems(false),
     m_itemStates(itemStates)
 {
     // Several threads may share one instance of a plugin. A global
@@ -47,8 +46,6 @@ void UpdateItemStatesThread::run()
     Q_ASSERT(!m_itemStates.isEmpty());
     Q_ASSERT(m_plugin);
 
-    m_retrievedItems = false;
-
     QMutexLocker pluginLocker(m_globalPluginMutex);
     QMap<QString, QVector<VersionControlObserver::ItemState> >::iterator it = m_itemStates.begin();
     for (; it != m_itemStates.end(); ++it) {
@@ -69,7 +66,6 @@ void UpdateItemStatesThread::run()
             }
 
             m_plugin->endRetrieval();
-            m_retrievedItems = true;
         }
     }
 }
@@ -89,9 +85,4 @@ QMap<QString, QVector<VersionControlObserver::ItemState> > UpdateItemStatesThrea
     return m_itemStates;
 }
 
-bool UpdateItemStatesThread::retrievedItems() const
-{
-    return m_retrievedItems;
-}
-
 #include "updateitemstatesthread.moc"
index 2914bc2b747329dfb069a33c8ea66d8c5c3f3882..0e92a4cfd5e695aaa699b35bf0825fa52acfbecb 100644 (file)
@@ -65,8 +65,6 @@ public:
 
     QMap<QString, QVector<VersionControlObserver::ItemState> > itemStates() const;
 
-    bool retrievedItems() const;
-
 protected:
     virtual void run();
 
@@ -74,7 +72,6 @@ private:
     QMutex* m_globalPluginMutex; // Protects the m_plugin globally
     KVersionControlPlugin* m_plugin;
 
-    bool m_retrievedItems;
     QMap<QString, QVector<VersionControlObserver::ItemState> > m_itemStates;
 };
 
index c542542ee1277a33835d9435528969fd1bc61a82..888d93461134398fcf7ed58d9f9a95f7692c7016 100644 (file)
@@ -198,12 +198,6 @@ void VersionControlObserver::slotThreadFinished()
         return;
     }
 
-    if (!thread->retrievedItems()) {
-        // Ignore m_silentUpdate for an error message
-        emit errorMessage(i18nc("@info:status", "Update of version information failed."));
-        return;
-    }
-
     const QMap<QString, QVector<ItemState> >& itemStates = thread->itemStates();
     QMap<QString, QVector<ItemState> >::const_iterator it = itemStates.constBegin();
     for (; it != itemStates.constEnd(); ++it) {