summaryrefslogtreecommitdiffstats
path: root/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
diff options
context:
space:
mode:
authorMorten Sørvig <msorvig@trolltech.com>2009-05-18 12:21:35 (GMT)
committerMorten Sørvig <msorvig@trolltech.com>2009-05-18 12:23:48 (GMT)
commit3e5abb158c1924e555dc4142c4be89adc517b8c1 (patch)
tree54577d8e36e25ff4e527339ebcb0052127c566fa /src/corelib/concurrent/qtconcurrentiteratekernel.cpp
parentd085b0bf69ab460d228c4d7b7984f94957dec853 (diff)
downloadQt-3e5abb158c1924e555dc4142c4be89adc517b8c1.zip
Qt-3e5abb158c1924e555dc4142c4be89adc517b8c1.tar.gz
Qt-3e5abb158c1924e555dc4142c4be89adc517b8c1.tar.bz2
Make QtConcurrent compile in S60.
- Use clock() on Symbian for timing. - Really don't use the STL when QT_NO_STL is defined. selectIteration decides how to iterate over the collection based on the iterator type (random access or not). Fall back to (potentially) slower forward iteration when QT_NO_STL is defined. This isn't a complete fix, the compiler still gets confused by some of the map() overloads, so QtConcurrent is still officially falls in the "Not supported" bin on S60. Revby: jbarron
Diffstat (limited to 'src/corelib/concurrent/qtconcurrentiteratekernel.cpp')
-rw-r--r--src/corelib/concurrent/qtconcurrentiteratekernel.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
index 5c20146..bfc0e82 100644
--- a/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
+++ b/src/corelib/concurrent/qtconcurrentiteratekernel.cpp
@@ -108,11 +108,17 @@ static qint64 getticks()
return 0;
return (ts.tv_sec * 1000000000) + ts.tv_nsec;
#else
+
+#ifdef Q_OS_SYMBIAN
+ return clock();
+#else
// no clock_gettime(), fall back to wall time
struct timeval tv;
gettimeofday(&tv, 0);
return (tv.tv_sec * 1000000) + tv.tv_usec;
#endif
+
+#endif
}
#elif defined(Q_OS_WIN)