diff --git a/documentation/documentationview.h b/documentation/documentationview.h --- a/documentation/documentationview.h +++ b/documentation/documentationview.h @@ -52,9 +52,8 @@ void browseForward(); void browseBack(); - void changedSelection(); + void changedSelection(const QModelIndex& idx); void changedProvider(int); - void changeProvider(const QModelIndex &); void showHome(); private: diff --git a/documentation/documentationview.cpp b/documentation/documentationview.cpp --- a/documentation/documentationview.cpp +++ b/documentation/documentationview.cpp @@ -83,8 +83,8 @@ /* vertical size policy should be left to the style. */ mIdentifiers->setSizePolicy(QSizePolicy::Expanding, mIdentifiers->sizePolicy().verticalPolicy()); - connect(mIdentifiers, &QLineEdit::returnPressed, this, &DocumentationView::changedSelection); - connect(mIdentifiers->completer(), static_cast(&QCompleter::activated), this, &DocumentationView::changeProvider); + connect(mIdentifiers->completer(), static_cast(&QCompleter::activated), + this, &DocumentationView::changedSelection); QWidget::setTabOrder(mProviders, mIdentifiers); mActions->addWidget(mProviders); @@ -144,12 +144,7 @@ showDocumentation(prov->homePage()); } -void DocumentationView::changedSelection() -{ - changeProvider(mIdentifiers->completer()->currentIndex()); -} - -void DocumentationView::changeProvider(const QModelIndex& idx) +void DocumentationView::changedSelection(const QModelIndex& idx) { if (idx.isValid()) { IDocumentationProvider* prov = mProvidersModel->provider(mProviders->currentIndex());