From c663b6440964f6ac48027143ac9e63298991f9d0 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:33:34 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1157639 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kpersonalizer/kfindlanguage.cpp | 50 ++++++++++++++++++++--------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'kpersonalizer/kfindlanguage.cpp') diff --git a/kpersonalizer/kfindlanguage.cpp b/kpersonalizer/kfindlanguage.cpp index b1ebb419b..a23f98322 100644 --- a/kpersonalizer/kfindlanguage.cpp +++ b/kpersonalizer/kfindlanguage.cpp @@ -17,9 +17,9 @@ #include -#include -#include -#include +#include +#include +#include #include #include @@ -38,7 +38,7 @@ KFindLanguage::KFindLanguage() { m_country = config->readEntry("Country", "C"); if (m_country == "C") { - m_country = QString::fromLatin1(getenv("LANG")); + m_country = TQString::fromLatin1(getenv("LANG")); if(m_country.left(5) == "nn_NO") // glibc's nn_NO is KDE's no_NY m_country = "no"; if(m_country.contains("_")) @@ -54,34 +54,34 @@ KFindLanguage::KFindLanguage() { } // get the users primary Languages - KSimpleConfig ent(locate("locale", QString::fromLatin1("l10n/%1/entry.desktop").arg(m_country)), true); + KSimpleConfig ent(locate("locale", TQString::fromLatin1("l10n/%1/entry.desktop").arg(m_country)), true); ent.setGroup("KCM Locale"); - QStringList langs = ent.readListEntry("Languages"); + TQStringList langs = ent.readListEntry("Languages"); if (langs.isEmpty()) langs.append("en_US"); // add the primary languages for the country to the list - QStringList prilang; - for ( QStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) { - QString str = locate("locale", *it + "/entry.desktop"); + TQStringList prilang; + for ( TQStringList::ConstIterator it = langs.begin(); it != langs.end(); ++it ) { + TQString str = locate("locale", *it + "/entry.desktop"); if (!str.isNull()) prilang << str; } // add all languages to the list - QStringList alllang = KGlobal::dirs()->findAllResources("locale", "*/entry.desktop", false, true); + TQStringList alllang = KGlobal::dirs()->findAllResources("locale", "*/entry.desktop", false, true); alllang.sort(); - QStringList langlist = prilang; + TQStringList langlist = prilang; if (langlist.count() > 0) - langlist << QString::null; // separator + langlist << TQString::null; // separator langlist += alllang; - for ( QStringList::ConstIterator it = langlist.begin(); it != langlist.end(); ++it ) { + for ( TQStringList::ConstIterator it = langlist.begin(); it != langlist.end(); ++it ) { KSimpleConfig entry(*it); entry.setGroup("KCM Locale"); - QString name = entry.readEntry("Name", i18n("without name")); + TQString name = entry.readEntry("Name", i18n("without name")); - QString tag = *it; + TQString tag = *it; int index = tag.findRev('/'); tag = tag.left(index); index = tag.findRev('/'); @@ -92,11 +92,11 @@ KFindLanguage::KFindLanguage() { } // now find the best language for the user - QString compare = m_oldlang; + TQString compare = m_oldlang; if (m_oldlang.isEmpty()) { compare = langs.first(); - for(QStringList::Iterator it = langs.begin(); it != langs.end(); ++it) { - if (*it == QString::fromLatin1(getenv("LANG")).mid(3, 2).lower()) + for(TQStringList::Iterator it = langs.begin(); it != langs.end(); ++it) { + if (*it == TQString::fromLatin1(getenv("LANG")).mid(3, 2).lower()) compare = *it; } } @@ -106,10 +106,10 @@ KFindLanguage::KFindLanguage() { // Find the users's language int bestmatch = -1; - QStringList::ConstIterator it; + TQStringList::ConstIterator it; for( it = m_langlist.begin(); it != m_langlist.end(); ++it) { int match=0; - QString l = (*it).left((*it).find(";")); + TQString l = (*it).left((*it).find(";")); if (l == "C") match++; if(l.contains(compare)) @@ -130,22 +130,22 @@ KFindLanguage::KFindLanguage() { KFindLanguage::~KFindLanguage() { } -QStringList KFindLanguage::getLangList() const { +TQStringList KFindLanguage::getLangList() const { return m_langlist; } -QMap KFindLanguage::getLangMap() const { +TQMap KFindLanguage::getLangMap() const { return m_langmap; } -QString KFindLanguage::getBestLang() const { +TQString KFindLanguage::getBestLang() const { return m_bestlang; } -QString KFindLanguage::getOldLang() const { +TQString KFindLanguage::getOldLang() const { return m_oldlang; } -QString KFindLanguage::getCountry() const { +TQString KFindLanguage::getCountry() const { return m_country; } -- cgit v1.2.1