diff options
Diffstat (limited to 'klettres')
-rw-r--r-- | klettres/klettres/klettres.cpp | 20 | ||||
-rw-r--r-- | klettres/klettres/klnewstuff.cpp | 4 | ||||
-rw-r--r-- | klettres/klettres/prefs_addons.h | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/klettres/klettres/klettres.cpp b/klettres/klettres/klettres.cpp index 9839f4bf..365fee4f 100644 --- a/klettres/klettres/klettres.cpp +++ b/klettres/klettres/klettres.cpp @@ -93,12 +93,12 @@ void KLettres::findLanguages() for (TQStringList::Iterator it =mdirs.begin(); it !=mdirs.end(); ++it ) { TQDir dir(*it); m_languages += dir.entryList(TQDir::Dirs, TQDir::Name); - m_languages.remove(m_languages.tqfind(".")); - m_languages.remove(m_languages.tqfind("..")); + m_languages.remove(m_languages.find(".")); + m_languages.remove(m_languages.find("..")); } - m_languages.remove(m_languages.tqfind("pics")); - m_languages.remove(m_languages.tqfind("data")); - m_languages.remove(m_languages.tqfind("icons")); + m_languages.remove(m_languages.find("pics")); + m_languages.remove(m_languages.find("data")); + m_languages.remove(m_languages.find("icons")); m_languages.sort(); if (m_languages.isEmpty()) return; Prefs::setLanguages(m_languages); @@ -107,7 +107,7 @@ void KLettres::findLanguages() TQStringList temp_languages; for (uint i=0; i<m_languages.count(); i++) { - if (m_languages.tqcontains(m_languages[i])>1) { + if (m_languages.contains(m_languages[i])>1) { temp_languages.append(m_languages[i]); m_languages.remove(m_languages[i]); } @@ -155,8 +155,8 @@ TQString Prefs::defaultLanguage() TQStringList defaultLanguages = KGlobal::locale()->languagesTwoAlpha(); if (!defaultLanguages.isEmpty()) { //scan to see if defaultLanguages[0] belongs to m_languages. If not, en is default. - int i = Prefs::self()->m_languages.tqfindIndex(defaultLanguages[0]); - if (Prefs::self()->m_languages.tqcontains(Prefs::language())) + int i = Prefs::self()->m_languages.findIndex(defaultLanguages[0]); + if (Prefs::self()->m_languages.contains(Prefs::language())) return Prefs::language(); //the last language played else if (i<1) return "en"; //if no other @@ -284,7 +284,7 @@ void KLettres::loadSettings() //m_view->selectedLanguage = selectedLanguage; m_languageAction->setCurrentItem(Prefs::languageNumber()); TQString langString = m_languageNames[Prefs::languageNumber()]; - langString.tqreplace("&", TQString()); + langString.replace("&", TQString()); m_langLabel->setText(i18n("Current language is %1").tqarg(langString)); loadLangToolBar(); // load default level @@ -368,7 +368,7 @@ void KLettres::slotChangeLanguage(int newLanguage) Prefs::writeConfig(); // Update the StatusBar TQString langString = m_languageNames[newLanguage]; - langString.tqreplace("&", TQString()); + langString.replace("&", TQString()); m_langLabel->setText(i18n("Current language is %1").tqarg(langString)); loadLangToolBar(); // Change language effectively diff --git a/klettres/klettres/klnewstuff.cpp b/klettres/klettres/klnewstuff.cpp index 3741bb5f..ed6061ba 100644 --- a/klettres/klettres/klnewstuff.cpp +++ b/klettres/klettres/klnewstuff.cpp @@ -49,8 +49,8 @@ bool KLNewStuff::install( const TQString &fileName ) //refresh Languages menu //kdDebug() << "---- selected language : " << m_view->m_klettres->selectedLanguage << endl; m_view->m_klettres->m_languageAction->setItems(m_view->m_klettres->m_languageNames); - m_view->m_klettres->slotChangeLanguage(m_view->m_klettres->m_languages.tqfindIndex(Prefs::defaultLanguage())); - m_view->m_klettres->m_languageAction->setCurrentItem(m_view->m_klettres->m_languages.tqfindIndex(Prefs::defaultLanguage())); + m_view->m_klettres->slotChangeLanguage(m_view->m_klettres->m_languages.findIndex(Prefs::defaultLanguage())); + m_view->m_klettres->m_languageAction->setCurrentItem(m_view->m_klettres->m_languages.findIndex(Prefs::defaultLanguage())); return true; } diff --git a/klettres/klettres/prefs_addons.h b/klettres/klettres/prefs_addons.h index 1e02b2e3..ec28026a 100644 --- a/klettres/klettres/prefs_addons.h +++ b/klettres/klettres/prefs_addons.h @@ -33,13 +33,13 @@ static void setLanguageNumber(int i) static int languageNumber() { - int i = Prefs::self()->m_languages.tqfindIndex(language()); + int i = Prefs::self()->m_languages.findIndex(language()); if (i != -1) return i; - i = Prefs::self()->m_languages.tqfindIndex(defaultLanguage()); + i = Prefs::self()->m_languages.findIndex(defaultLanguage()); if (i != -1) return i; - i = Prefs::self()->m_languages.tqfindIndex("en"); + i = Prefs::self()->m_languages.findIndex("en"); if (i != -1) return i; |