diff --git a/src/covers/albumcoverexporter.cpp b/src/covers/albumcoverexporter.cpp index 0e283c661..0cf7c7a8d 100644 --- a/src/covers/albumcoverexporter.cpp +++ b/src/covers/albumcoverexporter.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2013, Andreas + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/albumcoverexporter.h b/src/covers/albumcoverexporter.h index 7626fd934..fff902fe2 100644 --- a/src/covers/albumcoverexporter.h +++ b/src/covers/albumcoverexporter.h @@ -1,5 +1,6 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2013, Andreas + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +16,8 @@ along with Clementine. If not, see . */ -#ifndef ALBUMCOVEREXPORTER_H -#define ALBUMCOVEREXPORTER_H +#ifndef COVERS_ALBUMCOVEREXPORTER_H_ +#define COVERS_ALBUMCOVEREXPORTER_H_ #include "coverexportrunnable.h" #include "core/song.h" @@ -32,7 +33,7 @@ class AlbumCoverExporter : public QObject { Q_OBJECT public: - AlbumCoverExporter(QObject* parent = nullptr); + explicit AlbumCoverExporter(QObject* parent = nullptr); virtual ~AlbumCoverExporter() {} static const int kMaxConcurrentRequests; @@ -44,7 +45,7 @@ class AlbumCoverExporter : public QObject { int request_count() { return requests_.size(); } -signals: + signals: void AlbumCoversExportUpdate(int exported, int skipped, int all); private slots: @@ -63,4 +64,4 @@ signals: int all_; }; -#endif // ALBUMCOVEREXPORTER_H +#endif // COVERS_ALBUMCOVEREXPORTER_H_ diff --git a/src/covers/albumcoverfetcher.cpp b/src/covers/albumcoverfetcher.cpp index 430946d7f..2ea5043a7 100644 --- a/src/covers/albumcoverfetcher.cpp +++ b/src/covers/albumcoverfetcher.cpp @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011-2012, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -83,9 +86,7 @@ void AlbumCoverFetcher::StartRequests() { return; } - while (!queued_requests_.isEmpty() && - active_requests_.size() < kMaxConcurrentRequests) { - + while (!queued_requests_.isEmpty() && active_requests_.size() < kMaxConcurrentRequests) { CoverSearchRequest request = queued_requests_.dequeue(); // search objects are this fetcher's children so worst case scenario - they diff --git a/src/covers/albumcoverfetcher.h b/src/covers/albumcoverfetcher.h index 217904bd8..75e51161c 100644 --- a/src/covers/albumcoverfetcher.h +++ b/src/covers/albumcoverfetcher.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2010-2011, David Sansome + Copyright 2010, 2012, 2014, John Maguire + Copyright 2011, Paweł Bara + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef ALBUMCOVERFETCHER_H -#define ALBUMCOVERFETCHER_H +#ifndef COVERS_ALBUMCOVERFETCHER_H_ +#define COVERS_ALBUMCOVERFETCHER_H_ #include "coversearchstatistics.h" @@ -89,7 +92,7 @@ class AlbumCoverFetcher : public QObject { void Clear(); -signals: + signals: void AlbumCoverFetched(quint64, const QImage& cover, const CoverSearchStatistics& statistics); void SearchFinished(quint64, const CoverSearchResults& results, @@ -113,4 +116,4 @@ signals: QTimer* request_starter_; }; -#endif // ALBUMCOVERFETCHER_H +#endif // COVERS_ALBUMCOVERFETCHER_H_ diff --git a/src/covers/albumcoverfetchersearch.cpp b/src/covers/albumcoverfetchersearch.cpp index b91003348..1bfdab7f8 100644 --- a/src/covers/albumcoverfetchersearch.cpp +++ b/src/covers/albumcoverfetchersearch.cpp @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2012, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -215,10 +218,10 @@ float AlbumCoverFetcherSearch::ScoreImage(const QImage& image) const { // A 500x500px image scores 1.0, bigger scores higher const float size_score = - std::sqrt(float(image.width() * image.height())) / kTargetSize; + std::sqrt(static_cast(image.width() * image.height())) / kTargetSize; // A 1:1 image scores 1.0, anything else scores less - const float aspect_score = 1.0 - float(image.height() - image.width()) / + const float aspect_score = 1.0 - static_cast(image.height() - image.width()) / std::max(image.height(), image.width()); return size_score + aspect_score; diff --git a/src/covers/albumcoverfetchersearch.h b/src/covers/albumcoverfetchersearch.h index e8b88ca30..8f79fce58 100644 --- a/src/covers/albumcoverfetchersearch.h +++ b/src/covers/albumcoverfetchersearch.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2012, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef ALBUMCOVERFETCHERSEARCH_H -#define ALBUMCOVERFETCHERSEARCH_H +#ifndef COVERS_ALBUMCOVERFETCHERSEARCH_H_ +#define COVERS_ALBUMCOVERFETCHERSEARCH_H_ #include "albumcoverfetcher.h" @@ -48,7 +51,7 @@ class AlbumCoverFetcherSearch : public QObject { CoverSearchStatistics statistics() const { return statistics_; } -signals: + signals: // It's the end of search (when there was no fetch-me-a-cover request). void SearchFinished(quint64, const CoverSearchResults& results); @@ -94,4 +97,4 @@ signals: bool cancel_requested_; }; -#endif // ALBUMCOVERFETCHERSEARCH_H +#endif // COVERS_ALBUMCOVERFETCHERSEARCH_H_ diff --git a/src/covers/albumcoverloader.cpp b/src/covers/albumcoverloader.cpp index 6b3d35b9c..8ebf51cce 100644 --- a/src/covers/albumcoverloader.cpp +++ b/src/covers/albumcoverloader.cpp @@ -1,5 +1,9 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2010-2013, David Sansome + Copyright 2010-2012, 2014, John Maguire + Copyright 2011, Paweł Bara + Copyright 2014, Andreas + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/albumcoverloader.h b/src/covers/albumcoverloader.h index c81c14d41..4d3e4d571 100644 --- a/src/covers/albumcoverloader.h +++ b/src/covers/albumcoverloader.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2010-2012, David Sansome + Copyright 2010-2012, 2014, John Maguire + Copyright 2011, Paweł Bara + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef ALBUMCOVERLOADER_H -#define ALBUMCOVERLOADER_H +#ifndef COVERS_ALBUMCOVERLOADER_H_ +#define COVERS_ALBUMCOVERLOADER_H_ #include "albumcoverloaderoptions.h" #include "core/song.h" @@ -34,7 +37,7 @@ class AlbumCoverLoader : public QObject { Q_OBJECT public: - AlbumCoverLoader(QObject* parent = nullptr); + explicit AlbumCoverLoader(QObject* parent = nullptr); void Stop() { stop_requested_ = true; } @@ -56,7 +59,7 @@ class AlbumCoverLoader : public QObject { static QImage ScaleAndPad(const AlbumCoverLoaderOptions& options, const QImage& image); -signals: + signals: void ImageLoaded(quint64 id, const QImage& image); void ImageLoaded(quint64 id, const QImage& scaled, const QImage& original); @@ -110,4 +113,4 @@ signals: static const int kMaxRedirects = 3; }; -#endif // ALBUMCOVERLOADER_H +#endif // COVERS_ALBUMCOVERLOADER_H_ diff --git a/src/covers/albumcoverloaderoptions.cpp b/src/covers/albumcoverloaderoptions.cpp index f0d8b6b1d..4dec76652 100644 --- a/src/covers/albumcoverloaderoptions.cpp +++ b/src/covers/albumcoverloaderoptions.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. Copyright 2012, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/albumcoverloaderoptions.h b/src/covers/albumcoverloaderoptions.h index 70d21a178..9bf6881b2 100644 --- a/src/covers/albumcoverloaderoptions.h +++ b/src/covers/albumcoverloaderoptions.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. Copyright 2012, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef ALBUMCOVERLOADEROPTIONS_H -#define ALBUMCOVERLOADEROPTIONS_H +#ifndef COVERS_ALBUMCOVERLOADEROPTIONS_H_ +#define COVERS_ALBUMCOVERLOADEROPTIONS_H_ #include @@ -32,4 +34,4 @@ struct AlbumCoverLoaderOptions { QImage default_output_image_; }; -#endif // ALBUMCOVERLOADEROPTIONS_H +#endif // COVERS_ALBUMCOVERLOADEROPTIONS_H_ diff --git a/src/covers/amazoncoverprovider.cpp b/src/covers/amazoncoverprovider.cpp index c861ebf9b..5dbed2e38 100644 --- a/src/covers/amazoncoverprovider.cpp +++ b/src/covers/amazoncoverprovider.cpp @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011-2012, David Sansome + Copyright 2011, 2014, John Maguire + Copyright 2012, Arnaud Bienner + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/amazoncoverprovider.h b/src/covers/amazoncoverprovider.h index fd77073ee..7044eb60b 100644 --- a/src/covers/amazoncoverprovider.h +++ b/src/covers/amazoncoverprovider.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011-2012, David Sansome + Copyright 2011, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef AMAZONCOVERPROVIDER_H -#define AMAZONCOVERPROVIDER_H +#ifndef COVERS_AMAZONCOVERPROVIDER_H_ +#define COVERS_AMAZONCOVERPROVIDER_H_ #include "coverprovider.h" @@ -28,7 +30,7 @@ class AmazonCoverProvider : public CoverProvider { Q_OBJECT public: - AmazonCoverProvider(QObject* parent = nullptr); + explicit AmazonCoverProvider(QObject* parent = nullptr); static const char* kAccessKeyB64; static const char* kSecretAccessKeyB64; @@ -48,4 +50,4 @@ class AmazonCoverProvider : public CoverProvider { QNetworkAccessManager* network_; }; -#endif // AMAZONCOVERPROVIDER_H +#endif // COVERS_AMAZONCOVERPROVIDER_H_ diff --git a/src/covers/coverexportrunnable.cpp b/src/covers/coverexportrunnable.cpp index 9b5d30d67..cc0a2002e 100644 --- a/src/covers/coverexportrunnable.cpp +++ b/src/covers/coverexportrunnable.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2013, Andreas + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -110,27 +112,22 @@ void CoverExportRunnable::ProcessAndExportCover() { (cover_path == Song::kEmbeddedCover ? "jpg" : extension); // If the file exists, do not override! - if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None && - QFile::exists(new_file)) { + if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_None && QFile::exists(new_file)) { EmitCoverSkipped(); return; } // we're handling overwrite as remove + copy so we need to delete the old file // first - if (QFile::exists(new_file) && - dialog_result_.overwrite_ != AlbumCoverExport::OverwriteMode_None) { - + if (QFile::exists(new_file) && dialog_result_.overwrite_ != AlbumCoverExport::OverwriteMode_None) { // if the mode is "overwrite smaller" then skip the cover if a bigger one // is already available in the folder if (dialog_result_.overwrite_ == AlbumCoverExport::OverwriteMode_Smaller) { QImage existing; existing.load(new_file); - if (existing.isNull() || - existing.size().height() >= cover.size().height() || + if (existing.isNull() || existing.size().height() >= cover.size().height() || existing.size().width() >= cover.size().width()) { - EmitCoverSkipped(); return; } diff --git a/src/covers/coverexportrunnable.h b/src/covers/coverexportrunnable.h index 0b929e942..7f9e3a637 100644 --- a/src/covers/coverexportrunnable.h +++ b/src/covers/coverexportrunnable.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2013, Andreas + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef COVEREXPORTRUNNABLE_H -#define COVEREXPORTRUNNABLE_H +#ifndef COVERS_COVEREXPORTRUNNABLE_H_ +#define COVERS_COVEREXPORTRUNNABLE_H_ #include "core/song.h" #include "ui/albumcoverexport.h" @@ -36,7 +38,7 @@ class CoverExportRunnable : public QObject, public QRunnable { void run(); -signals: + signals: void CoverExported(); void CoverSkipped(); @@ -53,4 +55,4 @@ signals: AlbumCoverExporter* album_cover_exporter_; }; -#endif // COVEREXPORTRUNNABLE_H +#endif // COVERS_COVEREXPORTRUNNABLE_H_ diff --git a/src/covers/coverprovider.cpp b/src/covers/coverprovider.cpp index f87bcd9af..17dd8a262 100644 --- a/src/covers/coverprovider.cpp +++ b/src/covers/coverprovider.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/coverprovider.h b/src/covers/coverprovider.h index d3aec5545..c87ad5dae 100644 --- a/src/covers/coverprovider.h +++ b/src/covers/coverprovider.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef COVERPROVIDER_H -#define COVERPROVIDER_H +#ifndef COVERS_COVERPROVIDER_H_ +#define COVERS_COVERPROVIDER_H_ #include "albumcoverfetcher.h" #include "coverproviders.h" @@ -32,7 +35,7 @@ class CoverProvider : public QObject { Q_OBJECT public: - CoverProvider(const QString& name, QObject* parent); + explicit CoverProvider(const QString& name, QObject* parent); // A name (very short description) of this provider, like "last.fm". QString name() const { return name_; } @@ -45,11 +48,11 @@ class CoverProvider : public QObject { virtual void CancelSearch(int id) {} -signals: + signals: void SearchFinished(int id, const QList& results); private: QString name_; }; -#endif // COVERPROVIDER_H +#endif // COVERS_COVERPROVIDER_H_ diff --git a/src/covers/coverproviders.cpp b/src/covers/coverproviders.cpp index 5475e0b3a..5ed320294 100644 --- a/src/covers/coverproviders.cpp +++ b/src/covers/coverproviders.cpp @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/coverproviders.h b/src/covers/coverproviders.h index 308e28a83..07bd15c5b 100644 --- a/src/covers/coverproviders.h +++ b/src/covers/coverproviders.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef COVERPROVIDERS_H -#define COVERPROVIDERS_H +#ifndef COVERS_COVERPROVIDERS_H_ +#define COVERS_COVERPROVIDERS_H_ #include #include @@ -32,7 +35,7 @@ class CoverProviders : public QObject { Q_OBJECT public: - CoverProviders(QObject* parent = nullptr); + explicit CoverProviders(QObject* parent = nullptr); // Lets a cover provider register itself in the repository. void AddProvider(CoverProvider* provider); @@ -58,4 +61,4 @@ class CoverProviders : public QObject { QAtomicInt next_id_; }; -#endif // COVERPROVIDERS_H +#endif // COVERS_COVERPROVIDERS_H_ diff --git a/src/covers/coversearchstatistics.cpp b/src/covers/coversearchstatistics.cpp index 93dbf4534..5e1555f3a 100644 --- a/src/covers/coversearchstatistics.cpp +++ b/src/covers/coversearchstatistics.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/coversearchstatistics.h b/src/covers/coversearchstatistics.h index 5e4dd58c2..fd6936f1b 100644 --- a/src/covers/coversearchstatistics.h +++ b/src/covers/coversearchstatistics.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef COVERSEARCHSTATISTICS_H -#define COVERSEARCHSTATISTICS_H +#ifndef COVERS_COVERSEARCHSTATISTICS_H_ +#define COVERS_COVERSEARCHSTATISTICS_H_ #include #include @@ -40,4 +42,4 @@ struct CoverSearchStatistics { QString AverageDimensions() const; }; -#endif // COVERSEARCHSTATISTICS_H +#endif // COVERS_COVERSEARCHSTATISTICS_H_ diff --git a/src/covers/coversearchstatisticsdialog.cpp b/src/covers/coversearchstatisticsdialog.cpp index c2d09fa26..42f657c72 100644 --- a/src/covers/coversearchstatisticsdialog.cpp +++ b/src/covers/coversearchstatisticsdialog.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/coversearchstatisticsdialog.h b/src/covers/coversearchstatisticsdialog.h index 43ec7ea16..7a4c48d04 100644 --- a/src/covers/coversearchstatisticsdialog.h +++ b/src/covers/coversearchstatisticsdialog.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef COVERSEARCHSTATISTICSDIALOG_H -#define COVERSEARCHSTATISTICSDIALOG_H +#ifndef COVERS_COVERSEARCHSTATISTICSDIALOG_H_ +#define COVERS_COVERSEARCHSTATISTICSDIALOG_H_ #include @@ -30,7 +32,7 @@ class CoverSearchStatisticsDialog : public QDialog { Q_OBJECT public: - CoverSearchStatisticsDialog(QWidget* parent = nullptr); + explicit CoverSearchStatisticsDialog(QWidget* parent = nullptr); ~CoverSearchStatisticsDialog(); void Show(const CoverSearchStatistics& statistics); @@ -44,4 +46,4 @@ class CoverSearchStatisticsDialog : public QDialog { QVBoxLayout* details_layout_; }; -#endif // COVERSEARCHSTATISTICSDIALOG_H +#endif // COVERS_COVERSEARCHSTATISTICSDIALOG_H_ diff --git a/src/covers/currentartloader.cpp b/src/covers/currentartloader.cpp index 4210c2137..796fec35f 100644 --- a/src/covers/currentartloader.cpp +++ b/src/covers/currentartloader.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2010-2012, 2014, David Sansome + Copyright 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/currentartloader.h b/src/covers/currentartloader.h index 3d4de4178..f72cbacce 100644 --- a/src/covers/currentartloader.h +++ b/src/covers/currentartloader.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011-2012, David Sansome + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef CURRENTARTLOADER_H -#define CURRENTARTLOADER_H +#ifndef COVERS_CURRENTARTLOADER_H_ +#define COVERS_CURRENTARTLOADER_H_ #include @@ -34,7 +36,7 @@ class CurrentArtLoader : public QObject { Q_OBJECT public: - CurrentArtLoader(Application* app, QObject* parent = nullptr); + explicit CurrentArtLoader(Application* app, QObject* parent = nullptr); ~CurrentArtLoader(); const AlbumCoverLoaderOptions& options() const { return options_; } @@ -43,7 +45,7 @@ class CurrentArtLoader : public QObject { public slots: void LoadArt(const Song& song); -signals: + signals: void ArtLoaded(const Song& song, const QString& uri, const QImage& image); void ThumbnailLoaded(const Song& song, const QString& uri, const QImage& image); @@ -64,4 +66,4 @@ signals: Song last_song_; }; -#endif // CURRENTARTLOADER_H +#endif // COVERS_CURRENTARTLOADER_H_ diff --git a/src/covers/discogscoverprovider.cpp b/src/covers/discogscoverprovider.cpp index 0498de3ca..b5b2e63d4 100644 --- a/src/covers/discogscoverprovider.cpp +++ b/src/covers/discogscoverprovider.cpp @@ -1,5 +1,7 @@ /* This file is part of Clementine. Copyright 2012, Martin Björklund + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/discogscoverprovider.h b/src/covers/discogscoverprovider.h index 98a53bbc9..6fb10ac96 100644 --- a/src/covers/discogscoverprovider.h +++ b/src/covers/discogscoverprovider.h @@ -1,5 +1,7 @@ /* This file is part of Clementine. Copyright 2012, Martin Björklund + Copyright 2014, Krzysztof Sobiecki + Copyright 2014, John Maguire Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +17,8 @@ along with Clementine. If not, see . */ -#ifndef DISCOGSCOVERPROVIDER_H -#define DISCOGSCOVERPROVIDER_H +#ifndef COVERS_DISCOGSCOVERPROVIDER_H_ +#define COVERS_DISCOGSCOVERPROVIDER_H_ #include "coverprovider.h" #include @@ -45,7 +47,7 @@ class DiscogsCoverProvider : public CoverProvider { Q_OBJECT public: - DiscogsCoverProvider(QObject* parent = nullptr); + explicit DiscogsCoverProvider(QObject* parent = nullptr); static const char* kSearchUrl; @@ -63,4 +65,4 @@ class DiscogsCoverProvider : public CoverProvider { void EndSearch(DiscogsCoverSearchContext* ctx); }; -#endif // DISCOGSCOVERPROVIDER_H +#endif // COVERS_DISCOGSCOVERPROVIDER_H_ diff --git a/src/covers/kittenloader.cpp b/src/covers/kittenloader.cpp index c7f746dc7..008871385 100644 --- a/src/covers/kittenloader.cpp +++ b/src/covers/kittenloader.cpp @@ -1,3 +1,23 @@ +/* This file is part of Clementine. + Copyright 2010-2012, 2014, John Maguire + Copyright 2012, David Sansome + Copyright 2013, Arnaud Bienner + Copyright 2014, Krzysztof Sobiecki + + Clementine is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Clementine is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Clementine. If not, see . +*/ + #include "kittenloader.h" #include diff --git a/src/covers/kittenloader.h b/src/covers/kittenloader.h index 94f2489d2..9cf08785e 100644 --- a/src/covers/kittenloader.h +++ b/src/covers/kittenloader.h @@ -1,5 +1,24 @@ -#ifndef KITTENLOADER_H -#define KITTENLOADER_H +/* This file is part of Clementine. + Copyright 2010, 2012, John Maguire + Copyright 2012, David Sansome + Copyright 2014, Krzysztof Sobiecki + + Clementine is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + Clementine is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with Clementine. If not, see . +*/ + +#ifndef COVERS_KITTENLOADER_H_ +#define COVERS_KITTENLOADER_H_ #include "albumcoverloader.h" @@ -11,7 +30,7 @@ class QNetworkReply; class KittenLoader : public AlbumCoverLoader { Q_OBJECT public: - KittenLoader(QObject* parent = nullptr); + explicit KittenLoader(QObject* parent = nullptr); virtual quint64 LoadKitten(const AlbumCoverLoaderOptions& options); @@ -27,4 +46,4 @@ class KittenLoader : public AlbumCoverLoader { QQueue kitten_urls_; }; -#endif +#endif // COVERS_KITTENLOADER_H_ diff --git a/src/covers/lastfmcoverprovider.cpp b/src/covers/lastfmcoverprovider.cpp index a6ffd8396..a83cc71e3 100644 --- a/src/covers/lastfmcoverprovider.cpp +++ b/src/covers/lastfmcoverprovider.cpp @@ -1,5 +1,9 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011-2012, David Sansome + Copyright 2012, Harald Sitter + Copyright 2012, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/lastfmcoverprovider.h b/src/covers/lastfmcoverprovider.h index fbf77fa59..c5b3044f8 100644 --- a/src/covers/lastfmcoverprovider.h +++ b/src/covers/lastfmcoverprovider.h @@ -1,5 +1,8 @@ /* This file is part of Clementine. - Copyright 2010, David Sansome + Copyright 2011, Paweł Bara + Copyright 2011, David Sansome + Copyright 2011-2012, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +18,8 @@ along with Clementine. If not, see . */ -#ifndef LASTFMCOVERPROVIDER_H -#define LASTFMCOVERPROVIDER_H +#ifndef COVERS_LASTFMCOVERPROVIDER_H_ +#define COVERS_LASTFMCOVERPROVIDER_H_ #include "albumcoverfetcher.h" #include "coverprovider.h" @@ -31,7 +34,7 @@ class LastFmCoverProvider : public CoverProvider { Q_OBJECT public: - LastFmCoverProvider(QObject* parent); + explicit LastFmCoverProvider(QObject* parent); bool StartSearch(const QString& artist, const QString& album, int id); @@ -42,4 +45,4 @@ class LastFmCoverProvider : public CoverProvider { QMap pending_queries_; }; -#endif // LASTFMCOVERPROVIDER_H +#endif // COVERS_LASTFMCOVERPROVIDER_H_ diff --git a/src/covers/musicbrainzcoverprovider.cpp b/src/covers/musicbrainzcoverprovider.cpp index af5ac2dc1..827bd085c 100644 --- a/src/covers/musicbrainzcoverprovider.cpp +++ b/src/covers/musicbrainzcoverprovider.cpp @@ -1,5 +1,6 @@ /* This file is part of Clementine. - Copyright 2012, David Sansome + Copyright 2012, 2014, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff --git a/src/covers/musicbrainzcoverprovider.h b/src/covers/musicbrainzcoverprovider.h index df706a533..ca75411e5 100644 --- a/src/covers/musicbrainzcoverprovider.h +++ b/src/covers/musicbrainzcoverprovider.h @@ -1,5 +1,6 @@ /* This file is part of Clementine. - Copyright 2012, David Sansome + Copyright 2012, John Maguire + Copyright 2014, Krzysztof Sobiecki Clementine is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -15,8 +16,8 @@ along with Clementine. If not, see . */ -#ifndef MUSICBRAINZCOVERPROVIDER_H -#define MUSICBRAINZCOVERPROVIDER_H +#ifndef COVERS_MUSICBRAINZCOVERPROVIDER_H_ +#define COVERS_MUSICBRAINZCOVERPROVIDER_H_ #include "coverprovider.h" @@ -28,7 +29,7 @@ class QNetworkReply; class MusicbrainzCoverProvider : public CoverProvider { Q_OBJECT public: - MusicbrainzCoverProvider(QObject* parent = nullptr); + explicit MusicbrainzCoverProvider(QObject* parent = nullptr); // CoverProvider virtual bool StartSearch(const QString& artist, const QString& album, int id); @@ -44,4 +45,4 @@ class MusicbrainzCoverProvider : public CoverProvider { QMap cover_names_; }; -#endif // MUSICBRAINZCOVERPROVIDER_H +#endif // COVERS_MUSICBRAINZCOVERPROVIDER_H_