Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 4.0.0
-
None
-
Ubuntu 15.04 on x86_64
-
fbc82d3f88a736710474a95614767646a24077b2
Description
When a negative number (-1) is stored on a QJsonObject, it does not display corectly in watch list window. The same value is stored in a plain QJsonValue object, it does display correctly in the watch list window. Printing the QJsonObject instance does print out the correct value.
SSCCE to reproduce issue
- Code
`main.cpp`
#include <QCoreApplication>
#include <QJsonObject>
#include <QDebug>
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
QJsonValue v(-1);
qDebug()<<"v="<<v;
QJsonObject obj {
{"foo", -1} };
qDebug()<<"obj="<<obj;
return a.exec();
}
- set a breakpoint on line 16:
return a.exec();
- run in debug mode to the breakpoint and expand instance "obj" to see a value of 134217727 ( 0x7ffffff. log_2(134217727)= 26.99), whereas "v" simply has -1
Attachments
For Gerrit Dashboard: QTCREATORBUG-16313 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
160092,4 | Debugger: Fix dumping of numeric QJsonValue inside arrays | 4.0 | qt-creator/qt-creator | Status: MERGED | +2 | 0 |