Thanks for the tip, thiago.

Now i'm looking through my code more and revisiting where QUrls are coming from.

Some of them are from Qt Mobility, in fact. And those are the ones
that I found getting truncated by QUrl::toLocalFile.

So if you add an mp3 # in its filename  to a QMediaPlaylist (linux
desktop, qt471, mobility 1.2beta), and then get the QUrl from the
QMediaContent::canonicalUrl(), then call QUrl::toLocalFile(), you can
run into this problem: the file is truncated at the # sign. Which is
why I needed to write my own toLocalFile() as a workaround.

I will make up a testcase and open a  bug report for this when I have time.

There must be a bug in the way they were created (not by me!).


On Mon, Apr 18, 2011 at 9:32 AM, Thiago Macieira <[email protected]> wrote:
> On Monday, 18 de April de 2011 09:12:23 Alan Ezust wrote:
>> I guess QUrl::toString() decodes those escapes again, because I never
>> actually see the %235 in the urls I've created, using either technique.
>> But that must be what I was doing earlier to get this problem. thanks!
>
> QUrl's constructor and toString are destructive. Do not use them.
>
> Use QUrl::fromEncoded, fromLocalFile, toEncoded, etc.
> --
> Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
>  Senior Product Manager - Nokia, Qt Development Frameworks
>      PGP/GPG: 0x6EF45358; fingerprint:
>      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358
>
_______________________________________________
Qt-mobility-feedback mailing list
[email protected]
http://lists.qt.nokia.com/mailman/listinfo/qt-mobility-feedback

Reply via email to