qt5-qtwebengine/qtwebengine-everywhere-src-5.11.0-no-icudtl-dat.patch
2019-12-09 21:51:23 +01:00

35 lines
1.7 KiB
Diff

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()
QString resourcesDataPath()
{
- static bool initialized = false;
static QString potentialResourcesPath =
#if defined(OS_MACOSX) && defined(QT_MAC_FRAMEWORK_BUILD)
getResourcesPath(frameworkBundle());
#else
QLibraryInfo::location(QLibraryInfo::DataPath) % QLatin1String("/resources");
#endif
- if (!initialized) {
- initialized = true;
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
- qWarning("Qt WebEngine resources not found at %s. Trying parent directory...", qPrintable(potentialResourcesPath));
- potentialResourcesPath = QLibraryInfo::location(QLibraryInfo::DataPath);
- }
- if (!QFileInfo::exists(potentialResourcesPath % QLatin1String("/qtwebengine_resources.pak"))) {
- qWarning("Qt WebEngine resources not found at %s. Trying application directory...", qPrintable(potentialResourcesPath));
- potentialResourcesPath = QCoreApplication::applicationDirPath();
- }
- 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));
- potentialResourcesPath = fallbackDir();
- }
- }
-
return potentialResourcesPath;
}
} // namespace