qtbase/examples
Giuseppe D'Angelo ba13715e5c Wait conditions example: code tidies
In no particular order:

* Clean up #includes.

* Document what is protected by the mutex.

* Use explicit, nullptr.

* Use lock managers, not manual calls to lock/unlock.

* Unlock the mutex before notifying the condition variables.

* Condition variables are always meant to be used in a while loop, and
  never with a plain if, because of spurious wakeups.

* Don't lock a mutex just to protect a plain integer. We have atomics
  for that use case.

* Remove an unneeded signal, therefore also the need of using
  Q_OBJECT and the inclusion of the moc-generated file.

Fixes: QTBUG-108860
Change-Id: I2afc77955b95de8aa5fb88048cd9feb217f83b4f
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
(cherry picked from commit 3a449bbb69c9a3c3a5bc6a052f2de98ab79be7e9)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
2022-12-06 07:25:14 +00:00
..
2022-05-16 16:37:38 +02:00
2022-05-16 16:37:38 +02:00
2022-05-16 16:37:38 +02:00
2022-05-16 16:37:38 +02:00
2022-05-16 16:37:38 +02:00
2022-06-15 19:49:40 +00:00
2022-05-16 16:37:38 +02:00

Qt is supplied with a number of example applications that have been
written to provide developers with examples of the Qt API in use,
highlight good programming practice, and showcase features found in each of
Qt's core technologies.


Documentation for examples can be found in the Examples section
of the Qt documentation.