diff options
author | hjk <qtc-committer@nokia.com> | 2009-08-21 08:18:37 (GMT) |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-08-21 08:18:37 (GMT) |
commit | 119a67e338c8e6c3616781cee1027031b667676e (patch) | |
tree | 99700bd2063e1ad766917f3f332bcbd486a36cd1 /src | |
parent | c7e2ad82ea4cd999e568e2819dea10bf7214eee3 (diff) | |
download | Qt-119a67e338c8e6c3616781cee1027031b667676e.zip Qt-119a67e338c8e6c3616781cee1027031b667676e.tar.gz Qt-119a67e338c8e6c3616781cee1027031b667676e.tar.bz2 |
make the new anchor layout code compile with namespaces
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraph_p.h | 4 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout.cpp | 4 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.cpp | 13 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsanchorlayout_p.h | 3 | ||||
-rw-r--r-- | src/gui/graphicsview/qsimplex_p.cpp | 5 | ||||
-rw-r--r-- | src/gui/graphicsview/qsimplex_p.h | 5 |
6 files changed, 29 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h index c228902..7130003 100644 --- a/src/gui/graphicsview/qgraph_p.h +++ b/src/gui/graphicsview/qgraph_p.h @@ -5,6 +5,8 @@ #include <float.h> +QT_BEGIN_NAMESPACE + template <typename Vertex, typename EdgeData> class Graph { @@ -234,3 +236,5 @@ private: QHash<Vertex *, QHash<Vertex *, EdgeData *> *> m_graph; }; + +QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicsanchorlayout.cpp b/src/gui/graphicsview/qgraphicsanchorlayout.cpp index 5032dc6..fed0e5a 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout.cpp @@ -81,6 +81,8 @@ #include "qgraphicsanchorlayout_p.h" +QT_BEGIN_NAMESPACE + QGraphicsAnchorLayout::QGraphicsAnchorLayout(QGraphicsLayoutItem *parent) : QGraphicsLayout(*new QGraphicsAnchorLayoutPrivate(), parent) { @@ -447,3 +449,5 @@ QSizeF QGraphicsAnchorLayout::sizeHint(Qt::SizeHint which, const QSizeF &constra return engineSizeHint + QSizeF(left + right, top + bottom); } + +QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp index ffece0d..c137de3 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.cpp @@ -39,12 +39,18 @@ ** ****************************************************************************/ -#include <QWidget> -#include <QLinkedList> +#include <QtGui/qwidget.h> +#include <QtCore/qlinkedlist.h> #include <QtCore/qstack.h> +#ifdef QT_DEBUG +#include <QtCore/qfile.h> +#endif + #include "qgraphicsanchorlayout_p.h" +QT_BEGIN_NAMESPACE + void AnchorData::refreshSizeHints(qreal effectiveSpacing) { if (!isLayoutAnchor && from->m_item == to->m_item) { @@ -2080,7 +2086,6 @@ void QGraphicsAnchorLayoutPrivate::solvePreferred(QList<QSimplexConstraint *> co } #ifdef QT_DEBUG -#include <QFile> void QGraphicsAnchorLayoutPrivate::dumpGraph() { QFile file(QString::fromAscii("anchorlayout.dot")); @@ -2095,3 +2100,5 @@ void QGraphicsAnchorLayoutPrivate::dumpGraph() file.close(); } #endif + +QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qgraphicsanchorlayout_p.h b/src/gui/graphicsview/qgraphicsanchorlayout_p.h index e17bd28..15a1b44 100644 --- a/src/gui/graphicsview/qgraphicsanchorlayout_p.h +++ b/src/gui/graphicsview/qgraphicsanchorlayout_p.h @@ -46,6 +46,8 @@ #include "qgraph_p.h" #include "qsimplex_p.h" +QT_BEGIN_NAMESPACE + /* The public QGraphicsAnchorLayout interface represents an anchorage point as a pair of a <QGraphicsLayoutItem *> and a <Qt::AnchorPoint>. @@ -472,3 +474,4 @@ public: uint calculateGraphCacheDirty : 1; }; +QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qsimplex_p.cpp b/src/gui/graphicsview/qsimplex_p.cpp index 1349ced..7fa5ab0 100644 --- a/src/gui/graphicsview/qsimplex_p.cpp +++ b/src/gui/graphicsview/qsimplex_p.cpp @@ -5,9 +5,10 @@ #include <stdlib.h> +QT_BEGIN_NAMESPACE + QSimplex::QSimplex() : objective(0), rows(0), columns(0), firstArtificial(0), matrix(0) { - } QSimplex::~QSimplex() @@ -366,3 +367,5 @@ void QSimplex::collectResults() variables[index]->result = valueAt(i, columns - 1); } } + +QT_END_NAMESPACE diff --git a/src/gui/graphicsview/qsimplex_p.h b/src/gui/graphicsview/qsimplex_p.h index dad82ce..e3629df 100644 --- a/src/gui/graphicsview/qsimplex_p.h +++ b/src/gui/graphicsview/qsimplex_p.h @@ -17,6 +17,8 @@ #include <QtCore/qhash.h> #include <QtCore/qpair.h> +QT_BEGIN_NAMESPACE + struct QSimplexVariable { QSimplexVariable() : result(0), index(0) {}; @@ -118,5 +120,6 @@ inline void QSimplex::setValueAt(int rowIndex, int columnIndex, qreal value) matrix[rowIndex * columns + columnIndex] = value; } +QT_END_NAMESPACE -#endif +#endif // QSIMPLEX_P_H |