Skip to content

Commit

Permalink
cppcheck: Fix "duplicate condition" warnings in scheduler.
Browse files Browse the repository at this point in the history
There are several places where the same if condition occurs followed
by a one line else clause. Combine these into a single braced else
clause.
  • Loading branch information
linuxdude42 committed Oct 2, 2020
1 parent 4b0c14c commit d296a7f
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions mythtv/programs/mythfrontend/scheduleeditor.cpp
Expand Up @@ -304,9 +304,6 @@ void ScheduleEditor::Load()
new MythUIButtonListItem(m_rulesList,
toDescription(kWeeklyRecord),
ENUM_TO_QVARIANT(kWeeklyRecord));
}
if (!hasChannel || isManual)
{
new MythUIButtonListItem(m_rulesList,
toDescription(kDailyRecord),
ENUM_TO_QVARIANT(kDailyRecord));
Expand Down Expand Up @@ -825,9 +822,10 @@ void ScheduleEditor::showMenu(void)
m_view != kMetadataView)
menuPopup->AddButton(tr("Metadata Options"));
if (!m_recordingRule->m_isTemplate)
{
menuPopup->AddButton(tr("Schedule Info"));
if (!m_recordingRule->m_isTemplate)
menuPopup->AddButton(tr("Preview Changes"));
}
menuPopup->AddButton(tr("Use Template"));
popupStack->AddScreen(menuPopup);
}
Expand Down Expand Up @@ -938,11 +936,11 @@ bool SchedEditChild::CreateEditChild(
if (m_saveButton)
connect(m_saveButton, SIGNAL(Clicked()), m_editor, SLOT(Save()));
if (m_previewButton)
{
connect(m_previewButton, SIGNAL(Clicked()),
m_editor, SLOT(ShowPreview()));

if (m_previewButton)
m_previewButton->SetEnabled(!isTemplate);
}

return true;
}
Expand Down

0 comments on commit d296a7f

Please sign in to comment.