summaryrefslogtreecommitdiffstats
path: root/tdecore/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tdecore/tests')
-rw-r--r--tdecore/tests/KIDLTest.cpp4
-rw-r--r--tdecore/tests/KIDLTestClient.cpp4
-rw-r--r--tdecore/tests/Makefile.am20
-rw-r--r--tdecore/tests/dcopkonqtest.cpp8
-rw-r--r--tdecore/tests/kapptest.cpp18
-rw-r--r--tdecore/tests/kcalendartest.cpp120
-rw-r--r--tdecore/tests/kcmdlineargstest.cpp24
-rw-r--r--tdecore/tests/kdebugtest.cpp2
-rw-r--r--tdecore/tests/kglobaltest.cpp12
-rw-r--r--tdecore/tests/kiconloadertest.cpp12
-rw-r--r--tdecore/tests/kipctest.cpp10
-rw-r--r--tdecore/tests/klocaletest.cpp110
-rw-r--r--tdecore/tests/klocaletest.h2
-rw-r--r--tdecore/tests/kmacroexpandertest.cpp8
-rw-r--r--tdecore/tests/kmdcodectest.cpp18
-rw-r--r--tdecore/tests/kmemtest.cpp6
-rw-r--r--tdecore/tests/knotifytest.cpp4
-rw-r--r--tdecore/tests/kprocesstest.cpp52
-rw-r--r--tdecore/tests/kprocesstest.h10
-rw-r--r--tdecore/tests/kprociotest.cpp8
-rw-r--r--tdecore/tests/kprociotest.h4
-rw-r--r--tdecore/tests/krandomsequencetest.cpp4
-rw-r--r--tdecore/tests/kresolvertest.cpp10
-rw-r--r--tdecore/tests/krfcdatetest.cpp6
-rw-r--r--tdecore/tests/ksimpleconfigtest.cpp4
-rw-r--r--tdecore/tests/ksocktest.cpp16
-rw-r--r--tdecore/tests/kstdacceltest.cpp39
-rw-r--r--tdecore/tests/kstddirstest.cpp10
-rw-r--r--tdecore/tests/ktempfiletest.cpp8
-rw-r--r--tdecore/tests/ktimezonestest.cpp4
-rw-r--r--tdecore/tests/kuniqueapptest.cpp10
-rw-r--r--tdecore/tests/kurltest.cpp30
-rw-r--r--tdecore/tests/startserviceby.cpp14
-rw-r--r--tdecore/tests/tdeconfigtest.cpp (renamed from tdecore/tests/kconfigtest.cpp)26
-rw-r--r--tdecore/tests/tdeconfigtestgui.cpp (renamed from tdecore/tests/kconfigtestgui.cpp)36
-rw-r--r--tdecore/tests/tdeconfigtestgui.h (renamed from tdecore/tests/kconfigtestgui.h)14
-rw-r--r--tdecore/tests/tdestdacceltest.cpp39
-rw-r--r--tdecore/tests/testqtargs.cpp32
38 files changed, 379 insertions, 379 deletions
diff --git a/tdecore/tests/KIDLTest.cpp b/tdecore/tests/KIDLTest.cpp
index e714bc52f..a54e32be5 100644
--- a/tdecore/tests/KIDLTest.cpp
+++ b/tdecore/tests/KIDLTest.cpp
@@ -1,6 +1,6 @@
#include "KIDLTest.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
KIDLTest::KIDLTest( const TQCString& id )
@@ -18,7 +18,7 @@ TQString KIDLTest::hello( const TQString& name )
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "kidlservertest", false /* No GUI */ );
+ TDEApplication app( argc, argv, "kidlservertest", false /* No GUI */ );
app.dcopClient()->attach();
app.dcopClient()->registerAs( "kidlservertest" );
diff --git a/tdecore/tests/KIDLTestClient.cpp b/tdecore/tests/KIDLTestClient.cpp
index 87884c05a..4614ed51e 100644
--- a/tdecore/tests/KIDLTestClient.cpp
+++ b/tdecore/tests/KIDLTestClient.cpp
@@ -1,11 +1,11 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <dcopclient.h>
#include "KIDLTest_stub.h"
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "KIDLTestClient", false /* No GUI */ );
+ TDEApplication app( argc, argv, "KIDLTestClient", false /* No GUI */ );
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
diff --git a/tdecore/tests/Makefile.am b/tdecore/tests/Makefile.am
index e35ae68a4..a831eb65c 100644
--- a/tdecore/tests/Makefile.am
+++ b/tdecore/tests/Makefile.am
@@ -21,16 +21,16 @@ INCLUDES = -I$(top_srcdir)/tdecore $(all_includes)
AM_LDFLAGS = $(QT_LDFLAGS) $(X_LDFLAGS) $(KDE_RPATH)
-check_PROGRAMS = kconfigtestgui klocaletest kprocesstest ksimpleconfigtest \
+check_PROGRAMS = tdeconfigtestgui klocaletest kprocesstest ksimpleconfigtest \
kstddirstest kurltest kuniqueapptest ktempfiletest krandomsequencetest \
kdebugtest ksocktest kstringhandlertest kcmdlineargstest kapptest \
kmemtest kidlservertest kidlclienttest dcopkonqtest kipctest \
cplusplustest kiconloadertest kresolvertest kmdcodectest knotifytest \
ksortablevaluelisttest krfcdatetest testqtargs kprociotest \
kcharsetstest kcalendartest kmacroexpandertest kshelltest \
- kxerrorhandlertest startserviceby kstdacceltest kglobaltest ktimezonestest
+ kxerrorhandlertest startserviceby tdestdacceltest kglobaltest ktimezonestest
-TESTS = kurltest kstdacceltest
+TESTS = kurltest tdestdacceltest
noinst_HEADERS = klocaletest.h kprocesstest.h KIDLTest.h \
kipctest.h kprociotest.h
@@ -38,10 +38,10 @@ noinst_HEADERS = klocaletest.h kprocesstest.h KIDLTest.h \
METASOURCES = AUTO
LDADD = ../libtdecore.la
-kconfigtestgui_SOURCES = kconfigtestgui.cpp
+tdeconfigtestgui_SOURCES = tdeconfigtestgui.cpp
kdebugtest_SOURCES = kdebugtest.cpp
klocaletest_SOURCES = klocaletest.cpp
-#klocaletest2_SOURCES = klocaletest2.cpp klocale.cpp libintl.cpp kcatalogue.cpp
+#klocaletest2_SOURCES = klocaletest2.cpp tdelocale.cpp libintl.cpp kcatalogue.cpp
#kcatalogue_SOURCES = kcatalogue.cpp libintl.cpp
ksimpleconfigtest_SOURCES = ksimpleconfigtest.cpp
kurltest_SOURCES = kurltest.cpp
@@ -75,12 +75,12 @@ kmacroexpandertest_SOURCES = kmacroexpandertest.cpp
kshelltest_SOURCES = kshelltest.cpp
kxerrorhandlertest_SOURCES = kxerrorhandlertest.cpp
startserviceby_SOURCES = startserviceby.cpp
-kstdacceltest_SOURCES = kstdacceltest.cpp
+tdestdacceltest_SOURCES = tdestdacceltest.cpp
kglobaltest_SOURCES = kglobaltest.cpp
ktimezonestest_SOURCES = ktimezonestest.cpp
-check_LTLIBRARIES = kunittest_kconfig.la
+check_LTLIBRARIES = tdeunittest_tdeconfig.la
-kunittest_kconfig_la_SOURCES = kconfigtest.cpp
-kunittest_kconfig_la_LIBADD = $(LIB_KUNITTEST)
-kunittest_kconfig_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN)
+tdeunittest_tdeconfig_la_SOURCES = tdeconfigtest.cpp
+tdeunittest_tdeconfig_la_LIBADD = $(LIB_KUNITTEST)
+tdeunittest_tdeconfig_la_LDFLAGS = -module $(KDE_CHECK_PLUGIN)
diff --git a/tdecore/tests/dcopkonqtest.cpp b/tdecore/tests/dcopkonqtest.cpp
index 8830d34c7..b8bb055d6 100644
--- a/tdecore/tests/dcopkonqtest.cpp
+++ b/tdecore/tests/dcopkonqtest.cpp
@@ -1,10 +1,10 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <dcopclient.h>
int main( int argc, char** argv )
{
- KApplication app( argc, argv, "KIDLTestClient", false );
+ TDEApplication app( argc, argv, "KIDLTestClient", false );
kapp->dcopClient()->attach();
// kapp->dcopClient()->registerAs( "kidlclienttest" );
@@ -27,8 +27,8 @@ debug("sending configure to object KonquerorIface in konqueror");
debug("ko");
/// BROADCAST
-debug("sending databaseChanged to object ksycoca in all apps");
- if (kapp->dcopClient()->send( "*", "ksycoca", "databaseChanged()", data ))
+debug("sending databaseChanged to object tdesycoca in all apps");
+ if (kapp->dcopClient()->send( "*", "tdesycoca", "databaseChanged()", data ))
debug("ok");
else
debug("ko");
diff --git a/tdecore/tests/kapptest.cpp b/tdecore/tests/kapptest.cpp
index 7e3b47f43..6a3abace9 100644
--- a/tdecore/tests/kapptest.cpp
+++ b/tdecore/tests/kapptest.cpp
@@ -17,24 +17,24 @@
*/
#define private public
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kglobalsettings.h>
-#include <ksycoca.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdeglobalsettings.h>
+#include <tdesycoca.h>
int
main(int argc, char *argv[])
{
- KAboutData about("kapptest", "kapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kapptest", "kapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
- KApplication a;
+ TDEApplication a;
KSycoca *s = KSycoca::self();
tqWarning("s->language() %s", s->language().latin1());
- tqWarning("Offset of aIconName: %ld", (long) &(static_cast<KApplication *>(0)->aIconName));
+ tqWarning("Offset of aIconName: %ld", (long) &(static_cast<TDEApplication *>(0)->aIconName));
}
diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp
index 51a40b892..7dc2cc6d7 100644
--- a/tdecore/tests/kcalendartest.cpp
+++ b/tdecore/tests/kcalendartest.cpp
@@ -7,20 +7,20 @@
#include <tqstringlist.h>
-#include <kapplication.h>
-#include <kaboutdata.h>
+#include <tdeapplication.h>
+#include <tdeaboutdata.h>
#include <kdebug.h>
-#include <kglobal.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
+#include <tdeglobal.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
-class KLocale;
+class TDELocale;
void test(TQDate & date);
static const char description[] = "KCalendarTest";
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "help", I18N_NOOP("Prints this help"), 0 },
{ "type hijri|gregorian|jalali|hebrew", I18N_NOOP("Supported calendar types"), 0 },
@@ -32,19 +32,19 @@ int main(int argc, char **argv) {
TQDate date;
TQString calType, option;
- KAboutData aboutData( "kcalendartest", "KCalendarTest" ,
- "0.1", description, KAboutData::License_GPL,
+ TDEAboutData aboutData( "kcalendartest", "KCalendarTest" ,
+ "0.1", description, TDEAboutData::License_GPL,
"(c) 2002, Carlos Moro", 0, 0,
"cfmoro@correo.uniovi.es");
aboutData.addAuthor("Carlos Moro",0, "cfmoro@correo.uniovi.es");
- KCmdLineArgs::init( argc, argv, &aboutData );
- KCmdLineArgs::addCmdLineOptions( options ); // Add our own options.
+ TDECmdLineArgs::init( argc, argv, &aboutData );
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add our own options.
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
- KApplication app(false, false);
+ TDEApplication app(false, false);
TQStringList lst = KCalendarSystemFactory::calendarSystems();
kdDebug() << "Supported calendar types: " << endl;
@@ -57,7 +57,7 @@ int main(int argc, char **argv) {
calType = args->getOption("type");
- KGlobal::locale()->setCalendar(calType);
+ TDEGlobal::locale()->setCalendar(calType);
/*
* If we like to see some date
@@ -65,7 +65,7 @@ int main(int argc, char **argv) {
*/
if ( args->isSet("date") ) {
option = args->getOption("date");
- date = KGlobal::locale()->readDate(option);
+ date = TDEGlobal::locale()->readDate(option);
} else
date = TQDate::currentDate();
@@ -81,72 +81,72 @@ int main(int argc, char **argv) {
void test(TQDate & date) {
- kdDebug() << "(KLocale) readDate" << endl;
+ kdDebug() << "(TDELocale) readDate" << endl;
- kdDebug() << "Created calendar: " << KGlobal::locale()->calendar()->calendarName() << endl;
+ kdDebug() << "Created calendar: " << TDEGlobal::locale()->calendar()->calendarName() << endl;
- kdDebug() << "Day name for first day of week is " << KGlobal::locale()->calendar()->weekDayName(1) << endl;
- kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->weekDayName(1, true) << endl;
+ kdDebug() << "Day name for first day of week is " << TDEGlobal::locale()->calendar()->weekDayName(1) << endl;
+ kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->weekDayName(1, true) << endl;
- kdDebug() << "Month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name for second month is " << KGlobal::locale()->calendar()->monthName(2, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name possessive for second month is " << KGlobal::locale()->calendar()->monthNamePossessive(2, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name for fifth month is " << KGlobal::locale()->calendar()->monthName(5, KGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date)) << endl;
- kdDebug() << "Short month name possessive for fifth month is " << KGlobal::locale()->calendar()->monthNamePossessive(5, KGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name for second month is " << TDEGlobal::locale()->calendar()->monthName(2, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name possessive for second month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(2, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name for fifth month is " << TDEGlobal::locale()->calendar()->monthName(5, TDEGlobal::locale()->calendar()->year(date), true) << endl;
+ kdDebug() << "Month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date)) << endl;
+ kdDebug() << "Short month name possessive for fifth month is " << TDEGlobal::locale()->calendar()->monthNamePossessive(5, TDEGlobal::locale()->calendar()->year(date), true) << endl;
- kdDebug() << "Day for date " << date.toString() << " is " << KGlobal::locale()->calendar()->day(date) << endl;
- kdDebug() << "Month for date " << date.toString() << " is " << KGlobal::locale()->calendar()->month(date) << endl;
- kdDebug() << "Year for date " << date.toString() << " is " << KGlobal::locale()->calendar()->year(date) << endl;
+ kdDebug() << "Day for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->day(date) << endl;
+ kdDebug() << "Month for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->month(date) << endl;
+ kdDebug() << "Year for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->year(date) << endl;
- kdDebug() << "Day for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->dayString(date, true) << endl;
- kdDebug() << "Month for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->monthString(date, true) << endl;
- kdDebug() << "Year for date " << date.toString() << " as a string is " << KGlobal::locale()->calendar()->yearString(date, true) << endl;
+ kdDebug() << "Day for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->dayString(date, true) << endl;
+ kdDebug() << "Month for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->monthString(date, true) << endl;
+ kdDebug() << "Year for date " << date.toString() << " as a string is " << TDEGlobal::locale()->calendar()->yearString(date, true) << endl;
- kdDebug() << "Day of week for date " << date.toString() << " is number " << KGlobal::locale()->calendar()->dayOfWeek(date) << endl;
- kdDebug() << "Week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date) << endl;
- kdDebug() << "Short week name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->weekDayName(date, true) << endl;
+ kdDebug() << "Day of week for date " << date.toString() << " is number " << TDEGlobal::locale()->calendar()->dayOfWeek(date) << endl;
+ kdDebug() << "Week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date) << endl;
+ kdDebug() << "Short week name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->weekDayName(date, true) << endl;
- kdDebug() << "Month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date) << endl;
- kdDebug() << "Short month name for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthName(date, true) << endl;
- kdDebug() << "Month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date) << endl;
- kdDebug() << "Short month name possessive for date " << date.toString() << " is " << KGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl;
+ kdDebug() << "Month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date) << endl;
+ kdDebug() << "Short month name for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthName(date, true) << endl;
+ kdDebug() << "Month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date) << endl;
+ kdDebug() << "Short month name possessive for date " << date.toString() << " is " << TDEGlobal::locale()->calendar()->monthNamePossessive(date, true) << endl;
- kdDebug() << "It's week number " << KGlobal::locale()->calendar()->weekNumber(date) << endl;
+ kdDebug() << "It's week number " << TDEGlobal::locale()->calendar()->weekNumber(date) << endl;
- kdDebug() << "(KLocale) Formatted date: " << KGlobal::locale()->formatDate(date) << endl;
- kdDebug() << "(KLocale) Short formatted date: " << KGlobal::locale()->formatDate(date, true) << endl;
+ kdDebug() << "(TDELocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl;
+ kdDebug() << "(TDELocale) Short formatted date: " << TDEGlobal::locale()->formatDate(date, true) << endl;
- kdDebug() << "That month have : " << KGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl;
+ kdDebug() << "That month have : " << TDEGlobal::locale()->calendar()->daysInMonth(date) << " days" << endl;
- kdDebug() << "That year has " << KGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl;
- kdDebug() << "There are " << KGlobal::locale()->calendar()->weeksInYear(KGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl;
- kdDebug() << "There are " << KGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl;
+ kdDebug() << "That year has " << TDEGlobal::locale()->calendar()->monthsInYear(date) << " months" << endl;
+ kdDebug() << "There are " << TDEGlobal::locale()->calendar()->weeksInYear(TDEGlobal::locale()->calendar()->year(date)) << " weeks that year" << endl;
+ kdDebug() << "There are " << TDEGlobal::locale()->calendar()->daysInYear(date) << " days that year" << endl;
- kdDebug() << "The day of pray is number " << KGlobal::locale()->calendar()->weekDayOfPray() << endl;
+ kdDebug() << "The day of pray is number " << TDEGlobal::locale()->calendar()->weekDayOfPray() << endl;
- kdDebug() << "Max valid year supported is " << KGlobal::locale()->calendar()->maxValidYear() << endl;
- kdDebug() << "Min valid year supported is " << KGlobal::locale()->calendar()->minValidYear() << endl;
+ kdDebug() << "Max valid year supported is " << TDEGlobal::locale()->calendar()->maxValidYear() << endl;
+ kdDebug() << "Min valid year supported is " << TDEGlobal::locale()->calendar()->minValidYear() << endl;
- kdDebug() << "It's the day number " << KGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl;
+ kdDebug() << "It's the day number " << TDEGlobal::locale()->calendar()->dayOfYear(date) << " of year" << endl;
kdDebug() << "Add 3 days" << endl;
- date = KGlobal::locale()->calendar()->addDays(date, 3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addDays(date, 3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
kdDebug() << "Then add 3 months" << endl;
- date = KGlobal::locale()->calendar()->addMonths(date, 3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addMonths(date, 3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
kdDebug() << "And last, add -3 years" << endl;
- date = KGlobal::locale()->calendar()->addYears(date, -3);
- kdDebug() << "It's " << KGlobal::locale()->formatDate(date) << endl;
+ date = TDEGlobal::locale()->calendar()->addYears(date, -3);
+ kdDebug() << "It's " << TDEGlobal::locale()->formatDate(date) << endl;
- kdDebug() << "Is lunar based: " << KGlobal::locale()->calendar()->isLunar() << endl;
- kdDebug() << "Is lunisolar based: " << KGlobal::locale()->calendar()->isLunisolar() << endl;
- kdDebug() << "Is solar based: " << KGlobal::locale()->calendar()->isSolar() << endl;
+ kdDebug() << "Is lunar based: " << TDEGlobal::locale()->calendar()->isLunar() << endl;
+ kdDebug() << "Is lunisolar based: " << TDEGlobal::locale()->calendar()->isLunisolar() << endl;
+ kdDebug() << "Is solar based: " << TDEGlobal::locale()->calendar()->isSolar() << endl;
}
diff --git a/tdecore/tests/kcmdlineargstest.cpp b/tdecore/tests/kcmdlineargstest.cpp
index 299196810..5213e443f 100644
--- a/tdecore/tests/kcmdlineargstest.cpp
+++ b/tdecore/tests/kcmdlineargstest.cpp
@@ -1,6 +1,6 @@
-#include <kcmdlineargs.h>
-#include <klocale.h>
-#include <kapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdelocale.h>
+#include <tdeapplication.h>
#include <stdio.h>
@@ -11,30 +11,30 @@
static const char version[] = "v0.0.2 1999 (c) Waldo Bastian";
static const char description[] = I18N_NOP("This is a test program.");
-static KCmdLineOptions options[] =
+static TDECmdLineOptions options[] =
{
{ "test", I18N_NOP("do a short test only, note that\n"
"this is rather long comment"), 0 },
{ "baud <baudrate>", I18N_NOP("set baudrate"), "9600" },
{ "+file(s)", I18N_NOP("Files to load"), 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
#if 1
int
main(int argc, char *argv[])
{
- KLocale::setMainCatalogue("tdelibs");
- KCmdLineArgs::init( argc, argv, "testapp", description, version);
+ TDELocale::setMainCatalogue("tdelibs");
+ TDECmdLineArgs::init( argc, argv, "testapp", description, version);
- KCmdLineArgs::addCmdLineOptions( options ); // Add my own options.
+ TDECmdLineArgs::addCmdLineOptions( options ); // Add my own options.
// MyWidget::addCmdLineOptions();
- KApplication k( false, false /*true, true*/ );
+ TDEApplication k( false, false /*true, true*/ );
// Get application specific arguments
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// Check if an option is set
if (args->isSet("test"))
{
@@ -79,9 +79,9 @@ main(int argc, char *argv[])
int
main(int argc, char *argv[])
{
- KCmdLineArgs::init( argc, argv, "testapp", description, version);
+ TDECmdLineArgs::init( argc, argv, "testapp", description, version);
- KApplication k( true, true );
+ TDEApplication k( true, true );
k.exec();
return 0;
diff --git a/tdecore/tests/kdebugtest.cpp b/tdecore/tests/kdebugtest.cpp
index ee49127ea..cc85b4554 100644
--- a/tdecore/tests/kdebugtest.cpp
+++ b/tdecore/tests/kdebugtest.cpp
@@ -26,7 +26,7 @@ public:
kdDebug(2 == 2) << "this is right " << perror << endl;
kdDebug() << "Before instance creation" << endl;
kdDebug(1202) << "Before instance creation" << endl;
- KInstance i("kdebugtest");
+ TDEInstance i("kdebugtest");
kdDebug(1) << "kDebugInfo with inexisting area number" << endl;
kdDebug(1202) << "This number has a value of " << 5 << endl;
// kdDebug() << "This number should come out as appname " << 5 << " " << "test" << endl;
diff --git a/tdecore/tests/kglobaltest.cpp b/tdecore/tests/kglobaltest.cpp
index d03be209e..852e2ba34 100644
--- a/tdecore/tests/kglobaltest.cpp
+++ b/tdecore/tests/kglobaltest.cpp
@@ -1,12 +1,12 @@
#include <config.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
#include <assert.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
static bool check(const TQString& txt, TQString a, TQString b)
{
@@ -53,9 +53,9 @@ void testkasciistricmp()
int main(int argc, char *argv[])
{
- KApplication::disableAutoDcopRegistration();
- KCmdLineArgs::init( argc, argv, "kglobaltest", 0, 0, 0, 0 );
- KApplication app( false, false );
+ TDEApplication::disableAutoDcopRegistration();
+ TDECmdLineArgs::init( argc, argv, "kglobaltest", 0, 0, 0, 0 );
+ TDEApplication app( false, false );
testkasciistricmp();
diff --git a/tdecore/tests/kiconloadertest.cpp b/tdecore/tests/kiconloadertest.cpp
index 96a7a6813..c6da1994c 100644
--- a/tdecore/tests/kiconloadertest.cpp
+++ b/tdecore/tests/kiconloadertest.cpp
@@ -1,20 +1,20 @@
#include <kiconloader.h>
#include <tqdatetime.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
int main(int argc, char *argv[])
{
- KApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
+ TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/);
- KIconLoader * mpLoader = KGlobal::iconLoader();
- KIcon::Context mContext = KIcon::Application;
+ TDEIconLoader * mpLoader = TDEGlobal::iconLoader();
+ TDEIcon::Context mContext = TDEIcon::Application;
TQTime dt;
dt.start();
int count = 0;
- for ( int mGroup = 0; mGroup < KIcon::LastGroup ; ++mGroup )
+ for ( int mGroup = 0; mGroup < TDEIcon::LastGroup ; ++mGroup )
{
kdDebug() << "queryIcons " << mGroup << "," << mContext << endl;
TQStringList filelist=mpLoader->queryIcons(mGroup, mContext);
@@ -25,7 +25,7 @@ int main(int argc, char *argv[])
++it, ++i )
{
//kdDebug() << ( i==9 ? "..." : (*it) ) << endl;
- mpLoader->loadIcon( (*it), (KIcon::Group)mGroup );
+ mpLoader->loadIcon( (*it), (TDEIcon::Group)mGroup );
++count;
}
}
diff --git a/tdecore/tests/kipctest.cpp b/tdecore/tests/kipctest.cpp
index 136aa6d70..af6785f0c 100644
--- a/tdecore/tests/kipctest.cpp
+++ b/tdecore/tests/kipctest.cpp
@@ -1,16 +1,16 @@
#include <stdio.h>
#include <stdlib.h>
#include <tqobject.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kipc.h>
#include "kipctest.h"
MyObject::MyObject()
: TQObject(0L, "testobj")
{
- connect(kapp, TQT_SIGNAL(kdisplayPaletteChanged()), TQT_SLOT(slotPaletteChanged()));
- connect(kapp, TQT_SIGNAL(kdisplayFontChanged()), TQT_SLOT(slotFontChanged()));
- connect(kapp, TQT_SIGNAL(kdisplayStyleChanged()), TQT_SLOT(slotStyleChanged()));
+ 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)));
@@ -18,7 +18,7 @@ MyObject::MyObject()
int main(int argc, char **argv)
{
- KApplication app(argc, argv, "kipc");
+ TDEApplication app(argc, argv, "kipc");
if (argc == 3)
{
diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp
index f752467d6..36f301d6c 100644
--- a/tdecore/tests/klocaletest.cpp
+++ b/tdecore/tests/klocaletest.cpp
@@ -11,10 +11,10 @@
#include <tqdatetime.h>
#include <tqlabel.h>
-#include <kglobal.h>
-#include <kglobalsettings.h>
-#include "klocale.h"
-#include <kapplication.h>
+#include <tdeglobal.h>
+#include <tdeglobalsettings.h>
+#include "tdelocale.h"
+#include <tdeapplication.h>
#include <kcharsets.h>
#include <kdebug.h>
@@ -51,7 +51,7 @@ bool checkDate(TQString txt, TQDate a, TQDate b)
Test::Test( TQWidget *parent, const char *name )
: TQWidget( parent, name )
{
- setCaption("Testing KLocale");
+ setCaption("Testing TDELocale");
TQWidget *d = tqApp->desktop();
setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420);
@@ -70,19 +70,19 @@ void Test::createFields()
TQString string;
string+="Selected languages: ";
- string+=KGlobal::locale()->languages()+"\n";
+ string+=TDEGlobal::locale()->languages()+"\n";
// This will show nothing, as there is no klocaletest.mo
// but you can copy other *.mo file
string+="Used language: ";
- string+=KGlobal::locale()->language()+"\n";
+ string+=TDEGlobal::locale()->language()+"\n";
string+="Locale encoding: ";
- string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n";
+ string+=TQString::fromLatin1(TDEGlobal::locale()->encoding())+"\n";
string+="Localized date and time: ";
- string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
+ string+=TDEGlobal::locale()->formatDateTime(TQDateTime::currentDateTime());
string+="\nLocalized monetary numbers: ";
- string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89);
+ string+=TDEGlobal::locale()->formatMoney(1234567.89) + " / \n" +TDEGlobal::locale()->formatMoney(-1234567.89);
// This will not work
// but you can copy other *.mo file
string+="\nSome localized strings:\n";
@@ -93,56 +93,56 @@ void Test::createFields()
label=new TQLabel(string,this,"Label");
label->setGeometry(10,10,400,400);
- label->setFont(KGlobalSettings::generalFont());
+ label->setFont(TDEGlobalSettings::generalFont());
label->show();
}
int main( int argc, char ** argv )
{
- KLocale::setMainCatalogue("tdelibs");
- KApplication a( argc, argv, "klocaletest" );
+ TDELocale::setMainCatalogue("tdelibs");
+ TDEApplication a( argc, argv, "klocaletest" );
- KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
- KGlobal::locale()->setCountry(TQString::fromLatin1("C"));
- KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("en_US"));
+ TDEGlobal::locale()->setCountry(TQString::fromLatin1("C"));
+ TDEGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(","));
TQString formatted;
- formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
- formatted = KGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
- formatted = KGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24");
- formatted = KGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457");
+ formatted = TDEGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber( 70, 0 ); check("formatNumber(70, 0)",formatted,"70");
+ formatted = TDEGlobal::locale()->formatNumber( 70.2 ); check("formatNumber(70.2)",formatted,"70.20");
+ formatted = TDEGlobal::locale()->formatNumber( 70.24 ); check("formatNumber(70.24)",formatted,"70.24");
+ formatted = TDEGlobal::locale()->formatNumber( 70.245 ); check("formatNumber(70.245)",formatted,"70.25"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber(1234567.89123456789,8); check("formatNumber(1234567.89123456789,8)",formatted,"1,234,567.89123457");
- formatted = KGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00");
- formatted = KGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70");
- formatted = KGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */
- formatted = KGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20");
- formatted = KGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24");
- formatted = KGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/
- formatted = KGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789");
+ formatted = TDEGlobal::locale()->formatNumber("70"); check("formatNumber(\"70\")",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber("70", true, 2); check("formatNumber(\"70\", true, 2)",formatted,"70.00");
+ formatted = TDEGlobal::locale()->formatNumber("70", true, 0); check("formatNumber(\"70\", true, 0)",formatted,"70");
+ formatted = TDEGlobal::locale()->formatNumber("70.9123", true, 0); check("formatNumber(\"70.9123\", true, 0)",formatted,"71"); /* rounded */
+ formatted = TDEGlobal::locale()->formatNumber("-70.2", true, 2); check("formatNumber(\"-70.2\", true, 2)",formatted,"-70.20");
+ formatted = TDEGlobal::locale()->formatNumber("+70.24", true, 2); check("formatNumber(\"+70.24\", true, 2)",formatted,"70.24");
+ formatted = TDEGlobal::locale()->formatNumber("70.245", true, 2); check("formatNumber(\"70.245\", true, 2)",formatted,"70.25"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber("99.996", true, 2); check("formatNumber(\"99.996\", true, 2)",formatted,"100.00"); /*rounded*/
+ formatted = TDEGlobal::locale()->formatNumber("12345678901234567.89123456789", false, 0); check("formatNumber(\"12345678901234567.89123456789\", false, 0)",formatted,"12,345,678,901,234,567.89123456789");
double num;
bool ok;
- num = KGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes");
- num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
- num = KGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
- num = KGlobal::locale()->readNumber( "1.12345678912", &ok );
+ num = TDEGlobal::locale()->readNumber( "12,1", &ok ); check("readNumber(12,1)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100", &ok ); check("readNumber(12,100)",ok?"yes":"no","yes");
+ num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100000000", &ok ); check("readNumber(12,100000000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,100000,000", &ok ); check("readNumber(12,100000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,,100,000", &ok ); check("readNumber(12,,100,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,1000,000", &ok ); check("readNumber(12,1000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,0000000,000", &ok ); check("readNumber(12,0000000,000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,0000000", &ok ); check("readNumber(12,0000000)",ok?"yes":"no","no");
+ num = TDEGlobal::locale()->readNumber( "12,146,131.12", &ok ); check("readNumber(12,146,131.12)",ok?"yes":"no","yes");
+ num = TDEGlobal::locale()->readNumber( "1.12345678912", &ok );
tqDebug( "%s", TQString::number( num, 'g', 12 ).latin1() ); // warning this is the only way to see all decimals
check("readNumber(1.12345678912)",ok && num==1.12345678912?"yes":"no","yes");
// bug 95511
- KLocale locale(*KGlobal::locale());
+ TDELocale locale(*TDEGlobal::locale());
locale.setCurrencySymbol("$$");
num = locale.readMoney("1,234,567.89$$", &ok);
check("readMoney(1,234,567.89$$)",ok?"yes":"no","yes");
@@ -151,41 +151,41 @@ 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 ) ) );
+ checkDate("readDate( 3, 5, 2002 )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) );
date = TQDate::currentDate();
- checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) );
+ checkDate("readDate( TQDate::currentDate() )",date,TDEGlobal::locale()->readDate( TDEGlobal::locale()->formatDate( date ) ) );
TQTime time;
- time = KGlobal::locale()->readTime( "11:22:33", &ok );
+ time = TDEGlobal::locale()->readTime( "11:22:33", &ok );
check("readTime(\"11:22:33\")", (ok && time == TQTime(11, 22, 33)) ?
"yes" : "no", "yes");
- time = KGlobal::locale()->readTime( "11:22", &ok );
+ time = TDEGlobal::locale()->readTime( "11:22", &ok );
check("readTime(\"11:22\")", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
- time = KGlobal::locale()->readTime( "foo", &ok );
+ time = TDEGlobal::locale()->readTime( "foo", &ok );
check("readTime(\"foo\")", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = KGlobal::locale()->readTime( "11:22:33", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22:33", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22:33\", WithoutSeconds)", (!ok && !time.isValid()) ?
"invalid" : "valid", "invalid");
- time = KGlobal::locale()->readTime( "11:22", KLocale::WithoutSeconds, &ok );
+ time = TDEGlobal::locale()->readTime( "11:22", TDELocale::WithoutSeconds, &ok );
check("readTime(\"11:22\", WithoutSeconds)", (ok && time == TQTime(11, 22, 0)) ?
"yes" : "no", "yes");
- KGlobal::locale()->setTimeFormat( "%H:%M %p" );
+ TDEGlobal::locale()->setTimeFormat( "%H:%M %p" );
time = TQTime( 0, 22, 33 );
- TQString timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
+ TQString timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, false /*duration*/ );
check("formatTime(\"0:22\", as time)", timeStr, "00:22 am" );
- timeStr = KGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
+ timeStr = TDEGlobal::locale()->formatTime( time, true /*seconds*/, true /*duration*/ );
check("formatTime(\"0:22\", as duration)", timeStr, "00:22" );
kdDebug() << "setLanguage C\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("C"));
kdDebug() << "C: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl;
kdDebug() << "setLanguage de\n";
- KGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
+ TDEGlobal::locale()->setLanguage(TQString::fromLatin1("de"));
kdDebug() << "de: " << i18n("yes") << " " << i18n(TQACCEL_OBJECT_NAME_STRING, "Space") << endl;
diff --git a/tdecore/tests/klocaletest.h b/tdecore/tests/klocaletest.h
index 83f4f5cef..6634b6107 100644
--- a/tdecore/tests/klocaletest.h
+++ b/tdecore/tests/klocaletest.h
@@ -7,7 +7,7 @@
class TQLabel;
-/** test: a small test program for KLocale
+/** test: a small test program for TDELocale
*/
class Test : public TQWidget
{
diff --git a/tdecore/tests/kmacroexpandertest.cpp b/tdecore/tests/kmacroexpandertest.cpp
index 0c41a309b..e357b5801 100644
--- a/tdecore/tests/kmacroexpandertest.cpp
+++ b/tdecore/tests/kmacroexpandertest.cpp
@@ -1,7 +1,7 @@
#include <kmacroexpander.h>
-#include <kapplication.h>
-#include <kcmdlineargs.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
#include <kdebug.h>
#include <stdlib.h>
@@ -51,8 +51,8 @@ protected:
int main(int argc, char *argv[])
{
- KCmdLineArgs::init(argc, argv, ":", "", "", "");
- KApplication app(false,false);
+ TDECmdLineArgs::init(argc, argv, ":", "", "", "");
+ TDEApplication app(false,false);
TQString s, s2;
TQMap<TQChar,TQStringList> map1;
diff --git a/tdecore/tests/kmdcodectest.cpp b/tdecore/tests/kmdcodectest.cpp
index e74d6f4b4..571d3f10b 100644
--- a/tdecore/tests/kmdcodectest.cpp
+++ b/tdecore/tests/kmdcodectest.cpp
@@ -27,9 +27,9 @@
#include <tqfile.h>
#include <kdebug.h>
-#include <klocale.h>
-#include <kcmdlineargs.h>
-#include <kapplication.h>
+#include <tdelocale.h>
+#include <tdecmdlineargs.h>
+#include <tdeapplication.h>
#include <kmdcodec.h>
@@ -316,7 +316,7 @@ int main (int argc, char *argv[])
{
const char *version = "1.0";
const char *description = "Unit test for md5, base64 encode/decode and uuencode/decode facilities";
- KCmdLineOptions options[] =
+ TDECmdLineOptions options[] =
{
{ "c <digest>", "compare <digest> with the calculated digest for a string or file.", 0 },
{ "d", "decode the given string or file using base64", 0 },
@@ -331,15 +331,15 @@ int main (int argc, char *argv[])
{ "x", "uudecode the given string or file", 0 },
{ "z", "run a preset message-digest test", 0 },
{ "+command", "[input1, input2,...]", 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
- KCmdLineArgs::init( argc, argv, "kmdcodectest", description, version );
- KCmdLineArgs::addCmdLineOptions( options );
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs::init( argc, argv, "kmdcodectest", description, version );
+ TDECmdLineArgs::addCmdLineOptions( options );
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
int count = args->count();
- KApplication app;
+ TDEApplication app;
if (!count)
{
diff --git a/tdecore/tests/kmemtest.cpp b/tdecore/tests/kmemtest.cpp
index 83c452e50..f0115b569 100644
--- a/tdecore/tests/kmemtest.cpp
+++ b/tdecore/tests/kmemtest.cpp
@@ -1,5 +1,5 @@
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
@@ -235,9 +235,9 @@ int main(int argc, char *argv[])
}
// showMem("second");
- KApplication app(argc,argv,"kurltest");
+ TDEApplication app(argc,argv,"kurltest");
-// showMem("After KApplication constructor");
+// showMem("After TDEApplication constructor");
// malloc(10*1024);
diff --git a/tdecore/tests/knotifytest.cpp b/tdecore/tests/knotifytest.cpp
index 8eb0586c0..6c5af25a7 100644
--- a/tdecore/tests/knotifytest.cpp
+++ b/tdecore/tests/knotifytest.cpp
@@ -1,9 +1,9 @@
#include <knotifyclient.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
int main( int argc, char **argv )
{
- KApplication app( argc, argv, "knotifytest" );
+ TDEApplication app( argc, argv, "knotifytest" );
KNotifyClient::userEvent( "This is a notification to notify you :)",
KNotifyClient::Messagebox,
KNotifyClient::Error );
diff --git a/tdecore/tests/kprocesstest.cpp b/tdecore/tests/kprocesstest.cpp
index af04cd421..c81dada50 100644
--- a/tdecore/tests/kprocesstest.cpp
+++ b/tdecore/tests/kprocesstest.cpp
@@ -1,5 +1,5 @@
//
-// MAIN -- a little demo of the capabilities of the "KProcess" class
+// MAIN -- a little demo of the capabilities of the "TDEProcess" class
//
// version 0.2, Aug 2nd 1997
// $Id$
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <signal.h>
@@ -32,12 +32,12 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[])
{
- KProcess p1, p2, p3, p4;
+ TDEProcess p1, p2, p3, p4;
Dummy dummy;
- KApplication app(argc, argv, "kprocesstest");
+ TDEApplication app(argc, argv, "kprocesstest");
- printf("Welcome to the KProcess Demo Application!\n");
+ printf("Welcome to the TDEProcess Demo Application!\n");
//
// The kghostview demo -- Starts a kghostview instance blocking. -- After
@@ -46,39 +46,39 @@ int main(int argc, char *argv[])
//
p1 << "kghostview";
- TQObject::connect(&p1, TQT_SIGNAL(processExited(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p1, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *)));
printf("starting kghostview blocking (close to continue)\n");
- p1.start(KProcess::Block);
+ p1.start(TDEProcess::Block);
printf("restarting kghostview non blocking\n");
p1.start();
//
// A konsole with tcsh to demonstrate how to pass command line options to a process
- // with "KProcess" (is run blocking)
+ // with "TDEProcess" (is run blocking)
//
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(KProcess *)), &dummy, TQT_SLOT(printMessage(KProcess *)));
- p2.start(KProcess::Block);
+ TQObject::connect(&p2, TQT_SIGNAL(processExited(TDEProcess *)), &dummy, TQT_SLOT(printMessage(TDEProcess *)));
+ p2.start(TDEProcess::Block);
//
// Getting the output from a process. "ls" with parameter "-l" is called and it output is captured
//
p3 << "ls" << "-l";
- TQObject::connect(&p3, TQT_SIGNAL(processExited(KProcess *)),
- &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p3, TQT_SIGNAL(processExited(TDEProcess *)),
+ &dummy, TQT_SLOT(printMessage(TDEProcess *)));
- TQObject::connect(&p3, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- TQObject::connect(&p3, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ 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)));
- p3.start(KProcess::NotifyOnExit, KProcess::AllOutput);
+ p3.start(TDEProcess::NotifyOnExit, TDEProcess::AllOutput);
//
@@ -93,18 +93,18 @@ int main(int argc, char *argv[])
//
p4 << "sort";
- TQObject::connect(&p4, TQT_SIGNAL(processExited(KProcess *)),
- &dummy, TQT_SLOT(printMessage(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(processExited(TDEProcess *)),
+ &dummy, TQT_SLOT(printMessage(TDEProcess *)));
- TQObject::connect(&p4, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
- TQObject::connect(&p4, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),
- &dummy, TQT_SLOT(gotOutput(KProcess *, char *, int)));
+ 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, TQT_SIGNAL(wroteStdin(KProcess *)),
- &dummy, TQT_SLOT(outputDone(KProcess *)));
+ TQObject::connect(&p4, TQT_SIGNAL(wroteStdin(TDEProcess *)),
+ &dummy, TQT_SLOT(outputDone(TDEProcess *)));
- p4.start(KProcess::NotifyOnExit, KProcess::All);
+ p4.start(TDEProcess::NotifyOnExit, TDEProcess::All);
printf("after p4.start");
p4.writeStdin(txt, strlen(txt));
diff --git a/tdecore/tests/kprocesstest.h b/tdecore/tests/kprocesstest.h
index 23ac443dd..5817af438 100644
--- a/tdecore/tests/kprocesstest.h
+++ b/tdecore/tests/kprocesstest.h
@@ -1,5 +1,5 @@
//
-// DUMMY -- A dummy class with a slot to demonstrate KProcess signals
+// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals
//
// version 0.2, Aug 2nd 1997
//
@@ -20,20 +20,20 @@ class Dummy : public TQObject
Q_OBJECT
public slots:
- void printMessage(KProcess *proc)
+ void printMessage(TDEProcess *proc)
{
printf("Process %d exited!\n", (int)proc->getPid());
}
- void gotOutput(KProcess*, char *buffer, int len)
+ void gotOutput(TDEProcess*, char *buffer, int len)
{
- char result[1025]; // this is ugly since it relys on the internal buffer size of KProcess,
+ char result[1025]; // this is ugly since it relys on the internal buffer size of TDEProcess,
memcpy(result, buffer, len); // NEVER do that in your own application... ;-)
result[len] = '\0';
printf("OUTPUT>>%s", result);
}
- void outputDone(KProcess *proc)
+ void outputDone(TDEProcess *proc)
/*
Slot Procedure for the "sort" example. -- If it is indicated that the "sort" command has
absorbed all its input, we send an "EOF" to it to indicate that there is no more
diff --git a/tdecore/tests/kprociotest.cpp b/tdecore/tests/kprociotest.cpp
index 446dacb30..ee7aaf2b7 100644
--- a/tdecore/tests/kprociotest.cpp
+++ b/tdecore/tests/kprociotest.cpp
@@ -1,5 +1,5 @@
//
-// MAIN -- a little demo of the capabilities of the "KProcess" class
+// MAIN -- a little demo of the capabilities of the "TDEProcess" class
//
// version 0.2, Aug 2nd 1997
// $Id$
@@ -13,7 +13,7 @@
#include <stdio.h>
#include <string.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <signal.h>
@@ -32,7 +32,7 @@ werke\nmerkt\nich\nund\nden\nbrauch\nund\nmit\ngeistesstaerke\ntu\nich\nwunder\n
int main(int argc, char *argv[])
{
Dummy dummy;
- KApplication app(argc, argv, "kprociotest");
+ TDEApplication app(argc, argv, "kprociotest");
printf("Welcome to the KProcIO Demo Application!\n");
@@ -41,7 +41,7 @@ int main(int argc, char *argv[])
p << "rev";
- p.connect(&p, TQT_SIGNAL(processExited(KProcess*)), &dummy, TQT_SLOT(printMessage(KProcess*)));
+ p.connect(&p, TQT_SIGNAL(processExited(TDEProcess*)), &dummy, TQT_SLOT(printMessage(TDEProcess*)));
p.connect(&p, TQT_SIGNAL(readReady(KProcIO*)), &dummy, TQT_SLOT(gotOutput(KProcIO*)));
bool b;
diff --git a/tdecore/tests/kprociotest.h b/tdecore/tests/kprociotest.h
index 9f948e644..fd60bb87b 100644
--- a/tdecore/tests/kprociotest.h
+++ b/tdecore/tests/kprociotest.h
@@ -1,5 +1,5 @@
//
-// DUMMY -- A dummy class with a slot to demonstrate KProcess signals
+// DUMMY -- A dummy class with a slot to demonstrate TDEProcess signals
//
// version 0.2, Aug 2nd 1997
//
@@ -20,7 +20,7 @@ class Dummy : public TQObject
Q_OBJECT
public slots:
- void printMessage(KProcess *proc)
+ void printMessage(TDEProcess *proc)
{
printf("Process %d exited!\n", (int)proc->getPid());
}
diff --git a/tdecore/tests/krandomsequencetest.cpp b/tdecore/tests/krandomsequencetest.cpp
index 8f337c2f1..2ba0c72ae 100644
--- a/tdecore/tests/krandomsequencetest.cpp
+++ b/tdecore/tests/krandomsequencetest.cpp
@@ -19,14 +19,14 @@
#include <tqptrlist.h>
#include "krandomsequence.h"
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
int
main(int argc, char *argv[])
{
- KApplication a(argc, argv, "krandomsequencetest");
+ TDEApplication a(argc, argv, "krandomsequencetest");
long seed;
KRandomSequence seq;
diff --git a/tdecore/tests/kresolvertest.cpp b/tdecore/tests/kresolvertest.cpp
index 1c2272c11..0e05cab4e 100644
--- a/tdecore/tests/kresolvertest.cpp
+++ b/tdecore/tests/kresolvertest.cpp
@@ -40,8 +40,8 @@
#include <ksocks.h>
#include <ksockaddr.h>
#include <kextsock.h>
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdecmdlineargs.h>
#include "netsupp.h"
@@ -213,7 +213,7 @@ bool testKernel()
printf("succeeded\n");
- KSocketAddress *ksin = KExtendedSocket::localAddress(sock);
+ TDESocketAddress *ksin = KExtendedSocket::localAddress(sock);
if (ksin != NULL)
{
printf("\tWe got socket %s\n", (const char*)ksin->pretty().latin1());
@@ -410,8 +410,8 @@ int TestApp::newInstance(TQValueList<TQCString> /*params*/)
int main(int argc, char **argv)
{
- KAboutData about("socktest2", "SockTest", "1.0");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("socktest2", "SockTest", "1.0");
+ TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
/* TestApp a;
diff --git a/tdecore/tests/krfcdatetest.cpp b/tdecore/tests/krfcdatetest.cpp
index 368a1106f..94358a8f1 100644
--- a/tdecore/tests/krfcdatetest.cpp
+++ b/tdecore/tests/krfcdatetest.cpp
@@ -1,8 +1,8 @@
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kcharsets.h>
#include <tqtextcodec.h>
#include <krfcdate.h>
@@ -21,7 +21,7 @@ bool check(TQString txt, time_t a, time_t b)
int main(int argc, char *argv[])
{
- KApplication app(argc,argv,"kurltest",false,false);
+ TDEApplication app(argc,argv,"kurltest",false,false);
time_t a;
time_t b;
diff --git a/tdecore/tests/ksimpleconfigtest.cpp b/tdecore/tests/ksimpleconfigtest.cpp
index 699be34cf..8b0e4ef25 100644
--- a/tdecore/tests/ksimpleconfigtest.cpp
+++ b/tdecore/tests/ksimpleconfigtest.cpp
@@ -6,7 +6,7 @@
// demonstrates use of KSimpleConfig class
#include <ksimpleconfig.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <unistd.h>
#include <stdio.h>
@@ -20,7 +20,7 @@
int main( int argc, char **argv )
{
- KApplication a( argc, argv, "kconfigtest" );
+ TDEApplication a( argc, argv, "tdeconfigtest" );
KSimpleConfig aConfig( _PATH_TMP"/simpleconfig.cfg" );
diff --git a/tdecore/tests/ksocktest.cpp b/tdecore/tests/ksocktest.cpp
index fe33ec771..a1ce8f86b 100644
--- a/tdecore/tests/ksocktest.cpp
+++ b/tdecore/tests/ksocktest.cpp
@@ -17,14 +17,14 @@
*/
#include "kuniqueapplication.h"
-#include "kglobal.h"
+#include "tdeglobal.h"
#include "kdebug.h"
#include "ksock.h"
#include "ksockaddr.h"
#include "kextsock.h"
-#include <kaboutdata.h>
-#include <kcmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdecmdlineargs.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
@@ -57,11 +57,11 @@ bool check(TQString txt, TQString a, TQString b)
int
main(int argc, char *argv[])
{
- KAboutData about("socktest", "SockTest", "version");
- KCmdLineArgs::init(argc, argv, &about);
- KApplication::addCmdLineOptions();
+ TDEAboutData about("socktest", "SockTest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
+ TDEApplication::addCmdLineOptions();
- KApplication app;
+ TDEApplication app;
TQString host, port;
@@ -100,7 +100,7 @@ main(int argc, char *argv[])
printf("FD %d\n", sock2->fd());
- KSocketAddress* addr = KExtendedSocket::peerAddress( sock2->fd() );
+ 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");
diff --git a/tdecore/tests/kstdacceltest.cpp b/tdecore/tests/kstdacceltest.cpp
deleted file mode 100644
index ff8842139..000000000
--- a/tdecore/tests/kstdacceltest.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <config.h>
-
-#include <kapplication.h>
-#include <kdebug.h>
-#include <kstdaccel.h>
-#include <stdlib.h> // for exit
-
-static bool check(TQString txt, TQString a, TQString b)
-{
- if (a.isEmpty())
- a = TQString::null;
- if (b.isEmpty())
- b = TQString::null;
- if (a == b) {
- kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
- }
- else {
- kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl;
- exit(1);
- }
- return true;
-}
-
-int main(int argc, char *argv[])
-{
- KApplication::disableAutoDcopRegistration();
- KApplication app(argc,argv,"kstdacceltest",false,false);
-
- check( "shortcutDefault FullScreen", KStdAccel::shortcutDefault( KStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" );
- check( "shortcutDefault BeginningOfLine", KStdAccel::shortcutDefault( KStdAccel::BeginningOfLine ).toString(), "Home" );
- check( "shortcutDefault EndOfLine", KStdAccel::shortcutDefault( KStdAccel::EndOfLine ).toString(), "End" );
-
- check( "name BeginningOfLine", KStdAccel::name( KStdAccel::BeginningOfLine ), "BeginningOfLine" );
- check( "name EndOfLine", KStdAccel::name( KStdAccel::EndOfLine ), "EndOfLine" );
-
- check( "shortcut method", KStdAccel::shortcut( KStdAccel::ZoomIn ).toString(), KStdAccel::zoomIn().toString() );
-
- return 0;
-}
diff --git a/tdecore/tests/kstddirstest.cpp b/tdecore/tests/kstddirstest.cpp
index 69e9a0200..ae6ea16bd 100644
--- a/tdecore/tests/kstddirstest.cpp
+++ b/tdecore/tests/kstddirstest.cpp
@@ -1,14 +1,14 @@
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <kdebug.h>
#include <kinstance.h>
#include <kstandarddirs.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
int main(int argc, char **argv)
{
- KApplication a(argc, argv, "whatever", false);
- KStandardDirs t;
- KConfig config; // to add custom entries - a bit tricky :/
+ TDEApplication a(argc, argv, "whatever", false);
+ TDEStandardDirs t;
+ TDEConfig config; // to add custom entries - a bit tricky :/
TQStringList list;
TQString s;
diff --git a/tdecore/tests/ktempfiletest.cpp b/tdecore/tests/ktempfiletest.cpp
index 60404f03a..5c2354fff 100644
--- a/tdecore/tests/ktempfiletest.cpp
+++ b/tdecore/tests/ktempfiletest.cpp
@@ -16,8 +16,8 @@
Boston, MA 02110-1301, USA.
*/
-#include "ktempfile.h"
-#include "kapplication.h"
+#include "tdetempfile.h"
+#include "tdeapplication.h"
#include "kstandarddirs.h"
#include <tqstring.h>
@@ -28,8 +28,8 @@
int
main(int argc, char *argv[])
{
- KApplication a(argc, argv, "ktempfiletest");
- printf("Making tempfile after KApplication constructor.\n");
+ TDEApplication a(argc, argv, "ktempfiletest");
+ printf("Making tempfile after TDEApplication constructor.\n");
KTempFile f4;
printf("Filename = %s\n", f4.name().ascii());
diff --git a/tdecore/tests/ktimezonestest.cpp b/tdecore/tests/ktimezonestest.cpp
index 650cc0512..5eaf5a4fb 100644
--- a/tdecore/tests/ktimezonestest.cpp
+++ b/tdecore/tests/ktimezonestest.cpp
@@ -1,11 +1,11 @@
#include "ktimezones.h"
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
- KInstance instance("ktimezonestest");
+ TDEInstance instance("ktimezonestest");
if ((argc==2) && (strcmp(argv[1], "local")==0))
{
diff --git a/tdecore/tests/kuniqueapptest.cpp b/tdecore/tests/kuniqueapptest.cpp
index b1d700c8b..13b8ca534 100644
--- a/tdecore/tests/kuniqueapptest.cpp
+++ b/tdecore/tests/kuniqueapptest.cpp
@@ -17,13 +17,13 @@
*/
#include "kuniqueapplication.h"
-#include "kglobalsettings.h"
+#include "tdeglobalsettings.h"
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
class TestApp : public KUniqueApplication
{
@@ -43,8 +43,8 @@ TestApp::newInstance( )
int
main(int argc, char *argv[])
{
- KAboutData about("kuniqueapptest", "kuniqueapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kuniqueapptest", "kuniqueapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
KUniqueApplication::addCmdLineOptions();
if (!TestApp::start())
diff --git a/tdecore/tests/kurltest.cpp b/tdecore/tests/kurltest.cpp
index 563eb8937..0f57dd97c 100644
--- a/tdecore/tests/kurltest.cpp
+++ b/tdecore/tests/kurltest.cpp
@@ -2,15 +2,15 @@
#include <kurl.h>
#include <stdio.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <stdlib.h>
#include <kdebug.h>
-#include <kglobal.h>
+#include <tdeglobal.h>
#include <kcharsets.h>
#include <tqtextcodec.h>
#include <tqdatastream.h>
#include <assert.h>
-#include <kcmdlineargs.h>
+#include <tdecmdlineargs.h>
static bool check(TQString txt, TQString a, TQString b)
{
@@ -81,9 +81,9 @@ void testAdjustPath()
int main(int argc, char *argv[])
{
- KApplication::disableAutoDcopRegistration();
- KCmdLineArgs::init( argc, argv, "kurltest", 0, 0, 0, 0 );
- KApplication app( false, false );
+ TDEApplication::disableAutoDcopRegistration();
+ TDECmdLineArgs::init( argc, argv, "kurltest", 0, 0, 0, 0 );
+ TDEApplication app( false, false );
KURL::List lst;
@@ -125,8 +125,8 @@ int main(int argc, char *argv[])
baseURL = "http://www.foo.bar/top//test2/file2.html";
check( "KURL::url()", baseURL.url(), "http://www.foo.bar/top//test2/file2.html" );
- baseURL = "file:/usr/local/src/kde2/////tdelibs/kio";
- check( "KURL::url()", baseURL.url(), "file:///usr/local/src/kde2/////tdelibs/kio" );
+ baseURL = "file:/usr/local/src/kde2/////tdelibs/tdeio";
+ check( "KURL::url()", baseURL.url(), "file:///usr/local/src/kde2/////tdelibs/tdeio" );
baseURL = "http://www.foo.bar";
KURL rel_url2( baseURL, "mailto:bastian@kde.org" );
@@ -135,7 +135,7 @@ int main(int argc, char *argv[])
baseURL = "mailto:bastian@kde.org?subject=hello";
check( "KURL::url()", baseURL.url(), "mailto:bastian@kde.org?subject=hello" );
- baseURL = "file:/usr/local/src/kde2/tdelibs/kio/";
+ baseURL = "file:/usr/local/src/kde2/tdelibs/tdeio/";
KURL url2( baseURL, "../../////tdebase/konqueror" );
check( "KURL::url()", url2.url(), "file:///usr/local/src/kde2/////tdebase/konqueror" );
@@ -318,8 +318,8 @@ int main(int argc, char *argv[])
"http://www.google.com/foo%20%20%20%20%20%20 bar/");
KURL carsten;
- carsten.setPath("/home/gis/src/kde/tdelibs/kfile/.#kfiledetailview.cpp.1.18");
- check("KURL::path()", carsten.path(), "/home/gis/src/kde/tdelibs/kfile/.#kfiledetailview.cpp.1.18");
+ carsten.setPath("/home/gis/src/kde/tdelibs/tdefile/.#tdefiledetailview.cpp.1.18");
+ check("KURL::path()", carsten.path(), "/home/gis/src/kde/tdelibs/tdefile/.#tdefiledetailview.cpp.1.18");
KURL charles;
charles.setPath( "/home/charles/foo%20moo" );
@@ -817,9 +817,9 @@ int main(int argc, char *argv[])
check("path",ulong.path(),"/servlet/CookieAccepted");
#if TQT_VERSION < 300
- qt_set_locale_codec( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) );
#else
- TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "iso-8859-1" ) );
+ TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "iso-8859-1" ) );
#endif
TQString raw = "data:text/html,%00%2540%00";
check("data URL: encode-decode of %00", KURL(raw).url(), raw );
@@ -862,9 +862,9 @@ int main(int argc, char *argv[])
testAdjustPath();
#if TQT_VERSION < 300
- qt_set_locale_codec( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ qt_set_locale_codec( TDEGlobal::charsets()->codecForName( "koi8-r" ) );
#else
- TQTextCodec::setCodecForLocale( KGlobal::charsets()->codecForName( "koi8-r" ) );
+ TQTextCodec::setCodecForLocale( TDEGlobal::charsets()->codecForName( "koi8-r" ) );
#endif
baseURL = "file:/home/coolo";
KURL russian = baseURL.directory(false, true) + TQString::fromLocal8Bit( "ئاخ7" );
diff --git a/tdecore/tests/startserviceby.cpp b/tdecore/tests/startserviceby.cpp
index 93e6716ef..67c535cec 100644
--- a/tdecore/tests/startserviceby.cpp
+++ b/tdecore/tests/startserviceby.cpp
@@ -16,21 +16,21 @@
Boston, MA 02110-1301, USA.
*/
-#include "kapplication.h"
+#include "tdeapplication.h"
#include <stdio.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <kglobalsettings.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdeglobalsettings.h>
#include <kdebug.h>
int
main(int argc, char *argv[])
{
- KAboutData about("kapptest", "kapptest", "version");
- KCmdLineArgs::init(argc, argv, &about);
+ TDEAboutData about("kapptest", "kapptest", "version");
+ TDECmdLineArgs::init(argc, argv, &about);
- KApplication a;
+ TDEApplication a;
TQString error;
TQCString dcopService;
diff --git a/tdecore/tests/kconfigtest.cpp b/tdecore/tests/tdeconfigtest.cpp
index 384a328cc..d9c89d6d4 100644
--- a/tdecore/tests/kconfigtest.cpp
+++ b/tdecore/tests/tdeconfigtest.cpp
@@ -17,12 +17,12 @@
Boston, MA 02110-1301, USA.
*/
-#include <kunittest/tester.h>
-#include <kunittest/module.h>
+#include <tdeunittest/tester.h>
+#include <tdeunittest/module.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
-class KConfigTest : public KUnitTest::Tester
+class TDEConfigTest : public KUnitTest::Tester
{
public:
void allTests();
@@ -31,8 +31,8 @@ private:
void revertEntries();
};
-KUNITTEST_MODULE( kunittest_kconfig, "KConfigTest" )
-KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
+KUNITTEST_MODULE( tdeunittest_tdeconfig, "TDEConfigTest" )
+KUNITTEST_MODULE_REGISTER_TESTER( TDEConfigTest )
// test data
#define BOOLENTRY1 true
@@ -50,9 +50,9 @@ KUNITTEST_MODULE_REGISTER_TESTER( KConfigTest )
#define DATETIMEENTRY TQDateTime( TQDate( 2002, 06, 23 ), TQTime( 12, 55, 40 ) )
#define STRINGLISTENTRY TQStringList( "Hello," )
-void KConfigTest::writeConfigFile()
+void TDEConfigTest::writeConfigFile()
{
- KConfig sc( "kconfigtest" );
+ TDEConfig sc( "tdeconfigtest" );
sc.setGroup("AAA");
sc.writeEntry("stringEntry1", STRINGENTRY1, true, true);
@@ -86,10 +86,10 @@ void KConfigTest::writeConfigFile()
}
// ### TODO: call this, and test the state of things afterwards
-void KConfigTest::revertEntries()
+void TDEConfigTest::revertEntries()
{
tqWarning("Reverting entries");
- KConfig sc( "kconfigtest" );
+ TDEConfig sc( "tdeconfigtest" );
sc.setGroup("Hello");
sc.revertToDefault( "boolEntry1");
@@ -105,13 +105,13 @@ void KConfigTest::revertEntries()
sc.sync();
}
-void KConfigTest::allTests()
+void TDEConfigTest::allTests()
{
writeConfigFile();
- KConfig sc2( "kconfigtest" );
+ TDEConfig sc2( "tdeconfigtest" );
- KConfigGroup sc3( &sc2, "AAA");
+ TDEConfigGroup sc3( &sc2, "AAA");
bool bImmutable = sc3.entryIsImmutable("stringEntry1");
CHECK( bImmutable, false );
diff --git a/tdecore/tests/kconfigtestgui.cpp b/tdecore/tests/tdeconfigtestgui.cpp
index af560b496..d1e2d5393 100644
--- a/tdecore/tests/kconfigtestgui.cpp
+++ b/tdecore/tests/tdeconfigtestgui.cpp
@@ -17,19 +17,19 @@
Boston, MA 02110-1301, USA.
*/
-#include "kconfigtestgui.h"
-#include "kconfigtestgui.moc"
+#include "tdeconfigtestgui.h"
+#include "tdeconfigtestgui.moc"
//
// configtest.cpp: libKDEcore example
//
-// demonstrates use of KConfig class
+// demonstrates use of TDEConfig class
//
// adapted from Qt widgets demo
#include <unistd.h>
#include <stdlib.h>
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <tqdialog.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -45,7 +45,7 @@
#include <tqpushbutton.h>
// KDE includes
-#include <kconfig.h>
+#include <tdeconfig.h>
#ifdef HAVE_PATHS_H
#include <paths.h>
@@ -56,10 +56,10 @@
#endif
//
-// Construct the KConfigTestView with buttons
+// Construct the TDEConfigTestView with buttons
//
-KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
+TDEConfigTestView::TDEConfigTestView( TQWidget *parent, const char *name )
: TQDialog( parent, name ),
pConfig( 0L ),
pFile( 0L ),
@@ -67,7 +67,7 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
{
// Set the window caption/title
- setCaption( "KConfig test" );
+ setCaption( "TDEConfig test" );
// Label and edit for the app config file
pAppFileLabel = new TQLabel( this, "appconfiglabel" );
@@ -123,18 +123,18 @@ KConfigTestView::KConfigTestView( TQWidget *parent, const char *name )
pQuitButton->setGeometry( 340, 60, 60, 60 );
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 );
+ // create a default TDEConfig object in order to be able to start right away
+ pConfig = new TDEConfig( TQString::null );
}
-KConfigTestView::~KConfigTestView()
+TDEConfigTestView::~TDEConfigTestView()
{
delete pConfig;
delete pFile;
delete pStream;
}
-void KConfigTestView::appConfigEditReturnPressed()
+void TDEConfigTestView::appConfigEditReturnPressed()
{
// if there already was a config object, delete it and its associated data
delete pConfig;
@@ -146,12 +146,12 @@ void KConfigTestView::appConfigEditReturnPressed()
// create a new config object
if( !pAppFileEdit->text().isEmpty() )
- pConfig = new KConfig( pAppFileEdit->text() );
+ pConfig = new TDEConfig( pAppFileEdit->text() );
pInfoLabel2->setText( "New config object created." );
}
-void KConfigTestView::groupEditReturnPressed()
+void TDEConfigTestView::groupEditReturnPressed()
{
pConfig->setGroup( pGroupEdit->text() );
// according to the Qt doc, this is begging for trouble, but for a
@@ -162,7 +162,7 @@ void KConfigTestView::groupEditReturnPressed()
pInfoLabel2->setText( aText );
}
-void KConfigTestView::keyEditReturnPressed()
+void TDEConfigTestView::keyEditReturnPressed()
{
TQString aValue = pConfig->readEntry( pKeyEdit->text() );
// just checking aValue.isNull() would be easier here, but this is
@@ -181,7 +181,7 @@ void KConfigTestView::keyEditReturnPressed()
}
}
-void KConfigTestView::writeButtonClicked()
+void TDEConfigTestView::writeButtonClicked()
{
pConfig->writeEntry( pKeyEdit->text(), TQString( pValueEdit->text() ) );
pInfoLabel2->setText( "Entry written" );
@@ -192,9 +192,9 @@ void KConfigTestView::writeButtonClicked()
int main( int argc, char **argv )
{
- KApplication a( argc, argv, "bla" );
+ TDEApplication a( argc, argv, "bla" );
- KConfigTestView *w = new KConfigTestView();
+ TDEConfigTestView *w = new TDEConfigTestView();
a.setMainWidget( w );
return w->exec();
}
diff --git a/tdecore/tests/kconfigtestgui.h b/tdecore/tests/tdeconfigtestgui.h
index 7655c8142..4aa50cb5f 100644
--- a/tdecore/tests/kconfigtestgui.h
+++ b/tdecore/tests/tdeconfigtestgui.h
@@ -19,7 +19,7 @@
#ifndef _KCONFIG_TEST_H
#define _KCONFIG_TEST_H
-#include <kapplication.h>
+#include <tdeapplication.h>
#include <tqdialog.h>
#include <tqfile.h>
#include <tqfileinfo.h>
@@ -33,18 +33,18 @@
#include <tqlineedit.h>
#include <tqpushbutton.h>
-#include <kconfig.h>
+#include <tdeconfig.h>
//
-// KConfigTestView contains lots of Qt widgets.
+// TDEConfigTestView contains lots of Qt widgets.
//
-class KConfigTestView : public TQDialog
+class TDEConfigTestView : public TQDialog
{
Q_OBJECT
public:
- KConfigTestView( TQWidget *parent=0, const char *name=0 );
- ~KConfigTestView();
+ TDEConfigTestView( TQWidget *parent=0, const char *name=0 );
+ ~TDEConfigTestView();
private slots:
void appConfigEditReturnPressed();
@@ -64,7 +64,7 @@ private:
TQLabel* pInfoLabel1, *pInfoLabel2;
TQPushButton* pQuitButton;
- KConfig* pConfig;
+ TDEConfig* pConfig;
TQFile* pFile;
TQTextStream* pStream;
};
diff --git a/tdecore/tests/tdestdacceltest.cpp b/tdecore/tests/tdestdacceltest.cpp
new file mode 100644
index 000000000..7a1fe8697
--- /dev/null
+++ b/tdecore/tests/tdestdacceltest.cpp
@@ -0,0 +1,39 @@
+#include <config.h>
+
+#include <tdeapplication.h>
+#include <kdebug.h>
+#include <tdestdaccel.h>
+#include <stdlib.h> // for exit
+
+static bool check(TQString txt, TQString a, TQString b)
+{
+ if (a.isEmpty())
+ a = TQString::null;
+ if (b.isEmpty())
+ b = TQString::null;
+ if (a == b) {
+ kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "ok" << endl;
+ }
+ else {
+ kdDebug() << txt << " : checking '" << a << "' against expected value '" << b << "'... " << "KO !" << endl;
+ exit(1);
+ }
+ return true;
+}
+
+int main(int argc, char *argv[])
+{
+ TDEApplication::disableAutoDcopRegistration();
+ TDEApplication app(argc,argv,"tdestdacceltest",false,false);
+
+ check( "shortcutDefault FullScreen", TDEStdAccel::shortcutDefault( TDEStdAccel::FullScreen ).toString(), "Ctrl+Shift+F" );
+ check( "shortcutDefault BeginningOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::BeginningOfLine ).toString(), "Home" );
+ check( "shortcutDefault EndOfLine", TDEStdAccel::shortcutDefault( TDEStdAccel::EndOfLine ).toString(), "End" );
+
+ check( "name BeginningOfLine", TDEStdAccel::name( TDEStdAccel::BeginningOfLine ), "BeginningOfLine" );
+ check( "name EndOfLine", TDEStdAccel::name( TDEStdAccel::EndOfLine ), "EndOfLine" );
+
+ check( "shortcut method", TDEStdAccel::shortcut( TDEStdAccel::ZoomIn ).toString(), TDEStdAccel::zoomIn().toString() );
+
+ return 0;
+}
diff --git a/tdecore/tests/testqtargs.cpp b/tdecore/tests/testqtargs.cpp
index c9e933c51..d69b3f6f4 100644
--- a/tdecore/tests/testqtargs.cpp
+++ b/tdecore/tests/testqtargs.cpp
@@ -1,5 +1,5 @@
/*
- testqtargs -- is there really a bug in KCmdLineArgs or am I on crack?
+ testqtargs -- is there really a bug in TDECmdLineArgs or am I on crack?
I used the following compile options:
@@ -28,7 +28,7 @@
--bg is aliased to --background but If you try it with --background or
-background, you get the same thing.
- in tdecore/kapplication.cpp, KCmdLineOption qt_options is defined and used
+ in tdecore/tdeapplication.cpp, TDECmdLineOption qt_options is defined and used
by the static method Kapplication::addCmdLineOptions to add the Qt options
but its' entries look like this:
@@ -43,15 +43,15 @@ application palette (light and dark shades are\ncalculated)."), 0},
*/
-#include <kapplication.h>
-#include <kcmdlineargs.h>
-#include <kaboutdata.h>
-#include <klocale.h>
+#include <tdeapplication.h>
+#include <tdecmdlineargs.h>
+#include <tdeaboutdata.h>
+#include <tdelocale.h>
-static const KCmdLineOptions options[] =
+static const TDECmdLineOptions options[] =
{
{ "hello ", I18N_NOOP("Says hello"), 0 },
- KCmdLineLastOption
+ TDECmdLineLastOption
};
int main(int argc, char *argv[])
@@ -60,23 +60,23 @@ int main(int argc, char *argv[])
{
tqDebug("argv[%d] = %s", i, argv[i]);
}
- KAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"),
- "1.0", I18N_NOOP("testqtargs"), KAboutData::License_GPL,
+ TDEAboutData aboutData( "testqtargs", I18N_NOOP("testqtargs"),
+ "1.0", I18N_NOOP("testqtargs"), TDEAboutData::License_GPL,
"", "", "", "");
- KCmdLineArgs::init(argc, argv, &aboutData);
- KCmdLineArgs::addCmdLineOptions(options);
+ TDECmdLineArgs::init(argc, argv, &aboutData);
+ TDECmdLineArgs::addCmdLineOptions(options);
- KCmdLineArgs *qtargs = KCmdLineArgs::parsedArgs("qt");
+ TDECmdLineArgs *qtargs = TDECmdLineArgs::parsedArgs("qt");
for (int i = 0; i < qtargs->count(); i++)
{
tqDebug("qt arg[%d] = %s", i, qtargs->arg(i));
}
- KApplication app;
+ TDEApplication app;
- KCmdLineArgs *kdeargs = KCmdLineArgs::parsedArgs("tde");
- KCmdLineArgs *args = KCmdLineArgs::parsedArgs();
+ TDECmdLineArgs *kdeargs = TDECmdLineArgs::parsedArgs("tde");
+ TDECmdLineArgs *args = TDECmdLineArgs::parsedArgs();
// An arg set by Qt
if(qtargs->isSet("background"))