D14847: Fix crash when replacing \n around empty lines

Dominik Haumann noreply at phabricator.kde.org
Tue Aug 14 17:20:21 BST 2018


dhaumann created this revision.
dhaumann added reviewers: jsalatas, ltoscano, kfunk, cullmann, anthonyfieroni, mwolff.
Herald added projects: Kate, Frameworks.
Herald added subscribers: kde-frameworks-devel, kwrite-devel.
dhaumann requested review of this revision.

REVISION SUMMARY
  The problem is that QString("").startsWith("") returns false.
  Similarly, QString("").endsWith("") also returns false.
  However, the code previously was assuming that both cases return true.
  
  This is now fixed, and verified through unit tests.
  
  BUG: 381080
  
  This deprecates patch D6473 <https://phabricator.kde.org/D6473>

TEST PLAN
  make && make test

REPOSITORY
  R39 KTextEditor

BRANCH
  fix-replace-newline-empty-lines (branched from master)

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

AFFECTED FILES
  autotests/src/searchbar_test.cpp
  autotests/src/searchbar_test.h
  src/search/kateplaintextsearch.cpp

To: dhaumann, jsalatas, ltoscano, kfunk, cullmann, anthonyfieroni, mwolff
Cc: kwrite-devel, kde-frameworks-devel, michaelh, kevinapavew, ngraham, bruns, demsking, cullmann, sars, dhaumann
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kwrite-devel/attachments/20180814/14136e89/attachment.html>


More information about the KWrite-Devel mailing list