QWebFrame and baseUrl

Thiago Macieira thiago at kde.org
Tue Nov 10 15:10:59 CET 2009


Em Terça-feira 10 Novembro 2009, às 15:02:15, ext Petri Damstén escreveu:
> On Tuesday 10 November 2009 15:42:18 Kenneth Christiansen wrote:
> > Hi again.
> >
> > I talked to Thiago Macieira and he told me that QUrl in 4.6 is more
> > strict than in 4.5, but there isn't any behaviour change.
> >
> > Can you please give me examples that stopped working?
> 
> d->page->mainFrame()->setHtml(dataFor(webpage), QUrl(package()-
> 
> >filePath("html"))); used to work. Now urls have to have scheme to work.
> > Fixed
> 
> by using KUrl that adds file:// for local paths.

if package()->filePath() returns a URL, it should have file:// already.

If it returns a file name, you should be using QUrl::fromLocalFile.

File paths are not URLs. Do not mix them.

-- 
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/plasma-devel/attachments/20091110/148f9b27/attachment.sig 


More information about the Plasma-devel mailing list