Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit bc0f9c8e authored by Laurent Montel's avatar Laurent Montel 😁

These plugins need text selection support

parent a0dac51d
......@@ -86,7 +86,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.41")
set(MESSAGELIB_LIB_VERSION "5.7.46")
set(AKONADICALENDAR_LIB_VERSION "5.7.40")
set(CALENDAR_UTILS_VERSION "5.7.40")
set(KPIMTEXTEDIT_LIB_VERSION "5.7.40")
......
......@@ -28,6 +28,7 @@
ChangeCasePluginEditorInterface::ChangeCasePluginEditorInterface(QObject *parent)
: MessageComposer::PluginEditorInterface(parent)
{
setNeedSelectedText(true);
}
ChangeCasePluginEditorInterface::~ChangeCasePluginEditorInterface()
......
......@@ -29,6 +29,7 @@ K_PLUGIN_FACTORY_WITH_JSON(InsertShorturlPluginEditorFactory, "kmail_insertshort
InsertShorturlPluginEditor::InsertShorturlPluginEditor(QObject *parent, const QList<QVariant> &)
: MessageComposer::PluginEditor(parent)
{
}
InsertShorturlPluginEditor::~InsertShorturlPluginEditor()
......
......@@ -32,6 +32,7 @@
InsertShorturlPluginEditorInterface::InsertShorturlPluginEditorInterface(QObject *parent)
: MessageComposer::PluginEditorInterface(parent)
{
setNeedSelectedText(true);
initializePlugins();
}
......@@ -88,10 +89,9 @@ void InsertShorturlPluginEditorInterface::slotActivated()
void InsertShorturlPluginEditorInterface::exec()
{
QTextCursor textCursor = richTextEditor()->textCursor();
if (textCursor.hasSelection()) {
QString urlStr = textCursor.selectedText();
if (urlStr.startsWith(QLatin1String("http:")) || urlStr.startsWith(QLatin1String("https:"))) {
/*
QString urlStr = textCursor.selectedText();
if (urlStr.startsWith(QLatin1String("http:")) || urlStr.startsWith(QLatin1String("https:"))) {
/*
if (!mCurrentEngine) {
return;
}
......@@ -107,10 +107,8 @@ void InsertShorturlPluginEditorInterface::exec()
mShortUrl->clear();
mCurrentEngine->generateShortUrl();
*/
//textCursor.insertText(newText);
}
//textCursor.insertText(newText);
}
//editorUtil.upperCase(textCursor);
}
void InsertShorturlPluginEditorInterface::slotShortUrlDone(const QString &url)
......
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