summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraph_p.h
diff options
context:
space:
mode:
authorJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-18 12:34:24 (GMT)
committerJan-Arve Sæther <jan-arve.saether@nokia.com>2009-08-18 12:34:24 (GMT)
commit14f85a02b7c13b0afc1195df815093640fd7b83e (patch)
tree0a6966d307cfe2db6bb5053039729d5e59d14151 /src/gui/graphicsview/qgraph_p.h
parent8e6c5ceb5b30bf3e9c50a9bf0710b7a0919068b6 (diff)
downloadQt-14f85a02b7c13b0afc1195df815093640fd7b83e.zip
Qt-14f85a02b7c13b0afc1195df815093640fd7b83e.tar.gz
Qt-14f85a02b7c13b0afc1195df815093640fd7b83e.tar.bz2
Only compile in toString() functions if we are compiling in debug mode.
Also, only include the "name" member to AnchorData if we are compiling in debug mode.
Diffstat (limited to 'src/gui/graphicsview/qgraph_p.h')
-rw-r--r--src/gui/graphicsview/qgraph_p.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h
index 6cb843f..c228902 100644
--- a/src/gui/graphicsview/qgraph_p.h
+++ b/src/gui/graphicsview/qgraph_p.h
@@ -91,14 +91,16 @@ public:
void createEdge(Vertex *first, Vertex *second, EdgeData *data)
{
// Creates a bidirectional edge
-#if 0
+#if defined(QT_DEBUG) && 0
qDebug("Graph::createEdge(): %s",
qPrintable(QString::fromAscii("%1-%2")
.arg(first->toString()).arg(second->toString())));
#endif
if (edgeData(first, second)) {
+#ifdef QT_DEBUG
qWarning(qPrintable(QString::fromAscii("%1-%2 already has an edge")
.arg(first->toString()).arg(second->toString())));
+#endif
}
createDirectedEdge(first, second, data);
createDirectedEdge(second, first, data);
@@ -107,7 +109,7 @@ public:
void removeEdge(Vertex *first, Vertex *second)
{
// Removes a bidirectional edge
-#if 0
+#if defined(QT_DEBUG) && 0
qDebug("Graph::removeEdge(): %s",
qPrintable(QString::fromAscii("%1-%2")
.arg(first->toString()).arg(second->toString())));
@@ -120,7 +122,7 @@ public:
EdgeData *takeEdge(Vertex* first, Vertex* second)
{
-#if 0
+#if defined(QT_DEBUG) && 0
qDebug("Graph::takeEdge(): %s",
qPrintable(QString::fromAscii("%1-%2")
.arg(first->toString()).arg(second->toString())));
@@ -169,6 +171,7 @@ public:
return conns;
}
+#if defined(QT_DEBUG)
QString serializeToDot() { // traversal
QString strVertices;
QString edges;
@@ -195,6 +198,7 @@ public:
}
return QString::fromAscii("%1\n%2\n").arg(strVertices).arg(edges);
}
+#endif
Vertex *rootVertex() const
{