summaryrefslogtreecommitdiffstats
path: root/filewidget.h
diff options
context:
space:
mode:
authorArno <arno@disconnect.de>2018-06-13 09:27:59 +0200
committerArno <arno@disconnect.de>2018-06-13 09:27:59 +0200
commit10a8921bbcd9802ad2425e8cee1e5ca70fb0b241 (patch)
tree86fe45d0a7f343e2063290201603be1fc5f375e9 /filewidget.h
parenta32ed8a8ec53537a6723ece20c7d2f5c5738626b (diff)
downloadShemovCleaner-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 'filewidget.h')
-rw-r--r--filewidget.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/filewidget.h b/filewidget.h
index 850cc6f..0b11d0e 100644
--- a/filewidget.h
+++ b/filewidget.h
@@ -23,7 +23,6 @@ class FileDisplay;
class OriginDialog;
class QMenu;
class FileCopier;
-class ProgressDialog;
class CachedFileData;
class QStandardItem;
class QComboBox;
@@ -72,11 +71,7 @@ class FileWidget : public QWidget {
void paste();
void selectFirst();
void addAsOrigin();
- void setupProgress(QString file, QString dest, qint64 size);
- void setCopyProgress(qint64 bytes);
- void setCopySummary(qint64 bytes, qint64 elapsed, int total, int copying);
void copyFiles(QString destDir);
- void hideCopyProgress();
void copySuccess(bool success, QString source);
void removeFromCache();
void clearCache();
@@ -128,7 +123,7 @@ class FileWidget : public QWidget {
QAction *mRemoveFromCacheA;
QAction *mClearCacheA;
QAction *mGuessSubjectA;
- ProgressDialog *mCopyProgress;
+ QAction *mCancelCopyA;
FileDisplay *mFileDisplay;
VideoSorter *mProxy;
OriginDialog *mOrignDlg;