QFileOpenEvent comes with truncated URL [SOLVED]



  • 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?



  • 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?



  • 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]


  • Moderators

    bq. [SOLVED]

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


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.