Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
PIM
PimCommon
Commits
96956b94
Commit
96956b94
authored
Dec 14, 2020
by
Laurent Montel
😁
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix crash with old data (before my fixing about simple quote)
parent
2bae5171
Pipeline
#44078
passed with stage
in 10 minutes and 1 second
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
src/pimcommon/autocorrection/import/importkmailautocorrection.cpp
...ommon/autocorrection/import/importkmailautocorrection.cpp
+8
-2
No files found.
src/pimcommon/autocorrection/import/importkmailautocorrection.cpp
View file @
96956b94
...
...
@@ -85,8 +85,14 @@ bool ImportKMailAutocorrection::import(const QString &fileName, LoadAttribute lo
if
(
xml
.
readNextStartElement
())
{
const
QStringRef
tagname
=
xml
.
name
();
if
(
tagname
==
QLatin1String
(
"simplequote"
))
{
mTypographicSingleQuotes
.
begin
=
xml
.
attributes
().
value
(
QStringLiteral
(
"begin"
)).
toString
().
at
(
0
);
mTypographicSingleQuotes
.
end
=
xml
.
attributes
().
value
(
QStringLiteral
(
"end"
)).
toString
().
at
(
0
);
const
QString
simpleQuoteBegin
=
xml
.
attributes
().
value
(
QStringLiteral
(
"begin"
)).
toString
();
if
(
!
simpleQuoteBegin
.
isEmpty
())
{
//crash when we have old data with bug.
mTypographicSingleQuotes
.
begin
=
simpleQuoteBegin
.
at
(
0
);
}
const
QString
simpleQuoteEnd
=
xml
.
attributes
().
value
(
QStringLiteral
(
"end"
)).
toString
();
if
(
!
simpleQuoteEnd
.
isEmpty
())
{
//crash when we have old data with bug.
mTypographicSingleQuotes
.
end
=
simpleQuoteEnd
.
at
(
0
);
}
xml
.
skipCurrentElement
();
}
else
{
xml
.
skipCurrentElement
();
...
...
Write
Preview
Markdown
is supported
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