Change bigLock QMutex from static to nonstatic. This fixes a nasty bug that caused Amarok to hang on exit.

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=814540
This commit is contained in:
Mark Kretschmann 2008-05-30 16:13:57 +00:00
parent dd95e5a8e6
commit b98775d66f

View File

@ -85,10 +85,9 @@ public:
int fastRuns; int fastRuns;
Package *package; Package *package;
static QMutex bigLock; QMutex bigLock;
}; };
QMutex AbstractRunner::Private::bigLock;
AbstractRunner::AbstractRunner(QObject* parent, const QString& serviceId) AbstractRunner::AbstractRunner(QObject* parent, const QString& serviceId)
: QObject(parent), : QObject(parent),
@ -203,13 +202,13 @@ void AbstractRunner::setIgnoredTypes(RunnerContext::Types types)
KService::List AbstractRunner::serviceQuery(const QString &serviceType, const QString &constraint) const KService::List AbstractRunner::serviceQuery(const QString &serviceType, const QString &constraint) const
{ {
QMutexLocker lock(&Private::bigLock); QMutexLocker lock(&d->bigLock);
return KServiceTypeTrader::self()->query(serviceType, constraint); return KServiceTypeTrader::self()->query(serviceType, constraint);
} }
QMutex* AbstractRunner::bigLock() const QMutex* AbstractRunner::bigLock() const
{ {
return &Private::bigLock; return &d->bigLock;
} }
void AbstractRunner::run(const Plasma::RunnerContext &search, const Plasma::QueryMatch &action) void AbstractRunner::run(const Plasma::RunnerContext &search, const Plasma::QueryMatch &action)