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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: Qt Creator 4.12.1
    • Fix Version/s: Qt Creator 4.13.0-beta1
    • Component/s: C/C++/Obj-C++ Support
    • Labels:
      None
    • Environment:
      Fedora 32 (64-bit)
      Using Qt version 5.14.2
      Qt installed from qt.io online installer.
    • Platform/s:
      Linux/X11, Windows
    • Commits:
      1989dbe0d7e3691f8bb903003204c2921b32f2ac (qt-creator/qt-creator/master)

      Description

      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!

       

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes