Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-13263

Dumper for QDateTime displays wrong values

    XMLWordPrintable

Details

    Description

      1. Have the following line in your code:
        QDateTime date = QDateTime::currentDateTime();
        qDebug() << date;
        
      2. 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.
      3. Step over the initialization.
        Creator still displays the same value, now in black.
      4. 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

        1. left.log
          0.5 kB
        2. right.log
          21 kB

        Issue Links

          Activity

            People

              davschul David Schulz
              rlohning Robert Löhning
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: