summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/widgets/tutorials/threads/hellothread/hellothread.cpp3
-rw-r--r--examples/widgets/tutorials/threads/hellothread/hellothread.h5
-rw-r--r--examples/widgets/tutorials/threads/hellothread/main.cpp2
3 files changed, 2 insertions, 8 deletions
diff --git a/examples/widgets/tutorials/threads/hellothread/hellothread.cpp b/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
index 4395b0cb2b..1b5088e0db 100644
--- a/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
+++ b/examples/widgets/tutorials/threads/hellothread/hellothread.cpp
@@ -44,10 +44,7 @@
* demonstrates use of QThread, says hello in another thread and terminates
*/
-//! [1]
-// hellothread/hellothread.cpp
void HelloThread::run()
{
qDebug() << "hello from worker thread " << thread()->currentThreadId();
}
-//! [1]
diff --git a/examples/widgets/tutorials/threads/hellothread/hellothread.h b/examples/widgets/tutorials/threads/hellothread/hellothread.h
index c2d8ad73ee..281f2c6cb5 100644
--- a/examples/widgets/tutorials/threads/hellothread/hellothread.h
+++ b/examples/widgets/tutorials/threads/hellothread/hellothread.h
@@ -42,13 +42,12 @@
#define HELLOTHREAD_H
#include <QThread>
-//! [1]
-// hellothread/hellothread.h
+
class HelloThread : public QThread
{
Q_OBJECT
private:
void run();
};
-//! [1]
+
#endif // HELLOTHREAD_H
diff --git a/examples/widgets/tutorials/threads/hellothread/main.cpp b/examples/widgets/tutorials/threads/hellothread/main.cpp
index 87660f97ee..8b4b00874f 100644
--- a/examples/widgets/tutorials/threads/hellothread/main.cpp
+++ b/examples/widgets/tutorials/threads/hellothread/main.cpp
@@ -41,7 +41,6 @@
#include <QtCore>
#include "hellothread.h"
-//! [1]
int main(int argc, char *argv[])
{
QCoreApplication app(argc, argv);
@@ -51,4 +50,3 @@ int main(int argc, char *argv[])
thread.wait(); // do not exit before the thread is completed!
return 0;
}
-//! [1]