summaryrefslogtreecommitdiffstats
path: root/src/corelib/thread/qthread.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-07-02 22:24:35 +0200
committerLorn Potter <lorn.potter@gmail.com>2018-08-17 00:35:03 +0000
commit67352c92761fcb2e2c6a98b24e1bf5f33805cb3a (patch)
tree6d085f8ef3556469891bef40e23660d84cf767ec /src/corelib/thread/qthread.cpp
parent0a06e1baf9e6da5308582b9dc928f4d9fea508d0 (diff)
Merge QThread class definitions
We can reuse the main QThread definition for the no-thread configuration and avoid having to keep them in sync. Add stub definitions for member functions where needed. Change-Id: I128db11684a6040d09c4a4ce114f1399cba523f8 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
Diffstat (limited to 'src/corelib/thread/qthread.cpp')
-rw-r--r--src/corelib/thread/qthread.cpp69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/corelib/thread/qthread.cpp b/src/corelib/thread/qthread.cpp
index a4101764bc..5df0508829 100644
--- a/src/corelib/thread/qthread.cpp
+++ b/src/corelib/thread/qthread.cpp
@@ -765,11 +765,80 @@ QThread::QThread(QObject *parent)
d->data->thread = this;
}
+QThread::~QThread()
+{
+
+}
+
+void QThread::run()
+{
+
+}
+
+int QThread::exec()
+{
+ return 0;
+}
+
+void QThread::start(Priority priority)
+{
+ Q_D(QThread);
+ Q_UNUSED(priority);
+ d->running = true;
+}
+
+void QThread::terminate()
+{
+
+}
+
+void QThread::quit()
+{
+
+}
+
+bool QThread::wait(unsigned long time)
+{
+ Q_UNUSED(time);
+ return false;
+}
+
+bool QThread::event(QEvent* event)
+{
+ return QObject::event(event);
+}
+
+Qt::HANDLE QThread::currentThreadId() Q_DECL_NOTHROW
+{
+ return Qt::HANDLE(currentThread());
+}
+
QThread *QThread::currentThread()
{
return QThreadData::current()->thread;
}
+int QThread::idealThreadCount() Q_DECL_NOTHROW
+{
+ return 1;
+}
+
+void QThread::yieldCurrentThread()
+{
+
+}
+
+bool QThread::isFinished() const
+{
+ return false;
+}
+
+bool QThread::isRunning() const
+{
+ Q_D(const QThread);
+ return d->running;
+}
+
// No threads: so we can just use static variables
static QThreadData *data = 0;