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

Code models of C++ and QML don't cooperate

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P2: Important
    • None
    • Qt Creator 3.1.0-rc1
    • None
    • Windows 7 64 bit

    Description

      1. Open the attached project and configure it to use Qt 4.8.
      2. Place the cursor in the call to
        tc.write();
        

        in main.cpp and trigger "Find Usages".
        Creator will find three usages in C++, but not the usage in QML.

      3. Place the cursor in the call to
        tc.write();
        

        in main.qml and trigger "Find Usages".
        Creator will find a usage in QML, but not the usages in C++.

      I think "Find Usages" should find all usages of a function, regardless where it is being used. Features like "Follow Symbol Under Cursor" should work for a C++ function, even when the cursor is at a call in a QML file.
      Use case? I nearly deleted a seemingly unused function from Creator. Would have broken the Welcome mode...

      Attachments

        1. untitled14.zip
          14 kB
          Robert Löhning

        Issue Links

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

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              rlohning Robert Löhning
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes