┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/views/versioncontrol/updateitemstatesthread.h
diff options
context:
space:
mode:
authorSimeon Bird <[email protected]>2013-01-12 10:37:26 -0500
committerSimeon Bird <[email protected]>2013-01-15 11:11:59 -0500
commit7fe1278b1e2aaec2408bf053092f8f11ef4cbfdb (patch)
treec5208032532e2d4596c4985e0116dca72a3873fa /src/views/versioncontrol/updateitemstatesthread.h
parent72de114a94c9a8d313c517a694be63662a7d10c2 (diff)
We don't need the mutex guarding m_itemStates in the
UpdateItemStatesThread, because m_itemStates is only accessed by the when the thread is done, and set before the thread starts. Also combine the setData function with the constructor.
Diffstat (limited to 'src/views/versioncontrol/updateitemstatesthread.h')
-rw-r--r--src/views/versioncontrol/updateitemstatesthread.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/views/versioncontrol/updateitemstatesthread.h b/src/views/versioncontrol/updateitemstatesthread.h
index f0f91d7d2..a28169755 100644
--- a/src/views/versioncontrol/updateitemstatesthread.h
+++ b/src/views/versioncontrol/updateitemstatesthread.h
@@ -38,9 +38,6 @@ class LIBDOLPHINPRIVATE_EXPORT UpdateItemStatesThread : public QThread
Q_OBJECT
public:
- UpdateItemStatesThread();
- virtual ~UpdateItemStatesThread();
-
/**
* @param plugin Version control plugin that is used to update the
* state of the items. Whenever the plugin is accessed
@@ -49,8 +46,9 @@ public:
* UpdateItemStatesThread::unlockPlugin() must be used.
* @param itemStates List of items, where the states get updated.
*/
- void setData(KVersionControlPlugin* plugin,
- const QList<VersionControlObserver::ItemState>& itemStates);
+ UpdateItemStatesThread(KVersionControlPlugin* plugin,
+ const QList<VersionControlObserver::ItemState>& itemStates);
+ virtual ~UpdateItemStatesThread();
/**
* Whenever the plugin is accessed by the thread creator, lockPlugin() must
@@ -76,7 +74,6 @@ private:
QMutex* m_globalPluginMutex; // Protects the m_plugin globally
KVersionControlPlugin* m_plugin;
- mutable QMutex m_itemMutex; // Protects m_retrievedItems and m_itemStates
bool m_retrievedItems;
QList<VersionControlObserver::ItemState> m_itemStates;
};