Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Trojitá
Commits
c051a4d9
Commit
c051a4d9
authored
May 08, 2014
by
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
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
c051a4d9
...
...
@@ -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
()
...
...
src/Gui/ComposerTextEdit.cpp
View file @
c051a4d9
...
...
@@ -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
()
{
...
...
src/Gui/ComposerTextEdit.h
View file @
c051a4d9
...
...
@@ -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
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment