void TeamMenu::switchToTab(int index) { if (ui->pokemonTabs->currentIndex() != index) { /* The signal/slot connection will call us again, thus we return */ ui->pokemonTabs->setCurrentIndex(index); return; } createIndexIfNeeded(index); ui->stack->setCurrentWidget(widget(index)); }
TranslationUnitUpdateResult TranslationUnitUpdater::update(UpdateMode mode) { createIndexIfNeeded(); switch (mode) { case UpdateMode::AsNeeded: recreateAndParseIfNeeded(); reparseIfNeeded(); break; case UpdateMode::ParseIfNeeded: recreateAndParseIfNeeded(); break; case UpdateMode::ForceReparse: reparse(); break; } return m_out; }