Commit 9f411540 authored by Laurent Montel's avatar 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
# SPDX-License-Identifier: CC0-1.0
# SPDX-FileCopyrightText: none
cmake_minimum_required(VERSION 3.16 FATAL_ERROR)
set(PIM_VERSION "5.21.70")
set(PIM_VERSION "5.21.71")
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.71")
set(PIMCOMMON_LIB_VERSION "5.21.72")
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)
......
......@@ -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")
......@@ -269,6 +269,7 @@ target_link_libraries(KF5MessageComposer
KF5::Mime
KF5::MessageCore
KF5::PimCommonAkonadi
KF5::PimCommonAutoCorrection
KF5::AkonadiCore
KF5::IdentityManagementWidgets
KF5::PimTextEdit
......
......@@ -11,7 +11,7 @@
#include <KActionCollection>
#include <KPIMTextEdit/RichTextComposerControler>
#include <PimCommon/AutoCorrection>
#include <PimCommonAutoCorrection/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;
PimCommonAutoCorrection::AutoCorrection autocorrection;
auto settings = new PimCommonAutoCorrection::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;
PimCommonAutoCorrection::AutoCorrection autocorrection;
auto settings = new PimCommonAutoCorrection::AutoCorrectionSettings;
settings->setEnabledAutoCorrection(true);
settings->setUppercaseFirstCharOfSentence(true);
settings->setFixTwoUppercaseChars(true);
......
......@@ -12,7 +12,7 @@
#include <KPIMTextEdit/RichTextComposerControler>
#include <KPIMTextEdit/RichTextComposerImages>
#include <KPIMTextEdit/TextHTMLBuilder>
#include <PimCommon/AutoCorrection>
#include <PimCommonAutoCorrection/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;
PimCommonAutoCorrection::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
PimCommonAutoCorrection::AutoCorrection *RichTextComposerNg::autocorrection() const
{
return d->autoCorrection;
}
void RichTextComposerNg::setAutocorrection(PimCommon::AutoCorrection *autocorrect)
void RichTextComposerNg::setAutocorrection(PimCommonAutoCorrection::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();
PimCommonAutoCorrection::AutoCorrectionSettings *settings = d->autoCorrection->autoCorrectionSettings();
settings->setLanguage(lang);
d->autoCorrection->setAutoCorrectionSettings(settings);
}
......
......@@ -13,7 +13,7 @@
class RichTextComposerNgTest;
namespace PimCommon
namespace PimCommonAutoCorrection
{
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 PimCommonAutoCorrection::AutoCorrection *autocorrection() const;
void setAutocorrection(PimCommonAutoCorrection::AutoCorrection *autocorrect);
void setAutocorrectionLanguage(const QString &lang);
void fillComposerTextPart(MessageComposer::TextPart *textPart);
......
Supports Markdown
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