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

if a QML file starts with a shebang, syntax highlighting doesn't work

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • Qt Creator 4.4.1
    • Editors
    • None

      Since the release of the qml executable several years ago, the intention was that the first line of a QML file can be something like

      #!/bin/env qml
      

      and the file can be marked executable, just as with any other Unix-style script. It works cross-platform (on desktop systems at least). But it's inconvenient to edit such a file in Creator, because it doesn't recognize the syntax of the whole file if the first line is of that form. I always have to comment out the first line with control-/ to edit, and then revert the change afterwards.

      An example is https://github.com/ec1oud/icongen.qml

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

            davschul David Schulz
            srutledg Shawn Rutledge
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes