Commit 3682529a authored by Marius Pa's avatar Marius Pa Committed by Albert Astals Cid
Browse files

transferhandler.cpp expression equivalent to 'bool(A) != bool(B)'

Fix PVS-Studio issues "core/transferhandler.cpp:163: warning:
V728 An excessive check can be simplified. The '(A && !B) || (!A && B)' expression
is equivalent to the 'bool(A) != bool(B)' expression.
core/kget.cpp:1408: warning: V581 The conditional expressions of the
'if' statements situated alongside each other are identical.
Check lines: 1386, 1408.".
parent 827824c6
Pipeline #207204 passed with stage
in 2 minutes and 18 seconds
......@@ -1403,9 +1403,7 @@ void GenericObserver::transfersChangedEvent(QMap<TransferHandler*, Transfer::Cha
connect(notification, &KNotification::closed, this, &GenericObserver::slotNotificationClosed);
}
}
}
if (transferFlags & Transfer::Tc_Status) {
checkSysTray = true;
requestSave();
}
......
......@@ -160,7 +160,7 @@ QVariant TransferHandler::data(int column)
void TransferHandler::setSelected( bool select )
{
if( (select && !isSelected()) || (!select && isSelected()) )
if (select != isSelected())
{
m_transfer->m_isSelected = select;
setTransferChange( Transfer::Tc_Selection, true );
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment