X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/8a46dd8d8e2374fda5a27d2079ef30722ee08000..a7692611315065b308cd8243563cc50d40bd0f71:/src/views/versioncontrol/updateitemstatesthread.cpp diff --git a/src/views/versioncontrol/updateitemstatesthread.cpp b/src/views/versioncontrol/updateitemstatesthread.cpp index db50aa2e8..7b806a592 100644 --- a/src/views/versioncontrol/updateitemstatesthread.cpp +++ b/src/views/versioncontrol/updateitemstatesthread.cpp @@ -20,6 +20,7 @@ #include "updateitemstatesthread.h" #include +#include #include @@ -28,7 +29,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 +47,6 @@ void UpdateItemStatesThread::run() Q_ASSERT(!m_itemStates.isEmpty()); Q_ASSERT(m_plugin); - m_retrievedItems = false; - QMutexLocker pluginLocker(m_globalPluginMutex); QMap >::iterator it = m_itemStates.begin(); for (; it != m_itemStates.end(); ++it) { @@ -67,21 +65,10 @@ void UpdateItemStatesThread::run() items[i].version = static_cast(state); } } - - m_plugin->endRetrieval(); - m_retrievedItems = true; } - } -} - -bool UpdateItemStatesThread::lockPlugin() -{ - return m_globalPluginMutex->tryLock(300); -} -void UpdateItemStatesThread::unlockPlugin() -{ - m_globalPluginMutex->unlock(); + m_plugin->endRetrieval(); + } } QMap > UpdateItemStatesThread::itemStates() const @@ -89,9 +76,3 @@ QMap > UpdateItemStatesThrea return m_itemStates; } -bool UpdateItemStatesThread::retrievedItems() const -{ - return m_retrievedItems; -} - -#include "updateitemstatesthread.moc"