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

Chrono's time_point members initialized with literal break(?) code model

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • Qt Creator 4.13.0-beta1
    • Qt Creator 4.12.1
    • C/C++/Obj-C++ Support
    • None
    • Fedora 32 (64-bit)
      Using Qt version 5.14.2
      Qt installed from qt.io online installer.
    • Linux/X11, Windows
    • 1989dbe0d7e3691f8bb903003204c2921b32f2ac (qt-creator/qt-creator/master)

      This is a bit hard to explain, so bear with me.

      I have a class (inside a namespace) in which I have two members of type

      std::chrono::time_point<std::chrono::steady_clock>

      In the implementation file these are initialized like this:

      mStartTime( 0ms )
      mEndTime( 0ms )

      In this case qtcreator is unable to jump from the header file to the implementation of functions. It can follow the constructor, but no other functions.

      The problem disappears in all of the following cases:

      • I remove the class from the namespace
      • I only have one such member
      • I initialize without literals (eg: std::chrono::milliseconds( 0 ))

      I attached a minimal example to demonstrate the problem.

      Best regards!

       

        For Gerrit Dashboard: QTCREATORBUG-24067
        # Subject Branch Project Status CR V

            kandeler Christian Kandeler
            tbari Tamás Bari
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes