summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-04-15 12:16:54 +0200
committerLaszlo Agocs <laszlo.agocs@theqtcompany.com>2015-04-16 16:47:56 +0000
commitb596acbefb2ddb71d6bac6be1b8aa1d436c63649 (patch)
treefebea78b6b7033990dfceccc7826601c58008982 /src/widgets/graphicsview/qgraphicsanchorlayout_p.h
parentf3fad26bc9e0fde3bcf1625da731aeb02b04a7a5 (diff)
Avoid warnings with clang 6
warning: 'this' pointer cannot be null in well-defined C++ code The code tries to be smart but compilers warn about this unfortunately. Change-Id: Ifb8deafe8834d580beef829a3079ae9222acfa8f Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
Diffstat (limited to 'src/widgets/graphicsview/qgraphicsanchorlayout_p.h')
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index a4609c41cf..c0bb8ef63a 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -251,9 +251,7 @@ struct AnchorVertexPair : public AnchorVertex {
#ifdef QT_DEBUG
inline QString AnchorVertex::toString() const
{
- if (!this) {
- return QLatin1String("NULL");
- } else if (m_type == Pair) {
+ if (m_type == Pair) {
const AnchorVertexPair *vp = static_cast<const AnchorVertexPair *>(this);
return QString::fromLatin1("(%1, %2)").arg(vp->m_first->toString()).arg(vp->m_second->toString());
} else if (!m_item) {