From dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283 Mon Sep 17 00:00:00 2001 From: Arno Date: Fri, 4 Mar 2016 20:06:35 +0100 Subject: Now MoveToUSB does something! Make it work. Lessons learned: Don't keep a QProgressDialog around. Use it and delete it later. Otherwise it will show up spontaneously. --- copyworker.h | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'copyworker.h') diff --git a/copyworker.h b/copyworker.h index fed3631..7413f49 100644 --- a/copyworker.h +++ b/copyworker.h @@ -10,16 +10,20 @@ #include #include -#include +#include +#include #include +#include class CopyWorker : public QThread { Q_OBJECT public: CopyWorker(QObject *parent = 0); - void setDestination(const QString &destDir); - void addSource(const QString &path); + void enqueue(const QString &source, const QString &destination); + void appendData(const QString &source, const QVariant &data); + const QHash > data() const { return mData; } void clear(); + qint64 max() const { return mMax; } virtual void run(); signals: @@ -27,10 +31,11 @@ class CopyWorker : public QThread { void bytesRead(int); void processint(QString); void error(QString); + void file(QString); private: - QStringList mSources; - QString mDest; + QList > mFiles; + QHash > mData; QMutex mSourceMx; int mMax; }; -- cgit v1.2.3-70-g09d2