diff options
author | Arno <arno@disconnect.de> | 2016-09-22 09:03:56 +0200 |
---|---|---|
committer | Arno <arno@disconnect.de> | 2016-09-22 09:03:56 +0200 |
commit | 0b0122943f57ba5d69433b6ec8f1bd502defcbea (patch) | |
tree | 4e6fb1e3487d6107a2f336bb4ac592e1f07bf1c9 | |
parent | 2e1c915cf2d9ec394c64ee0d6d7c705b06cce8cb (diff) | |
download | ShemovCleaner-0b0122943f57ba5d69433b6ec8f1bd502defcbea.tar.gz ShemovCleaner-0b0122943f57ba5d69433b6ec8f1bd502defcbea.tar.bz2 ShemovCleaner-0b0122943f57ba5d69433b6ec8f1bd502defcbea.zip |
Ask if torrentcount > 100
It'll take a long time, so give the user a chance to cancel.
-rw-r--r-- | torrentwidget.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/torrentwidget.cpp b/torrentwidget.cpp index 08c9a86..83faa1c 100644 --- a/torrentwidget.cpp +++ b/torrentwidget.cpp @@ -159,6 +159,13 @@ void TorrentWidget::gatherData(){ mProgressBar->reset(); mProgressBar->setMinimum(0); mProgressBar->setMaximum(fl.count() - 1); + if(fl.count() > 100){ + QString msg = QString(tr("<p>Looking at %1 files could take a while</p><p>Do you really want to continue</p>")).arg(QString::number(fl.count())); + int retval = QMessageBox::question(this, tr("Continue"), msg); + if(retval == QMessageBox::No){ + return; + } + } int count = 0; mFileView->setSortingEnabled(false); mModel->clear(); |