summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/tests
diff options
context:
space:
mode:
Diffstat (limited to 'kexi/plugins/macros/tests')
-rw-r--r--kexi/plugins/macros/tests/actiontests.cpp18
-rw-r--r--kexi/plugins/macros/tests/commontests.cpp80
-rw-r--r--kexi/plugins/macros/tests/macroitemtests.cpp24
-rw-r--r--kexi/plugins/macros/tests/macrotests.cpp12
-rw-r--r--kexi/plugins/macros/tests/testaction.cpp6
-rw-r--r--kexi/plugins/macros/tests/testaction.h4
-rw-r--r--kexi/plugins/macros/tests/variabletests.cpp24
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp42
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.h4
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.cpp154
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests2.h14
11 files changed, 191 insertions, 191 deletions
diff --git a/kexi/plugins/macros/tests/actiontests.cpp b/kexi/plugins/macros/tests/actiontests.cpp
index 26e38b32..912d9ff3 100644
--- a/kexi/plugins/macros/tests/actiontests.cpp
+++ b/kexi/plugins/macros/tests/actiontests.cpp
@@ -73,11 +73,11 @@ namespace KoMacroTest {
TQDomDocument* doomdocument;
- KSharedPtr<KoMacro::Macro> macro;
+ TDESharedPtr<KoMacro::Macro> macro;
- TQValueList< KSharedPtr<KoMacro::MacroItem> > items;
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> > items;
- KSharedPtr<KoMacro::Action> actionptr;
+ TDESharedPtr<KoMacro::Action> actionptr;
Private()
: xmlguiclient(0)
@@ -90,7 +90,7 @@ namespace KoMacroTest {
};
}
-typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype;
ActionTests::ActionTests()
@@ -147,7 +147,7 @@ void ActionTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- //TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ //TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( d->items.count(), sizetype(0) );
@@ -158,7 +158,7 @@ void ActionTests::testAction()
kdDebug()<<"===================== testAction() ======================" << endl;
//get it
- //KSharedPtr<KoMacro::Action> actionptr = d->items[0]->action();
+ //TDESharedPtr<KoMacro::Action> actionptr = d->items[0]->action();
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(d->actionptr.data()), sizetype(0));
}
@@ -167,7 +167,7 @@ void ActionTests::testText()
{
kdDebug()<<"===================== testText() ======================" << endl;
- //KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
const TQString leetSpeech = "']['3 $']['";
@@ -184,7 +184,7 @@ void ActionTests::testName()
{
kdDebug()<<"===================== testName() ======================" << endl;
- //KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check name
KOMACROTEST_ASSERT(d->actionptr->name(),TQString("testaction"));
@@ -198,7 +198,7 @@ void ActionTests::testComment()
{
kdDebug()<<"===================== testComment() ======================" << endl;
- //KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ //TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//check comment
KOMACROTEST_XASSERT(d->actionptr->comment(),TQString("No Comment!"));
diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp
index 41234eca..9d43ac41 100644
--- a/kexi/plugins/macros/tests/commontests.cpp
+++ b/kexi/plugins/macros/tests/commontests.cpp
@@ -94,7 +94,7 @@ namespace KoMacroTest {
}
-typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype;
CommonTests::CommonTests()
: KUnitTest::SlotTester()
@@ -164,7 +164,7 @@ void CommonTests::testAction()
TQDomElement const domelement = d->doomdocument->documentElement();
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
@@ -172,19 +172,19 @@ void CommonTests::testAction()
//??
macro->execute(this);
- //create list of KSharedPtr from the childs of the macro
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ //create list of TDESharedPtr from the childs of the macro
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//How do we know that an action exist ?
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//fetch the "teststring"-variable
- KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable("teststring");
+ TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable("teststring");
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
@@ -249,7 +249,7 @@ 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: TQStringList KoMacro::MacroItem::setVariable(const TQString&, KSharedPtr<KoMacro::Variable>)
+ //../lib/macroitem.h:131: note: candidates are: TQStringList KoMacro::MacroItem::setVariable(const TQString&, TDESharedPtr<KoMacro::Variable>)
//../lib/macroitem.h:137: note: TQStringList KoMacro::MacroItem::setVariable(const TQString&, const TQVariant&)
macroitem->setVariable("testint",(int) 0);
@@ -285,7 +285,7 @@ void CommonTests::testXmlhandler()
kdDebug()<<"===================== testXmlhandler() ======================" << endl;
// Local Init
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomElement domelement;
// Save old doomdocument
@@ -428,9 +428,9 @@ void CommonTests::testFunction()
"</function>"
));
- //create an KomacroFunction with our data, and put it into a KSharedPtr
- KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
- //cast KSharedPtr to KoMacro-"Function"
+ //create an KomacroFunction with our data, and put it into a TDESharedPtr
+ TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //cast TDESharedPtr to KoMacro-"Function"
KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() );
//check that function is not null
KOMACROTEST_XASSERT((int) func, 0);
@@ -449,12 +449,12 @@ void CommonTests::testFunction()
KOMACROTEST_ASSERT( TQString(func->slot()), TQString("myslot(const TQString&,int)") );
//create KoMacro-MetaObject from receiverObject
- KSharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
+ TDESharedPtr<KoMacro::MetaObject> receivermetaobject = func->receiverObject();
//check that receivermetaobject.data is not null
KOMACROTEST_XASSERT((int) receivermetaobject.data(), 0);
//create KoMacro-MetaMethod from receiverObject
- KSharedPtr<KoMacro::MetaMethod> receivermetamethod = receivermetaobject->slot( func->slot().latin1() );
+ TDESharedPtr<KoMacro::MetaMethod> receivermetamethod = receivermetaobject->slot( func->slot().latin1() );
//check that receivermetamethod.data is not null
KOMACROTEST_XASSERT((int) receivermetamethod.data(), 0);
@@ -469,7 +469,7 @@ void CommonTests::testFunction()
// firstrun we have a TQString, secondrun we have an int
switch(i) {
case 0: { // returnvalue
- KOMACROTEST_ASSERT(*it, KSharedPtr<KoMacro::Variable>(NULL));
+ KOMACROTEST_ASSERT(*it, TDESharedPtr<KoMacro::Variable>(NULL));
} break;
case 1: { // first parameter
//check first variable of func is the same as argument1
@@ -491,10 +491,10 @@ void CommonTests::testFunction()
KOMACROTEST_ASSERT( funcvariables.count(), uint(3) );
// check that the first argument (the returnvalue) is empty
- KOMACROTEST_ASSERT( funcvariables[0], KSharedPtr<KoMacro::Variable>(NULL) );
+ KOMACROTEST_ASSERT( funcvariables[0], TDESharedPtr<KoMacro::Variable>(NULL) );
//create a KoMacro-Variable-Ptr from first func argument
- KSharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
+ TDESharedPtr<KoMacro::Variable> stringvar = funcvariables[1];
//check that it is not null
KOMACROTEST_XASSERT((int) stringvar.data(),0);
//check via TQVariant type that stringvar is from Type Variant
@@ -505,7 +505,7 @@ void CommonTests::testFunction()
KOMACROTEST_ASSERT( stringvar->toString(), argument1 );
//create a KoMacro-Variable-Ptr from second func argument
- KSharedPtr<KoMacro::Variable> intvar = funcvariables[2];
+ TDESharedPtr<KoMacro::Variable> intvar = funcvariables[2];
//check that it is not null
KOMACROTEST_XASSERT((int) intvar.data(), 0);
//check via TQVariant type that stringvar is from Type Variant
@@ -516,7 +516,7 @@ void CommonTests::testFunction()
KOMACROTEST_ASSERT( intvar->toInt(), argument2 );
//returnvalue see testobject ....
- KSharedPtr<KoMacro::Variable> funcreturnvalue = receivermetamethod->invoke( funcvariables );
+ TDESharedPtr<KoMacro::Variable> funcreturnvalue = receivermetamethod->invoke( funcvariables );
kdDebug() << "CommonTests::testFunction() RETURNVALUE =====> " << funcreturnvalue->toString() << endl;
KOMACROTEST_ASSERT( funcreturnvalue->toInt(), argument2 );
@@ -543,8 +543,8 @@ void CommonTests::testIntFunction()
"</function>"
));
- //create an KomacroFunction with our data, and put it into a KSharedPtr
- KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //create an KomacroFunction with our data, and put it into a TDESharedPtr
+ TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//Cast data to function
KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() );
//check that it is not null
@@ -573,8 +573,8 @@ void CommonTests::testDoubleFunction()
"</function>"
));
- //create an KomacroFunction with our data, and put it into a KSharedPtr
- KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //create an KomacroFunction with our data, and put it into a TDESharedPtr
+ TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//Cast data to function
KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() );
//check that it is not null
@@ -602,8 +602,8 @@ void CommonTests::testTQStringFunction()
"</function>"
));
- //create an KomacroFunction with our data, and put it into a KSharedPtr
- KSharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //create an KomacroFunction with our data, and put it into a TDESharedPtr
+ TDESharedPtr<KoMacro::Action> functionptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//Cast data to function
KoMacro::Function* func = dynamic_cast<KoMacro::Function*>( functionptr.data() );
//check that it is not null
@@ -621,7 +621,7 @@ void CommonTests::testMacro()
TQDomElement const domelement = d->doomdocument->documentElement();
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro->parseXML(domelement),true);
@@ -639,7 +639,7 @@ void CommonTests::testMacro()
// ));
//
// //create Macro
-// // KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+// // TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
// //cast data to Macro
// KoMacro::Macro* macro = dynamic_cast<KoMacro::Macro*>( macroptr.data() );
//check that it is not null
@@ -661,11 +661,11 @@ void CommonTests::testMacro()
*/
//create list of KsharedPtr from the childs of the macro
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = macro->items();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = macro->items();
//check that there is one
KOMACROTEST_ASSERT( items.count(), sizetype(1) );
//fetch the first one
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//How do we know that an action exist ?
//-> check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
@@ -677,7 +677,7 @@ void CommonTests::testMacro()
// KOMACROTEST_ASSERT( actionptr->comment(), TQString("") );
/*
//fetch the second one
- KSharedPtr<KoMacro::Action> myfuncptr = children[1];
+ TDESharedPtr<KoMacro::Action> myfuncptr = children[1];
//cast it to function
KoMacro::Function* myfunc = dynamic_cast<KoMacro::Function*>( myfuncptr.data() );
@@ -700,12 +700,12 @@ void CommonTests::testMacro()
myfunc->activate();
*/
//create another macro
- KSharedPtr<KoMacro::Macro> yanMacro = KoMacro::Manager::self()->createMacro("testMacro2");
+ TDESharedPtr<KoMacro::Macro> yanMacro = KoMacro::Manager::self()->createMacro("testMacro2");
KOMACROTEST_ASSERT(yanMacro->parseXML(domelement),true);
//create two more macros
- //KSharedPtr<KoMacro::Action> yanActionptr2 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
- //KSharedPtr<KoMacro::Action> yanActionptr3 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //TDESharedPtr<KoMacro::Action> yanActionptr2 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ //TDESharedPtr<KoMacro::Action> yanActionptr3 = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//check that they aren?t null
KOMACROTEST_XASSERT(sizetype(yanMacro.data()), sizetype(0));
@@ -713,7 +713,7 @@ void CommonTests::testMacro()
//KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0);
//create a list of the children from yanMacro
- //TQValueList< KSharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
+ //TQValueList< TDESharedPtr<KoMacro::Action> > yanChildren = yanMacro->children();
//check that there are two
//KOMACROTEST_ASSERT(yanChildren.count(), uint(2));
/*
@@ -769,7 +769,7 @@ void CommonTests::testDom() {
"</function>"
));
//create functiom
- KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//try to execute function and catch exception
KOMACROTEST_ASSERTEXCEPTION(KoMacro::Exception&, macroptr->activate());
@@ -853,21 +853,21 @@ void CommonTests::testVariables()
));
//create an macro
- KSharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
+ TDESharedPtr<KoMacro::Action> macroptr = ::KoMacro::Manager::self()->createAction( domdocument.documentElement() );
//cast data to macro
KoMacro::Macro* macro = dynamic_cast<KoMacro::Macro*>( macroptr.data() );
//check that it is not null
KOMACROTEST_XASSERT((int) macro, 0);
//create a list of its children
- TQValueList< KSharedPtr<KoMacro::Action> > children = macro->children();
+ TQValueList< TDESharedPtr<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];
+ TDESharedPtr<KoMacro::Action> func1ptr = children[1];
//create new context
- KSharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
+ TDESharedPtr<KoMacro::Context> context = new KoMacro::Context(macroptr);
{
//try to execute function with non-functional variable
@@ -882,7 +882,7 @@ void CommonTests::testVariables()
//execute function
func1ptr->activate(context);
//fetch return value
- KSharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable");
+ TDESharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable");
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is "Some String"
@@ -895,7 +895,7 @@ void CommonTests::testVariables()
//execute function
func1ptr->activate(context);
//fetch return value
- KSharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable");
+ TDESharedPtr<KoMacro::Variable> returnvariable = context->variable("$MyReturnVariable");
//check that it is not null
KOMACROTEST_XASSERT( (int) returnvariable.data(), 0);
//check that it is 12345
diff --git a/kexi/plugins/macros/tests/macroitemtests.cpp b/kexi/plugins/macros/tests/macroitemtests.cpp
index 0ac780b0..044808d7 100644
--- a/kexi/plugins/macros/tests/macroitemtests.cpp
+++ b/kexi/plugins/macros/tests/macroitemtests.cpp
@@ -71,7 +71,7 @@ namespace KoMacroTest {
TQDomDocument* doomdocument;
- KSharedPtr<KoMacro::Macro> macro;
+ TDESharedPtr<KoMacro::Macro> macro;
Private()
: xmlguiclient(0)
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroitemTests::MacroitemTests()
: KUnitTest::SlotTester()
@@ -136,7 +136,7 @@ void MacroitemTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -148,9 +148,9 @@ void MacroitemTests::testMacroItemString()
kdDebug()<<"===================== testMacroItemString() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
- KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
//create new macroitem for testing
KoMacro::MacroItem* macroitem = new KoMacro::MacroItem();
@@ -185,8 +185,8 @@ void MacroitemTests::testMacroItemInt()
kdDebug()<<"===================== testMacroItemInt() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
KoMacro::MacroItem* macroitem = new KoMacro::MacroItem();
@@ -195,7 +195,7 @@ void MacroitemTests::testMacroItemInt()
items.append(macroitem);
macroitem->setVariable(TESTINT,INT_MIN);
- KSharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTINT);
+ TDESharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTINT);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(sizetype(variableptr->variant().toInt()),sizetype(INT_MIN));
@@ -226,8 +226,8 @@ void MacroitemTests::testMacroItemBool()
kdDebug()<<"===================== testMacroItemBool() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//create new macroitem for testing
KoMacro::MacroItem* macroitem = new KoMacro::MacroItem();
@@ -236,7 +236,7 @@ void MacroitemTests::testMacroItemBool()
items.append(macroitem);
macroitem->setVariable(TESTBOOL,"false");
- KSharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTBOOL);
+ TDESharedPtr<KoMacro::Variable> variableptr = macroitem->variable(TESTBOOL);
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
KOMACROTEST_ASSERT(variableptr->variant().toBool(),false);
}
diff --git a/kexi/plugins/macros/tests/macrotests.cpp b/kexi/plugins/macros/tests/macrotests.cpp
index d5d2c2af..7a5f30d0 100644
--- a/kexi/plugins/macros/tests/macrotests.cpp
+++ b/kexi/plugins/macros/tests/macrotests.cpp
@@ -83,7 +83,7 @@ namespace KoMacroTest {
};
}
-typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype;
MacroTests::MacroTests()
@@ -136,8 +136,8 @@ void MacroTests::testMacro()
TQDomElement const domelement = d->doomdocument->documentElement();
- KSharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
- KSharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro1 = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro2 = KoMacro::Manager::self()->createMacro("testMacro");
//Is our XML parseable ?
KOMACROTEST_ASSERT(macro1->parseXML(domelement),true);
KOMACROTEST_ASSERT(macro2->parseXML(domelement),true);
@@ -150,8 +150,8 @@ void MacroTests::testMacro()
KOMACROTEST_ASSERT(macro1->name(), macro2->name() );
//create list of KsharedPtr from the childs of the macro
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items1 = macro1->items();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items2 = macro2->items();
//check that there is one
KOMACROTEST_XASSERT( items1.count(), sizetype(0) );
@@ -174,7 +174,7 @@ void MacroTests::testMacro()
}
//fetch the first one
- KSharedPtr<KoMacro::Action> actionptr = items1[0]->action();
+ TDESharedPtr<KoMacro::Action> actionptr = items1[0]->action();
//check that it is not null
KOMACROTEST_XASSERT(sizetype(actionptr.data()), sizetype(0));
//check that it has the right name
diff --git a/kexi/plugins/macros/tests/testaction.cpp b/kexi/plugins/macros/tests/testaction.cpp
index 845acd5f..4e7bb67b 100644
--- a/kexi/plugins/macros/tests/testaction.cpp
+++ b/kexi/plugins/macros/tests/testaction.cpp
@@ -43,16 +43,16 @@ TestAction::~TestAction()
{
}
-bool TestAction::notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
+bool TestAction::notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name)
{
Q_UNUSED(macroitem);
Q_UNUSED(name);
return true;
}
-void TestAction::activate(KSharedPtr<KoMacro::Context> context)
+void TestAction::activate(TDESharedPtr<KoMacro::Context> context)
{
- kdDebug() << "TestAction::activate(KSharedPtr<Context>)" << endl;
+ kdDebug() << "TestAction::activate(TDESharedPtr<Context>)" << endl;
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 43ce74bb..bb41e5fb 100644
--- a/kexi/plugins/macros/tests/testaction.h
+++ b/kexi/plugins/macros/tests/testaction.h
@@ -63,7 +63,7 @@ namespace KoMacroTest {
* @return true if the update was successfully else false
* is returned.
*/
- virtual bool notifyUpdated(KSharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
+ virtual bool notifyUpdated(TDESharedPtr<KoMacro::MacroItem> macroitem, const TQString& name);
public slots:
@@ -71,7 +71,7 @@ namespace KoMacroTest {
* Called if the @a Action should be executed within the
* defined @p context .
*/
- virtual void activate(KSharedPtr<KoMacro::Context> context);
+ virtual void activate(TDESharedPtr<KoMacro::Context> context);
};
}
diff --git a/kexi/plugins/macros/tests/variabletests.cpp b/kexi/plugins/macros/tests/variabletests.cpp
index c9724639..4efe3953 100644
--- a/kexi/plugins/macros/tests/variabletests.cpp
+++ b/kexi/plugins/macros/tests/variabletests.cpp
@@ -73,7 +73,7 @@ namespace KoMacroTest {
TQDomDocument* doomdocument;
- KSharedPtr<KoMacro::Macro> macro;
+ TDESharedPtr<KoMacro::Macro> macro;
Private()
: xmlguiclient(0)
@@ -85,7 +85,7 @@ namespace KoMacroTest {
};
}
-typedef TQValueList< KSharedPtr<KoMacro::MacroItem> >::size_type sizetype;
+typedef TQValueList< TDESharedPtr<KoMacro::MacroItem> >::size_type sizetype;
/******************************************************************************
* This is an xtra big TODO:
@@ -144,7 +144,7 @@ void VariableTests::testMacro()
kdDebug()<<"===================== testMacro() ======================" << endl;
//fetch Items and ..
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
//... check that there is one
KOMACROTEST_XASSERT( items.count(), sizetype(0) );
@@ -152,11 +152,11 @@ void VariableTests::testMacro()
void VariableTests::testVariableString() {
kdDebug()<<"===================== testVariableString() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "teststring"-variable
- KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
+ TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTSTRING);
//So there is a variable, does hasVariable() work ?
KOMACROTEST_ASSERT(actionptr->hasVariable(TESTSTRING),true);
//check count of variables
@@ -185,11 +185,11 @@ void VariableTests::testVariableString() {
void VariableTests::testVariableInt() {
kdDebug()<<"===================== testVariableInt() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testint"-variable
- KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTINT);
+ TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTINT);
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is 0
@@ -218,11 +218,11 @@ void VariableTests::testVariableInt() {
void VariableTests::testVariableBool() {
kdDebug()<<"===================== testVariableBool() ======================" << endl;
- TQValueList< KSharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
- KSharedPtr<KoMacro::Action> actionptr = items[0]->action();
+ TQValueList< TDESharedPtr<KoMacro::MacroItem> >& items = d->macro->items();
+ TDESharedPtr<KoMacro::Action> actionptr = items[0]->action();
//fetch the "testbool"-variable
- KSharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTBOOL);
+ TDESharedPtr<KoMacro::Variable> variableptr = actionptr->variable(TESTBOOL);
//check that it is not null
KOMACROTEST_XASSERT(sizetype(variableptr.data()), sizetype(0));
//check that it is " "
diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp
index 9627a00b..971c85db 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp
@@ -61,7 +61,7 @@ namespace KoMacroTest {
* handling and communication with from TQObject
* inheritated instances.
*/
- KSharedPtr<KoMacro::Action> testaction;
+ TDESharedPtr<KoMacro::Action> testaction;
Private()
: xmlguiclient(0)
@@ -143,7 +143,7 @@ void XMLHandlerTests::testParseAndToXML()
void XMLHandlerTests::testCorrectDomElement()
{
// Local Init
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
// Part 1: From XML to a Macro.
@@ -184,7 +184,7 @@ void XMLHandlerTests::testCorrectDomElement()
// 2.Test - XML-document with bad root element.
void XMLHandlerTests::testBadRoot()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -210,7 +210,7 @@ void XMLHandlerTests::testBadRoot()
// 3.Test - XML-document with a missing Variable.
void XMLHandlerTests::testMissingVariable()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -238,7 +238,7 @@ void XMLHandlerTests::testMissingVariable()
// 4.Test - One more Variable in XML-Document.
void XMLHandlerTests::testMoreVariables()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -270,7 +270,7 @@ void XMLHandlerTests::testMoreVariables()
// 5.Test - XML-document with wrong macro-xmlversion.
void XMLHandlerTests::testWrongVersion()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -297,7 +297,7 @@ void XMLHandlerTests::testWrongVersion()
// or missing end tag.
void XMLHandlerTests::testWrongXMLStruct()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -321,7 +321,7 @@ void XMLHandlerTests::testWrongXMLStruct()
// 7.Test-XML-document with maximum field-size.
void XMLHandlerTests::testMaxNum()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -351,7 +351,7 @@ void XMLHandlerTests::testMaxNum()
// 8.Test-XML-document with maximum+1 field-size.
void XMLHandlerTests::testMaxNum2()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -381,7 +381,7 @@ void XMLHandlerTests::testMaxNum2()
// 9.Test-XML-document with minimum field-size.
void XMLHandlerTests::testMinNum()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -411,7 +411,7 @@ void XMLHandlerTests::testMinNum()
// 10.Test-XML-document with minimum+1 field-size.
void XMLHandlerTests::testMinNum2()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -441,7 +441,7 @@ void XMLHandlerTests::testMinNum2()
// 11.Test - With a to big number.
void XMLHandlerTests::testBigNumber()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -471,7 +471,7 @@ void XMLHandlerTests::testBigNumber()
// 12.Test - With two MacroItems.
void XMLHandlerTests::testTwoMacroItems()
{
- KSharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
+ TDESharedPtr<KoMacro::Macro> macro = KoMacro::Manager::self()->createMacro("testMacro");
TQDomDocument doomdocument;
const TQString xml = TQString("<!DOCTYPE macros>"
@@ -517,15 +517,15 @@ void XMLHandlerTests::testTwoMacroItems()
* @p isactionset Bool for expectation that the @a Action -names are equal.
* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
-void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
+void XMLHandlerTests::assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro,
const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
const TQMap<TQString, bool> isvariableok)
{
// Make an Iterator over the MacroItems of the Macro.
- const TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
- TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator
+ const TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems = macro->items();
+ TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator
mit(macroitems.constBegin()), end(macroitems.constEnd());
//1.comparison - Is the MacroItem-list empty?
@@ -545,7 +545,7 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
// Iterate over the MacroItems and item-elements.
while(mit != end && ! itemnode.isNull()) {
- const KSharedPtr<KoMacro::MacroItem> macroitem = *mit;
+ const TDESharedPtr<KoMacro::MacroItem> macroitem = *mit;
const TQDomElement itemelem = itemnode.toElement();
//2.comparison - Is the Action-name equal?
@@ -563,12 +563,12 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Go down to MacroItem->Variable and item->variable and compare them.
- TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
+ TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables = macroitem->variables();
TQDomNode varnode = itemelem.firstChild();
while ( ! varnode.isNull()) {
const TQDomElement varelem = varnode.toElement();
- const KSharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
+ const TDESharedPtr<KoMacro::Variable> varitem = mvariables.find(varelem.attribute("name")).data();
//3.comparison - Is the content of the Variable
// in the MacroItem and and item equal?
@@ -605,10 +605,10 @@ void XMLHandlerTests::assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro>
}
// Prints a TQMap of Variables to kdDebug().
-void XMLHandlerTests::printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s)
+void XMLHandlerTests::printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s)
{
//TQValueList<TQString>::ConstIterator kit (keys.constBegin()), end(keys.constEnd());
- TQMap<TQString, KSharedPtr<KoMacro::Variable > >::ConstIterator mvit (mvariables.constBegin()), end(mvariables.constEnd());
+ TQMap<TQString, TDESharedPtr<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 521f9ee5..062b24b1 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests.h
@@ -77,14 +77,14 @@ namespace KoMacroTest {
* @p isactionset Bool for expectation that the @a Action -names are equal.
* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
- void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
+ void assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro,
const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
const TQMap<TQString, bool> isvariableok);
// Prints a TQMap of Variables to kdDebug().
- void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
+ void printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s);
/**
* Sub-methods of testParseXML() and testToXML().
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
index cc38c077..8e990d11 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp
@@ -59,39 +59,39 @@ namespace KoMacroTest {
/**
* @a Macro instance as a container for the macroitems;
*/
- KSharedPtr<KoMacro::Macro> macro; // container for manually created items
- KSharedPtr<KoMacro::Macro> macro2; // container for parsen items
- KSharedPtr<KoMacro::Macro> macro3; // container for parsen items after back-converting by toXML() and again parseXML()
+ TDESharedPtr<KoMacro::Macro> macro; // container for manually created items
+ TDESharedPtr<KoMacro::Macro> macro2; // container for parsen items
+ TDESharedPtr<KoMacro::Macro> macro3; // container for parsen items after back-converting by toXML() and again parseXML()
/**
* An @a TestObject instance used internaly to test
* handling and communication with from TQObject
* inheritated instances.
*/
- KSharedPtr<KoMacro::Action> testaction;
- KSharedPtr<KoMacro::Action> action2; // action of the parsen macro2
- KSharedPtr<KoMacro::Action> action3; // action of the parsen macro3
- KSharedPtr<KoMacro::Action> testaction_2; // for test12
- KSharedPtr<KoMacro::Action> action2_2; // action of the parsen macro2, for test12
- KSharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
+ TDESharedPtr<KoMacro::Action> testaction;
+ TDESharedPtr<KoMacro::Action> action2; // action of the parsen macro2
+ TDESharedPtr<KoMacro::Action> action3; // action of the parsen macro3
+ TDESharedPtr<KoMacro::Action> testaction_2; // for test12
+ TDESharedPtr<KoMacro::Action> action2_2; // action of the parsen macro2, for test12
+ TDESharedPtr<KoMacro::Action> action3_2; // action of the parsen macro3, for test12
/**
* Represents a @a TQValuList of @a MacroItem which are parsen in the
* correspondig @a Macro .
*/
- TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
- TQValueList<KSharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
+ TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems2; // items of macro2
+ TQValueList<TDESharedPtr<KoMacro::MacroItem > > macroitems3; // items of macro3
/**
* @a MacroItem instances which ist fillen manually from the given XML
* and parsen by the @a XMLHandler over the XML.
*/
- KSharedPtr<KoMacro::MacroItem> macroitem; // created manually from XML
- KSharedPtr<KoMacro::MacroItem> macroitem2; // parsen from XML in macro2
- KSharedPtr<KoMacro::MacroItem> macroitem3; // parsen from XML in macro3
- KSharedPtr<KoMacro::MacroItem> macroitem_2; // created manually from XML, for test12
- KSharedPtr<KoMacro::MacroItem> macroitem2_2;// parsen from XML in macro2, for test12
- KSharedPtr<KoMacro::MacroItem> macroitem3_2;// parsen from XML in macro3, for test12
+ TDESharedPtr<KoMacro::MacroItem> macroitem; // created manually from XML
+ TDESharedPtr<KoMacro::MacroItem> macroitem2; // parsen from XML in macro2
+ TDESharedPtr<KoMacro::MacroItem> macroitem3; // parsen from XML in macro3
+ TDESharedPtr<KoMacro::MacroItem> macroitem_2; // created manually from XML, for test12
+ TDESharedPtr<KoMacro::MacroItem> macroitem2_2;// parsen from XML in macro2, for test12
+ TDESharedPtr<KoMacro::MacroItem> macroitem3_2;// parsen from XML in macro3, for test12
Private()
: xmlguiclient(0)
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",TQVariant("test_string"));
- KSharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
- KSharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<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);
@@ -425,11 +425,11 @@ void XMLHandlerTests2::testMoreVariables()
d->macroitem->setAction(d->testaction);
// Push the Variables into the macroitem.
- 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");
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
+ TDESharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MAX+1));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(INT_MIN-1));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -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",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));
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ //TODO //TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0123456789012345678901234567890123456789));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<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);
@@ -1050,18 +1050,18 @@ void XMLHandlerTests2::testTwoMacroItems()
d->macroitem_2->setAction(d->testaction_2);
// Push the Variables into the macroitem.
- 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");
+ TDESharedPtr<KoMacro::Variable> varstring = d->macroitem->addVariable("teststring",TQVariant("test_string"));
+ TDESharedPtr<KoMacro::Variable> varint = d->macroitem->addVariable("testint",TQVariant(0));
+ TDESharedPtr<KoMacro::Variable> varbool = d->macroitem->addVariable("testbool",TQVariant(true));
+ TDESharedPtr<KoMacro::Variable> vardouble = d->macroitem->addVariable("testdouble",TQVariant(0.6));
+ TDESharedPtr<KoMacro::Variable> varbla = d->macroitem->addVariable("testbla","somethingwrong");
// Push the Variables into the macroitem4.
- 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");
+ TDESharedPtr<KoMacro::Variable> varstring_2 = d->macroitem_2->addVariable("teststring",TQVariant("testString2"));
+ TDESharedPtr<KoMacro::Variable> varint_2 = d->macroitem_2->addVariable("testint",TQVariant(4));
+ TDESharedPtr<KoMacro::Variable> varbool_2 = d->macroitem_2->addVariable("testbool",TQVariant(false));
+ TDESharedPtr<KoMacro::Variable> vardouble_2 = d->macroitem_2->addVariable("testdouble",TQVariant(0.7));
+ TDESharedPtr<KoMacro::Variable> varbla_2 = d->macroitem_2->addVariable("testbla","somethingwrong2");
// Is our XML parseable into a 2. Macro by calling parseXML()?
KOMACROTEST_ASSERT(d->macro2->parseXML(elem),true);
@@ -1072,7 +1072,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems2.size(),(sizetypelist)2);
{
- TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
+ TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator mit2(d->macroitems2.constBegin());
// 2a.comparison - Test if the Action is correct?
d->macroitem2 = *mit2;
mit2++;
@@ -1111,7 +1111,7 @@ void XMLHandlerTests2::testTwoMacroItems()
KOMACROTEST_ASSERT(d->macroitems3.size(),(sizetypelist)2);
{
- TQValueList<KSharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
+ TQValueList<TDESharedPtr<KoMacro::MacroItem > >::ConstIterator mit3(d->macroitems3.constBegin());
// 2b.comparison - Test if the Action is correct?
d->macroitem3 = *mit3;
mit3++;
@@ -1145,14 +1145,14 @@ void XMLHandlerTests2::testTwoMacroItems()
* End of Sub-methos of testParseAndToXML2().
***************************************************************************/
-bool XMLHandlerTests2::assertActionsEqual(KSharedPtr<KoMacro::Action> action,
- KSharedPtr<KoMacro::Action> action2)
+bool XMLHandlerTests2::assertActionsEqual(TDESharedPtr<KoMacro::Action> action,
+ TDESharedPtr<KoMacro::Action> action2)
{
return action->name() == action2->name();
}
-bool XMLHandlerTests2::assertVariablesEqual(KSharedPtr<KoMacro::Variable> var,
- KSharedPtr<KoMacro::Variable> var2)
+bool XMLHandlerTests2::assertVariablesEqual(TDESharedPtr<KoMacro::Variable> var,
+ TDESharedPtr<KoMacro::Variable> var2)
{
if ( var->variant() != var2->variant() ) kdDebug() << "Variable1: " << var->variant() << " and Variable2: " << var2->variant() << endl;
return var->variant() == var2->variant();
diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.h b/kexi/plugins/macros/tests/xmlhandlertests2.h
index 376d7b08..3fd59609 100644
--- a/kexi/plugins/macros/tests/xmlhandlertests2.h
+++ b/kexi/plugins/macros/tests/xmlhandlertests2.h
@@ -70,7 +70,7 @@ namespace KoMacroTest {
Private* const d;
typedef TQMap<TQString,KoMacro::Variable>::size_type sizetypemap;
- typedef TQValueList<KSharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
+ typedef TQValueList<TDESharedPtr<KoMacro::MacroItem > >::size_type sizetypelist;
/**
* Compares a XML-Element with a Macro. Call sub-asserts.
@@ -80,14 +80,14 @@ namespace KoMacroTest {
* @p isactionset Bool for expectation that the @a Action -names are equal.
* @p isvariableok TQMap of Bools for comparing each @a Variable .
*/
-/* void assertMacroContentEqToXML(const KSharedPtr<KoMacro::Macro> macro,
+/* void assertMacroContentEqToXML(const TDESharedPtr<KoMacro::Macro> macro,
const TQDomElement& elem,
const bool isitemsempty,
const bool isactionset,
const TQMap<TQString, bool> isvariableok);
// Prints a TQMap of Variables to kdDebug().
- void printMvariables(const TQMap<TQString, KSharedPtr<KoMacro::Variable > > mvariables, const TQString s);
+ void printMvariables(const TQMap<TQString, TDESharedPtr<KoMacro::Variable > > mvariables, const TQString s);
*/
/**
* Sub-methods of testParseXML() and testToXML().
@@ -122,11 +122,11 @@ namespace KoMacroTest {
void testTwoMacroItems();
- bool assertActionsEqual(KSharedPtr<KoMacro::Action> action,
- KSharedPtr<KoMacro::Action> action2);
+ bool assertActionsEqual(TDESharedPtr<KoMacro::Action> action,
+ TDESharedPtr<KoMacro::Action> action2);
- bool assertVariablesEqual(KSharedPtr<KoMacro::Variable> var,
- KSharedPtr<KoMacro::Variable> var2);
+ bool assertVariablesEqual(TDESharedPtr<KoMacro::Variable> var,
+ TDESharedPtr<KoMacro::Variable> var2);
};
}