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. QFileOpenEvent comes with truncated URL [SOLVED]

QFileOpenEvent comes with truncated URL [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
4 Posts 3 Posters 1.7k Views
  • 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.
  • M Offline
    M Offline
    mickael.cruz
    wrote on last edited by
    #1

    I am developing a Mac application. My application gets QFileOpenEvent events to handle custom URL protocols, like @myprotocol:myapp?arg1=val1&arg2=val2@
    When I am handling the event, the QUrl object comes with a truncated url, like "myprotocol:myapp?arg1=val1", ignoring everything after '&' character. I tried different URLs and it seems that this is the '&' character that is causing everything after him to be ignored.
    I first thought I stepped on a known bug (QTBUG-26579) but after verification, the QUrl object is valid (according to his own isValid() method).

    Does anyone have an idea of what is happening?

    1 Reply Last reply
    0
    • A Offline
      A Offline
      AcerExtensa
      wrote on last edited by
      #2

      How do you test this? Through webbrowser or from console? And how do you have declared your URL protocol handler? Is the args double quoted?

      God is Real unless explicitly declared as Integer.

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mickael.cruz
        wrote on last edited by
        #3

        I tested this using console. Here is the command I used :
        @open myprotocol:myapp?arg1=val1&arg2=val2@

        My url protocol handler is declared in the Info.plist file. Well, I just checked and really, the args were not double-quoted. Now it works. I can't believe I lost so much time just because of this.

        Thank you very much.
        [SOLVED]

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mlong
          wrote on last edited by
          #4

          bq. [SOLVED]

          Be sure and edit your initial post and add [Solved] to the thread title.

          Software Engineer
          My views and opinions do not necessarily reflect those of anyone -- living or dead, real or fictional -- in this universe or any other similar multiverse node. Void where prohibited. Your mileage may vary. Caveat emptor.

          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