diff options
Diffstat (limited to 'kopete/libkopete/tests')
-rw-r--r-- | kopete/libkopete/tests/kopetecontactlist_test.cpp | 10 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopeteemoticontest.cpp | 42 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetemessage_test.cpp | 110 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetepasswordtest_program.cpp | 32 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetepasswordtest_program.h | 6 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetepropertiestest.cpp | 12 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetewallettest_program.cpp | 24 | ||||
-rw-r--r-- | kopete/libkopete/tests/kopetewallettest_program.h | 2 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopeteaccount_mock.cpp | 6 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopeteaccount_mock.h | 6 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopetecontact_mock.cpp | 2 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopetecontact_mock.h | 2 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp | 8 | ||||
-rw-r--r-- | kopete/libkopete/tests/mock/kopeteprotocol_mock.h | 8 |
14 files changed, 135 insertions, 135 deletions
diff --git a/kopete/libkopete/tests/kopetecontactlist_test.cpp b/kopete/libkopete/tests/kopetecontactlist_test.cpp index 001f3f0d..7b21d407 100644 --- a/kopete/libkopete/tests/kopetecontactlist_test.cpp +++ b/kopete/libkopete/tests/kopetecontactlist_test.cpp @@ -15,8 +15,8 @@ ************************************************************************* */ -#include <qfile.h> -#include <qdir.h> +#include <tqfile.h> +#include <tqdir.h> #include <kstandarddirs.h> #include <kunittest/module.h> #include "kopetecontactlist_test.h" @@ -34,13 +34,13 @@ void KopeteContactList_Test::allTests() void KopeteContactList_Test::testSomething() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); - QString filename = locateLocal( "appdata", QString::fromLatin1( "contactlist.xml" ) ); + TQString filename = locateLocal( "appdata", TQString::fromLatin1( "contactlist.xml" ) ); if( ! filename.isEmpty() ) { // previous test run, delete the previous contact list - bool removed = QFile::remove(filename); + bool removed = TQFile::remove(filename); // if we cant remove the file, abort test if (!removed) return; diff --git a/kopete/libkopete/tests/kopeteemoticontest.cpp b/kopete/libkopete/tests/kopeteemoticontest.cpp index e9a81c1d..a64aee99 100644 --- a/kopete/libkopete/tests/kopeteemoticontest.cpp +++ b/kopete/libkopete/tests/kopeteemoticontest.cpp @@ -18,9 +18,9 @@ #include <stdlib.h> -#include <qstring.h> -#include <qdir.h> -#include <qfile.h> +#include <tqstring.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kglobal.h> @@ -51,7 +51,7 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteEmoticonTest ); void KopeteEmoticonTest::allTests() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); //KApplication::disableAutoDcopRegistration(); //KApplication app; @@ -62,19 +62,19 @@ void KopeteEmoticonTest::allTests() void KopeteEmoticonTest::testEmoticonParser() { Kopete::Emoticons emo("Default"); - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/emoticon-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/emoticon-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; + TQString fileName = *it; kdDebug() << "testcase: " << fileName << endl; - QString outputFileName = fileName; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + 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() ) @@ -84,29 +84,29 @@ void KopeteEmoticonTest::testEmoticonParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); inputFile.close(); expectedFile.close(); - QString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", QString::null ); + TQString path = KGlobal::dirs()->findResource( "emoticons", "Default/smile.png" ).replace( "smile.png", TQString::null ); Kopete::Emoticons::self(); - QString result = emo.parse( inputData ).replace( path, QString::null ); + TQString result = emo.parse( inputData ).replace( path, TQString::null ); // 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 + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + 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) == QString::fromLatin1("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 1ca57123..3e4a85b3 100644 --- a/kopete/libkopete/tests/kopetemessage_test.cpp +++ b/kopete/libkopete/tests/kopetemessage_test.cpp @@ -19,8 +19,8 @@ #include <stdlib.h> -#include <qdir.h> -#include <qfile.h> +#include <tqdir.h> +#include <tqfile.h> #include <kapplication.h> #include <kstandarddirs.h> #include <kinstance.h> @@ -50,16 +50,16 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopeteMessage_Test ); KopeteMessage_Test::KopeteMessage_Test() { // change user data dir to avoid messing with user's .kde dir - setenv( "KDEHOME", QFile::encodeName( QDir::homeDirPath() + "/.kopete-unittest" ), true ); + setenv( "KDEHOME", TQFile::encodeName( TQDir::homeDirPath() + "/.kopete-unittest" ), true ); // create fake objects needed to build a reasonable testeable message - m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(QCString("test-kopete-message")), 0L, "test-kopete-message"); + m_protocol = new Kopete::Test::Mock::Protocol( new KInstance(TQCString("test-kopete-message")), 0L, "test-kopete-message"); 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, QString::fromLatin1("test-myself"), m_metaContactMyself, QString::null); - m_contactTo = new Kopete::Test::Mock::Contact(m_account, QString::fromLatin1("test-dest"), m_metaContactOther, QString::null); - m_message = new Kopete::Message( m_contactFrom, m_contactTo, QString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); + m_contactFrom = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-myself"), m_metaContactMyself, TQString::null); + m_contactTo = new Kopete::Test::Mock::Contact(m_account, TQString::fromLatin1("test-dest"), m_metaContactOther, TQString::null); + m_message = new Kopete::Message( m_contactFrom, m_contactTo, TQString::null, Kopete::Message::Outbound, Kopete::Message::PlainText); } void KopeteMessage_Test::allTests() @@ -120,7 +120,7 @@ void KopeteMessage_Test::testPrimitives() CHECK(Kopete::Message::RichText, msg.format()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody(m, Kopete::Message::PlainText); @@ -142,64 +142,64 @@ void KopeteMessage_Test::testPrimitives() *********************************************/ { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::RichText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "foobar"; + TQString m = "foobar"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("NEW", Kopete::Message::PlainText); - CHECK(QString("NEW"), msg.plainBody()); + CHECK(TQString("NEW"), msg.plainBody()); msg.setBody("NEW_NEW", Kopete::Message::RichText); - CHECK(QString("NEW_NEW"), msg.plainBody()); + CHECK(TQString("NEW_NEW"), msg.plainBody()); } { - QString m = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>"; + TQString m = "<html><head></head><body foo=\"bar\"> <b>HELLO WORLD</b> </body></html>"; Kopete::Message msg( m_contactFrom, m_contactTo, m, Kopete::Message::Inbound, Kopete::Message::PlainText); CHECK(m, msg.plainBody()); msg.setBody("<simple> SIMPLE", Kopete::Message::PlainText); - CHECK(msg.plainBody(), QString("<simple> SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple> SIMPLE") ); + CHECK(msg.plainBody(), TQString("<simple> SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple> SIMPLE") ); msg.setBody("<simple>SIMPLE</simple>", Kopete::Message::RichText); - CHECK(msg.plainBody(), QString("SIMPLE") ); - CHECK(msg.escapedBody(), QString("<simple>SIMPLE</simple>") ); + CHECK(msg.plainBody(), TQString("SIMPLE") ); + CHECK(msg.escapedBody(), TQString("<simple>SIMPLE</simple>") ); - CHECK(Kopete::Message::unescape( QString( "<simple>SIMPLE</simple>" ) ), QString("SIMPLE") ); - CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" />" ) ), QString("Foo ") ); - CHECK(Kopete::Message::unescape( QString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), QString("Foo Bar") ); + CHECK(Kopete::Message::unescape( TQString( "<simple>SIMPLE</simple>" ) ), TQString("SIMPLE") ); + CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" />" ) ), TQString("Foo ") ); + CHECK(Kopete::Message::unescape( TQString( "Foo <img src=\"foo.png\" title=\"Bar\" />" ) ), TQString("Foo Bar") ); msg.setBody(m, Kopete::Message::RichText); // FIXME: Should setBody() also strip extra white space? - //CHECK(msg.plainBody(), QString("HELLO WORLD")); - //CHECK(msg.escapedBody(), QString("<b>HELLO WORLD</b>")); + //CHECK(msg.plainBody(), TQString("HELLO WORLD")); + //CHECK(msg.escapedBody(), TQString("<b>HELLO WORLD</b>")); - CHECK(msg.escapedBody(), QString(" <b>HELLO WORLD</b> ")); - CHECK(msg.plainBody(), QString(" HELLO WORLD ")); - CHECK(msg.plainBody().stripWhiteSpace(), QString("HELLO WORLD")); - CHECK(msg.escapedBody().stripWhiteSpace(), QString(" <b>HELLO WORLD</b> ")); + CHECK(msg.escapedBody(), TQString(" <b>HELLO WORLD</b> ")); + CHECK(msg.plainBody(), TQString(" HELLO WORLD ")); + CHECK(msg.plainBody().stripWhiteSpace(), TQString("HELLO WORLD")); + CHECK(msg.escapedBody().stripWhiteSpace(), TQString(" <b>HELLO WORLD</b> ")); } { Kopete::Message msg( m_contactFrom, m_contactTo, "foo", Kopete::Message::Inbound, Kopete::Message::PlainText); msg.setBody("<p>foo", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("<p>foo</p>", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo")); + CHECK(msg.escapedBody(), TQString("foo")); msg.setBody("\n<p>foo</p>\n<br/>", Kopete::Message::RichText); - CHECK(msg.escapedBody(), QString("foo<br/>")); + CHECK(msg.escapedBody(), TQString("foo<br/>")); } /********************************************** @@ -214,8 +214,8 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } /********************************************** @@ -227,7 +227,7 @@ void KopeteMessage_Test::testPrimitives() { Kopete::Message msg2; - CHECK(msg2.plainBody(), QString::null); + CHECK(msg2.plainBody(), TQString::null); msg2 = msg1; @@ -235,13 +235,13 @@ void KopeteMessage_Test::testPrimitives() CHECK(msg1.escapedBody(), msg2.escapedBody()); msg1.setBody("NEW", Kopete::Message::PlainText); - CHECK(msg1.plainBody(), QString("NEW")); - CHECK(msg2.plainBody(), QString("foo")); + CHECK(msg1.plainBody(), TQString("NEW")); + CHECK(msg2.plainBody(), TQString("foo")); } - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); msg1 = msg1; - CHECK(msg1.plainBody(), QString("NEW")); + CHECK(msg1.plainBody(), TQString("NEW")); } } @@ -251,18 +251,18 @@ void KopeteMessage_Test::setup() void KopeteMessage_Test::testLinkParser() { - QString basePath = QString::fromLatin1( SRCDIR ) + QString::fromLatin1("/link-parser-testcases"); - QDir testCasesDir(basePath); + TQString basePath = TQString::fromLatin1( SRCDIR ) + TQString::fromLatin1("/link-parser-testcases"); + TQDir testCasesDir(basePath); - QStringList inputFileNames = testCasesDir.entryList("*.input"); - for ( QStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) + TQStringList inputFileNames = testCasesDir.entryList("*.input"); + for ( TQStringList::ConstIterator it = inputFileNames.begin(); it != inputFileNames.end(); ++it) { - QString fileName = *it; - QString outputFileName = fileName; + TQString fileName = *it; + TQString outputFileName = fileName; outputFileName.replace("input","output"); // open the input file - QFile inputFile(basePath + QString::fromLatin1("/") + fileName); - QFile expectedFile(basePath + QString::fromLatin1("/") + 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() ) @@ -272,10 +272,10 @@ void KopeteMessage_Test::testLinkParser() } if ( inputFile.open( IO_ReadOnly ) && expectedFile.open( IO_ReadOnly )) { - QTextStream inputStream(&inputFile); - QTextStream expectedStream(&expectedFile); - QString inputData; - QString expectedData; + TQTextStream inputStream(&inputFile); + TQTextStream expectedStream(&expectedFile); + TQString inputData; + TQString expectedData; inputData = inputStream.read(); expectedData = expectedStream.read(); @@ -288,21 +288,21 @@ void KopeteMessage_Test::testLinkParser() // set message format for parsing according to textcase filename convention Kopete::Message::MessageFormat format; - if ( fileName.section("-", 1, 1) == QString::fromLatin1("plaintext") ) + if ( fileName.section("-", 1, 1) == TQString::fromLatin1("plaintext") ) format = Kopete::Message::PlainText; else format = Kopete::Message::RichText; - QString result = Kopete::Message::parseLinks( inputData, format ); + TQString result = Kopete::Message::parseLinks( inputData, format ); // 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 + QString::fromLatin1(": ") + result; - expectedData = fileName + QString::fromLatin1(": ") + 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) == QString::fromLatin1("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/kopetepasswordtest_program.cpp b/kopete/libkopete/tests/kopetepasswordtest_program.cpp index a1f3a50e..51b8908a 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.cpp +++ b/kopete/libkopete/tests/kopetepasswordtest_program.cpp @@ -17,9 +17,9 @@ #include "kopetepasswordtest_program.h" #include "kopetepassword.h" -#include <qtextstream.h> -#include <qpixmap.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqpixmap.h> +#include <tqtimer.h> #include <kaboutdata.h> #include <kapplication.h> @@ -28,7 +28,7 @@ #include <kglobal.h> #include <kstandarddirs.h> -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); static KCmdLineOptions opts[] = { @@ -42,18 +42,18 @@ static KCmdLineOptions opts[] = using namespace Kopete; -QString retrieve( Password &pwd, const QPixmap &image, const QString &prompt ) +TQString retrieve( Password &pwd, const TQPixmap &image, const TQString &prompt ) { PasswordRetriever r; - pwd.request( &r, SLOT( gotPassword( const QString & ) ), image, prompt ); - QTimer tmr; - r.connect( &tmr, SIGNAL( timeout() ), SLOT( timer() ) ); + pwd.request( &r, TQT_SLOT( gotPassword( const TQString & ) ), image, prompt ); + TQTimer tmr; + r.connect( &tmr, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); tmr.start( 1000 ); qApp->exec(); return r.password; } -void PasswordRetriever::gotPassword( const QString &pass ) +void PasswordRetriever::gotPassword( const TQString &pass ) { password = pass; qApp->quit(); @@ -74,11 +74,11 @@ int main( int argc, char *argv[] ) KApplication app( "kopetepasswordtest" ); bool setPassword = args->isSet("set"); - QString newPwd = args->getOption("set"); - QString passwordId = args->getOption("id"); + TQString newPwd = args->getOption("set"); + TQString passwordId = args->getOption("id"); bool error = args->isSet("error"); - QString prompt = args->getOption("prompt"); - QPixmap image = QString(args->getOption("image")); + TQString prompt = args->getOption("prompt"); + TQPixmap image = TQString(args->getOption("image")); _out << (image.isNull() ? "image is null" : "image is valid") << endl; @@ -87,7 +87,7 @@ int main( int argc, char *argv[] ) _out << "Cached value is null: " << pwd.cachedValue().isNull() << endl; - QString pass = retrieve( pwd, image, prompt ); + TQString pass = retrieve( pwd, image, prompt ); if ( !pass.isNull() ) _out << "Read password: " << pass << endl; @@ -101,7 +101,7 @@ int main( int argc, char *argv[] ) if ( newPwd.isEmpty() ) { _out << "Clearing password" << endl; - newPwd = QString::null; + newPwd = TQString::null; } else { @@ -112,7 +112,7 @@ int main( int argc, char *argv[] ) // without this, setting passwords will fail since they're // set asynchronously. - QTimer::singleShot( 0, &app, SLOT( deref() ) ); + TQTimer::singleShot( 0, &app, TQT_SLOT( deref() ) ); app.exec(); if ( setPassword ) diff --git a/kopete/libkopete/tests/kopetepasswordtest_program.h b/kopete/libkopete/tests/kopetepasswordtest_program.h index 507da2a1..47c17172 100644 --- a/kopete/libkopete/tests/kopetepasswordtest_program.h +++ b/kopete/libkopete/tests/kopetepasswordtest_program.h @@ -1,16 +1,16 @@ #ifndef KOPETEPASSWORDTEST_H #define KOPETEPASSWORDTEST_H -#include <qobject.h> +#include <tqobject.h> class PasswordRetriever : public QObject { Q_OBJECT public: - QString password; + TQString password; public slots: void timer(); - void gotPassword( const QString & ); + void gotPassword( const TQString & ); }; #endif diff --git a/kopete/libkopete/tests/kopetepropertiestest.cpp b/kopete/libkopete/tests/kopetepropertiestest.cpp index 1e60c77c..76b8ae79 100644 --- a/kopete/libkopete/tests/kopetepropertiestest.cpp +++ b/kopete/libkopete/tests/kopetepropertiestest.cpp @@ -20,8 +20,8 @@ #include "kopeteproperties.h" -#include <qstring.h> -#include <qtextstream.h> +#include <tqstring.h> +#include <tqtextstream.h> #include <kaboutdata.h> #include <kapplication.h> @@ -37,11 +37,11 @@ KUNITTEST_MODULE_REGISTER_TESTER( KopetePropertiesTest ); using namespace Kopete::Properties; -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); class PropertyHost : public WithProperties<PropertyHost> {}; -class FooProperty : public SimpleDataProperty<PropertyHost, QString> +class FooProperty : public SimpleDataProperty<PropertyHost, TQString> { public: const char *name() const { return "foo"; } @@ -51,8 +51,8 @@ void KopetePropertiesTest::allTests() { PropertyHost myPropertyHost; CHECK( myPropertyHost.property(fooProperty).isNull(), true); - myPropertyHost.setProperty( fooProperty, QString::fromLatin1("Foo!") ); - CHECK( myPropertyHost.property(fooProperty), QString::fromLatin1("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 29de1edc..cfc8b6e9 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.cpp +++ b/kopete/libkopete/tests/kopetewallettest_program.cpp @@ -14,8 +14,8 @@ ************************************************************************* */ -#include <qtextstream.h> -#include <qtimer.h> +#include <tqtextstream.h> +#include <tqtimer.h> #include <kaboutdata.h> #include <kapplication.h> @@ -29,7 +29,7 @@ #include "kopetewalletmanager.h" #include "kopetewallettest_program.h" -static QTextStream _out( stdout, IO_WriteOnly ); +static TQTextStream _out( stdout, IO_WriteOnly ); void closeWallet() { @@ -38,7 +38,7 @@ void closeWallet() void delay() { - QTimer::singleShot( 3000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 3000, qApp, TQT_SLOT( quit() ) ); qApp->exec(); } @@ -46,7 +46,7 @@ void openWalletAsync() { WalletReciever *r = new WalletReciever; _out << "[ASYNC] About to open wallet, receiver: " << r << endl; - Kopete::WalletManager::self()->openWallet( r, SLOT( gotWallet( KWallet::Wallet* ) ) ); + Kopete::WalletManager::self()->openWallet( r, TQT_SLOT( gotWallet( KWallet::Wallet* ) ) ); } void WalletReciever::gotWallet( KWallet::Wallet *w ) @@ -74,22 +74,22 @@ int main( int argc, char *argv[] ) for( int i = 0; i < args->count(); ++i ) { - QString arg = args->arg( i ); + TQString arg = args->arg( i ); _out << "Processing " << arg << endl; - if( arg == QString::fromLatin1( "open" ) ) openWalletAsync(); - if( arg == QString::fromLatin1( "close" ) ) closeWallet(); - if( arg == QString::fromLatin1( "delay" ) ) delay(); + if( arg == TQString::fromLatin1( "open" ) ) openWalletAsync(); + if( arg == TQString::fromLatin1( "close" ) ) closeWallet(); + if( arg == TQString::fromLatin1( "delay" ) ) delay(); _out << "Done." << endl; } WalletReciever *r = new WalletReciever; - QTimer timer; - r->connect( &timer, SIGNAL( timeout() ), SLOT( timer() ) ); + TQTimer timer; + r->connect( &timer, TQT_SIGNAL( timeout() ), TQT_SLOT( timer() ) ); timer.start( 1000 ); _out << "About to start 30 second event loop" << endl; - QTimer::singleShot( 30000, qApp, SLOT( quit() ) ); + TQTimer::singleShot( 30000, qApp, TQT_SLOT( quit() ) ); return qApp->exec(); } diff --git a/kopete/libkopete/tests/kopetewallettest_program.h b/kopete/libkopete/tests/kopetewallettest_program.h index 58bdbb6e..b2e5d2fb 100644 --- a/kopete/libkopete/tests/kopetewallettest_program.h +++ b/kopete/libkopete/tests/kopetewallettest_program.h @@ -1,7 +1,7 @@ #ifndef KOPETEWALLETTEST_H #define KOPETEWALLETTEST_H -#include <qobject.h> +#include <tqobject.h> namespace KWallet { class Wallet; } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp index 8a8425bc..7d46fc34 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.cpp @@ -26,7 +26,7 @@ namespace Test namespace Mock { -Account::Account(Kopete::Protocol *parent, const QString &accountID, const char *name) : Kopete::Account(parent, accountID, name) +Account::Account(Kopete::Protocol *parent, const TQString &accountID, const char *name) : Kopete::Account(parent, accountID, name) { } @@ -36,7 +36,7 @@ Account::~Account() } -bool Account::createContact( const QString &contactId, Kopete::MetaContact *parentContact ) +bool Account::createContact( const TQString &contactId, Kopete::MetaContact *parentContact ) { return true; } @@ -51,7 +51,7 @@ void Account::disconnect() // do nothing } -void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason) +void Account::setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason) { // do nothing } diff --git a/kopete/libkopete/tests/mock/kopeteaccount_mock.h b/kopete/libkopete/tests/mock/kopeteaccount_mock.h index 55ba15cc..053977a5 100644 --- a/kopete/libkopete/tests/mock/kopeteaccount_mock.h +++ b/kopete/libkopete/tests/mock/kopeteaccount_mock.h @@ -36,13 +36,13 @@ namespace Mock class Account : public Kopete::Account { public: - Account(Kopete::Protocol *parent, const QString &accountID, const char *name=0L); + Account(Kopete::Protocol *parent, const TQString &accountID, const char *name=0L); ~Account(); // pure virtual functions implementation - virtual bool createContact( const QString &contactId, MetaContact *parentContact ); + virtual bool createContact( const TQString &contactId, MetaContact *parentContact ); virtual void connect( const Kopete::OnlineStatus& initialStatus = OnlineStatus() ); virtual void disconnect(); - virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const QString &reason = QString::null ); + virtual void setOnlineStatus( const Kopete::OnlineStatus& status , const TQString &reason = TQString::null ); }; } // end ns Kopete::Test::Mock diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp index 19cfa7b0..ea90bee0 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.cpp +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.cpp @@ -24,7 +24,7 @@ namespace Test namespace Mock { -Contact::Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon) : Kopete::Contact( account, id, parent, icon) +Contact::Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon) : Kopete::Contact( account, id, parent, icon) { } diff --git a/kopete/libkopete/tests/mock/kopetecontact_mock.h b/kopete/libkopete/tests/mock/kopetecontact_mock.h index e445a571..a0b735d5 100644 --- a/kopete/libkopete/tests/mock/kopetecontact_mock.h +++ b/kopete/libkopete/tests/mock/kopetecontact_mock.h @@ -35,7 +35,7 @@ namespace Mock class Contact : public Kopete::Contact { public: - Contact( Kopete::Account *account, const QString &id, Kopete::MetaContact *parent, const QString &icon = QString::null ); + Contact( Kopete::Account *account, const TQString &id, Kopete::MetaContact *parent, const TQString &icon = TQString::null ); ~Contact(); virtual Kopete::ChatSession* manager( CanCreateFlags canCreate = CannotCreate ); }; diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp index d3bbd0e2..d9ae1d3a 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.cpp @@ -24,22 +24,22 @@ namespace Test namespace Mock { -Protocol::Protocol( KInstance *instance, QObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) +Protocol::Protocol( KInstance *instance, TQObject *parent, const char *name ) : Kopete::Protocol(instance, parent, name) { } -Account* Protocol::createNewAccount( const QString &accountId ) +Account* Protocol::createNewAccount( const TQString &accountId ) { return 0L; } -AddContactPage* Protocol::createAddContactWidget( QWidget *parent, Kopete::Account *account ) +AddContactPage* Protocol::createAddContactWidget( TQWidget *parent, Kopete::Account *account ) { return 0L; } -KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, QWidget *parent ) +KopeteEditAccountWidget* Protocol::createEditAccountWidget( Kopete::Account *account, TQWidget *parent ) { return 0L; } diff --git a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h index 189f7d79..97f0d7ad 100644 --- a/kopete/libkopete/tests/mock/kopeteprotocol_mock.h +++ b/kopete/libkopete/tests/mock/kopeteprotocol_mock.h @@ -37,11 +37,11 @@ namespace Mock class Protocol : public Kopete::Protocol { public: - Protocol( KInstance *instance, QObject *parent, const char *name ); + Protocol( KInstance *instance, TQObject *parent, const char *name ); // pure virtual functions implemented - virtual Account *createNewAccount( const QString &accountId ); - virtual AddContactPage *createAddContactWidget( QWidget *parent, Kopete::Account *account ); - virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, QWidget *parent ); + virtual Account *createNewAccount( const TQString &accountId ); + virtual AddContactPage *createAddContactWidget( TQWidget *parent, Kopete::Account *account ); + virtual KopeteEditAccountWidget * createEditAccountWidget( Kopete::Account *account, TQWidget *parent ); }; } // end ns Kopete::Test::Mock |