D18638: Avoid using trimmed method

2019-01-31 Thread Laurent Montel
mlaurent added a reviewer: dfaure. REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D18638 To: mlaurent, dfaure Cc: kde-frameworks-devel, michaelh, ngraham, bruns

D18638: Avoid using trimmed method

2019-01-31 Thread Laurent Montel
mlaurent created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. mlaurent requested review of this revision. REVISION SUMMARY We don't want to use trimmed() but we want to avoid to call sonnet code for empty text REPOSITORY R246 Sonnet BRA

D18638: Avoid using trimmed method

2019-02-02 Thread David Faure
dfaure accepted this revision. dfaure added a comment. This revision is now accepted and ready to land. A better name would be "hasOnlySpaces" (with the opposite return value), but OK. REPOSITORY R246 Sonnet BRANCH remove_using_trimmed (branched from master) REVISION DETAIL https://ph

D18638: Avoid using trimmed method

2019-02-02 Thread Laurent Montel
This revision was automatically updated to reflect the committed changes. Closed by commit R246:ef9c9253e5b4: Avoid using trimmed method (authored by mlaurent). REPOSITORY R246 Sonnet CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D18638?vs=50631&id=50710 REVISION DETAIL https://ph

D18638: Avoid using trimmed method

2019-02-02 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > highlighter.cpp:299 > > +static bool hasNotEmptyText(const QString &text) > +{ how about hasSpaces? REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D18638 To: mlaurent, dfaure Cc: apol, kde-frameworks-devel, michaelh, ngra

D18638: Avoid using trimmed method

2019-02-04 Thread Stefan BrĂ¼ns
bruns added inline comments. INLINE COMMENTS > highlighter.cpp:311 > { > -if (text.trimmed().isEmpty() || !d->active || !d->spellCheckerFound) { > +if (!hasNotEmptyText(text) || !d->active || !d->spellCheckerFound) { > return; if (std::all_of(text.cbegin(), text.cend(), [