Bug 374527

Summary: Payee error matching when importing statements
Product: [Applications] kmymoney Reporter: Alexandre <alexandref75>
Component: generalAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: alexandref75, ralf.habacker
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.1,5.0.0
Attachments: Patch to fix payee matching (fix commit 5ecbe8f8a74fbf14fbbac06ea418731aa51d884c)

Description Alexandre 2017-01-04 08:13:25 UTC
Created attachment 103187 [details]
Patch to fix payee matching (fix commit 5ecbe8f8a74fbf14fbbac06ea418731aa51d884c)

The current version of the commit 5ecbe8f8a74fbf14fbbac06ea418731aa51d884c does not interpret correctly the return value of the QRegExp indexIn function. The function returns the index of the first character where the string is found. The attached patch corrects that allowing the matching of the string to the payee to occur.
Comment 1 Thomas Baumgart 2017-01-04 09:36:51 UTC
Git commit bbefd9f1d042a8277925475e3286bc10539a6445 by Thomas Baumgart.
Committed on 04/01/2017 at 09:32.
Pushed by tbaumgart into branch 'master'.

Correct interpretation of return code

Since the 'no-match at all' condition of QRegExp::indexIn() also returns
a value that is 'true', the return value must be compared against -1 instead.

M  +2    -2    kmymoney/converter/mymoneystatementreader.cpp

https://commits.kde.org/kmymoney/bbefd9f1d042a8277925475e3286bc10539a6445
Comment 2 Thomas Baumgart 2017-01-25 08:46:44 UTC
Git commit 0f53af053f64c7e5f8850d87270b17b3ebc6af66 by Thomas Baumgart.
Committed on 25/01/2017 at 08:45.
Pushed by tbaumgart into branch '4.8'.

Correct interpretation of return code

Since the 'no-match at all' condition of QRegExp::indexIn() also returns
a value that is 'true', the return value must be compared against -1 instead.
(cherry picked from commit bbefd9f1d042a8277925475e3286bc10539a6445)

M  +2    -2    kmymoney/converter/mymoneystatementreader.cpp

https://commits.kde.org/kmymoney/0f53af053f64c7e5f8850d87270b17b3ebc6af66