Details
-
Bug
-
Resolution: Done
-
P2: Important
-
Qt Creator 3.3.2, Qt Creator 3.4.0-beta1
-
Windows 7 64 bit
Project built on Qt 5.3.2 or Qt 5.4.0 32 bit
MSVC2010 32 bit
cdb version 6.12.0002.633 64 bit
Description
- Have the following line in your code:
QDateTime date = QDateTime::currentDateTime(); qDebug() << date;
- Set a breakpoint before these lines and let the debugger run there.
In Locals and Expressions view, Creator displays a value of "Do Jan 1 00:00:00 1970" for data. How can date have a value when it's not even initialized? At least, it's grayed. - Step over the initialization.
Creator still displays the same value, now in black. - Step over the qDebug and check the output.
The correct date and time are being written.
When the QDateTime object is not yet initialized, Creator should display "(invalid)". After it was initialized, Creator should display the correct value.
Both work correctly when using MinGW/gdb or when building the project on Qt 4.8.
Attachments
Issue Links
- relates to
-
QTCREATORBUG-14281 Dumper for QTime displays value for uninitialized variable
- Closed
-
QTCREATORBUG-16554 QDate, QDateTime and QTime displayed as Integers
- Closed