Fix a couple of warnings found by Clang.
This commit is contained in:
parent
ed4b7abde0
commit
c680c55379
@ -80,6 +80,11 @@ const QList<Playlist*> PlaylistManager::GetAllPlaylists() const {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const QItemSelection& PlaylistManager::selection(int id) const {
|
||||||
|
QMap<int, Data>::const_iterator it = playlists_.find(id);
|
||||||
|
return it->selection;
|
||||||
|
}
|
||||||
|
|
||||||
Playlist* PlaylistManager::AddPlaylist(int id, const QString& name) {
|
Playlist* PlaylistManager::AddPlaylist(int id, const QString& name) {
|
||||||
Playlist* ret = new Playlist(playlist_backend_, task_manager_, library_backend_, id);
|
Playlist* ret = new Playlist(playlist_backend_, task_manager_, library_backend_, id);
|
||||||
ret->set_sequence(sequence_);
|
ret->set_sequence(sequence_);
|
||||||
|
@ -52,7 +52,7 @@ public:
|
|||||||
// Returns the collection of playlists managed by this PlaylistManager.
|
// Returns the collection of playlists managed by this PlaylistManager.
|
||||||
const QList<Playlist*> GetAllPlaylists() const;
|
const QList<Playlist*> GetAllPlaylists() const;
|
||||||
|
|
||||||
const QItemSelection& selection(int id) const { return playlists_[id].selection; }
|
const QItemSelection& selection(int id) const;
|
||||||
const QItemSelection& current_selection() const { return selection(current_id()); }
|
const QItemSelection& current_selection() const { return selection(current_id()); }
|
||||||
const QItemSelection& active_selection() const { return selection(active_id()); }
|
const QItemSelection& active_selection() const { return selection(active_id()); }
|
||||||
|
|
||||||
|
@ -282,7 +282,7 @@ void SettingsDialog::accept() {
|
|||||||
QSettings s;
|
QSettings s;
|
||||||
|
|
||||||
// Behaviour
|
// Behaviour
|
||||||
MainWindow::StartupBehaviour behaviour;
|
MainWindow::StartupBehaviour behaviour = MainWindow::Startup_Remember;
|
||||||
if (ui_->b_always_hide_->isChecked()) behaviour = MainWindow::Startup_AlwaysHide;
|
if (ui_->b_always_hide_->isChecked()) behaviour = MainWindow::Startup_AlwaysHide;
|
||||||
if (ui_->b_always_show_->isChecked()) behaviour = MainWindow::Startup_AlwaysShow;
|
if (ui_->b_always_show_->isChecked()) behaviour = MainWindow::Startup_AlwaysShow;
|
||||||
if (ui_->b_remember_->isChecked()) behaviour = MainWindow::Startup_Remember;
|
if (ui_->b_remember_->isChecked()) behaviour = MainWindow::Startup_Remember;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user