Change the path lookup from Linux style to Maemo style.

Reviewed-By: Christian Kandeler
This commit is contained in:
Alessandro Portale
2011-02-09 16:37:25 +01:00
parent 3d58487df2
commit 91e04fbadc

View File

@@ -68,12 +68,13 @@ QString Html5ApplicationViewerPrivate::adjustPath(const QString &path)
return QCoreApplication::applicationDirPath()
+ QLatin1String("/../Resources/") + path;
#else
const QString pathInShareDir = QCoreApplication::applicationDirPath()
+ QLatin1String("/../share/")
+ QFileInfo(QCoreApplication::applicationFilePath()).fileName()
+ QLatin1Char('/') + path;
if (QFileInfo(pathInShareDir).exists())
return pathInShareDir;
const QString pathInInstallDir = QCoreApplication::applicationDirPath()
+ QLatin1String("/../") + path;
if (pathInInstallDir.contains(QLatin1String("opt"))
&& pathInInstallDir.contains(QLatin1String("bin"))
&& QFileInfo(pathInInstallDir).exists()) {
return pathInInstallDir;
}
#endif
#endif
return path;