mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-12 12:54:29 +00:00
Remove the "retrieved items" code from UpdateItemStatesThread and VersionControlObserver.
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
This commit is contained in:
parent
8a46dd8d8e
commit
419c7578f0
|
@ -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"
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue