diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:16 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-10-14 17:46:34 +0200 |
commit | 440286655e0ca271506cf7cc02ad0dbf4baef9ca (patch) | |
tree | 896fa81adb8b14a69355a3a6cf64d06ec8173c9a /examples/widgets/painting/shared | |
parent | 1e27ad1697187549151657ba187928e439300db7 (diff) | |
parent | e164d61ca8263fc4b46fdd916e1ea77c7dd2b735 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
Diffstat (limited to 'examples/widgets/painting/shared')
5 files changed, 10 insertions, 10 deletions
diff --git a/examples/widgets/painting/shared/arthurstyle.h b/examples/widgets/painting/shared/arthurstyle.h index 8ea8354bab..64c888b636 100644 --- a/examples/widgets/painting/shared/arthurstyle.h +++ b/examples/widgets/painting/shared/arthurstyle.h @@ -63,7 +63,7 @@ public: void drawHoverRect(QPainter *painter, const QRect &rect) const; void drawPrimitive(PrimitiveElement element, const QStyleOption *option, - QPainter *painter, const QWidget *widget = 0) const override; + QPainter *painter, const QWidget *widget = nullptr) const override; void drawControl(ControlElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const override; void drawComplexControl(ComplexControl control, const QStyleOptionComplex *option, diff --git a/examples/widgets/painting/shared/arthurwidgets.cpp b/examples/widgets/painting/shared/arthurwidgets.cpp index 285be99d20..40d712c9e3 100644 --- a/examples/widgets/painting/shared/arthurwidgets.cpp +++ b/examples/widgets/painting/shared/arthurwidgets.cpp @@ -136,7 +136,7 @@ void ArthurFrame::createGlWindow() void ArthurFrame::paintEvent(QPaintEvent *e) { - static QImage *static_image = 0; + static QImage *static_image = nullptr; QPainter painter; @@ -376,7 +376,7 @@ void ArthurFrame::showSource() const QString html = QStringLiteral("<html><pre>") + contents + QStringLiteral("</pre></html>"); - QTextBrowser *sourceViewer = new QTextBrowser(0); + QTextBrowser *sourceViewer = new QTextBrowser; sourceViewer->setWindowTitle(tr("Source: %1").arg(m_sourceFileName.midRef(5))); sourceViewer->setParent(this, Qt::Dialog); sourceViewer->setAttribute(Qt::WA_DeleteOnClose); diff --git a/examples/widgets/painting/shared/fbopaintdevice.cpp b/examples/widgets/painting/shared/fbopaintdevice.cpp index 8207090cc8..9368293218 100644 --- a/examples/widgets/painting/shared/fbopaintdevice.cpp +++ b/examples/widgets/painting/shared/fbopaintdevice.cpp @@ -53,7 +53,7 @@ #include <QOffscreenSurface> #include <QOpenGLFunctions> -QFboPaintDevice::QFboPaintDevice(const QSize& size, bool flipped, bool clearOnInit, +QFboPaintDevice::QFboPaintDevice(const QSize &size, bool flipped, bool clearOnInit, QOpenGLFramebufferObject::Attachment attachment) : QOpenGLPaintDevice(size) { @@ -97,8 +97,8 @@ GLuint QFboPaintDevice::takeTexture() QImage QFboPaintDevice::toImage() const { - QOpenGLContext* currentContext = QOpenGLContext::currentContext(); - QSurface* currentSurface = currentContext ? currentContext->surface() : 0; + QOpenGLContext *currentContext = QOpenGLContext::currentContext(); + QSurface *currentSurface = currentContext ? currentContext->surface() : nullptr; context()->makeCurrent(m_surface); diff --git a/examples/widgets/painting/shared/fbopaintdevice.h b/examples/widgets/painting/shared/fbopaintdevice.h index 78451af895..a42bcc756d 100644 --- a/examples/widgets/painting/shared/fbopaintdevice.h +++ b/examples/widgets/painting/shared/fbopaintdevice.h @@ -60,7 +60,7 @@ class QFboPaintDevice : public QOpenGLPaintDevice { public: - QFboPaintDevice(const QSize&, bool flipped = false, bool clearOnInit = true, + QFboPaintDevice(const QSize &size, bool flipped = false, bool clearOnInit = true, QOpenGLFramebufferObject::Attachment = QOpenGLFramebufferObject::CombinedDepthStencil); ~QFboPaintDevice(); @@ -83,7 +83,7 @@ public: private: QOpenGLFramebufferObject *m_framebufferObject; - QSurface* m_surface; + QSurface *m_surface; }; #endif // QT_NO_OPENGL diff --git a/examples/widgets/painting/shared/hoverpoints.cpp b/examples/widgets/painting/shared/hoverpoints.cpp index 2032fb5a2c..2bf3963e9e 100644 --- a/examples/widgets/painting/shared/hoverpoints.cpp +++ b/examples/widgets/painting/shared/hoverpoints.cpp @@ -262,8 +262,8 @@ bool HoverPoints::eventFilter(QObject *object, QEvent *event) case QEvent::Paint: { QWidget *that_widget = m_widget; - m_widget = 0; - QApplication::sendEvent(object, event); + m_widget = nullptr; + QCoreApplication::sendEvent(object, event); m_widget = that_widget; paintPoints(); return true; |