Explicitly cast scoped_ptrs to bool. Fixes issue 3570.

This commit is contained in:
David Sansome 2013-04-15 20:58:16 +10:00
parent 67fe9f0660
commit dac22dbd72
3 changed files with 3 additions and 3 deletions

View File

@ -2008,7 +2008,7 @@ bool Playlist::ApplyValidityOnCurrentSong(const QUrl& url, bool valid) {
}
}
return current;
return static_cast<bool>(current);
}
void Playlist::SetColumnAlignment(const ColumnAlignmentMap& alignment) {

View File

@ -184,7 +184,7 @@ class Playlist : public QAbstractListModel {
const QModelIndex current_index() const;
bool stop_after_current() const;
bool is_dynamic() const { return dynamic_playlist_; }
bool is_dynamic() const { return static_cast<bool>(dynamic_playlist_); }
int dynamic_history_length() const;
QString special_type() const { return special_type_; }

View File

@ -388,7 +388,7 @@ void NowPlayingWidget::contextMenuEvent(QContextMenuEvent* e) {
album_cover_choice_controller_->show_cover_action()->setEnabled(!art_is_not_set);
}
bask_in_his_glory_action_->setVisible(hypnotoad_);
bask_in_his_glory_action_->setVisible(static_cast<bool>(hypnotoad_));
// show the menu
menu_->popup(mapToGlobal(e->pos()));