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

Code style settings are ignored on Ctrl+I for qbs projects

    XMLWordPrintable

Details

    • 803cca408665a54b8b9ed2e0a651b9c82b95ad80

    Description

      1. Start Qt Creator
      2. Set the e.g. indent size to 2:
        • Menu: Tools > Options > C++ > Code Style > Edit... and set "Indent size" to "2"
        • "Copy Built-in Code Style" if required.
      3. Create a *.qbs project (Wizard: Non-Qt Project > Plain C++ Application > Choose "qbs' as build system)
      4. The main.cpp file is opened and it is correctly indented.
      5. Re-indent the "cout" line with "Ctr+I" - two extra spaces are inserted although it's already correctly indented.

      The same works fine with a qmake project.

      Observations:

      • For the qbs project, SessionManager::configureEditor will not find a project for the given file path if an editor is opened.
      • For the qmake project, it does find the project and sets the appropriate settings.

      Attachments

        Activity

          People

            hunger Tobias Hunger
            kosjar Nikolai Kosjar
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: