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

CMake configuration items do not persist properly if they contain "//" or "#"

XMLWordPrintable

      If a CMake cache variable is set to a string containing "//" using the projects : CMake widget, it initially applies fine, and is written into the .user file CMake.Configuration correctly.

      However, when the project is closed and reloaded, it is read back in with the "//" (and everything after it) truncated, and reapplied (forcibly overwriting the correct values from the CMakeCache).

      When set via the Kit CMake Configuration textbox, the corruption occurs immediately.

      Our project expects some download URLs for external projects to be provided as part of configuration; this bug crops them after the scheme: prefix.

      This bug appears to be due to CMakeConfigItem::fromString attempting to crop off # and // as comment markers. It's not clear to me what circumstances would lead to comments in either of these places, but if they are present this should at least respect some form of quoting allowing the characters to be be present in a string-valued cache variable.

       

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

            hunger Tobias Hunger
            puetzk Kevin Puetz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes