summaryrefslogtreecommitdiffstats
path: root/src/widgets/doc/snippets/customstyle/customstyle.cpp
diff options
context:
space:
mode:
authorOleksii Zbykovskyi <Oleksii.Zbykovskyi@qt.io>2025-08-06 11:19:18 +0200
committerOleksii Zbykovskyi <Oleksii.Zbykovskyi@qt.io>2025-08-06 20:26:58 +0200
commit7564ea5f26f3b5d19abe245a0e10564c54fefd73 (patch)
treebd2bc749a0684943d9eebadbfa8026cb5d94decf /src/widgets/doc/snippets/customstyle/customstyle.cpp
parent6fbd403fe7597f457e669bbb6551509c2097fc2d (diff)
Combine senselessly divided snippets in customstyle
Customstyle has two functions, and each of them contains two snippet blocks. These blocks are not used separately, so I combined each of them into one and fixed the related documentation. Task-number: QTBUG-137566 Change-Id: I539940c85970a8dfdb63daf531335ae4bf9d754b Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/doc/snippets/customstyle/customstyle.cpp')
-rw-r--r--src/widgets/doc/snippets/customstyle/customstyle.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/widgets/doc/snippets/customstyle/customstyle.cpp b/src/widgets/doc/snippets/customstyle/customstyle.cpp
index 74de2705be8..72a04d2ae29 100644
--- a/src/widgets/doc/snippets/customstyle/customstyle.cpp
+++ b/src/widgets/doc/snippets/customstyle/customstyle.cpp
@@ -7,12 +7,12 @@
CustomStyle::CustomStyle(const QWidget *widget)
{
-//! [0]
+ //! [0]
const QSpinBox *spinBox = qobject_cast<const QSpinBox *>(widget);
if (spinBox) {
-//! [0] //! [1]
+ //...
}
-//! [1]
+ //! [0]
}
//! [2]
@@ -48,8 +48,6 @@ void CustomStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *op
painter->drawPolygon(points);
} else {
QProxyStyle::drawPrimitive(element, option, painter, widget);
-//! [2] //! [3]
}
-//! [3] //! [4]
}
-//! [4]
+//! [2]