Fix formating in src/covers

This commit is contained in:
Krzysztof Sobiecki 2014-12-26 13:34:53 +01:00
parent bb554a4685
commit 0ff2e33d55
32 changed files with 208 additions and 105 deletions

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2013, Andreas <asfa194@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,6 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2013, Andreas <asfa194@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011-2012, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2010-2011, David Sansome <me@davidsansome.com>
Copyright 2010, 2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <me@davidsansome.com>
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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<float>(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<float>(image.height() - image.width()) /
std::max(image.height(), image.width());
return size_score + aspect_score;

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <me@davidsansome.com>
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,9 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2010-2013, David Sansome <me@davidsansome.com>
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2014, Andreas <asfa194@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2010-2012, David Sansome <me@davidsansome.com>
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef ALBUMCOVERLOADEROPTIONS_H
#define ALBUMCOVERLOADEROPTIONS_H
#ifndef COVERS_ALBUMCOVERLOADEROPTIONS_H_
#define COVERS_ALBUMCOVERLOADEROPTIONS_H_
#include <QImage>
@ -32,4 +34,4 @@ struct AlbumCoverLoaderOptions {
QImage default_output_image_;
};
#endif // ALBUMCOVERLOADEROPTIONS_H
#endif // COVERS_ALBUMCOVERLOADEROPTIONS_H_

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011-2012, David Sansome <me@davidsansome.com>
Copyright 2011, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2012, Arnaud Bienner <arnaud.bienner@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011-2012, David Sansome <me@davidsansome.com>
Copyright 2011, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2013, Andreas <asfa194@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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;
}

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2013, Andreas <asfa194@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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<CoverSearchResult>& results);
private:
QString name_;
};
#endif // COVERPROVIDER_H
#endif // COVERS_COVERPROVIDER_H_

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef COVERPROVIDERS_H
#define COVERPROVIDERS_H
#ifndef COVERS_COVERPROVIDERS_H_
#define COVERS_COVERPROVIDERS_H_
#include <QMap>
#include <QMutex>
@ -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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef COVERSEARCHSTATISTICS_H
#define COVERSEARCHSTATISTICS_H
#ifndef COVERS_COVERSEARCHSTATISTICS_H_
#define COVERS_COVERSEARCHSTATISTICS_H_
#include <QMap>
#include <QString>
@ -40,4 +42,4 @@ struct CoverSearchStatistics {
QString AverageDimensions() const;
};
#endif // COVERSEARCHSTATISTICS_H
#endif // COVERS_COVERSEARCHSTATISTICS_H_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef COVERSEARCHSTATISTICSDIALOG_H
#define COVERSEARCHSTATISTICSDIALOG_H
#ifndef COVERS_COVERSEARCHSTATISTICSDIALOG_H_
#define COVERS_COVERSEARCHSTATISTICSDIALOG_H_
#include <QDialog>
@ -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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2010-2012, 2014, David Sansome <me@davidsansome.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011-2012, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef CURRENTARTLOADER_H
#define CURRENTARTLOADER_H
#ifndef COVERS_CURRENTARTLOADER_H_
#define COVERS_CURRENTARTLOADER_H_
#include <memory>
@ -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_

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,7 @@
/* This file is part of Clementine.
Copyright 2012, Martin Björklund <mbj4668@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Copyright 2014, John Maguire <john.maguire@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#ifndef DISCOGSCOVERPROVIDER_H
#define DISCOGSCOVERPROVIDER_H
#ifndef COVERS_DISCOGSCOVERPROVIDER_H_
#define COVERS_DISCOGSCOVERPROVIDER_H_
#include "coverprovider.h"
#include <QVariant>
@ -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_

View File

@ -1,3 +1,23 @@
/* This file is part of Clementine.
Copyright 2010-2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2013, Arnaud Bienner <arnaud.bienner@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#include "kittenloader.h"
#include <QNetworkReply>

View File

@ -1,5 +1,24 @@
#ifndef KITTENLOADER_H
#define KITTENLOADER_H
/* This file is part of Clementine.
Copyright 2010, 2012, John Maguire <john.maguire@gmail.com>
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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<QUrl> kitten_urls_;
};
#endif
#endif // COVERS_KITTENLOADER_H_

View File

@ -1,5 +1,9 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011-2012, David Sansome <me@davidsansome.com>
Copyright 2012, Harald Sitter <sitter@kde.org>
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,8 @@
/* This file is part of Clementine.
Copyright 2010, David Sansome <me@davidsansome.com>
Copyright 2011, Paweł Bara <keirangtp@gmail.com>
Copyright 2011, David Sansome <davidsansome@gmail.com>
Copyright 2011-2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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<QNetworkReply*, int> pending_queries_;
};
#endif // LASTFMCOVERPROVIDER_H
#endif // COVERS_LASTFMCOVERPROVIDER_H_

View File

@ -1,5 +1,6 @@
/* This file is part of Clementine.
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2012, 2014, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
Clementine is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by

View File

@ -1,5 +1,6 @@
/* This file is part of Clementine.
Copyright 2012, David Sansome <me@davidsansome.com>
Copyright 2012, John Maguire <john.maguire@gmail.com>
Copyright 2014, Krzysztof Sobiecki <sobkas@gmail.com>
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 <http://www.gnu.org/licenses/>.
*/
#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<int, QString> cover_names_;
};
#endif // MUSICBRAINZCOVERPROVIDER_H
#endif // COVERS_MUSICBRAINZCOVERPROVIDER_H_