summaryrefslogtreecommitdiffstats
path: root/kcontrol/locale
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-19 01:42:14 +0000
commit8155225c9be993acc0512956416d195edfef4eb9 (patch)
treede4f3cd17614fc67e47eefabcdbe2fbe170c9be7 /kcontrol/locale
parent364641b8e0279758d236af39abd138d379328a19 (diff)
downloadtdebase-8155225c9be993acc0512956416d195edfef4eb9.tar.gz
tdebase-8155225c9be993acc0512956416d195edfef4eb9.zip
Enable compilation with TQt for Qt4 3.4.0 TP2
This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kcontrol/locale')
-rw-r--r--kcontrol/locale/kcmlocale.cpp38
-rw-r--r--kcontrol/locale/kcmlocale.h2
-rw-r--r--kcontrol/locale/klocalesample.cpp14
-rw-r--r--kcontrol/locale/klocalesample.h2
-rw-r--r--kcontrol/locale/localemon.cpp22
-rw-r--r--kcontrol/locale/localemon.h2
-rw-r--r--kcontrol/locale/localenum.cpp14
-rw-r--r--kcontrol/locale/localenum.h2
-rw-r--r--kcontrol/locale/localeother.cpp2
-rw-r--r--kcontrol/locale/localeother.h2
-rw-r--r--kcontrol/locale/localetime.cpp16
-rw-r--r--kcontrol/locale/localetime.h2
-rw-r--r--kcontrol/locale/toplevel.cpp6
13 files changed, 62 insertions, 62 deletions
diff --git a/kcontrol/locale/kcmlocale.cpp b/kcontrol/locale/kcmlocale.cpp
index baa127e2f..a192bf608 100644
--- a/kcontrol/locale/kcmlocale.cpp
+++ b/kcontrol/locale/kcmlocale.cpp
@@ -59,7 +59,7 @@ KLocaleConfig::KLocaleConfig(KLocale *locale,
this, TQT_SLOT(changedCountry(const TQString &)) );
m_labLang = new TQLabel(this, I18N_NOOP("Languages:"));
- m_labLang->setAlignment( AlignTop );
+ m_labLang->tqsetAlignment( AlignTop );
m_languages = new TQListBox(this);
connect(m_languages, TQT_SIGNAL(selectionChanged()),
@@ -172,7 +172,7 @@ void KLocaleConfig::slotAddLanguage(const TQString & code)
pos = 0;
// If it's already in list, just move it (delete the old, then insert a new)
- int oldPos = languageList.findIndex( code );
+ int oldPos = languageList.tqfindIndex( code );
if ( oldPos != -1 )
languageList.remove( languageList.at(oldPos) );
@@ -270,7 +270,7 @@ void KLocaleConfig::loadLanguageList()
it != first.end();
++it )
{
- TQString str = locate("locale", TQString::fromLatin1("%1/entry.desktop")
+ TQString str = locate("locale", TQString::tqfromLatin1("%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::fromLatin1("*/entry.desktop"),
+ TQString::tqfromLatin1("*/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::fromLatin1("other");
+ submenu = TQString::tqfromLatin1("other");
m_addLanguage->insertSubmenu(m_locale->translate("Other"),
submenu, TQString::null, -1);
menu_index = -2; // first entries should _not_ be sorted
@@ -305,9 +305,9 @@ void KLocaleConfig::loadLanguageList()
m_locale->translate("without name"));
TQString tag = *it;
- int index = tag.findRev('/');
+ int index = tag.tqfindRev('/');
tag = tag.left(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index + 1);
m_addLanguage->insertItem(name, tag, submenu, menu_index);
}
@@ -322,13 +322,13 @@ void KLocaleConfig::loadCountryList()
KLocale *lsave = KGlobal::_locale;
KGlobal::_locale = m_locale;
- TQString sub = TQString::fromLatin1("l10n/");
+ TQString sub = TQString::tqfromLatin1("l10n/");
// clear the list
m_comboCountry->clear();
TQStringList regionlist = KGlobal::dirs()->findAllResources("locale",
- sub + TQString::fromLatin1("*.desktop"),
+ sub + TQString::tqfromLatin1("*.desktop"),
false, true );
for ( TQStringList::ConstIterator it = regionlist.begin();
@@ -338,11 +338,11 @@ void KLocaleConfig::loadCountryList()
TQString tag = *it;
int index;
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
if (index != -1)
tag = tag.mid(index + 1);
- index = tag.findRev('.');
+ index = tag.tqfindRev('.');
if (index != -1)
tag.truncate(index);
@@ -352,7 +352,7 @@ void KLocaleConfig::loadCountryList()
m_locale->translate("without name"));
TQString map( locate( "locale",
- TQString::fromLatin1( "l10n/%1.png" )
+ TQString::tqfromLatin1( "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::fromLatin1("*/entry.desktop"), false, true);
+ ("locale", sub + TQString::tqfromLatin1("*/entry.desktop"), false, true);
for ( TQStringList::ConstIterator it = countrylist.begin();
it != countrylist.end(); ++it )
@@ -374,14 +374,14 @@ void KLocaleConfig::loadCountryList()
TQString submenu = entry.readEntry("Region");
TQString tag = *it;
- int index = tag.findRev('/');
+ int index = tag.tqfindRev('/');
tag.truncate(index);
- index = tag.findRev('/');
+ index = tag.tqfindRev('/');
tag = tag.mid(index + 1);
int menu_index = submenu.isEmpty() ? -1 : -2;
TQString flag( locate( "locale",
- TQString::fromLatin1( "l10n/%1/flag.png" )
+ TQString::tqfromLatin1( "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::fromLatin1("%1%2/entry.desktop")
+ TQString filepath = TQString::tqfromLatin1("%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::fromLatin1(""), true, true);
+ config->writeEntry("Language", TQString::tqfromLatin1(""), 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::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country()));
KSimpleConfig entry(fileName);
diff --git a/kcontrol/locale/kcmlocale.h b/kcontrol/locale/kcmlocale.h
index c0d8e5f68..00691bfa4 100644
--- a/kcontrol/locale/kcmlocale.h
+++ b/kcontrol/locale/kcmlocale.h
@@ -37,7 +37,7 @@ class TQLabel;
class TQListBox;
class TQPushButton;
-class KLocaleConfig : public QWidget
+class KLocaleConfig : public TQWidget
{
Q_OBJECT
diff --git a/kcontrol/locale/klocalesample.cpp b/kcontrol/locale/klocalesample.cpp
index bf4cc8b32..69c92abc7 100644
--- a/kcontrol/locale/klocalesample.cpp
+++ b/kcontrol/locale/klocalesample.cpp
@@ -45,7 +45,7 @@ KLocaleSample::KLocaleSample(KLocale *locale,
lay->setAutoAdd(TRUE);
// Whatever the color scheme is, we want black text
- TQColorGroup a = palette().active();
+ TQColorGroup a = tqpalette().active();
a.setColor(TQColorGroup::Foreground, Qt::black);
TQPalette pal(a, a, a);
@@ -88,21 +88,21 @@ KLocaleSample::~KLocaleSample()
void KLocaleSample::slotUpdateTime()
{
- TQDateTime dt = TQDateTime::currentDateTime();
+ TQDateTime dt = TQDateTime::tqcurrentDateTime();
- m_dateSample->setText(m_locale->formatDate(dt.date(), false));
- m_dateShortSample->setText(m_locale->formatDate(dt.date(), true));
- m_timeSample->setText(m_locale->formatTime(dt.time(), true));
+ m_dateSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), false));
+ m_dateShortSample->setText(m_locale->formatDate(TQT_TQDATE_OBJECT(dt.date()), true));
+ m_timeSample->setText(m_locale->formatTime(TQT_TQTIME_OBJECT(dt.time()), true));
}
void KLocaleSample::slotLocaleChanged()
{
m_numberSample->setText(m_locale->formatNumber(1234567.89) +
- TQString::fromLatin1(" / ") +
+ TQString::tqfromLatin1(" / ") +
m_locale->formatNumber(-1234567.89));
m_moneySample->setText(m_locale->formatMoney(123456789.00) +
- TQString::fromLatin1(" / ") +
+ TQString::tqfromLatin1(" / ") +
m_locale->formatMoney(-123456789.00));
slotUpdateTime();
diff --git a/kcontrol/locale/klocalesample.h b/kcontrol/locale/klocalesample.h
index 2838a2cc3..1b8fb94e0 100644
--- a/kcontrol/locale/klocalesample.h
+++ b/kcontrol/locale/klocalesample.h
@@ -32,7 +32,7 @@ class TQResizeEvent;
class KLocale;
-class KLocaleSample : public QWidget
+class KLocaleSample : public TQWidget
{
Q_OBJECT
public:
diff --git a/kcontrol/locale/localemon.cpp b/kcontrol/locale/localemon.cpp
index 9fa1ad708..2c2fa37c5 100644
--- a/kcontrol/locale/localemon.cpp
+++ b/kcontrol/locale/localemon.cpp
@@ -111,8 +111,8 @@ KLocaleConfigMoney::KLocaleConfigMoney(KLocale *locale,
int i = 5;
while (i--)
{
- m_cmbMonPosMonSignPos->insertItem(TQString::null);
- m_cmbMonNegMonSignPos->insertItem(TQString::null);
+ m_cmbMonPosMonSignPos->insertItem(TQString());
+ m_cmbMonNegMonSignPos->insertItem(TQString());
}
lay->setColStretch(1, 1);
@@ -131,7 +131,7 @@ void KLocaleConfigMoney::save()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
- TQString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("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::fromLatin1("$"));
+ str = ent.readEntry("CurrencySymbol", TQString::tqfromLatin1("$"));
config->deleteEntry("CurrencySymbol", false, true);
if (str != m_locale->currencySymbol())
config->writeEntry("CurrencySymbol",
m_locale->currencySymbol(), true, true);
- str = ent.readEntry("MonetaryDecimalSymbol", TQString::fromLatin1("."));
+ str = ent.readEntry("MonetaryDecimalSymbol", TQString::tqfromLatin1("."));
config->deleteEntry("MonetaryDecimalSymbol", false, true);
if (str != m_locale->monetaryDecimalSymbol())
config->writeEntry("MonetaryDecimalSymbol",
m_locale->monetaryDecimalSymbol(), true, true);
- str = ent.readEntry("MonetaryThousandsSeparator", TQString::fromLatin1(","));
- str.replace(TQString::fromLatin1("$0"), TQString::null);
+ str = ent.readEntry("MonetaryThousandsSeparator", TQString::tqfromLatin1(","));
+ str.tqreplace(TQString::tqfromLatin1("$0"), TQString());
config->deleteEntry("MonetaryThousandsSeparator", false, true);
if (str != m_locale->monetaryThousandsSeparator())
config->writeEntry("MonetaryThousandsSeparator",
- TQString::fromLatin1("$0%1$0")
- .arg(m_locale->monetaryThousandsSeparator()),
+ TQString::tqfromLatin1("$0%1$0")
+ .tqarg(m_locale->monetaryThousandsSeparator()),
true, true);
i = ent.readNumEntry("FracDigits", 2);
@@ -260,8 +260,8 @@ void KLocaleConfigMoney::slotMonNegMonSignPosChanged(int i)
void KLocaleConfigMoney::slotTranslate()
{
TQObjectList list;
- list.append(m_cmbMonPosMonSignPos);
- list.append(m_cmbMonNegMonSignPos);
+ list.append(TQT_TQOBJECT(m_cmbMonPosMonSignPos));
+ list.append(TQT_TQOBJECT(m_cmbMonNegMonSignPos));
TQComboBox *wc;
for (TQObjectListIt li(list) ; (wc = (TQComboBox *)li.current()) != 0; ++li)
diff --git a/kcontrol/locale/localemon.h b/kcontrol/locale/localemon.h
index e78032641..412236efe 100644
--- a/kcontrol/locale/localemon.h
+++ b/kcontrol/locale/localemon.h
@@ -35,7 +35,7 @@ class KIntNumInput;
class KLocale;
class KLanguageCombo;
-class KLocaleConfigMoney : public QWidget
+class KLocaleConfigMoney : public TQWidget
{
Q_OBJECT
diff --git a/kcontrol/locale/localenum.cpp b/kcontrol/locale/localenum.cpp
index 537cc99ab..2095e1e9a 100644
--- a/kcontrol/locale/localenum.cpp
+++ b/kcontrol/locale/localenum.cpp
@@ -89,34 +89,34 @@ void KLocaleConfigNumber::save()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
- TQString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country())), true);
ent.setGroup("KCM Locale");
TQString str;
str = ent.readEntry("DecimalSymbol",
- TQString::fromLatin1("."));
+ TQString::tqfromLatin1("."));
config->deleteEntry("DecimalSymbol", false, true);
if (str != m_locale->decimalSymbol())
config->writeEntry("DecimalSymbol",
m_locale->decimalSymbol(), true, true);
str = ent.readEntry("ThousandsSeparator",
- TQString::fromLatin1(","));
+ TQString::tqfromLatin1(","));
config->deleteEntry("ThousandsSeparator", false, true);
- str.replace(TQString::fromLatin1("$0"), TQString::null);
+ str.tqreplace(TQString::tqfromLatin1("$0"), TQString());
if (str != m_locale->thousandsSeparator())
config->writeEntry("ThousandsSeparator",
- TQString::fromLatin1("$0%1$0")
- .arg(m_locale->thousandsSeparator()), true, true);
+ TQString::tqfromLatin1("$0%1$0")
+ .tqarg(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::fromLatin1("-"));
+ str = ent.readEntry("NegativeSign", TQString::tqfromLatin1("-"));
config->deleteEntry("NegativeSign", false, true);
if (str != m_locale->negativeSign())
config->writeEntry("NegativeSign", m_locale->negativeSign(), true, true);
diff --git a/kcontrol/locale/localenum.h b/kcontrol/locale/localenum.h
index 1bca325a5..5c2702e7d 100644
--- a/kcontrol/locale/localenum.h
+++ b/kcontrol/locale/localenum.h
@@ -34,7 +34,7 @@ class TQLineEdit;
class KLocale;
class KLanguageCombo;
-class KLocaleConfigNumber : public QWidget
+class KLocaleConfigNumber : public TQWidget
{
Q_OBJECT
diff --git a/kcontrol/locale/localeother.cpp b/kcontrol/locale/localeother.cpp
index 1cf6b949b..33b039c6e 100644
--- a/kcontrol/locale/localeother.cpp
+++ b/kcontrol/locale/localeother.cpp
@@ -80,7 +80,7 @@ void KLocaleConfigOther::save()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
- TQString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country())), true);
ent.setGroup("KCM Locale");
diff --git a/kcontrol/locale/localeother.h b/kcontrol/locale/localeother.h
index 8c0459c9e..4e000bec6 100644
--- a/kcontrol/locale/localeother.h
+++ b/kcontrol/locale/localeother.h
@@ -31,7 +31,7 @@ class TQComboBox;
class KLocale;
-class KLocaleConfigOther : public QWidget
+class KLocaleConfigOther : public TQWidget
{
Q_OBJECT
diff --git a/kcontrol/locale/localetime.cpp b/kcontrol/locale/localetime.cpp
index 2519ea794..4650e6a23 100644
--- a/kcontrol/locale/localetime.cpp
+++ b/kcontrol/locale/localetime.cpp
@@ -253,28 +253,28 @@ void KLocaleConfigTime::save()
KConfigGroupSaver saver(config, "Locale");
KSimpleConfig ent(locate("locale",
- TQString::fromLatin1("l10n/%1/entry.desktop")
+ TQString::tqfromLatin1("l10n/%1/entry.desktop")
.arg(m_locale->country())), true);
ent.setGroup("KCM Locale");
TQString str;
- str = ent.readEntry("CalendarSystem", TQString::fromLatin1("gregorian"));
+ str = ent.readEntry("CalendarSystem", TQString::tqfromLatin1("gregorian"));
config->deleteEntry("CalendarSystem", false, true);
if (str != m_locale->calendarType())
config->writeEntry("CalendarSystem", m_locale->calendarType(), true, true);
- str = ent.readEntry("TimeFormat", TQString::fromLatin1("%H:%M:%S"));
+ str = ent.readEntry("TimeFormat", TQString::tqfromLatin1("%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::fromLatin1("%A %d %B %Y"));
+ str = ent.readEntry("DateFormat", TQString::tqfromLatin1("%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::fromLatin1("%Y-%m-%d"));
+ str = ent.readEntry("DateFormatShort", TQString::tqfromLatin1("%Y-%m-%d"));
config->deleteEntry("DateFormatShort", false, true);
if (str != m_locale->dateFormatShort())
config->writeEntry("DateFormatShort",
@@ -345,7 +345,7 @@ void KLocaleConfigTime::slotLocaleChanged()
TQString calendarType = m_locale->calendarType();
int calendarSystem = 0;
- CalendarVector::iterator it = qFind(calendars.begin(), calendars.end(),
+ CalendarVector::iterator it = tqFind(calendars.begin(), calendars.end(),
calendarType);
if ( it != calendars.end() )
calendarSystem = it - calendars.begin();
@@ -371,7 +371,7 @@ calendarType);
kdDebug(173) << storeToUser(timeMap(),
m_locale->timeFormat()) << endl;
kdDebug(173) << userToStore(timeMap(),
- TQString::fromLatin1("HH:MM:SS AMPM test")) << endl;
+ TQString::tqfromLatin1("HH:MM:SS AMPM test")) << endl;
}
@@ -416,7 +416,7 @@ void KLocaleConfigTime::slotTranslate()
{
TQString str;
- TQString sep = TQString::fromLatin1("\n");
+ TQString sep = TQString::tqfromLatin1("\n");
TQString old;
diff --git a/kcontrol/locale/localetime.h b/kcontrol/locale/localetime.h
index 9563ea91a..b77de2af9 100644
--- a/kcontrol/locale/localetime.h
+++ b/kcontrol/locale/localetime.h
@@ -36,7 +36,7 @@ class KLanguageCombo;
class StringPair;
-class KLocaleConfigTime : public QWidget
+class KLocaleConfigTime : public TQWidget
{
Q_OBJECT
diff --git a/kcontrol/locale/toplevel.cpp b/kcontrol/locale/toplevel.cpp
index de47ce661..523fa50ea 100644
--- a/kcontrol/locale/toplevel.cpp
+++ b/kcontrol/locale/toplevel.cpp
@@ -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::fromLatin1("kcmlocale"), m_nullConfig);
+ m_locale = new KLocale(TQString::tqfromLatin1("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::fromLatin1("kcmlocale"), m_globalConfig);
+ *m_locale = KLocale(TQString::tqfromLatin1("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::fromLatin1("LanguageChangesApplyOnlyToNewlyStartedPrograms"));
+ TQString::tqfromLatin1("LanguageChangesApplyOnlyToNewlyStartedPrograms"));
// restore the old global locale
KGlobal::_locale = lsave;