diff options
author | Arno <am@disconnect.de> | 2013-08-28 11:10:58 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-08-28 11:10:58 +0200 |
commit | 2cc92200386c55818cbe9bcb7d2e488170317d70 (patch) | |
tree | abead086c71b8821bf4f8d5a7f076875d7ba24fb /smdirwatcher.cpp | |
parent | 00084a82f08ea72bafc6c002422c8f49bdeb1742 (diff) | |
download | SheMov-2cc92200386c55818cbe9bcb7d2e488170317d70.tar.gz SheMov-2cc92200386c55818cbe9bcb7d2e488170317d70.tar.bz2 SheMov-2cc92200386c55818cbe9bcb7d2e488170317d70.zip |
Don't show progress dialog when we're polling
Diffstat (limited to 'smdirwatcher.cpp')
-rw-r--r-- | smdirwatcher.cpp | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp index 2b03179..9c4fb81 100644 --- a/smdirwatcher.cpp +++ b/smdirwatcher.cpp @@ -103,7 +103,7 @@ void SmDirWatcher::stop(){ quit(); } -SmDataColletor::SmDataColletor(const int numFields, QObject *parent) : QThread(parent), mSemFree(0), mSemUsed(0), mDataQueue(0), mNumFields(numFields), mCheckForPresent(true), mCancel(false) { +SmDataColletor::SmDataColletor(const int numFields, QObject *parent) : QThread(parent), mSemFree(0), mSemUsed(0), mDataQueue(0), mNumFields(numFields), mCheckForPresent(true), mCancel(false), mShowProgress(false) { QSqlDatabase db = QSqlDatabase::cloneDatabase(QSqlDatabase::database("treedb"), "collectordb"); db.open(); mPicPresentQ = new QSqlQuery(db); @@ -154,9 +154,13 @@ void SmDataColletor::run(){ SmTreeItem * SmDataColletor::populate(const QString &dir){ SmTreeItem *retval = new SmTreeItem(mNumFields); QDir d = QDir(dir); - emit totalFiles(d.entryInfoList().size()); + if(mShowProgress){ + emit totalFiles(d.entryInfoList().size()); + } foreach(QFileInfo fi, d.entryInfoList()){ - emit progress(); + if(mShowProgress){ + emit progress(); + } if(fi.fileName() == "."){ continue; } |