[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/work/kst/portto4/kst/src/libkst
From:       Peter Kümmel <syntheticpp () gmx ! net>
Date:       2010-08-27 8:20:20
Message-ID: 20100827082020.974C8AC857 () svn ! kde ! org
[Download RAW message or body]

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<Qt::HANDLE, int>::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<Qt::HANDLE, int>::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;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic