[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Wed Apr 14 02:52:41 CEST 2004
CVS commit by staikos:
don't mask bugs, crash and then generate a bt with testcase so it can be fixed.
M +29 -41 updatethread.cpp 1.11
--- kdeextragear-2/kst/kst/updatethread.cpp #1.10:1.11
@@ -18,4 +18,6 @@
#include "updatethread.h"
+#include <assert.h>
+
#include <kdebug.h>
@@ -47,10 +49,11 @@ void UpdateThread::run() {
_done = false;
- while( !_done ) {
+ while (!_done) {
_statusMutex.lock();
updateTime = _updateTime;
_statusMutex.unlock();
- if( _waitCondition.wait( _updateTime ) ) {
+ // FIXME: cannot ship this, waitcondition is broken on most(all?) unixes
+ if (_waitCondition.wait(_updateTime)) {
#if UPDATEDEBUG > 0
kdDebug() << "Update timer" << _updateTime << endl;
@@ -176,5 +179,5 @@ bool UpdateThread::doUpdates(bool force)
for (i = 0; i < pluginList.count(); ++i) {
KstPluginPtr pp = pluginList[i];
- if( pp != NULL ) {
+ assert(pp.data());
#if UPDATEDEBUG > 0
kdDebug() << "updating plugin: " << (void*)pp << " - " << pp->tagName() << endl;
@@ -190,9 +193,4 @@ bool UpdateThread::doUpdates(bool force)
return U == KstObject::UPDATE;
}
- } else {
-#if UPDATEDEBUG > 0
- kdDebug() << "updating plugin error: pp is NULL" << endl;
-#endif
- }
}
@@ -200,5 +198,5 @@ bool UpdateThread::doUpdates(bool force)
for (i = 0; i < ncl.count(); ++i) {
KstDataObjectPtr dop = ncl[i];
- if( dop != NULL ) {
+ assert(dop.data());
#if UPDATEDEBUG > 0
kdDebug() << "updating non-curve: " << (void*)dop << " - " << dop->tagName() << endl;
@@ -214,9 +212,4 @@ bool UpdateThread::doUpdates(bool force)
return U == KstObject::UPDATE;
}
- } else {
-#if UPDATEDEBUG > 0
- kdDebug() << "updating non-curve error: dop is NULL" << endl;
-#endif
- }
}
@@ -225,5 +218,5 @@ bool UpdateThread::doUpdates(bool force)
for (i = 0; i < cl.count(); ++i) {
KstBaseCurvePtr bcp = cl[i];
- if( bcp != NULL ) {
+ assert(bcp.data());
#if UPDATEDEBUG > 0
kdDebug() << "updating curve: " << (void*)bcp << " - " << bcp->tagName() << endl;
@@ -239,9 +232,4 @@ bool UpdateThread::doUpdates(bool force)
return U == KstObject::UPDATE;
}
- } else {
-#if UPDATEDEBUG > 0
- kdDebug() << "updating curve error: bcp is NULL" << endl;
-#endif
- }
}
}
More information about the Kst
mailing list