summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/lib/xmlhandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/macros/lib/xmlhandler.cpp')
-rw-r--r--kexi/plugins/macros/lib/xmlhandler.cpp52
1 files changed, 26 insertions, 26 deletions
diff --git a/kexi/plugins/macros/lib/xmlhandler.cpp b/kexi/plugins/macros/lib/xmlhandler.cpp
index b35759e1d..4894c6190 100644
--- a/kexi/plugins/macros/lib/xmlhandler.cpp
+++ b/kexi/plugins/macros/lib/xmlhandler.cpp
@@ -22,7 +22,7 @@
#include "macroitem.h"
#include "action.h"
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
using namespace KoMacro;
@@ -67,7 +67,7 @@ XMLHandler::~XMLHandler()
delete d;
}
-bool XMLHandler::parseXML(const QDomElement& element)
+bool XMLHandler::parseXML(const TQDomElement& element)
{
// Remove old items. We should clear first.
d->macro->clearItems();
@@ -75,7 +75,7 @@ bool XMLHandler::parseXML(const QDomElement& element)
// We expect a <macro> element. Do we really need to be such strict or
// would it be more wise to trust the application in that case?
if(element.tagName() != "macro") {
- kdDebug() << QString("XMLHandler::parseXML() Invalid tagname \"%1\"").arg(element.tagName()) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid tagname \"%1\"").tqarg(element.tagName()) << endl;
return false;
}
@@ -83,20 +83,20 @@ bool XMLHandler::parseXML(const QDomElement& element)
// If there is more than one version, parsing should update old macro-data, so that it
// could write out in the newer version in toXML().
if( element.attribute("xmlversion") != "1"){
- kdDebug() << QString("XMLHandler::parseXML() Invalid xml-version \"%1\"").arg(element.attribute("xmlversion")) << endl;
+ kdDebug() << TQString("XMLHandler::parseXML() Invalid xml-version \"%1\"").tqarg(element.attribute("xmlversion")) << endl;
return false;
}
// Do we need to load the macro's name?
// d->macro->setName(element.attribute("name"));
- // Iterate through the child nodes the passed QDomElement has and
+ // Iterate through the child nodes the passed TQDomElement has and
// build the MacroItem elements.
- for(QDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
+ for(TQDomNode itemnode = element.firstChild(); ! itemnode.isNull(); itemnode = itemnode.nextSibling()) {
// The tagname should be "item"
if(itemnode.nodeName() == "item") {
// The node is an element.
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
// Create a new MacroItem
KSharedPtr<MacroItem> item = new MacroItem();
@@ -115,18 +115,18 @@ bool XMLHandler::parseXML(const QDomElement& element)
// Set the comment
item->setComment( itemelem.attribute("comment") );
- // Iterate through the children this item has and try
+ // Iterate through the tqchildren this item has and try
// to fill the list of variables our new MacroItem has.
- for(QDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
+ for(TQDomNode childnode = itemnode.firstChild(); ! childnode.isNull(); childnode = childnode.nextSibling()) {
// The tagname should be "variable"
if(childnode.nodeName() == "variable") {
// The node is an element.
- const QDomElement childelem = childnode.toElement();
+ const TQDomElement childelem = childnode.toElement();
// The name the variable has.
- const QString name = childelem.attribute("name");
+ const TQString name = childelem.attribute("name");
// The value the variable has.
- const QString value = childelem.text();
+ const TQString value = childelem.text();
// Store the new variable in our macroitem.
item->addVariable(name, value);
@@ -139,13 +139,13 @@ bool XMLHandler::parseXML(const QDomElement& element)
return true;
}
-QDomElement XMLHandler::toXML()
+TQDomElement XMLHandler::toXML()
{
- // The QDomDocument provides us the functionality to create new QDomElement instances.
- QDomDocument document;
+ // The TQDomDocument provides us the functionality to create new TQDomElement instances.
+ TQDomDocument document;
- // Create the Macro-QDomElement. This element will be returned.
- QDomElement macroelem = document.createElement("macro");
+ // Create the Macro-TQDomElement. This element will be returned.
+ TQDomElement macroelem = document.createElement("macro");
// Set the Macro-XML-Version, it should be the newest Version.
macroelem.setAttribute("xmlversion","1");
@@ -156,12 +156,12 @@ QDomElement XMLHandler::toXML()
// redundancy at this point.
//macroelem.setAttribute("name",d->macro->name());
- // The list of MacroItem-children a Macro provides.
- QValueList<KSharedPtr<MacroItem > > items = d->macro->items();
+ // The list of MacroItem-tqchildren a Macro provides.
+ TQValueList<KSharedPtr<MacroItem > > items = d->macro->items();
// Create an iterator...
- QValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
- // ...and iterate over the list of children the Macro provides.
+ TQValueList<KSharedPtr<MacroItem > >::ConstIterator it(items.constBegin()), end(items.constEnd());
+ // ...and iterate over the list of tqchildren the Macro provides.
for(;it != end; ++it) {
// We are iterating over MacroItem instances.
KSharedPtr<MacroItem> item = *it;
@@ -171,7 +171,7 @@ QDomElement XMLHandler::toXML()
bool append = false;
// Each MacroItem will have an own node.
- QDomElement itemelem = document.createElement("item");
+ TQDomElement itemelem = document.createElement("item");
// Each MacroItem could point to an Action provided by the Manager.
const KSharedPtr<Action> action = item->action();
@@ -184,9 +184,9 @@ QDomElement XMLHandler::toXML()
// Each MacroItem could have a list of variables. We
// iterate through that list and build a element
// for each single variable.
- QMap<QString, KSharedPtr<Variable > > varmap = item->variables();
+ TQMap<TQString, KSharedPtr<Variable > > varmap = item->variables();
- for(QMap<QString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
+ for(TQMap<TQString, KSharedPtr<Variable > >::ConstIterator vit = varmap.constBegin(); vit != varmap.constEnd(); ++vit) {
const KSharedPtr<Variable> v = vit.data();
if(! v.data()) {
// skip if the variable is NULL.
@@ -194,7 +194,7 @@ QDomElement XMLHandler::toXML()
}
// Create an own element for the variable. The tagname will be
// the name of the variable.
- QDomElement varelement = document.createElement("variable");
+ TQDomElement varelement = document.createElement("variable");
// Remember the name the value has.
varelement.setAttribute("name", vit.key());
@@ -208,7 +208,7 @@ QDomElement XMLHandler::toXML()
}
// Each MacroItem could have an optional comment.
- const QString comment = item->comment();
+ const TQString comment = item->comment();
if(! comment.isEmpty()) {
append = true;
itemelem.setAttribute("comment", item->comment());