diff options
author | Arno <am@disconnect.de> | 2013-08-30 15:57:07 +0200 |
---|---|---|
committer | Arno <am@disconnect.de> | 2013-08-30 15:57:07 +0200 |
commit | 3f0a819948d36d06f1ddf07e5a51ff771ddda4da (patch) | |
tree | 0c69d4de4ff173b658f4cc514f1dcda1d19a2f9b | |
parent | 2cc92200386c55818cbe9bcb7d2e488170317d70 (diff) | |
download | SheMov-3f0a819948d36d06f1ddf07e5a51ff771ddda4da.tar.gz SheMov-3f0a819948d36d06f1ddf07e5a51ff771ddda4da.tar.bz2 SheMov-3f0a819948d36d06f1ddf07e5a51ff771ddda4da.zip |
Revert "Don't show progress dialog when we're polling"
This reverts commit 2cc92200386c55818cbe9bcb7d2e488170317d70.
Wrong, non-working solution for this problem.
-rw-r--r-- | smdirmodel.cpp | 8 | ||||
-rw-r--r-- | smdirmodel.h | 1 | ||||
-rw-r--r-- | smdirwatcher.cpp | 10 | ||||
-rw-r--r-- | smdirwatcher.h | 2 |
4 files changed, 4 insertions, 17 deletions
diff --git a/smdirmodel.cpp b/smdirmodel.cpp index fc227dd..6a7ac39 100644 --- a/smdirmodel.cpp +++ b/smdirmodel.cpp @@ -167,7 +167,7 @@ void SmDirModel::readSettings(){ interval *= 1000; mRefreshTimer->setInterval(interval); mRefreshTimer->start(); - connect(mRefreshTimer, SIGNAL(timeout()), this, SLOT(refreshFromTimer())); + connect(mRefreshTimer, SIGNAL(timeout()), this, SLOT(refresh())); } } @@ -175,12 +175,6 @@ void SmDirModel::refresh(){ setDir(mCurrentDir); } -void SmDirModel::refreshFromTimer(){ - mCollector->setShowProgress(false); - setDir(mCurrentDir); - mCollector->setShowProgress(true); -} - void SmDirModel::setCheckForPresent(bool check){ mCollector->setCheckForPresent(check); } diff --git a/smdirmodel.h b/smdirmodel.h index 9a5e55e..02ad608 100644 --- a/smdirmodel.h +++ b/smdirmodel.h @@ -46,7 +46,6 @@ class SmDirModel : public SmTreeModel { private slots: void populate(SmTreeItem *root); void addFile(const QList<QVariant> &data); - void refreshFromTimer(); signals: void needResize(); diff --git a/smdirwatcher.cpp b/smdirwatcher.cpp index 9c4fb81..2b03179 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), mShowProgress(false) { +SmDataColletor::SmDataColletor(const int numFields, QObject *parent) : QThread(parent), mSemFree(0), mSemUsed(0), mDataQueue(0), mNumFields(numFields), mCheckForPresent(true), mCancel(false) { QSqlDatabase db = QSqlDatabase::cloneDatabase(QSqlDatabase::database("treedb"), "collectordb"); db.open(); mPicPresentQ = new QSqlQuery(db); @@ -154,13 +154,9 @@ void SmDataColletor::run(){ SmTreeItem * SmDataColletor::populate(const QString &dir){ SmTreeItem *retval = new SmTreeItem(mNumFields); QDir d = QDir(dir); - if(mShowProgress){ - emit totalFiles(d.entryInfoList().size()); - } + emit totalFiles(d.entryInfoList().size()); foreach(QFileInfo fi, d.entryInfoList()){ - if(mShowProgress){ - emit progress(); - } + emit progress(); if(fi.fileName() == "."){ continue; } diff --git a/smdirwatcher.h b/smdirwatcher.h index 9afd62b..fccc1ed 100644 --- a/smdirwatcher.h +++ b/smdirwatcher.h @@ -60,7 +60,6 @@ class SmDataColletor : public QThread { void setCheckForPresent(bool present); void run(); void stop() { mCancel = true; } - void setShowProgress(bool progress) { mShowProgress = progress; } signals: void newData(const QList<QVariant>,int); @@ -81,7 +80,6 @@ class SmDataColletor : public QThread { const int mNumFields; bool mCheckForPresent; bool mCancel; - bool mShowProgress; QMutex mCheckForPresentMx; QSqlQuery *mPicPresentQ; QSqlQuery *mMovPresentQ; |