diff options
author | Arno <arno@disconnect.de> | 2018-06-13 09:27:59 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2018-06-13 09:27:59 +0200 |
commit | 10a8921bbcd9802ad2425e8cee1e5ca70fb0b241 (patch) | |
tree | 86fe45d0a7f343e2063290201603be1fc5f375e9 /filecopier.h | |
parent | a32ed8a8ec53537a6723ece20c7d2f5c5738626b (diff) | |
download | ShemovCleaner-10a8921bbcd9802ad2425e8cee1e5ca70fb0b241.tar.gz ShemovCleaner-10a8921bbcd9802ad2425e8cee1e5ca70fb0b241.tar.bz2 ShemovCleaner-10a8921bbcd9802ad2425e8cee1e5ca70fb0b241.zip |
Speed up file copy
Hmm, as it turns out QFile does a much better, e.g. faster, job than my
open-coded file copy with a progress dialog.
I always wondered why it only did 150-170Mbit. I thought that it was
just the calculation, but now I have 400 Mbit, and it still stalls at
150 Mbit.
QFile::copy maxes out the line, so get rid of the ProgressDialog and
show a status message instead.
Copy can be canceled by the context menu, but FileCopier will always
finish the current file, because I don't want to lock and unlock the
CancelMutex during copy. Besides, QFile::copy doesn't admit that :)
Diffstat (limited to 'filecopier.h')
-rw-r--r-- | filecopier.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/filecopier.h b/filecopier.h index 6a9e37f..12aa3ac 100644 --- a/filecopier.h +++ b/filecopier.h @@ -14,10 +14,7 @@ class FileCopier : public QThread { void cancel(); signals: - void newFile(const QString &source, const QString & dest, qint64 size); - void success(bool s, QString source); - void bytesRead(qint64 bytes); - void bytesReadIntval(qint64 bytes, qint64 msecs, int total, int copied); + void message(const QString &msg); private: QHash<QString, QString> mJobs; |