Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces

With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces

Scheduled Pinned Locked Moved Solved QML and Qt Quick
qmlcmake errorquotes
4 Posts 2 Posters 268 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    AnttiK
    wrote on last edited by
    #1

    Hi,

    It seems there are still some cmake snippets (at least) in the Qt6QML portion which do not use double quotes around variable expansions.

    Sample code which reproduces the error is available here: https://github.com/anttikes/usb-fm-radio

    If you check out this source code to e.g. "E:\usb-fm-radio" folder, then everything works. But, if you clone it to a folder such as "E:\USB FM" then it fails at the CMake configure stage.

    To fix the issue, I went to the reported row 1100 in "C:\Qt\6.10.1\mingw_64\lib\cmake\Qt6QML\Qt6QmlMacros.cmake" and modified the "cmake_language(DEFER DIRECTORY" portion so that the ${CMAKE_BINARY_DIR} is surrounded by escaped double quotes i.e. \"${CMAKE_BINARY_DIR}\".

    A screenshot of the modification for reference:

    39796f70-2429-4648-89b9-ab21cfaaf20f-image.png

    There seems to be a similar kind of problem looming on row 1090. I believe escaped double-quotes would do the trick here as well. This line did not cause any errors for me, possibly due to the way my simple application is structured.

    5bee2042-4a8e-47c8-ba1e-6e35f5f0f471-image.png

    Any chance of getting this included in some patch version?

    1 Reply Last reply
    1
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      There's two things you can do to make that happen:

      • check the bug report system to see if there's already something about this issue (and if not please create a ticket)
      • submit a patch since you already have the solution at hand :-)

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      2
      • SGaistS SGaist

        Hi,

        There's two things you can do to make that happen:

        • check the bug report system to see if there's already something about this issue (and if not please create a ticket)
        • submit a patch since you already have the solution at hand :-)
        A Offline
        A Offline
        AnttiK
        wrote last edited by AnttiK
        #3

        @SGaist Thanks for the tip, and sorry for not responding sooner.

        I'm afraid I'm not too familiar with the Qt sources and how they're organized so I'm far from certain whether my pull request or suggestion would even be considered.

        On the other hand one week ago I installed Qt 6.10.2 by deleting the entire Qt directory before installing the new version. Thus any manual changes I made were most certainly gone.

        The problem does not reproduce in Qt 6.10.2 so I can only assume the issue was reported and fixed by someone else.

        SGaistS 1 Reply Last reply
        0
        • A AnttiK has marked this topic as solved
        • A AnttiK

          @SGaist Thanks for the tip, and sorry for not responding sooner.

          I'm afraid I'm not too familiar with the Qt sources and how they're organized so I'm far from certain whether my pull request or suggestion would even be considered.

          On the other hand one week ago I installed Qt 6.10.2 by deleting the entire Qt directory before installing the new version. Thus any manual changes I made were most certainly gone.

          The problem does not reproduce in Qt 6.10.2 so I can only assume the issue was reported and fixed by someone else.

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote last edited by
          #4

          @AnttiK said in With Qt 6.10.1 and CMake, configuring a simple QML application fails when source code is in a folder with whitespaces:

          I'm afraid I'm not too familiar with the Qt sources and how they're organized so I'm far from certain whether my pull request or suggestion would even be considered.

          Don't be, every contributor had to start somewhere. It does not require a big complicated patch to get on the train :-)

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved