Commit 1a43be1d authored by Laurent Montel's avatar Laurent Montel 😁

Adapt to new api

parent 6e94282b
......@@ -78,7 +78,7 @@ set(LIBKLEO_LIB_VERSION "5.7.40")
set(AKONADI_LIB_VERSION "5.7.40")
set(INCIDENCEEDITOR_LIB_VERSION "5.7.40")
set(KTNEF_LIB_VERSION "5.7.40")
set(MESSAGELIB_LIB_VERSION "5.7.49")
set(MESSAGELIB_LIB_VERSION "5.7.82")
set(AKONADICALENDAR_LIB_VERSION "5.7.40")
set(CALENDAR_UTILS_VERSION "5.7.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.7.40")
......
......@@ -37,7 +37,7 @@ void AutoCorrectionPluginEditorInterface::createAction(KActionCollection *ac)
{
KActionMenu *menu = new KActionMenu(i18n("Autocorrect Text"), this);
ac->addAction(QStringLiteral("autocorrect_tool"), menu);
MessageComposer::ActionType type(menu, MessageComposer::ActionType::Tools);
MessageComposer::PluginActionType type(menu, MessageComposer::PluginActionType::Tools);
setActionType(type);
QAction *action = new QAction(i18n("Autocorrect Full Text"), this);
......
......@@ -35,9 +35,9 @@ void AutoCorrectionPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
AutoCorrectionPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Tools);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Tools);
}
QTEST_MAIN(AutoCorrectionPluginEditorInterfaceTest)
......@@ -35,9 +35,9 @@ void ChangeCasePluginEditorInterfaceTest::shouldHaveDefaultValues()
{
ChangeCasePluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Edit);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Edit);
}
QTEST_MAIN(ChangeCasePluginEditorInterfaceTest)
......@@ -44,7 +44,7 @@ void ChangeCasePluginEditorInterface::createAction(KActionCollection *ac)
connect(ChangeCaseMenu, &PimCommon::KActionMenuChangeCase::lowerCase, this, &ChangeCasePluginEditorInterface::slotLowerCase);
connect(ChangeCaseMenu, &PimCommon::KActionMenuChangeCase::sentenceCase, this, &ChangeCasePluginEditorInterface::slotSentenceCase);
connect(ChangeCaseMenu, &PimCommon::KActionMenuChangeCase::reverseCase, this, &ChangeCasePluginEditorInterface::slotReverseCase);
MessageComposer::ActionType type(ChangeCaseMenu, MessageComposer::ActionType::Edit);
MessageComposer::PluginActionType type(ChangeCaseMenu, MessageComposer::PluginActionType::Edit);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void InsertEmailPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
InsertEmailPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Edit);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Edit);
}
QTEST_MAIN(InsertEmailPluginEditorInterfaceTest)
......@@ -38,7 +38,7 @@ void InsertEmailPluginEditorInterface::createAction(KActionCollection *ac)
QAction *action = new QAction(i18n("Insert Email..."), this);
ac->addAction(QStringLiteral("insert_email"), action);
connect(action, &QAction::triggered, this, &InsertEmailPluginEditorInterface::slotActivated);
MessageComposer::ActionType type(action, MessageComposer::ActionType::Edit);
MessageComposer::PluginActionType type(action, MessageComposer::PluginActionType::Edit);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void InsertShorturlPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
InsertShorturlPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::PopupMenu);
QCOMPARE(type.type(), MessageComposer::PluginActionType::PopupMenu);
}
QTEST_MAIN(InsertShorturlPluginEditorInterfaceTest)
......@@ -78,7 +78,7 @@ void InsertShorturlPluginEditorInterface::createAction(KActionCollection *ac)
QAction *action = new QAction(i18n("Insert Short URL..."), this);
ac->addAction(QStringLiteral("insert_shortulr"), action);
connect(action, &QAction::triggered, this, &InsertShorturlPluginEditorInterface::slotActivated);
MessageComposer::ActionType type(action, MessageComposer::ActionType::PopupMenu);
MessageComposer::PluginActionType type(action, MessageComposer::PluginActionType::PopupMenu);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void InsertSpecialCharacterPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
InsertSpecialCharacterPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Edit);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Edit);
}
QTEST_MAIN(InsertSpecialCharacterPluginEditorInterfaceTest)
......@@ -37,7 +37,7 @@ void InsertSpecialCharacterPluginEditorInterface::createAction(KActionCollection
QAction *action = new QAction(i18n("Insert Special Character..."), this);
ac->addAction(QStringLiteral("insert_special_character"), action);
connect(action, &QAction::triggered, this, &InsertSpecialCharacterPluginEditorInterface::slotActivated);
MessageComposer::ActionType type(action, MessageComposer::ActionType::Edit);
MessageComposer::PluginActionType type(action, MessageComposer::PluginActionType::Edit);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void InsertTemplateCommandPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
InsertTemplateCommandPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::ToolBar);
QCOMPARE(type.type(), MessageComposer::PluginActionType::ToolBar);
}
QTEST_MAIN(InsertTemplateCommandPluginEditorInterfaceTest)
......@@ -41,7 +41,7 @@ void InsertTemplateCommandPluginEditorInterface::createAction(KActionCollection
ac->addAction(QStringLiteral("insert_template_command"), mCommandAction);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::triggered, this, &InsertTemplateCommandPluginEditorInterface::slotOpenMenu);
connect(mCommandAction, &TemplateParser::TemplatesInsertCommandAction::insertCommand, this, &InsertTemplateCommandPluginEditorInterface::slotInsertCommand);
MessageComposer::ActionType type(mCommandAction, MessageComposer::ActionType::ToolBar);
MessageComposer::PluginActionType type(mCommandAction, MessageComposer::PluginActionType::ToolBar);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void NonBreakingSpacePluginEditorInterfaceTest::shouldHaveDefaultValue()
{
NonBreakingSpacePluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Edit);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Edit);
}
QTEST_MAIN(NonBreakingSpacePluginEditorInterfaceTest)
......@@ -38,7 +38,7 @@ void NonBreakingSpacePluginEditorInterface::createAction(KActionCollection *ac)
ac->addAction(QStringLiteral("insert_non_breaking_space"), action);
ac->setDefaultShortcut(action, Qt::CTRL + Qt::Key_Space);
connect(action, &QAction::triggered, this, &NonBreakingSpacePluginEditorInterface::slotActivated);
MessageComposer::ActionType type(action, MessageComposer::ActionType::Edit);
MessageComposer::PluginActionType type(action, MessageComposer::PluginActionType::Edit);
setActionType(type);
}
......
......@@ -35,9 +35,9 @@ void ZoomTextPluginEditorInterfaceTest::shouldHaveDefaultValue()
{
ZoomTextPluginEditorInterface interface(nullptr);
interface.createAction(new KActionCollection(this));
MessageComposer::ActionType type = interface.actionType();
MessageComposer::PluginActionType type = interface.actionType();
QVERIFY(type.action());
QCOMPARE(type.type(), MessageComposer::ActionType::Edit);
QCOMPARE(type.type(), MessageComposer::PluginActionType::Edit);
}
QTEST_MAIN(ZoomTextPluginEditorInterfaceTest)
......@@ -58,7 +58,7 @@ void ZoomTextPluginEditorInterface::createAction(KActionCollection *ac)
connect(zoomResetAction, &QAction::triggered, this, &ZoomTextPluginEditorInterface::slotZoomReset);
ac->setDefaultShortcut(zoomResetAction, QKeySequence(Qt::CTRL + Qt::Key_0));
MessageComposer::ActionType type(zoomMenu, MessageComposer::ActionType::Edit);
MessageComposer::PluginActionType type(zoomMenu, MessageComposer::PluginActionType::Edit);
setActionType(type);
}
......
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