summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qmacstyle_mac_p.h
diff options
context:
space:
mode:
authorChristoph Schleifenbaum <christoph.schleifenbaum@kdab.com>2012-10-08 17:39:29 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-10-15 21:59:24 +0200
commit2097b9193fb358602f7a99cd8bad7af52c93003d (patch)
tree90536e678cce0680827754e509a4558bd307b2eb /src/widgets/styles/qmacstyle_mac_p.h
parenta186d2f2ed9d8b7594ca9e0e676e3379abcf0f83 (diff)
Cocoa: Speed up fading out scroll bars.
This patch replaces QDateTime usage with msecs since epoch to calculate scroll bars opacity. This eliminates lots of QDateTime::msecsTo calls. Change-Id: Ic0c26806660c192c5fc6de0dafd86b4200e3cb4c Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/widgets/styles/qmacstyle_mac_p.h')
-rw-r--r--src/widgets/styles/qmacstyle_mac_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/widgets/styles/qmacstyle_mac_p.h b/src/widgets/styles/qmacstyle_mac_p.h
index 2c129aa49d..ac482b8fc7 100644
--- a/src/widgets/styles/qmacstyle_mac_p.h
+++ b/src/widgets/styles/qmacstyle_mac_p.h
@@ -215,18 +215,18 @@ public:
: lastValue(-1),
lastMinimum(-1),
lastMaximum(-1),
- lastUpdate(QDateTime::currentDateTime()),
+ lastUpdate(QDateTime::currentMSecsSinceEpoch()),
hovered(false),
- lastHovered(QDateTime::fromTime_t(0)),
+ lastHovered(0),
cleared(false)
{}
int lastValue;
int lastMinimum;
int lastMaximum;
QSize lastSize;
- QDateTime lastUpdate;
+ qint64 lastUpdate;
bool hovered;
- QDateTime lastHovered;
+ qint64 lastHovered;
bool cleared;
};
mutable QMap<const QWidget*, OverlayScrollBarInfo> scrollBarInfos;