summaryrefslogtreecommitdiffstats
path: root/src/core/web_engine_library_info.cpp
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amirmasoudabdol@icloud.com>2023-01-11 18:53:09 +0100
committerAmir Masoud Abdol <amir.abdol@qt.io>2023-02-08 13:53:31 +0100
commit1f4fdb06b13f0a9400f16313aad9296f019d2fc9 (patch)
treeeaa021b47d45c6d10468957fce0050eea66f841a /src/core/web_engine_library_info.cpp
parent249d9714bbdb9627f20fd47f5d4e4436bbbadbde (diff)
Retire the qt_parse_all_arguments
To do so, we need to deal with the macros a bit differently, so here, I replaced the macros with available utility functions, and added one for the QTWEBENGINEPROCESS_NAME. Fixes: QTBUG-110873 Task-number: QTBUG-99238 Change-Id: I29b41ffb8059511d2d93bfc01d40308aedaa8ad4 Reviewed-by: Michal Klocek <michal.klocek@qt.io>
Diffstat (limited to 'src/core/web_engine_library_info.cpp')
-rw-r--r--src/core/web_engine_library_info.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/core/web_engine_library_info.cpp b/src/core/web_engine_library_info.cpp
index 588af5cc6..277317f6f 100644
--- a/src/core/web_engine_library_info.cpp
+++ b/src/core/web_engine_library_info.cpp
@@ -57,7 +57,7 @@ static QString getBundlePath(CFBundleRef frameworkBundle)
// The following is a fix for QtWebEngineProcess crashes on OS X 10.7 and before.
// We use it for the other OS X versions as well to make sure it works and because
// the directory structure should be the same.
- if (qApp->applicationName() == QLatin1String(QTWEBENGINEPROCESS_NAME)) {
+ if (qApp->applicationName() == QLatin1String(qWebEngineProcessName())) {
path = QDir::cleanPath(qApp->applicationDirPath() % QLatin1String("/../../../.."));
} else if (frameworkBundle) {
CFURLRef bundleUrl = CFBundleCopyBundleURL(frameworkBundle);
@@ -75,7 +75,7 @@ static QString getResourcesPath(CFBundleRef frameworkBundle)
// The following is a fix for QtWebEngineProcess crashes on OS X 10.7 and before.
// We use it for the other OS X versions as well to make sure it works and because
// the directory structure should be the same.
- if (qApp->applicationName() == QLatin1String(QTWEBENGINEPROCESS_NAME)) {
+ if (qApp->applicationName() == QLatin1String(qWebEngineProcessName())) {
path = getBundlePath(frameworkBundle) % QLatin1String("/Resources");
} else if (frameworkBundle) {
CFURLRef resourcesRelativeUrl = CFBundleCopyResourcesDirectoryURL(frameworkBundle);
@@ -121,9 +121,9 @@ QString subProcessPath()
static QString processPath;
if (processPath.isEmpty()) {
#if defined(Q_OS_WIN)
- const QString processBinary = QLatin1String(QTWEBENGINEPROCESS_NAME) % QLatin1String(".exe");
+ const QString processBinary = QLatin1String(qWebEngineProcessName()) % QLatin1String(".exe");
#else
- const QString processBinary = QLatin1String(QTWEBENGINEPROCESS_NAME);
+ const QString processBinary = QLatin1String(qWebEngineProcessName());
#endif
QStringList candidatePaths;
@@ -133,8 +133,9 @@ QString subProcessPath()
candidatePaths << fromEnv;
} else {
#if defined(Q_OS_DARWIN) && defined(QT_MAC_FRAMEWORK_BUILD)
- candidatePaths << getBundlePath(frameworkBundle())
- % QStringLiteral("/Helpers/" QTWEBENGINEPROCESS_NAME ".app/Contents/MacOS/" QTWEBENGINEPROCESS_NAME);
+ candidatePaths << getBundlePath(frameworkBundle()) % QStringLiteral("/Helpers/")
+ % qWebEngineProcessName() % QStringLiteral(".app/Contents/MacOS/")
+ % qWebEngineProcessName();
#else
candidatePaths << QLibraryInfo::path(QLibraryInfo::LibraryExecutablesPath)
% QLatin1Char('/') % processBinary;