From 089118c18533dfa3e6ce5065dbebdd4db94051f1 Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:33:51 -0600 Subject: Rename old tq methods that no longer need a unique name --- kopete/libkopete/tests/kopetecontactlist_test.cpp | 2 +- kopete/libkopete/tests/kopeteemoticontest.cpp | 12 ++++++------ kopete/libkopete/tests/kopetemessage_test.cpp | 18 +++++++++--------- kopete/libkopete/tests/kopetepropertiestest.cpp | 4 ++-- kopete/libkopete/tests/kopetewallettest_program.cpp | 6 +++--- kopete/libkopete/tests/mock/kopeteaccount_mock.cpp | 2 +- kopete/libkopete/tests/mock/kopeteaccount_mock.h | 2 +- 7 files changed, 23 insertions(+), 23 deletions(-) (limited to 'kopete/libkopete/tests') diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 3ac1b34a..5e43126d 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -36,7 +36,7 @@ void KopeteContactList_Test::testSomething() // change user data dir to avoid messing with user's .kde dir setenv( "TDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - TQString filename = locateLocal( "appdata", TQString::tqfromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index 1f3fd436..50c023d9 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -62,7 +62,7 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - TQString basePath = TQString::tqfromLatin1( SRCDIR ) + TQString::tqfromLatin1("/emoticon-parser-testcases"); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); TQDir testCasesDir(basePath); TQStringList inputFileNames = testCasesDir.entryList("*.input"); @@ -73,8 +73,8 @@ void KopeteEmoticonTest::testEmoticonParser() TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - TQFile inputFile(basePath + TQString::tqfromLatin1("/") + fileName); - TQFile expectedFile(basePath + TQString::tqfromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -102,11 +102,11 @@ void KopeteEmoticonTest::testEmoticonParser() // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + TQString::tqfromLatin1(": ") + result; - expectedData = fileName + TQString::tqfromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == TQString::tqfromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetemessage_test.cpp b/kopete/libkopete/tests/kopetemessage_test.cpp index 293da6b9..90216979 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -57,8 +57,8 @@ KopeteMessage_Test::KopeteMessage_Test() m_account = new Kopete::Test::Mock::Account(m_protocol, "testaccount"); m_metaContactMyself = new Kopete::Test::Mock::MetaContact(); m_metaContactOther = new Kopete::Test::Mock::MetaContact(); - m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-myself"), m_metaContactMyself, TQString()); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::tqfromLatin1("test-dest"), m_metaContactOther, TQString()); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString()); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString()); m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString(), Kopete::Message::Outbound, Kopete::Message::PlainText); } @@ -251,7 +251,7 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - TQString basePath = TQString::tqfromLatin1( SRCDIR ) + TQString::tqfromLatin1("/link-parser-testcases"); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); TQDir testCasesDir(basePath); TQStringList inputFileNames = testCasesDir.entryList("*.input"); @@ -261,8 +261,8 @@ void KopeteMessage_Test::testLinkParser() TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - TQFile inputFile(basePath + TQString::tqfromLatin1("/") + fileName); - TQFile expectedFile(basePath + TQString::tqfromLatin1("/") + outputFileName); + TQFile inputFile(basePath + TQString::fromLatin1("/") + fileName); + TQFile expectedFile(basePath + TQString::fromLatin1("/") + outputFileName); // check if the expected output file exists // if it doesn't, skip the testcase if ( ! expectedFile.exists() ) @@ -288,7 +288,7 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == TQString::tqfromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; @@ -298,11 +298,11 @@ void KopeteMessage_Test::testLinkParser() // HACK to know the test case we applied, concatenate testcase name to both // input and expected string. WIll remove when I can add some sort of metadata // to a CHECK so debug its origin testcase - result = fileName + TQString::tqfromLatin1(": ") + result; - expectedData = fileName + TQString::tqfromLatin1(": ") + expectedData; + result = fileName + TQString::fromLatin1(": ") + result; + expectedData = fileName + TQString::fromLatin1(": ") + expectedData; // if the test case begins with broken, we expect it to fail, then use XFAIL // otherwise use CHECK - if ( fileName.section("-", 0, 0) == TQString::tqfromLatin1("broken") ) + if ( fileName.section("-", 0, 0) == TQString::fromLatin1("broken") ) { //kdDebug() << "checking known-broken testcase: " << fileName << endl; XFAIL(result, expectedData); diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 736bd2f8..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, TQString::tqfromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), TQString::tqfromLatin1("Foo!") ); + myPropertyHost.setProperty( fooProperty, TQString::fromLatin1("Foo!") ); + CHECK( myPropertyHost.property(fooProperty), TQString::fromLatin1("Foo!") ); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.cpp b/kopete/libkopete/tests/kopetewallettest_program.cpp index b6eaf635..84a7d252 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -76,9 +76,9 @@ int main( int argc, char *argv[] ) { TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == TQString::tqfromLatin1( "open" ) ) openWalletAsync(); - if( arg == TQString::tqfromLatin1( "close" ) ) closeWallet(); - if( arg == TQString::tqfromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index d6268628..8beb6e81 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -41,7 +41,7 @@ bool Account::createContact( const TQString &contactId, Kopete::MetaContact *par return true; } -void Account::connect( const Kopete::OnlineStatus& initialtqStatus) +void Account::connect( const Kopete::OnlineStatus& initialStatus) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 43686ef2..be4f281e 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -40,7 +40,7 @@ public: ~Account(); // pure virtual functions implementation virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); - virtual void connect( const Kopete::OnlineStatus& initialtqStatus = OnlineStatus() ); + virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString() ); }; -- cgit v1.2.1