void MainWindow::refreshSearchResults() { Evopedia *evopedia = (static_cast<EvopediaApplication *>(qApp))->evopedia(); LocalArchive *backend = evopedia->getArchiveManager()->getLocalArchive(ui->languageChooser->currentText()); TitleIterator it; if (backend != 0) it = backend->getTitlesWithPrefix(ui->searchField->text()); titleListModel->setTitleIterator(it); }
void HarmattanEvopediaApplication::refreshSearchResults() { if (settings->getLanguageIndex() == -1) { titleListModel->setTitleIterator(TitleIterator()); return; } QString lang = settings->getLanguageList()[settings->getLanguageIndex()]; LocalArchive *backend = evopedia->getArchiveManager()->getLocalArchive(lang); if (backend == NULL) { titleListModel->setTitleIterator(TitleIterator()); return; } TitleIterator it = backend->getTitlesWithPrefix(searchPrefix); titleListModel->setTitleIterator(it); }