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 ed57160f authored by Laurent Montel's avatar Laurent Montel 😁

Use dialogbox

parent 4fbf4a2e
......@@ -11,9 +11,9 @@ macro(add_kmail_converttext_unittest _source _additional)
target_link_libraries( ${_name} Qt5::Test KF5::XmlGui KF5::IconThemes KF5::MessageComposer KF5::I18n Qt5::WebEngineWidgets discount::Lib)
endmacro ()
add_kmail_converttext_unittest(markdowninterfacetest.cpp "../markdowninterface.cpp;../markdownpreviewdialog.cpp;../markdownenginepage.cpp;../markdownpreviewwidget.cpp;../markdownconverter.cpp")
add_kmail_converttext_unittest(markdowninterfacetest.cpp "../markdowninterface.cpp;../markdownpreviewdialog.cpp;../markdownenginepage.cpp;../markdownpreviewwidget.cpp;../markdownconverter.cpp;../markdowncreatelinkdialog.cpp;../markdowncreatelinkwidget.cpp")
add_kmail_converttext_unittest(markdownpreviewwidgettest.cpp "../markdownpreviewwidget.cpp;../markdownenginepage.cpp;../markdownconverter.cpp")
add_kmail_converttext_unittest(markdownplugintest.cpp "../markdownenginepage.cpp;../markdownplugin.cpp;../markdownconverter.cpp;../markdowninterface.cpp;../markdownconfiguredialog.cpp;../markdownconfigurewidget.cpp;../markdownpreviewdialog.cpp;../markdownpreviewwidget.cpp;../markdownconverter.cpp")
add_kmail_converttext_unittest(markdownplugintest.cpp "../markdownenginepage.cpp;../markdownplugin.cpp;../markdownconverter.cpp;../markdowninterface.cpp;../markdownconfiguredialog.cpp;../markdownconfigurewidget.cpp;../markdownpreviewdialog.cpp;../markdownpreviewwidget.cpp;../markdownconverter.cpp;../markdowncreatelinkdialog.cpp;../markdowncreatelinkwidget.cpp")
add_kmail_converttext_unittest(markdownconfigurewidgettest.cpp "../markdownconfigurewidget.cpp")
add_kmail_converttext_unittest(markdownconfiguredialogtest.cpp "../markdownconfiguredialog.cpp;../markdownconfigurewidget.cpp")
add_kmail_converttext_unittest(markdownpreviewdialogtest.cpp "../markdownpreviewdialog.cpp;../markdownpreviewwidget.cpp;../markdownenginepage.cpp;../markdownconverter.cpp")
......
......@@ -21,6 +21,7 @@
#include "markdownpreviewdialog.h"
#include "markdownplugin_debug.h"
#include "markdownconverter.h"
#include "markdowncreatelinkdialog.h"
#include <KPIMTextEdit/RichTextComposer>
#include <KPIMTextEdit/RichTextComposerControler>
#include <KLocalizedString>
......@@ -97,7 +98,14 @@ void MarkdownInterface::addItalic()
void MarkdownInterface::addLink()
{
//TODO
QPointer<MarkdownCreateLinkDialog> dlg = new MarkdownCreateLinkDialog(parentWidget());
if (dlg->exec()) {
const QString str = dlg->linkStr();
if (!str.isEmpty()) {
richTextEditor()->textCursor().insertText(str);
}
}
delete dlg;
}
void MarkdownInterface::addTitle()
......
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