summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/widgets/itemviews/qitemeditorfactory.cpp2
-rw-r--r--src/widgets/styles/qstyleoption.h2
-rw-r--r--src/widgets/widgets/qframe.cpp4
-rw-r--r--src/widgets/widgets/qgroupbox.cpp2
-rw-r--r--src/widgets/widgets/qlineedit.cpp20
-rw-r--r--src/widgets/widgets/qlineedit_p.cpp8
6 files changed, 18 insertions, 20 deletions
diff --git a/src/widgets/itemviews/qitemeditorfactory.cpp b/src/widgets/itemviews/qitemeditorfactory.cpp
index da4c031ec6..2e8cca2997 100644
--- a/src/widgets/itemviews/qitemeditorfactory.cpp
+++ b/src/widgets/itemviews/qitemeditorfactory.cpp
@@ -550,7 +550,7 @@ void QExpandingLineEdit::updateMinimumWidth()
getContentsMargins(&left, 0, &right, 0);
width += left + right;
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
int minWidth = style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(width, 0).
diff --git a/src/widgets/styles/qstyleoption.h b/src/widgets/styles/qstyleoption.h
index 3249bf54c6..a475f485df 100644
--- a/src/widgets/styles/qstyleoption.h
+++ b/src/widgets/styles/qstyleoption.h
@@ -611,7 +611,7 @@ public:
enum StyleOptionType { Type = SO_GroupBox };
enum StyleOptionVersion { Version = 1 };
- QStyleOptionFrameV2::FrameFeatures features;
+ QStyleOptionFrame::FrameFeatures features;
QString text;
Qt::Alignment textAlignment;
QColor textColor;
diff --git a/src/widgets/widgets/qframe.cpp b/src/widgets/widgets/qframe.cpp
index 2aadf9e245..57cd51396c 100644
--- a/src/widgets/widgets/qframe.cpp
+++ b/src/widgets/widgets/qframe.cpp
@@ -361,7 +361,7 @@ int QFrame::midLineWidth() const
void QFramePrivate::updateStyledFrameWidths()
{
Q_Q(const QFrame);
- QStyleOptionFrameV3 opt;
+ QStyleOptionFrame opt;
opt.initFrom(q);
opt.lineWidth = lineWidth;
opt.midLineWidth = midLineWidth;
@@ -473,7 +473,7 @@ void QFrame::paintEvent(QPaintEvent *)
void QFrame::drawFrame(QPainter *p)
{
Q_D(QFrame);
- QStyleOptionFrameV3 opt;
+ QStyleOptionFrame opt;
opt.init(this);
int frameShape = d->frameStyle & QFrame::Shape_Mask;
int frameShadow = d->frameStyle & QFrame::Shadow_Mask;
diff --git a/src/widgets/widgets/qgroupbox.cpp b/src/widgets/widgets/qgroupbox.cpp
index 9a0138b171..ab459dea48 100644
--- a/src/widgets/widgets/qgroupbox.cpp
+++ b/src/widgets/widgets/qgroupbox.cpp
@@ -103,7 +103,7 @@ void QGroupBox::initStyleOption(QStyleOptionGroupBox *option) const
option->state &= ~QStyle::State_MouseOver;
if (d->flat)
- option->features |= QStyleOptionFrameV2::Flat;
+ option->features |= QStyleOptionFrame::Flat;
if (d->checkable) {
option->subControls |= QStyle::SC_GroupBoxCheckBox;
diff --git a/src/widgets/widgets/qlineedit.cpp b/src/widgets/widgets/qlineedit.cpp
index cf828330c3..dfc9a8fe92 100644
--- a/src/widgets/widgets/qlineedit.cpp
+++ b/src/widgets/widgets/qlineedit.cpp
@@ -87,10 +87,8 @@ extern void qt_mac_secure_keyboard(bool); //qapplication_mac.cpp
/*!
Initialize \a option with the values from this QLineEdit. This method
- is useful for subclasses when they need a QStyleOptionFrame or QStyleOptionFrameV2, but don't want
- to fill in all the information themselves. This function will check the version
- of the QStyleOptionFrame and fill in the additional values for a
- QStyleOptionFrameV2.
+ is useful for subclasses when they need a QStyleOptionFrame, but don't want
+ to fill in all the information themselves.
\sa QStyleOption::initFrom()
*/
@@ -695,7 +693,7 @@ QSize QLineEdit::sizeHint() const
int w = fm.width(QLatin1Char('x')) * 17 + 2*d->horizontalMargin
+ d->effectiveLeftTextMargin() + d->effectiveRightTextMargin()
+ d->leftmargin + d->rightmargin; // "some"
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
return (style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(w, h).
expandedTo(QApplication::globalStrut()), this));
@@ -716,7 +714,7 @@ QSize QLineEdit::minimumSizeHint() const
int h = fm.height() + qMax(2*d->verticalMargin, fm.leading())
+ d->topmargin + d->bottommargin;
int w = fm.maxWidth() + d->leftmargin + d->rightmargin;
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
return (style()->sizeFromContents(QStyle::CT_LineEdit, &opt, QSize(w, h).
expandedTo(QApplication::globalStrut()), this));
@@ -995,7 +993,7 @@ void QLineEdit::setSelection(int start, int length)
d->control->setSelection(start, length);
if (d->control->hasSelectedText()){
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
if (!style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this))
d->setCursorVisible(false);
@@ -1433,7 +1431,7 @@ bool QLineEdit::event(QEvent * e)
//In order to get the cursor blinking if QComboBox::setEditable is called when the combobox has focus
if (hasFocus()) {
d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime());
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
if ((!hasSelectedText() && d->control->preeditAreaText().isEmpty())
|| style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this))
@@ -1795,7 +1793,7 @@ void QLineEdit::focusInEvent(QFocusEvent *e)
if (!QApplication::keypadNavigationEnabled() || (hasEditFocus() && ( e->reason() == Qt::PopupFocusReason))) {
#endif
d->control->setCursorBlinkPeriod(QApplication::cursorFlashTime());
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
if((!hasSelectedText() && d->control->preeditAreaText().isEmpty())
|| style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, this))
@@ -1871,7 +1869,7 @@ void QLineEdit::paintEvent(QPaintEvent *)
QPainter p(this);
QPalette pal = palette();
- QStyleOptionFrameV2 panel;
+ QStyleOptionFrame panel;
initStyleOption(&panel);
style()->drawPrimitive(QStyle::PE_PanelLineEdit, &panel, &p, this);
QRect r = style()->subElementRect(QStyle::SE_LineEditContents, &panel, this);
@@ -2177,7 +2175,7 @@ void QLineEdit::changeEvent(QEvent *ev)
break;
case QEvent::StyleChange:
{
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
initStyleOption(&opt);
d->control->setPasswordCharacter(style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, this));
d->control->setPasswordMaskDelay(style()->styleHint(QStyle::SH_LineEdit_PasswordMaskDelay, &opt, this));
diff --git a/src/widgets/widgets/qlineedit_p.cpp b/src/widgets/widgets/qlineedit_p.cpp
index 2daccc345d..0731c89094 100644
--- a/src/widgets/widgets/qlineedit_p.cpp
+++ b/src/widgets/widgets/qlineedit_p.cpp
@@ -135,7 +135,7 @@ void QLineEditPrivate::_q_selectionChanged()
{
Q_Q(QLineEdit);
if (control->preeditAreaText().isEmpty()) {
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
q->initStyleOption(&opt);
bool showCursor = control->hasSelectedText() ?
q->style()->styleHint(QStyle::SH_BlinkCursorWhenTextSelected, &opt, q):
@@ -194,7 +194,7 @@ void QLineEditPrivate::init(const QString& txt)
QObject::connect(control, SIGNAL(updateNeeded(QRect)),
q, SLOT(_q_updateNeeded(QRect)));
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
q->initStyleOption(&opt);
control->setPasswordCharacter(q->style()->styleHint(QStyle::SH_LineEdit_PasswordCharacter, &opt, q));
control->setPasswordMaskDelay(q->style()->styleHint(QStyle::SH_LineEdit_PasswordMaskDelay, &opt, q));
@@ -217,7 +217,7 @@ void QLineEditPrivate::init(const QString& txt)
QRect QLineEditPrivate::adjustedContentsRect() const
{
Q_Q(const QLineEdit);
- QStyleOptionFrameV2 opt;
+ QStyleOptionFrame opt;
q->initStyleOption(&opt);
QRect r = q->style()->subElementRect(QStyle::SE_LineEditContents, &opt, q);
r.setX(r.x() + effectiveLeftTextMargin());
@@ -387,7 +387,7 @@ QSize QLineEditPrivate::iconSize() const
QIcon QLineEditPrivate::clearButtonIcon() const
{
Q_Q(const QLineEdit);
- QStyleOptionFrameV2 styleOption;
+ QStyleOptionFrame styleOption;
q->initStyleOption(&styleOption);
return QIcon(q->style()->standardPixmap(QStyle::SP_LineEditClearButton, &styleOption, q));
}