[Kst] kdeextragear-2/kst
George Staikos
staikos at kde.org
Fri Apr 8 07:02:23 CEST 2005
CVS commit by staikos:
finish off the debug interface and add a testcase
A kst/extensions/js/bind_debuglog.cpp 1.1 [GPL (v2+)]
A kst/extensions/js/bind_debuglog.h 1.1 [GPL (v2+)]
A kst/extensions/js/bind_debuglogentry.cpp 1.1 [GPL (v2+)]
A kst/extensions/js/bind_debuglogentry.h 1.1 [GPL (v2+)]
A tests/script/test_debug.js 1.1
M +15 -0 kst/kstdebug.cpp 1.21
M +2 -0 kst/kstdebug.h 1.20
M +3 -1 kst/extensions/js/Makefile.am 1.24
M +2 -2 kst/extensions/js/bind_debug.cpp 1.3
--- kdeextragear-2/kst/kst/kstdebug.h #1.19:1.20
@@ -48,5 +48,7 @@ class KST_EXPORT KstDebug : public QObje
void sendEmail();
+ int logLength() const;
QValueList<LogMessage> messages() const;
+ KstDebug::LogMessage message(unsigned n) const;
QStringList dataSourcePlugins() const;
QString label(LogLevel level) const;
--- kdeextragear-2/kst/kst/kstdebug.cpp #1.20:1.21
@@ -160,4 +160,19 @@ QValueList<KstDebug::LogMessage> KstDebu
}
+
+KstDebug::LogMessage KstDebug::message(unsigned n) const {
+ QMutexLocker ml(&_lock);
+ if (_messages.size() > n) {
+ return _messages[n];
+ }
+ return KstDebug::LogMessage();
+}
+
+
+int KstDebug::logLength() const {
+ QMutexLocker ml(&_lock);
+ return _messages.size();
+}
+
#include "kstdebug.moc"
// vim: ts=2 sw=2 et
--- kdeextragear-2/kst/kst/extensions/js/Makefile.am #1.23:1.24
@@ -50,5 +50,7 @@
bind_datasourcecollection.cpp \
bind_histogram.cpp \
- bind_debug.cpp
+ bind_debug.cpp \
+ bind_debuglog.cpp \
+ bind_debuglogentry.cpp
--- kdeextragear-2/kst/kst/extensions/js/bind_debug.cpp #1.2:1.3
@@ -17,4 +17,5 @@
#include "bind_debug.h"
+#include "bind_debuglog.h"
#include <kstdebug.h>
@@ -222,6 +223,5 @@ KJS::Value KstBindDebug::clear(KJS::Exec
KJS::Value KstBindDebug::log(KJS::ExecState *exec) const {
- // FIXME
- return KJS::Null();
+ return KJS::Object(new KstBindDebugLog(exec));
}
More information about the Kst
mailing list