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

Wrong QML file loaded in editor when filename is the same

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P3: Somewhat important P3: Somewhat important
    • None
    • Qt Creator 2.7.0-rc
    • Quick / QML Support
    • None
    • Qt 5.0.1 MinGW 4.7_32 Windows 7

      Suppose a project which contains the following files:

      C:/MyProject/Folder_1/Startup.qml
      C:/MyProject/Folder_2/Startup.qml

      ... and there is an error in the second file e.g.

      file:///C:/MyProject/Folder_2/Startup.qml:40:9: MyCustomComponent is not a type
      MyCustomComponent {
      ^

      You click on the link in the Application Output tab. The Editor will load the first file into the editor rather than the second.

      It seems that the path is not considered for QML files and there could be an assumption that cpp files will always have a unique filename and path is not relevant. This assumption if present, is not safe for QML files.

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

            qtqmlteam Qt Qml Team User
            miketrahearn Mike Trahearn
            Votes:
            2 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:

                There are no open Gerrit changes