From 912e8a2c90a200300feaef18beedd4e6af3e8623 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Fri, 17 Dec 2010 15:12:30 +0100 Subject: Draw focusrect through style proxy This function call was simply not converted to use the new proxy style, hence preventing people from overriding it properly. Reviewed-by: Andy Shaw Task-number: QTBUG-16127 --- src/gui/styles/qcommonstyle.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 039a6da..296455b 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -2217,7 +2217,7 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, if (vopt->state & QStyle::State_HasFocus) { QStyleOptionFocusRect o; o.QStyleOption::operator=(*vopt); - o.rect = subElementRect(SE_ItemViewItemFocusRect, vopt, widget); + o.rect = proxy()->subElementRect(SE_ItemViewItemFocusRect, vopt, widget); o.state |= QStyle::State_KeyboardFocusChange; o.state |= QStyle::State_Item; QPalette::ColorGroup cg = (vopt->state & QStyle::State_Enabled) -- cgit v0.12 From 8605f528930744b2afc594c39afb146bd7ad4b54 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 20 Dec 2010 10:48:50 +0100 Subject: QIntValidator: provide default argument to parent For consistency. Reviewed-by: Joao Reviewed-by: Gabriel Task-number: 16100 --- src/gui/widgets/qvalidator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/widgets/qvalidator.h b/src/gui/widgets/qvalidator.h index 63734ca..013387d 100644 --- a/src/gui/widgets/qvalidator.h +++ b/src/gui/widgets/qvalidator.h @@ -101,7 +101,7 @@ class Q_GUI_EXPORT QIntValidator : public QValidator public: explicit QIntValidator(QObject * parent = 0); - QIntValidator(int bottom, int top, QObject * parent); + QIntValidator(int bottom, int top, QObject *parent = 0); ~QIntValidator(); QValidator::State validate(QString &, int &) const; @@ -142,7 +142,7 @@ class Q_GUI_EXPORT QDoubleValidator : public QValidator public: explicit QDoubleValidator(QObject * parent = 0); - QDoubleValidator(double bottom, double top, int decimals, QObject * parent); + QDoubleValidator(double bottom, double top, int decimals, QObject *parent = 0); ~QDoubleValidator(); enum Notation { @@ -186,7 +186,7 @@ class Q_GUI_EXPORT QRegExpValidator : public QValidator public: explicit QRegExpValidator(QObject *parent = 0); - QRegExpValidator(const QRegExp& rx, QObject *parent); + QRegExpValidator(const QRegExp& rx, QObject *parent = 0); ~QRegExpValidator(); virtual QValidator::State validate(QString& input, int& pos) const; -- cgit v0.12