D21940: Make automatic spellcheck work after reloading a document

Dominik Haumann noreply at phabricator.kde.org
Sat Jun 22 21:28:00 BST 2019


dhaumann added inline comments.

INLINE COMMENTS

> ahmadsamir wrote in ontheflycheck.cpp:75
>   In file included from /usr/include/qt5/QtCore/qalgorithms.h:43,
>                    from /usr/include/qt5/QtCore/qlist.h:43,
>                    from /usr/include/qt5/QtCore/QList:1,
>                    from /home/ahmad/dev/ktexteditor/git/src/spellcheck/ontheflycheck.h:25,
>                    from /home/ahmad/dev/ktexteditor/git/src/spellcheck/ontheflycheck.cpp:26:
>   /usr/include/qt5/QtCore/qobject.h: In instantiation of ‘static QMetaObject::Connection QObject::connect(const typename QtPrivate::FunctionPointer<Func>::Object*, Func1, const typename QtPrivate::FunctionPointer<Func2>::Object*, Func2, Qt::ConnectionType) [with Func1 = void (KTextEditor::Document::*)(KTextEditor::Document*); Func2 = void (KateOnTheFlyChecker::*)(const KTextEditor::Range&); typename QtPrivate::FunctionPointer<Func>::Object = KTextEditor::Document; typename QtPrivate::FunctionPointer<Func2>::Object = KateOnTheFlyChecker]’:
>   /home/ahmad/dev/ktexteditor/git/src/spellcheck/ontheflycheck.cpp:76:58:   required from here
>   /usr/include/qt5/QtCore/qobject.h:241:9: error: static assertion failed: Signal and slot arguments are not compatible.
>     241 |         Q_STATIC_ASSERT_X((QtPrivate::CheckCompatibleArguments<typename SignalType::Arguments, typename SlotType::Arguments>::value),
>         |         ^~~~~~~~~~~~~~~~~

In that case, please use an anonymous lambda:

  [this](KTextEditor:: Document*){refreshSpellCheck ();}

That keeps the code closer together.

REPOSITORY
  R39 KTextEditor

REVISION DETAIL
  https://phabricator.kde.org/D21940

To: ahmadsamir, #ktexteditor, cullmann, dhaumann
Cc: dhaumann, sars, kde-frameworks-devel, kwrite-devel, LeGast00n, domson, michaelh, ngraham, bruns, demsking, cullmann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190622/0a13fce8/attachment.html>


More information about the KWrite-Devel mailing list