summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Mutz <marc.mutz@kdab.com>2015-11-02 15:40:58 +0100
committerMarc Mutz <marc.mutz@kdab.com>2015-11-02 18:43:35 +0000
commitd2bb036d5083d95d1ab7bef53eac012f3520a633 (patch)
tree4ef6faa4622723edbd3d6eb718120386285a05a6 /src
parent595d6797beab5f4275b4e544c9683a99b48f4801 (diff)
[docs] widgets: remove remaining references to QStyleOption*V<N>
They are all obsolete since Qt 5.0. Change-Id: Ie56b99ad470fddb87f277f3f4f3845764828d10a Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/doc/snippets/javastyle.cpp25
-rw-r--r--src/widgets/doc/src/widgets-and-layouts/styles.qdoc10
2 files changed, 14 insertions, 21 deletions
diff --git a/src/widgets/doc/snippets/javastyle.cpp b/src/widgets/doc/snippets/javastyle.cpp
index b0b548e731..4997e25ada 100644
--- a/src/widgets/doc/snippets/javastyle.cpp
+++ b/src/widgets/doc/snippets/javastyle.cpp
@@ -236,9 +236,8 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
break;
}
case CE_DockWidgetTitle: {
- const QStyleOptionDockWidgetV2 *docker =
- new QStyleOptionDockWidgetV2(
- *qstyleoption_cast<const QStyleOptionDockWidget *>(option));
+ const QStyleOptionDockWidget *docker =
+ qstyleoption_cast<const QStyleOptionDockWidget *>(option);
QRect rect = docker->rect;
QRect titleRect = rect;
@@ -366,11 +365,9 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
break;
}
case CE_ProgressBar: {
- const QStyleOptionProgressBar *bar1 =
+ const QStyleOptionProgressBar *bar =
qstyleoption_cast<const QStyleOptionProgressBar *>(option);
- QStyleOptionProgressBarV2 *bar = new QStyleOptionProgressBarV2(*bar1);
-
QRect rect = bar->rect;
if (bar->orientation == Qt::Vertical) {
rect = QRect(rect.left(), rect.top(), rect.height(), rect.width());
@@ -416,7 +413,6 @@ void JavaStyle::drawControl(ControlElement control, const QStyleOption *option,
if (bar->textVisible)
drawControl(CE_ProgressBarLabel, &subBar, painter, widget);
- delete bar;
break;
}
case CE_ProgressBarGroove: {
@@ -2366,18 +2362,17 @@ void JavaStyle::drawPrimitive(PrimitiveElement element,
case PE_FrameLineEdit: {
const QStyleOptionFrame *frame =
qstyleoption_cast<const QStyleOptionFrame *>(option);
- const QStyleOptionFrameV2 frameV2(*frame);
painter->setPen(frame->palette.color(QPalette::Mid));
- painter->drawRect(frameV2.rect.adjusted(0, 0, -2, -2));
+ painter->drawRect(frame->rect.adjusted(0, 0, -2, -2));
painter->setPen(Qt::white);
- painter->drawRect(frameV2.rect.adjusted(1, 1, -1, -1));
- painter->setPen(frameV2.palette.color(QPalette::Active,
+ painter->drawRect(frame->rect.adjusted(1, 1, -1, -1));
+ painter->setPen(frame->palette.color(QPalette::Active,
QPalette::Background));
- painter->drawLine(frameV2.rect.bottomLeft(),
- frameV2.rect.bottomLeft() + QPoint(1, -1));
- painter->drawLine(frameV2.rect.topRight(),
- frameV2.rect.topRight() + QPoint(-1, 1));
+ painter->drawLine(frame->rect.bottomLeft(),
+ frame->rect.bottomLeft() + QPoint(1, -1));
+ painter->drawLine(frame->rect.topRight(),
+ frame->rect.topRight() + QPoint(-1, 1));
break;
}
case PE_FrameFocusRect: {
diff --git a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
index 0a5a079969..7d1bffd0b4 100644
--- a/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
+++ b/src/widgets/doc/src/widgets-and-layouts/styles.qdoc
@@ -989,9 +989,7 @@
The style option for tabs (QStyleOptionTab) contains the necessary
information for drawing tabs. The option contains the position of
the tab in the tab bar, the position of the selected tab, the
- shape of the tab, the text, and the icon. After Qt 4.1, the option
- should be cast to a QStyleOptionTabV2, which also contains the
- icon's size.
+ shape of the tab, the text, the icon, and the icon's size.
As the Java style tabs don't overlap, we also present an image of
a tab widget in the common style. Note that if you want the tabs
@@ -1024,7 +1022,7 @@
Note that individual tabs may be disabled even if the tab bar
is not. The tab will be active if the tab bar is active.
- Here follows a table of QStyleOptionTabV2's members:
+ Here follows a table of QStyleOptionTab's members:
\table 90%
\header
@@ -1450,7 +1448,7 @@
\li Content
\row
\li features
- \li Flags of the QStyleOptionFrameV2::FrameFeatures
+ \li Flags of the QStyleOptionFrame::FrameFeatures
enum describing the frame of the group box.
\row
\li lineWidth
@@ -1501,7 +1499,7 @@
\image javastyle/progressbarimage.png
- The style option for QProgressBar is QStyleOptionProgressBarV2.
+ The style option for QProgressBar is QStyleOptionProgressBar.
The bar does not set any state flags, but the other members of the
option are: