--- a/src/corelib/io/qresource.cpp Wed Jun 23 19:07:03 2010 +0300
+++ b/src/corelib/io/qresource.cpp Tue Jul 06 15:10:48 2010 +0300
@@ -1411,8 +1411,12 @@
} else if(file == PathName || file == AbsolutePathName) {
const QString path = (file == AbsolutePathName) ? d->resource.absoluteFilePath() : d->resource.fileName();
const int slash = path.lastIndexOf(QLatin1Char('/'));
- if (slash != -1)
- return path.left(slash);
+ if (slash == -1)
+ return QLatin1String(":");
+ else if (slash <= 1)
+ return QLatin1String(":/");
+ return path.left(slash);
+
} else if(file == CanonicalName || file == CanonicalPathName) {
const QString absoluteFilePath = d->resource.absoluteFilePath();
if(file == CanonicalPathName) {