summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2012-03-26 19:59:56 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-26 21:31:02 +0200
commit2b17b0235b70f89d15d3b91a14c3297d38377f94 (patch)
tree38c4d2d7d297ced973b1bd168a3f189a961e4719 /src/widgets/kernel
parent13d936b0f2105be2f87df5dc1d6f5f2da11a74cc (diff)
Make QWidget::mapTo/mapFrom() take const pointers.
This commit addresses a long-standing Qt 5 to-do. Whilst a trivial change, it is binary incompatible. Task-number: QTBUG-665 Change-Id: I4294233d876dec79eda57113bdf298ce73643e76 Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidget.cpp8
-rw-r--r--src/widgets/kernel/qwidget.h4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 2d3961cb8f..e6d5a7af6d 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -3860,13 +3860,13 @@ void QWidget::setFixedHeight(int h)
\sa mapFrom() mapToParent() mapToGlobal() underMouse()
*/
-QPoint QWidget::mapTo(QWidget * parent, const QPoint & pos) const
+QPoint QWidget::mapTo(const QWidget * parent, const QPoint & pos) const
{
QPoint p = pos;
if (parent) {
const QWidget * w = this;
while (w != parent) {
- Q_ASSERT_X(w, "QWidget::mapTo(QWidget *parent, const QPoint &pos)",
+ Q_ASSERT_X(w, "QWidget::mapTo(const QWidget *parent, const QPoint &pos)",
"parent must be in parent hierarchy");
p = w->mapToParent(p);
w = w->parentWidget();
@@ -3884,13 +3884,13 @@ QPoint QWidget::mapTo(QWidget * parent, const QPoint & pos) const
\sa mapTo() mapFromParent() mapFromGlobal() underMouse()
*/
-QPoint QWidget::mapFrom(QWidget * parent, const QPoint & pos) const
+QPoint QWidget::mapFrom(const QWidget * parent, const QPoint & pos) const
{
QPoint p(pos);
if (parent) {
const QWidget * w = this;
while (w != parent) {
- Q_ASSERT_X(w, "QWidget::mapFrom(QWidget *parent, const QPoint &pos)",
+ Q_ASSERT_X(w, "QWidget::mapFrom(const QWidget *parent, const QPoint &pos)",
"parent must be in parent hierarchy");
p = w->mapFromParent(p);
diff --git a/src/widgets/kernel/qwidget.h b/src/widgets/kernel/qwidget.h
index 246beac9f1..cf907e14cd 100644
--- a/src/widgets/kernel/qwidget.h
+++ b/src/widgets/kernel/qwidget.h
@@ -306,8 +306,8 @@ public:
QPoint mapFromGlobal(const QPoint &) const;
QPoint mapToParent(const QPoint &) const;
QPoint mapFromParent(const QPoint &) const;
- QPoint mapTo(QWidget *, const QPoint &) const;
- QPoint mapFrom(QWidget *, const QPoint &) const;
+ QPoint mapTo(const QWidget *, const QPoint &) const;
+ QPoint mapFrom(const QWidget *, const QPoint &) const;
QWidget *window() const;
QWidget *nativeParentWidget() const;