Rename static locals to match original variable names per review

Reviewer requested configdir/datadir instead of cached for consistency
with the surrounding code style.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Shane Ringrose
2026-06-20 22:26:32 +12:00
parent f2d297b0d8
commit f301196f61
+4 -4
View File
@@ -889,12 +889,12 @@ QString QETApp::configDir()
#endif #endif
// C++11 static-local init runs exactly once across all threads — safe to // C++11 static-local init runs exactly once across all threads — safe to
// call from QtConcurrent background threads (QStandardPaths is not). // call from QtConcurrent background threads (QStandardPaths is not).
static const QString cached = []() { static const QString configdir = []() {
QString d = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation); QString d = QStandardPaths::writableLocation(QStandardPaths::AppConfigLocation);
while (d.endsWith('/')) d.chop(1); while (d.endsWith('/')) d.chop(1);
return d; return d;
}(); }();
return cached; return configdir;
} }
/** /**
@@ -916,12 +916,12 @@ QString QETApp::dataDir()
#endif #endif
// C++11 static-local init runs exactly once across all threads — safe to // C++11 static-local init runs exactly once across all threads — safe to
// call from QtConcurrent background threads (QStandardPaths is not). // call from QtConcurrent background threads (QStandardPaths is not).
static const QString cached = []() { static const QString datadir = []() {
QString d = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); QString d = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation);
while (d.endsWith('/')) d.chop(1); while (d.endsWith('/')) d.chop(1);
return d; return d;
}(); }();
return cached; return datadir;
} }
/** /**