Re: [PATCH 1/2] Fix URL parsing
- Date: Sun, 29 May 2016 11:30:27 +0200
- From: Harald Sitter <sitter@xxxxxxx>
- Subject: Re: [PATCH 1/2] Fix URL parsing
On Sat, May 28, 2016 at 3:22 PM, Arno <arno@xxxxxxxxxxxxx> wrote:
> Hi Thiago,
> On 5/28/2016 3:01 PM, Thiago Macieira wrote:
>> Em sábado, 28 de maio de 2016, às 01:08:24 BRT, Arno Moeller escreveu:
>>> As it seems, QUrl does not know about rdp://, so url.scheme() is empty.
>>> The old code tried to "fix" it by replacing the scheme with vnc://,
>>> because, as the comment stated, it was default in kde3.
>> That doesn't make sense. QUrl does know about *any* schemes except "file",
>> which means it recognises them all.
> Passing rdp://firstname.lastname@example.org to
> QUrl url = QUrl::fromLocalFile(args.at(i))
> with args.at(i) being rdp://192.168.8.1, I end up with url being
You told it to construct a url from a local file path, so, that seems
I'd presume what you should use is
http://doc.qt.io/qt-5/qurl.html#fromUserInput which should usually
make sense out of most random input.