diff options
Diffstat (limited to 'src/designer/src/components/formeditor/qwizard_container.cpp')
-rw-r--r-- | src/designer/src/components/formeditor/qwizard_container.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/designer/src/components/formeditor/qwizard_container.cpp b/src/designer/src/components/formeditor/qwizard_container.cpp index dbc7084eb..5853fbf98 100644 --- a/src/designer/src/components/formeditor/qwizard_container.cpp +++ b/src/designer/src/components/formeditor/qwizard_container.cpp @@ -65,15 +65,12 @@ QWidget *QWizardContainer::widget(int index) const int QWizardContainer::currentIndex() const { - const IdList idList = m_wizard->pageIds(); - const int currentId = m_wizard->currentId(); - const int rc = idList.empty() ? -1 : idList.indexOf(currentId); - return rc; + return m_wizard->pageIds().indexOf(m_wizard->currentId()); } void QWizardContainer::setCurrentIndex(int index) { - if (index < 0 || m_wizard->pageIds().empty()) + if (index < 0 || m_wizard->pageIds().isEmpty()) return; int currentIdx = currentIndex(); |