summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@theqtcompany.com>2015-12-18 11:47:58 +0100
committerJoerg Bornemann <joerg.bornemann@theqtcompany.com>2016-01-04 14:47:22 +0000
commitbee213d1f309daf8a16042ff21b1d6f81e6a5942 (patch)
tree9ea297666301acf0d0d066c2c45a302cbdcfe858 /examples
parente9ed15cfb271d42723622ae353304141e0bf2c64 (diff)
Do not use deprecated QStyleOptionFrameV2
This fixes some warnings when building demobrowser. Change-Id: If895d794e216d9a5bab8d74b3bee370763ff1294 Reviewed-by: Michal Klocek <michal.klocek@theqtcompany.com> Reviewed-by: Alexandru Croitor <alexandru.croitor@theqtcompany.com> Reviewed-by: Michael BrĂ¼ning <michael.bruning@theqtcompany.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/webenginewidgets/demobrowser/searchlineedit.cpp4
-rw-r--r--examples/webenginewidgets/demobrowser/urllineedit.cpp12
-rw-r--r--examples/webenginewidgets/demobrowser/urllineedit.h2
3 files changed, 9 insertions, 9 deletions
diff --git a/examples/webenginewidgets/demobrowser/searchlineedit.cpp b/examples/webenginewidgets/demobrowser/searchlineedit.cpp
index 5152ac1c..1573b104 100644
--- a/examples/webenginewidgets/demobrowser/searchlineedit.cpp
+++ b/examples/webenginewidgets/demobrowser/searchlineedit.cpp
@@ -45,7 +45,7 @@
#include <QtGui/QMouseEvent>
#include <QtWidgets/QMenu>
#include <QtWidgets/QStyle>
-#include <QtWidgets/QStyleOptionFrameV2>
+#include <QtWidgets/QStyleOptionFrame>
ClearButton::ClearButton(QWidget *parent)
: QAbstractButton(parent)
@@ -181,7 +181,7 @@ void SearchLineEdit::paintEvent(QPaintEvent *event)
{
if (lineEdit()->text().isEmpty() && !hasFocus() && !m_inactiveText.isEmpty()) {
ExLineEdit::paintEvent(event);
- QStyleOptionFrameV2 panel;
+ QStyleOptionFrame panel;
initStyleOption(&panel);
QRect r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
QFontMetrics fm = fontMetrics();
diff --git a/examples/webenginewidgets/demobrowser/urllineedit.cpp b/examples/webenginewidgets/demobrowser/urllineedit.cpp
index 685277d9..0f4e59c4 100644
--- a/examples/webenginewidgets/demobrowser/urllineedit.cpp
+++ b/examples/webenginewidgets/demobrowser/urllineedit.cpp
@@ -57,7 +57,7 @@
#include <QtGui/QDrag>
#include <QtGui/QPainter>
#include <QtWidgets/QStyle>
-#include <QtWidgets/QStyleOptionFrameV2>
+#include <QtWidgets/QStyleOptionFrame>
#include <QtCore/QDebug>
@@ -112,7 +112,7 @@ void ExLineEdit::resizeEvent(QResizeEvent *event)
void ExLineEdit::updateGeometries()
{
- QStyleOptionFrameV2 panel;
+ QStyleOptionFrame panel;
initStyleOption(&panel);
QRect rect = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
@@ -131,7 +131,7 @@ void ExLineEdit::updateGeometries()
clearButtonWidth, this->height());
}
-void ExLineEdit::initStyleOption(QStyleOptionFrameV2 *option) const
+void ExLineEdit::initStyleOption(QStyleOptionFrame *option) const
{
option->initFrom(this);
option->rect = contentsRect();
@@ -144,7 +144,7 @@ void ExLineEdit::initStyleOption(QStyleOptionFrameV2 *option) const
if (hasEditFocus())
option->state |= QStyle::State_HasEditFocus;
#endif
- option->features = QStyleOptionFrameV2::None;
+ option->features = QStyleOptionFrame::None;
}
QSize ExLineEdit::sizeHint() const
@@ -189,7 +189,7 @@ bool ExLineEdit::event(QEvent *event)
void ExLineEdit::paintEvent(QPaintEvent *)
{
QPainter p(this);
- QStyleOptionFrameV2 panel;
+ QStyleOptionFrame panel;
initStyleOption(&panel);
style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this);
}
@@ -322,7 +322,7 @@ void UrlLineEdit::paintEvent(QPaintEvent *event)
ExLineEdit::paintEvent(event);
QPainter painter(this);
- QStyleOptionFrameV2 panel;
+ QStyleOptionFrame panel;
initStyleOption(&panel);
QRect backgroundRect = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
if (m_webView && !hasFocus()) {
diff --git a/examples/webenginewidgets/demobrowser/urllineedit.h b/examples/webenginewidgets/demobrowser/urllineedit.h
index 775aa7d1..b9f2cff7 100644
--- a/examples/webenginewidgets/demobrowser/urllineedit.h
+++ b/examples/webenginewidgets/demobrowser/urllineedit.h
@@ -77,7 +77,7 @@ protected:
protected:
void updateGeometries();
- void initStyleOption(QStyleOptionFrameV2 *option) const;
+ void initStyleOption(QStyleOptionFrame *option) const;
QWidget *m_leftWidget;
QLineEdit *m_lineEdit;