summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorKai Koehne <kai.koehne@theqtcompany.com>2015-07-16 16:50:41 +0200
committerKai Koehne <kai.koehne@theqtcompany.com>2015-07-22 13:22:03 +0000
commit4d7a3733817c2bd35d18dcaae7816ecb3a490239 (patch)
treef4974f60e59fba43e539f3b9718395606d9c3143 /src/core
parent4a56c235e1bd12071e58d36113fccb270ee98a5e (diff)
Search for .pak files also in applicationDirPath()
Use libraryDataPath() for locating .pak files. This will fall back to QCoreApplication::applicationDirPath() if the Qt installation directory is missing. Task-number: QTBUG-42083 Change-Id: I96d940bd12024c308348fe3f5fa9fd259e2ac904 Reviewed-by: Andy Shaw <andy.shaw@theqtcompany.com> Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/web_engine_library_info.cpp16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 4710b0266..e61fbbeff 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -214,26 +214,16 @@ QString libraryDataPath()
}
} // namespace
-static QString pakResourcesDir()
-{
-#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
- static QString dir = getResourcesPath(frameworkBundle());
-#else
- static QString dir = QLibraryInfo::location(QLibraryInfo::DataPath);
-#endif
- return dir;
-}
-
base::FilePath WebEngineLibraryInfo::getPath(int key)
{
QString directory;
switch (key) {
case QT_RESOURCES_PAK:
- return toFilePath(pakResourcesDir() % QLatin1String("/qtwebengine_resources.pak"));
+ return toFilePath(libraryDataPath() % QLatin1String("/qtwebengine_resources.pak"));
case QT_RESOURCES_100P_PAK:
- return toFilePath(pakResourcesDir() % QLatin1String("/qtwebengine_resources_100p.pak"));
+ return toFilePath(libraryDataPath() % QLatin1String("/qtwebengine_resources_100p.pak"));
case QT_RESOURCES_200P_PAK:
- return toFilePath(pakResourcesDir() % QLatin1String("/qtwebengine_resources_200p.pak"));
+ return toFilePath(libraryDataPath() % QLatin1String("/qtwebengine_resources_200p.pak"));
case base::FILE_EXE:
case content::CHILD_PROCESS_EXE:
return toFilePath(subProcessPath());