diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 09:46:27 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-03-18 09:46:27 (GMT) |
commit | b6d03bb2658c9926f2e8ad424e3014a5db0451ec (patch) | |
tree | 0eea339c7408437aadf551cdc684aebc8cb2d450 /src/gui/dialogs | |
parent | 6dcdab8d9ee66f420a525400d873cfccf78c7003 (diff) | |
parent | e5c386c39065c640b938b33994af28a6589e4523 (diff) | |
download | Qt-b6d03bb2658c9926f2e8ad424e3014a5db0451ec.zip Qt-b6d03bb2658c9926f2e8ad424e3014a5db0451ec.tar.gz Qt-b6d03bb2658c9926f2e8ad424e3014a5db0451ec.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: (46 commits)
Build and run QElapsedTimer test.
Fix license headers.
Add flag to indicate that network sessions are expected on a platform.
Don't fail unit test when there is no default network configuration.
Make destructor virtual.
Optimized QLocale to access system locale on demand.
Remove unwanted code in f8d5f2594a9b268b9eeecf95b24b23fc940c71ce
Compile fix on keypad-navigation systems
Force qt-zlib to be used for host system when cross compiling.
qmake: fix to create proper install target in Makefile at first run
compile fix for Windows
Fixed focus handling when Qt is embedded into Cocoa app.
Do not beep on Mac when pressing some keys.
Do not deliver the same key event multiple times in Cocoa.
Implement Idle-priority threads for Linux.
Improved qt_x11_wait_for_window_manager
Doc: document QElapsedTimer
Added missing "const" for mac.
qdoc3: Fixed some ifdef typos and removed some whitespace.
Manual test for QTBUG-8933.
...
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 |