take an optional parent parameter, always be sure the job has a parent
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=866341
This commit is contained in:
parent
443a3b3352
commit
266765dd9b
@ -132,7 +132,7 @@ KConfigGroup Service::operationDescription(const QString &operationName)
|
||||
return params;
|
||||
}
|
||||
|
||||
ServiceJob* Service::startOperationCall(const KConfigGroup &description)
|
||||
ServiceJob* Service::startOperationCall(const KConfigGroup &description, QObject *parent)
|
||||
{
|
||||
// TODO: nested groups?
|
||||
ServiceJob *job = 0;
|
||||
@ -159,6 +159,7 @@ ServiceJob* Service::startOperationCall(const KConfigGroup &description)
|
||||
job = new NullServiceJob(destination(), op, this);
|
||||
}
|
||||
|
||||
job->setParent(parent ? parent : this);
|
||||
connect(job, SIGNAL(finished(KJob*)), this, SLOT(jobFinished(KJob*)));
|
||||
QTimer::singleShot(0, job, SLOT(slotStart()));
|
||||
return job;
|
||||
|
@ -123,7 +123,7 @@ public:
|
||||
* @return a started ServiceJob; the consumer may connect to relevant
|
||||
* signals before returning to the event loop
|
||||
*/
|
||||
ServiceJob* startOperationCall(const KConfigGroup &description);
|
||||
ServiceJob* startOperationCall(const KConfigGroup &description, QObject *parent = 0);
|
||||
|
||||
/**
|
||||
* Query to find if an operation is enabled or not.
|
||||
|
Loading…
Reference in New Issue
Block a user