diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-19 12:45:06 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-19 12:45:06 (GMT) |
commit | b1c9df1e46f38e9bedef95647721c77a2bb69386 (patch) | |
tree | 931f4cba3af8ec86d4e1315987797c1fd6b6f876 /src/gui/dialogs | |
parent | 78b2e9421c47371b68f4c65a181a077ba3a226ac (diff) | |
parent | 78e4d861b6aa9e1b9ea71f2c4cabbeb6555a2ee0 (diff) | |
download | Qt-b1c9df1e46f38e9bedef95647721c77a2bb69386.zip Qt-b1c9df1e46f38e9bedef95647721c77a2bb69386.tar.gz Qt-b1c9df1e46f38e9bedef95647721c77a2bb69386.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1: (63 commits)
Revert "Don't emit open signal on session close/error."
Rename networkAccess property to networkAccessible.
Don't emit open signal on session close/error.
Rename private signal.
Autotest: fix instability by accepting rounding errors
Dont force height for filter widget
- Fix importdir option on unix/linux configure
Remove incorrect semi-colons after Q_PROPERTY
10n: Update German translation for 4.7.0
Redesigned filter widgets
Add a test case for commit 76d767080a6be7b025f36d6778dfaedbd31a9f07
Add Japanese/Korean keyboard specific keys to QKeySequence
Fixed qmdiarea autotest regression on Cocoa
Fix JSC export macros
Minor update for f3f979cbd37f47892cd0c0a9fc23b802ed6f7890
Incorrect translation for Application menu items in Mac.
doc: Fixed use of Qt 3 support function in QIcon doc snippet
Build and run QElapsedTimer test.
Fix license headers.
Add flag to indicate that network sessions are expected on a platform.
...
Diffstat (limited to 'src/gui/dialogs')
-rw-r--r-- | src/gui/dialogs/qfileinfogatherer.cpp | 8 | ||||
-rw-r--r-- | src/gui/dialogs/qfileinfogatherer_p.h | 5 | ||||
-rw-r--r-- | src/gui/dialogs/qprogressdialog.cpp | 4 |
3 files changed, 10 insertions, 7 deletions
diff --git a/src/gui/dialogs/qfileinfogatherer.cpp b/src/gui/dialogs/qfileinfogatherer.cpp index 3b08bf6..3b279ae 100644 --- a/src/gui/dialogs/qfileinfogatherer.cpp +++ b/src/gui/dialogs/qfileinfogatherer.cpp @@ -297,7 +297,8 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil return; } - QTime base = QTime::currentTime(); + QElapsedTimer base; + base.start(); QFileInfo fileInfo; bool firstTime = true; QList<QPair<QString, QFileInfo> > updatedFiles; @@ -326,9 +327,10 @@ void QFileInfoGatherer::getFileInfos(const QString &path, const QStringList &fil emit directoryLoaded(path); } -void QFileInfoGatherer::fetch(const QFileInfo &fileInfo, QTime &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path) { +void QFileInfoGatherer::fetch(const QFileInfo &fileInfo, QElapsedTimer &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path) { updatedFiles.append(QPair<QString, QFileInfo>(fileInfo.fileName(), fileInfo)); - QTime current = QTime::currentTime(); + QElapsedTimer current; + current.start(); if ((firstTime && updatedFiles.count() > 100) || base.msecsTo(current) > 1000) { emit updates(path, updatedFiles); updatedFiles.clear(); diff --git a/src/gui/dialogs/qfileinfogatherer_p.h b/src/gui/dialogs/qfileinfogatherer_p.h index eff6b3c..5abcd94 100644 --- a/src/gui/dialogs/qfileinfogatherer_p.h +++ b/src/gui/dialogs/qfileinfogatherer_p.h @@ -60,9 +60,10 @@ #include <qfileiconprovider.h> #include <qfsfileengine.h> #include <qpair.h> -#include <qdatetime.h> #include <qstack.h> +#include <qdatetime.h> #include <qdir.h> +#include <qelapsedtimer.h> QT_BEGIN_NAMESPACE @@ -174,7 +175,7 @@ protected: void getFileInfos(const QString &path, const QStringList &files); private: - void fetch(const QFileInfo &info, QTime &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path); + void fetch(const QFileInfo &info, QElapsedTimer &base, bool &firstTime, QList<QPair<QString, QFileInfo> > &updatedFiles, const QString &path); QString translateDriveName(const QFileInfo &drive) const; QMutex mutex; diff --git a/src/gui/dialogs/qprogressdialog.cpp b/src/gui/dialogs/qprogressdialog.cpp index 4fffdba..a2d7b23 100644 --- a/src/gui/dialogs/qprogressdialog.cpp +++ b/src/gui/dialogs/qprogressdialog.cpp @@ -46,7 +46,6 @@ #include "qshortcut.h" #include "qpainter.h" #include "qdrawutil.h" -#include "qdatetime.h" #include "qlabel.h" #include "qprogressbar.h" #include "qapplication.h" @@ -54,6 +53,7 @@ #include "qpushbutton.h" #include "qcursor.h" #include "qtimer.h" +#include "qelapsedtimer.h" #include <private/qdialog_p.h> #include <limits.h> @@ -103,7 +103,7 @@ public: QTimer *forceTimer; bool shown_once; bool cancellation_flag; - QTime starttime; + QElapsedTimer starttime; #ifndef QT_NO_CURSOR QCursor parentCursor; #endif |