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. copyQtdata.commands gives error "Invalid number of parameters"
Forum Updated to NodeBB v4.3 + New Features

copyQtdata.commands gives error "Invalid number of parameters"

Scheduled Pinned Locked Moved Solved General and Desktop
8 Posts 4 Posters 823 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.
  • U Offline
    U Offline
    Uday More
    wrote on last edited by
    #1

    Hello Team,

    I am using the following command in my pro file so that the files get copy to the dest dir which I specify.

    --> copyQtdata.commands += $(COPY_DIR) /f $$shell_path($$(QTDIR)\bin\Qt5Test.dll) $$shell_path($$DESTDIR)

    Internally it uses xcopy command and is working fine.

    But when I try to use the command to copy a file which is present in the path which has spaces, it gives me error.
    "Invalid number of parameters". Eg : "Program Files" has a space.

    I took the xcopy command of the same and tried to run in command prompt with giving double qoutes it works fine.

    How do I give double qoutes in "copyQtdata.commands" so that spaces are taken care.

    1 Reply Last reply
    0
    • VRoninV Offline
      VRoninV Offline
      VRonin
      wrote on last edited by VRonin
      #2

      https://doc.qt.io/qt-5/qmake-function-reference.html#shell-quote-arg

      Or switch side, join the CMake-fans and use that instead. Qt6 will be using CMake anyway

      "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
      ~Napoleon Bonaparte

      On a crusade to banish setIndexWidget() from the holy land of Qt

      aha_1980A ODБOïO U 3 Replies Last reply
      2
      • VRoninV VRonin

        https://doc.qt.io/qt-5/qmake-function-reference.html#shell-quote-arg

        Or switch side, join the CMake-fans and use that instead. Qt6 will be using CMake anyway

        aha_1980A Offline
        aha_1980A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on last edited by aha_1980
        #3

        @VRonin said in copyQtdata.commands gives error "Invalid number of parameters":

        Qt6 will be using CMake anyway

        Just to state the obvious: That still means you can use qmake for your own projects.

        Regards

        Qt has to stay free or it will die.

        1 Reply Last reply
        2
        • VRoninV VRonin

          https://doc.qt.io/qt-5/qmake-function-reference.html#shell-quote-arg

          Or switch side, join the CMake-fans and use that instead. Qt6 will be using CMake anyway

          ODБOïO Offline
          ODБOïO Offline
          ODБOï
          wrote on last edited by
          #4

          @VRonin said in copyQtdata.commands gives error "Invalid number of parameters":

          join the CMake-fans

          Do you know a resource/doc explaining how to switch from q to c make please ?

          1 Reply Last reply
          0
          • VRoninV Offline
            VRoninV Offline
            VRonin
            wrote on last edited by VRonin
            #5

            Do you know a resource/doc explaining how to switch from q to c make please ?

            https://doc.qt.io/qt-5/cmake-manual.html

            Better docs are still WIP: https://bugreports.qt.io/browse/QTBUG-72159

            Which doesn't mean you can still use qmake for your own projects.

            I think the language here is misleading. to clarify, qmake will always remain an option even after Qt6. My personal opinion is, however, that it will become more nichy as QBS was (maybe not to that extent)

            "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
            ~Napoleon Bonaparte

            On a crusade to banish setIndexWidget() from the holy land of Qt

            aha_1980A ODБOïO 2 Replies Last reply
            2
            • VRoninV VRonin

              Do you know a resource/doc explaining how to switch from q to c make please ?

              https://doc.qt.io/qt-5/cmake-manual.html

              Better docs are still WIP: https://bugreports.qt.io/browse/QTBUG-72159

              Which doesn't mean you can still use qmake for your own projects.

              I think the language here is misleading. to clarify, qmake will always remain an option even after Qt6. My personal opinion is, however, that it will become more nichy as QBS was (maybe not to that extent)

              aha_1980A Offline
              aha_1980A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on last edited by
              #6

              @VRonin said in copyQtdata.commands gives error "Invalid number of parameters":

              I think the language here is misleading.

              Fixed - thanks.

              Qt has to stay free or it will die.

              1 Reply Last reply
              1
              • VRoninV VRonin

                Do you know a resource/doc explaining how to switch from q to c make please ?

                https://doc.qt.io/qt-5/cmake-manual.html

                Better docs are still WIP: https://bugreports.qt.io/browse/QTBUG-72159

                Which doesn't mean you can still use qmake for your own projects.

                I think the language here is misleading. to clarify, qmake will always remain an option even after Qt6. My personal opinion is, however, that it will become more nichy as QBS was (maybe not to that extent)

                ODБOïO Offline
                ODБOïO Offline
                ODБOï
                wrote on last edited by
                #7

                @aha_1980 said in copyQtdata.commands gives error "Invalid number of parameters":

                Fixed

                oh, so it was the opposit of what you said before ? I will stick with QMAKE i think then

                1 Reply Last reply
                0
                • VRoninV VRonin

                  https://doc.qt.io/qt-5/qmake-function-reference.html#shell-quote-arg

                  Or switch side, join the CMake-fans and use that instead. Qt6 will be using CMake anyway

                  U Offline
                  U Offline
                  Uday More
                  wrote on last edited by
                  #8

                  @VRonin

                  "https://doc.qt.io/qt-5/qmake-function-reference.html#shell-quote-arg" worked for me. Thanks

                  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