QMacStyle: Remove unused focusRectPolicy methods
Change-Id: I436c714aee25d8def4318a4b0aef022493dec19f Reviewed-by: Jake Petroules <jake.petroules@qt.io>
This commit is contained in:
parent
60d6b3c565
commit
64f4108c3a
@ -143,45 +143,6 @@
|
||||
\reimp
|
||||
*/
|
||||
|
||||
/*!
|
||||
\enum QMacStyle::FocusRectPolicy
|
||||
|
||||
This type is used to signify a widget's focus rectangle policy.
|
||||
|
||||
\value FocusEnabled show a focus rectangle when the widget has focus.
|
||||
\value FocusDisabled never show a focus rectangle for the widget.
|
||||
\value FocusDefault show a focus rectangle when the widget has
|
||||
focus and the widget is a QSpinWidget, QDateTimeEdit, QLineEdit,
|
||||
QListBox, QListView, editable QTextEdit, or one of their
|
||||
subclasses.
|
||||
*/
|
||||
|
||||
/*! \fn void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
|
||||
\obsolete
|
||||
Sets the focus rectangle policy of \a w. The \a policy can be one of
|
||||
\l{QMacStyle::FocusRectPolicy}.
|
||||
|
||||
This is now simply an interface to the Qt::WA_MacShowFocusRect attribute and the
|
||||
FocusDefault value does nothing anymore. If you want to set a widget back
|
||||
to its default value, you must save the old value of the attribute before
|
||||
you change it.
|
||||
|
||||
\sa focusRectPolicy(), QWidget::setAttribute()
|
||||
*/
|
||||
|
||||
/*! \fn QMacStyle::FocusRectPolicy QMacStyle::focusRectPolicy(const QWidget *w)
|
||||
\obsolete
|
||||
Returns the focus rectangle policy for the widget \a w.
|
||||
|
||||
The focus rectangle policy can be one of \l{QMacStyle::FocusRectPolicy}.
|
||||
|
||||
In 4.3 and up this function will simply test for the
|
||||
Qt::WA_MacShowFocusRect attribute and will never return
|
||||
QMacStyle::FocusDefault.
|
||||
|
||||
\sa setFocusRectPolicy(), QWidget::testAttribute()
|
||||
*/
|
||||
|
||||
/*! \fn void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy)
|
||||
|
||||
\obsolete
|
||||
|
@ -3101,23 +3101,6 @@ QPixmap QMacStyle::standardPixmap(StandardPixmap standardPixmap, const QStyleOpt
|
||||
return icon.pixmap(qt_getWindow(widget), QSize(size, size));
|
||||
}
|
||||
|
||||
void QMacStyle::setFocusRectPolicy(QWidget *w, FocusRectPolicy policy)
|
||||
{
|
||||
switch (policy) {
|
||||
case FocusDefault:
|
||||
break;
|
||||
case FocusEnabled:
|
||||
case FocusDisabled:
|
||||
w->setAttribute(Qt::WA_MacShowFocusRect, policy == FocusEnabled);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
QMacStyle::FocusRectPolicy QMacStyle::focusRectPolicy(const QWidget *w)
|
||||
{
|
||||
return w->testAttribute(Qt::WA_MacShowFocusRect) ? FocusEnabled : FocusDisabled;
|
||||
}
|
||||
|
||||
void QMacStyle::setWidgetSizePolicy(const QWidget *widget, WidgetSizePolicy policy)
|
||||
{
|
||||
QWidget *wadget = const_cast<QWidget *>(widget);
|
||||
|
@ -100,10 +100,6 @@ public:
|
||||
virtual int styleHint(StyleHint sh, const QStyleOption *opt = 0, const QWidget *w = 0,
|
||||
QStyleHintReturn *shret = 0) const;
|
||||
|
||||
enum FocusRectPolicy { FocusEnabled, FocusDisabled, FocusDefault };
|
||||
static void setFocusRectPolicy(QWidget *w, FocusRectPolicy policy);
|
||||
static FocusRectPolicy focusRectPolicy(const QWidget *w);
|
||||
|
||||
enum WidgetSizePolicy { SizeSmall, SizeLarge, SizeMini, SizeDefault
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user