Code cleanup.
This commit is contained in:
@@ -45,7 +45,7 @@ ConnectedDevice::ConnectedDevice(const QUrl &url, DeviceLister *lister, const QS
|
||||
model_(nullptr),
|
||||
song_count_(0) {
|
||||
|
||||
qLog(Info) << "connected" << url << unique_id << first_time;
|
||||
qLog(Info) << "Connected" << url << unique_id << first_time;
|
||||
|
||||
// Create the backend in the database thread.
|
||||
backend_ = new CollectionBackend();
|
||||
@@ -61,6 +61,7 @@ ConnectedDevice::ConnectedDevice(const QUrl &url, DeviceLister *lister, const QS
|
||||
|
||||
// Create the model
|
||||
model_ = new CollectionModel(backend_, app_, this);
|
||||
|
||||
}
|
||||
|
||||
ConnectedDevice::~ConnectedDevice() { backend_->deleteLater(); }
|
||||
@@ -77,8 +78,7 @@ void ConnectedDevice::InitBackendDirectory(const QString &mount_point, bool firs
|
||||
// the database to fix it. This can be done entirely in sqlite so it's
|
||||
// relatively fast...
|
||||
|
||||
// Get the directory it was mounted at last time. Devices only have one
|
||||
// directory (the root).
|
||||
// Get the directory it was mounted at last time. Devices only have one directory (the root).
|
||||
Directory dir = backend_->GetAllDirectories()[0];
|
||||
if (dir.path != mount_point) {
|
||||
// The directory is different, commence the munging.
|
||||
@@ -90,6 +90,7 @@ void ConnectedDevice::InitBackendDirectory(const QString &mount_point, bool firs
|
||||
// Load the directory properly now
|
||||
backend_->LoadDirectoriesAsync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ConnectedDevice::Eject() {
|
||||
|
||||
Reference in New Issue
Block a user