[Kst] branches/work/kst/hierarchy/kst/src/libkst
Eli Fidler
eli at staikos.net
Tue Nov 21 17:37:14 CET 2006
SVN commit 606757 by fidler:
restore DataSource tag
M +10 -1 kstdatasource.cpp
--- branches/work/kst/hierarchy/kst/src/libkst/kstdatasource.cpp #606756:606757
@@ -407,6 +407,15 @@
for (QValueList<PluginSortContainer>::Iterator i = bestPlugins.begin(); i != bestPlugins.end(); ++i) {
KstDataSourcePtr plugin = (*i).plugin->create(kConfigObject, filename, QString::null, e);
if (plugin) {
+ // restore tag if present
+ QDomNodeList l = e.elementsByTagName("tag");
+ if (l.count() > 0) {
+ QDomElement e2 = l.item(0).toElement();
+ if (!e2.isNull()) {
+ kstdDebug() << "Restoring tag " << e2.text() << " to KstDataSource" << endl;
+ plugin->setTagName(KstObjectTag::fromString(e2.text()));
+ }
+ }
return plugin;
}
}
@@ -760,7 +769,7 @@
break;
}
}
- ts << indent << "<tag>" << QStyleSheet::escape(tagName()) << "</tag>" << endl;
+ ts << indent << "<tag>" << QStyleSheet::escape(tag().tagString()) << "</tag>" << endl;
ts << indent << "<filename>" << name << "</filename>" << endl;
ts << indent << "<type>" << QStyleSheet::escape(fileType()) << "</type>" << endl;
}
More information about the Kst
mailing list