From db34e27f7f6ade54bfae59e5eed14c05ac508a49 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 31 Dec 2024 16:26:39 -0300 Subject: Replace qgetenv() calls converted to QString with qEnvironmentVariable() It's slightly more efficient. Pick-to: 6.9 Change-Id: Id5ac04fc27eee108c8e5fffd786c3d5f793a0a9d Reviewed-by: Ahmad Samir --- src/gui/platform/unix/qgenericunixservices.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gui/platform/unix/qgenericunixservices.cpp') 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; } -- cgit v1.2.3