Fix code style and errors
This commit is contained in:
@@ -72,7 +72,7 @@ bool Application::kIsPortable = false;
|
||||
|
||||
class ApplicationImpl {
|
||||
public:
|
||||
ApplicationImpl(Application *app) :
|
||||
explicit ApplicationImpl(Application *app) :
|
||||
tag_reader_client_([=]() {
|
||||
TagReaderClient *client = new TagReaderClient(app);
|
||||
app->MoveToNewThread(client);
|
||||
|
||||
@@ -312,8 +312,8 @@ bool CommandlineOptions::is_empty() const {
|
||||
seek_to_ == -1 &&
|
||||
seek_by_ == 0 &&
|
||||
play_track_at_ == -1 &&
|
||||
show_osd_ == false &&
|
||||
toggle_pretty_osd_ == false &&
|
||||
!show_osd_ &&
|
||||
!toggle_pretty_osd_ &&
|
||||
urls_.isEmpty();
|
||||
}
|
||||
|
||||
|
||||
@@ -1321,7 +1321,7 @@ void MainWindow::AddToPlaylist(QAction *action) {
|
||||
}
|
||||
|
||||
SongList songs;
|
||||
for (PlaylistItemPtr item : items) {
|
||||
for (const PlaylistItemPtr &item : items) {
|
||||
songs << item->Metadata();
|
||||
}
|
||||
|
||||
@@ -1587,7 +1587,7 @@ void MainWindow::EditTracks() {
|
||||
|
||||
void MainWindow::EditTagDialogAccepted() {
|
||||
|
||||
for (PlaylistItemPtr item : edit_tag_dialog_->playlist_items()) {
|
||||
for (const PlaylistItemPtr &item : edit_tag_dialog_->playlist_items()) {
|
||||
item->Reload();
|
||||
}
|
||||
|
||||
@@ -2256,7 +2256,7 @@ void MainWindow::AutoCompleteTags() {
|
||||
|
||||
void MainWindow::AutoCompleteTagsAccepted() {
|
||||
|
||||
for (PlaylistItemPtr item : autocomplete_tag_items_) {
|
||||
for (const PlaylistItemPtr &item : autocomplete_tag_items_) {
|
||||
item->Reload();
|
||||
}
|
||||
|
||||
|
||||
@@ -81,6 +81,8 @@ const char *Player::kSettingsGroup = "Player";
|
||||
Player::Player(Application *app, QObject *parent)
|
||||
: PlayerInterface(parent),
|
||||
app_(app),
|
||||
analyzer_(nullptr),
|
||||
equalizer_(nullptr),
|
||||
stream_change_type_(Engine::First),
|
||||
last_state_(Engine::Empty),
|
||||
nb_errors_received_(0),
|
||||
|
||||
@@ -257,7 +257,7 @@ void SongLoader::LoadLocalAsync(const QString &filename) {
|
||||
cue.open(QIODevice::ReadOnly);
|
||||
|
||||
SongList song_list = cue_parser_->Load(&cue, matching_cue, QDir(filename.section('/', 0, -2)));
|
||||
for (Song song: song_list){
|
||||
for (const Song &song : song_list) {
|
||||
if (song.is_valid()) songs_ << song;
|
||||
}
|
||||
return;
|
||||
|
||||
@@ -263,7 +263,7 @@ bool RemoveRecursive(const QString &path) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!dir.rmdir(path)) return false;
|
||||
return dir.rmdir(path);
|
||||
|
||||
return true;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user