diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-13 08:32:36 +0000 |
commit | f7e71d47719ab6094cf4a9fafffa5ea351973522 (patch) | |
tree | 30834aa632d442019e14f88685001d94657d060b /kdecore/tests/klocaletest.cpp | |
parent | b31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff) | |
download | tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip |
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems
with dependent modules such as kdebase. If it does then it needs to be fixed!
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdecore/tests/klocaletest.cpp')
-rw-r--r-- | kdecore/tests/klocaletest.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/kdecore/tests/klocaletest.cpp b/kdecore/tests/klocaletest.cpp index a980359b0..a81d867b1 100644 --- a/kdecore/tests/klocaletest.cpp +++ b/kdecore/tests/klocaletest.cpp @@ -53,7 +53,7 @@ Test::Test( TQWidget *parent, const char *name ) { setCaption("Testing KLocale"); - TQWidget *d = qApp->desktop(); + TQWidget *d = tqApp->desktop(); setGeometry((d->width()-320)>>1, (d->height()-160)>>1, 420, 420); createFields(); @@ -77,19 +77,19 @@ void Test::createFields() string+="Used language: "; string+=KGlobal::locale()->language()+"\n"; string+="Locale encoding: "; - string+=TQString::fromLatin1(KGlobal::locale()->encoding())+"\n"; + string+=TQString::tqfromLatin1(KGlobal::locale()->encoding())+"\n"; string+="Localized date and time: "; - string+=KGlobal::locale()->formatDateTime(TQDateTime::currentDateTime()); + string+=KGlobal::locale()->formatDateTime(TQDateTime::tqcurrentDateTime()); string+="\nLocalized monetary numbers: "; string+=KGlobal::locale()->formatMoney(1234567.89) + " / \n" +KGlobal::locale()->formatMoney(-1234567.89); // This will not work // but you can copy other *.mo file string+="\nSome localized strings:\n"; - string+=TQString::fromLatin1("Yes = ")+i18n("Yes")+"\n"; - string+=TQString::fromLatin1("No = ")+i18n("No")+"\n"; - string+=TQString::fromLatin1("Help = ")+i18n("Help")+"\n"; - string+=TQString::fromLatin1("Cancel = ")+i18n("Cancel")+"\n"; + string+=TQString::tqfromLatin1("Yes = ")+i18n("Yes")+"\n"; + string+=TQString::tqfromLatin1("No = ")+i18n("No")+"\n"; + string+=TQString::tqfromLatin1("Help = ")+i18n("Help")+"\n"; + string+=TQString::tqfromLatin1("Cancel = ")+i18n("Cancel")+"\n"; label=new TQLabel(string,this,"Label"); label->setGeometry(10,10,400,400); @@ -102,9 +102,9 @@ int main( int argc, char ** argv ) KLocale::setMainCatalogue("kdelibs"); KApplication a( argc, argv, "klocaletest" ); - KGlobal::locale()->setLanguage(TQString::fromLatin1("en_US")); - KGlobal::locale()->setCountry(TQString::fromLatin1("C")); - KGlobal::locale()->setThousandsSeparator(TQString::fromLatin1(",")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("en_US")); + KGlobal::locale()->setCountry(TQString::tqfromLatin1("C")); + KGlobal::locale()->setThousandsSeparator(TQString::tqfromLatin1(",")); TQString formatted; formatted = KGlobal::locale()->formatNumber( 70 ); check("formatNumber(70)",formatted,"70.00"); @@ -152,8 +152,8 @@ int main( int argc, char ** argv ) TQDate date; date.setYMD( 2002, 5, 3 ); checkDate("readDate( 3, 5, 2002 )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); - date = TQDate::currentDate(); - checkDate("readDate( TQDate::currentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); + date = TQDate::tqcurrentDate(); + checkDate("readDate( TQDate::tqcurrentDate() )",date,KGlobal::locale()->readDate( KGlobal::locale()->formatDate( date ) ) ); TQTime time; time = KGlobal::locale()->readTime( "11:22:33", &ok ); @@ -181,11 +181,11 @@ int main( int argc, char ** argv ) check("formatTime(\"0:22\", as duration)", timeStr, "00:22" ); kdDebug() << "setLanguage C\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("C")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("C")); kdDebug() << "C: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; kdDebug() << "setLanguage de\n"; - KGlobal::locale()->setLanguage(TQString::fromLatin1("de")); + KGlobal::locale()->setLanguage(TQString::tqfromLatin1("de")); kdDebug() << "de: " << i18n("yes") << " " << i18n("TQAccel", "Space") << endl; |