D18982: prevent assertion in regex load
David Schulz
noreply at phabricator.kde.org
Thu Feb 14 06:41:06 GMT 2019
davschul added inline comments.
INLINE COMMENTS
> dhaumann wrote in rule.cpp:579-582
> I even wonder whether this should be always printed, i.e.:
>
> const bool isValid = m_regexp.isValid();
> if (!isValid)
> qCWarning(...) << "Invalid regexp:" << m_regexp.pattern();
> }
> return isValid && !m_regexp.pattern().isEmpty();
Unconditionally running the isValid check is to expensive. At least according to the comment above the code, but I'haven't checked this statement.
REPOSITORY
R216 Syntax Highlighting
REVISION DETAIL
https://phabricator.kde.org/D18982
To: davschul, vkrause
Cc: dhaumann, kwrite-devel, kde-frameworks-devel, gennad, michaelh, ngraham, bruns, demsking, cullmann, sars
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20190214/c35a923c/attachment.html>
More information about the KWrite-Devel
mailing list