aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/layouts
diff options
context:
space:
mode:
authorRobin Burchell <robin.burchell@crimson.no>2017-01-12 14:33:50 +0100
committerRobin Burchell <robin.burchell@crimson.no>2017-01-16 17:10:04 +0000
commitb54690c690b4e457c8c225db1822aa97ae48f021 (patch)
tree6ce909f92f50fa9269c4d83221e0bd24bc0092df /src/imports/layouts
parent0b82932dd3f6d0ef72a504b10beff8ea7a967a0d (diff)
QQuickLayout: Use qmlWarning instead of qWarning to give context information
Change-Id: Ie16508d22554c9b6dcd66adf6a59f32117edf1e3 Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
Diffstat (limited to 'src/imports/layouts')
-rw-r--r--src/imports/layouts/qquicklayout.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/imports/layouts/qquicklayout.cpp b/src/imports/layouts/qquicklayout.cpp
index fd2ff4a73e..55ee3b63c6 100644
--- a/src/imports/layouts/qquicklayout.cpp
+++ b/src/imports/layouts/qquicklayout.cpp
@@ -42,6 +42,7 @@
#include <QtCore/qcoreapplication.h>
#include <QtCore/private/qnumeric_p.h>
#include <QtCore/qmath.h>
+#include <QtQml/qqmlinfo.h>
#include <limits>
/*!
@@ -678,7 +679,7 @@ QQuickLayout *QQuickLayoutAttached::parentLayout() const
parentItem = parentItem->parentItem();
return qobject_cast<QQuickLayout *>(parentItem);
} else {
- qWarning("Layout must be attached to Item elements");
+ qmlWarning(parent()) << "Layout must be attached to Item elements";
}
return 0;
}