From 73c08b592db45af554b9f21029bc549d70f683ab Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Thu, 15 Dec 2011 15:46:05 -0600 Subject: Rename a number of old tq methods that are no longer tq specific --- kcontrol/locale/kcmlocale.cpp | 40 +++++++++++++++++++-------------------- kcontrol/locale/klocalesample.cpp | 10 +++++----- kcontrol/locale/localemon.cpp | 16 ++++++++-------- kcontrol/locale/localenum.cpp | 16 ++++++++-------- kcontrol/locale/localeother.cpp | 4 ++-- kcontrol/locale/localetime.cpp | 22 ++++++++++----------- kcontrol/locale/toplevel.cpp | 8 ++++---- 7 files changed, 58 insertions(+), 58 deletions(-) (limited to 'kcontrol/locale') diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp index 5a3dc8b50..58177d810 100644 --- a/kcontrol/locale/kcmlocale.cpp +++ b/kcontrol/locale/kcmlocale.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include #include @@ -59,7 +59,7 @@ KLocaleConfig::KLocaleConfig(KLocale *locale, this, TQT_SLOT(changedCountry(const TQString &)) ); m_labLang = new TQLabel(this, I18N_NOOP("Languages:")); - m_labLang->tqsetAlignment( AlignTop ); + m_labLang->setAlignment( AlignTop ); m_languages = new TQListBox(this); connect(m_languages, TQT_SIGNAL(selectionChanged()), @@ -174,12 +174,12 @@ void KLocaleConfig::slotAddLanguage(const TQString & code) // If it's already in list, just move it (delete the old, then insert a new) int oldPos = languageList.findIndex( code ); if ( oldPos != -1 ) - languageList.remove( languageList.tqat(oldPos) ); + languageList.remove( languageList.at(oldPos) ); if ( oldPos != -1 && oldPos < pos ) --pos; - TQStringList::Iterator it = languageList.tqat( pos ); + TQStringList::Iterator it = languageList.at( pos ); languageList.insert( it, code ); @@ -195,7 +195,7 @@ void KLocaleConfig::slotRemoveLanguage() TQStringList languageList = m_locale->languageList(); int pos = m_languages->currentItem(); - TQStringList::Iterator it = languageList.tqat( pos ); + TQStringList::Iterator it = languageList.at( pos ); if ( it != languageList.end() ) { @@ -214,8 +214,8 @@ void KLocaleConfig::slotLanguageUp() TQStringList languageList = m_locale->languageList(); int pos = m_languages->currentItem(); - TQStringList::Iterator it1 = languageList.tqat( pos - 1 ); - TQStringList::Iterator it2 = languageList.tqat( pos ); + TQStringList::Iterator it1 = languageList.at( pos - 1 ); + TQStringList::Iterator it2 = languageList.at( pos ); if ( it1 != languageList.end() && it2 != languageList.end() ) { @@ -236,8 +236,8 @@ void KLocaleConfig::slotLanguageDown() TQStringList languageList = m_locale->languageList(); int pos = m_languages->currentItem(); - TQStringList::Iterator it1 = languageList.tqat( pos ); - TQStringList::Iterator it2 = languageList.tqat( pos + 1 ); + TQStringList::Iterator it1 = languageList.at( pos ); + TQStringList::Iterator it2 = languageList.at( pos + 1 ); if ( it1 != languageList.end() && it2 != languageList.end() ) { @@ -270,7 +270,7 @@ void KLocaleConfig::loadLanguageList() it != first.end(); ++it ) { - TQString str = locate("locale", TQString::tqfromLatin1("%1/entry.desktop") + TQString str = locate("locale", TQString::fromLatin1("%1/entry.desktop") .arg(*it)); if (!str.isNull()) prilang << str; @@ -278,7 +278,7 @@ void KLocaleConfig::loadLanguageList() // add all languages to the list TQStringList alllang = KGlobal::dirs()->findAllResources("locale", - TQString::tqfromLatin1("*/entry.desktop"), + TQString::fromLatin1("*/entry.desktop"), false, true); TQStringList langlist = prilang; if (langlist.count() > 0) @@ -293,7 +293,7 @@ void KLocaleConfig::loadLanguageList() if ((*it).isNull()) { m_addLanguage->insertSeparator(); - submenu = TQString::tqfromLatin1("other"); + submenu = TQString::fromLatin1("other"); m_addLanguage->insertSubmenu(m_locale->translate("Other"), submenu, TQString::null, -1); menu_index = -2; // first entries should _not_ be sorted @@ -322,13 +322,13 @@ void KLocaleConfig::loadCountryList() KLocale *lsave = KGlobal::_locale; KGlobal::_locale = m_locale; - TQString sub = TQString::tqfromLatin1("l10n/"); + TQString sub = TQString::fromLatin1("l10n/"); // clear the list m_comboCountry->clear(); TQStringList regionlist = KGlobal::dirs()->findAllResources("locale", - sub + TQString::tqfromLatin1("*.desktop"), + sub + TQString::fromLatin1("*.desktop"), false, true ); for ( TQStringList::ConstIterator it = regionlist.begin(); @@ -352,7 +352,7 @@ void KLocaleConfig::loadCountryList() m_locale->translate("without name")); TQString map( locate( "locale", - TQString::tqfromLatin1( "l10n/%1.png" ) + TQString::fromLatin1( "l10n/%1.png" ) .arg(tag) ) ); TQIconSet icon; if ( !map.isNull() ) @@ -362,7 +362,7 @@ void KLocaleConfig::loadCountryList() // add all languages to the list TQStringList countrylist = KGlobal::dirs()->findAllResources - ("locale", sub + TQString::tqfromLatin1("*/entry.desktop"), false, true); + ("locale", sub + TQString::fromLatin1("*/entry.desktop"), false, true); for ( TQStringList::ConstIterator it = countrylist.begin(); it != countrylist.end(); ++it ) @@ -381,7 +381,7 @@ void KLocaleConfig::loadCountryList() int menu_index = submenu.isEmpty() ? -1 : -2; TQString flag( locate( "locale", - TQString::tqfromLatin1( "l10n/%1/flag.png" ) + TQString::fromLatin1( "l10n/%1/flag.png" ) .arg(tag) ) ); TQIconSet icon( KGlobal::iconLoader()->loadIconSet(flag, KIcon::Small) ); m_comboCountry->insertItem( icon, name, tag, submenu, menu_index ); @@ -399,7 +399,7 @@ void KLocaleConfig::readLocale(const TQString &path, TQString &name, KGlobal::_locale = m_locale; // read the name - TQString filepath = TQString::tqfromLatin1("%1%2/entry.desktop") + TQString filepath = TQString::fromLatin1("%1%2/entry.desktop") .arg(sub) .arg(path); @@ -419,7 +419,7 @@ void KLocaleConfig::save() config->writeEntry("Country", m_locale->country(), true, true); if ( m_locale->languageList().isEmpty() ) - config->writeEntry("Language", TQString::tqfromLatin1(""), true, true); + config->writeEntry("Language", TQString::fromLatin1(""), true, true); else config->writeEntry("Language", m_locale->languageList(), ':', true, true); @@ -502,7 +502,7 @@ void KLocaleConfig::slotTranslate() TQStringList KLocaleConfig::languageList() const { TQString fileName = locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_locale->country())); KSimpleConfig entry(fileName); diff --git a/kcontrol/locale/klocalesample.cpp b/kcontrol/locale/klocalesample.cpp index 69c92abc7..7fed6f86f 100644 --- a/kcontrol/locale/klocalesample.cpp +++ b/kcontrol/locale/klocalesample.cpp @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include #include @@ -45,7 +45,7 @@ KLocaleSample::KLocaleSample(KLocale *locale, lay->setAutoAdd(TRUE); // Whatever the color scheme is, we want black text - TQColorGroup a = tqpalette().active(); + TQColorGroup a = palette().active(); a.setColor(TQColorGroup::Foreground, Qt::black); TQPalette pal(a, a, a); @@ -88,7 +88,7 @@ KLocaleSample::~KLocaleSample() void KLocaleSample::slotUpdateTime() { - TQDateTime dt = TQDateTime::tqcurrentDateTime(); + TQDateTime dt = TQDateTime::currentDateTime(); m_dateSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), false)); m_dateShortSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), true)); @@ -98,11 +98,11 @@ void KLocaleSample::slotUpdateTime() void KLocaleSample::slotLocaleChanged() { m_numberSample->setText(m_locale->formatNumber(1234567.89) + - TQString::tqfromLatin1(" / ") + + TQString::fromLatin1(" / ") + m_locale->formatNumber(-1234567.89)); m_moneySample->setText(m_locale->formatMoney(123456789.00) + - TQString::tqfromLatin1(" / ") + + TQString::fromLatin1(" / ") + m_locale->formatMoney(-123456789.00)); slotUpdateTime(); diff --git a/kcontrol/locale/localemon.cpp b/kcontrol/locale/localemon.cpp index 16987cc90..b260812c7 100644 --- a/kcontrol/locale/localemon.cpp +++ b/kcontrol/locale/localemon.cpp @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include #include #include @@ -131,7 +131,7 @@ void KLocaleConfigMoney::save() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig ent(locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_locale->country())), true); ent.setGroup("KCM Locale"); @@ -139,25 +139,25 @@ void KLocaleConfigMoney::save() int i; bool b; - str = ent.readEntry("CurrencySymbol", TQString::tqfromLatin1("$")); + str = ent.readEntry("CurrencySymbol", TQString::fromLatin1("$")); config->deleteEntry("CurrencySymbol", false, true); if (str != m_locale->currencySymbol()) config->writeEntry("CurrencySymbol", m_locale->currencySymbol(), true, true); - str = ent.readEntry("MonetaryDecimalSymbol", TQString::tqfromLatin1(".")); + str = ent.readEntry("MonetaryDecimalSymbol", TQString::fromLatin1(".")); config->deleteEntry("MonetaryDecimalSymbol", false, true); if (str != m_locale->monetaryDecimalSymbol()) config->writeEntry("MonetaryDecimalSymbol", m_locale->monetaryDecimalSymbol(), true, true); - str = ent.readEntry("MonetaryThousandsSeparator", TQString::tqfromLatin1(",")); - str.replace(TQString::tqfromLatin1("$0"), TQString()); + str = ent.readEntry("MonetaryThousandsSeparator", TQString::fromLatin1(",")); + str.replace(TQString::fromLatin1("$0"), TQString()); config->deleteEntry("MonetaryThousandsSeparator", false, true); if (str != m_locale->monetaryThousandsSeparator()) config->writeEntry("MonetaryThousandsSeparator", - TQString::tqfromLatin1("$0%1$0") - .tqarg(m_locale->monetaryThousandsSeparator()), + TQString::fromLatin1("$0%1$0") + .arg(m_locale->monetaryThousandsSeparator()), true, true); i = ent.readNumEntry("FracDigits", 2); diff --git a/kcontrol/locale/localenum.cpp b/kcontrol/locale/localenum.cpp index 31f06fd98..1e116b18e 100644 --- a/kcontrol/locale/localenum.cpp +++ b/kcontrol/locale/localenum.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include @@ -89,34 +89,34 @@ void KLocaleConfigNumber::save() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig ent(locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_locale->country())), true); ent.setGroup("KCM Locale"); TQString str; str = ent.readEntry("DecimalSymbol", - TQString::tqfromLatin1(".")); + TQString::fromLatin1(".")); config->deleteEntry("DecimalSymbol", false, true); if (str != m_locale->decimalSymbol()) config->writeEntry("DecimalSymbol", m_locale->decimalSymbol(), true, true); str = ent.readEntry("ThousandsSeparator", - TQString::tqfromLatin1(",")); + TQString::fromLatin1(",")); config->deleteEntry("ThousandsSeparator", false, true); - str.replace(TQString::tqfromLatin1("$0"), TQString()); + str.replace(TQString::fromLatin1("$0"), TQString()); if (str != m_locale->thousandsSeparator()) config->writeEntry("ThousandsSeparator", - TQString::tqfromLatin1("$0%1$0") - .tqarg(m_locale->thousandsSeparator()), true, true); + TQString::fromLatin1("$0%1$0") + .arg(m_locale->thousandsSeparator()), true, true); str = ent.readEntry("PositiveSign"); config->deleteEntry("PositiveSign", false, true); if (str != m_locale->positiveSign()) config->writeEntry("PositiveSign", m_locale->positiveSign(), true, true); - str = ent.readEntry("NegativeSign", TQString::tqfromLatin1("-")); + str = ent.readEntry("NegativeSign", TQString::fromLatin1("-")); config->deleteEntry("NegativeSign", false, true); if (str != m_locale->negativeSign()) config->writeEntry("NegativeSign", m_locale->negativeSign(), true, true); diff --git a/kcontrol/locale/localeother.cpp b/kcontrol/locale/localeother.cpp index 33b039c6e..32ee3123c 100644 --- a/kcontrol/locale/localeother.cpp +++ b/kcontrol/locale/localeother.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include @@ -80,7 +80,7 @@ void KLocaleConfigOther::save() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig ent(locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_locale->country())), true); ent.setGroup("KCM Locale"); diff --git a/kcontrol/locale/localetime.cpp b/kcontrol/locale/localetime.cpp index 7832d90d6..d28cb76a8 100644 --- a/kcontrol/locale/localetime.cpp +++ b/kcontrol/locale/localetime.cpp @@ -23,7 +23,7 @@ #include #include -#include +#include #include #include #include @@ -150,7 +150,7 @@ TQString KLocaleConfigTime::userToStore(const TQValueList & list, if ( !bFound ) { - TQChar c = userFormat.tqat( pos ); + TQChar c = userFormat.at( pos ); if ( c == '%' ) result += c; @@ -169,7 +169,7 @@ TQString KLocaleConfigTime::storeToUser(const TQValueList & list, bool escaped = false; for ( uint pos = 0; pos < storeFormat.length(); ++pos ) { - TQChar c = storeFormat.tqat(pos); + TQChar c = storeFormat.at(pos); if ( escaped ) { StringPair it = StringPair::find( list, c ); @@ -253,28 +253,28 @@ void KLocaleConfigTime::save() KConfigGroupSaver saver(config, "Locale"); KSimpleConfig ent(locate("locale", - TQString::tqfromLatin1("l10n/%1/entry.desktop") + TQString::fromLatin1("l10n/%1/entry.desktop") .arg(m_locale->country())), true); ent.setGroup("KCM Locale"); TQString str; - str = ent.readEntry("CalendarSystem", TQString::tqfromLatin1("gregorian")); + str = ent.readEntry("CalendarSystem", TQString::fromLatin1("gregorian")); config->deleteEntry("CalendarSystem", false, true); if (str != m_locale->calendarType()) config->writeEntry("CalendarSystem", m_locale->calendarType(), true, true); - str = ent.readEntry("TimeFormat", TQString::tqfromLatin1("%H:%M:%S")); + str = ent.readEntry("TimeFormat", TQString::fromLatin1("%H:%M:%S")); config->deleteEntry("TimeFormat", false, true); if (str != m_locale->timeFormat()) config->writeEntry("TimeFormat", m_locale->timeFormat(), true, true); - str = ent.readEntry("DateFormat", TQString::tqfromLatin1("%A %d %B %Y")); + str = ent.readEntry("DateFormat", TQString::fromLatin1("%A %d %B %Y")); config->deleteEntry("DateFormat", false, true); if (str != m_locale->dateFormat()) config->writeEntry("DateFormat", m_locale->dateFormat(), true, true); - str = ent.readEntry("DateFormatShort", TQString::tqfromLatin1("%Y-%m-%d")); + str = ent.readEntry("DateFormatShort", TQString::fromLatin1("%Y-%m-%d")); config->deleteEntry("DateFormatShort", false, true); if (str != m_locale->dateFormatShort()) config->writeEntry("DateFormatShort", @@ -323,7 +323,7 @@ void KLocaleConfigTime::slotCalendarSystemChanged(int calendarSystem) TQString calendarType; bool ok; - calendarType = calendars.tqat(calendarSystem, &ok); + calendarType = calendars.at(calendarSystem, &ok); if ( !ok ) calendarType = calendars.first(); @@ -371,7 +371,7 @@ calendarType); kdDebug(173) << storeToUser(timeMap(), m_locale->timeFormat()) << endl; kdDebug(173) << userToStore(timeMap(), - TQString::tqfromLatin1("HH:MM:SS AMPM test")) << endl; + TQString::fromLatin1("HH:MM:SS AMPM test")) << endl; } @@ -416,7 +416,7 @@ void KLocaleConfigTime::slotTranslate() { TQString str; - TQString sep = TQString::tqfromLatin1("\n"); + TQString sep = TQString::fromLatin1("\n"); TQString old; diff --git a/kcontrol/locale/toplevel.cpp b/kcontrol/locale/toplevel.cpp index e53b52ed5..bce5ade5f 100644 --- a/kcontrol/locale/toplevel.cpp +++ b/kcontrol/locale/toplevel.cpp @@ -22,7 +22,7 @@ #include #include -#include +#include #include #include #include @@ -62,7 +62,7 @@ KLocaleApplication::KLocaleApplication(TQWidget *parent, const char* /*name*/, m_nullConfig = new KConfig(TQString::null, false, false); m_globalConfig = new KConfig(TQString::null, false, true); - m_locale = new KLocale(TQString::tqfromLatin1("kcmlocale"), m_nullConfig); + m_locale = new KLocale(TQString::fromLatin1("kcmlocale"), m_nullConfig); TQVBoxLayout *l = new TQVBoxLayout(this, 0, KDialog::spacingHint()); l->setAutoAdd(TRUE); @@ -162,7 +162,7 @@ void KLocaleApplication::load( bool useDefaults ) { m_globalConfig->setReadDefaults( useDefaults ); m_globalConfig->reparseConfiguration(); - *m_locale = KLocale(TQString::tqfromLatin1("kcmlocale"), m_globalConfig); + *m_locale = KLocale(TQString::fromLatin1("kcmlocale"), m_globalConfig); emit localeChanged(); emit languageChanged(); @@ -180,7 +180,7 @@ void KLocaleApplication::save() "language of all programs, you will have to " "logout first."), m_locale->translate("Applying Language Settings"), - TQString::tqfromLatin1("LanguageChangesApplyOnlyToNewlyStartedPrograms")); + TQString::fromLatin1("LanguageChangesApplyOnlyToNewlyStartedPrograms")); // restore the old global locale KGlobal::_locale = lsave; -- cgit v1.2.3