[Interest] file:// is harshing my zen

Giuseppe D'Angelo dangelog at gmail.com
Wed Dec 16 20:25:50 CET 2015


On Wed, Dec 16, 2015 at 8:23 PM, Jason H <jhihn at gmx.com> wrote:
> It means that I would not have to have an instance of a QUrl class. Currently I'd have to do:
> QUrl url(string);
> return url.toLocalFile();
>
> Why can't I just do QUrl::toLocalFile(string) I shouldn't need an instance to strip file:// if it exists.

Or QUrl(foo).toLocalFile()...

>
>> Caveat: I don't use QML. If that's giving you QString's that really
>> should be QUrl's, I'd be complaining about that...
>
> It does.

Can you elaborate more about your scenario? Do you have a property of
type QString (string in QML) and you're assigning a value of type QUrl
(url) to it?

Cheers,
-- 
Giuseppe D'Angelo



More information about the Interest mailing list