Fix two examples in QUrl::toLocalFile() documentation

Change-Id: Ib17844e1dd696a41815bdf58924ff40d684884a8
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
This commit is contained in:
Andreas Hartmetz 2019-08-07 10:50:55 +02:00
parent 4f116f00fc
commit 0ea7360eaa

View File

@ -183,7 +183,7 @@ QUrl url("http://qt-project.org/support/file.html");
//! [19] //! [19]
//! [20] //! [20]
qDebug() << QUrl("file:file.txt").toLocalFile(); // "file:file.txt" qDebug() << QUrl("file:file.txt").toLocalFile(); // "file.txt"
qDebug() << QUrl("file:/home/user/file.txt").toLocalFile(); // "file:///home/user/file.txt" qDebug() << QUrl("file:/home/user/file.txt").toLocalFile(); // "/home/user/file.txt"
qDebug() << QUrl("file.txt").toLocalFile(); // ""; wasn't a local file as it had no scheme qDebug() << QUrl("file.txt").toLocalFile(); // ""; wasn't a local file as it had no scheme
//! [20] //! [20]