From kde-commits Fri Aug 27 08:20:20 2010 From: =?utf-8?q?Peter=20K=C3=BCmmel?= Date: Fri, 27 Aug 2010 08:20:20 +0000 To: kde-commits Subject: branches/work/kst/portto4/kst/src/libkst Message-Id: <20100827082020.974C8AC857 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=128289709426628 SVN commit 1168709 by kuemmel: at least compile on mac M +4 -0 measuretime.cpp M +2 -2 rwlock.cpp --- branches/work/kst/portto4/kst/src/libkst/measuretime.cpp #1168708:1168709 @@ -66,10 +66,12 @@ QueryPerformanceCounter(&st); started = st.QuadPart * frequency; #else +#ifndef Q_OS_MAC timespec t; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t); started = 1.0 * t.tv_sec + 1e-9 * t.tv_nsec; #endif +#endif interval = 0; } @@ -81,10 +83,12 @@ QueryPerformanceCounter(&st); double now = st.QuadPart * frequency; #else +#ifndef Q_OS_MAC timespec t; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t); double now = 1.0 * t.tv_sec + 1e-9 * t.tv_nsec; #endif +#endif interval += now - started; started = now; } --- branches/work/kst/portto4/kst/src/libkst/rwlock.cpp #1168708:1168709 @@ -90,7 +90,7 @@ QMap::Iterator it = _readLockers.find(me); if (it != _readLockers.end() && it.value() > 0) { // cannot acquire a write lock if I already have a read lock -- ERROR - qDebug() << "Thread " << (int)QThread::currentThreadId() << " tried to write lock KstRWLock " << (void*)this << " while holding a read lock" << endl; + qDebug() << "Thread " << QThread::currentThread() << " tried to write lock KstRWLock " << (void*)this << " while holding a read lock" << endl; return; } } @@ -126,7 +126,7 @@ QMap::Iterator it = _readLockers.find(me); if (it == _readLockers.end()) { // read locked but not by me -- ERROR - qDebug() << "Thread " << (int)QThread::currentThreadId() << " tried to unlock KstRWLock " << (void*)this << " (read locked) without holding the lock" << endl; + qDebug() << "Thread " << QThread::currentThread() << " tried to unlock KstRWLock " << (void*)this << " (read locked) without holding the lock" << endl; return; } else { --_readCount;