Fix code style and errors

This commit is contained in:
Jonas Kvinge
2019-04-08 18:46:11 +02:00
parent 0ce5b50950
commit 9be161d165
58 changed files with 146 additions and 146 deletions

View File

@@ -197,7 +197,7 @@ void CddaSongLoader::AudioCDTagsLoaded(const QString &artist, const QString &alb
MusicBrainzClient *musicbrainz_client = qobject_cast<MusicBrainzClient*>(sender());
musicbrainz_client->deleteLater();
SongList songs;
if (results.size() == 0) return;
if (results.empty()) return;
int track_number = 1;
for (const MusicBrainzClient::Result &ret : results) {
Song song;

View File

@@ -36,8 +36,10 @@
const int DeviceDatabaseBackend::kDeviceSchemaVersion = 0;
DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent)
: QObject(parent) {}
DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent) :
QObject(parent),
db_(nullptr)
{}
void DeviceDatabaseBackend::Init(Database* db) { db_ = db; }

View File

@@ -37,7 +37,9 @@
#include "core/logging.h"
DeviceLister::DeviceLister() : thread_(nullptr) {}
DeviceLister::DeviceLister() :
thread_(nullptr),
next_mount_request_id_(0) {}
DeviceLister::~DeviceLister() {

View File

@@ -686,7 +686,7 @@ void DeviceManager::Forget(QModelIndex idx) {
backend_->RemoveDevice(info->database_id_);
info->database_id_ = -1;
if (!info->BestBackend() || (info->BestBackend() && !info->BestBackend()->lister_)) { // It's not attached any more so remove it from the list
if (!info->BestBackend() || !info->BestBackend()->lister_) { // It's not attached any more so remove it from the list
beginRemoveRows(ItemToIndex(root_), idx.row(), idx.row());
devices_.removeAll(info);
root_->Delete(info->row);

View File

@@ -36,7 +36,8 @@ MtpLoader::MtpLoader(const QUrl &url, TaskManager *task_manager, CollectionBacke
device_(device),
url_(url),
task_manager_(task_manager),
backend_(backend) {
backend_(backend),
connection_(nullptr) {
original_thread_ = thread();
}