mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-27 02:55:44 +08:00
Fix cppcheck warnings
This commit is contained in:
@@ -98,7 +98,6 @@ namespace BlackGui::Components
|
||||
else
|
||||
{
|
||||
qFatal("Wrong sender");
|
||||
// cppcheck-suppress duplicateBreak
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -62,7 +62,7 @@ namespace BlackGui
|
||||
if (processEvents && sGui)
|
||||
{
|
||||
sGui->processEventsToRefreshGui();
|
||||
if (!myself) { return -1; } // deleted in meantime (process events)
|
||||
if (!myself) { return -1; } // cppcheck-suppress knownConditionTrueFalse // deleted in meantime (process events)
|
||||
}
|
||||
|
||||
const int stopId = m_currentId++; // copy
|
||||
|
||||
@@ -534,7 +534,11 @@ namespace BlackGui::Menus
|
||||
}
|
||||
Q_ASSERT_X(subMenu, Q_FUNC_INFO, "Could not create sub menu");
|
||||
|
||||
subMenu->setParent(parentMenu);
|
||||
if (subMenu)
|
||||
{
|
||||
subMenu->setParent(parentMenu);
|
||||
}
|
||||
|
||||
if (pathDepth > 0 && subMenu)
|
||||
{
|
||||
subMenus.insert(key, subMenu);
|
||||
|
||||
@@ -75,7 +75,7 @@ namespace BlackGui::Views
|
||||
const int c = m_model->update(container, sort);
|
||||
|
||||
// resize after real update according to mode
|
||||
if (presizeThresholdReached)
|
||||
if (presizeThresholdReached) // cppcheck-suppress knownConditionTrueFalse
|
||||
{
|
||||
// currently no furhter actions
|
||||
}
|
||||
@@ -83,7 +83,7 @@ namespace BlackGui::Views
|
||||
{
|
||||
this->resizeToContents(); // mode based resize
|
||||
}
|
||||
else if (presize && !presizeThresholdReached)
|
||||
else if (presize && !presizeThresholdReached) // cppcheck-suppress knownConditionTrueFalse
|
||||
{
|
||||
// small amount of data not covered before
|
||||
this->fullResizeToContents();
|
||||
|
||||
Reference in New Issue
Block a user