Bug 385178 - investprocessing.cpp:1802: condition is always false
Summary: investprocessing.cpp:1802: condition is always false
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: importer (show other bugs)
Version: 4.8.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-28 19:15 UTC by dcb314
Modified: 2019-08-31 12:00 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.8.2
ralf.habacker: Version_5-


Attachments

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