diff options
Diffstat (limited to 'tdecore/tests')
29 files changed, 169 insertions, 148 deletions
diff --git a/tdecore/tests/CMakeLists.txt b/tdecore/tests/CMakeLists.txt index 36377a255..2cabe1866 100644 --- a/tdecore/tests/CMakeLists.txt +++ b/tdecore/tests/CMakeLists.txt @@ -30,23 +30,41 @@ tde_add_library( tdeconfigtest SHARED AUTOMOC EXCLUDE_FROM_ALL ) -set( CHECKS - tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest kstddirstest - kuniqueapptest ktempfiletest krandomsequencetest kdebugtest - ksocktest kstringhandlertest kcmdlineargstest kapptest kmemtest - dcopkonqtest kipctest cplusplustest kiconloadertest kresolvertest - kmdcodectest knotifytest ksortablevaluelisttest krfcdatetest testqtargs - kprociotest kcharsetstest kcalendartest kmacroexpandertest kshelltest - kxerrorhandlertest startserviceby kglobaltest ktimezonestest +set( AUTOMATED_CHECKS + kcharsetstest kglobaltest kmacroexpandertest krfcdatetest + kstringhandlertest kurltest tdestdacceltest + + # cplusplustest # -- skip (doesn't error on errors) + # tdesimpleconfigtest # -- skip (doesn't error on errors) + # ksortablevaluelist # -- skip (doesn't error on errors) + # ksocktest # -- skip due to DNS failure ) +# Tests that require some graphical interaction / confirmation. +set( MANUAL_CHECKS_GUI + kdebugtest klocaletest knotifytest kxerrorhandlertest + startserviceby tdeconfigtestgui tdeprocesstest testqtargs +) -foreach( _check ${CHECKS} ) - tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared ) +# Tests that require some interaction using a terminal +set( MANUAL_CHECKS_TUI + dcopkonqtest kcalendartest kcmdlineargstest kiconloadertest + kipctest kmemtest krandomsequencetest kresolvertest + kmdcodectest kshelltest ktempfiletest ktimezonestest + tdeapptest tdeprociotest tdestandarddirstest tdeuniqueapptest +) + +foreach( _check ${AUTOMATED_CHECKS} ) + tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared TEST ) endforeach( ) -tde_add_check_executable( kurltest AUTOMOC LINK tdeconfigtest-shared TEST ) -tde_add_check_executable( tdestdacceltest AUTOMOC LINK tdeconfigtest-shared TEST ) +foreach( _check ${MANUAL_CHECKS_GUI}) + tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared ) +endforeach() + +foreach( _check ${MANUAL_CHECKS_TUI}) + tde_add_check_executable( ${_check} AUTOMOC LINK tdeconfigtest-shared ) +endforeach() tde_add_check_executable( kidlservertest AUTOMOC SOURCES KIDLTest.cpp KIDLTest.skel LINK tdeconfigtest-shared ) diff --git a/tdecore/tests/KIDLTestClient.cpp b/tdecore/tests/KIDLTestClient.cpp index 4614ed51e..3fadee13e 100644 --- a/tdecore/tests/KIDLTestClient.cpp +++ b/tdecore/tests/KIDLTestClient.cpp @@ -7,8 +7,8 @@ int main( int argc, char** argv ) { TDEApplication app( argc, argv, "KIDLTestClient", false /* No GUI */ ); - kapp->dcopClient()->attach(); - // kapp->dcopClient()->registerAs( "kidlclienttest" ); + tdeApp->dcopClient()->attach(); + // tdeApp->dcopClient()->registerAs( "kidlclienttest" ); KIDLTest_stub* t = new KIDLTest_stub( "kidlservertest", "Hello" ); diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am index 73e06f588..378e442d2 100644 --- a/tdecore/tests/Makefile.am +++ b/tdecore/tests/Makefile.am @@ -21,19 +21,19 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes) AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH) -check_PROGRAMS = tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest \ - kstddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \ - kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest \ +check_PROGRAMS = tdeconfigtestgui klocaletest tdeprocesstest tdesimpleconfigtest \ + tdestandarddirstest kurltest tdeuniqueapptest ktempfiletest krandomsequencetest \ + kdebugtest ksocktest kstringhandlertest kcmdlineargstest tdeapptest \ kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \ cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \ - ksortablevaluelisttest krfcdatetest testqtargs kprociotest \ + ksortablevaluelisttest krfcdatetest testqtargs tdeprociotest \ kcharsetstest kcalendartest kmacroexpandertest kshelltest \ kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest TESTS = kurltest tdestdacceltest -noinst_HEADERS = klocaletest.h kprocesstest.h KIDLTest.h \ - kipctest.h kprociotest.h +noinst_HEADERS = klocaletest.h tdeprocesstest.h KIDLTest.h \ + kipctest.h tdeprociotest.h METASOURCES = AUTO @@ -43,12 +43,12 @@ kdebugtest_SOURCES = kdebugtest.cpp klocaletest_SOURCES = klocaletest.cpp #klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp #kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp -ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp +tdesimpleconfigtest_SOURCES = tdesimpleconfigtest.cpp kurltest_SOURCES = kurltest.cpp -kstddirstest_SOURCES = kstddirstest.cpp -kprocesstest_SOURCES = kprocesstest.cpp -kuniqueapptest_SOURCES = kuniqueapptest.cpp -kapptest_SOURCES = kapptest.cpp +tdestandarddirstest_SOURCES = tdestandarddirstest.cpp +tdeprocesstest_SOURCES = tdeprocesstest.cpp +tdeuniqueapptest_SOURCES = tdeuniqueapptest.cpp +tdeapptest_SOURCES = tdeapptest.cpp ksocktest_SOURCES = ksocktest.cpp ktempfiletest_SOURCES = ktempfiletest.cpp krandomsequencetest_SOURCES = krandomsequencetest.cpp @@ -68,7 +68,7 @@ knotifytest_SOURCES = knotifytest.cpp ksortablevaluelisttest_SOURCES = ksortablevaluelisttest.cpp krfcdatetest_SOURCES = krfcdatetest.cpp testqtargs_SOURCES = testqtargs.cpp -kprociotest_SOURCES = kprociotest.cpp +tdeprociotest_SOURCES = tdeprociotest.cpp kcharsetstest_SOURCES = kcharsetstest.cpp kcalendartest_SOURCES = kcalendartest.cpp kmacroexpandertest_SOURCES = kmacroexpandertest.cpp diff --git a/tdecore/tests/dcopkonqtest.cpp b/tdecore/tests/dcopkonqtest.cpp index b8bb055d6..531d8dfd7 100644 --- a/tdecore/tests/dcopkonqtest.cpp +++ b/tdecore/tests/dcopkonqtest.cpp @@ -6,8 +6,8 @@ int main( int argc, char** argv ) { TDEApplication app( argc, argv, "KIDLTestClient", false ); - kapp->dcopClient()->attach(); - // kapp->dcopClient()->registerAs( "kidlclienttest" ); + tdeApp->dcopClient()->attach(); + // tdeApp->dcopClient()->registerAs( "kidlclienttest" ); TQByteArray data; @@ -15,20 +15,20 @@ int main( int argc, char** argv ) TQByteArray snd; TQByteArray rcv; TQCString _type_; - kapp->dcopClient()->call( "konqueror", "KonquerorIface", "reparseConfiguration()", snd, _type_, rcv ); + tdeApp->dcopClient()->call( "konqueror", "KonquerorIface", "reparseConfiguration()", snd, _type_, rcv ); kdDebug() << _type_ << endl; if( _type_ != "void" ) kdDebug() << "void expected, " << _type_.data() << " returned" << endl; /* debug("sending configure to object KonquerorIface in konqueror"); - if (kapp->dcopClient()->send( "konqueror", "KonquerorIface", "configure()", data )) + if (tdeApp->dcopClient()->send( "konqueror", "KonquerorIface", "configure()", data )) debug("ok"); else debug("ko"); /// BROADCAST debug("sending databaseChanged to object tdesycoca in all apps"); - if (kapp->dcopClient()->send( "*", "tdesycoca", "databaseChanged()", data )) + if (tdeApp->dcopClient()->send( "*", "tdesycoca", "databaseChanged()", data )) debug("ok"); else debug("ko"); diff --git a/tdecore/tests/kdebugtest.cpp b/tdecore/tests/kdebugtest.cpp index 4052d5dcf..266eaeaae 100644 --- a/tdecore/tests/kdebugtest.cpp +++ b/tdecore/tests/kdebugtest.cpp @@ -1,12 +1,12 @@ #include "kdebug.h" #include <tqwidget.h> -#include <kinstance.h> +#include <tdeinstance.h> #include <iostream> #include <tqapplication.h> #include <tqpen.h> #include <tqvariant.h> -class TestWidget : public QWidget +class TestWidget : public TQWidget { public: @@ -64,7 +64,7 @@ public: TQVariant v( 0.12345 ); kdDebug() << "Variant: " << v << endl; - v = TQPen( Qt::red ); + v = TQPen( TQt::red ); kdDebug() << "Variant: " << v << endl; TQByteArray data( 6 ); diff --git a/tdecore/tests/kipctest.cpp b/tdecore/tests/kipctest.cpp index d1a678ac9..9692710e2 100644 --- a/tdecore/tests/kipctest.cpp +++ b/tdecore/tests/kipctest.cpp @@ -8,12 +8,12 @@ MyObject::MyObject() : TQObject(0L, "testobj") { - connect(kapp, TQT_SIGNAL(tdedisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged())); - connect(kapp, TQT_SIGNAL(tdedisplayFontChanged()), TQT_SLOT(slotFontChanged())); - connect(kapp, TQT_SIGNAL(tdedisplayStyleChanged()), TQT_SLOT(slotStyleChanged())); - connect(kapp, TQT_SIGNAL(backgroundChanged(int)), TQT_SLOT(slotBackgroundChanged(int))); - connect(kapp, TQT_SIGNAL(appearanceChanged()), TQT_SLOT(slotAppearanceChanged())); - connect(kapp, TQT_SIGNAL(kipcMessage(int,int)), TQT_SLOT(slotMessage(int,int))); + connect(tdeApp, TQ_SIGNAL(tdedisplayPaletteChanged()), TQ_SLOT(slotPaletteChanged())); + connect(tdeApp, TQ_SIGNAL(tdedisplayFontChanged()), TQ_SLOT(slotFontChanged())); + connect(tdeApp, TQ_SIGNAL(tdedisplayStyleChanged()), TQ_SLOT(slotStyleChanged())); + connect(tdeApp, TQ_SIGNAL(backgroundChanged(int)), TQ_SLOT(slotBackgroundChanged(int))); + connect(tdeApp, TQ_SIGNAL(appearanceChanged()), TQ_SLOT(slotAppearanceChanged())); + connect(tdeApp, TQ_SIGNAL(kipcMessage(int,int)), TQ_SLOT(slotMessage(int,int))); } int main(int argc, char **argv) diff --git a/tdecore/tests/kipctest.h b/tdecore/tests/kipctest.h index 17122fbd8..d4c3d538d 100644 --- a/tdecore/tests/kipctest.h +++ b/tdecore/tests/kipctest.h @@ -5,17 +5,17 @@ class MyObject: public TQObject { - Q_OBJECT + TQ_OBJECT public: MyObject(); public slots: - void slotPaletteChanged() { printf("SIGNAL: Palette changed\n"); } - void slotStyleChanged() { printf("SIGNAL: Style changed\n"); } - void slotFontChanged() { printf("SIGNAL: Font changed\n"); } - void slotBackgroundChanged(int i) { printf("SIGNAL: Background %d changed\n", i); } - void slotAppearanceChanged() { printf("SIGNAL: Appearance changed\n"); } - void slotMessage(int id, int arg) { printf("SIGNAL: user message: %d,%d\n", id, arg); } + void slotPaletteChanged() { printf("TQ_SIGNAL: Palette changed\n"); } + void slotStyleChanged() { printf("TQ_SIGNAL: Style changed\n"); } + void slotFontChanged() { printf("TQ_SIGNAL: Font changed\n"); } + void slotBackgroundChanged(int i) { printf("TQ_SIGNAL: Background %d changed\n", i); } + void slotAppearanceChanged() { printf("TQ_SIGNAL: Appearance changed\n"); } + void slotMessage(int id, int arg) { printf("TQ_SIGNAL: user message: %d,%d\n", id, arg); } }; #endif diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 5f4d1da2a..bb4c46949 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -1,4 +1,3 @@ -// klocaletest.cpp -*- C++ -*- // // $Id$ // diff --git a/tdecore/tests/klocaletest.h b/tdecore/tests/klocaletest.h index 6634b6107..433807b78 100644 --- a/tdecore/tests/klocaletest.h +++ b/tdecore/tests/klocaletest.h @@ -11,7 +11,7 @@ class TQLabel; */ class Test : public TQWidget { - Q_OBJECT + TQ_OBJECT public: /**@name methods */ diff --git a/tdecore/tests/kmdcodectest.cpp b/tdecore/tests/kmdcodectest.cpp index 571d3f10b..4cc06813d 100644 --- a/tdecore/tests/kmdcodectest.cpp +++ b/tdecore/tests/kmdcodectest.cpp @@ -268,7 +268,7 @@ void MD5_verify( const char *input, const char *digest, bool isFile ) cout << "Calculated Digest = " << context.hexDigest() << endl; cout << "Supplied Digest = " << digest << endl; - cout << "Matches: " << (result ? "TRUE":"FALSE") << endl; + cout << "Matches: " << (result ? "true":"false") << endl; } void MD5_file (const char *filename, bool rawOutput ) diff --git a/tdecore/tests/krandomsequencetest.cpp b/tdecore/tests/krandomsequencetest.cpp index 44f1ce15a..f83d2a80f 100644 --- a/tdecore/tests/krandomsequencetest.cpp +++ b/tdecore/tests/krandomsequencetest.cpp @@ -54,7 +54,7 @@ main(int argc, char *argv[]) for(int i = 0; i < 20; i++) printf("%3ld ", seq.getLong(100)); - seq.setSeed(kapp->random()); + seq.setSeed(tdeApp->random()); TQPtrList<TQString> list; list.append(new TQString("A")); diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp index 9f476cd51..58d0e9ac1 100644 --- a/tdecore/tests/kresolvertest.cpp +++ b/tdecore/tests/kresolvertest.cpp @@ -36,7 +36,7 @@ #include <tqptrlist.h> #include <tqstring.h> -#include <kuniqueapplication.h> +#include <tdeuniqueapplication.h> #include <ksocks.h> #include <ksockaddr.h> #include <kextsock.h> @@ -62,11 +62,11 @@ namespace KDE extern const int resolverFlags; } -class TestApp : public KUniqueApplication +class TestApp : public TDEUniqueApplication { public: TestApp() : - KUniqueApplication() + TDEUniqueApplication() { } int newInstance(TQValueList<TQCString> params); @@ -412,7 +412,7 @@ int main(int argc, char **argv) { TDEAboutData about("socktest2", "SockTest", "1.0"); TDECmdLineArgs::init(argc, argv, &about); - KUniqueApplication::addCmdLineOptions(); + TDEUniqueApplication::addCmdLineOptions(); /* TestApp a; a.exec();*/ diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp index 94358a8f1..c67c5a4e2 100644 --- a/tdecore/tests/krfcdatetest.cpp +++ b/tdecore/tests/krfcdatetest.cpp @@ -59,6 +59,12 @@ int main(int argc, char *argv[]) a = KRFCDate::parseDateISO8601("1994-01-01"); check( "1994-01-01", a, b ); + a = KRFCDate::parseDateISO8601("1994-01-01T12"); + check("1994-01-01T12", a, b); + + a = KRFCDate::parseDateISO8601("1994-01-01T12:00"); + check("1994-01-01T12:00", a, b); + b = 0; // pass RFC date to ISO parser diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp index a1ce8f86b..ec9c1ec95 100644 --- a/tdecore/tests/ksocktest.cpp +++ b/tdecore/tests/ksocktest.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ -#include "kuniqueapplication.h" +#include "tdeuniqueapplication.h" #include "tdeglobal.h" #include "kdebug.h" #include "ksock.h" @@ -103,7 +103,7 @@ main(int argc, char *argv[]) TDESocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() ); check( "peerAddress:", addr->nodeName().latin1(), "213.203.58.36" ); - check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? "TRUE" : "FALSE", "TRUE"); - check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 8080)) ? "TRUE" : "FALSE", "FALSE"); - check( "isEqual:", addr->isCoreEqual(KInetSocketAddress("213.203.58.36", 8080)) ? "TRUE" : "FALSE", "TRUE"); + check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 80)) ? "true" : "false", "true"); + check( "isEqual:", addr->isEqual(KInetSocketAddress("213.203.58.36", 8080)) ? "true" : "false", "false"); + check( "isEqual:", addr->isCoreEqual(KInetSocketAddress("213.203.58.36", 8080)) ? "true" : "false", "true"); } diff --git a/tdecore/tests/ktempfiletest.cpp b/tdecore/tests/ktempfiletest.cpp index 019db0690..38960bf1a 100644 --- a/tdecore/tests/ktempfiletest.cpp +++ b/tdecore/tests/ktempfiletest.cpp @@ -18,7 +18,7 @@ #include "tdetempfile.h" #include "tdeapplication.h" -#include "kstandarddirs.h" +#include "tdestandarddirs.h" #include <tqstring.h> #include <unistd.h> diff --git a/tdecore/tests/ktimezonestest.cpp b/tdecore/tests/ktimezonestest.cpp index d00626cdf..a42c5a395 100644 --- a/tdecore/tests/ktimezonestest.cpp +++ b/tdecore/tests/ktimezonestest.cpp @@ -22,8 +22,8 @@ int main(int argc, char *argv[]) // Find some offsets for Europe/London. const char *london = "Europe/London"; timezone = timezones.zone(london); - TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", Qt::ISODate)); - TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", Qt::ISODate)); + TQDateTime winter(TQDateTime::fromString("2005-01-01T00:00:00", TQt::ISODate)); + TQDateTime summer(TQDateTime::fromString("2005-06-01T00:00:00", TQt::ISODate)); printf( "%s winter timezone offset should be 0: %d\n", london, timezone->offset(winter) ); printf( "%s summer timezone offset should be 3600: %d\n", london, timezone->offset(summer) ); @@ -34,13 +34,13 @@ int main(int argc, char *argv[]) const char *gmtBeforePst = "2005-10-30T01:00:00"; const char *gmtAfterPst = "2005-12-01T00:00:00"; TQString result; - result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, Qt::ISODate)).toString(Qt::ISODate); + result = timezone->convert(losAngeles, TQDateTime::fromString(bstBeforePdt, TQt::ISODate)).toString(TQt::ISODate); printf( "BST before PDT, %s should be 2005-03-27T15:00:00: %s\n", bstBeforePdt, result.latin1() ); - result = timezone->convert(losAngeles, TQDateTime::fromString(bstAfterPdt, Qt::ISODate)).toString(Qt::ISODate); + result = timezone->convert(losAngeles, TQDateTime::fromString(bstAfterPdt, TQt::ISODate)).toString(TQt::ISODate); printf( "BST and PDT, %s should be 2005-04-30T16:00:00: %s\n", bstAfterPdt, result.latin1() ); - result = timezone->convert(losAngeles, TQDateTime::fromString(gmtBeforePst, Qt::ISODate)).toString(Qt::ISODate); + result = timezone->convert(losAngeles, TQDateTime::fromString(gmtBeforePst, TQt::ISODate)).toString(TQt::ISODate); printf( "GMT before PST, %s should be 2005-10-29T17:00:00: %s\n", gmtBeforePst, result.latin1() ); - result = timezone->convert(losAngeles, TQDateTime::fromString(gmtAfterPst, Qt::ISODate)).toString(Qt::ISODate); + result = timezone->convert(losAngeles, TQDateTime::fromString(gmtAfterPst, TQt::ISODate)).toString(TQt::ISODate); printf( "GMT and PST, %s should be 2005-11-30T16:00:00: %s\n", gmtAfterPst, result.latin1() ); printf( "Latitude 89 should be valid: %svalid\n", KTimezone::isValidLatitude(89.0) ? "" : "in"); printf( "Latitude 91 should be invalid: %svalid\n", KTimezone::isValidLatitude(91.0) ? "" : "in"); diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp index 0f57dd97c..b80515e81 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -88,25 +88,25 @@ int main(int argc, char *argv[]) KURL::List lst; KURL emptyURL; - check( "KURL::isMalformed()", emptyURL.isMalformed() ? "TRUE":"FALSE", "TRUE"); - check( "KURL::isValid()", emptyURL.isValid() ? "TRUE":"FALSE", "FALSE"); - check( "KURL::isEmpty()", emptyURL.isEmpty() ? "TRUE":"FALSE", "TRUE"); + check( "KURL::isMalformed()", emptyURL.isMalformed() ? "true":"false", "true"); + check( "KURL::isValid()", emptyURL.isValid() ? "true":"false", "false"); + check( "KURL::isEmpty()", emptyURL.isEmpty() ? "true":"false", "true"); check( "prettyURL()", emptyURL.prettyURL(), ""); - check( "isLocalFile()", emptyURL.isLocalFile()?"TRUE":"FALSE", "FALSE" ); + check( "isLocalFile()", emptyURL.isLocalFile()?"true":"false", "false" ); emptyURL = ""; - check( "KURL::isMalformed()", emptyURL.isMalformed() ? "TRUE":"FALSE", "TRUE"); - check( "KURL::isValid()", emptyURL.isValid() ? "TRUE":"FALSE", "FALSE"); - check( "KURL::isEmpty()", emptyURL.isEmpty() ? "TRUE":"FALSE", "TRUE"); + check( "KURL::isMalformed()", emptyURL.isMalformed() ? "true":"false", "true"); + check( "KURL::isValid()", emptyURL.isValid() ? "true":"false", "false"); + check( "KURL::isEmpty()", emptyURL.isEmpty() ? "true":"false", "true"); KURL fileURL = "file:/"; - check( "KURL::isEmpty()", fileURL.isEmpty() ? "TRUE":"FALSE", "FALSE"); + check( "KURL::isEmpty()", fileURL.isEmpty() ? "true":"false", "false"); fileURL = "file:///"; - check( "KURL::isEmpty()", fileURL.isEmpty() ? "TRUE":"FALSE", "FALSE"); + check( "KURL::isEmpty()", fileURL.isEmpty() ? "true":"false", "false"); KURL baseURL ("hTTp://www.foo.bar:80" ); - check( "KURL::isValid()", baseURL.isValid() ? "TRUE":"FALSE", "TRUE"); + check( "KURL::isValid()", baseURL.isValid() ? "true":"false", "true"); check( "KURL::protocol()", baseURL.protocol(), "http"); // lowercase KURL url1 ( baseURL, "//www1.foo.bar" ); check( "KURL::host()", url1.host(), "www1.foo.bar"); @@ -184,13 +184,13 @@ int main(int argc, char *argv[]) check("KURL::upURL()", url1.upURL().url(), "file:///home/dfaure/"); url1 = "gg:www.kde.org"; - check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "TRUE" ); + check("KURL::isValid()", url1.isValid()?"true":"false", "true" ); url1= "KDE"; - check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "FALSE" ); + check("KURL::isValid()", url1.isValid()?"true":"false", "false" ); url1= "$HOME/.trinity/share/config"; - check("KURL::isValid()", url1.isValid()?"TRUE":"FALSE", "FALSE" ); + check("KURL::isValid()", url1.isValid()?"true":"false", "false" ); u1 = "file:/opt/kde2/qt2/doc/html/showimg-main-cpp.html#TQObject::connect"; url1 = u1; @@ -271,14 +271,14 @@ int main(int argc, char *argv[]) #if 0 // This URL is broken, '#' should be escaped. - u1 = "file:/home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cc#"; + u1 = "file:/home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cpp#"; url1 = u1; - check("KURL::url()", url1.url(), "file:///home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cc#"); + check("KURL::url()", url1.url(), "file:///home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cpp#"); check("KURL::hasRef()", url1.hasRef() ? "yes" : "no", "no"); check("KURL::hasHTMLRef()", url1.hasHTMLRef() ? "yes" : "no", "no"); check("KURL::htmlRef()", url1.htmlRef(), ""); check("KURL::hasSubURL()", url1.hasSubURL() ? "yes" : "no", "yes"); - check("KURL::prettyURL()", url1.upURL().url(), "file:///home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cc#"); + check("KURL::prettyURL()", url1.upURL().url(), "file:///home/dfaure/cdrdao-1.1.5/dao/#CdrDriver.cpp#"); #endif u1 = "file:/home/dfaure/my%20tar%20file.tgz#gzip:/#tar:/README"; @@ -382,7 +382,7 @@ int main(int argc, char *argv[]) check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myfile.txt"); u2.setFileName( "myotherfile.txt" ); check("KURL::setFileName()", u2.url(), "file:///home/dfaure/myotherfile.txt"); - // more tricky, renaming a directory (kpropsdlg.cc, line ~ 238) + // more tricky, renaming a directory (kpropsdlg.cpp, line ~ 238) TQString tmpurl = "file:/home/dfaure/myolddir/"; if ( tmpurl.at(tmpurl.length() - 1) == '/') // It's a directory, so strip the trailing slash first @@ -1115,9 +1115,9 @@ int main(int argc, char *argv[]) KURL emptyUserTest1("http://www.foobar.com/"); KURL emptyUserTest2("http://www.foobar.com/"); emptyUserTest2.setUser(""); - check("Empty vs. null fields: user", emptyUserTest1==emptyUserTest2?"TRUE":"FALSE","TRUE"); + check("Empty vs. null fields: user", emptyUserTest1==emptyUserTest2?"true":"false","true"); emptyUserTest2.setPass(""); - check("Empty vs. null fields: password", emptyUserTest1==emptyUserTest2?"TRUE":"FALSE","TRUE"); + check("Empty vs. null fields: password", emptyUserTest1==emptyUserTest2?"true":"false","true"); printf("\nTest OK !\n"); } diff --git a/tdecore/tests/startserviceby.cpp b/tdecore/tests/startserviceby.cpp index 67c535cec..8d23042ef 100644 --- a/tdecore/tests/startserviceby.cpp +++ b/tdecore/tests/startserviceby.cpp @@ -27,7 +27,7 @@ int main(int argc, char *argv[]) { - TDEAboutData about("kapptest", "kapptest", "version"); + TDEAboutData about("tdeapptest", "tdeapptest", "version"); TDECmdLineArgs::init(argc, argv, &about); TDEApplication a; diff --git a/tdecore/tests/kapptest.cpp b/tdecore/tests/tdeapptest.cpp index 6a3abace9..09e9124b6 100644 --- a/tdecore/tests/kapptest.cpp +++ b/tdecore/tests/tdeapptest.cpp @@ -28,7 +28,7 @@ int main(int argc, char *argv[]) { - TDEAboutData about("kapptest", "kapptest", "version"); + TDEAboutData about("tdeapptest", "tdeapptest", "version"); TDECmdLineArgs::init(argc, argv, &about); TDEApplication a; diff --git a/tdecore/tests/tdeconfigtestgui.cpp b/tdecore/tests/tdeconfigtestgui.cpp index f5ea428c0..8db4fce3a 100644 --- a/tdecore/tests/tdeconfigtestgui.cpp +++ b/tdecore/tests/tdeconfigtestgui.cpp @@ -35,7 +35,7 @@ #include <tqfileinfo.h> #include <tqdatetime.h> #include <kdebug.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <config.h> // Standard Qt widgets @@ -76,8 +76,8 @@ TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) pAppFileEdit = new TQLineEdit( this, "appconfigedit" ); pAppFileEdit->setGeometry( 240, 20, 160, 20 ); - connect( pAppFileEdit, TQT_SIGNAL(returnPressed()), - TQT_SLOT(appConfigEditReturnPressed())); + connect( pAppFileEdit, TQ_SIGNAL(returnPressed()), + TQ_SLOT(appConfigEditReturnPressed())); // Label and edit for the group pGroupLabel = new TQLabel( this, "grouplabel" ); @@ -86,14 +86,14 @@ TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) pGroupEdit = new TQLineEdit( this, "groupedit" ); pGroupEdit->setGeometry( 120, 60, 100, 20 ); - connect( pGroupEdit, TQT_SIGNAL(returnPressed()), - TQT_SLOT(groupEditReturnPressed())); + connect( pGroupEdit, TQ_SIGNAL(returnPressed()), + TQ_SLOT(groupEditReturnPressed())); // Edit and label for the key/value pair pKeyEdit = new TQLineEdit( this, "keyedit" ); pKeyEdit->setGeometry( 20, 100, 80, 20 ); - connect( pKeyEdit, TQT_SIGNAL( returnPressed()), - TQT_SLOT(keyEditReturnPressed())); + connect( pKeyEdit, TQ_SIGNAL( returnPressed()), + TQ_SLOT(keyEditReturnPressed())); pEqualsLabel = new TQLabel( this, "equalslabel" ); pEqualsLabel->setGeometry( 105, 100, 20, 20 ); @@ -106,7 +106,7 @@ TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) pWriteButton = new TQPushButton( this, "writebutton" ); pWriteButton->setGeometry( 20,140, 80, 20 ); pWriteButton->setText( "Write entry" ); - connect( pWriteButton, TQT_SIGNAL(clicked()), TQT_SLOT( writeButtonClicked() ) ); + connect( pWriteButton, TQ_SIGNAL(clicked()), TQ_SLOT( writeButtonClicked() ) ); // Labels for the info line pInfoLabel1 = new TQLabel( this, "infolabel1" ); @@ -121,7 +121,7 @@ TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name ) pQuitButton = new TQPushButton( this, "quitbutton" ); pQuitButton->setText( "Quit" ); pQuitButton->setGeometry( 340, 60, 60, 60 ); - connect( pQuitButton, TQT_SIGNAL(clicked()), tqApp, TQT_SLOT(quit()) ); + connect( pQuitButton, TQ_SIGNAL(clicked()), tqApp, TQ_SLOT(quit()) ); // create a default TDEConfig object in order to be able to start right away pConfig = new TDEConfig( TQString::null ); diff --git a/tdecore/tests/tdeconfigtestgui.h b/tdecore/tests/tdeconfigtestgui.h index a7cfd1356..520cb79cf 100644 --- a/tdecore/tests/tdeconfigtestgui.h +++ b/tdecore/tests/tdeconfigtestgui.h @@ -24,7 +24,7 @@ #include <tqfile.h> #include <tqfileinfo.h> #include <kdebug.h> -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tqtextstream.h> // Standard Qt widgets @@ -41,7 +41,7 @@ class TDEConfigTestView : public TQDialog { - Q_OBJECT + TQ_OBJECT public: TDEConfigTestView( TQWidget *parent=0, const char *name=0 ); ~TDEConfigTestView(); diff --git a/tdecore/tests/kprocesstest.cpp b/tdecore/tests/tdeprocesstest.cpp index d8d86d988..0d27f69fa 100644 --- a/tdecore/tests/kprocesstest.cpp +++ b/tdecore/tests/tdeprocesstest.cpp @@ -9,7 +9,7 @@ // -#include "kprocess.h" +#include "tdeprocess.h" #include <stdio.h> #include <string.h> @@ -17,7 +17,7 @@ #include <signal.h> -#include "kprocesstest.h" +#include "tdeprocesstest.h" #define PROCNO 10 @@ -34,7 +34,7 @@ int main(int argc, char *argv[]) { TDEProcess p1, p2, p3, p4; Dummy dummy; - TDEApplication app(argc, argv, TQCString("kprocesstest")); + TDEApplication app(argc, argv, TQCString("tdeprocesstest")); printf("Welcome to the TDEProcess Demo Application!\n"); @@ -46,7 +46,7 @@ int main(int argc, char *argv[]) // p1 << "kghostview"; - TQObject::connect(&p1, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *))); + TQObject::connect(&p1, TQ_SIGNAL(processExited(TDEProcess *)), &dummy, TQ_SLOT(printMessage(TDEProcess *))); printf("starting kghostview blocking (close to continue)\n"); p1.start(TDEProcess::Block); @@ -62,7 +62,7 @@ int main(int argc, char *argv[]) printf("Starting konsole with /bin/tcsh as shell (close to continue)\n"); p2 << "konsole" << "-e" << "/bin/tcsh"; p2.setWorkingDirectory("/tmp"); - TQObject::connect(&p2, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *))); + TQObject::connect(&p2, TQ_SIGNAL(processExited(TDEProcess *)), &dummy, TQ_SLOT(printMessage(TDEProcess *))); p2.start(TDEProcess::Block); // @@ -70,13 +70,13 @@ int main(int argc, char *argv[]) // p3 << "ls" << "-l"; - TQObject::connect(&p3, TQT_SIGNAL(processExited(TDEProcess *)), - &dummy, TQT_SLOT(printMessage(TDEProcess *))); + TQObject::connect(&p3, TQ_SIGNAL(processExited(TDEProcess *)), + &dummy, TQ_SLOT(printMessage(TDEProcess *))); - TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); - TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p3, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + &dummy, TQ_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p3, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + &dummy, TQ_SLOT(gotOutput(TDEProcess *, char *, int))); p3.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput); @@ -93,16 +93,16 @@ int main(int argc, char *argv[]) // p4 << "sort"; - TQObject::connect(&p4, TQT_SIGNAL(processExited(TDEProcess *)), - &dummy, TQT_SLOT(printMessage(TDEProcess *))); + TQObject::connect(&p4, TQ_SIGNAL(processExited(TDEProcess *)), + &dummy, TQ_SLOT(printMessage(TDEProcess *))); - TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(TDEProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); - TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(TDEProcess *, char *, int)), - &dummy, TQT_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p4, TQ_SIGNAL(receivedStdout(TDEProcess *, char *, int)), + &dummy, TQ_SLOT(gotOutput(TDEProcess *, char *, int))); + TQObject::connect(&p4, TQ_SIGNAL(receivedStderr(TDEProcess *, char *, int)), + &dummy, TQ_SLOT(gotOutput(TDEProcess *, char *, int))); - TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(TDEProcess *)), - &dummy, TQT_SLOT(outputDone(TDEProcess *))); + TQObject::connect(&p4, TQ_SIGNAL(wroteStdin(TDEProcess *)), + &dummy, TQ_SLOT(outputDone(TDEProcess *))); p4.start(TDEProcess::NotifyOnExit, TDEProcess::All); printf("after p4.start"); @@ -113,4 +113,4 @@ int main(int argc, char *argv[]) return 0; } -#include "kprocesstest.moc" +#include "tdeprocesstest.moc" diff --git a/tdecore/tests/kprocesstest.h b/tdecore/tests/tdeprocesstest.h index 5817af438..32a559157 100644 --- a/tdecore/tests/kprocesstest.h +++ b/tdecore/tests/tdeprocesstest.h @@ -13,11 +13,11 @@ #include <stdio.h> #include <tqobject.h> -#include "kprocess.h" +#include "tdeprocess.h" class Dummy : public TQObject { - Q_OBJECT + TQ_OBJECT public slots: void printMessage(TDEProcess *proc) @@ -46,5 +46,3 @@ class Dummy : public TQObject }; #endif - - diff --git a/tdecore/tests/kprociotest.cpp b/tdecore/tests/tdeprociotest.cpp index f7e895345..16c9b14b6 100644 --- a/tdecore/tests/kprociotest.cpp +++ b/tdecore/tests/tdeprociotest.cpp @@ -9,7 +9,7 @@ // -#include "kprocess.h" +#include "tdeprocess.h" #include <stdio.h> #include <string.h> @@ -17,7 +17,7 @@ #include <signal.h> -#include "kprociotest.h" +#include "tdeprociotest.h" @@ -32,17 +32,17 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n int main(int argc, char *argv[]) { Dummy dummy; - TDEApplication app(argc, argv, TQCString("kprociotest")); + TDEApplication app(argc, argv, TQCString("tdeprociotest")); - printf("Welcome to the KProcIO Demo Application!\n"); + printf("Welcome to the TDEProcIO Demo Application!\n"); - KProcIO p; + TDEProcIO p; p << "rev"; - p.connect(&p, TQT_SIGNAL(processExited(TDEProcess*)), &dummy, TQT_SLOT(printMessage(TDEProcess*))); - p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*))); + p.connect(&p, TQ_SIGNAL(processExited(TDEProcess*)), &dummy, TQ_SLOT(printMessage(TDEProcess*))); + p.connect(&p, TQ_SIGNAL(readReady(TDEProcIO*)), &dummy, TQ_SLOT(gotOutput(TDEProcIO*))); bool b; @@ -62,4 +62,4 @@ int main(int argc, char *argv[]) return 0; } -#include "kprociotest.moc" +#include "tdeprociotest.moc" diff --git a/tdecore/tests/kprociotest.h b/tdecore/tests/tdeprociotest.h index fd60bb87b..194a26504 100644 --- a/tdecore/tests/kprociotest.h +++ b/tdecore/tests/tdeprociotest.h @@ -13,11 +13,11 @@ #include <stdio.h> #include <tqobject.h> -#include "kprocio.h" +#include "tdeprocio.h" class Dummy : public TQObject { - Q_OBJECT + TQ_OBJECT public slots: void printMessage(TDEProcess *proc) @@ -25,7 +25,7 @@ class Dummy : public TQObject printf("Process %d exited!\n", (int)proc->getPid()); } - void gotOutput(KProcIO*proc) + void gotOutput(TDEProcIO*proc) { TQString line; while(true) { diff --git a/tdecore/tests/ksimpleconfigtest.cpp b/tdecore/tests/tdesimpleconfigtest.cpp index ca91581dd..5759d8941 100644 --- a/tdecore/tests/ksimpleconfigtest.cpp +++ b/tdecore/tests/tdesimpleconfigtest.cpp @@ -3,9 +3,9 @@ // // configtest.cpp: libKDEcore example // -// demonstrates use of KSimpleConfig class +// demonstrates use of TDESimpleConfig class -#include <ksimpleconfig.h> +#include <tdesimpleconfig.h> #include <tdeapplication.h> #include <unistd.h> #include <stdio.h> @@ -22,7 +22,7 @@ int main( int argc, char **argv ) { TDEApplication a( argc, argv, TQCString("tdeconfigtest") ); - KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" ); + TDESimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" ); aConfig.setGroup( "Test group" ); aConfig.writeEntry( "key1", "value1" ); @@ -32,17 +32,17 @@ int main( int argc, char **argv ) aConfig.writeEntry( "akey1", "avalue1" ); aConfig.writeEntry( "akey2", "avalue2" ); - fprintf( stderr, "[ksimpleconfigtest] entries written, sleeping for 10 seconds\n" ); + fprintf( stderr, "[tdesimpleconfigtest] entries written, sleeping for 10 seconds\n" ); aConfig.sync(); sleep( 10 ); aConfig.setGroup( "Test group" ); aConfig.deleteEntry( "key2", false ); - fprintf( stderr, "[ksimpleconfigtest] Deleted on entry from Test group, sleeping\n" ); + fprintf( stderr, "[tdesimpleconfigtest] Deleted on entry from Test group, sleeping\n" ); aConfig.sync(); sleep( 10 ); aConfig.deleteGroup( "Another Test group", true ); - fprintf( stderr, "[ksimpleconfigtest] Deleted Another Test group\n" ); + fprintf( stderr, "[tdesimpleconfigtest] Deleted Another Test group\n" ); } diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/tdestandarddirstest.cpp index ae6ea16bd..28c974b9e 100644 --- a/tdecore/tests/kstddirstest.cpp +++ b/tdecore/tests/tdestandarddirstest.cpp @@ -1,7 +1,7 @@ #include <tdeapplication.h> #include <kdebug.h> -#include <kinstance.h> -#include <kstandarddirs.h> +#include <tdeinstance.h> +#include <tdestandarddirs.h> #include <tdeconfig.h> int main(int argc, char **argv) diff --git a/tdecore/tests/kuniqueapptest.cpp b/tdecore/tests/tdeuniqueapptest.cpp index 13b8ca534..7ea5b6308 100644 --- a/tdecore/tests/kuniqueapptest.cpp +++ b/tdecore/tests/tdeuniqueapptest.cpp @@ -16,7 +16,7 @@ Boston, MA 02110-1301, USA. */ -#include "kuniqueapplication.h" +#include "tdeuniqueapplication.h" #include "tdeglobalsettings.h" #include <unistd.h> @@ -25,10 +25,10 @@ #include <tdecmdlineargs.h> #include <tdeaboutdata.h> -class TestApp : public KUniqueApplication +class TestApp : public TDEUniqueApplication { public: - TestApp() : KUniqueApplication("TestApp") { } + TestApp() : TDEUniqueApplication("TestApp") { } virtual int newInstance( ); }; @@ -43,9 +43,9 @@ TestApp::newInstance( ) int main(int argc, char *argv[]) { - TDEAboutData about("kuniqueapptest", "kuniqueapptest", "version"); + TDEAboutData about("tdeuniqueapptest", "tdeuniqueapptest", "version"); TDECmdLineArgs::init(argc, argv, &about); - KUniqueApplication::addCmdLineOptions(); + TDEUniqueApplication::addCmdLineOptions(); if (!TestApp::start()) { @@ -54,6 +54,6 @@ main(int argc, char *argv[]) TestApp a; printf("Running.\n"); - kapp->exec(); + tdeApp->exec(); printf("Terminating.\n"); } diff --git a/tdecore/tests/testqtargs.cpp b/tdecore/tests/testqtargs.cpp index d69b3f6f4..cb67ab02a 100644 --- a/tdecore/tests/testqtargs.cpp +++ b/tdecore/tests/testqtargs.cpp @@ -29,7 +29,7 @@ -background, you get the same thing. in tdecore/tdeapplication.cpp, TDECmdLineOption qt_options is defined and used - by the static method Kapplication::addCmdLineOptions to add the Qt options + by the static method TDEApplication::addCmdLineOptions to add the Qt options but its' entries look like this: { "background <color>", I18N_NOOP("sets the default background color and an\n |
