From 94844816550ad672ccfcdc25659c625546239998 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:32:11 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kexi/plugins/macros/tests/commontests.cpp | 32 +++++++++++++------------- kexi/plugins/macros/tests/komacrotestbase.h | 4 ++-- kexi/plugins/macros/tests/testobject.cpp | 2 +- kexi/plugins/macros/tests/xmlhandlertests.cpp | 10 ++++---- kexi/plugins/macros/tests/xmlhandlertests2.cpp | 8 +++---- 5 files changed, 28 insertions(+), 28 deletions(-) (limited to 'kexi/plugins/macros/tests') diff --git a/kexi/plugins/macros/tests/commontests.cpp b/kexi/plugins/macros/tests/commontests.cpp index 1086a340..bdc2e6ad 100644 --- a/kexi/plugins/macros/tests/commontests.cpp +++ b/kexi/plugins/macros/tests/commontests.cpp @@ -424,7 +424,7 @@ void CommonTests::testFunction() domdocument.setContent(TQString( "" "" + argument1 + "" - "" + TQString("%1").tqarg(argument2) + "" + "" + TQString("%1").arg(argument2) + "" "" )); @@ -677,7 +677,7 @@ void CommonTests::testMacro() // KOMACROTEST_ASSERT( actionptr->comment(), TQString("") ); /* //fetch the second one - KSharedPtr myfuncptr = tqchildren[1]; + KSharedPtr myfuncptr = children[1]; //cast it to function KoMacro::Function* myfunc = dynamic_cast( myfuncptr.data() ); @@ -712,8 +712,8 @@ void CommonTests::testMacro() //KOMACROTEST_XASSERT((int) yanActionptr2.data(), 0); //KOMACROTEST_XASSERT((int) yanActionptr3.data(), 0); - //create a list of the tqchildren from yanMacro - //TQValueList< KSharedPtr > yanChildren = yanMacro->tqchildren(); + //create a list of the children from yanMacro + //TQValueList< KSharedPtr > yanChildren = yanMacro->children(); //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 tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children 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 tqchildren - yanChildren = yanMacro->tqchildren(); - //get count of tqchildren + //get the children + yanChildren = yanMacro->children(); + //get count of children const int size = yanChildren.count(); //check count has changed KOMACROTEST_XASSERT(size, oldsize); @@ -859,12 +859,12 @@ void CommonTests::testVariables() //check that it is not null KOMACROTEST_XASSERT((int) macro, 0); - //create a list of its tqchildren - TQValueList< KSharedPtr > 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 func1ptr = tqchildren[1]; + //create a list of its children + TQValueList< KSharedPtr > 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 func1ptr = children[1]; //create new context KSharedPtr context = new KoMacro::Context(macroptr); diff --git a/kexi/plugins/macros/tests/komacrotestbase.h b/kexi/plugins/macros/tests/komacrotestbase.h index e301730d..ee746991 100644 --- a/kexi/plugins/macros/tests/komacrotestbase.h +++ b/kexi/plugins/macros/tests/komacrotestbase.h @@ -27,7 +27,7 @@ */ #define KOMACROTEST_ASSERT(actual, expected) \ { \ - std::cout << TQString("Testing: %1 == %2").tqarg(#actual).tqarg(#expected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 == %2").arg(#actual).arg(#expected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, expected, false ); \ if(actual != expected) \ { \ @@ -44,7 +44,7 @@ */ #define KOMACROTEST_XASSERT(actual, notexpected) \ { \ - std::cout << TQString("Testing: %1 != %2").tqarg(#actual).tqarg(#notexpected).latin1() << std::endl; \ + std::cout << TQString("Testing: %1 != %2").arg(#actual).arg(#notexpected).latin1() << std::endl; \ check( __FILE__, __LINE__, #actual, actual, notexpected, true ); \ if(actual == notexpected) \ { \ diff --git a/kexi/plugins/macros/tests/testobject.cpp b/kexi/plugins/macros/tests/testobject.cpp index e0db481e..2634d71a 100644 --- a/kexi/plugins/macros/tests/testobject.cpp +++ b/kexi/plugins/macros/tests/testobject.cpp @@ -94,7 +94,7 @@ int TestObject::myslot(const TQString&, int i) //TQString is returnvalue TQString TestObject::myslot(const TQString& s) { - TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").tqarg(s); + TQString t = TQString("CALLED => TestObject::myslot(const TQString& s) s=%1").arg(s); //be loud kdDebug() << t << endl; //add some extra Debuginfos to TestResults diff --git a/kexi/plugins/macros/tests/xmlhandlertests.cpp b/kexi/plugins/macros/tests/xmlhandlertests.cpp index 29c53831..90454d35 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests.cpp @@ -332,7 +332,7 @@ void XMLHandlerTests::testMaxNum() "true" " %2 " "" - "").tqarg(INT_MAX).tqarg(DBL_MAX); + "").arg(INT_MAX).arg(DBL_MAX); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -362,7 +362,7 @@ void XMLHandlerTests::testMaxNum2() "true" " %2 " "" - "").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "").arg(INT_MAX+1).arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -392,7 +392,7 @@ void XMLHandlerTests::testMinNum() "true" " %2 " "" - "").tqarg(INT_MIN).tqarg(DBL_MIN); + "").arg(INT_MIN).arg(DBL_MIN); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -422,7 +422,7 @@ void XMLHandlerTests::testMinNum2() "true" " %2 " "" - "").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "").arg(INT_MIN-1).arg(DBL_MIN-1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); @@ -452,7 +452,7 @@ void XMLHandlerTests::testBigNumber() "true" " %1 " "" - "").tqarg(DBL_MAX+1); + "").arg(DBL_MAX+1); doomdocument.setContent(xml); const TQDomElement elem = doomdocument.documentElement(); KOMACROTEST_ASSERT(macro->parseXML(elem),true); diff --git a/kexi/plugins/macros/tests/xmlhandlertests2.cpp b/kexi/plugins/macros/tests/xmlhandlertests2.cpp index ac176f89..f32416c0 100644 --- a/kexi/plugins/macros/tests/xmlhandlertests2.cpp +++ b/kexi/plugins/macros/tests/xmlhandlertests2.cpp @@ -586,7 +586,7 @@ void XMLHandlerTests2::testMaxNum() "true" " %2 " "" - "").tqarg(INT_MAX).tqarg(DBL_MAX); + "").arg(INT_MAX).arg(DBL_MAX); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -674,7 +674,7 @@ void XMLHandlerTests2::testMaxNum2() "true" " %2 " "" - "").tqarg(INT_MAX+1).tqarg(DBL_MAX+1); + "").arg(INT_MAX+1).arg(DBL_MAX+1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -762,7 +762,7 @@ void XMLHandlerTests2::testMinNum() "true" " %2 " "" - "").tqarg(INT_MIN).tqarg(DBL_MIN); + "").arg(INT_MIN).arg(DBL_MIN); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); @@ -850,7 +850,7 @@ void XMLHandlerTests2::testMinNum2() "true" " %2 " "" - "").tqarg(INT_MIN-1).tqarg(DBL_MIN-1); + "").arg(INT_MIN-1).arg(DBL_MIN-1); // Set the XML-document with the above string. TQDomDocument doomdocument; doomdocument.setContent(xml); -- cgit v1.2.1