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 26 Feb 2020, 14:25 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
    • V Offline
      V Offline
      VRonin
      wrote on 26 Feb 2020, 14:34 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

      A O U 3 Replies Last reply 26 Feb 2020, 15:09
      2
      • V VRonin
        26 Feb 2020, 14:34

        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

        A Offline
        A Offline
        aha_1980
        Lifetime Qt Champion
        wrote on 26 Feb 2020, 15:09 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
        • V VRonin
          26 Feb 2020, 14:34

          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

          O Offline
          O Offline
          ODБOï
          wrote on 26 Feb 2020, 15:33 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
          • V Offline
            V Offline
            VRonin
            wrote on 26 Feb 2020, 15:37 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

            A O 2 Replies Last reply 26 Feb 2020, 15:53
            2
            • V VRonin
              26 Feb 2020, 15:37

              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)

              A Offline
              A Offline
              aha_1980
              Lifetime Qt Champion
              wrote on 26 Feb 2020, 15:53 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
              • V VRonin
                26 Feb 2020, 15:37

                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)

                O Offline
                O Offline
                ODБOï
                wrote on 26 Feb 2020, 15:57 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
                • V VRonin
                  26 Feb 2020, 14:34

                  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 27 Feb 2020, 13:31 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

                  1/8

                  26 Feb 2020, 14:25

                  • Login

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