2019-12-09 20:51:23 +00:00
|
|
|
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
|
|
|
|
index 1c8316430..a1c27d28f 100644
|
|
|
|
--- a/src/core/web_engine_library_info.cpp
|
|
|
|
+++ b/src/core/web_engine_library_info.cpp
|
|
|
|
@@ -259,29 +259,12 @@ QString dictionariesPath()
|
2018-06-16 13:29:33 +00:00
|
|
|
|
2019-12-09 20:51:23 +00:00
|
|
|
QString resourcesDataPath()
|
2018-06-16 13:29:33 +00:00
|
|
|
{
|
|
|
|
- static bool initialized = false;
|
|
|
|
static QString potentialResourcesPath =
|
2016-03-18 03:59:54 +00:00
|
|
|
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
|
2018-06-16 13:29:33 +00:00
|
|
|
getResourcesPath(frameworkBundle());
|
2016-03-18 03:59:54 +00:00
|
|
|
#else
|
2018-06-16 13:29:33 +00:00
|
|
|
QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources");
|
|
|
|
#endif
|
2016-03-18 03:59:54 +00:00
|
|
|
- if (!initialized) {
|
|
|
|
- initialized = true;
|
2019-12-09 20:51:23 +00:00
|
|
|
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
|
|
|
|
- qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath));
|
2016-03-18 03:59:54 +00:00
|
|
|
- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath);
|
|
|
|
- }
|
2019-12-09 20:51:23 +00:00
|
|
|
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
|
|
|
|
- qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath));
|
2016-03-18 03:59:54 +00:00
|
|
|
- potentialResourcesPath = QCoreApplication::applicationDirPath();
|
|
|
|
- }
|
2019-12-09 20:51:23 +00:00
|
|
|
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
|
|
|
|
- qWarning("Qt WebEngine resources not found at %s. Trying fallback directory... The application MAY NOT work.", qPrintable(potentialResourcesPath));
|
2016-03-18 03:59:54 +00:00
|
|
|
- potentialResourcesPath = fallbackDir();
|
|
|
|
- }
|
|
|
|
- }
|
2019-12-09 20:51:23 +00:00
|
|
|
-
|
2016-03-18 03:59:54 +00:00
|
|
|
return potentialResourcesPath;
|
|
|
|
}
|
2019-12-09 20:51:23 +00:00
|
|
|
} // namespace
|