Commit 2cabd8e1 authored by Thomas Zander's avatar Thomas Zander

ok, that also didn't work; threadweaver doesn't use the event queue

so the deleteLater can be immediate.
Connect to done() instead. Which I should have used from the start...

svn path=/trunk/koffice/; revision=689041
parent 7234febc
......@@ -22,6 +22,7 @@
#include <QCoreApplication>
#include <QEvent>
#include <QThread>
#include <KDebug>
class ActionJobEvent : public QEvent {
public:
......@@ -35,6 +36,7 @@ ActionJob::ActionJob(KoAction *parent, Enable enable, const QVariant &params)
m_started(false),
m_params(params)
{
connect(this, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(deleteLater()));
}
void ActionJob::run() {
......@@ -64,7 +66,6 @@ bool ActionJob::event(QEvent *e) {
if(event) {
m_action->doActionUi(m_params);
m_semaphore.release();
deleteLater();
return true;
}
return QObject::event(e);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment