Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
PIM Messagelib
Commits
db94d888
Commit
db94d888
authored
Nov 07, 2022
by
Laurent Montel
Browse files
Adapt to new api
parent
db1392c5
Pipeline
#263574
passed with stage
in 16 minutes and 43 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
db94d888
...
...
@@ -31,7 +31,7 @@ set(KMIME_LIB_VERSION "5.21.40")
set
(
KPIMTEXTEDIT_LIB_VERSION
"5.21.40"
)
set
(
LIBKDEPIM_LIB_VERSION
"5.21.40"
)
set
(
LIBKLEO_LIB_VERSION
"5.21.40"
)
set
(
PIMCOMMON_LIB_VERSION
"5.21.
44
"
)
set
(
PIMCOMMON_LIB_VERSION
"5.21.
71
"
)
set
(
GPGME_LIB_VERSION
"1.16.0"
)
set
(
AKONADI_SEARCH_VERSION
"5.21.40"
)
...
...
messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
View file @
db94d888
...
...
@@ -51,9 +51,9 @@ void RichTextComposerNgTest::shouldForceAutoCorrection()
richtextComposerNg
.
setPlainText
(
original
);
PimCommon
::
AutoCorrection
autocorrection
;
PimCommon
::
AutoCorrectionSettings
settings
;
settings
.
setEnabledAutoCorrection
(
true
);
settings
.
setUppercaseFirstCharOfSentence
(
true
);
auto
settings
=
new
PimCommon
::
AutoCorrectionSettings
;
settings
->
setEnabledAutoCorrection
(
true
);
settings
->
setUppercaseFirstCharOfSentence
(
true
);
autocorrection
.
setAutoCorrectionSettings
(
settings
);
richtextComposerNg
.
setAutocorrection
(
&
autocorrection
);
richtextComposerNg
.
forceAutoCorrection
(
false
);
...
...
@@ -90,10 +90,10 @@ void RichTextComposerNgTest::shouldForceAutoCorrectionWithSelection()
cur
.
setPosition
(
selectionEnd
,
QTextCursor
::
KeepAnchor
);
richtextComposerNg
.
setTextCursor
(
cur
);
PimCommon
::
AutoCorrection
autocorrection
;
PimCommon
::
AutoCorrectionSettings
settings
;
settings
.
setEnabledAutoCorrection
(
true
);
settings
.
setUppercaseFirstCharOfSentence
(
true
);
settings
.
setFixTwoUppercaseChars
(
true
);
auto
settings
=
new
PimCommon
::
AutoCorrectionSettings
;
settings
->
setEnabledAutoCorrection
(
true
);
settings
->
setUppercaseFirstCharOfSentence
(
true
);
settings
->
setFixTwoUppercaseChars
(
true
);
autocorrection
.
setAutoCorrectionSettings
(
settings
);
richtextComposerNg
.
setAutocorrection
(
&
autocorrection
);
richtextComposerNg
.
forceAutoCorrection
(
true
);
...
...
messagecomposer/src/composer-ng/richtextcomposerng.cpp
View file @
db94d888
...
...
@@ -65,8 +65,8 @@ void RichTextComposerNg::setAutocorrection(PimCommon::AutoCorrection *autocorrec
void
RichTextComposerNg
::
setAutocorrectionLanguage
(
const
QString
&
lang
)
{
if
(
d
->
autoCorrection
)
{
PimCommon
::
AutoCorrectionSettings
settings
=
d
->
autoCorrection
->
autoCorrectionSettings
();
settings
.
setLanguage
(
lang
);
PimCommon
::
AutoCorrectionSettings
*
settings
=
d
->
autoCorrection
->
autoCorrectionSettings
();
settings
->
setLanguage
(
lang
);
d
->
autoCorrection
->
setAutoCorrectionSettings
(
settings
);
}
}
...
...
@@ -79,7 +79,7 @@ static bool isSpecial(const QTextCharFormat &charFormat)
bool
RichTextComposerNg
::
processModifyText
(
QKeyEvent
*
e
)
{
if
(
d
->
autoCorrection
&&
d
->
autoCorrection
->
autoCorrectionSettings
()
.
isEnabledAutoCorrection
())
{
if
(
d
->
autoCorrection
&&
d
->
autoCorrection
->
autoCorrectionSettings
()
->
isEnabledAutoCorrection
())
{
if
((
e
->
key
()
==
Qt
::
Key_Space
)
||
(
e
->
key
()
==
Qt
::
Key_Enter
)
||
(
e
->
key
()
==
Qt
::
Key_Return
))
{
if
(
!
isLineQuoted
(
textCursor
().
block
().
text
())
&&
!
textCursor
().
hasSelection
())
{
const
QTextCharFormat
initialTextFormat
=
textCursor
().
charFormat
();
...
...
@@ -393,7 +393,7 @@ void RichTextComposerNg::forceAutoCorrection(bool selectedText)
if
(
document
()
->
isEmpty
())
{
return
;
}
if
(
d
->
autoCorrection
&&
d
->
autoCorrection
->
autoCorrectionSettings
()
.
isEnabledAutoCorrection
())
{
if
(
d
->
autoCorrection
&&
d
->
autoCorrection
->
autoCorrectionSettings
()
->
isEnabledAutoCorrection
())
{
const
bool
richText
=
(
textMode
()
==
RichTextComposer
::
Rich
);
const
int
initialPosition
=
textCursor
().
position
();
QTextCursor
cur
=
textCursor
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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