Details
-
Bug
-
Resolution: Done
-
Not Evaluated
-
Qt Creator 3.5.0
-
Windows 7 64 bit
Qt 5.4.2, Qt 5.5.0
MinGW g++ 4.9.1
gdb 7.8
-
1b5e5656f67ca0954a8ea67cbb8d6e86fb543aa3
Description
- Have the following lines in a source file:
QByteArray ba1 = "Hello"; QByteArray ba2 = QByteArray::fromRawData("world", 5); QByteArray ba3 = ba2; QByteArray ba4 = ba3.data();
- Place a breakpoint in the last of these lines.
- Build it all on MinGW and let gdb hit the breakpoint.
In Locals and Expressions view, only ba1 is shown correctly. The other QByteArrays are "not accessible". - Step forward.
ba4 is being initialized and Locals and Expressions view correctly displays its value. ba3 also becomes readable. Calling ba3.detach() would make it readable, too.
Locals and Expressions view should always display the contents of an initialized QByteArray, no matter if it was detached or not.
A simple copy using QByteArray ba1 = ba0; does not trigger this problem.