mirror of
https://bitbucket.org/smil3y/kdelibs.git
synced 2025-02-24 02:42:48 +00:00
plasma: replace QReadWriteLock with QMutex
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
78802289b0
commit
025826275d
1 changed files with 4 additions and 9 deletions
|
@ -21,8 +21,7 @@
|
||||||
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
|
||||||
#include <QReadWriteLock>
|
#include <QMutex>
|
||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
|
@ -40,12 +39,8 @@
|
||||||
#include "abstractrunner.h"
|
#include "abstractrunner.h"
|
||||||
#include "querymatch.h"
|
#include "querymatch.h"
|
||||||
|
|
||||||
//#define LOCK_FOR_READ(d) if (d->policy == Shared) { d->lock.lockForRead(); }
|
#define LOCK_FOR_READ(d) d->lock.lock();
|
||||||
//#define LOCK_FOR_WRITE(d) if (d->policy == Shared) { d->lock.lockForWrite(); }
|
#define LOCK_FOR_WRITE(d) d->lock.lock();
|
||||||
//#define UNLOCK(d) if (d->policy == Shared) { d->lock.unlock(); }
|
|
||||||
|
|
||||||
#define LOCK_FOR_READ(d) d->lock.lockForRead();
|
|
||||||
#define LOCK_FOR_WRITE(d) d->lock.lockForWrite();
|
|
||||||
#define UNLOCK(d) d->lock.unlock();
|
#define UNLOCK(d) d->lock.unlock();
|
||||||
|
|
||||||
namespace Plasma
|
namespace Plasma
|
||||||
|
@ -249,7 +244,7 @@ class RunnerContextPrivate : public QSharedData
|
||||||
q = &s_dummyContext;
|
q = &s_dummyContext;
|
||||||
}
|
}
|
||||||
|
|
||||||
QReadWriteLock lock;
|
QMutex lock;
|
||||||
QList<QueryMatch> matches;
|
QList<QueryMatch> matches;
|
||||||
QMap<QString, const QueryMatch*> matchesById;
|
QMap<QString, const QueryMatch*> matchesById;
|
||||||
QHash<QString, int> launchCounts;
|
QHash<QString, int> launchCounts;
|
||||||
|
|
Loading…
Add table
Reference in a new issue