diff options
author | Jason McDonald <jason.mcdonald@nokia.com> | 2012-03-26 19:09:49 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-03-26 21:30:54 +0200 |
commit | 13d936b0f2105be2f87df5dc1d6f5f2da11a74cc (patch) | |
tree | 9da6976c0b2407c8106b2f826ed7f0dd21ed68c4 | |
parent | 6a1d1165c2392e1ab5f493ce324942faa4d5df43 (diff) |
Make QWidget::isEnabledTo() and isVisibleTo() to take const pointers.
This commit addresses a long-standing Qt 5 to-do comment. Whilst a
trivial change, it is binary incompatible.
Task-number: QTBUG-259
Change-Id: I2fc7bfda488318dbabbbea9f5ff9d2b1d6ce0784
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 4 | ||||
-rw-r--r-- | src/widgets/kernel/qwidget.h | 5 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 8a3fea9c8a..2d3961cb8f 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -2884,7 +2884,7 @@ void QWidget::showNormal() \sa setEnabled() enabled */ -bool QWidget::isEnabledTo(QWidget* ancestor) const +bool QWidget::isEnabledTo(const QWidget *ancestor) const { const QWidget * w = this; while (!w->testAttribute(Qt::WA_ForceDisabled) @@ -7574,7 +7574,7 @@ bool QWidget::close() \sa show() hide() isVisible() */ -bool QWidget::isVisibleTo(QWidget* ancestor) const +bool QWidget::isVisibleTo(const QWidget *ancestor) const { if (!ancestor) return isVisible(); diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h index 78b693c78d..246beac9f1 100644 --- a/src/widgets/kernel/qwidget.h +++ b/src/widgets/kernel/qwidget.h @@ -243,7 +243,7 @@ public: void setWindowModality(Qt::WindowModality windowModality); bool isEnabled() const; - bool isEnabledTo(QWidget*) const; + bool isEnabledTo(const QWidget *) const; bool isEnabledToTLW() const; public Q_SLOTS: @@ -505,8 +505,7 @@ public: bool restoreGeometry(const QByteArray &geometry); void adjustSize(); bool isVisible() const; - bool isVisibleTo(QWidget*) const; - // ### Qt 5: bool isVisibleTo(_const_ QWidget *) const + bool isVisibleTo(const QWidget *) const; inline bool isHidden() const; bool isMinimized() const; |