forked from qt-creator/qt-creator
less confusing: use the data type which was meant
This commit is contained in:
@@ -632,7 +632,7 @@ QDumper &QDumper::put(const void *p)
|
||||
{
|
||||
if (p) {
|
||||
// Pointer is 'long long' on WIN_64, only
|
||||
static const char *printFormat = sizeof(quintptr) == sizeof(long) ? "0x%lx" : "0x%llx";
|
||||
static const char *printFormat = sizeof(void *) == sizeof(long) ? "0x%lx" : "0x%llx";
|
||||
pos += sprintf(outBuffer + pos, printFormat, p);
|
||||
} else {
|
||||
pos += sprintf(outBuffer + pos, "<null>");
|
||||
@@ -1066,7 +1066,7 @@ static void qDumpQAbstractItem(QDumper &d)
|
||||
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
|
||||
mm->r = mm->c = 0;
|
||||
mm->p = mm->m = 0;
|
||||
static const char *printFormat = sizeof(quintptr) == sizeof(long) ?
|
||||
static const char *printFormat = sizeof(void *) == sizeof(long) ?
|
||||
"%d,%d,0x%lx,0x%lx" : "%d,%d,0x%llx,0x%llx";
|
||||
sscanf(d.templateParameters[0], printFormat, &mm->r, &mm->c, &mm->p, &mm->m);
|
||||
}
|
||||
@@ -2145,10 +2145,10 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
|
||||
break;
|
||||
#endif
|
||||
default: {
|
||||
static const char *qTypeFormat = sizeof(quintptr) == sizeof(long) ?
|
||||
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(quintptr) == sizeof(long) ?
|
||||
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];
|
||||
|
||||
Reference in New Issue
Block a user