Commit e866905a authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Prepare to show plugin check before deleting

parent 0746ab06
Pipeline #67804 passed with stage
in 23 minutes and 21 seconds
......@@ -65,7 +65,7 @@ option(KDEPIM_RUN_AKONADI_TEST "Enable autotest based on Akonadi." TRUE)
find_package(Qt5 ${QT_REQUIRED_VERSION} CONFIG REQUIRED DBus Network Test Widgets WebEngine WebEngineWidgets)
set(LIBGRAVATAR_VERSION "5.17.40")
set(MAILCOMMON_LIB_VERSION "5.17.40")
set(MESSAGELIB_LIB_VERSION "5.17.40")
set(MESSAGELIB_LIB_VERSION "5.17.52")
set(LIBKLEO_LIB_VERSION "5.17.40")
set(PIMCOMMON_LIB_VERSION "5.17.40")
set(LIBKDEPIM_LIB_VERSION "5.17.40")
......
......@@ -19,6 +19,8 @@
#include <MessageComposer/PluginEditorInitManager>
#include <MessageComposer/PluginEditorManager>
#include <MessageViewer/HeaderStylePluginManager>
#include <MessageViewer/MessageViewerCheckBeforeDeletingPlugin>
#include <MessageViewer/MessageViewerCheckBeforeDeletingPluginManager>
#include <MessageViewer/ViewerPluginManager>
#include <PimCommon/CustomToolsPlugin>
#include <PimCommon/GenericPluginManager>
......@@ -40,6 +42,11 @@
namespace
{
QString pluginEditorCheckBeforeDeletingGroupName()
{
return QStringLiteral("plugincheckbeforedeletinggroupname");
}
QString pluginEditorGroupName()
{
return QStringLiteral("plugineditorgroupname");
......@@ -133,6 +140,9 @@ void ConfigurePluginsListWidget::save()
PimCommon::ConfigurePluginsListWidget::savePlugins(MessageComposer::PluginEditorConvertTextManager::self()->configGroupName(),
MessageComposer::PluginEditorConvertTextManager::self()->configPrefixSettingKey(),
mPluginConvertTextItems);
PimCommon::ConfigurePluginsListWidget::savePlugins(MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->configGroupName(),
MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->configPrefixSettingKey(),
mPluginCheckBeforeDeletingItems);
saveAkonadiAgent();
}
......@@ -166,6 +176,7 @@ void ConfigurePluginsListWidget::doResetToDefaultsOther()
changeState(mPluginEditorInitItems);
changeState(mPluginConvertTextItems);
changeState(mPluginEditorGrammarItems);
changeState(mPluginCheckBeforeDeletingItems);
}
void ConfigurePluginsListWidget::initialize()
......@@ -249,6 +260,13 @@ void ConfigurePluginsListWidget::initialize()
configurePluginGroupName(),
false);
PimCommon::ConfigurePluginsListWidget::fillTopItems(MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->pluginsDataList(),
i18n("Misc"),
MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->configGroupName(),
MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->configPrefixSettingKey(),
mPluginCheckBeforeDeletingItems,
pluginEditorCheckBeforeDeletingGroupName());
// Load Agent Plugin
initializeAgentPlugins();
mListWidget->expandAll();
......@@ -350,6 +368,10 @@ void ConfigurePluginsListWidget::slotConfigureClicked(const QString &groupName,
MessageComposer::PluginEditorCheckBeforeSend *plugin =
MessageComposer::PluginEditorCheckBeforeSendManager::self()->pluginFromIdentifier(identifier);
plugin->showConfigureDialog(this);
} else if (groupName == pluginEditorCheckBeforeDeletingGroupName()) {
MessageViewer::MessageViewerCheckBeforeDeletingPlugin *plugin =
MessageViewer::MessageViewerCheckBeforeDeletingPluginManager::self()->pluginFromIdentifier(identifier);
plugin->showConfigureDialog(this);
} else if (groupName == pluginEditorConvertTextGroupName()) {
MessageComposer::PluginEditorConvertText *plugin = MessageComposer::PluginEditorConvertTextManager::self()->pluginFromIdentifier(identifier);
plugin->showConfigureDialog(this);
......
......@@ -40,6 +40,7 @@ private:
QVector<PluginItem *> mAgentPluginsItems;
QVector<PluginItem *> mPluginConvertTextItems;
QVector<PluginItem *> mPluginConfigureItems;
QVector<PluginItem *> mPluginCheckBeforeDeletingItems;
QVector<PimCommon::PluginUtilData> mPluginUtilDataList;
};
Markdown is supported
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