diff options
author | Thiago Macieira <thiago.macieira@nokia.com> | 2010-02-18 19:00:36 (GMT) |
---|---|---|
committer | Thiago Macieira <thiago.macieira@nokia.com> | 2010-03-17 10:54:17 (GMT) |
commit | 0f771c62f5253a969f5a8a81bfd9254b9bd58b8f (patch) | |
tree | 1f5dcfcfc84fd74f7017710478dadacc18de822c /src/gui/itemviews | |
parent | ec5b7ea367389234697a98d7243243ec689be724 (diff) | |
download | Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.zip Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.tar.gz Qt-0f771c62f5253a969f5a8a81bfd9254b9bd58b8f.tar.bz2 |
Port QtGui uses of QTime as a stopwatch to QTimestamp
Diffstat (limited to 'src/gui/itemviews')
-rw-r--r-- | src/gui/itemviews/qabstractitemview.cpp | 3 | ||||
-rw-r--r-- | src/gui/itemviews/qabstractitemview_p.h | 4 | ||||
-rw-r--r-- | src/gui/itemviews/qtreeview.cpp | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index dd9a7e6..34b5e13 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -2839,7 +2839,8 @@ void QAbstractItemView::keyboardSearch(const QString &search) QModelIndex start = currentIndex().isValid() ? currentIndex() : d->model->index(0, 0, d->root); - QTime now(QTime::currentTime()); + QTimestamp now; + now.start(); bool skipRow = false; if (search.isEmpty() || (d->keyboardInputTime.msecsTo(now) > QApplication::keyboardInputInterval())) { diff --git a/src/gui/itemviews/qabstractitemview_p.h b/src/gui/itemviews/qabstractitemview_p.h index 82fd1a6..4af98b4 100644 --- a/src/gui/itemviews/qabstractitemview_p.h +++ b/src/gui/itemviews/qabstractitemview_p.h @@ -56,7 +56,6 @@ #include "private/qabstractscrollarea_p.h" #include "private/qabstractitemmodel_p.h" #include "QtGui/qapplication.h" -#include "QtCore/qdatetime.h" #include "QtGui/qevent.h" #include "QtGui/qmime.h" #include "QtGui/qpainter.h" @@ -65,6 +64,7 @@ #include "QtCore/qdebug.h" #include "QtGui/qpainter.h" #include "QtCore/qbasictimer.h" +#include "QtCore/qtimestamp.h" #ifndef QT_NO_ITEMVIEWS @@ -390,7 +390,7 @@ public: #endif QString keyboardInput; - QTime keyboardInputTime; + QTimestamp keyboardInputTime; bool autoScroll; QBasicTimer autoScrollTimer; diff --git a/src/gui/itemviews/qtreeview.cpp b/src/gui/itemviews/qtreeview.cpp index 4135ba0..9f8c322 100644 --- a/src/gui/itemviews/qtreeview.cpp +++ b/src/gui/itemviews/qtreeview.cpp @@ -958,7 +958,8 @@ void QTreeView::keyboardSearch(const QString &search) else start = d->model->index(0, 0, d->root); - QTime now(QTime::currentTime()); + QTimestamp now; + now.start(); bool skipRow = false; if (search.isEmpty() || (d->keyboardInputTime.msecsTo(now) > QApplication::keyboardInputInterval())) { |