From fd65f709748a7026428cc3a8828784cbb8421a03 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Arve=20S=C3=A6ther?= Date: Thu, 26 Jan 2023 14:04:03 +0100 Subject: [PATCH] Fix analog clock example to adhere to guidelines Guidelines: https://wiki.qt.io/Qt6/Example-Guideline Pick-to: 6.5 Change-Id: I12c65ae11e7906fd2e9dfb449072199560488aed Reviewed-by: Oliver Eftevaag --- doc/global/manifest-meta.qdocconf | 4 ++-- examples/widgets/doc/src/analogclock.qdoc | 5 ++++- examples/widgets/doc/src/shapedclock.qdoc | 4 ++-- src/corelib/kernel/qtimer.cpp | 2 +- src/widgets/kernel/qwidget.cpp | 4 ++-- 5 files changed, 11 insertions(+), 8 deletions(-) diff --git a/doc/global/manifest-meta.qdocconf b/doc/global/manifest-meta.qdocconf index fa88dc48b4..536f4ce8c5 100644 --- a/doc/global/manifest-meta.qdocconf +++ b/doc/global/manifest-meta.qdocconf @@ -19,7 +19,7 @@ # manifestmeta.filters = highlighted sql global # # manifestmeta.highlighted.names = "QtGui/Analog Clock Window Example" \ -# "QtWidgets/Analog Clock Example" +# "QtWidgets/Analog Clock" # manifestmeta.highlighted.attributes = isHighlighted:true # # manifestmeta.sql.names = "QtSql/*" @@ -165,7 +165,7 @@ manifestmeta.ios.names = "QtCore/Contiguous Cache Example" \ "QtWidgets/Completer Example" \ "QtWidgets/Custom Completer Example" \ "QtWidgets/Undo Framework" \ - "QtWidgets/Analog Clock Example" \ + "QtWidgets/Analog Clock" \ "QtWidgets/Calculator Example" \ "QtWidgets/Calendar Widget Example" \ "QtWidgets/Character Map Example" \ diff --git a/examples/widgets/doc/src/analogclock.qdoc b/examples/widgets/doc/src/analogclock.qdoc index 09309853b1..2b318a3778 100644 --- a/examples/widgets/doc/src/analogclock.qdoc +++ b/examples/widgets/doc/src/analogclock.qdoc @@ -3,7 +3,10 @@ /*! \example widgets/analogclock - \title Analog Clock Example + \meta category {Graphics} + \meta tags {widgets} + + \title Analog Clock \ingroup examples-widgets \brief The Analog Clock example shows how to draw the contents of a custom widget. diff --git a/examples/widgets/doc/src/shapedclock.qdoc b/examples/widgets/doc/src/shapedclock.qdoc index a571086370..4ce341266a 100644 --- a/examples/widgets/doc/src/shapedclock.qdoc +++ b/examples/widgets/doc/src/shapedclock.qdoc @@ -25,7 +25,7 @@ \section1 ShapedClock Class Definition The \c ShapedClock class is based on the \c AnalogClock class defined in the - \l{Analog Clock Example}{Analog Clock} example. The whole class definition is + \l{Analog Clock} example. The whole class definition is presented below: \snippet widgets/shapedclock/shapedclock.h 0 @@ -77,7 +77,7 @@ cursor position in global coordinates. If we drag the widget, we also accept the event. The \c paintEvent() function is mainly the same as described in the - \l{Analog Clock Example}{Analog Clock} example. The one addition is that we + \l{Analog Clock} example. The one addition is that we use QPainter::drawEllipse() to draw a round clock face with the current palette's default background color. We make the clock face a bit smaller than the widget mask, so that the anti-aliased, semi-transparent pixels on diff --git a/src/corelib/kernel/qtimer.cpp b/src/corelib/kernel/qtimer.cpp index b968c5b46f..b2b9c5f200 100644 --- a/src/corelib/kernel/qtimer.cpp +++ b/src/corelib/kernel/qtimer.cpp @@ -105,7 +105,7 @@ QT_BEGIN_NAMESPACE used; Qt tries to work around these limitations. \sa QBasicTimer, QTimerEvent, QObject::timerEvent(), Timers, - {Analog Clock Example}, {Tetrix Example} + {Analog Clock}, {Tetrix Example} */ /*! diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 75f1f13fdd..4ada9513a5 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -9757,7 +9757,7 @@ void QWidget::leaveEvent(QEvent *) never be called; the backingstore will be used instead. \sa event(), repaint(), update(), QPainter, QPixmap, QPaintEvent, - {Analog Clock Example} + {Analog Clock} */ void QWidget::paintEvent(QPaintEvent *) @@ -11069,7 +11069,7 @@ void QWidgetPrivate::repaint(T r) If the Qt::WA_OpaquePaintEvent widget attribute is set, the widget is responsible for painting all its pixels with an opaque color. - \sa repaint(), paintEvent(), setUpdatesEnabled(), {Analog Clock Example} + \sa repaint(), paintEvent(), setUpdatesEnabled(), {Analog Clock} */ void QWidget::update() {