From 64fa389d77e66803dce12237643d8fbbd6b2c3cd Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Sat, 8 Jul 2023 04:22:24 +0300 Subject: [PATCH] do not warn if XDG_RUNTIME_DIR is not set happens often enough, if current user is changed via `sudo` for example Signed-off-by: Ivailo Monev --- src/core/io/qstandardpaths_unix.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/io/qstandardpaths_unix.cpp b/src/core/io/qstandardpaths_unix.cpp index 3d7161872..a6158ab0f 100644 --- a/src/core/io/qstandardpaths_unix.cpp +++ b/src/core/io/qstandardpaths_unix.cpp @@ -253,10 +253,9 @@ QStringList QStandardPaths::standardLocations(StandardLocation type) } case StandardLocation::RuntimeLocation: { const QString location = qGetEnv("XDG_RUNTIME_DIR"); - if (Q_UNLIKELY(!location.isEmpty())) { + if (!location.isEmpty()) { result.append(location); } else { - qWarning("QStandardPaths: runtime directory is not set, using fallback"); result.append(QDir::tempPath()); } break; -- 2.11.0