Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. qmake generates wrong path to qrc qmlcache
Forum Updated to NodeBB v4.3 + New Features

qmake generates wrong path to qrc qmlcache

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 2 Posters 674 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.
  • T Offline
    T Offline
    thesourcehim
    wrote on last edited by
    #1

    After I installed mingw32 5.14.2 Qt I started to get strange bug in generated Makefile. My project includes a pri that has qrc file like this:
    RESOURCES += $$PWD/kbpcomponents.qrc
    In Makefile I now have this buggy line:

    Makefile: E:/projects/git/dep32/askroclient/askroclient.pro ../../../../Qt/5.14.2/mingw73_64/mkspecs/features/spec_pre.prf \
                    <skipped alot of lines>
    		E:_projects_git_dep32_qmlutils_KbpComponents_kbpcomponents_qmlcache.qrc \
    		askroclient_qmlcache.qrc
    	$(QMAKE) -o Makefile E:/projects/git/dep32/askroclient/askroclient.pro -spec win32-g++ CONFIG+=qtquickcompiler
    

    There should not be full path to qmlcache as it is located in build directory and all slashes are replaced with underscores.
    I did not have this problem with 5.13.2. Also it does not happen with linux version of 5.14.2.

    1 Reply Last reply
    0
    • T Offline
      T Offline
      thesourcehim
      wrote on last edited by
      #6

      Fixed
      https://bugreports.qt.io/browse/QTBUG-84901

      1 Reply Last reply
      1
      • T Offline
        T Offline
        thesourcehim
        wrote on last edited by
        #2

        Ok, apparently Qt version is not a problem. The problem is caused by combination of two facts:

        1. qrc file included by path, not just name, because it's not in main project directory
        2. Build directory and project directory are on different drives (build directory is on C: and source code is on E:)

        If I switch build directory to the same drive then the problem is gone. Perhaps qmake under Windows should also replace colons with underscores, not only slashes.

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

          Hi,

          If this worked before then you may have found a regression.

          Can you reproduce that with a minimal compilable project ?

          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
          • T Offline
            T Offline
            thesourcehim
            wrote on last edited by thesourcehim
            #4

            I don't believe this is a regression, I just didn't try build my project on a different drive before. qmake replaces all slashes with underscores when generating qmlcache file for a qrc because file name can not contain slashes, but it forgets that under Windows there may be also a colon in the path which should be replaced too. But the colon appears only if the build directory is on a different drive, otherwise generated path is relative and does not start with drive letter.

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

              Good point

              In any case, it still is a bug, you should check the bug report system to see if it's something known. If not, please open a new report providing a minimal compilable example.

              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
              • T Offline
                T Offline
                thesourcehim
                wrote on last edited by
                #6

                Fixed
                https://bugreports.qt.io/browse/QTBUG-84901

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

                  Thanks !

                  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