From 11cb488dc5d3b7dc6e1aa5d24026c54b242c2d1b Mon Sep 17 00:00:00 2001 From: hjk Date: Tue, 9 Mar 2010 14:35:32 +0100 Subject: [PATCH] debugger: make helper compilable with Qt 4.4 --- share/qtcreator/gdbmacros/gdbmacros.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index 9234f1fe1e4..1f3b2e4758a 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -3651,6 +3651,7 @@ void *watchPoint(int x, int y) #ifdef Q_CC_MSVC // Offsets of a map node value which looks like // "(size_t)&(((QMapNode *)0)->value)-0" +#if QT_VERSION >= 0x040500 template inline QDumper & putQMapNodeOffsetExpression(const char *keyType, const char *valueType, @@ -3669,6 +3670,7 @@ template d.put("\"]"); return d; } +#endif // Helper to write out common expression values for CDB: // Offsets of a std::pair for dumping std::map node value which look like @@ -3734,12 +3736,14 @@ static inline void dumpSizes(QDumper &d) #endif // QT_BOOTSTRAPPED sizeMap.insert(sizeof(QPointer), "QPointer"); // Common map node types +#if QT_VERSION >= 0x040500 sizeMap.insert(sizeof(QMapNode), NS"QMapNode"); sizeMap.insert(sizeof(QMapNode), NS"QMapNode"); sizeMap.insert(sizeof(QMapNode), NS"QMapNode"); sizeMap.insert(sizeof(QMapNode), NS"QMapNode<"NS"QString,int>"); sizeMap.insert(sizeof(QMapNode), NS"QMapNode<"NS"QString,"NS"QString>"); sizeMap.insert(sizeof(QMapNode), NS"QMapNode<"NS"QString,"NS"QVariant>"); +#endif // Dump as lists of types preceded by size size_t lastSize = 0; d.put("sizes=["); @@ -3859,12 +3863,14 @@ void *qDumpObjectData440( // Write out common expression values for CDB #ifdef Q_CC_MSVC d.put(",expressions=["); +#if QT_VERSION >= 0x040500 putQMapNodeOffsetExpression("int", "int", d).put(','); putQMapNodeOffsetExpression("int", NS"QString", d).put(','); putQMapNodeOffsetExpression("int", NS"QVariant", d).put(','); putQMapNodeOffsetExpression(NS"QString", "int", d).put(','); putQMapNodeOffsetExpression(NS"QString", NS"QString", d).put(','); putQMapNodeOffsetExpression(NS"QString", NS"QVariant", d).put(','); +#endif // Std Pairs putStdPairValueOffsetExpression("int","int", d).put(','); putStdPairValueOffsetExpression(NS"QString",NS"QString", d).put(',');