Formatting

This commit is contained in:
Jonas Kvinge
2021-07-11 09:49:38 +02:00
parent a6742d401c
commit e48b7d83a3
161 changed files with 370 additions and 369 deletions

View File

@@ -71,11 +71,11 @@ void AcoustidClient::Start(const int id, const QString &fingerprint, int duratio
typedef QPair<QString, QString> Param;
typedef QList<Param> ParamList;
const ParamList params = ParamList () << Param("format", "json")
<< Param("client", kClientId)
<< Param("duration", QString::number(duration_msec / kMsecPerSec))
<< Param("meta", "recordingids+sources")
<< Param("fingerprint", fingerprint);
const ParamList params = ParamList() << Param("format", "json")
<< Param("client", kClientId)
<< Param("duration", QString::number(duration_msec / kMsecPerSec))
<< Param("meta", "recordingids+sources")
<< Param("fingerprint", fingerprint);
QUrlQuery url_query;
url_query.setQueryItems(params);
@@ -113,8 +113,7 @@ void AcoustidClient::CancelAll() {
namespace {
// Struct used when extracting results in RequestFinished
struct IdSource {
IdSource(const QString &id, const int source)
: id_(id), nb_sources_(source) {}
IdSource(const QString &id, const int source) : id_(id), nb_sources_(source) {}
bool operator<(const IdSource &other) const {
// We want the items with more sources to be at the beginning of the list