From d197a7e5319cb86ab3479c23828af226365d6049 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Wed, 24 Mar 2010 22:41:06 +0000 Subject: Renamed methods and improved documentation, as in the previous patch the wrong mutex has been used accidently because of the confusing naming of the methods. svn path=/trunk/KDE/kdebase/apps/; revision=1107136 --- src/versioncontrol/updateitemstatesthread.h | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'src/versioncontrol/updateitemstatesthread.h') diff --git a/src/versioncontrol/updateitemstatesthread.h b/src/versioncontrol/updateitemstatesthread.h index f99188014..8467c87d7 100644 --- a/src/versioncontrol/updateitemstatesthread.h +++ b/src/versioncontrol/updateitemstatesthread.h @@ -41,11 +41,30 @@ public: UpdateItemStatesThread(); virtual ~UpdateItemStatesThread(); + /** + * @param plugin Version control plugin that is used to update the + * state of the items. Whenever the plugin is accessed + * from the thread creator after starting the thread, + * UpdateItemStatesThread::lockPlugin() and + * UpdateItemStatesThread::unlockPlugin() must be used. + * @param itemStates List of items, where the states get updated. + */ void setData(KVersionControlPlugin* plugin, const QList& itemStates); - bool beginReadItemStates(); - void endReadItemStates(); + /** + * Whenever the plugin is accessed by the thread creator, lockPlugin() must + * be invoked. True is returned, if the plugin could be locked within 300 + * milliseconds. + */ + bool lockPlugin(); + + /** + * Must be invoked if lockPlugin() returned true and plugin has been accessed + * by the thread creator. + */ + void unlockPlugin(); + QList itemStates() const; bool retrievedItems() const; -- cgit v1.3