Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-117915

Allow switching the qtinsight.conf files based on the target

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Out of scope
    • Not Evaluated
    • None
    • 6.5.3
    • Qt Insight Tracker
    • None
    • All

    Description

      In a realistic use case, the user may want to deploy the same app to different targets.

      This means the each target would have different qtinsight.conf file.

      To achieve this, it's natural for the user to write CMakeLists.txt like this to switch qtinsight.conf files;

      // CMakeLists.txt
      # change the qtinsight.conf based on the target
      if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
        set(QTINSIGHT_CONFIG "qtinsightconf/MSVC/qtinsight.conf")
      elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
        set(QTINSIGHT_CONFIG "qtinsightconf/MinGW/qtinsight.conf")
      elseif (ANDROID)
        set(QTINSIGHT_CONFIG "qtinsightconf/Android_arm64_v8a/qtinsight.conf")
      else()
        set(QTINSIGHT_CONFIG "qtinsightconf/Default/qtinsight.conf")
      endif() 
      
      qt6_add_resources(coffee_insight "config"
          PREFIX
              "/"
          FILES
              ${QTINSIGHT_CONFIG}
          OPTIONS
              -threshold 0
      )

      However, with current implementation, this doesn't work and the Qt Insight Tracker picks the qtinsight.conf from the Qt installation directory, such as;

      // Application Output
      qt.insight.config: Using configurations from: "C:/Qt/6.5.3/msvc2019_64/qtinsight/qtinsight.conf" 

      This means the user's qtinsight.conf won't be used.
      What's worse, since Qt 6.5.3, this ends up with runtime error like this, ;

      // Application Output
      qt.insight.config: Using configurations from: "C:/Qt/6.5.3/msvc2019_64/qtinsight/qtinsight.conf"
      qt.insight: Enabling Qt Insight Tracker
      qt.insight.config: missing token
      qt.insight: Failed to enabled Qt Insight Tracker, the configuration is not valid 

      The attached project reproduces the issue with 6.5.3 kit. 6.5.3 makes the issue more obvious because of the changed logic in inValid().

      Attachments

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

        Activity

          People

            sapiippo Samuli Piippo
            mikio_hirai Mikio Hirai
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes