Hey,
while porting to Qt5/KF5, we've found some issues with the new
QUrl::toDisplayString method on Windows.
Running the attached test-case [1], we get the following results
with Qt5 dev branch on Windows:
path "/C:/tmp"
toLocalFile "C:/tmp"
toDisplayString "file:///C:/tmp"
toDisplayString(QUrl::PreferLocalFile) "/C:/tmp"
I'm especially puzzled by the latter one
(toDisplayString(QUrl::PreferLocalFile)), which is supposed to return a
"human-readable" string for the given url.
That should return "C:/tmp", right?
Maybe David F. or Thiago can give an insight into this?
Thanks
--
Kevin Funk | kf...@kde.org | http://kfunk.org
#include <QtCore/QDebug>
#include <QtCore/QUrl>
int main()
{
QUrl url = QUrl::fromLocalFile("C:\\tmp");
qDebug() << "path" << url.path();
qDebug() << "toLocalFile" << url.toLocalFile();
qDebug() << "toDisplayString" << url.toDisplayString();
qDebug() << "toDisplayString(QUrl::PreferLocalFile)" << url.toDisplayString(QUrl::PreferLocalFile);
}
_______________________________________________
Development mailing list
Development@qt-project.org
http://lists.qt-project.org/mailman/listinfo/development