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

Extend QtCreator integration with Qbs to cover generators

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Won't Do
    • Not Evaluated
    • None
    • None

    Description

      Some time ago I started researching ways in which Qbs could help me integrate awesome tools from clang land into my dev workflow. Many of them [clang-tidy, KDAB’s clazy, even cppcheck] can leverage compile commands json file to do all sorts of static analysis.

      To quote the documentation:
      “To generate a project for another build system, such as Microsoft Visual Studio, use the qbs-generate sub-command and specify a generator using the -g option.

      1. For Visual Studio
        qbs generate -g visualstudio2015”

      Obviously, when I use QtCreator to manage my Qbs projects, inputting this command into powershell/cmd leads to errors related to not yet configured Qbs profile and Qt framework instance.

      One of the way I can deal with this is by copying qbs build command from qtc and either paste it directly to the command prompt or add custom build step based on it.
      In the best case scenario this looks similar to:

      C:\Qt\Tools\QtCreator\bin\qbs.exe generate --generator clangdb -d F:\qt-projects\build-qml-test-app-Desktop_Qt_5_10_0_MinGW_32bit-Debug -f F:\qt-projects\qml-test-app\qml-test-app.qbs --settings-dir C:\Users\izowi\AppData\Roaming\QtProject\qtcreator qtc_Desktop_Qt_5_10_0_MinGW_32bit_Debug qbs.buildVariant:debug profile:qtc_Desktop__75fe1681

      My project is typically a main app and a set number of support libraries [both QML plugins and native DLLs] so repeating this for every one of them quickly becomes cumbersome.
      Add to it that I often change Qt versions, compilers and workstations and this becomes really annoying.

      It would be great if invoking qbs generators were available directly from QtCreator's UI [based at currently selected Qt Kit and Qbs profile].

      Using my mad paint skills I created quick mock-up of how it could look inside QtCreator.

      Attachments

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

        Activity

          People

            kandeler Christian Kandeler
            izowiuz Jakub Narolewski
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes