Formatting
This commit is contained in:
@@ -34,7 +34,8 @@ class DeviceLister;
|
||||
class DeviceManager;
|
||||
|
||||
CddaDevice::CddaDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, int database_id, bool first_time, QObject *parent)
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent), cdda_song_loader_(url) {
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
cdda_song_loader_(url) {
|
||||
|
||||
QObject::connect(&cdda_song_loader_, &CddaSongLoader::SongsLoaded, this, &CddaDevice::SongsLoaded);
|
||||
QObject::connect(&cdda_song_loader_, &CddaSongLoader::SongsDurationLoaded, this, &CddaDevice::SongsLoaded);
|
||||
|
||||
@@ -43,10 +43,10 @@
|
||||
#include "core/timeconstants.h"
|
||||
|
||||
CddaSongLoader::CddaSongLoader(const QUrl &url, QObject *parent)
|
||||
: QObject(parent),
|
||||
url_(url),
|
||||
cdda_(nullptr),
|
||||
cdio_(nullptr) {}
|
||||
: QObject(parent),
|
||||
url_(url),
|
||||
cdda_(nullptr),
|
||||
cdio_(nullptr) {}
|
||||
|
||||
CddaSongLoader::~CddaSongLoader() {
|
||||
if (cdio_) cdio_destroy(cdio_);
|
||||
|
||||
@@ -40,11 +40,10 @@
|
||||
|
||||
const int DeviceDatabaseBackend::kDeviceSchemaVersion = 2;
|
||||
|
||||
DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent) :
|
||||
QObject(parent),
|
||||
db_(nullptr),
|
||||
original_thread_(nullptr)
|
||||
{
|
||||
DeviceDatabaseBackend::DeviceDatabaseBackend(QObject *parent)
|
||||
: QObject(parent),
|
||||
db_(nullptr),
|
||||
original_thread_(nullptr) {
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -37,11 +37,11 @@
|
||||
|
||||
#include "core/logging.h"
|
||||
|
||||
DeviceLister::DeviceLister(QObject *parent) :
|
||||
QObject(parent),
|
||||
thread_(nullptr),
|
||||
original_thread_(nullptr),
|
||||
next_mount_request_id_(0) {
|
||||
DeviceLister::DeviceLister(QObject *parent)
|
||||
: QObject(parent),
|
||||
thread_(nullptr),
|
||||
original_thread_(nullptr),
|
||||
next_mount_request_id_(0) {
|
||||
|
||||
original_thread_ = thread();
|
||||
|
||||
|
||||
@@ -88,8 +88,8 @@ const int DeviceManager::kDeviceIconOverlaySize = 16;
|
||||
|
||||
DeviceManager::DeviceManager(Application *app, QObject *parent)
|
||||
: SimpleTreeModel<DeviceInfo>(new DeviceInfo(this), parent),
|
||||
app_(app),
|
||||
not_connected_overlay_(IconLoader::Load("edit-delete")) {
|
||||
app_(app),
|
||||
not_connected_overlay_(IconLoader::Load("edit-delete")) {
|
||||
|
||||
thread_pool_.setMaxThreadCount(1);
|
||||
QObject::connect(app_->task_manager(), &TaskManager::TasksChanged, this, &DeviceManager::TasksChanged);
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
#include "devicestatefiltermodel.h"
|
||||
|
||||
DeviceStateFilterModel::DeviceStateFilterModel(QObject *parent, DeviceManager::State state)
|
||||
: QSortFilterProxyModel(parent),
|
||||
state_(state) {
|
||||
: QSortFilterProxyModel(parent),
|
||||
state_(state) {
|
||||
|
||||
QObject::connect(this, &DeviceStateFilterModel::rowsInserted, this, &DeviceStateFilterModel::ProxyRowCountChanged);
|
||||
QObject::connect(this, &DeviceStateFilterModel::rowsRemoved, this, &DeviceStateFilterModel::ProxyRowCountChanged);
|
||||
|
||||
@@ -44,8 +44,7 @@ class DeviceLister;
|
||||
FilesystemDevice::FilesystemDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent)
|
||||
: FilesystemMusicStorage(url.toLocalFile()),
|
||||
ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
watcher_(new CollectionWatcher(Song::Source_Device)), watcher_thread_(new QThread(this))
|
||||
{
|
||||
watcher_(new CollectionWatcher(Song::Source_Device)), watcher_thread_(new QThread(this)) {
|
||||
|
||||
watcher_->moveToThread(watcher_thread_);
|
||||
watcher_thread_->start(QThread::IdlePriority);
|
||||
|
||||
@@ -52,7 +52,7 @@ class DeviceLister;
|
||||
class DeviceManager;
|
||||
|
||||
GPodDevice::GPodDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent)
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
loader_(nullptr),
|
||||
loader_thread_(nullptr),
|
||||
db_(nullptr),
|
||||
|
||||
@@ -149,4 +149,3 @@ bool MtpConnection::GetSupportedFiletypes(QList<Song::FileType> *ret) {
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -50,10 +50,10 @@ class DeviceManager;
|
||||
bool MtpDevice::sInitializedLibMTP = false;
|
||||
|
||||
MtpDevice::MtpDevice(const QUrl &url, DeviceLister *lister, const QString &unique_id, DeviceManager *manager, Application *app, const int database_id, const bool first_time, QObject *parent)
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
loader_(nullptr),
|
||||
loader_thread_(nullptr),
|
||||
closing_(false) {
|
||||
: ConnectedDevice(url, lister, unique_id, manager, app, database_id, first_time, parent),
|
||||
loader_(nullptr),
|
||||
loader_thread_(nullptr),
|
||||
closing_(false) {
|
||||
|
||||
if (!sInitializedLibMTP) {
|
||||
LIBMTP_Init();
|
||||
|
||||
Reference in New Issue
Block a user