Commit 36a4fdda authored by Oswald Buddenhagen's avatar Oswald Buddenhagen

less confusing: use the data type which was meant

parent 2eade141
...@@ -632,7 +632,7 @@ QDumper &QDumper::put(const void *p) ...@@ -632,7 +632,7 @@ QDumper &QDumper::put(const void *p)
{ {
if (p) { if (p) {
// Pointer is 'long long' on WIN_64, only // 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); pos += sprintf(outBuffer + pos, printFormat, p);
} else { } else {
pos += sprintf(outBuffer + pos, "<null>"); pos += sprintf(outBuffer + pos, "<null>");
...@@ -1066,7 +1066,7 @@ static void qDumpQAbstractItem(QDumper &d) ...@@ -1066,7 +1066,7 @@ static void qDumpQAbstractItem(QDumper &d)
ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi); ModelIndex *mm = reinterpret_cast<ModelIndex *>(&mi);
mm->r = mm->c = 0; mm->r = mm->c = 0;
mm->p = mm->m = 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"; "%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); 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, ...@@ -2145,10 +2145,10 @@ static void qDumpQVariantHelper(const QVariant *v, QString *value,
break; break;
#endif #endif
default: { 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%lx)" :
"'"NS"%s "NS"qVariantValue<"NS"%s >'(*('"NS"QVariant'*)0x%llx)"; "'"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%lx)" :
"'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)"; "'%s "NS"qVariantValue<%s >'(*('"NS"QVariant'*)0x%llx)";
char buf[1000]; char buf[1000];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment