From fa6c9f2fba9d8d75d1c3ee915b0051eb8598baa7 Mon Sep 17 00:00:00 2001 From: Rasmus Karlsson Date: Fri, 10 May 2019 23:28:05 +0200 Subject: [PATCH] make paths cachedirectory formatting nicer --- src/singletons/Paths.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/singletons/Paths.cpp b/src/singletons/Paths.cpp index 7c5e4266d..0ba547135 100644 --- a/src/singletons/Paths.cpp +++ b/src/singletons/Paths.cpp @@ -37,7 +37,7 @@ bool Paths::isPortable() QString Paths::cacheDirectory() { - static const auto path = [] { + static const auto pathSetting = [] { QStringSetting cachePathSetting("/cache/path"); cachePathSetting.connect([](const auto &newPath, auto) { @@ -45,7 +45,9 @@ QString Paths::cacheDirectory() }); return cachePathSetting; - }().getValue(); + }(); + + auto path = pathSetting.getValue(); if (path.isEmpty()) {