[Kst] branches/work/kst/hierarchy/kst/src/libkst
Eli Fidler
eli at staikos.net
Fri Jan 5 23:39:31 CET 2007
SVN commit 620403 by fidler:
clean up metadata strings, fix metadata tags when datasource tag changes
M +16 -0 kstdatasource.cpp
--- branches/work/kst/hierarchy/kst/src/libkst/kstdatasource.cpp #620402:620403
@@ -433,9 +433,20 @@
KstDataSource::~KstDataSource() {
+// kstdDebug() << "KstDataSource destructor: " << tag().tagString() << endl;
KST::scalarList.lock().writeLock();
+// kstdDebug() << " removing numFrames scalar" << endl;
KST::scalarList.remove(_numFramesScalar);
KST::scalarList.lock().unlock();
+
+// kstdDebug() << " removing metadata strings" << endl;
+ KST::stringList.lock().writeLock();
+ for (QDictIterator<KstString> it(_metaData); it.current(); ++it) {
+// kstdDebug() << " removing " << it.current()->tag().tagString() << endl;
+ KST::stringList.remove(it.current());
+ }
+ KST::stringList.lock().unlock();
+
_numFramesScalar = 0L;
}
@@ -443,6 +454,11 @@
void KstDataSource::setTagName(const KstObjectTag& in_tag) {
KstObject::setTagName(in_tag);
_numFramesScalar->setTagName(KstObjectTag("frames", tag()));
+ for (QDictIterator<KstString> it(_metaData); it.current(); ++it) {
+ KstObjectTag stag = it.current()->tag();
+ stag.setContext(tag().fullTag());
+ it.current()->setTagName(stag);
+ }
}
More information about the Kst
mailing list