Commit 4f61718d authored by Laurent Montel's avatar Laurent Montel
Browse files

Adapt to new api

parent e57f68aa
Pipeline #263663 failed with stage
in 5 minutes and 23 seconds
......@@ -74,7 +74,7 @@ set(LIBGRAVATAR_VERSION "5.21.40")
set(MAILCOMMON_LIB_VERSION "5.21.41")
set(MESSAGELIB_LIB_VERSION "5.21.43")
set(LIBKLEO_LIB_VERSION "5.21.40")
set(PIMCOMMON_LIB_VERSION "5.21.41")
set(PIMCOMMON_LIB_VERSION "5.21.42")
set(LIBKDEPIM_LIB_VERSION "5.21.40")
set(LIBKSIEVE_LIB_VERSION "5.21.40")
set(AKONADI_SEARCH_VERSION "5.21.40")
......
......@@ -15,8 +15,8 @@ using namespace PimCommon::ConfigureImmutableWidgetUtils;
#include <MessageComposer/ImageScalingWidget>
#include <MessageComposer/MessageComposerSettings>
#include <MessageCore/MessageCoreSettings>
#include <PimCommon/AutoCorrectionWidget>
#include <PimCommon/SimpleStringListEditor>
#include <PimCommonAutoCorrection/AutoCorrectionWidget>
#include <TemplateParser/CustomTemplates>
#include <TemplateParser/TemplatesConfiguration>
#include <templateparser/globalsettings_templateparser.h>
......@@ -1180,12 +1180,12 @@ ComposerPageAutoCorrectionTab::ComposerPageAutoCorrectionTab(QWidget *parent)
auto vlay = new QVBoxLayout(this);
vlay->setSpacing(0);
vlay->setContentsMargins({});
autocorrectionWidget = new PimCommon::AutoCorrectionWidget(this);
autocorrectionWidget = new PimCommonAutoCorrection::AutoCorrectionWidget(this);
if (KMKernel::self()) {
autocorrectionWidget->setAutoCorrection(KMKernel::self()->composerAutoCorrection());
}
vlay->addWidget(autocorrectionWidget);
connect(autocorrectionWidget, &PimCommon::AutoCorrectionWidget::changed, this, &ConfigModuleTab::slotEmitChanged);
connect(autocorrectionWidget, &PimCommonAutoCorrection::AutoCorrectionWidget::changed, this, &ConfigModuleTab::slotEmitChanged);
}
QString ComposerPageAutoCorrectionTab::helpAnchor() const
......
......@@ -23,9 +23,12 @@ namespace TemplateParser
class CustomTemplates;
class TemplatesConfiguration;
}
namespace PimCommon
namespace PimCommonAutoCorrection
{
class AutoCorrectionWidget;
}
namespace PimCommon
{
class SimpleStringListEditor;
}
namespace MessageComposer
......@@ -208,7 +211,7 @@ private:
void doResetToDefaultsOther() override;
private:
PimCommon::AutoCorrectionWidget *autocorrectionWidget = nullptr;
PimCommonAutoCorrection::AutoCorrectionWidget *autocorrectionWidget = nullptr;
};
class ComposerPageAutoImageResizeTab : public ConfigModuleTab
......
......@@ -7,7 +7,7 @@
#include "kmcomposerglobalaction.h"
#include "kmcomposerwin.h"
#include <PimCommon/LineEditWithAutoCorrection>
#include <PimCommonAutoCorrection/LineEditWithAutoCorrection>
#include <KLineEdit>
......@@ -28,8 +28,8 @@ void KMComposerGlobalAction::slotUndo()
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->undo();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->undo();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->undo();
} else if (::qobject_cast<KLineEdit *>(fw)) {
......@@ -44,8 +44,8 @@ void KMComposerGlobalAction::slotRedo()
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->redo();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->redo();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->redo();
} else if (::qobject_cast<KLineEdit *>(fw)) {
......@@ -60,8 +60,8 @@ void KMComposerGlobalAction::slotCut()
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->cut();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->cut();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->cut();
} else if (::qobject_cast<KLineEdit *>(fw)) {
......@@ -76,8 +76,8 @@ void KMComposerGlobalAction::slotCopy()
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->copy();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->copy();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->copy();
} else if (::qobject_cast<KLineEdit *>(fw)) {
......@@ -91,8 +91,8 @@ void KMComposerGlobalAction::slotPaste()
if (!fw) {
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->paste();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->paste();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->paste();
} else if (::qobject_cast<KLineEdit *>(fw)) {
......@@ -107,8 +107,8 @@ void KMComposerGlobalAction::slotMarkAll()
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->selectAll();
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->selectAll();
} else if (::qobject_cast<KLineEdit *>(fw)) {
static_cast<KLineEdit *>(fw)->selectAll();
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
......@@ -123,8 +123,8 @@ void KMComposerGlobalAction::slotInsertEmoticon(const QString &str)
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->insertPlainText(str);
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->insertPlainText(str);
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->insertPlainText(str);
}
......@@ -140,8 +140,8 @@ void KMComposerGlobalAction::slotInsertText(const QString &str)
return;
}
if (::qobject_cast<PimCommon::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommon::LineEditWithAutoCorrection *>(fw)->insertPlainText(str);
if (::qobject_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)) {
static_cast<PimCommonAutoCorrection::LineEditWithAutoCorrection *>(fw)->insertPlainText(str);
} else if (::qobject_cast<KMComposerEditorNg *>(fw)) {
static_cast<QTextEdit *>(fw)->insertPlainText(str);
}
......
......@@ -138,7 +138,7 @@
#include <PimCommon/CustomToolsPluginManager>
#include <PimCommon/CustomToolsWidgetng>
#include <PimCommon/KActionMenuChangeCase>
#include <PimCommon/LineEditWithAutoCorrection>
#include <PimCommonAutoCorrection/LineEditWithAutoCorrection>
#include <TemplateParser/TemplateParserJob>
#include <TemplateParser/TemplatesConfiguration>
......@@ -467,7 +467,8 @@ KMComposerWin::KMComposerWin(const KMime::Message::Ptr &aMsg,
applyMainWindowSettings(KMKernel::self()->config()->group("Composer"));
mUpdateWindowTitleConnection = connect(mEdtSubject, &PimCommon::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle);
mUpdateWindowTitleConnection =
connect(mEdtSubject, &PimCommonAutoCorrection::LineEditWithAutoCorrection::textChanged, this, &KMComposerWin::slotUpdateWindowTitle);
mIdentityConnection = connect(identity, &KIdentityManagement::IdentityCombo::identityChanged, this, [this](uint val) {
slotIdentityChanged(val);
});
......
......@@ -10,7 +10,7 @@
#include <QMimeData>
SubjectLineEditWithAutoCorrection::SubjectLineEditWithAutoCorrection(QWidget *parent, const QString &configFile)
: PimCommon::LineEditWithAutoCorrection(parent, configFile)
: PimCommonAutoCorrection::LineEditWithAutoCorrection(parent, configFile)
{
setActivateLanguageMenu(false);
setToolTip(i18n("Set a subject for this message"));
......@@ -26,5 +26,5 @@ void SubjectLineEditWithAutoCorrection::dropEvent(QDropEvent *event)
event->accept();
return;
}
PimCommon::LineEditWithAutoCorrection::dropEvent(event);
PimCommonAutoCorrection::LineEditWithAutoCorrection::dropEvent(event);
}
......@@ -7,8 +7,8 @@
#pragma once
#include "kmail_private_export.h"
#include <PimCommon/LineEditWithAutoCorrection>
class KMAILTESTS_TESTS_EXPORT SubjectLineEditWithAutoCorrection : public PimCommon::LineEditWithAutoCorrection
#include <PimCommonAutoCorrection/LineEditWithAutoCorrection>
class KMAILTESTS_TESTS_EXPORT SubjectLineEditWithAutoCorrection : public PimCommonAutoCorrection::LineEditWithAutoCorrection
{
Q_OBJECT
public:
......
......@@ -39,8 +39,8 @@
#include <KIdentityManagement/Identity>
#include <KIdentityManagement/SignatureConfigurator>
#include <PimCommon/AutoCorrectionLanguage>
#include <PimCommon/PimUtil>
#include <PimCommonAutoCorrection/AutoCorrectionLanguage>
#include <Libkdepim/LineEditCatchReturnKey>
#include <PimCommonAkonadi/AddresseeLineEdit>
......@@ -620,7 +620,7 @@ IdentityDialog::IdentityDialog(QWidget *parent)
connect(mEditVCard, &QPushButton::clicked, this, &IdentityDialog::slotEditVcard);
formLayout->addRow(mAttachMyVCard, mEditVCard);
mAutoCorrectionLanguage = new PimCommon::AutoCorrectionLanguage(tab);
mAutoCorrectionLanguage = new PimCommonAutoCorrection::AutoCorrectionLanguage(tab);
label = new QLabel(i18n("Autocorrection language:"), tab);
label->setBuddy(mAutoCorrectionLanguage);
formLayout->addRow(label, mAutoCorrectionLanguage);
......
......@@ -53,7 +53,7 @@ namespace TemplateParser
class TemplatesConfiguration;
}
namespace PimCommon
namespace PimCommonAutoCorrection
{
class AutoCorrectionLanguage;
}
......@@ -127,7 +127,7 @@ private:
MailTransport::TransportComboBox *mTransportCombo = nullptr;
QCheckBox *mAttachMyVCard = nullptr;
QPushButton *mEditVCard = nullptr;
PimCommon::AutoCorrectionLanguage *mAutoCorrectionLanguage = nullptr;
PimCommonAutoCorrection::AutoCorrectionLanguage *mAutoCorrectionLanguage = nullptr;
QLineEdit *mDefaultDomainEdit = nullptr;
// "templates" tab:
......
......@@ -52,9 +52,9 @@ using KMail::MailServiceImpl;
#include <MessageCore/MessageCoreSettings>
#include <MessageList/MessageListUtil>
#include <MessageViewer/MessageViewerSettings>
#include <PimCommon/AutoCorrection>
#include <PimCommon/NetworkManager>
#include <PimCommon/PimCommonSettings>
#include <PimCommonAutoCorrection/AutoCorrection>
#include <PimCommonAutoCorrection/PimCommonSettings>
#include <gravatar/gravatarsettings.h>
#include <messagelist/messagelistsettings.h>
......@@ -152,7 +152,7 @@ KMKernel::KMKernel(QObject *parent)
// would be unexpected
KMailSettings::self();
mAutoCorrection = new PimCommon::AutoCorrection();
mAutoCorrection = new PimCommonAutoCorrection::AutoCorrection();
KMime::setUseOutlookAttachmentEncoding(MessageComposer::MessageComposerSettings::self()->outlookCompatibleAttachments());
// cberzan: this crap moved to CodecManager ======================
......@@ -1296,7 +1296,7 @@ void KMKernel::slotSyncConfig()
{
saveConfig();
// Laurent investigate why we need to reload them.
PimCommon::PimCommonSettings::self()->load();
PimCommonAutoCorrection::PimCommonSettings::self()->load();
MessageCore::MessageCoreSettings::self()->load();
MessageViewer::MessageViewerSettings::self()->load();
MessageComposer::MessageComposerSettings::self()->load();
......@@ -1311,7 +1311,7 @@ void KMKernel::slotSyncConfig()
void KMKernel::saveConfig()
{
PimCommon::PimCommonSettings::self()->save();
PimCommonAutoCorrection::PimCommonSettings::self()->save();
MessageCore::MessageCoreSettings::self()->save();
MessageViewer::MessageViewerSettings::self()->save();
MessageComposer::MessageComposerSettings::self()->save();
......@@ -1442,8 +1442,8 @@ KSharedConfig::Ptr KMKernel::config()
mMailCommonSettings->setSharedConfig(mySelf->mConfig);
mMailCommonSettings->load();
PimCommon::PimCommonSettings::self()->setSharedConfig(mySelf->mConfig);
PimCommon::PimCommonSettings::self()->load();
PimCommonAutoCorrection::PimCommonSettings::self()->setSharedConfig(mySelf->mConfig);
PimCommonAutoCorrection::PimCommonSettings::self()->load();
Gravatar::GravatarSettings::self()->setSharedConfig(mySelf->mConfig);
Gravatar::GravatarSettings::self()->load();
}
......@@ -1995,7 +1995,7 @@ void KMKernel::makeResourceOnline(MessageViewer::Viewer::ResourceOnlineMode mode
}
}
PimCommon::AutoCorrection *KMKernel::composerAutoCorrection()
PimCommonAutoCorrection::AutoCorrection *KMKernel::composerAutoCorrection()
{
return mAutoCorrection;
}
......
......@@ -51,7 +51,7 @@ namespace MessageComposer
{
class MessageSender;
}
namespace PimCommon
namespace PimCommonAutoCorrection
{
class AutoCorrection;
}
......@@ -476,7 +476,7 @@ public:
void updatePaneTagComboBox();
Q_REQUIRED_RESULT PimCommon::AutoCorrection *composerAutoCorrection();
Q_REQUIRED_RESULT PimCommonAutoCorrection::AutoCorrection *composerAutoCorrection();
void toggleSystemTray();
FolderArchiveManager *folderArchiveManager() const;
......@@ -612,7 +612,7 @@ private:
QStringList mResourcesBeingChecked;
QPointer<MailCommon::KMFilterDialog> mFilterEditDialog;
PimCommon::AutoCorrection *mAutoCorrection = nullptr;
PimCommonAutoCorrection::AutoCorrection *mAutoCorrection = nullptr;
FolderArchiveManager *const mFolderArchiveManager;
CheckIndexingManager *mCheckIndexingManager = nullptr;
Akonadi::Search::PIM::IndexedItems *mIndexedItems = nullptr;
......
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