make the bigLock publicly accessible; BIC, so thankfully caught before release!

svn path=/trunk/KDE/kdelibs/; revision=896193
This commit is contained in:
Aaron J. Seigo 2008-12-12 20:10:50 +00:00
parent 06e7a940b0
commit dbce22540c
2 changed files with 15 additions and 3 deletions

View File

@ -258,7 +258,7 @@ KService::List AbstractRunner::serviceQuery(const QString &serviceType, const QS
return KServiceTypeTrader::self()->query(serviceType, constraint);
}
QMutex* AbstractRunner::bigLock() const
QMutex* AbstractRunner::bigLock()
{
return s_bigLock;
}

View File

@ -219,6 +219,20 @@ class PLASMA_EXPORT AbstractRunner : public QObject
*/
virtual void reloadConfiguration();
/**
* Access to a shared lock that all runners (and code that manages/interacts with them)
* can share to protect access to non-thread-safe shared code or data.
* Access of KSycoca records, for instance, is one place this lock should be used.
*
* Common usage:
*
* {
* QMutexLocker lock(bigLock());
* .. do something that isn't thread safe ..
* }
*/
static QMutex *bigLock();
protected:
friend class RunnerManager;
friend class RunnerManagerPrivate;
@ -269,8 +283,6 @@ class PLASMA_EXPORT AbstractRunner : public QObject
KService::List serviceQuery(const QString &serviceType,
const QString &constraint = QString()) const;
QMutex *bigLock() const;
/**
* A given match can have more than action that can be performed on it.
* For example, a song match returned by a music player runner can be queued,