mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-20 13:44:12 +02:00
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:
+4
-4
@@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user