From 595d6797beab5f4275b4e544c9683a99b48f4801 Mon Sep 17 00:00:00 2001 From: Marc Mutz Date: Mon, 2 Nov 2015 15:39:47 +0100 Subject: widgets snippets: remove unreferenced snippets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They were using QStyleOption*V, which are all obsolete since Qt 5.0. Change-Id: I6a8a666cf18d52fcac8f305f38c8ef0843ec7bfd Reviewed-by: Topi Reiniƶ --- src/widgets/doc/snippets/qstyleoption/main.cpp | 33 -------------------------- 1 file changed, 33 deletions(-) (limited to 'src/widgets/doc/snippets/qstyleoption') diff --git a/src/widgets/doc/snippets/qstyleoption/main.cpp b/src/widgets/doc/snippets/qstyleoption/main.cpp index aa4220d8ea..05d5ece33d 100644 --- a/src/widgets/doc/snippets/qstyleoption/main.cpp +++ b/src/widgets/doc/snippets/qstyleoption/main.cpp @@ -75,44 +75,11 @@ void MyPushButton::paintEvent(QPaintEvent *) class MyStyle : public QStyle { public: - MyStyle(); void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget); }; -MyStyle::MyStyle() -{ -//! [1] - QStyleOptionFrame *option; - - if (const QStyleOptionFrame *frameOption = - qstyleoption_cast(option)) { - QStyleOptionFrameV2 frameOptionV2(*frameOption); - - // draw the frame using frameOptionV2 - } -//! [1] - -//! [2] - if (const QStyleOptionProgressBar *progressBarOption = - qstyleoption_cast(option)) { - QStyleOptionProgressBarV2 progressBarV2(*progressBarOption); - - // draw the progress bar using progressBarV2 - } -//! [2] - -//! [3] - if (const QStyleOptionTab *tabOption = - qstyleoption_cast(option)) { - QStyleOptionTabV2 tabV2(*tabOption); - - // draw the tab using tabV2 - } -//! [3] -} - //! [4] void MyStyle::drawPrimitive(PrimitiveElement element, const QStyleOption *option, -- cgit v1.2.3