Doc: Fix syntax/compiler error in QThread snippet
Change-Id: If64e01099b50f15b5cf7cdb0890dfa4f7625126d Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
This commit is contained in:
parent
82fd626ded
commit
4b0ad2fcc8
@ -47,7 +47,7 @@ class WorkerThread : public QThread
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
void run() Q_DECL_OVERRIDE {
|
void run() Q_DECL_OVERRIDE {
|
||||||
QString result;
|
QString result;
|
||||||
/* expensive or blocking operation */
|
/* ... here is the expensive or blocking operation ... */
|
||||||
emit resultReady(result);
|
emit resultReady(result);
|
||||||
}
|
}
|
||||||
signals:
|
signals:
|
||||||
@ -71,7 +71,8 @@ class Worker : public QObject
|
|||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void doWork(const QString ¶meter) {
|
void doWork(const QString ¶meter) {
|
||||||
// ...
|
QString result;
|
||||||
|
/* ... here is the expensive or blocking operation ... */
|
||||||
emit resultReady(result);
|
emit resultReady(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user