summaryrefslogtreecommitdiffstats
path: root/examples/corelib/threads/queuedcustomtype/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'examples/corelib/threads/queuedcustomtype/main.cpp')
-rw-r--r--examples/corelib/threads/queuedcustomtype/main.cpp15
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/corelib/threads/queuedcustomtype/main.cpp b/examples/corelib/threads/queuedcustomtype/main.cpp
index 0cf019990a..0a14cb48e1 100644
--- a/examples/corelib/threads/queuedcustomtype/main.cpp
+++ b/examples/corelib/threads/queuedcustomtype/main.cpp
@@ -1,12 +1,17 @@
// Copyright (C) 2016 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
-#include <QApplication>
-#include <QPainter>
-#include <QTime>
#include "block.h"
#include "window.h"
+#include <QApplication>
+#include <QBrush>
+#include <QImage>
+#include <QPainter>
+#include <QPen>
+#include <QPointF>
+#include <QRect>
+
QImage createImage(int width, int height)
{
QImage image(width, height, QImage::Format_RGB16);
@@ -43,8 +48,8 @@ QImage createImage(int width, int height)
int x = 0;
int y = 0;
- int starWidth = image.width()/3;
- int starHeight = image.height()/3;
+ const int starWidth = image.width()/3;
+ const int starHeight = image.height()/3;
QRect rect(x, y, starWidth, starHeight);