Fix a couple of warnings found by Clang.

This commit is contained in:
John Maguire 2011-02-04 11:17:31 +00:00
parent ed4b7abde0
commit c680c55379
3 changed files with 7 additions and 2 deletions

View File

@ -80,6 +80,11 @@ const QList<Playlist*> PlaylistManager::GetAllPlaylists() const {
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* ret = new Playlist(playlist_backend_, task_manager_, library_backend_, id);
ret->set_sequence(sequence_);

View File

@ -52,7 +52,7 @@ public:
// Returns the collection of playlists managed by this PlaylistManager.
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& active_selection() const { return selection(active_id()); }

View File

@ -282,7 +282,7 @@ void SettingsDialog::accept() {
QSettings s;
// Behaviour
MainWindow::StartupBehaviour behaviour;
MainWindow::StartupBehaviour behaviour = MainWindow::Startup_Remember;
if (ui_->b_always_hide_->isChecked()) behaviour = MainWindow::Startup_AlwaysHide;
if (ui_->b_always_show_->isChecked()) behaviour = MainWindow::Startup_AlwaysShow;
if (ui_->b_remember_->isChecked()) behaviour = MainWindow::Startup_Remember;