D18638: Avoid using trimmed method
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(), [](QString::const_iterator it) { return it->isSpace(); }) { return; } REPOSITORY R246 Sonnet REVISION DETAIL https://phabricator.kde.org/D18638 To: mlaurent, dfaure Cc: bruns, apol, kde-frameworks-devel, michaelh, ngraham
D18638: Avoid using trimmed method
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, ngraham, bruns
D18638: Avoid using trimmed method
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://phabricator.kde.org/D18638 AFFECTED FILES src/ui/highlighter.cpp To: mlaurent, dfaure Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D18638: Avoid using trimmed method
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://phabricator.kde.org/D18638 To: mlaurent, dfaure Cc: kde-frameworks-devel, michaelh, ngraham, bruns
D18638: Avoid using trimmed method
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
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 BRANCH remove_using_trimmed (branched from master) REVISION DETAIL https://phabricator.kde.org/D18638 AFFECTED FILES src/ui/highlighter.cpp To: mlaurent Cc: kde-frameworks-devel, michaelh, ngraham, bruns