Uploaded image for project: 'Qt Design Studio'
  1. Qt Design Studio
  2. QDS-14168

Package qtquickdesigner-components directly in the project

    XMLWordPrintable

Details

    • User Story
    • Resolution: Done
    • Not Evaluated
    • None
    • None
    • CMake exporter
    • None

    Description

      Package qtquickdesigner-components directly in the project

      Currently we use FetchContent in CMake to fetch the qtquickdesigner-components directly from git.
      This can fail if no git is installed or there is no network connection etc.

      Instead the qtquickdesigner-components are supposed to be shipped as part of the Qt Design Studio Package.

      Then when generating the project (the first) time we can copy the source code as is into the project. No git required.

      location of the qtquickdesigner-components source inside the Qt Design Studio package?

      *TBD: *I see two options:

      (1)
      macOS: QCoreApplication::applicationDirPath() + "/../Resources/designer-components"
      windows/linux: QCoreApplication::applicationDirPath() + "/../designer-components"

      But this would make developers live harder since the source would be added as a packaging step and usualy developers would not have it available.

      (2)
      We add subrepo in qtquickdesigner that copies the sources to qtcreator\share\qtcreator\qmldesigner. This way they would be available for every developer and no extra packaging test is requried. This is my prefered solution. tjenssen.

      I suggest calling the folder designer-components instead of qtquickdesigner-components.
      This name is shorter and qtquickdesigner is not any official name anymore.

      The source folder is than simply copied to <ProjectName>/designer-components. No checkout/git required and it can still be build as part of the project. The components will now be part of the source directory.

      ### This file is automatically generated by Qt Design Studio.
      ### Do not change
      
      message("Building designer components.")
      
      set(QT_QDS_COMPONENTS_NOWARN on)
      set(QT_QML_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/qml")
      
      ### Since qmlcomponents.cmake is included this should be still relative to the root folder
      add_subdirectory(designer-components) 
      
      target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE
          QuickStudioComponentsplugin
          QuickStudioDesignEffectsplugin
          QuickStudioEffectsplugin
          QuickStudioApplicationplugin
          FlowViewplugin
          QuickStudioLogicHelperplugin
          QuickStudioMultiTextplugin
          QuickStudioEventSimulatorplugin
          QuickStudioEventSystemplugin
          QuickStudioUtilsplugin
      )
      
      target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE
        BUILD_QDS_COMPONENTS=true
      )
      
      

      Attachments

        For Gerrit Dashboard: QDS-14168
        # Subject Branch Project Status CR V

        Activity

          People

            knud Knud Dollereder
            thohartm Thomas Hartmann
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes