summaryrefslogtreecommitdiffstats
path: root/kexi/plugins/macros/tests/xmlhandlertests.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-31 00:15:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-01-31 00:15:51 -0600
commitf7055674768fa7f0267da4a14b9061e60ebab3fc (patch)
tree9cf91b2040d16220234c24c945e950952c359832 /kexi/plugins/macros/tests/xmlhandlertests.cpp
parentaf2ab9c9888013e42237f71166eeafe5e988da0f (diff)
downloadkoffice-f7055674768fa7f0267da4a14b9061e60ebab3fc.tar.gz
koffice-f7055674768fa7f0267da4a14b9061e60ebab3fc.zip
Rename KShared
Diffstat (limited to 'kexi/plugins/macros/tests/xmlhandlertests.cpp')
-rw-r--r--kexi/plugins/macros/tests/xmlhandlertests.cpp42
1 files changed, 21 insertions, 21 deletions
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;