summaryrefslogtreecommitdiffstats
path: root/src/gui/platform/unix/qgenericunixservices.cpp
diff options
context:
space:
mode:
authorThiago Macieira <[email protected]>2024-12-31 16:26:39 -0300
committerThiago Macieira <[email protected]>2025-01-01 14:23:05 -0300
commitdb34e27f7f6ade54bfae59e5eed14c05ac508a49 (patch)
tree92ef99f5daa6d508644118fd8290bbbde363516b /src/gui/platform/unix/qgenericunixservices.cpp
parentce95c26034cc5b3ae8094c1521221e5b2f13ecfa (diff)
Replace qgetenv() calls converted to QString with qEnvironmentVariable()
It's slightly more efficient. Pick-to: 6.9 Change-Id: Id5ac04fc27eee108c8e5fffd786c3d5f793a0a9d Reviewed-by: Ahmad Samir <[email protected]>
Diffstat (limited to 'src/gui/platform/unix/qgenericunixservices.cpp')
-rw-r--r--src/gui/platform/unix/qgenericunixservices.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/platform/unix/qgenericunixservices.cpp b/src/gui/platform/unix/qgenericunixservices.cpp
index 32487b16511..a36976a6937 100644
--- a/src/gui/platform/unix/qgenericunixservices.cpp
+++ b/src/gui/platform/unix/qgenericunixservices.cpp
@@ -105,10 +105,10 @@ static inline bool detectWebBrowser(const QByteArray &desktop,
return true;
if (checkBrowserVariable) {
- QByteArray browserVariable = qgetenv("DEFAULT_BROWSER");
+ QString browserVariable = qEnvironmentVariable("DEFAULT_BROWSER");
if (browserVariable.isEmpty())
- browserVariable = qgetenv("BROWSER");
- if (!browserVariable.isEmpty() && checkExecutable(QString::fromLocal8Bit(browserVariable), browser))
+ browserVariable = qEnvironmentVariable("BROWSER");
+ if (!browserVariable.isEmpty() && checkExecutable(browserVariable, browser))
return true;
}