Commit c051a4d9 authored by Martin Tobias Holmedahl Sandsmark's avatar Martin Tobias Holmedahl Sandsmark
Browse files

Remove hack for bug fixed in sonnet, re-enable custom context menu, add info about sonnet to cmake

parent 00ab5e33
......@@ -235,7 +235,7 @@ else()
message(STATUS "Disabling COMPRESS=DEFLATE, zlib is not available")
endif()
trojita_find_package(KF5Sonnet "" "" "" "" WITH_SPELLCHECKER_SONNET)
trojita_find_package(KF5Sonnet "" "https://projects.kde.org/projects/frameworks/sonnet" "Qt5 Spell Checking Library from KDE" "Spell checking support" WITH_SPELLCHECKER_SONNET)
if(WITH_SPELLCHECKER_SONNET)
set(TROJITA_HAVE_SONNET True)
else()
......
......@@ -33,6 +33,7 @@
#include "configure.cmake.h"
#ifdef TROJITA_HAVE_SONNET
#include <SonnetUi/sonnet/spellcheckdecorator.h>
#include <SonnetUi/sonnet/highlighter.h>
#endif
ComposerTextEdit::ComposerTextEdit(QWidget *parent) : QTextEdit(parent)
......@@ -51,8 +52,7 @@ ComposerTextEdit::ComposerTextEdit(QWidget *parent) : QTextEdit(parent)
#ifdef TROJITA_HAVE_SONNET
Sonnet::SpellCheckDecorator *decorator = new Sonnet::SpellCheckDecorator(this);
// bug: it would not work until a decorator was requested...
Q_UNUSED(decorator->highlighter());
decorator->highlighter()->setAutomatic(false);
#endif
}
......@@ -155,7 +155,6 @@ void ComposerTextEdit::paintEvent(QPaintEvent *pe)
}
}
#if 0
void ComposerTextEdit::contextMenuEvent(QContextMenuEvent *e)
{
QScopedPointer<QMenu> menu(createStandardContextMenu(e->pos()));
......@@ -202,7 +201,6 @@ void ComposerTextEdit::contextMenuEvent(QContextMenuEvent *e)
}
menu->exec(e->globalPos());
}
#endif
void ComposerTextEdit::slotPasteAsQuotation()
{
......
......@@ -47,7 +47,7 @@ protected:
void keyReleaseEvent(QKeyEvent *event);
/** painter reimplementation for notification **/
void paintEvent(QPaintEvent *pe);
//virtual void contextMenuEvent(QContextMenuEvent *e);
virtual void contextMenuEvent(QContextMenuEvent *e);
private slots:
void resetNotification();
void slotPasteAsQuotation();
......
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