Bug 385178

Summary: investprocessing.cpp:1802: condition is always false
Product: [Applications] kmymoney Reporter: dcb314
Component: importerAssignee: KMyMoney Devel Mailing List <kmymoney-devel>
Status: RESOLVED FIXED    
Severity: normal CC: ralf.habacker
Priority: NOR Flags: ralf.habacker: Version_5-
Version: 4.8.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 4.8.2

Description dcb314 2017-09-28 19:15:08 UTC
investprocessing.cpp:1802]: (style) Expression is always false because 'else if' condition matches previous condition at line 1800.

Source code is

  if (m_securityName.isEmpty()) {
    m_securityName = m_csvDialog->m_symbolTableDlg->m_securityName;
  } else if (m_securityName.isEmpty()) {
    m_securityName = m_trInvestData.security;
  }
Comment 1 Thomas Baumgart 2017-09-28 19:47:36 UTC
In master this code has completely been replaced. The problem only exists in the 4.8 branch of the code.
Comment 2 dcb314 2017-09-28 20:01:35 UTC
Version 4.8.1 shipped today, so AFAIK it's a live problem.
Comment 3 Ralf Habacker 2018-05-09 22:48:28 UTC
Git commit 984cb5aecb699cae7f642d3f7608c2f8c226b22d by Ralf Habacker.
Committed on 09/05/2018 at 22:48.
Pushed by habacker into branch '4.8'.

Fix 'investprocessing.cpp:1802: condition is always false'

Remove 'else' to give the condition a sense.
FIXED-IN:4.8.2

M  +3    -1    kmymoney/plugins/csvimport/investprocessing.cpp

https://commits.kde.org/kmymoney/984cb5aecb699cae7f642d3f7608c2f8c226b22d
Comment 4 Ralf Habacker 2019-08-31 12:00:38 UTC
I can't find the corresponding position in the Kf5 code, because a comprehensive refactoring was carried out there.