Formatting

This commit is contained in:
Jonas Kvinge
2022-03-22 21:09:05 +01:00
parent 8cb4e75f70
commit f6b70fda71
106 changed files with 446 additions and 479 deletions

View File

@@ -211,7 +211,7 @@ QUrl AlbumCoverChoiceController::LoadCoverFromFile(Song *song) {
if (QImage(cover_file).isNull()) return QUrl();
switch(get_save_album_cover_type()) {
switch (get_save_album_cover_type()) {
case CollectionSettingsPage::SaveCoverType_Embedded:
if (song->save_embedded_cover_supported()) {
SaveCoverEmbeddedAutomatic(*song, cover_file);

View File

@@ -673,7 +673,7 @@ void AlbumCoverLoader::SaveEmbeddedCover(const quint64 id, const QList<QUrl> &ur
}
if (!file.open(QIODevice::ReadOnly)) {
qLog(Error) << "Failed to open cover file" << cover_filename << "for reading:" << file.errorString();
qLog(Error) << "Failed to open cover file" << cover_filename << "for reading:" << file.errorString();
emit SaveEmbeddedCoverAsyncFinished(id, false, false);
return;
}

View File

@@ -33,7 +33,7 @@ CoverSearchStatistics::CoverSearchStatistics()
chosen_width_(0),
chosen_height_(0) {}
CoverSearchStatistics &CoverSearchStatistics::operator +=(const CoverSearchStatistics &other) {
CoverSearchStatistics &CoverSearchStatistics::operator+=(const CoverSearchStatistics &other) {
network_requests_made_ += other.network_requests_made_;
bytes_transferred_ += other.bytes_transferred_;

View File

@@ -32,7 +32,7 @@ struct CoverSearchStatistics {
explicit CoverSearchStatistics();
CoverSearchStatistics &operator +=(const CoverSearchStatistics &other);
CoverSearchStatistics &operator+=(const CoverSearchStatistics &other);
quint64 network_requests_made_;
quint64 bytes_transferred_;

View File

@@ -383,7 +383,7 @@ void DiscogsCoverProvider::HandleReleaseReply(QNetworkReply *reply, const int se
continue;
}
QJsonObject obj_artist = value_artist.toObject();
if (!obj_artist.contains("name") ) {
if (!obj_artist.contains("name")) {
Error("Invalid Json reply, artists array value object is missing name.", obj_artist);
continue;
}

View File

@@ -111,7 +111,10 @@ void SpotifyCoverProvider::Authenticate() {
bool success = false;
forever {
server_->set_port(port);
if (server_->Listen()) { success = true; break; }
if (server_->Listen()) {
success = true;
break;
}
++port;
if (port > port_max) break;
}

View File

@@ -50,7 +50,9 @@ class TidalCoverProvider : public JsonCoverProvider {
void CancelSearch(const int id) override;
bool IsAuthenticated() const override { return service_ && service_->authenticated(); }
void Deauthenticate() override { if (service_) service_->Logout(); }
void Deauthenticate() override {
if (service_) service_->Logout();
}
private slots:
void HandleSearchReply(QNetworkReply *reply, const int id);