diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:47:22 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-01-24 13:47:22 -0600 |
commit | 28edc0aa2ab09297288186f5bc15765eb7be58c0 (patch) | |
tree | 7b7a01768b3781763186c825af21bb14717d2c32 /tdecore/tests | |
parent | 07c48c43ff72c237e4028154f4594102b798073f (diff) | |
download | tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.tar.gz tdelibs-28edc0aa2ab09297288186f5bc15765eb7be58c0.zip |
Rename KGlobal, KProcess, and KClipboard to avoid conflicts with KDE4
Diffstat (limited to 'tdecore/tests')
-rw-r--r-- | tdecore/tests/kcalendartest.cpp | 92 | ||||
-rw-r--r-- | tdecore/tests/kiconloadertest.cpp | 2 | ||||
-rw-r--r-- | tdecore/tests/klocaletest.cpp | 96 | ||||
-rw-r--r-- | tdecore/tests/kprocesstest.cpp | 48 | ||||
-rw-r--r-- | tdecore/tests/kprocesstest.h | 10 | ||||
-rw-r--r-- | tdecore/tests/kprociotest.cpp | 4 | ||||
-rw-r--r-- | tdecore/tests/kprociotest.h | 4 | ||||
-rw-r--r-- | tdecore/tests/kurltest.cpp | 8 |
8 files changed, 132 insertions, 132 deletions
diff --git a/tdecore/tests/kcalendartest.cpp b/tdecore/tests/kcalendartest.cpp index 62b14aa7a..fef409d71 100644 --- a/tdecore/tests/kcalendartest.cpp +++ b/tdecore/tests/kcalendartest.cpp @@ -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(); @@ -83,70 +83,70 @@ void test(TQDate & date) { kdDebug() << "(KLocale) 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() << "(KLocale) Formatted date: " << TDEGlobal::locale()->formatDate(date) << endl; + kdDebug() << "(KLocale) 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/kiconloadertest.cpp b/tdecore/tests/kiconloadertest.cpp index fba38f8bf..27dcdf845 100644 --- a/tdecore/tests/kiconloadertest.cpp +++ b/tdecore/tests/kiconloadertest.cpp @@ -9,7 +9,7 @@ int main(int argc, char *argv[]) { TDEApplication app(argc,argv,"kiconloadertest"/*,false,false*/); - KIconLoader * mpLoader = KGlobal::iconLoader(); + KIconLoader * mpLoader = TDEGlobal::iconLoader(); KIcon::Context mContext = KIcon::Application; TQTime dt; dt.start(); diff --git a/tdecore/tests/klocaletest.cpp b/tdecore/tests/klocaletest.cpp index 3c8df342e..bcb7bc9e8 100644 --- a/tdecore/tests/klocaletest.cpp +++ b/tdecore/tests/klocaletest.cpp @@ -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,7 +93,7 @@ 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(); } @@ -102,47 +102,47 @@ int main( int argc, char ** argv ) KLocale::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()); + KLocale 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", KLocale::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", KLocale::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/kprocesstest.cpp b/tdecore/tests/kprocesstest.cpp index bec7c0dd2..f86cb2f20 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$ @@ -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; 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 c637e35b2..a4fbb19ad 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$ @@ -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/kurltest.cpp b/tdecore/tests/kurltest.cpp index 47d709a9b..f1284d394 100644 --- a/tdecore/tests/kurltest.cpp +++ b/tdecore/tests/kurltest.cpp @@ -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" ); |