X-Git-Url: http://vcs.maemo.org/git/?a=blobdiff_plain;f=searchresultsdialog.cpp;h=db0192b8fc0e4da6912b5c539cab09c76a0fcd20;hb=399cd6cba2b7a0ad3d2de29593c3143ece63aad3;hp=41c5b189a1a4b6b3640ea28832ab721a19dba7b7;hpb=d2f9a208b94aefa2ad251b5ed727f1dc698b5c7f;p=dorian diff --git a/searchresultsdialog.cpp b/searchresultsdialog.cpp index 41c5b18..db0192b 100644 --- a/searchresultsdialog.cpp +++ b/searchresultsdialog.cpp @@ -5,7 +5,6 @@ #include #include -#include "listview.h" #include "searchresultsdialog.h" #include "searchresultinfodialog.h" #include "trace.h" @@ -14,7 +13,7 @@ #include "platform.h" SearchResultsDialog::SearchResultsDialog(const QList results_, - QWidget *parent): ListWindow(parent), results(results_) + QWidget *parent): ListWindow(tr("(No results)"), parent), results(results_) { setWindowTitle(tr("Search results")); @@ -28,9 +27,8 @@ SearchResultsDialog::SearchResultsDialog(const QList results_, QStringListModel *model = new QStringListModel(data, this); setModel(model); - // FIXME - // connect(list, SIGNAL(activated(const QModelIndex &)), - // this, SLOT(onItemActivated(const QModelIndex &))); + connect(this, SIGNAL(activated(const QModelIndex &)), + this, SLOT(onItemActivated(const QModelIndex &))); Search *search = Search::instance(); connect(search, SIGNAL(beginDownload(int)), this, SLOT(onBeginDownload(int))); connect(search, @@ -91,9 +89,11 @@ void SearchResultsDialog::onEndDownload(int status, const Search::Result &result Library::instance()->add(fileName); int row = results.indexOf(result); if (-1 != row) { - list->model()->removeRow(row); + results.removeAt(row); + model()->removeRow(row); } - Platform::instance()->information(tr("Downloaded \"%1\"\nand added to the " - "library").arg(result.title), this); + Platform::instance()-> + information(tr("Downloaded \"%1\"\nand added to the " + "library").arg(result.title), this); } }