summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/tests
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-25 05:28:35 +0000
commitf008adb5a77e094eaf6abf3fc0f36958e66896a5 (patch)
tree8e9244c4d4957c36be81e15b566b4aa5ea26c982 /kexi/plugins/macros/tests
parent1210f27b660efb7b37ff43ec68763e85a403471f (diff)
downloadkoffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.tar.gz
koffice-f008adb5a77e094eaf6abf3fc0f36958e66896a5.zip
TQt4 port koffice
This should enable compilation under both Qt3 and Qt4; fixes for any missed components will be forthcoming git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1238284 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kexi/plugins/macros/tests')
-rw-r--r--kexi/plugins/macros/tests/actiontests.cpp32
-rw-r--r--kexi/plugins/macros/tests/actiontests.h1
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp246
-rw-r--r--kexi/plugins/macros/tests/commontests.h5
-rw-r--r--kexi/plugins/macros/tests/komacrotestbase.h18
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.cpp26
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.h1
-rw-r--r--kexi/plugins/macros/tests/macrotests.cpp32
-rw-r--r--kexi/plugins/macros/tests/macrotests.h1
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp8
-rw-r--r--kexi/plugins/macros/tests/testaction.h3
-rw-r--r--kexi/plugins/macros/tests/testobject.cpp28
-rw-r--r--kexi/plugins/macros/tests/testobject.h13
-rw-r--r--kexi/plugins/macros/tests/variabletests.cpp26
-rw-r--r--kexi/plugins/macros/tests/variabletests.h1
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp180
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.h15
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp232
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.h19
19 files changed, 448 insertions, 439 deletions
diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp
index 0150ecfd..65bebe66 100644
--- a/kexi/plugins/macros/tests/actiontests.cpp
+++ b/kexi/plugins/macros/tests/actiontests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,16 +66,16 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
- QValueList< KSharedPtr<KoMacro::MacroItem> > items;
+ TQValueList< KSharedPtr<KoMacro::MacroItem> > items;
KSharedPtr<KoMacro::Action> actionptr;
@@ -90,7 +90,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
ActionTests::ActionTests()
@@ -117,9 +117,9 @@ void ActionTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -147,7 +147,7 @@ void ActionTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- //QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( d->items.count(), sizetype(0) );
@@ -169,14 +169,14 @@ void ActionTests::testText()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
- const QString leetSpeech = "']['3 $']['";
+ const TQString leetSpeech = "']['3 $']['";
//check i18n text
- KOMACROTEST_ASSERT(d->actionptr->text(),QString("Test"));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString("Test"));
//change it
d->actionptr->setText(leetSpeech);
//retest it
- KOMACROTEST_ASSERT(d->actionptr->text(),QString(leetSpeech));
+ KOMACROTEST_ASSERT(d->actionptr->text(),TQString(leetSpeech));
}
@@ -187,11 +187,11 @@ void ActionTests::testName()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check name
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("testaction"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction"));
//change it
d->actionptr->setName("ActionJackson");
//retest it
- KOMACROTEST_ASSERT(d->actionptr->name(),QString("ActionJackson"));
+ KOMACROTEST_ASSERT(d->actionptr->name(),TQString("ActionJackson"));
}
void ActionTests::testComment()
@@ -201,11 +201,11 @@ void ActionTests::testComment()
//KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check comment
- KOMACROTEST_XASSERT(d->actionptr->comment(),QString("No Comment!"));
+ KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!"));
//set comment
d->actionptr->setComment("Stringtest");
//check comment again
- KOMACROTEST_ASSERT(d->actionptr->comment(),QString("Stringtest"));
+ KOMACROTEST_ASSERT(d->actionptr->comment(),TQString("Stringtest"));
}
#include "actiontests.moc"
diff --git a/kexi/plugins/macros/tests/actiontests.h b/kexi/plugins/macros/tests/actiontests.h
index 48b5a252..07cf8958 100644
--- a/kexi/plugins/macros/tests/actiontests.h
+++ b/kexi/plugins/macros/tests/actiontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class ActionTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index 84c596aa..1086a340 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -36,8 +36,8 @@
#include <ostream>
#include <climits>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -71,14 +71,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
/**
* Constructor.
@@ -94,7 +94,7 @@ namespace KoMacroTest {
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
CommonTests::CommonTests()
: KUnitTest::SlotTester()
@@ -119,9 +119,9 @@ void CommonTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
@@ -146,14 +146,14 @@ void CommonTests::testManager()
//check if manager-guiClient equals xmlguiclient
KOMACROTEST_ASSERT( ::KoMacro::Manager::self()->guiClient(), d->xmlguiclient );
//check if manger-object equals testobject
- KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (QObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
+ KOMACROTEST_ASSERT( dynamic_cast<TestObject*>( (TQObject*)::KoMacro::Manager::self()->object("TestObject") ), d->testobject );
}
/*
void CommonTests::testAction()
{
- const QString testString = "teststring";
- const QString testInt = "testint";
- const QString testBool = "testbool";
+ const TQString testString = "teststring";
+ const TQString testInt = "testint";
+ const TQString testBool = "testbool";
//TODO: CLEANUP!!!!!!
//TODO: test manipulation of action and macroitem and context.
@@ -162,7 +162,7 @@ void CommonTests::testAction()
//Publish TestAction for the first time.
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
@@ -173,7 +173,7 @@ void CommonTests::testAction()
macro->execute(this);
//create list of KSharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
@@ -188,7 +188,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
//fetch the "testint"-variable
variableptr = actionptr->variable("testint");
@@ -209,7 +209,7 @@ void CommonTests::testAction()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
actionptr->setVariable("testint","INTTEST",INT_MAX);
variableptr = actionptr->variable("testint");
@@ -234,7 +234,7 @@ void CommonTests::testAction()
macroitem->setVariable("teststring", "TeStString");
variableptr = macroitem->variable("teststring");
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
macroitem->setVariable("testint",INT_MIN);
variableptr = macroitem->variable("testint");
@@ -249,8 +249,8 @@ void CommonTests::testAction()
//commontests.cpp: In member function 'void KoMacroTest::CommonTests::testAction()':
//commontests.cpp:249: error: call of overloaded 'setVariable(const char [8], int)' is ambiguous
- //../lib/macroitem.h:131: note: candidates are: QStringList KoMacro::MacroItem::setVariable(const QString&, KSharedPtr<KoMacro::Variable>)
- //../lib/macroitem.h:137: note: QStringList KoMacro::MacroItem::setVariable(const QString&, const QVariant&)
+ //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>)
+ //../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&)
macroitem->setVariable("testint",(int) 0);
variableptr = macroitem->variable("testint");
@@ -286,14 +286,14 @@ void CommonTests::testXmlhandler()
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomElement domelement;
+ TQDomElement domelement;
// Save old doomdocument
- QString xmlOld = d->doomdocument->toString();
+ TQString xmlOld = d->doomdocument->toString();
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- QString xml = QString("<!DOCTYPE macros>"
+ TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -310,7 +310,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// Test-XML-document with bad root element.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -324,7 +324,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),false);
// Test-XML-document with wrong macro-xmlversion.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -339,7 +339,7 @@ void CommonTests::testXmlhandler()
// TODO Test-XML-document if it has a wrong structure like wrong parathesis
// or missing end tag (is this critical??).
- /*xml = QString("<!DOCTYPE macros>"
+ /*xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -353,7 +353,7 @@ void CommonTests::testXmlhandler()
// Test-XML-document with wrong item- and variable-tags.
// TODO Could this happen??
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<iem action=\"testaction\" >"
"<vle name=\"teststring\" >testString</variable>"
@@ -367,7 +367,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true); //should be false?
// TODO Test-XML-document with maximum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -381,7 +381,7 @@ void CommonTests::testXmlhandler()
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
// TODO Test-XML-document with minimum field-size.
- xml = QString("<!DOCTYPE macros>"
+ xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >testString</variable>"
@@ -410,21 +410,21 @@ void CommonTests::testFunction()
/*
kdDebug()<<"===================== testFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create some data
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver = "TestObject";
- QString const argument1 = "Some string";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver = "TestObject";
+ TQString const argument1 = "Some string";
int const argument2 = 12345;
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>" + argument1 + "</argument>"
- "<argument>" + QString("%1").arg(argument2) + "</argument>"
+ "<argument>" + TQString("%1").tqarg(argument2) + "</argument>"
"</function>"
));
@@ -438,7 +438,7 @@ void CommonTests::testFunction()
//check domElement
KOMACROTEST_ASSERT( func->domElement(), domdocument.documentElement() );
//check name
- KOMACROTEST_ASSERT( QString(func->name()), name );
+ KOMACROTEST_ASSERT( TQString(func->name()), name );
//check text
KOMACROTEST_ASSERT( func->text(), text );
//check comment
@@ -446,7 +446,7 @@ void CommonTests::testFunction()
//check receiver
KOMACROTEST_ASSERT( func->receiver(), receiver );
//check slot (arguments)
- KOMACROTEST_ASSERT( QString(func->slot()), QString("myslot(const QString&,int)") );
+ KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") );
//create KoMacro-MetaObject from receiverObject
KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
@@ -466,14 +466,14 @@ void CommonTests::testFunction()
for( it = funcvariables.constBegin(); it != end; ++it) {
kdDebug() << "VARIABLE => " << (*it ? (*it)->toString() : "<NULL>") << endl;
//hardcoded test:
- // firstrun we have a QString, secondrun we have an int
+ // firstrun we have a TQString, secondrun we have an int
switch(i) {
case 0: { // returnvalue
KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL));
} break;
case 1: { // first parameter
//check first variable of func is the same as argument1
- //QString const argument1 = "Some string";
+ //TQString const argument1 = "Some string";
KOMACROTEST_ASSERT((*it)->toString(), argument1);
} break;
case 2: { // second parameter
@@ -497,10 +497,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
//check that it is not null
KOMACROTEST_XASSERT((int) stringvar.data(),0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( stringvar->type(), KoMacro::MetaParameter::TypeVariant );
//check via metaparameter that variant is from type string
- KOMACROTEST_ASSERT( stringvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( stringvar->variantType(), TQVariant::String );
//chech that stringvar equals argument1
KOMACROTEST_ASSERT( stringvar->toString(), argument1 );
@@ -508,10 +508,10 @@ void CommonTests::testFunction()
KSharedPtr<KoMacro::Variable> intvar = funcvariables[2];
//check that it is not null
KOMACROTEST_XASSERT((int) intvar.data(), 0);
- //check via QVariant type that stringvar is from Type Variant
+ //check via TQVariant type that stringvar is from Type Variant
KOMACROTEST_ASSERT( intvar->type(), KoMacro::MetaParameter::TypeVariant );
//check that intvar is An String -> we create an string from int because of xml
- KOMACROTEST_ASSERT( intvar->variantType(), QVariant::String );
+ KOMACROTEST_ASSERT( intvar->variantType(), TQVariant::String );
//check that intvar equals argument2
KOMACROTEST_ASSERT( intvar->toInt(), argument2 );
@@ -522,7 +522,7 @@ void CommonTests::testFunction()
//check returnvalue
//func->setReturnValue(new KoMacro::Variable("54321"));
- //KOMACROTEST_ASSERT( func->returnValue()->toString(), QString("54321") );
+ //KOMACROTEST_ASSERT( func->returnValue()->toString(), TQString("54321") );
*/
}
@@ -532,12 +532,12 @@ void CommonTests::testIntFunction()
/*
kdDebug()<<"===================== testIntFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , int)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -552,7 +552,7 @@ void CommonTests::testIntFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12345"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12345"));
*/
}
@@ -562,12 +562,12 @@ void CommonTests::testDoubleFunction()
/*
kdDebug()<<"===================== testDoubleFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp; , double)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp; , double)\">"
"<argument>Some string</argument>"
"<argument>12.56</argument>"
"</function>"
@@ -582,22 +582,22 @@ void CommonTests::testDoubleFunction()
//execute the function
func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("12.56"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("12.56"));
*/
}
-void CommonTests::testQStringFunction()
+void CommonTests::testTQStringFunction()
{
//TODO: CLEANUP!!!!!!
/*
- kdDebug()<<"===================== testQStringFunction() ======================" << endl;
+ kdDebug()<<"===================== testTQStringFunction() ======================" << endl;
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
- //set "Function"-content in QDocument
- domdocument.setContent(QString(
- "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+ //set "Function"-content in TQDocument
+ domdocument.setContent(TQString(
+ "<function name=\"myfunc\" text=\"My Function\" comment=\"comment\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
"<argument>Some string</argument>"
"</function>"
));
@@ -610,7 +610,7 @@ void CommonTests::testQStringFunction()
KOMACROTEST_XASSERT((int) func, 0);
//execute the function func->activate();
//Check returnvalue is same value we entered
- //KOMACROTEST_ASSERT(func->returnValue()->toString(),QString("Some string"));
+ //KOMACROTEST_ASSERT(func->returnValue()->toString(),TQString("Some string"));
*/
}
@@ -619,20 +619,20 @@ void CommonTests::testMacro()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
-// //create a QDomDocument
-// QDomDocument domdocument = QDomDocument();
+// //create a TQDomDocument
+// TQDomDocument domdocument = TQDomDocument();
//
// //Fully fleged content this time with macro,function and action
-// domdocument.setContent(QString(
+// domdocument.setContent(TQString(
// "<macro name=\"mymacro\" icon=\"myicon\" text=\"My Macro\" comment=\"Some comment to describe the Macro.\">"
// "<action name=\"myaction\" text=\"My Action\" comment=\"Just some comment\" />"
-// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\">"
+// "<function name=\"myfunc\" text=\"My Function\" comment=\"Describe what the function does\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\">"
// "<argument>The myfunc argument string</argument>"
// "</function>"
// "</macro>"
@@ -647,21 +647,21 @@ void CommonTests::testMacro()
//check that domeElement given to manager is the sam as in the macro
// KOMACROTEST_ASSERT( macro->toXML(), d->doomdocument->documentElement() );
//check the name
- KOMACROTEST_ASSERT( QString(macro->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro->name()), TQString("testMacro") );
/**
@deprecated values no longer exist
//check the text
- KOMACROTEST_ASSERT( macro->text(), QString("My Macro") );
+ KOMACROTEST_ASSERT( macro->text(), TQString("My Macro") );
//check iconname
- KOMACROTEST_ASSERT( QString(macro->icon()), QString("myicon") );
+ KOMACROTEST_ASSERT( TQString(macro->icon()), TQString("myicon") );
//check comment
- KOMACROTEST_ASSERT( macro->comment(), QString("Some comment to describe the Macro.") );
+ KOMACROTEST_ASSERT( macro->comment(), TQString("Some comment to describe the Macro.") );
*/
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
@@ -670,14 +670,14 @@ void CommonTests::testMacro()
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//check that it has the right comment
-// KOMACROTEST_ASSERT( actionptr->comment(), QString("") );
+// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ KSharedPtr<KoMacro::Action> myfuncptr = tqchildren[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -685,16 +685,16 @@ void CommonTests::testMacro()
KOMACROTEST_XASSERT((int) myfunc, 0);
//check it?s name
- KOMACROTEST_ASSERT( QString(myfunc->name()), QString("myfunc"));
+ KOMACROTEST_ASSERT( TQString(myfunc->name()), TQString("myfunc"));
//check it?s text
- KOMACROTEST_ASSERT( myfunc->text(), QString("My Function") );
+ KOMACROTEST_ASSERT( myfunc->text(), TQString("My Function") );
//check it?s comment
- KOMACROTEST_ASSERT( myfunc->comment(), QString("Describe what the function does") );
+ KOMACROTEST_ASSERT( myfunc->comment(), TQString("Describe what the function does") );
//check it?s receiver object
- KOMACROTEST_ASSERT( myfunc->receiver(), QString("TestObject") );
+ KOMACROTEST_ASSERT( myfunc->receiver(), TQString("TestObject") );
//check it?s slot
- KOMACROTEST_ASSERT( myfunc->slot(), QString("myslot(const QString&)") );
+ KOMACROTEST_ASSERT( myfunc->slot(), TQString("myslot(const TQString&)") );
//exceute it
myfunc->activate();
@@ -712,8 +712,8 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0);
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
- //create a list of the children from yanMacro
- //QValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //create a list of the tqchildren from yanMacro
+ //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->tqchildren();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -722,9 +722,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr2);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -735,9 +735,9 @@ void CommonTests::testMacro()
const int oldsize = yanChildren.count();
//add a new child to the macro
yanMacro->addChild(yanActionptr3);
- //get the children
- yanChildren = yanMacro->children();
- //get count of children
+ //get the tqchildren
+ yanChildren = yanMacro->tqchildren();
+ //get count of tqchildren
const int size = yanChildren.count();
//check count has changed
KOMACROTEST_XASSERT(size, oldsize);
@@ -752,18 +752,18 @@ void CommonTests::testDom() {
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testDom() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data for various documents
- QString const comment = "Describe what the function does";
- QString const name = "myfunc";
- QString const text = "My Function";
- QString const receiver1 = "TestObject";
- QString const receiver2 = "GibtsNich";
+ TQString const comment = "Describe what the function does";
+ TQString const name = "myfunc";
+ TQString const text = "My Function";
+ TQString const receiver1 = "TestObject";
+ TQString const receiver2 = "GibtsNich";
//create wrong Argument tag
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<Arg0ment>Some string</Arg0ment>"
"<Arg0ment>12345</Arg0ment>"
"</function>"
@@ -774,8 +774,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong receiver
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const QString &amp; , int)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver2 + "\" slot=\"myslot(const TQString &amp; , int)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"</function>"
@@ -786,8 +786,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create "wrong" number of parameters
- domdocument.setContent(QString(
- "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<function name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -799,8 +799,8 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
//create wrong function tag
- domdocument.setContent(QString(
- "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const QString &amp; , int, double)\">"
+ domdocument.setContent(TQString(
+ "<NoFunction name=\"" + name + "\" text=\"" + text + "\" comment=\"" + comment + "\" receiver=\"" + receiver1 + "\" slot=\"myslot(const TQString &amp; , int, double)\">"
"<argument>Some string</argument>"
"<argument>12345</argument>"
"<argument>12345.25</argument>"
@@ -810,7 +810,7 @@ void CommonTests::testDom() {
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() ));
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function name=\"\" text=\"\" comment=\"\" receiver=\"\" slot=\"\">"
"<argument> </argument>"
"<argument> </argument>"
@@ -824,7 +824,7 @@ void CommonTests::testDom() {
//create empty function
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<function>"
"</function>"
));
@@ -840,12 +840,12 @@ void CommonTests::testVariables()
//TODO: CLEANUP!!!!!!
kdDebug()<<"===================== testVariables() ======================" << endl;
/*
- //create a QDomDocument
- QDomDocument domdocument = QDomDocument();
+ //create a TQDomDocument
+ TQDomDocument domdocument = TQDomDocument();
//create data
- domdocument.setContent(QString(
+ domdocument.setContent(TQString(
"<macro name=\"mymacro123\" text=\"My Macro 123\">"
- "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const QString &amp;)\" >"
+ "<function name=\"func1\" text=\"Function1\" receiver=\"TestObject\" slot=\"myslot(const TQString &amp;)\" >"
"<argument>$MyArgumentVariable</argument>"
"<return>$MyReturnVariable</return>"
"</function>"
@@ -859,12 +859,12 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
- //create a list of its children
- QValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
- //Check that there are two children. The first child is always the returnvalue.
- KOMACROTEST_ASSERT( children.count(), uint(2) );
- //fetch the children
- KSharedPtr<KoMacro::Action> func1ptr = children[1];
+ //create a list of its tqchildren
+ TQValueList< KSharedPtr<KoMacro::Action> > tqchildren = macro->tqchildren();
+ //Check that there are two tqchildren. The first child is always the returnvalue.
+ KOMACROTEST_ASSERT( tqchildren.count(), uint(2) );
+ //fetch the tqchildren
+ KSharedPtr<KoMacro::Action> func1ptr = tqchildren[1];
//create new context
KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
@@ -877,7 +877,7 @@ void CommonTests::testVariables()
}
{
- //set variable to be a QString
+ //set variable to be a TQString
context->setVariable("$MyArgumentVariable", new KoMacro::Variable("Some string"));
//execute function
func1ptr->activate(context);
@@ -886,7 +886,7 @@ void CommonTests::testVariables()
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is "Some String"
- KOMACROTEST_ASSERT(returnvariable->toString(),QString("Some string"));
+ KOMACROTEST_ASSERT(returnvariable->toString(),TQString("Some string"));
}
{
diff --git a/kexi/plugins/macros/tests/commontests.h b/kexi/plugins/macros/tests/commontests.h
index a3199ce2..0480c022 100644
--- a/kexi/plugins/macros/tests/commontests.h
+++ b/kexi/plugins/macros/tests/commontests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class CommonTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -88,9 +89,9 @@ namespace KoMacroTest {
void testDoubleFunction();
/**
- * Test the @a KoMacro::Function functionality with a QString.
+ * Test the @a KoMacro::Function functionality with a TQString.
*/
- void testQStringFunction();
+ void testTQStringFunction();
/**
* Test the @a KoMacro::Macro functionality.
diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h
index d423e086..e301730d 100644
--- a/kexi/plugins/macros/tests/komacrotestbase.h
+++ b/kexi/plugins/macros/tests/komacrotestbase.h
@@ -27,11 +27,11 @@
*/
#define KOMACROTEST_ASSERT(actual, expected) \
{ \
- std::cout << QString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, expected, false ); \
if(actual != expected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -44,11 +44,11 @@
*/
#define KOMACROTEST_XASSERT(actual, notexpected) \
{ \
- std::cout << QString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \
+ std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \
check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \
if(actual == notexpected) \
{ \
- kdWarning() << QString("==============> FAILED") << endl; \
+ kdWarning() << TQString("==============> FAILED") << endl; \
return; \
} \
}
@@ -70,11 +70,11 @@
setExceptionRaised(true); \
} \
if(exceptionRaised()) { \
- success(QString(__FILE__) + "[" + QString::number(__LINE__) + "]: passed " + #expression); \
+ success(TQString(__FILE__) + "[" + TQString::number(__LINE__) + "]: passed " + #expression); \
setExceptionRaised(false); \
} \
else { \
- failure(QString(__FILE__) + "[" + QString::number(__LINE__) + QString("]: failed to throw an exception on: ") + #expression); \
+ failure(TQString(__FILE__) + "[" + TQString::number(__LINE__) + TQString("]: failed to throw an exception on: ") + #expression); \
return; \
} \
}
@@ -84,7 +84,7 @@
//Used more tha once at various places
//names of variables from testaction
namespace KoMacroTest {
- static const QString TESTSTRING = "teststring";
- static const QString TESTINT = "testint";
- static const QString TESTBOOL = "testbool";
+ static const TQString TESTSTRING = "teststring";
+ static const TQString TESTINT = "testint";
+ static const TQString TESTBOOL = "testbool";
}
diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp
index 366318e1..47b93b0f 100644
--- a/kexi/plugins/macros/tests/macroitemtests.cpp
+++ b/kexi/plugins/macros/tests/macroitemtests.cpp
@@ -32,8 +32,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,12 +64,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroitemTests::MacroitemTests()
: KUnitTest::SlotTester()
@@ -108,9 +108,9 @@ void MacroitemTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -136,7 +136,7 @@ void MacroitemTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -148,7 +148,7 @@ void MacroitemTests::testMacroItemString()
kdDebug()<<"===================== testMacroItemString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
@@ -167,7 +167,7 @@ void MacroitemTests::testMacroItemString()
macroitem->setVariable(TESTSTRING, "TeStString");
variableptr = macroitem->variable(TESTSTRING);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TeStString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TeStString"));
//secondway for appending an macroitem
@@ -185,7 +185,7 @@ void MacroitemTests::testMacroItemInt()
kdDebug()<<"===================== testMacroItemInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
@@ -204,7 +204,7 @@ void MacroitemTests::testMacroItemInt()
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(-1));
- macroitem->setVariable(TESTINT,QVariant(0));
+ macroitem->setVariable(TESTINT,TQVariant(0));
variableptr = macroitem->variable(TESTINT);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(0));
@@ -226,7 +226,7 @@ void MacroitemTests::testMacroItemBool()
kdDebug()<<"===================== testMacroItemBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
diff --git a/kexi/plugins/macros/tests/macroitemtests.h b/kexi/plugins/macros/tests/macroitemtests.h
index 3e44eebd..7ec3625c 100644
--- a/kexi/plugins/macros/tests/macroitemtests.h
+++ b/kexi/plugins/macros/tests/macroitemtests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroitemTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp
index ed222df2..45f77efd 100644
--- a/kexi/plugins/macros/tests/macrotests.cpp
+++ b/kexi/plugins/macros/tests/macrotests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -64,14 +64,14 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestObject* testobject;
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
Private()
: xmlguiclient(0)
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroTests::MacroTests()
@@ -112,9 +112,9 @@ void MacroTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -134,7 +134,7 @@ void MacroTests::testMacro()
{
kdDebug()<<"===================== testMacro() ======================" << endl;
- QDomElement const domelement = d->doomdocument->documentElement();
+ TQDomElement const domelement = d->doomdocument->documentElement();
KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
@@ -150,8 +150,8 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT(macro1->name(), macro2->name() );
//create list of KsharedPtr from the childs of the macro
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
//check that there is one
KOMACROTEST_XASSERT( items1.count(), sizetype(0) );
@@ -161,16 +161,16 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT( items1.count(), items2.count() );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("testMacro") );
{
- const QString tmp1 = QString("test");
+ const TQString tmp1 = TQString("test");
macro1->setName(tmp1);
//check the name changed
- KOMACROTEST_XASSERT( QString(macro1->name()), QString("testMacro") );
+ KOMACROTEST_XASSERT( TQString(macro1->name()), TQString("testMacro") );
//check the name
- KOMACROTEST_ASSERT( QString(macro1->name()), QString("test") );
+ KOMACROTEST_ASSERT( TQString(macro1->name()), TQString("test") );
}
//fetch the first one
@@ -178,9 +178,9 @@ void MacroTests::testMacro()
//check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
- KOMACROTEST_ASSERT( QString(actionptr->name()), QString("testaction") );
+ KOMACROTEST_ASSERT( TQString(actionptr->name()), TQString("testaction") );
//check that it has the right text
- KOMACROTEST_ASSERT( actionptr->text(), QString("Test") );
+ KOMACROTEST_ASSERT( actionptr->text(), TQString("Test") );
//try to clear items
macro1->clearItems();
diff --git a/kexi/plugins/macros/tests/macrotests.h b/kexi/plugins/macros/tests/macrotests.h
index ed8d0f21..4a7c2043 100644
--- a/kexi/plugins/macros/tests/macrotests.h
+++ b/kexi/plugins/macros/tests/macrotests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class MacroTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp
index 4063aa1b..845acd5f 100644
--- a/kexi/plugins/macros/tests/testaction.cpp
+++ b/kexi/plugins/macros/tests/testaction.cpp
@@ -33,17 +33,17 @@ using namespace KoMacroTest;
TestAction::TestAction()
: KoMacro::Action("testaction", "Test")
{
- setVariable("teststring", "Stringtest", QString("testString"));
+ setVariable("teststring", "Stringtest", TQString("testString"));
setVariable("testint", "Inttest", int(0));
setVariable("testdouble", "Doubletest", double(0.5));
- setVariable("testbool", "Booltest", QVariant(true,0));
+ setVariable("testbool", "Booltest", TQVariant(true,0));
}
TestAction::~TestAction()
{
}
-bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name)
+bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
Q_UNUSED(macroitem);
Q_UNUSED(name);
@@ -53,7 +53,7 @@ bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const Q
void TestAction::activate(KSharedPtr<KoMacro::Context> context)
{
kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl;
- const QString teststring = context->variable("teststring")->variant().toString();
+ const TQString teststring = context->variable("teststring")->variant().toString();
const int testint = context->variable("testint")->variant().toInt();
const bool testbool = context->variable("testbool")->variant().toBool();
}
diff --git a/kexi/plugins/macros/tests/testaction.h b/kexi/plugins/macros/tests/testaction.h
index 9eebff3c..9c045e3d 100644
--- a/kexi/plugins/macros/tests/testaction.h
+++ b/kexi/plugins/macros/tests/testaction.h
@@ -39,6 +39,7 @@ namespace KoMacroTest {
class TestAction : public KoMacro::Action
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -62,7 +63,7 @@ namespace KoMacroTest {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const QString& name);
+ virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp
index 39cadb7a..e0db481e 100644
--- a/kexi/plugins/macros/tests/testobject.cpp
+++ b/kexi/plugins/macros/tests/testobject.cpp
@@ -25,8 +25,8 @@
//#include "../lib/macro.h"
//#include "../lib/metaobject.h"
-//#include <qstringlist.h>
-//#include <qdom.h>
+//#include <tqstringlist.h>
+//#include <tqdom.h>
#include <kdebug.h>
//#include <kxmlguiclient.h>
@@ -57,7 +57,7 @@ namespace KoMacroTest {
}
TestObject::TestObject(KUnitTest::Tester* const tester)
- : QObject()
+ : TQObject()
, d( new Private(tester) ) // create the private d-pointer instance.
{
setName("TestObject");
@@ -71,18 +71,18 @@ TestObject::~TestObject()
//testObject without arguments
void TestObject::myslot()
{
- QString s = "CALLED => TestObject::myslot()";
+ TQString s = "CALLED => TestObject::myslot()";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults see tester.h
d->tester->results()->addDebugInfo(s);
}
-//testobject with QString and int argument
+//testobject with TQString and int argument
//int is returnvalue
-int TestObject::myslot(const QString&, int i)
+int TestObject::myslot(const TQString&, int i)
{
- QString s = "CALLED => TestObject::myslot(const QString&, int)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, int)";
//be loud
kdDebug() << s << endl;
//add some extra debuginfos to TestResults
@@ -90,11 +90,11 @@ int TestObject::myslot(const QString&, int i)
return i;
}
-//testobject with QString argument
-//QString is returnvalue
-QString TestObject::myslot(const QString& s)
+//testobject with TQString argument
+//TQString is returnvalue
+TQString TestObject::myslot(const TQString& s)
{
- QString t = QString("CALLED => TestObject::myslot(const QString& s) s=%1").arg(s);
+ TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s);
//be loud
kdDebug() << t << endl;
//add some extra Debuginfos to TestResults
@@ -102,11 +102,11 @@ QString TestObject::myslot(const QString& s)
return s;
}
-//testobject with QString and double argument
+//testobject with TQString and double argument
//double is returnvalue
-double TestObject::myslot(const QString&, double d)
+double TestObject::myslot(const TQString&, double d)
{
- QString s = "CALLED => TestObject::myslot(const QString&, double)";
+ TQString s = "CALLED => TestObject::myslot(const TQString&, double)";
//be loud
kdDebug() << s << endl;
//add some extra Debuginfos to TestResults
diff --git a/kexi/plugins/macros/tests/testobject.h b/kexi/plugins/macros/tests/testobject.h
index da5e8ae2..87bed837 100644
--- a/kexi/plugins/macros/tests/testobject.h
+++ b/kexi/plugins/macros/tests/testobject.h
@@ -20,18 +20,19 @@
#ifndef KOMACROTEST_TESTOBJECT_H
#define KOMACROTEST_TESTOBJECT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kunittest/tester.h>
namespace KoMacroTest {
/**
* The TestObject class is used to test handling and communication
- * of external from QObject inheritated classes.
+ * of external from TQObject inheritated classes.
*/
- class TestObject : public QObject
+ class TestObject : public TQObject
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -59,20 +60,20 @@ namespace KoMacroTest {
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- int myslot(const QString&, int);
+ int myslot(const TQString&, int);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
*/
- QString myslot(const QString&);
+ TQString myslot(const TQString&);
/**
* This slot got published to the KoMacro-framework
* and will be called to test the functionality.
* @return is @param d
*/
- double myslot(const QString&, double d);
+ double myslot(const TQString&, double d);
private:
/// @internal d-pointer class.
diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp
index 8bc8d9c7..5035f929 100644
--- a/kexi/plugins/macros/tests/variabletests.cpp
+++ b/kexi/plugins/macros/tests/variabletests.cpp
@@ -34,8 +34,8 @@
#include <ostream>
-#include <qstringlist.h>
-#include <qdom.h>
+#include <tqstringlist.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -66,12 +66,12 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
TestAction* testaction;
- QDomDocument* doomdocument;
+ TQDomDocument* doomdocument;
KSharedPtr<KoMacro::Macro> macro;
@@ -85,7 +85,7 @@ namespace KoMacroTest {
};
}
-typedef QValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
/******************************************************************************
* This is an xtra big TODO:
@@ -117,9 +117,9 @@ void VariableTests::setUp()
d->testaction = new TestAction();
::KoMacro::Manager::self()->publishAction(d->testaction);
- d->doomdocument = new QDomDocument();
+ d->doomdocument = new TQDomDocument();
- QString const xml = QString("<!DOCTYPE macros>"
+ TQString const xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\" >"
"<item action=\"testaction\" >"
"</item>"
@@ -144,7 +144,7 @@ void VariableTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -152,7 +152,7 @@ void VariableTests::testMacro()
void VariableTests::testVariableString() {
kdDebug()<<"===================== testVariableString() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "teststring"-variable
@@ -173,19 +173,19 @@ void VariableTests::testVariableString() {
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is "testString"
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("testString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("testString"));
actionptr->setVariable("teststring", "STRINGTEST", "TestString");
variableptr = actionptr->variable("teststring");
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
- KOMACROTEST_ASSERT(variableptr->variant().toString(),QString("TestString"));
+ KOMACROTEST_ASSERT(variableptr->variant().toString(),TQString("TestString"));
}
void VariableTests::testVariableInt() {
kdDebug()<<"===================== testVariableInt() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testint"-variable
@@ -218,7 +218,7 @@ void VariableTests::testVariableInt() {
void VariableTests::testVariableBool() {
kdDebug()<<"===================== testVariableBool() ======================" << endl;
- QValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testbool"-variable
diff --git a/kexi/plugins/macros/tests/variabletests.h b/kexi/plugins/macros/tests/variabletests.h
index 5bc7f144..a3cd7f60 100644
--- a/kexi/plugins/macros/tests/variabletests.h
+++ b/kexi/plugins/macros/tests/variabletests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class VariableTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 9a0ebcb1..a08ff33d 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -58,7 +58,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -144,11 +144,11 @@ void XMLHandlerTests::testCorrectDomElement()
{
// Local Init
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -159,12 +159,12 @@ void XMLHandlerTests::testCorrectDomElement()
"</macro>");
// Set the XML-document with the above string.
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Is our XML parseable by calling parseXML()?
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
// Is the parsen content in the Macro correct ?
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -172,12 +172,12 @@ void XMLHandlerTests::testCorrectDomElement()
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
// Transform back by calling toXML().
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
// Test the Compare-method when a Variable will change, it must fail.
macro->items().first()->variable("teststring")->setVariant("bla");
- isvariableok.replace("teststring",false);
+ isvariableok.tqreplace("teststring",false);
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
}
@@ -185,9 +185,9 @@ void XMLHandlerTests::testCorrectDomElement()
void XMLHandlerTests::testBadRoot()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -197,23 +197,23 @@ void XMLHandlerTests::testBadRoot()
"</item>"
"</maro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 3.Test - XML-document with a missing Variable.
void XMLHandlerTests::testMissingVariable()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -222,16 +222,16 @@ void XMLHandlerTests::testMissingVariable()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -239,9 +239,9 @@ void XMLHandlerTests::testMissingVariable()
void XMLHandlerTests::testMoreVariables()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -252,10 +252,10 @@ void XMLHandlerTests::testMoreVariables()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
@@ -263,7 +263,7 @@ void XMLHandlerTests::testMoreVariables()
isvariableok["testbla"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -271,9 +271,9 @@ void XMLHandlerTests::testMoreVariables()
void XMLHandlerTests::testWrongVersion()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -283,14 +283,14 @@ void XMLHandlerTests::testWrongVersion()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 6.Test - XML-document if it has a wrong structure like wrong parathesis
@@ -298,9 +298,9 @@ void XMLHandlerTests::testWrongVersion()
void XMLHandlerTests::testWrongXMLStruct()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"macro xmlversion=\"1\">>"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -308,23 +308,23 @@ void XMLHandlerTests::testWrongXMLStruct()
"</item>"
"</macro>");
KOMACROTEST_XASSERT(doomdocument.setContent(xml),true);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_XASSERT(macro->parseXML(elem),true);
//no assertMacroContentEqToXML(), because parsing failed.
- assertMacroContentEqToXML(macro,elem,true,false,QMap<QString,bool>());
+ assertMacroContentEqToXML(macro,elem,true,false,TQMap<TQString,bool>());
- const QDomElement elem2 = macro->toXML();
- assertMacroContentEqToXML(macro,elem2,true,false,QMap<QString,bool>());
+ const TQDomElement elem2 = macro->toXML();
+ assertMacroContentEqToXML(macro,elem2,true,false,TQMap<TQString,bool>());
}
// 7.Test-XML-document with maximum field-size.
void XMLHandlerTests::testMaxNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -332,19 +332,19 @@ void XMLHandlerTests::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- QDomElement elem2 = macro->toXML();
+ TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -352,9 +352,9 @@ void XMLHandlerTests::testMaxNum()
void XMLHandlerTests::testMaxNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -362,19 +362,19 @@ void XMLHandlerTests::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -382,9 +382,9 @@ void XMLHandlerTests::testMaxNum2()
void XMLHandlerTests::testMinNum()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -392,19 +392,19 @@ void XMLHandlerTests::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -412,9 +412,9 @@ void XMLHandlerTests::testMinNum()
void XMLHandlerTests::testMinNum2()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -422,19 +422,19 @@ void XMLHandlerTests::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -442,9 +442,9 @@ void XMLHandlerTests::testMinNum2()
void XMLHandlerTests::testBigNumber()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -452,19 +452,19 @@ void XMLHandlerTests::testBigNumber()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %1 </variable>"
"</item>"
- "</macro>").arg(DBL_MAX+1);
+ "</macro>").tqarg(DBL_MAX+1);
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
@@ -472,9 +472,9 @@ void XMLHandlerTests::testBigNumber()
void XMLHandlerTests::testTwoMacroItems()
{
KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -492,17 +492,17 @@ void XMLHandlerTests::testTwoMacroItems()
"</item>"
"</macro>");
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
KOMACROTEST_ASSERT(macro->parseXML(elem),true);
- QMap<QString,bool> isvariableok;
+ TQMap<TQString,bool> isvariableok;
isvariableok["teststring"] = true;
isvariableok["testint"] = true;
isvariableok["testbool"] = true;
isvariableok["testdouble"] = true;
assertMacroContentEqToXML(macro,elem,false,true,isvariableok);
- const QDomElement elem2 = macro->toXML();
+ const TQDomElement elem2 = macro->toXML();
assertMacroContentEqToXML(macro,elem2,false,true,isvariableok);
}
/***************************************************************************
@@ -512,20 +512,20 @@ void XMLHandlerTests::testTwoMacroItems()
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
-* @p elem The given @a QDomElement which is parsen.
+* @p elem The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
-* @p isvariableok QMap of Bools for comparing each @a Variable .
+* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok)
+ const TQMap<TQString, bool> isvariableok)
{
// Make an Iterator over the MacroItems of the Macro.
- const QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
+ const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
mit(macroitems.constBegin()), end(macroitems.constEnd());
//1.comparison - Is the MacroItem-list empty?
@@ -541,12 +541,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Got to the first item-elements of the elem (there is only one in the tests).
- QDomNode itemnode = elem.firstChild();
+ TQDomNode itemnode = elem.firstChild();
// Iterate over the MacroItems and item-elements.
while(mit != end && ! itemnode.isNull()) {
const KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
- const QDomElement itemelem = itemnode.toElement();
+ const TQDomElement itemelem = itemnode.toElement();
//2.comparison - Is the Action-name equal?
{
@@ -563,25 +563,25 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Go down to MacroItem->Variable and item->variable and compare them.
- QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
- QDomNode varnode = itemelem.firstChild();
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
+ TQDomNode varnode = itemelem.firstChild();
while ( ! varnode.isNull()) {
- const QDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
+ const TQDomElement varelem = varnode.toElement();
+ const KSharedPtr<KoMacro::Variable> varitem = mvariables.tqfind(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
{
- const bool var = *isvariableok.find(varelem.attribute("name"));
+ const bool var = *isvariableok.tqfind(varelem.attribute("name"));
if( ! var ) {
- KOMACROTEST_XASSERT(varitem->variant() == QVariant(varelem.text()), !var);
+ KOMACROTEST_XASSERT(varitem->variant() == TQVariant(varelem.text()), !var);
kdDebug() << "The content of the Variable: " << varitem->name()
<< " is not equal." << varitem->variant()
<< "!=" << varelem.text() << endl;
}
else {
- KOMACROTEST_ASSERT(varitem->variant() == QVariant(varelem.text()), var);
+ KOMACROTEST_ASSERT(varitem->variant() == TQVariant(varelem.text()), var);
}
}
@@ -604,11 +604,11 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
}
-// Prints a QMap of Variables to kdDebug().
-void XMLHandlerTests::printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s)
+// Prints a TQMap of Variables to kdDebug().
+void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s)
{
- //QValueList<QString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
- QMap<QString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
+ //TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
+ TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
while(mvit != end){
const KoMacro::Variable * v = *mvit;
kdDebug() << s << ": " << v->name() << endl;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.h b/kexi/plugins/macros/tests/xmlhandlertests.h
index c78a8c79..3e67742f 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -71,23 +72,23 @@ namespace KoMacroTest {
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index 2234eaae..ac176f89 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -29,7 +29,7 @@
#include <ostream>
#include <cfloat>
-#include <qdom.h>
+#include <tqdom.h>
#include <kdebug.h>
#include <kunittest/runner.h>
@@ -65,7 +65,7 @@ namespace KoMacroTest {
/**
* An @a TestObject instance used internaly to test
- * handling and communication with from QObject
+ * handling and communication with from TQObject
* inheritated instances.
*/
KSharedPtr<KoMacro::Action> testaction;
@@ -76,11 +76,11 @@ namespace KoMacroTest {
KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
/**
- * Represents a @a QValuList of @a MacroItem which are parsen in the
+ * Represents a @a TQValuList of @a MacroItem which are parsen in the
* correspondig @a Macro .
*/
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
- QValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
+ TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
/**
* @a MacroItem instances which ist fillen manually from the given XML
@@ -186,7 +186,7 @@ void XMLHandlerTests2::testCorrectDomElement()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -196,9 +196,9 @@ void XMLHandlerTests2::testCorrectDomElement()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -207,10 +207,10 @@ void XMLHandlerTests2::testCorrectDomElement()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -241,8 +241,8 @@ void XMLHandlerTests2::testCorrectDomElement()
varint->setVariant(117);
d->macroitem2->variable("testint")->setVariant(117);
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -279,7 +279,7 @@ void XMLHandlerTests2::testBadRoot()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -289,9 +289,9 @@ void XMLHandlerTests2::testBadRoot()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -300,10 +300,10 @@ void XMLHandlerTests2::testBadRoot()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -319,7 +319,7 @@ void XMLHandlerTests2::testMissingVariable()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -328,9 +328,9 @@ void XMLHandlerTests2::testMissingVariable()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -339,9 +339,9 @@ void XMLHandlerTests2::testMissingVariable()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -367,8 +367,8 @@ void XMLHandlerTests2::testMissingVariable()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -403,7 +403,7 @@ void XMLHandlerTests2::testMoreVariables()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -414,9 +414,9 @@ void XMLHandlerTests2::testMoreVariables()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -425,10 +425,10 @@ void XMLHandlerTests2::testMoreVariables()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -457,8 +457,8 @@ void XMLHandlerTests2::testMoreVariables()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -496,7 +496,7 @@ void XMLHandlerTests2::testWrongVersion()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<maro xmlversion=\"2\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -506,9 +506,9 @@ void XMLHandlerTests2::testWrongVersion()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -517,10 +517,10 @@ void XMLHandlerTests2::testWrongVersion()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -538,7 +538,7 @@ void XMLHandlerTests2::testWrongXMLStruct()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"maro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -548,9 +548,9 @@ void XMLHandlerTests2::testWrongXMLStruct()
"</item>"
"</maro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -559,10 +559,10 @@ void XMLHandlerTests2::testWrongXMLStruct()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_XASSERT(d->macro2->parseXML(elem),true);
@@ -578,7 +578,7 @@ void XMLHandlerTests2::testMaxNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -586,11 +586,11 @@ void XMLHandlerTests2::testMaxNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX).arg(DBL_MAX);
+ "</macro>").tqarg(INT_MAX).tqarg(DBL_MAX);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -599,10 +599,10 @@ void XMLHandlerTests2::testMaxNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -629,8 +629,8 @@ void XMLHandlerTests2::testMaxNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -666,7 +666,7 @@ void XMLHandlerTests2::testMaxNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -674,11 +674,11 @@ void XMLHandlerTests2::testMaxNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MAX+1).arg(DBL_MAX+1);
+ "</macro>").tqarg(INT_MAX+1).tqarg(DBL_MAX+1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -687,10 +687,10 @@ void XMLHandlerTests2::testMaxNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MAX+1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MAX+1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MAX+1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -717,8 +717,8 @@ void XMLHandlerTests2::testMaxNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -754,7 +754,7 @@ void XMLHandlerTests2::testMinNum()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -762,11 +762,11 @@ void XMLHandlerTests2::testMinNum()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN).arg(DBL_MIN);
+ "</macro>").tqarg(INT_MIN).tqarg(DBL_MIN);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -775,10 +775,10 @@ void XMLHandlerTests2::testMinNum()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -805,8 +805,8 @@ void XMLHandlerTests2::testMinNum()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -842,7 +842,7 @@ void XMLHandlerTests2::testMinNum2()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -850,11 +850,11 @@ void XMLHandlerTests2::testMinNum2()
"<variable name=\"testbool\" >true</variable>"
"<variable name=\"testdouble\" > %2 </variable>"
"</item>"
- "</macro>").arg(INT_MIN-1).arg(DBL_MIN-1);
+ "</macro>").tqarg(INT_MIN-1).tqarg(DBL_MIN-1);
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -863,10 +863,10 @@ void XMLHandlerTests2::testMinNum2()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(INT_MIN-1));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(DBL_MIN-1));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(DBL_MIN-1));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -893,8 +893,8 @@ void XMLHandlerTests2::testMinNum2()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -930,7 +930,7 @@ void XMLHandlerTests2::testBigNumber()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -940,9 +940,9 @@ void XMLHandlerTests2::testBigNumber()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -951,10 +951,10 @@ void XMLHandlerTests2::testBigNumber()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0123456789012345678901234567890123456789));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ //TODO //KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -981,8 +981,8 @@ void XMLHandlerTests2::testBigNumber()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1018,7 +1018,7 @@ void XMLHandlerTests2::testTwoMacroItems()
// Part 1: From XML to a Macro.
// Test-XML-document with normal allocated variables.
- const QString xml = QString("<!DOCTYPE macros>"
+ const TQString xml = TQString("<!DOCTYPE macros>"
"<macro xmlversion=\"1\">"
"<item action=\"testaction\" >"
"<variable name=\"teststring\" >test_string</variable>"
@@ -1036,9 +1036,9 @@ void XMLHandlerTests2::testTwoMacroItems()
"</item>"
"</macro>");
// Set the XML-document with the above string.
- QDomDocument doomdocument;
+ TQDomDocument doomdocument;
doomdocument.setContent(xml);
- const QDomElement elem = doomdocument.documentElement();
+ const TQDomElement elem = doomdocument.documentElement();
// Create a MacroItem with the TestAction for macro2 and add it to macro.
d->macroitem = new KoMacro::MacroItem();
@@ -1050,17 +1050,17 @@ void XMLHandlerTests2::testTwoMacroItems()
d->macroitem_2->setAction(d->testaction_2);
// Push the Variables into the macroitem.
- KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",QVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",QVariant(0));
- KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",QVariant(true));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",QVariant(0.6));
+ KSharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ KSharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
KSharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Push the Variables into the macroitem4.
- KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",QVariant("testString2"));
- KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",QVariant(4));
- KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",QVariant(false));
- KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",QVariant(0.7));
+ KSharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2"));
+ KSharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4));
+ KSharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false));
+ KSharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7));
KSharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2");
// Is our XML parseable into a 2. Macro by calling parseXML()?
@@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
// 2a.comparison - Test if the Action is correct?
d->macroitem2 = *mit2;
mit2++;
@@ -1101,8 +1101,8 @@ void XMLHandlerTests2::testTwoMacroItems()
}
}
- // Now convert the parsen macro2 back to a QDomElement and again into macro3 for a better comparison.
- const QDomElement elem2 = d->macro2->toXML();
+ // Now convert the parsen macro2 back to a TQDomElement and again into macro3 for a better comparison.
+ const TQDomElement elem2 = d->macro2->toXML();
KOMACROTEST_ASSERT(d->macro3->parseXML(elem2),true);
// Go down to the MacroItem of macro2.
@@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2);
{
- QValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
+ TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
// 2b.comparison - Test if the Action is correct?
d->macroitem3 = *mit3;
mit3++;
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h
index 0a3fee3a..d8f92aaf 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.h
@@ -31,6 +31,7 @@ namespace KoMacroTest {
class XMLHandlerTests2 : public KUnitTest::SlotTester
{
Q_OBJECT
+ TQ_OBJECT
public:
/**
@@ -68,29 +69,29 @@ namespace KoMacroTest {
/// @internal d-pointer instance.
Private* const d;
- typedef QMap<QString,KoMacro::Variable>::size_type sizetypemap;
- typedef QValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
+ typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap;
+ typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
* @p macro The parsen @a Macro.
- * @p domelement The given @a QDomElement which is parsen.
+ * @p domelement The given @a TQDomElement which is parsen.
* @p isitemsempty Bool for expectation of an empty @a MacroItem -List.
* @p isactionset Bool for expectation that the @a Action -names are equal.
- * @p isvariableok QMap of Bools for comparing each @a Variable .
+ * @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
- const QDomElement& elem,
+ const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
- const QMap<QString, bool> isvariableok);
+ const TQMap<TQString, bool> isvariableok);
- // Prints a QMap of Variables to kdDebug().
- void printMvariables(const QMap<QString, KSharedPtr<KoMacro::Variable > > mvariables, const QString s);
+ // Prints a TQMap of Variables to kdDebug().
+ void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
*/
/**
* Sub-methods of testParseXML() and testToXML().
- * Test the correct parsing of a @a QDomElement into a @a Macro
+ * Test the correct parsing of a @a TQDomElement into a @a Macro
* respectively expected failure of parsing. Then transform it
* back and compare it.
*/