#ifndef UPDATEITEMSTATESTHREAD_H
#define UPDATEITEMSTATESTHREAD_H
-#include <libdolphin_export.h>
-#include <views/versioncontrol/versioncontrolobserver.h>
+#include "dolphin_export.h"
+#include "views/versioncontrol/versioncontrolobserver.h"
#include <QMutex>
#include <QThread>
-class KVersionControlPlugin;
-
/**
* The performance of updating the version state of items depends
* on the used plugin. To prevent that Dolphin gets blocked by a
* slow plugin, the updating is delegated to a thread.
*/
-class LIBDOLPHINPRIVATE_EXPORT UpdateItemStatesThread : public QThread
+class DOLPHIN_EXPORT UpdateItemStatesThread : public QThread
{
Q_OBJECT
*/
UpdateItemStatesThread(KVersionControlPlugin* plugin,
const QMap<QString, QVector<VersionControlObserver::ItemState> >& itemStates);
- virtual ~UpdateItemStatesThread();
-
- /**
- * 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();
+ ~UpdateItemStatesThread() override;
QMap<QString, QVector<VersionControlObserver::ItemState> > itemStates() const;
protected:
- virtual void run();
+ void run() override;
private:
QMutex* m_globalPluginMutex; // Protects the m_plugin globally