Fix code style and errors
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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; }
|
||||
|
||||
|
||||
@@ -37,7 +37,9 @@
|
||||
|
||||
#include "core/logging.h"
|
||||
|
||||
DeviceLister::DeviceLister() : thread_(nullptr) {}
|
||||
DeviceLister::DeviceLister() :
|
||||
thread_(nullptr),
|
||||
next_mount_request_id_(0) {}
|
||||
|
||||
DeviceLister::~DeviceLister() {
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user