Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PimCommon
Commits
122bc87d
Commit
122bc87d
authored
Sep 02, 2021
by
Laurent Montel
😁
Browse files
Fix some clazy warning
parent
a9a66f6e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/pimcommon/autocorrection/autocorrection.cpp
View file @
122bc87d
...
...
@@ -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"
));
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment