diff options
author | Arno <arno@disconnect.de> | 2016-03-04 20:06:35 +0100 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-03-04 20:06:35 +0100 |
commit | dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283 (patch) | |
tree | f4a0c5979a981a140572a8abfc5baa2f81b6f041 /copyworker.h | |
parent | 8cd9d32bb11a08ff4ff8265fe9309dda1c666856 (diff) | |
download | SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.tar.gz SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.tar.bz2 SheMov-dbe1e9b2fb16ebf25dcb829e066fd9f8690d4283.zip |
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.
Diffstat (limited to 'copyworker.h')
-rw-r--r-- | copyworker.h | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/copyworker.h b/copyworker.h index fed3631..7413f49 100644 --- a/copyworker.h +++ b/copyworker.h @@ -10,16 +10,20 @@ #include <QThread> #include <QString> -#include <QStringList> +#include <QList> +#include <QPair> #include <QMutex> +#include <QVariant> 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<QString, QList<QVariant> > 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<QPair<QString, QString> > mFiles; + QHash<QString, QList<QVariant> > mData; QMutex mSourceMx; int mMax; }; |