[webkit-qt] Inline Spell Checking Completish ...

Dawit A adawit at kde.org
Tue Jul 19 23:35:09 PDT 2011


On Mon, Jul 18, 2011 at 10:48 PM, Lindsay Mathieson
<lindsay.mathieson at gmail.com> wrote:
> Ok, I believe its ready for review - what do I do now? my git clone is here:
>
>  https://gitorious.org/~blackpaw/webkit/webkit-qt-inline-spell
>
> Note: I actually modified the QtTestBrowser project so it defined its
> own static platform plugin implementation using sonnet from KDE for
> testing purposes.
>
>
> Defined a new Platform Plugin Class below:

> class QWEBKIT_EXPORT QWebSpellChecker : public QObject {
>    Q_OBJECT
>
> public:
>    virtual bool isInlineSpellCheckingEnabled() const = 0;
>    virtual void checkSpellingOfString(const uchar *word, int length,
> int* misspellingLocation, int* misspellingLength) = 0;
>    virtual QString getAutoCorrectSuggestionForMisspelledWord(const
> QString&) = 0;
> };

#1. None of the other plugin extensions export their interface so why
do it for QWebSpellChecker ?
#2. Shouldn't the API be as complete as possible by mirroring the
spell checking related functions present in TextClientChecker.h ?
Perhaps something like

class QWebSpellChecker : public QObject {
    Q_OBJECT
public:
    virtual bool isUIShown() const = 0;
    virtual bool isInlineSpellCheckingEnabled() const = 0;
    virtual void learnWord(const QString&) = 0;
    virtual void ignoreWord(const QString&) = 0;
    virtual void checkSpellingOfString(const QString& word, int*, int*) = 0;
    virtual QString autoCorrectSuggestionForMisspelledWord(const QString&) = 0;
    virtual void setShowUI(bool) = 0;
    virtual void setUpdateUIWithMisspelledWord(const QString&) = 0;
};

That way, even if all of those functions might not be implemented
internally in QtWebKit initially, they might get there eventually.
Hope someone from the QtWebKit team offers some input on this
discussion.

Regards,
Dawit A.


More information about the webkit-qt mailing list