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
9f411540
Commit
9f411540
authored
Nov 07, 2022
by
Laurent Montel
Browse files
Adapt to new api
(cherry picked from commit
b52ab879
)
parent
db94d888
Pipeline
#263659
passed with stage
in 13 minutes and 47 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
9f411540
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: none
cmake_minimum_required
(
VERSION 3.16 FATAL_ERROR
)
set
(
PIM_VERSION
"5.21.7
0
"
)
set
(
PIM_VERSION
"5.21.7
1
"
)
project
(
Messagelib VERSION
${
PIM_VERSION
}
)
...
...
@@ -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.7
1
"
)
set
(
PIMCOMMON_LIB_VERSION
"5.21.7
2
"
)
set
(
GPGME_LIB_VERSION
"1.16.0"
)
set
(
AKONADI_SEARCH_VERSION
"5.21.40"
)
...
...
@@ -118,6 +118,7 @@ find_package(KF5Libkleo ${LIBKLEO_LIB_VERSION} CONFIG REQUIRED)
find_package
(
KF5MailTransportAkonadi
${
KMAILTRANSPORT_LIB_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5Mbox
${
KMBOX_LIB_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5PimCommonAkonadi
${
PIMCOMMON_LIB_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5PimCommonAutoCorrection
${
PIMCOMMON_LIB_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5PimTextEdit
${
KPIMTEXTEDIT_LIB_VERSION
}
CONFIG REQUIRED
)
find_package
(
KF5Libkdepim
${
LIBKDEPIM_LIB_VERSION
}
CONFIG REQUIRED
)
...
...
messagecomposer/KF5MessageComposerConfig.cmake.in
View file @
9f411540
...
...
@@ -9,4 +9,5 @@ find_dependency(KF5IdentityManagement "@IDENTITYMANAGEMENT_LIB_VERSION@")
find_dependency(KF5AkonadiMime "@AKONADIMIME_LIB_VERSION@")
find_dependency(KF5Libkleo "@LIBKLEO_LIB_VERSION@")
find_dependency(KF5MessageViewer "@MESSAGELIB_LIB_VERSION@")
find_dependency(KF5PimCommonAutoCorrection "@PIMCOMMON_LIB_VERSION@")
include("${CMAKE_CURRENT_LIST_DIR}/KF5MessageComposerTargets.cmake")
messagecomposer/src/CMakeLists.txt
View file @
9f411540
...
...
@@ -269,6 +269,7 @@ target_link_libraries(KF5MessageComposer
KF5::Mime
KF5::MessageCore
KF5::PimCommonAkonadi
KF5::PimCommonAutoCorrection
KF5::AkonadiCore
KF5::IdentityManagementWidgets
KF5::PimTextEdit
...
...
messagecomposer/src/composer-ng/autotests/richtextcomposerngtest.cpp
View file @
9f411540
...
...
@@ -11,7 +11,7 @@
#include
<KActionCollection>
#include
<KPIMTextEdit/RichTextComposerControler>
#include
<PimCommon/AutoCorrection>
#include
<PimCommon
AutoCorrection
/AutoCorrection>
#include
<QStandardPaths>
#include
<QTest>
...
...
@@ -50,8 +50,8 @@ void RichTextComposerNgTest::shouldForceAutoCorrection()
MessageComposer
::
RichTextComposerNg
richtextComposerNg
;
richtextComposerNg
.
setPlainText
(
original
);
PimCommon
::
AutoCorrection
autocorrection
;
auto
settings
=
new
PimCommon
::
AutoCorrectionSettings
;
PimCommon
AutoCorrection
::
AutoCorrection
autocorrection
;
auto
settings
=
new
PimCommon
AutoCorrection
::
AutoCorrectionSettings
;
settings
->
setEnabledAutoCorrection
(
true
);
settings
->
setUppercaseFirstCharOfSentence
(
true
);
autocorrection
.
setAutoCorrectionSettings
(
settings
);
...
...
@@ -89,8 +89,8 @@ void RichTextComposerNgTest::shouldForceAutoCorrectionWithSelection()
cur
.
setPosition
(
selectionStart
);
cur
.
setPosition
(
selectionEnd
,
QTextCursor
::
KeepAnchor
);
richtextComposerNg
.
setTextCursor
(
cur
);
PimCommon
::
AutoCorrection
autocorrection
;
auto
settings
=
new
PimCommon
::
AutoCorrectionSettings
;
PimCommon
AutoCorrection
::
AutoCorrection
autocorrection
;
auto
settings
=
new
PimCommon
AutoCorrection
::
AutoCorrectionSettings
;
settings
->
setEnabledAutoCorrection
(
true
);
settings
->
setUppercaseFirstCharOfSentence
(
true
);
settings
->
setFixTwoUppercaseChars
(
true
);
...
...
messagecomposer/src/composer-ng/richtextcomposerng.cpp
View file @
9f411540
...
...
@@ -12,7 +12,7 @@
#include
<KPIMTextEdit/RichTextComposerControler>
#include
<KPIMTextEdit/RichTextComposerImages>
#include
<KPIMTextEdit/TextHTMLBuilder>
#include
<PimCommon/AutoCorrection>
#include
<PimCommon
AutoCorrection
/AutoCorrection>
#include
<part/textpart.h>
#include
<KMessageBox>
...
...
@@ -34,7 +34,7 @@ public:
void
fixHtmlFontSize
(
QString
&
cleanHtml
)
const
;
Q_REQUIRED_RESULT
QString
toCleanHtml
()
const
;
PimCommon
::
AutoCorrection
*
autoCorrection
=
nullptr
;
PimCommon
AutoCorrection
::
AutoCorrection
*
autoCorrection
=
nullptr
;
RichTextComposerNg
*
const
richtextComposer
;
MessageComposer
::
RichTextComposerSignatures
*
richTextComposerSignatures
=
nullptr
;
};
...
...
@@ -52,12 +52,12 @@ MessageComposer::RichTextComposerSignatures *RichTextComposerNg::composerSignatu
return
d
->
richTextComposerSignatures
;
}
PimCommon
::
AutoCorrection
*
RichTextComposerNg
::
autocorrection
()
const
PimCommon
AutoCorrection
::
AutoCorrection
*
RichTextComposerNg
::
autocorrection
()
const
{
return
d
->
autoCorrection
;
}
void
RichTextComposerNg
::
setAutocorrection
(
PimCommon
::
AutoCorrection
*
autocorrect
)
void
RichTextComposerNg
::
setAutocorrection
(
PimCommon
AutoCorrection
::
AutoCorrection
*
autocorrect
)
{
d
->
autoCorrection
=
autocorrect
;
}
...
...
@@ -65,7 +65,7 @@ void RichTextComposerNg::setAutocorrection(PimCommon::AutoCorrection *autocorrec
void
RichTextComposerNg
::
setAutocorrectionLanguage
(
const
QString
&
lang
)
{
if
(
d
->
autoCorrection
)
{
PimCommon
::
AutoCorrectionSettings
*
settings
=
d
->
autoCorrection
->
autoCorrectionSettings
();
PimCommon
AutoCorrection
::
AutoCorrectionSettings
*
settings
=
d
->
autoCorrection
->
autoCorrectionSettings
();
settings
->
setLanguage
(
lang
);
d
->
autoCorrection
->
setAutoCorrectionSettings
(
settings
);
}
...
...
messagecomposer/src/composer-ng/richtextcomposerng.h
View file @
9f411540
...
...
@@ -13,7 +13,7 @@
class
RichTextComposerNgTest
;
namespace
PimCommon
namespace
PimCommon
AutoCorrection
{
class
AutoCorrection
;
}
...
...
@@ -34,8 +34,8 @@ public:
explicit
RichTextComposerNg
(
QWidget
*
parent
=
nullptr
);
~
RichTextComposerNg
()
override
;
Q_REQUIRED_RESULT
PimCommon
::
AutoCorrection
*
autocorrection
()
const
;
void
setAutocorrection
(
PimCommon
::
AutoCorrection
*
autocorrect
);
Q_REQUIRED_RESULT
PimCommon
AutoCorrection
::
AutoCorrection
*
autocorrection
()
const
;
void
setAutocorrection
(
PimCommon
AutoCorrection
::
AutoCorrection
*
autocorrect
);
void
setAutocorrectionLanguage
(
const
QString
&
lang
);
void
fillComposerTextPart
(
MessageComposer
::
TextPart
*
textPart
);
...
...
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