Read the pretty cover setting explicitly instead of relying on LibraryView reading it first. Make the URL provider set a title on its results

This commit is contained in:
David Sansome 2012-06-10 22:08:00 +01:00
parent c163046e6f
commit fe4e214a78
2 changed files with 4 additions and 1 deletions

View File

@ -148,7 +148,9 @@ void GlobalSearchView::ReloadSettings() {
ui_->disabled_label->setVisible(any_disabled);
// Update models to use pretty covers.
const bool pretty = app_->library_model()->use_pretty_covers();
QSettings s;
s.beginGroup(LibraryView::kSettingsGroup);
const bool pretty = s.value("pretty_covers", true).toBool();
front_model_->set_use_pretty_covers(pretty);
back_model_->set_use_pretty_covers(pretty);
}

View File

@ -38,6 +38,7 @@ void UrlSearchProvider::SearchAsync(int id, const QString& query) {
Result result(this);
result.group_automatically_ = false;
result.metadata_.set_url(QUrl::fromUserInput(query));
result.metadata_.set_title(result.metadata_.url().toString());
result.metadata_.set_filetype(Song::Type_Stream);
emit ResultsAvailable(id, ResultList() << result);