Bug 374527 - Payee error matching when importing statements
Summary: Payee error matching when importing statements
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-01-04 08:13 UTC by Alexandre
Modified: 2019-08-29 00:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.1,5.0.0


Attachments
Patch to fix payee matching (fix commit 5ecbe8f8a74fbf14fbbac06ea418731aa51d884c) (1.20 KB, patch)
2017-01-04 08:13 UTC, Alexandre
Details

Note You need to log in before you can comment on or make changes to this bug.
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