Change bool/int condition
This commit is contained in:
@@ -335,11 +335,11 @@ void InternetCollectionView::contextMenuEvent(QContextMenuEvent *e) {
|
||||
int songs_selected = selected_indexes.count();;
|
||||
|
||||
// In all modes
|
||||
load_->setEnabled(songs_selected);
|
||||
add_to_playlist_->setEnabled(songs_selected);
|
||||
open_in_new_playlist_->setEnabled(songs_selected);
|
||||
add_to_playlist_enqueue_->setEnabled(songs_selected);
|
||||
if (remove_songs_) remove_songs_->setEnabled(songs_selected);
|
||||
load_->setEnabled(songs_selected > 0);
|
||||
add_to_playlist_->setEnabled(songs_selected > 0);
|
||||
open_in_new_playlist_->setEnabled(songs_selected > 0);
|
||||
add_to_playlist_enqueue_->setEnabled(songs_selected > 0);
|
||||
if (remove_songs_) remove_songs_->setEnabled(songs_selected > 0);
|
||||
|
||||
context_menu_->popup(e->globalPos());
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ void InternetSearchModel::GetChildResults(const QStandardItem *item, InternetSea
|
||||
visited->insert(item);
|
||||
|
||||
// Does this item have children?
|
||||
if (item->rowCount()) {
|
||||
if (item->rowCount() > 0) {
|
||||
const QModelIndex parent_proxy_index = proxy_->mapFromSource(item->index());
|
||||
|
||||
// Yes - visit all the children, but do so through the proxy so we get them in the right order.
|
||||
|
||||
@@ -832,7 +832,7 @@ void InternetSearchView::LazyLoadAlbumCover(const QModelIndex &proxy_index) {
|
||||
|
||||
// Walk down the item's children until we find a track
|
||||
QStandardItem *item_song = item_album;
|
||||
while (item_song->rowCount()) {
|
||||
while (item_song->rowCount() > 0) {
|
||||
item_song = item_song->child(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user