Pull QWidget::setTabOrder(std::initializer_list...) behind ABI boundary
Found in API-review. Pick-to: 6.6 Change-Id: I261aa450d25288e7a3e8caa033ce5000e5dd77f2 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io> Reviewed-by: Marc Mutz <marc.mutz@qt.io>
This commit is contained in:
parent
1530731694
commit
a27cc5d727
@ -7085,6 +7085,20 @@ void QWidget::setTabOrder(QWidget* first, QWidget *second)
|
||||
}
|
||||
}
|
||||
|
||||
void QWidget::setTabOrder(std::initializer_list<QWidget *> widgets)
|
||||
{
|
||||
QWidget *prev = nullptr;
|
||||
for (const auto &widget : widgets) {
|
||||
if (!prev) {
|
||||
prev = widget;
|
||||
} else {
|
||||
QWidget::setTabOrder(prev, widget);
|
||||
prev = widget;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*!\internal
|
||||
|
||||
Moves the relevant subwidgets of this widget from the \a oldtlw's
|
||||
|
@ -432,7 +432,7 @@ public:
|
||||
void setFocusPolicy(Qt::FocusPolicy policy);
|
||||
bool hasFocus() const;
|
||||
static void setTabOrder(QWidget *, QWidget *);
|
||||
static inline void setTabOrder(std::initializer_list<QWidget *> widgets);
|
||||
static void setTabOrder(std::initializer_list<QWidget *> widgets);
|
||||
void setFocusProxy(QWidget *);
|
||||
QWidget *focusProxy() const;
|
||||
Qt::ContextMenuPolicy contextMenuPolicy() const;
|
||||
@ -914,19 +914,6 @@ inline bool QWidget::testAttribute(Qt::WidgetAttribute attribute) const
|
||||
return testAttribute_helper(attribute);
|
||||
}
|
||||
|
||||
inline void QWidget::setTabOrder(std::initializer_list<QWidget *> widgets)
|
||||
{
|
||||
QWidget *prev = nullptr;
|
||||
for (const auto &widget : widgets) {
|
||||
if (!prev) {
|
||||
prev = widget;
|
||||
} else {
|
||||
QWidget::setTabOrder(prev, widget);
|
||||
prev = widget;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#define QWIDGETSIZE_MAX ((1<<24)-1)
|
||||
|
||||
#ifndef QT_NO_DEBUG_STREAM
|
||||
|
Loading…
Reference in New Issue
Block a user