[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Mon Apr 4 05:55:17 CEST 2005
CVS commit by staikos:
needs to be threadsafe
M +7 -0 kstdebug.cpp 1.18
M +2 -2 kstdebug.h 1.18
--- kdeextragear-2/kst/kst/kstdebug.cpp #1.17:1.18
@@ -27,4 +27,6 @@
#include <klocale.h>
+#include <qdeepcopy.h>
+
static KStaticDeleter<KstDebug> sd;
@@ -145,4 +147,9 @@ void KstDebug::sendEmail() {
+QValueList<KstDebug::LogMessage> KstDebug::messages() const {
+ QMutexLocker ml(&_lock);
+ return QDeepCopy<QValueList<LogMessage> >(_messages);
+}
+
#include "kstdebug.moc"
// vim: ts=2 sw=2 et
--- kdeextragear-2/kst/kst/kstdebug.h #1.17:1.18
@@ -48,5 +48,5 @@ class KST_EXPORT KstDebug : public QObje
void sendEmail();
- const QValueList<LogMessage>& messages() const { return _messages; }
+ QValueList<LogMessage> messages() const;
QStringList dataSourcePlugins() const;
QString label(LogLevel level) const;
@@ -68,5 +68,5 @@ class KST_EXPORT KstDebug : public QObje
bool _applyLimit;
int _limit;
- QMutex _lock;
+ mutable QMutex _lock;
#ifdef BENCHMARK
// If this is ever public we can't do this
More information about the Kst
mailing list