diff options
Diffstat (limited to 'examples/corelib/threads/semaphores/semaphores.cpp')
-rw-r--r-- | examples/corelib/threads/semaphores/semaphores.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/examples/corelib/threads/semaphores/semaphores.cpp b/examples/corelib/threads/semaphores/semaphores.cpp index 2d9d169138..103f331b0c 100644 --- a/examples/corelib/threads/semaphores/semaphores.cpp +++ b/examples/corelib/threads/semaphores/semaphores.cpp @@ -7,9 +7,9 @@ #include <stdlib.h> //! [0] -const int DataSize = 100000; +constexpr int DataSize = 100000; -const int BufferSize = 8192; +constexpr int BufferSize = 8192; char buffer[BufferSize]; QSemaphore freeBytes(BufferSize); @@ -36,7 +36,6 @@ public: class Consumer : public QThread //! [3] //! [4] { - Q_OBJECT public: void run() override { @@ -64,5 +63,3 @@ int main(int argc, char *argv[]) return 0; } //! [6] - -#include "semaphores.moc" |