summaryrefslogtreecommitdiffstats
path: root/shemovcleaner.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shemovcleaner.cpp')
-rw-r--r--shemovcleaner.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/shemovcleaner.cpp b/shemovcleaner.cpp
index 634eaf4..32b9d01 100644
--- a/shemovcleaner.cpp
+++ b/shemovcleaner.cpp
@@ -38,7 +38,6 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p
splash.show();
qApp->processEvents();
openDatabase();
- createStatusBar();
createGlobalActions();
splash.showMessage(tr("Reading torrents..."), Qt::AlignHCenter, Qt::darkGreen);
@@ -56,6 +55,7 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p
qApp->processEvents();
mTab->addTab(mTorrentTab, tr("&Torrents"));
mTab->addTab(mFileTab, tr("Fi&les"));
+ createStatusBar();
setCentralWidget(mTab);
connect(mTorrentTab, &TorrentWidget::statusMessage, this, &ShemovCleaner::statusBarMessage);
@@ -68,10 +68,10 @@ ShemovCleaner::ShemovCleaner(QWidget *parent, Qt::WindowFlags f) : QMainWindow(p
connect(mTab, &QTabWidget::currentChanged, this, &ShemovCleaner::tabChanged);
connect(this, &ShemovCleaner::configurationChanged, mFileTab, &FileWidget::readSettings);
connect(mFileTab->fileCopier(), &FileCopier::copying, this, &ShemovCleaner::updateCopying);
- connect(mFileTab->fileCopier(), &FileCopier::finished, [=] { updateCopying(false, QString());} );
+ connect(mFileTab->fileCopier(), &FileCopier::finished, [=] { updateCopying(QString());} );
connect(mFileTab->fileCopier(), &FileCopier::finished, mFileTab, &FileWidget::gatherData);
mCopying->installEventFilter(this);
- updateCopying(false, QString());
+ updateCopying(QString());
QMenu *helpMenu = new QMenu(tr("&Help"));
QAction *aboutThisA = new QAction(tr("About ShemovCleaner..."), this);
@@ -134,9 +134,9 @@ void ShemovCleaner::updateFreeSpace(const QString &path){
mFree->setPixmap(QPixmap::fromImage(img));
}
-void ShemovCleaner::updateCopying(bool inProgress, const QString &count){
+void ShemovCleaner::updateCopying(const QString &count){
QImage img(mCopying->size(), QImage::Format_ARGB32);
- if(inProgress){
+ if(mFileTab->fileCopier()->isRunning()){
img.fill(Qt::red);
QPainter p(&img);
QFont f(qApp->font());
@@ -236,7 +236,7 @@ void ShemovCleaner::createStatusBar(){
statusBar()->addPermanentWidget(mDuration);
statusBar()->addPermanentWidget(mDrive);
statusBar()->addPermanentWidget(mFree);
- updateCopying(false, QString());
+ updateCopying(QString());
}
void ShemovCleaner::createGlobalActions(){