PeripheralRegisterHandler: Drop unneeded if condition

Amends 53e8f8c761

Change-Id: Ic27941cd2cb6725a7cd97f1ea5ea73bd4bc44ad0
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-07-20 18:35:08 +02:00
parent 2d8ae7bbd9
commit 91f4ee7644

View File

@@ -936,7 +936,6 @@ QMenu *PeripheralRegisterHandler::createRegisterFieldFormatMenu(
void PeripheralRegisterHandler::setActiveGroup(const QString &groupName) void PeripheralRegisterHandler::setActiveGroup(const QString &groupName)
{ {
deactivateGroups(); deactivateGroups();
if (const auto act = qobject_cast<QAction *>(sender())) {
const auto groupEnd = m_peripheralRegisterGroups.end(); const auto groupEnd = m_peripheralRegisterGroups.end();
const auto groupIt = std::find_if( const auto groupIt = std::find_if(
m_peripheralRegisterGroups.begin(), groupEnd, m_peripheralRegisterGroups.begin(), groupEnd,
@@ -959,7 +958,6 @@ void PeripheralRegisterHandler::setActiveGroup(const QString &groupName)
} }
m_engine->reloadPeripheralRegisters(); m_engine->reloadPeripheralRegisters();
}
} }
void PeripheralRegisterHandler::deactivateGroups() void PeripheralRegisterHandler::deactivateGroups()