summaryrefslogtreecommitdiffstats
path: root/src/widgets/graphicsview
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-08-15 16:30:10 +0200
committerLiang Qi <liang.qi@qt.io>2017-08-15 16:31:48 +0200
commit106d3b9bf93325ea93c678270290b2c3dda9b764 (patch)
tree26c56932d60964c83e81d9c33d6f37ebc36d6c56 /src/widgets/graphicsview
parent79f679da9483c12979500dd48bc096d33af9ca6f (diff)
parent8bebded9ab02b8eec67c44bfddf802d6bf9cda3c (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/plugins/platforms/cocoa/qcocoamenu.h src/plugins/platforms/cocoa/qcocoamenu.mm src/plugins/platforms/cocoa/qcocoawindow.mm src/widgets/styles/qstylehelper_p.h Change-Id: I54247c98dd79d2b3826fc062b8b11048c9c7d9bb
Diffstat (limited to 'src/widgets/graphicsview')
-rw-r--r--src/widgets/graphicsview/qgraph_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout.h6
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicsanchorlayout_p.h5
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayout.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp5
-rw-r--r--src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h6
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsitem.h7
-rw-r--r--src/widgets/graphicsview/qgraphicsitem_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsitemanimation.h4
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.cpp3
-rw-r--r--src/widgets/graphicsview/qgraphicslayout.h8
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.cpp5
-rw-r--r--src/widgets/graphicsview/qgraphicslayout_p.h7
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem.h7
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutitem_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h2
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicslinearlayout.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget.h8
-rw-r--r--src/widgets/graphicsview/qgraphicsproxywidget_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsscene.h7
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_bsp_p.h6
-rw-r--r--src/widgets/graphicsview/qgraphicsscene_p.h6
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp5
-rw-r--r--src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h6
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicssceneevent.h7
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicssceneindex_p.h7
-rw-r--r--src/widgets/graphicsview/qgraphicsscenelinearindex_p.h7
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.cpp2
-rw-r--r--src/widgets/graphicsview/qgraphicstransform.h6
-rw-r--r--src/widgets/graphicsview/qgraphicstransform_p.h4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicsview.h7
-rw-r--r--src/widgets/graphicsview/qgraphicsview_p.h6
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicswidget.h7
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.cpp4
-rw-r--r--src/widgets/graphicsview/qgraphicswidget_p.h6
-rw-r--r--src/widgets/graphicsview/qsimplex_p.h2
51 files changed, 57 insertions, 197 deletions
diff --git a/src/widgets/graphicsview/qgraph_p.h b/src/widgets/graphicsview/qgraph_p.h
index b42d4cf2e3..dfe9d8fdd3 100644
--- a/src/widgets/graphicsview/qgraph_p.h
+++ b/src/widgets/graphicsview/qgraph_p.h
@@ -61,6 +61,8 @@
#include <float.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
template <typename Vertex, typename EdgeData>
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
index 176ce694a0..ea6a8018ca 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.cpp
@@ -135,7 +135,7 @@
*/
#include "qgraphicsanchorlayout_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
+
QT_BEGIN_NAMESPACE
QGraphicsAnchor::QGraphicsAnchor(QGraphicsAnchorLayout *parentLayout)
@@ -531,5 +531,3 @@ QSizeF QGraphicsAnchorLayout::sizeHint(Qt::SizeHint which, const QSizeF &constra
QT_END_NAMESPACE
#include "moc_qgraphicsanchorlayout.cpp"
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout.h b/src/widgets/graphicsview/qgraphicsanchorlayout.h
index 6d69957400..01dc30718a 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout.h
@@ -44,12 +44,10 @@
#include <QtWidgets/qgraphicsitem.h>
#include <QtWidgets/qgraphicslayout.h>
+QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
-
-#if !defined(QT_NO_GRAPHICSVIEW)
-
class QGraphicsAnchorPrivate;
class QGraphicsAnchorLayout;
class QGraphicsAnchorLayoutPrivate;
@@ -115,8 +113,6 @@ private:
friend class QGraphicsAnchor;
};
-#endif
-
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
index 60e9039b4a..71027f00a2 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.cpp
@@ -50,7 +50,6 @@
#include <numeric>
-#ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
// To ensure that all variables inside the simplex solver are non-negative,
@@ -2976,4 +2975,3 @@ void QGraphicsAnchorLayoutPrivate::dumpGraph(const QString &name)
#endif
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
index 8da338dff7..e785b486bb 100644
--- a/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
+++ b/src/widgets/graphicsview/qgraphicsanchorlayout_p.h
@@ -59,7 +59,9 @@
#include "qgraphicsanchorlayout.h"
#include "qgraph_p.h"
#include "qsimplex_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
+
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
/*
@@ -591,6 +593,5 @@ public:
};
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
#endif
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.cpp b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
index ae761d3478..d9005afbef 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.cpp
@@ -79,8 +79,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qapplication.h"
#include "qwidget.h"
#include "qgraphicslayout_p.h"
@@ -694,5 +692,3 @@ QSizePolicy::ControlTypes QGraphicsGridLayout::controlTypes(LayoutSide side) con
#endif
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsgridlayout.h b/src/widgets/graphicsview/qgraphicsgridlayout.h
index c7c2edd2a2..fb9bc2e32c 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayout.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayout.h
@@ -44,10 +44,9 @@
#include <QtWidgets/qgraphicsitem.h>
#include <QtWidgets/qgraphicslayout.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsGridLayoutPrivate;
@@ -130,9 +129,6 @@ private:
inline void QGraphicsGridLayout::addItem(QGraphicsLayoutItem *aitem, int arow, int acolumn, Qt::Alignment aalignment)
{ addItem(aitem, arow, acolumn, 1, 1, aalignment); }
-#endif
-
QT_END_NAMESPACE
#endif
-
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp b/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
index 4723e29c90..6a8d5c907b 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine.cpp
@@ -39,8 +39,6 @@
#include "qgraphicsgridlayoutengine_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicslayoutitem_p.h"
#include "qgraphicslayout_p.h"
#include "qgraphicswidget.h"
@@ -118,7 +116,4 @@ int QGraphicsGridLayoutEngine::stretchFactor(QGraphicsLayoutItem *layoutItem, Qt
return 0;
}
-
QT_END_NAMESPACE
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
index a099dace6b..d797f784b8 100644
--- a/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
+++ b/src/widgets/graphicsview/qgraphicsgridlayoutengine_p.h
@@ -54,13 +54,13 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include <QtGui/private/qgridlayoutengine_p.h>
-#ifndef QT_NO_GRAPHICSVIEW
-
#include <QtWidgets/qsizepolicy.h>
#include <QtWidgets/qstyle.h>
#include <QtWidgets/qstyleoption.h>
#include "qgraphicslayoutitem.h"
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsLayoutPrivate;
@@ -138,6 +138,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif // QGRAPHICSGRIDLAYOUTENGINE_P_H
diff --git a/src/widgets/graphicsview/qgraphicsitem.cpp b/src/widgets/graphicsview/qgraphicsitem.cpp
index 239a110119..a649d61135 100644
--- a/src/widgets/graphicsview/qgraphicsitem.cpp
+++ b/src/widgets/graphicsview/qgraphicsitem.cpp
@@ -732,8 +732,6 @@
#include "qgraphicsitem.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicsscene.h"
#include "qgraphicsscene_p.h"
#include "qgraphicssceneevent.h"
@@ -11635,5 +11633,3 @@ QDebug operator<<(QDebug debug, QGraphicsItem::GraphicsItemFlags flags)
QT_END_NAMESPACE
#include "moc_qgraphicsitem.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsitem.h b/src/widgets/graphicsview/qgraphicsitem.h
index 35e3d544e9..11d872f6e6 100644
--- a/src/widgets/graphicsview/qgraphicsitem.h
+++ b/src/widgets/graphicsview/qgraphicsitem.h
@@ -50,10 +50,9 @@
class tst_QGraphicsItem;
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QBrush;
class QCursor;
@@ -1050,8 +1049,6 @@ Q_DECLARE_METATYPE(QGraphicsItem *)
QT_BEGIN_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
#endif // QGRAPHICSITEM_H
diff --git a/src/widgets/graphicsview/qgraphicsitem_p.h b/src/widgets/graphicsview/qgraphicsitem_p.h
index 5c4523f9ed..86414263a7 100644
--- a/src/widgets/graphicsview/qgraphicsitem_p.h
+++ b/src/widgets/graphicsview/qgraphicsitem_p.h
@@ -61,7 +61,7 @@
#include <QtCore/qpoint.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
@@ -815,6 +815,4 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.cpp b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
index c5687ee9b3..572ec141bc 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.cpp
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.cpp
@@ -81,8 +81,6 @@
#include "qgraphicsitemanimation.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicsitem.h"
#include <QtCore/qtimeline.h>
@@ -595,5 +593,3 @@ void QGraphicsItemAnimation::afterAnimationStep(qreal step)
QT_END_NAMESPACE
#include "moc_qgraphicsitemanimation.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsitemanimation.h b/src/widgets/graphicsview/qgraphicsitemanimation.h
index f02e0ac793..a819acc880 100644
--- a/src/widgets/graphicsview/qgraphicsitemanimation.h
+++ b/src/widgets/graphicsview/qgraphicsitemanimation.h
@@ -43,11 +43,10 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtCore/qobject.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
-
class QGraphicsItem;
class QMatrix;
class QPointF;
@@ -110,5 +109,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
#endif
diff --git a/src/widgets/graphicsview/qgraphicslayout.cpp b/src/widgets/graphicsview/qgraphicslayout.cpp
index fc3b7ae503..ca0aef9e27 100644
--- a/src/widgets/graphicsview/qgraphicslayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslayout.cpp
@@ -39,7 +39,6 @@
#include "qapplication.h"
-#ifndef QT_NO_GRAPHICSVIEW
#include "qgraphicslayout.h"
#include "qgraphicslayout_p.h"
#include "qgraphicslayoutitem.h"
@@ -521,5 +520,3 @@ bool QGraphicsLayout::instantInvalidatePropagation()
}
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicslayout.h b/src/widgets/graphicsview/qgraphicslayout.h
index 5b1c465414..bbe45bbdd6 100644
--- a/src/widgets/graphicsview/qgraphicslayout.h
+++ b/src/widgets/graphicsview/qgraphicslayout.h
@@ -43,10 +43,9 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qgraphicslayoutitem.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsLayoutPrivate;
class QGraphicsLayoutItem;
@@ -86,9 +85,6 @@ private:
Q_DECLARE_INTERFACE(QGraphicsLayout, "org.qt-project.Qt.QGraphicsLayout")
-#endif
-
QT_END_NAMESPACE
#endif
-
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.cpp b/src/widgets/graphicsview/qgraphicslayout_p.cpp
index c478dc2147..ae1eeffa2b 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.cpp
+++ b/src/widgets/graphicsview/qgraphicslayout_p.cpp
@@ -39,8 +39,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicslayout_p.h"
#include "qgraphicslayout.h"
#include "qgraphicswidget.h"
@@ -195,7 +193,4 @@ void QGraphicsLayoutPrivate::activateRecursive(QGraphicsLayoutItem *item)
}
}
-
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicslayout_p.h b/src/widgets/graphicsview/qgraphicslayout_p.h
index 47d8611786..302ad1e116 100644
--- a/src/widgets/graphicsview/qgraphicslayout_p.h
+++ b/src/widgets/graphicsview/qgraphicslayout_p.h
@@ -53,14 +53,14 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include "qgraphicslayout.h"
#include "qgraphicslayoutitem_p.h"
#include <QtWidgets/qstyle.h>
#include <QtWidgets/qwidget.h>
#include <QtWidgets/qstyleoption.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsLayoutItem;
@@ -144,9 +144,6 @@ public:
bool activated;
};
-
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
-
#endif
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.cpp b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
index 785056a56f..9951fc0383 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.cpp
@@ -39,8 +39,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicslayout.h"
#include "qgraphicsscene.h"
#include "qgraphicslayoutitem.h"
@@ -930,5 +928,3 @@ void QGraphicsLayoutItem::setGraphicsItem(QGraphicsItem *item)
}
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem.h b/src/widgets/graphicsview/qgraphicslayoutitem.h
index 02bda0ad8d..10c7870412 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem.h
+++ b/src/widgets/graphicsview/qgraphicslayoutitem.h
@@ -45,10 +45,9 @@
#include <QtWidgets/qsizepolicy.h>
#include <QtGui/qevent.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsLayoutItemPrivate;
class QGraphicsItem;
@@ -141,8 +140,6 @@ inline qreal QGraphicsLayoutItem::maximumWidth() const
inline qreal QGraphicsLayoutItem::maximumHeight() const
{ return effectiveSizeHint(Qt::MaximumSize).height(); }
-#endif
-
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicslayoutitem_p.h b/src/widgets/graphicsview/qgraphicslayoutitem_p.h
index 96e7cc7fd9..6aaa85381e 100644
--- a/src/widgets/graphicsview/qgraphicslayoutitem_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutitem_p.h
@@ -55,6 +55,8 @@
#include <QtCore/QSizeF>
#include <QtWidgets/QSizePolicy>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsLayoutItem;
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
index 8d0ddde0bc..af969b346d 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo.cpp
@@ -39,8 +39,6 @@
#include "qgraphicslayoutstyleinfo_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicslayout_p.h"
#include "qgraphicswidget.h"
#include <QtWidgets/qstyle.h>
@@ -108,5 +106,3 @@ QStyle *QGraphicsLayoutStyleInfo::style() const
}
QT_END_NAMESPACE
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
index 9d3aa22548..3463ae71bf 100644
--- a/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
+++ b/src/widgets/graphicsview/qgraphicslayoutstyleinfo_p.h
@@ -54,6 +54,8 @@
#include <QtGui/private/qabstractlayoutstyleinfo_p.h>
#include <QtWidgets/qstyleoption.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QStyle;
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.cpp b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
index 6763af7905..8964b3b77a 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.cpp
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.cpp
@@ -113,8 +113,6 @@
#include "qapplication.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qwidget.h"
#include "qgraphicslayout_p.h"
#include "qgraphicslayoutitem.h"
@@ -566,5 +564,3 @@ void QGraphicsLinearLayout::dump(int indent) const
}
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicslinearlayout.h b/src/widgets/graphicsview/qgraphicslinearlayout.h
index ebe8e903d9..8186eea987 100644
--- a/src/widgets/graphicsview/qgraphicslinearlayout.h
+++ b/src/widgets/graphicsview/qgraphicslinearlayout.h
@@ -44,10 +44,9 @@
#include <QtWidgets/qgraphicsitem.h>
#include <QtWidgets/qgraphicslayout.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsLinearLayoutPrivate;
@@ -105,9 +104,6 @@ private:
Q_DECLARE_PRIVATE(QGraphicsLinearLayout)
};
-#endif
-
QT_END_NAMESPACE
#endif
-
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.cpp b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
index 5e692abd73..ebd245c4e7 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.cpp
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.cpp
@@ -39,8 +39,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicslayout.h"
#include "qgraphicsproxywidget.h"
#include "private/qgraphicsproxywidget_p.h"
@@ -1606,5 +1604,3 @@ QGraphicsProxyWidget *QGraphicsProxyWidget::newProxyWidget(const QWidget *)
QT_END_NAMESPACE
#include "moc_qgraphicsproxywidget.cpp"
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget.h b/src/widgets/graphicsview/qgraphicsproxywidget.h
index c1564cba34..fd6369a1fd 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget.h
@@ -43,10 +43,9 @@
#include <QtWidgets/qtwidgetsglobal.h>
#include <QtWidgets/qgraphicswidget.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsProxyWidgetPrivate;
@@ -133,9 +132,6 @@ private:
friend class QGraphicsItem;
};
-#endif
-
QT_END_NAMESPACE
#endif
-
diff --git a/src/widgets/graphicsview/qgraphicsproxywidget_p.h b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
index 4624772993..593b686e0e 100644
--- a/src/widgets/graphicsview/qgraphicsproxywidget_p.h
+++ b/src/widgets/graphicsview/qgraphicsproxywidget_p.h
@@ -55,7 +55,7 @@
#include "qgraphicsproxywidget.h"
#include "private/qgraphicswidget_p.h"
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
@@ -114,5 +114,3 @@ public:
QT_END_NAMESPACE
#endif
-
-#endif
diff --git a/src/widgets/graphicsview/qgraphicsscene.cpp b/src/widgets/graphicsview/qgraphicsscene.cpp
index db41fc3eb9..8b088e7c01 100644
--- a/src/widgets/graphicsview/qgraphicsscene.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene.cpp
@@ -203,8 +203,6 @@
#include "qgraphicsscene.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicsitem.h"
#include "qgraphicsitem_p.h"
#include "qgraphicslayout.h"
@@ -6585,5 +6583,3 @@ void QGraphicsScenePrivate::ungrabGesture(QGraphicsItem *item, Qt::GestureType g
QT_END_NAMESPACE
#include "moc_qgraphicsscene.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsscene.h b/src/widgets/graphicsview/qgraphicsscene.h
index b1846303f7..d515585067 100644
--- a/src/widgets/graphicsview/qgraphicsscene.h
+++ b/src/widgets/graphicsview/qgraphicsscene.h
@@ -50,10 +50,9 @@
#include <QtGui/qmatrix.h>
#include <QtGui/qpen.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
template<typename T> class QList;
class QFocusEvent;
@@ -328,8 +327,6 @@ private:
Q_DECLARE_OPERATORS_FOR_FLAGS(QGraphicsScene::SceneLayers)
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
index 77a3345d47..81d2953d8f 100644
--- a/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
+++ b/src/widgets/graphicsview/qgraphicsscene_bsp.cpp
@@ -39,8 +39,6 @@
#include "qgraphicsscene_bsp_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include <QtCore/qstring.h>
#include <private/qgraphicsitem_p.h>
@@ -290,5 +288,3 @@ QRectF QGraphicsSceneBspTree::rectForIndex(int index) const
}
QT_END_NAMESPACE
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsscene_bsp_p.h b/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
index 1ab9c10d6a..26e612b2dd 100644
--- a/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_bsp_p.h
@@ -54,12 +54,12 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include <QtCore/qlist.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include <QtCore/qrect.h>
#include <QtCore/qset.h>
#include <QtCore/qvector.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsItem;
@@ -126,6 +126,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif // QGRAPHICSSCENEBSPTREE_P_H
diff --git a/src/widgets/graphicsview/qgraphicsscene_p.h b/src/widgets/graphicsview/qgraphicsscene_p.h
index c52770501f..2f5d7c54bb 100644
--- a/src/widgets/graphicsview/qgraphicsscene_p.h
+++ b/src/widgets/graphicsview/qgraphicsscene_p.h
@@ -54,8 +54,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "qgraphicsscene.h"
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include "qgraphicssceneevent.h"
#include "qgraphicsview.h"
#include "qgraphicsview_p.h"
@@ -71,6 +69,8 @@
#include <QtWidgets/qstyle.h>
#include <QtWidgets/qstyleoption.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsSceneIndex;
@@ -356,6 +356,4 @@ static inline QRectF adjustedItemEffectiveBoundingRect(const QGraphicsItem *item
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
index 203cc8007c..69ddf54bc7 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex.cpp
@@ -74,8 +74,6 @@
#include <QtCore/qglobal.h>
-#ifndef QT_NO_GRAPHICSVIEW
-
#include <private/qgraphicsscene_p.h>
#include <private/qgraphicsscenebsptreeindex_p.h>
#include <private/qgraphicssceneindex_p.h>
@@ -710,6 +708,3 @@ bool QGraphicsSceneBspTreeIndex::event(QEvent *event)
QT_END_NAMESPACE
#include "moc_qgraphicsscenebsptreeindex_p.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
-
diff --git a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
index b195a4757c..8e78407762 100644
--- a/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenebsptreeindex_p.h
@@ -53,8 +53,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include "qgraphicssceneindex_p.h"
#include "qgraphicsitem_p.h"
#include "qgraphicsscene_bsp_p.h"
@@ -62,6 +60,8 @@
#include <QtCore/qrect.h>
#include <QtCore/qlist.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
static const int QGRAPHICSSCENE_INDEXTIMER_TIMEOUT = 2000;
@@ -199,6 +199,4 @@ static inline bool QRectF_intersects(const QRectF &s, const QRectF &r)
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif // QGRAPHICSBSPTREEINDEX_H
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.cpp b/src/widgets/graphicsview/qgraphicssceneevent.cpp
index 763688191d..f7f09486e9 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneevent.cpp
@@ -259,8 +259,6 @@
#include "qgraphicssceneevent.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#ifndef QT_NO_DEBUG
#include <QtCore/qdebug.h>
#endif
@@ -1733,5 +1731,3 @@ void QGraphicsSceneMoveEvent::setNewPos(const QPointF &pos)
}
QT_END_NAMESPACE
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicssceneevent.h b/src/widgets/graphicsview/qgraphicssceneevent.h
index 4d6cde1b87..77b53e401d 100644
--- a/src/widgets/graphicsview/qgraphicssceneevent.h
+++ b/src/widgets/graphicsview/qgraphicssceneevent.h
@@ -51,10 +51,9 @@
#include <QtCore/qhash.h>
#endif
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QMimeData;
class QPointF;
@@ -321,8 +320,6 @@ public:
void setNewPos(const QPointF &pos);
};
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicssceneindex.cpp b/src/widgets/graphicsview/qgraphicssceneindex.cpp
index a956a492ac..c2e9cb4729 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex.cpp
+++ b/src/widgets/graphicsview/qgraphicssceneindex.cpp
@@ -61,8 +61,6 @@
#include "qgraphicssceneindex_p.h"
#include "qgraphicsscenebsptreeindex_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
QT_BEGIN_NAMESPACE
namespace QtPrivate { // just to keep indentation of the following functions at the same level
@@ -627,5 +625,3 @@ void QGraphicsSceneIndex::prepareBoundingRectChange(const QGraphicsItem *item)
QT_END_NAMESPACE
#include "moc_qgraphicssceneindex_p.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicssceneindex_p.h b/src/widgets/graphicsview/qgraphicssceneindex_p.h
index 2085acd532..bdc57bd9ea 100644
--- a/src/widgets/graphicsview/qgraphicssceneindex_p.h
+++ b/src/widgets/graphicsview/qgraphicssceneindex_p.h
@@ -60,10 +60,9 @@
#include <QtCore/qobject.h>
#include <QtGui/qtransform.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsSceneIndexPrivate;
class QPointF;
@@ -156,8 +155,6 @@ inline void QGraphicsSceneIndexPrivate::items_helper(const QRectF &rect, QGraphi
}
}
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
#endif // QGRAPHICSSCENEINDEX_H
diff --git a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
index 47cba93fce..a59a8ac1b0 100644
--- a/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
+++ b/src/widgets/graphicsview/qgraphicsscenelinearindex_p.h
@@ -53,15 +53,14 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include <QtCore/qrect.h>
#include <QtCore/qlist.h>
#include <QtWidgets/qgraphicsitem.h>
#include <private/qgraphicssceneindex_p.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(graphicsview);
+QT_BEGIN_NAMESPACE
class Q_AUTOTEST_EXPORT QGraphicsSceneLinearIndex : public QGraphicsSceneIndex
{
@@ -116,6 +115,4 @@ private:
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif // QGRAPHICSSCENELINEARINDEX_H
diff --git a/src/widgets/graphicsview/qgraphicstransform.cpp b/src/widgets/graphicsview/qgraphicstransform.cpp
index db3f8b4a51..0f0d9aaddc 100644
--- a/src/widgets/graphicsview/qgraphicstransform.cpp
+++ b/src/widgets/graphicsview/qgraphicstransform.cpp
@@ -93,7 +93,6 @@
#include <QtCore/qmath.h>
#include <QtCore/qnumeric.h>
-#ifndef QT_NO_GRAPHICSVIEW
QT_BEGIN_NAMESPACE
QGraphicsTransformPrivate::~QGraphicsTransformPrivate()
@@ -597,4 +596,3 @@ void QGraphicsRotation::applyTo(QMatrix4x4 *matrix) const
#include "moc_qgraphicstransform.cpp"
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicstransform.h b/src/widgets/graphicsview/qgraphicstransform.h
index 6a76926725..ceeb314c86 100644
--- a/src/widgets/graphicsview/qgraphicstransform.h
+++ b/src/widgets/graphicsview/qgraphicstransform.h
@@ -46,9 +46,9 @@
#include <QtGui/QTransform>
#include <QtGui/QMatrix4x4>
-#ifndef QT_NO_GRAPHICSVIEW
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(graphicsview);
+QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QGraphicsTransformPrivate;
@@ -149,6 +149,4 @@ private:
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
-
#endif // QFXTRANSFORM_H
diff --git a/src/widgets/graphicsview/qgraphicstransform_p.h b/src/widgets/graphicsview/qgraphicstransform_p.h
index 38dbd51c2e..e54ee9fb3c 100644
--- a/src/widgets/graphicsview/qgraphicstransform_p.h
+++ b/src/widgets/graphicsview/qgraphicstransform_p.h
@@ -54,7 +54,7 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "private/qobject_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
+QT_REQUIRE_CONFIG(graphicsview);
QT_BEGIN_NAMESPACE
@@ -77,6 +77,4 @@ public:
QT_END_NAMESPACE
-#endif //QT_NO_GRAPHICSVIEW
-
#endif // QGRAPHICSTRANSFORM_P_H
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index a00156ef01..4b7890e9ff 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -271,8 +271,6 @@ static const int QGRAPHICSVIEW_PREALLOC_STYLE_OPTIONS = 503; // largest prime <
#include "qgraphicsview.h"
#include "qgraphicsview_p.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicsitem.h"
#include "qgraphicsitem_p.h"
#include "qgraphicsscene.h"
@@ -3935,5 +3933,3 @@ QRectF QGraphicsViewPrivate::mapToScene(const QRectF &rect) const
QT_END_NAMESPACE
#include "moc_qgraphicsview.cpp"
-
-#endif // QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicsview.h b/src/widgets/graphicsview/qgraphicsview.h
index d70ce6cf1c..a9e4efefaf 100644
--- a/src/widgets/graphicsview/qgraphicsview.h
+++ b/src/widgets/graphicsview/qgraphicsview.h
@@ -46,10 +46,9 @@
#include <QtWidgets/qscrollarea.h>
#include <QtWidgets/qgraphicsscene.h>
-QT_BEGIN_NAMESPACE
-
+QT_REQUIRE_CONFIG(graphicsview);
-#if !defined(QT_NO_GRAPHICSVIEW)
+QT_BEGIN_NAMESPACE
class QGraphicsItem;
class QPainterPath;
@@ -313,8 +312,6 @@ inline QPoint QGraphicsView::mapFromScene(qreal ax, qreal ay) const
inline QPolygon QGraphicsView::mapFromScene(qreal ax, qreal ay, qreal w, qreal h) const
{ return mapFromScene(QRectF(ax, ay, w, h)); }
-#endif // QT_NO_GRAPHICSVIEW
-
QT_END_NAMESPACE
#endif // QGRAPHICSVIEW_H
diff --git a/src/widgets/graphicsview/qgraphicsview_p.h b/src/widgets/graphicsview/qgraphicsview_p.h
index b34be77f11..0428b9ce70 100644
--- a/src/widgets/graphicsview/qgraphicsview_p.h
+++ b/src/widgets/graphicsview/qgraphicsview_p.h
@@ -54,8 +54,6 @@
#include <QtWidgets/private/qtwidgetsglobal_p.h>
#include "qgraphicsview.h"
-#if !defined(QT_NO_GRAPHICSVIEW)
-
#include <QtGui/qevent.h>
#include <QtCore/qcoreapplication.h>
#include "qgraphicssceneevent.h"
@@ -63,6 +61,8 @@
#include <private/qabstractscrollarea_p.h>
#include <private/qapplication_p.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class Q_WIDGETS_EXPORT QGraphicsViewPrivate : public QAbstractScrollAreaPrivate
@@ -231,6 +231,4 @@ public:
QT_END_NAMESPACE
-#endif // QT_NO_GRAPHICSVIEW
-
#endif
diff --git a/src/widgets/graphicsview/qgraphicswidget.cpp b/src/widgets/graphicsview/qgraphicswidget.cpp
index 1ff01b875c..c658e40a9e 100644
--- a/src/widgets/graphicsview/qgraphicswidget.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget.cpp
@@ -39,8 +39,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include "qgraphicswidget.h"
#include "qgraphicswidget_p.h"
#include "qgraphicslayout.h"
@@ -2425,5 +2423,3 @@ void QGraphicsWidget::dumpFocusChain()
QT_END_NAMESPACE
#include "moc_qgraphicswidget.cpp"
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicswidget.h b/src/widgets/graphicsview/qgraphicswidget.h
index 5cb97db381..831511d14a 100644
--- a/src/widgets/graphicsview/qgraphicswidget.h
+++ b/src/widgets/graphicsview/qgraphicswidget.h
@@ -46,8 +46,9 @@
#include <QtWidgets/qgraphicsitem.h>
#include <QtGui/qpalette.h>
-QT_BEGIN_NAMESPACE
+QT_REQUIRE_CONFIG(graphicsview);
+QT_BEGIN_NAMESPACE
class QFont;
class QFontMetrics;
@@ -58,8 +59,6 @@ class QGraphicsSceneResizeEvent;
class QStyle;
class QStyleOption;
-#if !defined(QT_NO_GRAPHICSVIEW)
-
class QGraphicsWidgetPrivate;
class Q_WIDGETS_EXPORT QGraphicsWidget : public QGraphicsObject, public QGraphicsLayoutItem
@@ -239,8 +238,6 @@ private:
inline void QGraphicsWidget::setGeometry(qreal ax, qreal ay, qreal aw, qreal ah)
{ setGeometry(QRectF(ax, ay, aw, ah)); }
-#endif
-
QT_END_NAMESPACE
#endif
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.cpp b/src/widgets/graphicsview/qgraphicswidget_p.cpp
index f3c568fa01..c913e210b9 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.cpp
+++ b/src/widgets/graphicsview/qgraphicswidget_p.cpp
@@ -39,8 +39,6 @@
#include "qglobal.h"
-#ifndef QT_NO_GRAPHICSVIEW
-
#include <QtCore/qdebug.h>
#include <QtCore/qnumeric.h>
#include "qgraphicswidget_p.h"
@@ -897,5 +895,3 @@ void QGraphicsWidgetPrivate::setGeometryFromSetPos()
}
QT_END_NAMESPACE
-
-#endif //QT_NO_GRAPHICSVIEW
diff --git a/src/widgets/graphicsview/qgraphicswidget_p.h b/src/widgets/graphicsview/qgraphicswidget_p.h
index 18542c68e6..0fb9fbba07 100644
--- a/src/widgets/graphicsview/qgraphicswidget_p.h
+++ b/src/widgets/graphicsview/qgraphicswidget_p.h
@@ -60,13 +60,13 @@
#include <QtWidgets/qsizepolicy.h>
#include <QtWidgets/qstyle.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
class QGraphicsLayout;
class QStyleOptionTitleBar;
-#if !defined(QT_NO_GRAPHICSVIEW)
-
class QGraphicsWidgetPrivate : public QGraphicsItemPrivate
{
Q_DECLARE_PUBLIC(QGraphicsWidget)
@@ -201,8 +201,6 @@ public:
#endif
};
-#endif
-
QT_END_NAMESPACE
#endif //QGRAPHICSWIDGET_P_H
diff --git a/src/widgets/graphicsview/qsimplex_p.h b/src/widgets/graphicsview/qsimplex_p.h
index 634b2e0425..2342da2437 100644
--- a/src/widgets/graphicsview/qsimplex_p.h
+++ b/src/widgets/graphicsview/qsimplex_p.h
@@ -56,6 +56,8 @@
#include <QtCore/qpair.h>
#include <QtCore/qstring.h>
+QT_REQUIRE_CONFIG(graphicsview);
+
QT_BEGIN_NAMESPACE
struct QSimplexVariable