summaryrefslogtreecommitdiffstats
path: root/job.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'job.cpp')
-rw-r--r--job.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/job.cpp b/job.cpp
index 684cb71..ae3a9e2 100644
--- a/job.cpp
+++ b/job.cpp
@@ -3,7 +3,8 @@
#include <QtConcurrentRun>
Job::Job(QObject *parent)
- : QObject(parent)
+ : QObject(parent),
+ m_gui(0)
{
m_watcher = new QFutureWatcher<bool>;
m_watcher->setParent(this);
@@ -17,3 +18,9 @@ void Job::jobFinished()
{
emit completed(m_watcher->future().result());
}
+QWidget* Job::widget()
+{
+ if (!m_gui)
+ m_gui = gui();
+ return m_gui;
+}