Revamp Queued Custom Type Ex: Fix includes
Fix includes order and add the needed ones to avoid transitive includes. Remove QT_{BEGIN,END}_NAMESPACE because these are private Qt macros that should not be used in the examples. Task-number: QTBUG-117147 Pick-to: 6.6 6.5 Change-Id: I6caa0a59f2ab4dfec6fb558a0896c27b05b6a5db Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
This commit is contained in:
parent
fa54471050
commit
aa95294080
@ -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);
|
||||
|
@ -1,9 +1,11 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
#include "block.h"
|
||||
#include "renderthread.h"
|
||||
|
||||
#include <QRandomGenerator>
|
||||
#include <QRgb>
|
||||
|
||||
RenderThread::RenderThread(QObject *parent)
|
||||
: QThread(parent)
|
||||
|
@ -7,7 +7,8 @@
|
||||
#include <QImage>
|
||||
#include <QMutex>
|
||||
#include <QThread>
|
||||
#include "block.h"
|
||||
|
||||
class Block;
|
||||
|
||||
//! [RenderThread class definition]
|
||||
class RenderThread : public QThread
|
||||
|
@ -1,8 +1,17 @@
|
||||
// Copyright (C) 2016 The Qt Company Ltd.
|
||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
|
||||
|
||||
#include "block.h"
|
||||
#include "renderthread.h"
|
||||
#include "window.h"
|
||||
#include <QtWidgets>
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QGuiApplication>
|
||||
#include <QHBoxLayout>
|
||||
#include <QImageReader>
|
||||
#include <QPainter>
|
||||
#include <QScreen>
|
||||
#include <QVBoxLayout>
|
||||
|
||||
//! [Window constructor start]
|
||||
Window::Window(QWidget *parent)
|
||||
|
@ -4,13 +4,14 @@
|
||||
#ifndef WINDOW_H
|
||||
#define WINDOW_H
|
||||
|
||||
#include <QImage>
|
||||
#include <QLabel>
|
||||
#include <QPixmap>
|
||||
#include <QPushButton>
|
||||
#include <QWidget>
|
||||
#include "renderthread.h"
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QLabel;
|
||||
class QPushButton;
|
||||
QT_END_NAMESPACE
|
||||
class Block;
|
||||
class RenderThread;
|
||||
|
||||
//! [Window class definition]
|
||||
class Window : public QWidget
|
||||
|
Loading…
Reference in New Issue
Block a user