From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdecore/tests/kcalendartest.cpp | 2 +- kdecore/tests/kconfigtestgui.cpp | 2 +- kdecore/tests/kconfigtestgui.h | 2 +- kdecore/tests/kipctest.h | 2 +- kdecore/tests/klocaletest.cpp | 28 ++++++++++++++-------------- kdecore/tests/kmacroexpandertest.cpp | 10 +++++----- kdecore/tests/kmdcodectest.cpp | 10 +++++----- kdecore/tests/kprocesstest.h | 2 +- kdecore/tests/kprociotest.h | 2 +- kdecore/tests/kresolvertest.cpp | 8 ++++---- kdecore/tests/kstddirstest.cpp | 2 +- kdecore/tests/ktimezonestest.cpp | 2 +- kdecore/tests/kurltest.cpp | 8 ++++---- kdecore/tests/testqtargs.cpp | 2 +- 14 files changed, 41 insertions(+), 41 deletions(-) (limited to 'kdecore/tests') diff --git a/kdecore/tests/kcalendartest.cpp b/kdecore/tests/kcalendartest.cpp index 51a40b892..8b6e8eea4 100644 --- a/kdecore/tests/kcalendartest.cpp +++ b/kdecore/tests/kcalendartest.cpp @@ -67,7 +67,7 @@ int main(int argc, char **argv) { option = args->getOption("date"); date = KGlobal::locale()->readDate(option); } else - date = TQDate::currentDate(); + date = TQDate::tqcurrentDate(); args->clear(); // Free up some memory. diff --git a/kdecore/tests/kconfigtestgui.cpp b/kdecore/tests/kconfigtestgui.cpp index abd476396..af560b496 100644 --- a/kdecore/tests/kconfigtestgui.cpp +++ b/kdecore/tests/kconfigtestgui.cpp @@ -121,7 +121,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name ) pQuitButton = new TQPushButton( this, "quitbutton" ); pQuitButton->setText( "Quit" ); pQuitButton->setGeometry( 340, 60, 60, 60 ); - connect( pQuitButton, TQT_SIGNAL(clicked()), qApp, TQT_SLOT(quit()) ); + connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) ); // create a default KConfig object in order to be able to start right away pConfig = new KConfig( TQString::null ); diff --git a/kdecore/tests/kconfigtestgui.h b/kdecore/tests/kconfigtestgui.h index 8311952b5..d7e4089bf 100644 --- a/kdecore/tests/kconfigtestgui.h +++ b/kdecore/tests/kconfigtestgui.h @@ -36,7 +36,7 @@ #include // -// KConfigTestView contains lots of Qt widgets. +// KConfigTestView tqcontains lots of Qt widgets. // class KConfigTestView : public QDialog diff --git a/kdecore/tests/kipctest.h b/kdecore/tests/kipctest.h index a8abd2e76..17122fbd8 100644 --- a/kdecore/tests/kipctest.h +++ b/kdecore/tests/kipctest.h @@ -3,7 +3,7 @@ #include -class MyObject: public QObject +class MyObject: public TQObject { Q_OBJECT public: diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp index a980359b0..a81d867b1 100644 --- a/kdecore/tests/klocaletest.cpp +++ b/kdecore/tests/klocaletest.cpp @@ -53,7 +53,7 @@ Test::Test( TQWidget *parent, const char *name ) { setCaption("Testing KLocale"); - TQWidget *d = qApp->desktop(); + TQWidget *d = tqApp->desktop(); setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420); createFields(); @@ -77,19 +77,19 @@ void Test::createFields() string+="Used language: "; string+=KGlobal::locale()->language()+"\n"; string+="Locale encoding: "; - string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n"; + string+=TQString::tqfromLatin1(KGlobal::locale()->encoding())+"\n"; string+="Localized date and time: "; - string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); + string+=KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); string+="\nLocalized monetary numbers: "; string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89); // This will not work // but you can copy other *.mo file string+="\nSome localized strings:\n"; - string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n"; - string+=TQString::fromLatin1("No = ")+i18n("No")+"\n"; - string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n"; - string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n"; + string+=TQString::tqfromLatin1("Yes = ")+i18n("Yes")+"\n"; + string+=TQString::tqfromLatin1("No = ")+i18n("No")+"\n"; + string+=TQString::tqfromLatin1("Help = ")+i18n("Help")+"\n"; + string+=TQString::tqfromLatin1("Cancel = ")+i18n("Cancel")+"\n"; label=new TQLabel(string,this,"Label"); label->setGeometry(10,10,400,400); @@ -102,9 +102,9 @@ int main( int argc, char ** argv ) KLocale::setMainCatalogue("kdelibs"); KApplication a( argc, argv, "klocaletest" ); - KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); - KGlobal::locale()->setCountry(TQString::fromLatin1("C")); - KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("en_US")); + KGlobal::locale()->setCountry(TQString::tqfromLatin1("C")); + KGlobal::locale()->setThousandsSeparator(TQString::tqfromLatin1(",")); TQString formatted; formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); @@ -152,8 +152,8 @@ int main( int argc, char ** argv ) TQDate date; date.setYMD( 2002, 5, 3 ); checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); - date = TQDate::currentDate(); - checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + date = TQDate::tqcurrentDate(); + checkDate("readDate( TQDate::tqcurrentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); TQTime time; time = KGlobal::locale()->readTime( "11:22:33", &ok ); @@ -181,11 +181,11 @@ int main( int argc, char ** argv ) check("formatTime(\"0:22\", as duration)", timeStr, "00:22" ); kdDebug() << "setLanguage C\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("C")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("C")); kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; kdDebug() << "setLanguage de\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("de")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("de")); kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; diff --git a/kdecore/tests/kmacroexpandertest.cpp b/kdecore/tests/kmacroexpandertest.cpp index 0c41a309b..672d1ad6a 100644 --- a/kdecore/tests/kmacroexpandertest.cpp +++ b/kdecore/tests/kmacroexpandertest.cpp @@ -79,26 +79,26 @@ int main(int argc, char *argv[]) s = "kedit --caption %n %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption 'Restaurant \"Chew It\"' 'filename.txt'"); - map.replace('n', "Restaurant 'Chew It'"); + map.tqreplace('n', "Restaurant 'Chew It'"); s = "kedit --caption %n %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption 'Restaurant '\\''Chew It'\\''' 'filename.txt'"); s = "kedit --caption \"%n\" %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"Restaurant 'Chew It'\" 'filename.txt'"); - map.replace('n', "Restaurant \"Chew It\""); + map.tqreplace('n', "Restaurant \"Chew It\""); s = "kedit --caption \"%n\" %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"Restaurant \\\"Chew It\\\"\" 'filename.txt'"); - map.replace('n', "Restaurant $HOME"); + map.tqreplace('n', "Restaurant $HOME"); s = "kedit --caption \"%n\" %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"Restaurant \\$HOME\" 'filename.txt'"); - map.replace('n', "Restaurant `echo hello`"); + map.tqreplace('n', "Restaurant `echo hello`"); s = "kedit --caption \"%n\" %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"Restaurant \\`echo hello\\`\" 'filename.txt'"); - map.replace('n', "Restaurant `echo hello`"); + map.tqreplace('n', "Restaurant `echo hello`"); s = "kedit --caption \"`echo %n`\" %f"; check( "KMacroExpander::expandMacrosShellQuote", s, KMacroExpander::expandMacrosShellQuote(s, map), "kedit --caption \"$( echo 'Restaurant `echo hello`')\" 'filename.txt'"); diff --git a/kdecore/tests/kmdcodectest.cpp b/kdecore/tests/kmdcodectest.cpp index 243d0d289..8ebd03888 100644 --- a/kdecore/tests/kmdcodectest.cpp +++ b/kdecore/tests/kmdcodectest.cpp @@ -96,7 +96,7 @@ void testCodec (const char* msg, Codec type, bool isFile) if (!f.exists()) { - kdError() << "Could not find: " << f.name () << endl; + kdError() << "Could not tqfind: " << f.name () << endl; return; } @@ -192,15 +192,15 @@ void MD5_timeTrial () time_t endTime; time_t startTime; - Q_UINT8 block[TEST_BLOCK_LEN]; - Q_UINT32 i; + TQ_UINT8 block[TEST_BLOCK_LEN]; + TQ_UINT32 i; cout << "Timing test. Digesting " << TEST_BLOCK_COUNT << " blocks of " << TEST_BLOCK_LEN << "-byte..." << endl; // Initialize block for (i = 0; i < TEST_BLOCK_LEN; i++) - block[i] = (Q_UINT8)(i & 0xff); + block[i] = (TQ_UINT8)(i & 0xff); // Start timer time (&startTime); @@ -308,7 +308,7 @@ void MD5_string (const char *input, const char* expected, bool rawOutput ) if ( expected ) { cout << "Expected: " << expected << endl; - cout << "Status: " << context.verify (expected) << endl; + cout << "tqStatus: " << context.verify (expected) << endl; } } diff --git a/kdecore/tests/kprocesstest.h b/kdecore/tests/kprocesstest.h index 3e5d989ec..23ac443dd 100644 --- a/kdecore/tests/kprocesstest.h +++ b/kdecore/tests/kprocesstest.h @@ -15,7 +15,7 @@ #include #include "kprocess.h" -class Dummy : public QObject +class Dummy : public TQObject { Q_OBJECT diff --git a/kdecore/tests/kprociotest.h b/kdecore/tests/kprociotest.h index 6392fc708..9f948e644 100644 --- a/kdecore/tests/kprociotest.h +++ b/kdecore/tests/kprociotest.h @@ -15,7 +15,7 @@ #include #include "kprocio.h" -class Dummy : public QObject +class Dummy : public TQObject { Q_OBJECT diff --git a/kdecore/tests/kresolvertest.cpp b/kdecore/tests/kresolvertest.cpp index f1d3c11f9..1b2f5148d 100644 --- a/kdecore/tests/kresolvertest.cpp +++ b/kdecore/tests/kresolvertest.cpp @@ -75,8 +75,8 @@ public: bool tryLookup(const char* node, const char *serv) { int error; - TQString _node = TQString::fromLatin1(node); - TQString _serv = TQString::fromLatin1(serv); + TQString _node = TQString::tqfromLatin1(node); + TQString _serv = TQString::tqfromLatin1(serv); printf("\tTrying to lookup %s|%s... ", node, serv); TQPtrList list = KExtendedSocket::lookup(_node, _serv, 0, &error); @@ -138,8 +138,8 @@ bool try_pton() bool tryLookup6(const char *node, const char *serv) { int error; - TQString _node = TQString::fromLatin1(node); - TQString _serv = TQString::fromLatin1(serv); + TQString _node = TQString::tqfromLatin1(node); + TQString _serv = TQString::tqfromLatin1(serv); printf("\tTrying to lookup IPv6 of %s|%s... ", node, serv); TQPtrList list = KExtendedSocket::lookup(_node, _serv, KExtendedSocket::ipv6Socket, &error); diff --git a/kdecore/tests/kstddirstest.cpp b/kdecore/tests/kstddirstest.cpp index fa797d665..21b08f687 100644 --- a/kdecore/tests/kstddirstest.cpp +++ b/kdecore/tests/kstddirstest.cpp @@ -18,7 +18,7 @@ int main(int argc, char **argv) s = t.findResource("icon", "xv.xpm"); if (!s.isNull()) kdDebug() << s << endl; - list = t.findAllResources("data", "kfind/toolbar", true); + list = t.findAllResources("data", "ktqfind/toolbar", true); for (TQStringList::ConstIterator it = list.begin(); it != list.end(); ++it) { kdDebug() << "data " << (*it).ascii() << endl; } diff --git a/kdecore/tests/ktimezonestest.cpp b/kdecore/tests/ktimezonestest.cpp index 650cc0512..69ea7c8a1 100644 --- a/kdecore/tests/ktimezonestest.cpp +++ b/kdecore/tests/ktimezonestest.cpp @@ -17,7 +17,7 @@ int main(int argc, char *argv[]) // Find the current offset of the UTC timezone. timezone = timezones.zone("UTC"); - printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::currentDateTime()) ); + printf( "UTC timezone offset should be 0: %d\n", timezone->offset(TQDateTime::tqcurrentDateTime()) ); // Find some offsets for Europe/London. char *london = "Europe/London"; diff --git a/kdecore/tests/kurltest.cpp b/kdecore/tests/kurltest.cpp index e80561d2c..535a66b9a 100644 --- a/kdecore/tests/kurltest.cpp +++ b/kdecore/tests/kurltest.cpp @@ -1003,16 +1003,16 @@ int main(int argc, char *argv[]) check("com2.url()", com2.url(), "http://server.com/dir/blubb/blah/"); KURL utf8_1("audiocd:/By%20Name/15%20Geantra%C3%AE.wav", 106); - check("utf8_1.fileName()", utf8_1.fileName(), TQString::fromLatin1("15 Geantraî.wav")); + check("utf8_1.fileName()", utf8_1.fileName(), TQString::tqfromLatin1("15 Geantraî.wav")); KURL utf8_2("audiocd:/By%20Name/15%2fGeantra%C3%AE.wav", 106); - check("utf8_2.fileName()", utf8_2.fileName(), TQString::fromLatin1("15/Geantraî.wav")); + check("utf8_2.fileName()", utf8_2.fileName(), TQString::tqfromLatin1("15/Geantraî.wav")); KURL url_newline_1("http://www.foo.bar/foo/bar\ngnork"); - check("url_newline_1.url()", url_newline_1.url(), TQString::fromLatin1("http://www.foo.bar/foo/bar%0Agnork")); + check("url_newline_1.url()", url_newline_1.url(), TQString::tqfromLatin1("http://www.foo.bar/foo/bar%0Agnork")); KURL url_newline_2("http://www.foo.bar/foo?bar\ngnork"); - check("url_newline_2.url()", url_newline_2.url(), TQString::fromLatin1("http://www.foo.bar/foo?bar%0Agnork")); + check("url_newline_2.url()", url_newline_2.url(), TQString::tqfromLatin1("http://www.foo.bar/foo?bar%0Agnork")); KURL local_file_1("file://localhost/my/file"); check("local_file_1.isLocalFile()", local_file_1.isLocalFile() ? "true" : "false", "true"); diff --git a/kdecore/tests/testqtargs.cpp b/kdecore/tests/testqtargs.cpp index 2b3606a59..00682e9ff 100644 --- a/kdecore/tests/testqtargs.cpp +++ b/kdecore/tests/testqtargs.cpp @@ -35,7 +35,7 @@ { "background ", I18N_NOOP("sets the default background color and an\n application palette (light and dark shades are\ncalculated)."), 0}, - it looks for "background" instead of "-background" so never find the arg. + it looks for "background" instead of "-background" so never tqfind the arg. Software: g++ 2.95, kdelibs from CVS Jan 28, Qt 3.01 OS: Debian GNU/Linux 3.0 (sid) -- cgit v1.2.1