forked from qt-creator/qt-creator
Change the path lookup from Linux style to Maemo style.
Reviewed-By: Christian Kandeler
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user