summaryrefslogtreecommitdiffstats
path: root/konq-plugins/domtreeviewer/domtreecommands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'konq-plugins/domtreeviewer/domtreecommands.cpp')
-rw-r--r--konq-plugins/domtreeviewer/domtreecommands.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/konq-plugins/domtreeviewer/domtreecommands.cpp b/konq-plugins/domtreeviewer/domtreecommands.cpp
index 1f91cf1..0bbb918 100644
--- a/konq-plugins/domtreeviewer/domtreecommands.cpp
+++ b/konq-plugins/domtreeviewer/domtreecommands.cpp
@@ -25,7 +25,7 @@
#include <klocale.h>
-#include <qmap.h>
+#include <tqmap.h>
using namespace domtreeviewer;
@@ -50,7 +50,7 @@ static const char * const dom_error_msgs[] = {
// == global functions ==============================================
-QString domtreeviewer::domErrorMessage(int dom_err)
+TQString domtreeviewer::domErrorMessage(int dom_err)
{
if ((unsigned)dom_err > sizeof dom_error_msgs/sizeof dom_error_msgs[0])
return i18n("Unknown Exception %1").arg(dom_err);
@@ -87,7 +87,7 @@ inline static bool operator <(const DOM::Node &n1, const DOM::Node &n2)
return (long)n1.handle() - (long)n2.handle() < 0;
}
-class ChangedNodeSet : public QMap<DOM::Node, bool>
+class ChangedNodeSet : public TQMap<DOM::Node, bool>
{
};
@@ -104,15 +104,15 @@ ManipulationCommand::~ManipulationCommand()
{
}
-void ManipulationCommand::connect(const char *signal, QObject *recv, const char *slot)
+void ManipulationCommand::connect(const char *signal, TQObject *recv, const char *slot)
{
- QObject::connect(mcse(), signal, recv, slot);
+ TQObject::connect(mcse(), signal, recv, slot);
}
void ManipulationCommand::handleException(DOM::DOMException &ex)
{
_exception = ex;
- QString msg = name() + ": " + domErrorMessage(ex.code);
+ TQString msg = name() + ": " + domErrorMessage(ex.code);
emit mcse()->error(ex.code, msg);
}
@@ -178,7 +178,7 @@ void ManipulationCommand::reapply()
// == MultiCommand ===========================================
-MultiCommand::MultiCommand(const QString &desc)
+MultiCommand::MultiCommand(const TQString &desc)
: _name(desc)
{
cmds.setAutoDelete(true);
@@ -197,7 +197,7 @@ void MultiCommand::addCommand(ManipulationCommand *cmd)
void MultiCommand::apply()
{
// apply in forward order
- for (QPtrListIterator<ManipulationCommand> it = cmds; *it; ++it) {
+ for (TQPtrListIterator<ManipulationCommand> it = cmds; *it; ++it) {
try {
if (shouldReapply()) (*it)->reapply();
else (*it)->apply();
@@ -223,7 +223,7 @@ void MultiCommand::apply()
void MultiCommand::unapply()
{
// unapply in reverse order
- QPtrListIterator<ManipulationCommand> it = cmds;
+ TQPtrListIterator<ManipulationCommand> it = cmds;
for (it.toLast(); *it; --it) {
try {
(*it)->unapply();
@@ -258,14 +258,14 @@ void MultiCommand::mergeChangedNodesFrom(ManipulationCommand *cmd)
cmd->changedNodes->clear();
}
-QString MultiCommand::name() const
+TQString MultiCommand::name() const
{
return _name;
}
// == AddAttributeCommand ===========================================
-AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const QString &attrName, const QString &attrValue)
+AddAttributeCommand::AddAttributeCommand(const DOM::Element &element, const TQString &attrName, const TQString &attrValue)
: _element(element), attrName(attrName), attrValue(attrValue)
{
if (attrValue.isEmpty()) this->attrValue = "<dummy>";
@@ -287,7 +287,7 @@ void AddAttributeCommand::unapply()
addChangedNode(_element);
}
-QString AddAttributeCommand::name() const
+TQString AddAttributeCommand::name() const
{
return i18n("Add attribute");
}
@@ -295,7 +295,7 @@ QString AddAttributeCommand::name() const
// == ChangeAttributeValueCommand ====================================
ChangeAttributeValueCommand::ChangeAttributeValueCommand(
-const DOM::Element &element, const QString &attr, const QString &value)
+const DOM::Element &element, const TQString &attr, const TQString &value)
: _element(element), _attr(attr), new_value(value)
{
}
@@ -317,14 +317,14 @@ void ChangeAttributeValueCommand::unapply()
addChangedNode(_element);
}
-QString ChangeAttributeValueCommand::name() const
+TQString ChangeAttributeValueCommand::name() const
{
return i18n("Change attribute value");
}
// == RemoveAttributeCommand ========================================
-RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const QString &attrName)
+RemoveAttributeCommand::RemoveAttributeCommand(const DOM::Element &element, const TQString &attrName)
: _element(element), attrName(attrName)
{
}
@@ -348,14 +348,14 @@ void RemoveAttributeCommand::unapply()
addChangedNode(_element);
}
-QString RemoveAttributeCommand::name() const
+TQString RemoveAttributeCommand::name() const
{
return i18n("Remove attribute");
}
// == RenameAttributeCommand ========================================
-RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const QString &attrOldName, const QString &attrNewName)
+RenameAttributeCommand::RenameAttributeCommand(const DOM::Element &element, const TQString &attrOldName, const TQString &attrNewName)
: _element(element), attrOldName(attrOldName), attrNewName(attrNewName)
{
}
@@ -380,14 +380,14 @@ void RenameAttributeCommand::unapply()
addChangedNode(_element);
}
-QString RenameAttributeCommand::name() const
+TQString RenameAttributeCommand::name() const
{
return i18n("Rename attribute");
}
// == ChangeCDataCommand ========================================
-ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const QString &value)
+ChangeCDataCommand::ChangeCDataCommand(const DOM::CharacterData &cdata, const TQString &value)
: cdata(cdata), value(value), has_newlines(false)
{
}
@@ -401,8 +401,8 @@ void ChangeCDataCommand::apply()
if (!shouldReapply()) {
oldValue = cdata.data();
has_newlines =
- QConstString(value.unicode(), value.length()).string().contains('\n')
- || QConstString(oldValue.unicode(), oldValue.length()).string().contains('\n');
+ TQConstString(value.unicode(), value.length()).string().contains('\n')
+ || TQConstString(oldValue.unicode(), oldValue.length()).string().contains('\n');
}
cdata.setData(value);
addChangedNode(cdata);
@@ -416,7 +416,7 @@ void ChangeCDataCommand::unapply()
struc_changed = has_newlines;
}
-QString ChangeCDataCommand::name() const
+TQString ChangeCDataCommand::name() const
{
return i18n("Change textual content");
}
@@ -478,7 +478,7 @@ void InsertNodeCommand::unapply()
struc_changed = true;
}
-QString InsertNodeCommand::name() const
+TQString InsertNodeCommand::name() const
{
return i18n("Insert node");
}
@@ -506,7 +506,7 @@ void RemoveNodeCommand::unapply()
struc_changed = true;
}
-QString RemoveNodeCommand::name() const
+TQString RemoveNodeCommand::name() const
{
return i18n("Remove node");
}
@@ -552,7 +552,7 @@ void MoveNodeCommand::unapply()
struc_changed = true;
}
-QString MoveNodeCommand::name() const
+TQString MoveNodeCommand::name() const
{
return i18n("Move node");
}