Verified Commit 133e109d authored by Alexander Lohnau's avatar Alexander Lohnau
Browse files

GIT_SILENT Use qEnvironmentVariableIsEmpty to check if env var is empty

This does not allocate memory, see https://github.com/KDE/clazy/blob/master/docs/checks/README-qgetenv.md
parent f602a24e
......@@ -390,7 +390,7 @@ int main(int argc, char **argv)
// check if a pid is given, which should be reused.
// two possibilities: pid given or not...
if ((!force_new) && serviceName.isEmpty()) {
if ((parser.isSet(usePidOption)) || (!qgetenv("KATE_PID").isEmpty())) {
if ((parser.isSet(usePidOption)) || (!qEnvironmentVariableIsEmpty("KATE_PID"))) {
QString usePid = (parser.isSet(usePidOption)) ? parser.value(usePidOption) : QString::fromLocal8Bit(qgetenv("KATE_PID"));
serviceName = QLatin1String("org.kde.kate-") + usePid;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment