Commit 7197b201 authored by Thomas Zander's avatar Thomas Zander

Work around some QObject weirdnesses so I can create jobs even on a non-main-thread.

svn path=/trunk/koffice/; revision=689682
parent 8ccd22f6
......@@ -30,13 +30,14 @@ public:
};
ActionJob::ActionJob(KoAction *parent, Enable enable, const QVariant &params)
: Job(parent),
: Job(0), // don't pass a parent since QObject refuses to work when you pass a parent thats in a different thread
m_action(parent),
m_enable(enable),
m_started(false),
m_params(params)
{
connect(this, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(deleteLater()));
connect(this, SIGNAL(done(ThreadWeaver::Job*)), this, SLOT(deleteLater()), Qt::DirectConnection);
moveToThread(QCoreApplication::instance()->thread());
}
void ActionJob::run() {
......
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