diff options
author | hjk <qtc-committer@nokia.com> | 2009-11-12 09:25:01 +0100 |
---|---|---|
committer | hjk <qtc-committer@nokia.com> | 2009-11-12 09:25:42 +0100 |
commit | 80a112f677c2644f761810ae63b5130737fa398c (patch) | |
tree | 0bff97189557968bae4124ef70a0fb0b4d811f45 /share | |
parent | 2df118c1a7ebb29961e9fe0728498efdf56dd907 (diff) | |
download | qt-creator-80a112f677c2644f761810ae63b5130737fa398c.tar.gz |
debugger: make QVariant dumper compile with QT_NO_SHORTCUT
Diffstat (limited to 'share')
-rw-r--r-- | share/qtcreator/gdbmacros/gdbmacros.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/share/qtcreator/gdbmacros/gdbmacros.cpp b/share/qtcreator/gdbmacros/gdbmacros.cpp index dd51f806bd..0af17f99cb 100644 --- a/share/qtcreator/gdbmacros/gdbmacros.cpp +++ b/share/qtcreator/gdbmacros/gdbmacros.cpp @@ -2135,19 +2135,23 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value, *value = qvariant_cast<QColor>(*v).name(); break; case QVariant::KeySequence: + #ifndef QT_NO_SHORTCUT *value = qvariant_cast<QKeySequence>(*v).toString(); + #else + *value = QString::fromLatin1("Disabled by QT_NO_SHORTCUT"); + #endif break; case QVariant::SizePolicy: *value = sizePolicyValue(qvariant_cast<QSizePolicy>(*v)); break; #endif default: { - static const char *qTypeFormat = sizeof(void *) == sizeof(long) ? - "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%lx)" : - "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%llx)"; - static const char *nonQTypeFormat = sizeof(void *) == sizeof(long) ? - "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%lx)" : - "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)"; + static const char *qTypeFormat = sizeof(void *) == sizeof(long) + ? "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%lx)" + : "'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%llx)"; + static const char *nonQTypeFormat = sizeof(void *) == sizeof(long) + ? "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%lx)" + : "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)"; char buf[1000]; const char *format = (v->typeName()[0] == 'Q') ? qTypeFormat : nonQTypeFormat; qsnprintf(buf, sizeof(buf) - 1, format, v->typeName(), v->typeName(), v); |