Improvements to device manager

- Mount and unmount devices in lister thread
- Safely close watcher and backends for devices
- Enable abort loading device
- Fix MTP connection
This commit is contained in:
Jonas Kvinge
2019-09-07 23:30:35 +02:00
parent ad5e04bbcc
commit 8962644ba8
28 changed files with 411 additions and 156 deletions

View File

@@ -27,6 +27,7 @@
#include <QObject>
#include <QThread>
#include <QList>
#include <QString>
#include <QStringList>
#include <QUrl>
@@ -51,12 +52,18 @@ public:
~FilesystemDevice();
bool Init();
void CloseAsync();
static QStringList url_schemes() { return QStringList() << "file"; }
private slots:
void Close();
void ExitFinished();
private:
CollectionWatcher *watcher_;
QThread *watcher_thread_;
QList<QObject*> wait_for_exit_;
};
#endif // FILESYSTEMDEVICE_H