Commit 122bc87d authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix some clazy warning

parent a9a66f6e
......@@ -1040,6 +1040,7 @@ void AutoCorrection::readAutoCorrectionXmlFile(bool forceGlobal)
mSuperScriptEntries.clear();
QString localFileName;
static QRegularExpression regpath(QRegularExpression(QStringLiteral("_.*")));
// Look at local file:
if (!forceGlobal) {
if (!mAutoCorrectLang.isEmpty()) {
......@@ -1051,7 +1052,7 @@ void AutoCorrection::readAutoCorrectionXmlFile(bool forceGlobal)
QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("autocorrect/custom-") + kdelang + QLatin1String(".xml"));
}
if (localFileName.isEmpty() && kdelang.contains(QLatin1Char('_'))) {
kdelang.remove(QRegularExpression(QStringLiteral("_.*")));
kdelang.remove(regpath);
localFileName =
QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("autocorrect/custom-") + kdelang + QLatin1String(".xml"));
}
......@@ -1070,7 +1071,7 @@ void AutoCorrection::readAutoCorrectionXmlFile(bool forceGlobal)
fname = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("autocorrect/") + kdelang + QLatin1String(".xml"));
}
if (fname.isEmpty() && kdelang.contains(QLatin1Char('_'))) {
kdelang.remove(QRegularExpression(QStringLiteral("_.*")));
kdelang.remove(regpath);
fname = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String("autocorrect/") + kdelang + QLatin1String(".xml"));
}
}
......
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