Bug 385180 - investactivities.cpp: 8 * Redundant condition
Summary: investactivities.cpp: 8 * Redundant condition
Status: RESOLVED FIXED
Alias: None
Product: kmymoney
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR minor
Target Milestone: ---
Assignee: KMyMoney Devel Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-28 20:12 UTC by dcb314
Modified: 2018-10-14 10:36 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 5.0.2


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description dcb314 2017-09-28 20:12:39 UTC
[investactivities.cpp:111]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:135]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:263]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:269]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:349]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:355]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:498]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'
[investactivities.cpp:504]: (style) Redundant condition: isMultiSelection(). '!A
 || (A && B)' is equivalent to '!A || B'

First one is

  if (!isMultiSelection() || (isMultiSelection() && !cat->currentText().isEmpty())) {
Comment 1 Thomas Baumgart 2018-10-14 10:33:42 UTC
Apparently, the automatic bug close did not work here. So I close it manually.
Comment 2 Thomas Baumgart 2018-10-14 10:35:50 UTC
(In reply to Thomas Baumgart from comment #1)
> Apparently, the automatic bug close did not work here. So I close it
> manually.

No, I just noticed, that I still need to push it. Shame on me.
Comment 3 Thomas Baumgart 2018-10-14 10:36:11 UTC
Git commit e53ee0804bc71d309e955ce39141c8adf8e22d5f by Thomas Baumgart.
Committed on 13/10/2018 at 16:34.
Pushed by tbaumgart into branch '5.0'.

Simplify logical expressions in source code
FIXED-IN: 5.0.2

M  +8    -8    kmymoney/dialogs/investactivities.cpp

https://commits.kde.org/kmymoney/e53ee0804bc71d309e955ce39141c8adf8e22d5f