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
KPimTextEdit
Commits
bce0560c
Commit
bce0560c
authored
Nov 28, 2019
by
Laurent Montel
Browse files
Adapt to new api
parent
14f1bfb5
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/texteditor/plaintexteditor/plaintexteditor.cpp
View file @
bce0560c
...
...
@@ -33,6 +33,7 @@
#include
<sonnet/backgroundchecker.h>
#include
<Sonnet/Dialog>
#include
"texttospeech/texttospeech.h"
#include
<sonnet_version.h>
#include
<QMenu>
#include
<QDBusConnection>
...
...
@@ -361,9 +362,12 @@ void PlainTextEditor::slotCheckSpelling()
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
replace
,
this
,
&
PlainTextEditor
::
slotSpellCheckerCorrected
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
misspelling
,
this
,
&
PlainTextEditor
::
slotSpellCheckerMisspelling
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
autoCorrect
,
this
,
&
PlainTextEditor
::
slotSpellCheckerAutoCorrect
);
#if SONNET_VERSION < QT_VERSION_CHECK(5, 65, 0)
connect
(
spellDialog
,
QOverload
<
const
QString
&>::
of
(
&
Sonnet
::
Dialog
::
done
),
this
,
&
PlainTextEditor
::
slotSpellCheckerFinished
);
#else
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
spellCheckDone
,
this
,
&
PlainTextEditor
::
slotSpellCheckerFinished
);
#endif
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
cancel
,
this
,
&
PlainTextEditor
::
slotSpellCheckerCanceled
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
spellCheckStatus
,
this
,
&
PlainTextEditor
::
spellCheckStatus
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
languageChanged
,
this
,
&
PlainTextEditor
::
languageChanged
);
...
...
src/texteditor/richtexteditor/richtexteditor.cpp
View file @
bce0560c
...
...
@@ -38,6 +38,7 @@
#include
<sonnet/speller.h>
#include
<texttospeech/texttospeech.h>
#include
<SonnetCore/sonnet/backgroundchecker.h>
#include
<sonnet_version.h>
#include
<KIO/KUriFilterSearchProviderActions>
#include
<QMenu>
...
...
@@ -461,15 +462,23 @@ void RichTextEditor::checkSpelling(bool force)
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
replace
,
this
,
&
RichTextEditor
::
slotSpellCheckerCorrected
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
misspelling
,
this
,
&
RichTextEditor
::
slotSpellCheckerMisspelling
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
autoCorrect
,
this
,
&
RichTextEditor
::
slotSpellCheckerAutoCorrect
);
#if SONNET_VERSION < QT_VERSION_CHECK(5, 65, 0)
connect
(
spellDialog
,
QOverload
<
const
QString
&>::
of
(
&
Sonnet
::
Dialog
::
done
),
this
,
&
RichTextEditor
::
slotSpellCheckerFinished
);
#else
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
spellCheckDone
,
this
,
&
RichTextEditor
::
slotSpellCheckerFinished
);
#endif
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
cancel
,
this
,
&
RichTextEditor
::
slotSpellCheckerCanceled
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
spellCheckStatus
,
this
,
&
RichTextEditor
::
spellCheckStatus
);
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
languageChanged
,
this
,
&
RichTextEditor
::
languageChanged
);
if
(
force
)
{
#if SONNET_VERSION < QT_VERSION_CHECK(5, 65, 0)
connect
(
spellDialog
,
SIGNAL
(
done
(
QString
)),
this
,
SIGNAL
(
spellCheckingFinished
()));
//connect(spellDialog, &Sonnet::Dialog::done, this, &RichTextEditor::spellCheckingFinished);
#else
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
spellCheckDone
,
this
,
&
RichTextEditor
::
spellCheckingFinished
);
#endif
connect
(
spellDialog
,
&
Sonnet
::
Dialog
::
cancel
,
this
,
&
RichTextEditor
::
spellCheckingCanceled
);
}
d
->
originalDoc
=
QTextDocumentFragment
(
document
());
spellDialog
->
setBuffer
(
toPlainText
());
...
...
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