Make const
This commit is contained in:
@@ -121,7 +121,7 @@ CollectionQuery::CollectionQuery(const QSqlDatabase &db, const QString &songs_ta
|
||||
|
||||
}
|
||||
|
||||
QString CollectionQuery::GetInnerQuery() {
|
||||
QString CollectionQuery::GetInnerQuery() const {
|
||||
return duplicates_only_
|
||||
? QString(" INNER JOIN (select * from duplicated_songs) dsongs "
|
||||
"ON (%songs_table.artist = dsongs.dup_artist "
|
||||
|
||||
@@ -107,7 +107,7 @@ class CollectionQuery : public QSqlQuery {
|
||||
int limit() const { return limit_; }
|
||||
|
||||
private:
|
||||
QString GetInnerQuery();
|
||||
QString GetInnerQuery() const;
|
||||
|
||||
QSqlDatabase db_;
|
||||
QString songs_table_;
|
||||
|
||||
@@ -636,7 +636,7 @@ void CollectionView::FilterReturnPressed() {
|
||||
emit doubleClicked(currentIndex());
|
||||
}
|
||||
|
||||
void CollectionView::ShowInBrowser() {
|
||||
void CollectionView::ShowInBrowser() const {
|
||||
|
||||
SongList songs = GetSelectedSongs();
|
||||
QList<QUrl> urls;
|
||||
@@ -649,13 +649,13 @@ void CollectionView::ShowInBrowser() {
|
||||
|
||||
}
|
||||
|
||||
int CollectionView::TotalSongs() {
|
||||
int CollectionView::TotalSongs() const {
|
||||
return total_song_count_;
|
||||
}
|
||||
int CollectionView::TotalArtists() {
|
||||
int CollectionView::TotalArtists() const {
|
||||
return total_artist_count_;
|
||||
}
|
||||
int CollectionView::TotalAlbums() {
|
||||
int CollectionView::TotalAlbums() const {
|
||||
return total_album_count_;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,9 +66,9 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void keyboardSearch(const QString &search) override;
|
||||
void scrollTo(const QModelIndex &idx, ScrollHint hint = EnsureVisible) override;
|
||||
|
||||
int TotalSongs();
|
||||
int TotalArtists();
|
||||
int TotalAlbums();
|
||||
int TotalSongs() const;
|
||||
int TotalArtists() const;
|
||||
int TotalAlbums() const;
|
||||
|
||||
public slots:
|
||||
void TotalSongCountUpdated(const int count);
|
||||
@@ -107,7 +107,7 @@ class CollectionView : public AutoExpandingTreeView {
|
||||
void CopyToDevice();
|
||||
void EditTracks();
|
||||
void RescanSongs();
|
||||
void ShowInBrowser();
|
||||
void ShowInBrowser() const;
|
||||
void ShowInVarious();
|
||||
void NoShowInVarious();
|
||||
void Delete();
|
||||
|
||||
@@ -46,7 +46,7 @@ CollectionViewContainer::CollectionViewContainer(QWidget *parent) : QWidget(pare
|
||||
CollectionViewContainer::~CollectionViewContainer() { delete ui_; }
|
||||
CollectionView *CollectionViewContainer::view() const { return ui_->view; }
|
||||
CollectionFilterWidget *CollectionViewContainer::filter() const { return ui_->filter; }
|
||||
void CollectionViewContainer::ReloadSettings() {
|
||||
void CollectionViewContainer::ReloadSettings() const {
|
||||
filter()->ReloadSettings();
|
||||
view()->ReloadSettings();
|
||||
}
|
||||
|
||||
@@ -41,7 +41,7 @@ class CollectionViewContainer : public QWidget {
|
||||
CollectionFilterWidget *filter() const;
|
||||
CollectionView *view() const;
|
||||
|
||||
void ReloadSettings();
|
||||
void ReloadSettings() const;
|
||||
|
||||
private:
|
||||
Ui_CollectionViewContainer *ui_;
|
||||
|
||||
Reference in New Issue
Block a user