forked from qt-creator/qt-creator
Add QTC_GUARD
Similar to QTC_CHECK, but has the boolean result of the condition as
value. Use it in the form
if (QTC_GUARD(condition)) { ... }
Replace some occurrences of
QTC_CHECK(condition)
if (condition) { .... }
Change-Id: I8eea02f869eb7a183dfbf4810dace48097880519
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -222,8 +222,7 @@ HelpWidget::HelpWidget(const Core::Context &context, WidgetStyle style, QWidget
|
||||
connect(m_copy, &QAction::triggered, this, &HelpWidget::copy);
|
||||
|
||||
Core::ActionContainer *advancedMenu = Core::ActionManager::actionContainer(Core::Constants::M_EDIT_ADVANCED);
|
||||
QTC_CHECK(advancedMenu);
|
||||
if (advancedMenu) {
|
||||
if (QTC_GUARD(advancedMenu)) {
|
||||
// reuse TextEditor constants to avoid a second pair of menu actions
|
||||
m_scaleUp = new QAction(tr("Increase Font Size"), this);
|
||||
cmd = Core::ActionManager::registerAction(m_scaleUp, TextEditor::Constants::INCREASE_FONT_SIZE,
|
||||
|
||||
Reference in New Issue
Block a user