diff options
54 files changed, 213 insertions, 213 deletions
diff --git a/kmouth/phrasebook/phrasebook.cpp b/kmouth/phrasebook/phrasebook.cpp index 2efc2e6..7ff932b 100644 --- a/kmouth/phrasebook/phrasebook.cpp +++ b/kmouth/phrasebook/phrasebook.cpp @@ -282,10 +282,10 @@ int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool bool result; if (fdlg.currentFilter() == "*.phrasebook") { - if (url.fileName (false).tqcontains('.') == 0) { + if (url.fileName (false).contains('.') == 0) { url.setFileName (url.fileName(false) + ".phrasebook"); } - else if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { + else if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { int filetype = KMessageBox::questionYesNoCancel (0,TQString("<qt>%1</qt>").tqarg(i18n("Your chosen filename <i>%1</i> has a different extension than <i>.phrasebook</i>. " "Do you wish to add <i>.phrasebook</i> to the filename?").tqarg(url.filename())),i18n("File Extension"),i18n("Add"),i18n("Do Not Add")); if (filetype == KMessageBox::Cancel) { @@ -298,7 +298,7 @@ int PhraseBook::save (TQWidget *tqparent, const TQString &title, KURL &url, bool result = save (url, true); } else if (fdlg.currentFilter() == "*.txt") { - if (url.fileName (false).right (11).tqcontains (".phrasebook", false) == 0) { + if (url.fileName (false).right (11).contains (".phrasebook", false) == 0) { result = save (url, false); } else { @@ -480,9 +480,9 @@ const char *PhraseBookDrag::format (int i) const { TQByteArray PhraseBookDrag::tqencodedData (const char* mime) const { TQCString m(mime); m = m.lower(); - if (m.tqcontains("xml-phrasebook")) + if (m.contains("xml-phrasebook")) return xmlphrasebook.tqencodedData(mime); - else if (m.tqcontains("xml")) + else if (m.contains("xml")) return xml.tqencodedData(mime); else return plain.tqencodedData(mime); diff --git a/kmouth/phrasebook/phrasebookdialog.cpp b/kmouth/phrasebook/phrasebookdialog.cpp index 6e4deda..dff69e8 100644 --- a/kmouth/phrasebook/phrasebookdialog.cpp +++ b/kmouth/phrasebook/phrasebookdialog.cpp @@ -383,7 +383,7 @@ TQString PhraseBookDialog::displayPath (TQString filename) { TQFileInfo file(filename); TQString path = file.dirPath(); TQString dispPath = ""; - uint position = path.tqfind("/kmouth/books/")+TQString("/kmouth/books/").length(); + uint position = path.find("/kmouth/books/")+TQString("/kmouth/books/").length(); while (path.length() > position) { file.setFile(path); diff --git a/kmouth/speech.cpp b/kmouth/speech.cpp index 300bfb1..f74e1fd 100644 --- a/kmouth/speech.cpp +++ b/kmouth/speech.cpp @@ -51,7 +51,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, TQValueStack<bool> stack; // saved isdoublequote values during parsing of braces bool issinglequote=false; // inside '...' ? bool isdoublequote=false; // inside "..." ? - int notqreplace=0; // nested braces when within ${...} + int noreplace=0; // nested braces when within ${...} TQString escText = KShellProcess::quote(text); // character sequences that change the state or need to be otherwise processed @@ -71,17 +71,17 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, if ((command[i]=='(') || (command[i]=='{')) { // (...) or {...} // assert(isdoublequote == false) stack.push(isdoublequote); - if (notqreplace > 0) + if (noreplace > 0) // count nested braces when within ${...} - notqreplace++; + noreplace++; i++; } else if (command[i]=='$') { // $(...) or ${...} stack.push(isdoublequote); isdoublequote = false; - if ((notqreplace > 0) || (command[i+1]=='{')) + if ((noreplace > 0) || (command[i+1]=='{')) // count nested braces when within ${...} - notqreplace++; + noreplace++; i+=2; } else if ((command[i]==')') || (command[i]=='}')) { @@ -90,9 +90,9 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, isdoublequote = stack.pop(); else qWarning("Parse error."); - if (notqreplace > 0) + if (noreplace > 0) // count nested braces when within ${...} - notqreplace--; + noreplace--; i++; } else if (command[i]=='\'') { @@ -107,7 +107,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, i+=2; else if (command[i]=='`') { // Replace all `...` with safer $(...) - command.tqreplace (i, 1, "$("); + command.replace (i, 1, "$("); TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)"); for (int i2=re_backticks.search(command,i+2); i2!=-1; @@ -115,7 +115,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, ) { if (command[i2] == '`') { - command.tqreplace (i2, 1, ")"); + command.replace (i2, 1, ")"); i2=command.length(); // leave loop } else { @@ -126,7 +126,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, } // Leave i unchanged! We need to process "$(" } - else if (notqreplace > 0) { // do not replace macros within ${...} + else if (noreplace > 0) { // do not replace macros within ${...} if (issinglequote) i+=re_singlequote.matchedLength(); else if (isdoublequote) @@ -161,7 +161,7 @@ TQString Speech::prepareCommand (TQString command, const TQString &text, else if (issinglequote) v="'"+v+"'"; - command.tqreplace (i, match.length(), v); + command.replace (i, match.length(), v); i+=v.length(); } } diff --git a/kmouth/wordcompletion/klanguagebutton.cpp b/kmouth/wordcompletion/klanguagebutton.cpp index e34881a..537e728 100644 --- a/kmouth/wordcompletion/klanguagebutton.cpp +++ b/kmouth/wordcompletion/klanguagebutton.cpp @@ -60,12 +60,12 @@ static inline void checkInsertPos( TQPopupMenu *popup, const TQString & str, static inline TQPopupMenu * checkInsertIndex( TQPopupMenu *popup, const TQStringList *tags, const TQString &submenu ) { - int pos = tags->tqfindIndex( submenu ); + int pos = tags->findIndex( submenu ); TQPopupMenu *pi = 0; if ( pos != -1 ) { - TQMenuItem *p = popup->tqfindItem( pos ); + TQMenuItem *p = popup->findItem( pos ); pi = p ? p->popup() : 0; } if ( !pi ) @@ -189,7 +189,7 @@ void KLanguageButton::clear() bool KLanguageButton::containsTag( const TQString &str ) const { - return m_tags->tqcontains( str ) > 0; + return m_tags->contains( str ) > 0; } TQString KLanguageButton::currentTag() const @@ -228,7 +228,7 @@ void KLanguageButton::setCurrentItem( int i ) void KLanguageButton::setCurrentItem( const TQString &code ) { - int i = m_tags->tqfindIndex( code ); + int i = m_tags->findIndex( code ); if ( code.isNull() ) i = 0; if ( i != -1 ) diff --git a/kmouth/wordcompletion/klanguagebuttonhelper.cpp b/kmouth/wordcompletion/klanguagebuttonhelper.cpp index 12059c1..8f1785e 100644 --- a/kmouth/wordcompletion/klanguagebuttonhelper.cpp +++ b/kmouth/wordcompletion/klanguagebuttonhelper.cpp @@ -48,7 +48,7 @@ void loadLanguageList(KLanguageButton *combo) it != langlist.end(); ++it ) { TQString fpath = (*it).left((*it).length() - 14); - int index = fpath.tqfindRev('/'); + int index = fpath.findRev('/'); TQString nid = fpath.mid(index + 1); KSimpleConfig entry(*it); diff --git a/kmouth/wordcompletion/wordcompletion.cpp b/kmouth/wordcompletion/wordcompletion.cpp index a5d7a4e..5abd4b7 100644 --- a/kmouth/wordcompletion/wordcompletion.cpp +++ b/kmouth/wordcompletion/wordcompletion.cpp @@ -46,7 +46,7 @@ TQString WordCompletion::makeCompletion(const TQString &text) { d->lastText = text; KCompletion::clear(); - int border = text.tqfindRev(TQRegExp("\\W")); + int border = text.findRev(TQRegExp("\\W")); TQString suffix = text.right (text.length() - border - 1).lower(); TQString prefix = text.left (border + 1); @@ -84,7 +84,7 @@ TQStringList WordCompletion::wordLists(const TQString &language) { } TQString WordCompletion::languageOfWordList(const TQString &wordlist) { - if (d->dictDetails.tqcontains(wordlist)) + if (d->dictDetails.contains(wordlist)) return d->dictDetails[wordlist].language; else return TQString(); @@ -137,7 +137,7 @@ bool WordCompletion::setWordList(const TQString &wordlist) { d->wordsToSave = false; d->map.clear(); - bool result = d->dictDetails.tqcontains (wordlist); + bool result = d->dictDetails.contains (wordlist); if (result) d->current = wordlist; else @@ -177,13 +177,13 @@ void WordCompletion::addSentence (const TQString &sentence) { TQStringList::ConstIterator it; for (it = words.begin(); it != words.end(); ++it) { - if (!(*it).tqcontains(TQRegExp("\\d|_"))) { + if (!(*it).contains(TQRegExp("\\d|_"))) { TQString key = (*it).lower(); - if (d->map.tqcontains(key)) + if (d->map.contains(key)) d->map[key] += 1; else d->map[key] = 1; - if (d->addedWords.tqcontains(key)) + if (d->addedWords.contains(key)) d->addedWords[key] += 1; else d->addedWords[key] = 1; @@ -208,7 +208,7 @@ void WordCompletion::save () { stream << "WPDictFile\n"; TQMap<TQString,int>::ConstIterator it; for (it = d->map.begin(); it != d->map.end(); ++it) { - if (d->addedWords.tqcontains(it.key())) { + if (d->addedWords.contains(it.key())) { stream << it.key() << "\t" << d->addedWords[it.key()] << "\t1\n"; stream << it.key() << "\t" << it.data() - d->addedWords[it.key()] << "\t2\n"; } diff --git a/kmouth/wordcompletion/wordlist.cpp b/kmouth/wordcompletion/wordlist.cpp index 15c4ea2..11a15a1 100644 --- a/kmouth/wordcompletion/wordlist.cpp +++ b/kmouth/wordcompletion/wordlist.cpp @@ -139,9 +139,9 @@ void addWords (WordMap &map, TQString line) { TQStringList::ConstIterator it; for (it = words.begin(); it != words.end(); ++it) { - if (!(*it).tqcontains(TQRegExp("\\d|_"))) { + if (!(*it).contains(TQRegExp("\\d|_"))) { TQString key = (*it).lower(); - if (map.tqcontains(key)) + if (map.contains(key)) map[key] += 1; else map[key] = 1; @@ -152,7 +152,7 @@ void addWords (WordMap &map, TQString line) { void addWords (WordMap &map, WordMap add) { WordList::WordMap::ConstIterator it; for (it = add.begin(); it != add.end(); ++it) - if (map.tqcontains(it.key())) + if (map.contains(it.key())) map[it.key()] += it.data(); else map[it.key()] = it.data(); @@ -186,7 +186,7 @@ void addWordsFromFile (WordMap &map, TQString filename, TQTextStream::Encoding e bool ok; int weight = list[1].toInt(&ok); if (ok && (weight > 0)) { - if (map.tqcontains(list[0])) + if (map.contains(list[0])) map[list[0]] += weight; else map[list[0]] = weight; @@ -261,7 +261,7 @@ WordMap mergeFiles (TQMap<TQString,int> files, KProgressDialog *pdlg) { maxWeight = weight; for (iter = fileMap.begin(); iter != fileMap.end(); ++iter) - if (map.tqcontains(iter.key())) + if (map.contains(iter.key())) map[iter.key()] += iter.data() * factor; else map[iter.key()] = iter.data() * factor; @@ -394,14 +394,14 @@ void loadAffFile(const TQString &filename, AffMap &prefixes, AffMap &suffixes) { if (s.startsWith("PFX")) { AffList list; - if (prefixes.tqcontains (fields[1][0])) + if (prefixes.contains (fields[1][0])) list = prefixes[fields[1][0]]; list << e; prefixes[fields[1][0]] = list; } else if (s.startsWith("SFX")) { AffList list; - if (suffixes.tqcontains (fields[1][0])) + if (suffixes.contains (fields[1][0])) list = suffixes[fields[1][0]]; list << e; suffixes[fields[1][0]] = list; @@ -432,7 +432,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition) it != condition.end(); ++it, ++idx) { - if ((*it).tqcontains(word[idx]) == ((*it)[0] == '^')) + if ((*it).contains(word[idx]) == ((*it)[0] == '^')) return false; } return true; @@ -445,7 +445,7 @@ inline bool checkCondition (const TQString &word, const TQStringList &condition) */ inline void checkWord(const TQString &word, const TQString &modifiers, bool cross, const WordMap &map, WordMap &checkedMap, const AffMap &suffixes) { for (uint i = 0; i < modifiers.length(); i++) { - if (suffixes.tqcontains(modifiers[i])) { + if (suffixes.contains(modifiers[i])) { AffList sList = suffixes[modifiers[i]]; AffList::ConstIterator sIt; @@ -454,7 +454,7 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros && (checkCondition(word, (*sIt).condition))) { TQString sWord = word.left(word.length()-(*sIt).charsToRemove) + (*sIt).add; - if (map.tqcontains(sWord)) + if (map.contains(sWord)) checkedMap[sWord] = map[sWord]; } } @@ -467,19 +467,19 @@ inline void checkWord(const TQString &word, const TQString &modifiers, bool cros * @param modifiers discribes which pre- and suffixes are valid */ void checkWord (const TQString &word, const TQString &modifiers, const WordMap &map, WordMap &checkedMap, const AffMap &prefixes, const AffMap &suffixes) { - if (map.tqcontains(word)) + if (map.contains(word)) checkedMap[word] = map[word]; checkWord(word, modifiers, true, map, checkedMap, suffixes); for (uint i = 0; i < modifiers.length(); i++) { - if (prefixes.tqcontains(modifiers[i])) { + if (prefixes.contains(modifiers[i])) { AffList pList = prefixes[modifiers[i]]; AffList::ConstIterator pIt; for (pIt = pList.begin(); pIt != pList.end(); ++pIt) { TQString pWord = (*pIt).add + word; - if (map.tqcontains(pWord)) + if (map.contains(pWord)) checkedMap[pWord] = map[pWord]; checkWord(pWord, modifiers, false, map, checkedMap, suffixes); @@ -520,14 +520,14 @@ WordMap spellCheck (WordMap map, TQString dictionary, KProgressDialog *pdlg) { while (!stream.atEnd()) { TQString s = stream.readLine(); - if (s.tqcontains("/")) { - TQString word = s.left(s.tqfind("/")).lower(); - TQString modifiers = s.right(s.length() - s.tqfind("/")); + if (s.contains("/")) { + TQString word = s.left(s.find("/")).lower(); + TQString modifiers = s.right(s.length() - s.find("/")); checkWord(word, modifiers, map, checkedMap, prefixes, suffixes); } else { - if (!s.isEmpty() && !s.isNull() && map.tqcontains(s.lower())) + if (!s.isEmpty() && !s.isNull() && map.contains(s.lower())) checkedMap[s.lower()] = map[s.lower()]; } diff --git a/ksayit/Doxyfile b/ksayit/Doxyfile index 77566a0..8e2f437 100644 --- a/ksayit/Doxyfile +++ b/ksayit/Doxyfile @@ -16,7 +16,7 @@ ABBREVIATE_BRIEF = "The $name class" \ is \ provides \ specifies \ - tqcontains \ + contains \ represents \ a \ an \ diff --git a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp index 0ade8fe..7267156 100644 --- a/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp +++ b/ksayit/KTTSD_Lib/kttsdlibsetupimpl.cpp @@ -47,7 +47,7 @@ void KTTSDlibSetupImpl::slotLaunchControlcenter() fgets(cmdresult, 18, fp); pclose(fp); } - if ( !TQCString(cmdresult).tqcontains("kcmkttsd") ){ + if ( !TQCString(cmdresult).contains("kcmkttsd") ){ TQString error = i18n("Control Center Module for KTTSD not found."); KMessageBox::sorry(this, error, i18n("Problem")); return; diff --git a/ksayit/src/docbookclasses.cpp b/ksayit/src/docbookclasses.cpp index 5f0fa00..901d494 100644 --- a/ksayit/src/docbookclasses.cpp +++ b/ksayit/src/docbookclasses.cpp @@ -389,9 +389,9 @@ Author::~Author() // { // // canonify string // TQString m_data = data; -// m_data.tqreplace( TQRegExp("\n"), "" ); // remove Newlines -// m_data.tqreplace( TQRegExp(" {2,}"), " " ); // remove multiple spaces -// m_data.tqreplace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs +// m_data.replace( TQRegExp("\n"), "" ); // remove Newlines +// m_data.replace( TQRegExp(" {2,}"), " " ); // remove multiple spaces +// m_data.replace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs // // split string "firstname surname" // TQString firstname = m_data.section(' ', 0, 0); // TQString surname = m_data.section(' ', 1, 1); diff --git a/ksayit/src/docbookparser.cpp b/ksayit/src/docbookparser.cpp index f1e0c51..8a5baa1 100644 --- a/ksayit/src/docbookparser.cpp +++ b/ksayit/src/docbookparser.cpp @@ -479,9 +479,9 @@ void DocbookParser::parsePara(const TQDomElement &element, ListViewInterface *it TQString raw = node2raw(element); // remove <para> tags - raw.tqreplace( TQRegExp("</?(para|Para|PARA)/?>"),""); - raw.tqreplace( TQRegExp("^ "),"" ); - raw.tqreplace( TQRegExp("^\n"), "" ); + raw.replace( TQRegExp("</?(para|Para|PARA)/?>"),""); + raw.replace( TQRegExp("^ "),"" ); + raw.replace( TQRegExp("^\n"), "" ); para->setValue(KSayItGlobal::RAWDATA, raw); para->setValue(KSayItGlobal::RTFDATA, raw); diff --git a/ksayit/src/doctreeviewimpl.cpp b/ksayit/src/doctreeviewimpl.cpp index db6ed32..c4b9797 100644 --- a/ksayit/src/doctreeviewimpl.cpp +++ b/ksayit/src/doctreeviewimpl.cpp @@ -197,7 +197,7 @@ void DocTreeViewImpl::openFile(const KURL &url) TQString line; int offset; file.readLine( line, file.size() ); - while( !file.atEnd() && (offset = line.tqfind("<book", 0, false)) < 0 ){ + while( !file.atEnd() && (offset = line.find("<book", 0, false)) < 0 ){ header += line; file.readLine( line, file.size() ); } @@ -391,9 +391,9 @@ void DocTreeViewImpl::setEditMode(bool mode) void DocTreeViewImpl::makeToSingleLine( TQString &content ) { // canonify string - content.tqreplace( TQRegExp("\n"), "" ); // remove Newlines - content.tqreplace( TQRegExp(" {2,}"), " " ); // remove multiple spaces - content.tqreplace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs + content.replace( TQRegExp("\n"), "" ); // remove Newlines + content.replace( TQRegExp(" {2,}"), " " ); // remove multiple spaces + content.replace( TQRegExp("[\t|\r]{1,}"), ""); // remove Tabs } @@ -594,8 +594,8 @@ TQString DocTreeViewImpl::getItemTitle( ListViewInterface *item ) title = ( item->getValue(KSayItGlobal::SPEAKERDATA) ).toString().left(32); // canonify string - title.tqreplace( TQRegExp("^( |\t|\n)+"), ""); - title.tqreplace( TQRegExp("( |\t|\n)$+"), ""); + title.replace( TQRegExp("^( |\t|\n)+"), ""); + title.replace( TQRegExp("( |\t|\n)$+"), ""); } else { title = col0.left(32); } diff --git a/ksayit/src/fxpluginhandler.cpp b/ksayit/src/fxpluginhandler.cpp index fc5ed5d..a923f5c 100644 --- a/ksayit/src/fxpluginhandler.cpp +++ b/ksayit/src/fxpluginhandler.cpp @@ -70,7 +70,7 @@ void FXPluginHandler::searchPlugins() if ( factory ){ kdDebug(100200) << "FXPluginHandler::searchPlugins(): Plugin factory found." << endl; // register found plugin - if ( !sRegistered.tqcontains( TQString(name) )){ + if ( !sRegistered.contains( TQString(name) )){ sRegistered.append( TQString(name) ); plugin.name = name; plugin.library = library; @@ -96,7 +96,7 @@ void FXPluginHandler::readConfiguration() // unload all plugins and destroy the effect objects lit = m_lstActivePlugins.begin(); while ( lit != m_lstActivePlugins.end() ){ - mit = m_mapPluginList.tqfind( *lit ); + mit = m_mapPluginList.find( *lit ); if ( mit!=m_mapPluginList.end() ){ plugin = *mit; if ( (plugin.p != NULL) && (plugin.EffectID == 0) ){ @@ -116,7 +116,7 @@ void FXPluginHandler::readConfiguration() KLibFactory *factory = NULL; for (lit=conf_active.begin(); lit!=conf_active.end(); ++lit){ // for all in config - mit = m_mapPluginList.tqfind(*lit); + mit = m_mapPluginList.find(*lit); if( mit!=m_mapPluginList.end() ){ // plugin found in list of registered plugins plugin = *mit; @@ -146,7 +146,7 @@ void FXPluginHandler::showEffectGUI(const TQString &pname) fx_struct plugin; // find plugin with name==pname in list and show its GUI - mit = m_mapPluginList.tqfind(pname); + mit = m_mapPluginList.find(pname); if ( mit != m_mapPluginList.end() ){ plugin = *mit; if ( plugin.p != NULL ){ // plugin loaded @@ -198,7 +198,7 @@ void FXPluginHandler::activateEffect(const TQString &pname, fx_struct plugin; // find plugin with name==pname - mit = m_mapPluginList.tqfind(pname); + mit = m_mapPluginList.find(pname); if ( mit!=m_mapPluginList.end() ){ plugin = *mit; if ( plugin.p != NULL ){ diff --git a/ksayit/src/fxsetupimpl.cpp b/ksayit/src/fxsetupimpl.cpp index 9f18b81..c066f88 100644 --- a/ksayit/src/fxsetupimpl.cpp +++ b/ksayit/src/fxsetupimpl.cpp @@ -109,7 +109,7 @@ void FX_SetupImpl::Init(TQStringList c_avail) pushButton_removeAll->setEnabled(false); for (sit=conf_active.begin(); sit!=conf_active.end(); ++sit){ - it = c_avail.tqfind(*sit); + it = c_avail.find(*sit); if ( it!=c_avail.end() ){ // active plugin as per config-file in pluginlist found c_active.append(*sit); // append to active list c_avail.remove(*sit); // remove active plugin from the list of avail plugins diff --git a/kttsd/compat/interfaces/kspeech/kspeech.h b/kttsd/compat/interfaces/kspeech/kspeech.h index df7d251..31e9243 100644 --- a/kttsd/compat/interfaces/kspeech/kspeech.h +++ b/kttsd/compat/interfaces/kspeech/kspeech.h @@ -441,7 +441,7 @@ * a Spanish synthesizer would likely be unintelligible). So the language * attribute is said to have "priority". * If an application does not specify a language attribute, a default one will be assumed. - * The rest of the attributes are said to be "preferred". If %KTTSD cannot tqfind + * The rest of the attributes are said to be "preferred". If %KTTSD cannot find * a talker with the exact preferred attributes requested, the closest matching * talker will likely still be understandable. * @@ -751,7 +751,7 @@ class KSpeech : virtual public DCOPObject { * with a single space, and then replaces the sentence delimiters using * the following statement: @verbatim - TQString::tqreplace(sentenceDelimiter, "\\1\t"); + TQString::replace(sentenceDelimiter, "\\1\t"); @endverbatim * * which replaces all sentence delimiters with a tab, but diff --git a/kttsd/filters/main.cpp b/kttsd/filters/main.cpp index 015bed0..f33d771 100644 --- a/kttsd/filters/main.cpp +++ b/kttsd/filters/main.cpp @@ -123,9 +123,9 @@ int main(int argc, char *argv[]) TalkerCode* talkerCode = new TalkerCode( talker ); text = plugIn->convert( text, talkerCode, appId ); if ( args->isSet("break") ) - text.tqreplace( "\t", "\\t" ); + text.replace( "\t", "\\t" ); else - text.tqreplace( "\t", "" ); + text.replace( "\t", "" ); cout << text.latin1() << endl; delete config; delete plugIn; diff --git a/kttsd/filters/sbd/sbdconf.cpp b/kttsd/filters/sbd/sbdconf.cpp index 6beaba3..be6a244 100644 --- a/kttsd/filters/sbd/sbdconf.cpp +++ b/kttsd/filters/sbd/sbdconf.cpp @@ -156,7 +156,7 @@ void SbdConf::save(KConfig* config, const TQString& configGroup){ config->writeEntry("SentenceDelimiterRegExp", m_widget->reLineEdit->text() ); config->writeEntry("SentenceBoundary", m_widget->sbLineEdit->text() ); config->writeEntry("LanguageCodes", m_languageCodeList ); - config->writeEntry("AppID", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); + config->writeEntry("AppID", m_widget->appIdLineEdit->text().replace(" ", "") ); } /** @@ -257,7 +257,7 @@ void SbdConf::slotLanguageBrowseButton_clicked() if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; TQListViewItem* item = new KListViewItem(langLView, language, locale); - if (m_languageCodeList.tqcontains(locale)) item->setSelected(true); + if (m_languageCodeList.contains(locale)) item->setSelected(true); } // Sort by language. langLView->setSorting(0); diff --git a/kttsd/filters/sbd/sbdconfwidget.ui b/kttsd/filters/sbd/sbdconfwidget.ui index 5c2662b..e7158dc 100644 --- a/kttsd/filters/sbd/sbdconfwidget.ui +++ b/kttsd/filters/sbd/sbdconfwidget.ui @@ -197,7 +197,7 @@ <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID tqcontains:</string> + <string>Application &ID contains:</string> </property> <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> diff --git a/kttsd/filters/sbd/sbdproc.cpp b/kttsd/filters/sbd/sbdproc.cpp index 6b0a1a4..d7e274c 100644 --- a/kttsd/filters/sbd/sbdproc.cpp +++ b/kttsd/filters/sbd/sbdproc.cpp @@ -277,8 +277,8 @@ TQString SbdThread::makeSentence( const TQString& text ) if ( !e.isEmpty() ) s += e; // Escape ampersands and less thans. TQString newText = text; - newText.tqreplace(TQRegExp("&(?!amp;)"), "&"); - newText.tqreplace(TQRegExp("<(?!lt;)"), "<"); + newText.replace(TQRegExp("&(?!amp;)"), "&"); + newText.replace(TQRegExp("<(?!lt;)"), "<"); s += newText; if ( !e.isEmpty() ) s += "</emphasis>"; if ( !p.isEmpty() ) s += "</prosody>"; @@ -351,7 +351,7 @@ TQString SbdThread::parseSsmlNode( TQDomNode& n, const TQString& re ) case TQDomNode::TextNode: { // = 3 TQString s = parsePlainText( n.toText().data(), re ); // TQString d = s; - // d.tqreplace("\t", "\\t"); + // d.replace("\t", "\\t"); // kdDebug() << "SbdThread::parseSsmlNode: parsedPlainText = [" << d << "]" << endl; TQStringList sentenceList = TQStringList::split( '\t', s, false ); int lastNdx = sentenceList.count() - 1; @@ -457,13 +457,13 @@ TQString SbdThread::parseCode( const TQString& inputText ) { TQString temp = inputText; // Replace newlines with tabs. - temp.tqreplace("\n","\t"); + temp.replace("\n","\t"); // Remove leading spaces. - temp.tqreplace(TQRegExp("\\t +"), "\t"); + temp.replace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.tqreplace(TQRegExp(" +\\t"), "\t"); + temp.replace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.tqreplace(TQRegExp("\t\t+"),"\t"); + temp.replace(TQRegExp("\t\t+"),"\t"); return temp; } @@ -474,16 +474,16 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r TQRegExp sentenceDelimiter = TQRegExp( re ); TQString temp = inputText; // Replace sentence delimiters with tab. - temp.tqreplace(sentenceDelimiter, m_configuredSentenceBoundary); + temp.replace(sentenceDelimiter, m_configuredSentenceBoundary); // Replace remaining newlines with spaces. - temp.tqreplace("\n"," "); - temp.tqreplace("\r"," "); + temp.replace("\n"," "); + temp.replace("\r"," "); // Remove leading spaces. - temp.tqreplace(TQRegExp("\\t +"), "\t"); + temp.replace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.tqreplace(TQRegExp(" +\\t"), "\t"); + temp.replace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.tqreplace(TQRegExp("\t\t+"),"\t"); + temp.replace(TQRegExp("\t\t+"),"\t"); return temp; } @@ -503,7 +503,7 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r { // Examine just the first 500 chars to see if it is code. TQString p = m_text.left( 500 ); - if ( p.tqcontains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) ) + if ( p.contains( TQRegExp( "(/\\*)|(if\\b\\()|(^#include\\b)" ) ) ) textType = ttCode; else textType = ttPlain; @@ -515,7 +515,7 @@ TQString SbdThread::parsePlainText( const TQString& inputText, const TQString& r if ( re.isEmpty() ) re = m_configuredRe; // Replace spaces, tabs, and formfeeds with a single space. - m_text.tqreplace(TQRegExp("[ \\t\\f]+"), " "); + m_text.replace(TQRegExp("[ \\t\\f]+"), " "); // Perform the filtering based on type of text. switch ( textType ) @@ -603,7 +603,7 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ m_configuredRe = config->readEntry( "SentenceDelimiterRegExp", "([\\.\\?\\!\\:\\;])(\\s|$|(\\n *\\n))" ); m_sbdThread->setConfiguredSbRegExp( m_configuredRe ); TQString sb = config->readEntry( "SentenceBoundary", "\\1\t" ); - sb.tqreplace( "\\t", "\t" ); + sb.replace( "\\t", "\t" ); m_sbdThread->setConfiguredSentenceBoundary( sb ); m_appIdList = config->readListEntry( "AppID" ); m_languageCodeList = config->readListEntry( "LanguageCodes" ); @@ -672,14 +672,14 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.tqcontains( languageCode ) ) + if ( !m_languageCodeList.contains( languageCode ) ) { if ( !talkerCode->countryCode().isEmpty() ) { languageCode += '_' + talkerCode->countryCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.tqcontains( languageCode ) ) return false; + if ( !m_languageCodeList.contains( languageCode ) ) return false; } else return false; } } @@ -692,7 +692,7 @@ bool SbdProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.tqcontains(m_appIdList[ndx]) ) + if ( appIdStr.contains(m_appIdList[ndx]) ) { found = true; break; diff --git a/kttsd/filters/stringreplacer/stringreplacerconf.cpp b/kttsd/filters/stringreplacer/stringreplacerconf.cpp index 8bce00d..7954b13 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconf.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerconf.cpp @@ -308,7 +308,7 @@ TQString StringReplacerConf::saveToFile(const TQString& filename) } // Application ID - TQString appId = m_widget->appIdLineEdit->text().tqreplace(" ", ""); + TQString appId = m_widget->appIdLineEdit->text().replace(" ", ""); if ( !appId.isEmpty() ) { TQStringList appIdList = TQStringList::split(",", appId); @@ -442,7 +442,7 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() if (!countryCode.isEmpty()) language += " (" + KGlobal::locale()->twoAlphaToCountryName(countryCode)+")"; item = new KListViewItem(langLView, language, locale); - if (m_languageCodeList.tqcontains(locale)) item->setSelected(true); + if (m_languageCodeList.contains(locale)) item->setSelected(true); } // Sort by language. langLView->setSorting(0); @@ -488,11 +488,11 @@ void StringReplacerConf::slotLanguageBrowseButton_clicked() if (m_languageCodeList.count() > 1) language = i18n("Multiple Languages"); if ( !s1.isEmpty() ) { - s2.tqreplace( s1, language ); - s2.tqreplace( i18n("Multiple Languages"), language ); + s2.replace( s1, language ); + s2.replace( i18n("Multiple Languages"), language ); } - s2.tqreplace(" ()", ""); - if ( !s2.tqcontains("(") && !language.isEmpty() ) s2 += " (" + language + ")"; + s2.replace(" ()", ""); + if ( !s2.contains("(") && !language.isEmpty() ) s2 += " (" + language + ")"; m_widget->nameLineEdit->setText(s2); configChanged(); } diff --git a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui index 8d8f193..73c5954 100644 --- a/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui +++ b/kttsd/filters/stringreplacer/stringreplacerconfwidget.ui @@ -102,7 +102,7 @@ <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID tqcontains:</string> + <string>Application &ID contains:</string> </property> <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> diff --git a/kttsd/filters/stringreplacer/stringreplacerproc.cpp b/kttsd/filters/stringreplacer/stringreplacerproc.cpp index 4cee1e7..3715654 100644 --- a/kttsd/filters/stringreplacer/stringreplacerproc.cpp +++ b/kttsd/filters/stringreplacer/stringreplacerproc.cpp @@ -180,14 +180,14 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ TQString languageCode = talkerCode->languageCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.tqcontains( languageCode ) ) + if ( !m_languageCodeList.contains( languageCode ) ) { if ( !talkerCode->countryCode().isEmpty() ) { languageCode += '_' + talkerCode->countryCode(); // kdDebug() << "StringReplacerProc::convert: converting " << inputText << // " if language code " << languageCode << " matches " << m_languageCodeList << endl; - if ( !m_languageCodeList.tqcontains( languageCode ) ) return inputText; + if ( !m_languageCodeList.contains( languageCode ) ) return inputText; } else return inputText; } } @@ -200,7 +200,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.tqcontains(m_appIdList[ndx]) ) + if ( appIdStr.contains(m_appIdList[ndx]) ) { found = true; break; @@ -217,7 +217,7 @@ bool StringReplacerProc::init(KConfig* config, const TQString& configGroup){ for ( int index = 0; index < listCount; ++index ) { //kdDebug() << "newtext = " << newText << " matching " << m_matchList[index].pattern() << " replacing with " << m_substList[index] << endl; - newText.tqreplace( m_matchList[index], m_substList[index] ); + newText.replace( m_matchList[index], m_substList[index] ); } m_wasModified = true; return newText; diff --git a/kttsd/filters/talkerchooser/talkerchooserconf.cpp b/kttsd/filters/talkerchooser/talkerchooserconf.cpp index b351df9..cbdbfb2 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconf.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserconf.cpp @@ -147,7 +147,7 @@ void TalkerChooserConf::save(KConfig* config, const TQString& configGroup){ config->setGroup( configGroup ); config->writeEntry( "UserFilterName", m_widget->nameLineEdit->text() ); config->writeEntry( "MatchRegExp", m_widget->reLineEdit->text() ); - config->writeEntry( "AppIDs", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); + config->writeEntry( "AppIDs", m_widget->appIdLineEdit->text().replace(" ", "") ); config->writeEntry( "TalkerCode", m_talkerCode.getTalkerCode()); } diff --git a/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui b/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui index 5401b72..1969489 100644 --- a/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui +++ b/kttsd/filters/talkerchooser/talkerchooserconfwidget.ui @@ -84,7 +84,7 @@ <cstring>reLabel</cstring> </property> <property name="text"> - <string>Te&xt tqcontains:</string> + <string>Te&xt contains:</string> </property> <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> @@ -102,7 +102,7 @@ <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>Application &ID tqcontains:</string> + <string>Application &ID contains:</string> </property> <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> diff --git a/kttsd/filters/talkerchooser/talkerchooserproc.cpp b/kttsd/filters/talkerchooser/talkerchooserproc.cpp index 8d4aeb0..30ef605 100644 --- a/kttsd/filters/talkerchooser/talkerchooserproc.cpp +++ b/kttsd/filters/talkerchooser/talkerchooserproc.cpp @@ -107,7 +107,7 @@ bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){ { if ( !m_re.isEmpty() ) { - int pos = inputText.tqfind( TQRegExp(m_re) ); + int pos = inputText.find( TQRegExp(m_re) ); if ( pos < 0 ) return inputText; } // If appId doesn't match, return input unmolested. @@ -119,7 +119,7 @@ bool TalkerChooserProc::init(KConfig* config, const TQString& configGroup){ TQString appIdStr = appId; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.tqcontains(m_appIdList[ndx]) ) + if ( appIdStr.contains(m_appIdList[ndx]) ) { found = true; break; diff --git a/kttsd/filters/xhtml2ssml/Doxyfile b/kttsd/filters/xhtml2ssml/Doxyfile index 6313df1..e3ad878 100644 --- a/kttsd/filters/xhtml2ssml/Doxyfile +++ b/kttsd/filters/xhtml2ssml/Doxyfile @@ -17,7 +17,7 @@ ABBREVIATE_BRIEF = "The $name class" \ is \ provides \ specifies \ - tqcontains \ + contains \ represents \ a \ an \ diff --git a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp index 916ec48..2c065e0 100644 --- a/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp +++ b/kttsd/filters/xhtml2ssml/xhtml2ssml.cpp @@ -97,7 +97,7 @@ bool XHTMLToSSMLParser::readFileConfigEntry(const TQString &line) { // break into TQStringList // the second parameter to split is the string, with all space simplified and all space around the : removed, i.e // "something : somethingelse" -> "something:somethingelse" - TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().tqreplace(" :", ":").tqreplace(": ", ":")); + TQStringList keyvalue = TQStringList::split(":", line.simplifyWhiteSpace().replace(" :", ":").replace(": ", ":")); if(keyvalue.count() != 2) return false; m_xhtml2ssml[keyvalue[0]] = keyvalue[1]; diff --git a/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl b/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl index f289252..2c1f3be 100644 --- a/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl +++ b/kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl @@ -52,22 +52,22 @@ </xsl:template> <!-- H1, H2, H3, H4, H5, H6: ignore tag, speak content as sentence. --> -<xsl:template match="*[tqcontains('h1|h2|h3|h4|h5|h6|H1|H2|H3|H4|H5|H6|',concat(local-name(),'|'))]"> +<xsl:template match="*[contains('h1|h2|h3|h4|h5|h6|H1|H2|H3|H4|H5|H6|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- DFN, LI, DD, DT: ignore tag, speak content. --> -<xsl:template match="*[tqcontains('dfn|li|dd|dt|DFN|LI|DD|DT|',concat(local-name(),'|'))]"> +<xsl:template match="*[contains('dfn|li|dd|dt|DFN|LI|DD|DT|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- PRE, CODE, TT; ignore tag, speak content. --> -<xsl:template match="*[tqcontains('pre|code|tt|PRE|CODE|TT|',concat(local-name(),'|'))]"> +<xsl:template match="*[contains('pre|code|tt|PRE|CODE|TT|',concat(local-name(),'|'))]"> <xsl:apply-templates/> </xsl:template> <!-- EM, STRONG, I, B, S, STRIKE, U: speak emphasized. --> -<xsl:template match="*[tqcontains('em|strong|i|b|s|strike|EM|STRONG|I|B|S|STRIKE|',concat(local-name(),'|'))]"> +<xsl:template match="*[contains('em|strong|i|b|s|strike|EM|STRONG|I|B|S|STRIKE|',concat(local-name(),'|'))]"> <emphasis level="strong"> <xsl:apply-templates/> </emphasis> diff --git a/kttsd/filters/xmltransformer/xmltransformerconf.cpp b/kttsd/filters/xmltransformer/xmltransformerconf.cpp index dd4bb54..8247a01 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconf.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerconf.cpp @@ -125,7 +125,7 @@ void XmlTransformerConf::save(KConfig* config, const TQString& configGroup){ config->writeEntry( "XsltprocPath", realFilePath( m_widget->xsltprocPath->url() ) ); config->writeEntry( "RootElement", m_widget->rootElementLineEdit->text() ); config->writeEntry( "DocType", m_widget->doctypeLineEdit->text() ); - config->writeEntry( "AppID", m_widget->appIdLineEdit->text().tqreplace(" ", "") ); + config->writeEntry( "AppID", m_widget->appIdLineEdit->text().replace(" ", "") ); } /** diff --git a/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui b/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui index c011b80..63a83c3 100644 --- a/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui +++ b/kttsd/filters/xmltransformer/xmltransformerconfwidget.ui @@ -215,7 +215,7 @@ <cstring>appIdLabel</cstring> </property> <property name="text"> - <string>and Application &ID tqcontains:</string> + <string>and Application &ID contains:</string> </property> <property name="tqalignment"> <set>AlignVCenter|AlignRight</set> diff --git a/kttsd/filters/xmltransformer/xmltransformerproc.cpp b/kttsd/filters/xmltransformer/xmltransformerproc.cpp index f9fc2e6..27c4cd4 100644 --- a/kttsd/filters/xmltransformer/xmltransformerproc.cpp +++ b/kttsd/filters/xmltransformer/xmltransformerproc.cpp @@ -198,7 +198,7 @@ bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup) found = false; for ( uint ndx=0; ndx < m_appIdList.count(); ++ndx ) { - if ( appIdStr.tqcontains(m_appIdList[ndx]) ) + if ( appIdStr.contains(m_appIdList[ndx]) ) { found = true; break; @@ -227,7 +227,7 @@ bool XmlTransformerProc::init(KConfig* config, const TQString& configGroup) // This will change & inside a CDATA section, which is not good, and also within comments and // processing instructions, which is OK because we don't speak those anyway. TQString text = inputText; - text.tqreplace(TQRegExp("&(?!amp;)"),"&"); + text.replace(TQRegExp("&(?!amp;)"),"&"); *wstream << text; inFile.close(); #if KDE_VERSION >= KDE_MAKE_VERSION (3,3,0) diff --git a/kttsd/kcmkttsmgr/addtalker.cpp b/kttsd/kcmkttsmgr/addtalker.cpp index 5732372..f97e263 100644 --- a/kttsd/kcmkttsmgr/addtalker.cpp +++ b/kttsd/kcmkttsmgr/addtalker.cpp @@ -46,7 +46,7 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* tqparent, const ch // Default to user's desktop language. TQString languageCode = KGlobal::locale()->defaultLanguage(); // If there is not a synth that supports the locale, try stripping country code. - if (!m_langToSynthMap.tqcontains(languageCode)) + if (!m_langToSynthMap.contains(languageCode)) { TQString countryCode; TQString charSet; @@ -55,7 +55,7 @@ AddTalker::AddTalker(SynthToLangMap synthToLangMap, TQWidget* tqparent, const ch languageCode = twoAlpha; } // If there is still not a synth that supports the language code, default to "other". - if (!m_langToSynthMap.tqcontains(languageCode)) languageCode = "other"; + if (!m_langToSynthMap.contains(languageCode)) languageCode = "other"; // Select the language in the language combobox. TQString language = languageCodeToLanguage(languageCode); diff --git a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp index f4d2bbe..e60a720 100644 --- a/kttsd/kcmkttsmgr/kcmkttsmgr.cpp +++ b/kttsd/kcmkttsmgr/kcmkttsmgr.cpp @@ -430,7 +430,7 @@ void KCMKttsMgr::load() loadNotifyEventsFromFile( locateLocal("config", "kttsd_notifyevents.xml"), true ); slotNotifyEnableCheckBox_toggled( m_kttsmgrw->notifyEnableCheckBox->isChecked() ); // Auto-expand and position on the Default item. - TQListViewItem* item = m_kttsmgrw->notifyListView->tqfindItem( "default", nlvcEventSrc ); + TQListViewItem* item = m_kttsmgrw->notifyListView->findItem( "default", nlvcEventSrc ); if ( item ) if ( item->childCount() > 0 ) item = item->firstChild(); if ( item ) m_kttsmgrw->notifyListView->ensureItemVisible( item ); @@ -542,7 +542,7 @@ void KCMKttsMgr::load() // All plugins support "Other". // TODO: Eventually, this should not be necessary, since all plugins will know // the languages they support and report them in call to getSupportedLanguages(). - if (!languageCodes.tqcontains("other")) languageCodes.append("other"); + if (!languageCodes.contains("other")) languageCodes.append("other"); // Add supported language codes to synthesizer-to-language map. m_synthToLangMap[synthName] = languageCodes; @@ -822,7 +822,7 @@ void KCMKttsMgr::save() if (groupName.left(7) == "Talker_") { TQString groupTalkerID = groupName.mid(7); - if (!talkerIDsList.tqcontains(groupTalkerID)) m_config->deleteGroup(groupName); + if (!talkerIDsList.contains(groupTalkerID)) m_config->deleteGroup(groupName); } } @@ -862,7 +862,7 @@ void KCMKttsMgr::save() if (groupName.left(7) == "Filter_") { TQString groupFilterID = groupName.mid(7); - if (!filterIDsList.tqcontains(groupFilterID)) m_config->deleteGroup(groupName); + if (!filterIDsList.contains(groupFilterID)) m_config->deleteGroup(groupName); } } @@ -1400,7 +1400,7 @@ void KCMKttsMgr::addFilter( bool sbd) { if (item->text(flvcMultiInstance) == "T") { - if (!filterPlugInNames.tqcontains(item->text(flvcPlugInName))) + if (!filterPlugInNames.contains(item->text(flvcPlugInName))) filterPlugInNames.append(item->text(flvcPlugInName)); } item = item->nextSibling(); @@ -2482,9 +2482,9 @@ void KCMKttsMgr::slotNotifyTestButton_clicked() break; case NotifyAction::SpeakCustom: msg = m_kttsmgrw->notifyMsgLineEdit->text(); - msg.tqreplace("%a", i18n("sample application")); - msg.tqreplace("%e", i18n("sample event")); - msg.tqreplace("%m", i18n("sample notification message")); + msg.replace("%a", i18n("sample application")); + msg.replace("%e", i18n("sample event")); + msg.replace("%m", i18n("sample notification message")); break; } if (!msg.isEmpty()) sayMessage(msg, item->text(nlvcTalker)); @@ -2543,7 +2543,7 @@ TQListViewItem* KCMKttsMgr::addNotifyItem( TQString talkerName = talkerCode.getTranslatedDescription(); if (!eventSrcName.isEmpty() && !eventName.isEmpty() && !actionName.isEmpty() && !talkerName.isEmpty()) { - TQListViewItem* parentItem = lv->tqfindItem(eventSrcName, nlvcEventSrcName); + TQListViewItem* parentItem = lv->findItem(eventSrcName, nlvcEventSrcName); if (!parentItem) { item = lv->lastItem(); @@ -2557,7 +2557,7 @@ TQListViewItem* KCMKttsMgr::addNotifyItem( parentItem->setPixmap( nlvcEventSrcName, SmallIcon( iconName ) ); } // No duplicates. - item = lv->tqfindItem( event, nlvcEvent ); + item = lv->findItem( event, nlvcEvent ); if ( !item || item->tqparent() != parentItem ) item = new KListViewItem(parentItem, eventName, actionDisplayName, talkerName, eventSrc, event, actionName, talkerCode.getTalkerCode()); @@ -2599,7 +2599,7 @@ void KCMKttsMgr::slotNotifyAddButton_clicked() int action = NotifyAction::DoNotSpeak; TQString msg; TalkerCode talkerCode; - item = lv->tqfindItem( "default", nlvcEventSrc ); + item = lv->findItem( "default", nlvcEventSrc ); if ( item ) { if ( item->childCount() > 0 ) item = item->firstChild(); diff --git a/kttsd/kcmkttsmgr/selectevent.cpp b/kttsd/kcmkttsmgr/selectevent.cpp index 55a78d7..921d296 100644 --- a/kttsd/kcmkttsmgr/selectevent.cpp +++ b/kttsd/kcmkttsmgr/selectevent.cpp @@ -67,7 +67,7 @@ SelectEvent::SelectEvent(TQWidget* tqparent, const char* name, WFlags fl, const TQString description = config->readEntry( TQString::tqfromLatin1("Comment"), i18n("No description available") ); delete config; - int index = relativePath.tqfind( '/' ); + int index = relativePath.find( '/' ); TQString appname; if ( index >= 0 ) appname = relativePath.left( index ); @@ -136,8 +136,8 @@ TQString SelectEvent::getEvent() // "/opt/kde3/share/apps/kwin/eventsrc" TQString SelectEvent::makeRelative( const TQString& fullPath ) { - int slash = fullPath.tqfindRev( '/' ) - 1; - slash = fullPath.tqfindRev( '/', slash ); + int slash = fullPath.findRev( '/' ) - 1; + slash = fullPath.findRev( '/', slash ); if ( slash < 0 ) return TQString(); diff --git a/kttsd/kttsd/filtermgr.cpp b/kttsd/kttsd/filtermgr.cpp index 0889143..41e521d 100644 --- a/kttsd/kttsd/filtermgr.cpp +++ b/kttsd/kttsd/filtermgr.cpp @@ -116,8 +116,8 @@ bool FilterMgr::init(KConfig *config, const TQString& /*configGroup*/) filterProc->init( config, groupName ); m_filterList.append( filterProc ); } - if (config->readEntry("DocType").tqcontains("html") || - config->readEntry("RootElement").tqcontains("html")) + if (config->readEntry("DocType").contains("html") || + config->readEntry("RootElement").contains("html")) m_supportsHTML = true; } } diff --git a/kttsd/kttsd/kttsd.cpp b/kttsd/kttsd/kttsd.cpp index c546100..211d757 100644 --- a/kttsd/kttsd/kttsd.cpp +++ b/kttsd/kttsd/kttsd.cpp @@ -893,16 +893,16 @@ void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp, TQString msg; TQString talker; // Check for app-specific action. - if ( m_speechData->notifyAppMap.tqcontains( fromApp ) ) + if ( m_speechData->notifyAppMap.contains( fromApp ) ) { NotifyEventMap notifyEventMap = m_speechData->notifyAppMap[ fromApp ]; - if ( notifyEventMap.tqcontains( event ) ) + if ( notifyEventMap.contains( event ) ) { found = true; notifyOptions = notifyEventMap[ event ]; } else { // Check for app-specific default. - if ( notifyEventMap.tqcontains( "default" ) ) + if ( notifyEventMap.contains( "default" ) ) { found = true; notifyOptions = notifyEventMap[ "default" ]; @@ -965,14 +965,14 @@ void KTTSD::notificationSignal( const TQString& event, const TQString& fromApp, break; case NotifyAction::SpeakCustom: msg = notifyOptions.customMsg; - msg.tqreplace( "%a", fromApp ); - msg.tqreplace( "%m", text ); - if ( msg.tqcontains( "%e" ) ) + msg.replace( "%a", fromApp ); + msg.replace( "%m", text ); + if ( msg.contains( "%e" ) ) { if ( notifyOptions.eventName.isEmpty() ) - msg.tqreplace( "%e", NotifyEvent::getEventName( fromApp, event ) ); + msg.replace( "%e", NotifyEvent::getEventName( fromApp, event ) ); else - msg.tqreplace( "%e", notifyOptions.eventName ); + msg.replace( "%e", notifyOptions.eventName ); } break; } diff --git a/kttsd/kttsd/speaker.cpp b/kttsd/kttsd/speaker.cpp index 1434ab9..b38f0a0 100644 --- a/kttsd/kttsd/speaker.cpp +++ b/kttsd/kttsd/speaker.cpp @@ -926,7 +926,7 @@ bool Speaker::isSsml(const TQString &text) } /** - * Determines the initial state of an utterance. If the utterance tqcontains + * Determines the initial state of an utterance. If the utterance contains * SSML, the state is set to usWaitingTransform. Otherwise, if the plugin * supports async synthesis, sets to usWaitingSynth, otherwise usWaitingSay. * If an utterance has already been transformed, usWaitingTransform is diff --git a/kttsd/kttsd/speaker.h b/kttsd/kttsd/speaker.h index 04e2190..9ae1921 100644 --- a/kttsd/kttsd/speaker.h +++ b/kttsd/kttsd/speaker.h @@ -430,7 +430,7 @@ class Speaker : public TQObject{ bool isSsml(const TQString &text); /** - * Determines the initial state of an utterance. If the utterance tqcontains + * Determines the initial state of an utterance. If the utterance contains * SSML, the state is set to usWaitingTransform. Otherwise, if the plugin * supports async synthesis, sets to usWaitingSynth, otherwise usWaitingSay. * If an utterance has already been transformed, usWaitingTransform is diff --git a/kttsd/kttsd/speechdata.cpp b/kttsd/kttsd/speechdata.cpp index e3793a5..acf9d61 100644 --- a/kttsd/kttsd/speechdata.cpp +++ b/kttsd/kttsd/speechdata.cpp @@ -423,24 +423,24 @@ TQStringList SpeechData::parseText(const TQString &text, const TQCString &appId } // See if app has specified a custom sentence delimiter and use it, otherwise use default. TQRegExp sentenceDelimiter; - if (sentenceDelimiters.tqfind(appId) != sentenceDelimiters.end()) + if (sentenceDelimiters.find(appId) != sentenceDelimiters.end()) sentenceDelimiter = TQRegExp(sentenceDelimiters[appId]); else sentenceDelimiter = TQRegExp("([\\.\\?\\!\\:\\;]\\s)|(\\n *\\n)"); TQString temp = text; // Replace spaces, tabs, and formfeeds with a single space. - temp.tqreplace(TQRegExp("[ \\t\\f]+"), " "); + temp.replace(TQRegExp("[ \\t\\f]+"), " "); // Replace sentence delimiters with tab. - temp.tqreplace(sentenceDelimiter, "\\1\t"); + temp.replace(sentenceDelimiter, "\\1\t"); // Replace remaining newlines with spaces. - temp.tqreplace("\n"," "); - temp.tqreplace("\r"," "); + temp.replace("\n"," "); + temp.replace("\r"," "); // Remove leading spaces. - temp.tqreplace(TQRegExp("\\t +"), "\t"); + temp.replace(TQRegExp("\\t +"), "\t"); // Remove trailing spaces. - temp.tqreplace(TQRegExp(" +\\t"), "\t"); + temp.replace(TQRegExp(" +\\t"), "\t"); // Remove blank lines. - temp.tqreplace(TQRegExp("\t\t+"),"\t"); + temp.replace(TQRegExp("\t\t+"),"\t"); // Split into sentences. TQStringList tempList = TQStringList::split("\t", temp, false); @@ -1032,7 +1032,7 @@ void SpeechData::moveTextLater(const uint jobNum) if (job) { // Get index of the job. - uint index = textJobs.tqfindRef(job); + uint index = textJobs.findRef(job); // Move job down one position in the queue. // kdDebug() << "In SpeechData::moveTextLater, moving jobNum " << movedJobNum << endl; if (textJobs.insert(index + 2, job)) textJobs.take(index); @@ -1149,7 +1149,7 @@ void SpeechData::startJobFiltering(mlJob* job, const TQString& text, bool noSBD) // Get TalkerCode structure of closest matching Talker. pooledFilterMgr->talkerCode = m_talkerMgr->talkerToTalkerCode(job->talker); // Pass Sentence Boundary regular expression (if app overrode default); - if (sentenceDelimiters.tqfind(job->appId) != sentenceDelimiters.end()) + if (sentenceDelimiters.find(job->appId) != sentenceDelimiters.end()) pooledFilterMgr->filterMgr->setSbRegExp(sentenceDelimiters[job->appId]); pooledFilterMgr->filterMgr->asyncConvert(text, pooledFilterMgr->talkerCode, job->appId); } diff --git a/kttsd/kttsd/ssmlconvert.cpp b/kttsd/kttsd/ssmlconvert.cpp index 5f37af4..5c8a6b4 100644 --- a/kttsd/kttsd/ssmlconvert.cpp +++ b/kttsd/kttsd/ssmlconvert.cpp @@ -66,10 +66,10 @@ void SSMLConvert::setTalkers(const TQStringList &talkers) { TQString SSMLConvert::extractTalker(const TQString &talkercode) { TQString t = talkercode.section("synthesizer=", 1, 1); t = t.section('"', 1, 1); - if(t.tqcontains("flite")) + if(t.contains("flite")) return "flite"; else - return t.left(t.tqfind(" ")).lower(); + return t.left(t.find(" ")).lower(); } /** @@ -132,7 +132,7 @@ TQString SSMLConvert::appropriateTalker(const TQString &text) const { TQString lang = root.attribute("xml:lang"); kdDebug() << "SSMLConvert::appropriateTalker: xml:lang found (" << lang << ")" << endl; /// If it is set to en*, then match all english speakers. They all sound the same anyways. - if(lang.tqcontains("en-")) { + if(lang.contains("en-")) { kdDebug() << "SSMLConvert::appropriateTalker: English" << endl; lang = "en"; } diff --git a/kttsd/kttsd/talkermgr.cpp b/kttsd/kttsd/talkermgr.cpp index b25929c..4e244fb 100644 --- a/kttsd/kttsd/talkermgr.cpp +++ b/kttsd/kttsd/talkermgr.cpp @@ -205,7 +205,7 @@ int TalkerMgr::talkerToPluginIndex(const TQString& talker) const { // kdDebug() << "TalkerMgr::talkerToPluginIndex: matching talker " << talker << " to closest matching plugin." << endl; // If we have a cached match, return that. - if (m_talkerToPlugInCache.tqcontains(talker)) + if (m_talkerToPlugInCache.contains(talker)) return m_talkerToPlugInCache[talker]; else { @@ -223,7 +223,7 @@ int TalkerMgr::talkerToPluginIndex(const TQString& talker) const * If a plugin has not been loaded to match the talker, returns the default * plugin. * - * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains + * TODO: When picking a talker, %KTTSD will automatically determine if text contains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. @@ -244,7 +244,7 @@ PlugInProc* TalkerMgr::talkerToPlugin(const TQString& talker) const * * The returned TalkerCode is a copy and should be destroyed by caller. * - * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains + * TODO: When picking a talker, %KTTSD will automatically determine if text contains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. @@ -325,7 +325,7 @@ bool TalkerMgr::autoconfigureTalker(const TQString& langCode, KConfig* config) { // See if this plugin supports the desired language. TQStringList languageCodes = offers[i]->property("X-KDE-Languages").toStringList(); - if (languageCodes.tqcontains(languageCode)) + if (languageCodes.contains(languageCode)) { TQString desktopEntryName = offers[i]->desktopEntryName(); diff --git a/kttsd/kttsd/talkermgr.h b/kttsd/kttsd/talkermgr.h index 1028990..2f3ce95 100644 --- a/kttsd/kttsd/talkermgr.h +++ b/kttsd/kttsd/talkermgr.h @@ -95,7 +95,7 @@ public: * * The returned TalkerCode is a copy and should be destroyed by caller. * - * TODO: When picking a talker, %KTTSD will automatically determine if text tqcontains + * TODO: When picking a talker, %KTTSD will automatically determine if text contains * markup and pick a talker that supports that markup, if available. This * overrides all other attributes, i.e, it is treated as an automatic "top priority" * attribute. diff --git a/kttsd/kttsjobmgr/kttsjobmgr.cpp b/kttsd/kttsjobmgr/kttsjobmgr.cpp index 097d594..a9ddb96 100644 --- a/kttsd/kttsjobmgr/kttsjobmgr.cpp +++ b/kttsd/kttsjobmgr/kttsjobmgr.cpp @@ -490,7 +490,7 @@ void KttsJobMgrPart::slot_job_change_talker() { TQString talkerID = item->text(jlvcTalkerID); TQStringList talkerIDs = m_talkerCodesToTalkerIDs.values(); - int ndx = talkerIDs.tqfindIndex(talkerID); + int ndx = talkerIDs.findIndex(talkerID); TQString talkerCode; if (ndx >= 0) talkerCode = m_talkerCodesToTalkerIDs.keys()[ndx]; SelectTalkerDlg dlg(widget(), "selecttalkerdialog", i18n("Select Talker"), talkerCode, true); @@ -632,7 +632,7 @@ int KttsJobMgrPart::getCurrentJobPartCount() */ TQListViewItem* KttsJobMgrPart::findItemByJobNum(const uint jobNum) { - return m_jobListView->tqfindItem(TQString::number(jobNum), jlvcJobNum); + return m_jobListView->findItem(TQString::number(jobNum), jlvcJobNum); } /** @@ -746,7 +746,7 @@ void KttsJobMgrPart::autoSelectInJobListView() TQString KttsJobMgrPart::cachedTalkerCodeToTalkerID(const TQString& talkerCode) { // If in the cache, return that. - if (m_talkerCodesToTalkerIDs.tqcontains(talkerCode)) + if (m_talkerCodesToTalkerIDs.contains(talkerCode)) return m_talkerCodesToTalkerIDs[talkerCode]; else { diff --git a/kttsd/libkttsd/notify.cpp b/kttsd/libkttsd/notify.cpp index f21f813..a226675 100644 --- a/kttsd/libkttsd/notify.cpp +++ b/kttsd/libkttsd/notify.cpp @@ -68,7 +68,7 @@ static void notifyaction_init() /*static*/ int NotifyAction::action( const TQString& actionName ) { notifyaction_init(); - return s_actionNames->tqfindIndex( actionName ); + return s_actionNames->findIndex( actionName ); } /*static*/ TQString NotifyAction::actionDisplayName( const int action ) @@ -126,7 +126,7 @@ static void notifypresent_init() /*static*/ int NotifyPresent::present( const TQString& presentName ) { notifypresent_init(); - return s_presentNames->tqfindIndex( presentName ); + return s_presentNames->findIndex( presentName ); } /*static*/ TQString NotifyPresent::presentDisplayName( const int present ) diff --git a/kttsd/libkttsd/talkercode.cpp b/kttsd/libkttsd/talkercode.cpp index 2b3fbcf..53be627 100644 --- a/kttsd/libkttsd/talkercode.cpp +++ b/kttsd/libkttsd/talkercode.cpp @@ -304,7 +304,7 @@ void TalkerCode::normalize() void TalkerCode::parseTalkerCode(const TQString &talkerCode) { TQString fullLanguageCode; - if (talkerCode.tqcontains("\"")) + if (talkerCode.contains("\"")) { fullLanguageCode = talkerCode.section("lang=", 1, 1); fullLanguageCode = fullLanguageCode.section('"', 1, 1); diff --git a/kttsd/libkttsd/utils.cpp b/kttsd/libkttsd/utils.cpp index df24e35..57bfe18 100644 --- a/kttsd/libkttsd/utils.cpp +++ b/kttsd/libkttsd/utils.cpp @@ -41,7 +41,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa if(doc.startsWith("<?xml")) { // Look for ?> and strip everything off from there to the start - effectively removing // <?xml...?> - int xmlStatementEnd = doc.tqfind("?>"); + int xmlStatementEnd = doc.find("?>"); if(xmlStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -51,7 +51,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa } // Take off leading comments, if they exist. while(doc.startsWith("<!--") || doc.startsWith(" <!--")) { - int commentStatementEnd = doc.tqfind("-->"); + int commentStatementEnd = doc.find("-->"); if(commentStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -61,7 +61,7 @@ bool KttsUtils::hasRootElement(const TQString &xmldoc, const TQString &elementNa } // Take off the doctype statement if it exists. while(doc.startsWith("<!DOCTYPE") || doc.startsWith(" <!DOCTYPE")) { - int doctypeStatementEnd = doc.tqfind(">"); + int doctypeStatementEnd = doc.find(">"); if(doctypeStatementEnd == -1) { kdDebug() << "KttsUtils::hasRootElement: Bad XML file syntax\n"; return false; @@ -88,7 +88,7 @@ bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const if(doc.startsWith("<?xml")) { // Look for ?> and strip everything off from there to the start - effectively removing // <?xml...?> - int xmlStatementEnd = doc.tqfind("?>"); + int xmlStatementEnd = doc.find("?>"); if(xmlStatementEnd == -1) { kdDebug() << "KttsUtils::hasDoctype: Bad XML file syntax\n"; return false; @@ -99,7 +99,7 @@ bool KttsUtils::hasDoctype(const TQString &xmldoc, const TQString &name/*, const } // Take off leading comments, if they exist. while(doc.startsWith("<!--")) { - int commentStatementEnd = doc.tqfind("-->"); + int commentStatementEnd = doc.find("-->"); if(commentStatementEnd == -1) { kdDebug() << "KttsUtils::hasDoctype: Bad XML file syntax\n"; return false; diff --git a/kttsd/plugins/command/commandconf.cpp b/kttsd/plugins/command/commandconf.cpp index 5c4605f..968c20d 100644 --- a/kttsd/plugins/command/commandconf.cpp +++ b/kttsd/plugins/command/commandconf.cpp @@ -121,7 +121,7 @@ TQString CommandConf::getTalkerCode() { // Must contain either text or file parameter, or StdIn checkbox must be checked, // otherwise, does nothing! - if ((url.tqcontains("%t") > 0) || (url.tqcontains("%f") > 0) || m_widget->stdInButton->isChecked()) + if ((url.contains("%t") > 0) || (url.contains("%f") > 0) || m_widget->stdInButton->isChecked()) { return TQString( "<voice lang=\"%1\" name=\"%2\" gender=\"%3\" />" diff --git a/kttsd/plugins/command/commandproc.cpp b/kttsd/plugins/command/commandproc.cpp index 8f8c500..d8b35d2 100644 --- a/kttsd/plugins/command/commandproc.cpp +++ b/kttsd/plugins/command/commandproc.cpp @@ -72,8 +72,8 @@ bool CommandProc::init(KConfig *config, const TQString &configGroup){ m_stdin = config->readBoolEntry("StdIn", true); m_language = config->readEntry("LanguageCode", "en"); - // Support separate synthesis if the TTS command tqcontains %w macro. - m_supportsSynth = (m_ttsCommand.tqcontains("%w")); + // Support separate synthesis if the TTS command contains %w macro. + m_supportsSynth = (m_ttsCommand.contains("%w")); TQString codecString = config->readEntry("Codec", "Local"); m_codec = codecNameToCodec(codecString); @@ -147,7 +147,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile TQString escText = KShellProcess::quote(text); // 1.c) create a temporary file for the text, if %f macro is used. - if (command.tqcontains("%f")) + if (command.contains("%f")) { KTempFile tempFile(locateLocal("tmp", "commandplugin-"), ".txt"); TQTextStream* fs = tempFile.textStream(); @@ -162,7 +162,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile TQValueStack<bool> stack; bool issinglequote=false; bool isdoublequote=false; - int notqreplace=0; + int noreplace=0; TQRegExp re_noquote("(\"|'|\\\\|`|\\$\\(|\\$\\{|\\(|\\{|\\)|\\}|%%|%t|%f|%l|%w)"); TQRegExp re_singlequote("('|%%|%t|%f|%l|%w)"); TQRegExp re_doublequote("(\"|\\\\|`|\\$\\(|\\$\\{|%%|%t|%f|%l|%w)"); @@ -178,18 +178,18 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile { // assert(isdoublequote == false) stack.push(isdoublequote); - if (notqreplace > 0) + if (noreplace > 0) // count nested braces when within ${...} - notqreplace++; + noreplace++; i++; } else if (command[i]=='$') { stack.push(isdoublequote); isdoublequote = false; - if ((notqreplace > 0) || (command[i+1]=='{')) + if ((noreplace > 0) || (command[i+1]=='{')) // count nested braces when within ${...} - notqreplace++; + noreplace++; i+=2; } else if ((command[i]==')') || (command[i]=='}')) @@ -199,9 +199,9 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile isdoublequote = stack.pop(); else qWarning("Parse error."); - if (notqreplace > 0) + if (noreplace > 0) // count nested braces when within ${...} - notqreplace--; + noreplace--; i++; } else if (command[i]=='\'') @@ -219,7 +219,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile else if (command[i]=='`') { // Replace all `...` with safer $(...) - command.tqreplace (i, 1, "$("); + command.replace (i, 1, "$("); TQRegExp re_backticks("(`|\\\\`|\\\\\\\\|\\\\\\$)"); for ( int i2=re_backticks.search(command,i+2); i2!=-1; @@ -228,7 +228,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile { if (command[i2] == '`') { - command.tqreplace (i2, 1, ")"); + command.replace (i2, 1, ")"); i2=command.length(); // leave loop } else @@ -239,7 +239,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile } // Leave i unchanged! We need to process "$(" } - else if (notqreplace == 0) // do not replace macros within ${...} + else if (noreplace == 0) // do not replace macros within ${...} { TQString match, v; @@ -269,7 +269,7 @@ void CommandProc::synth(const TQString& inputText, const TQString& suggestedFile else if (issinglequote) v="'"+v+"'"; - command.tqreplace (i, match.length(), v); + command.replace (i, match.length(), v); i+=v.length(); } else diff --git a/kttsd/plugins/festivalint/festivalintproc.cpp b/kttsd/plugins/festivalint/festivalintproc.cpp index 2b4aea3..bc37d1e 100644 --- a/kttsd/plugins/festivalint/festivalintproc.cpp +++ b/kttsd/plugins/festivalint/festivalintproc.cpp @@ -257,7 +257,7 @@ void FestivalIntProc::synth( // If we just started Festival, or rate changed, tell festival. if (m_runningTime != time) { TQString timeMsg; - if (voiceCode.tqcontains("_hts") > 0) + if (voiceCode.contains("_hts") > 0) { // Map 50% to 200% onto 0 to 1000. // slider = alpha * (log(percent)-log(50)) @@ -304,14 +304,14 @@ void FestivalIntProc::synth( int len = saidText.length(); while (len > c_tooLong) { - len = saidText.tqfindRev(", ", len - (c_tooLong * 2 / 3), true); + len = saidText.findRev(", ", len - (c_tooLong * 2 / 3), true); if (len != -1) { TQString c = saidText.mid(len+2, 1); if (c != c.upper()) { - saidText.tqreplace(len, 2, ". "); - saidText.tqreplace(len+2, 1, c.upper()); + saidText.replace(len, 2, ". "); + saidText.replace(len+2, 1, c.upper()); kdDebug() << "FestivalIntProc::synth: Splitting long sentence at " << len << endl; // kdDebug() << saidText << endl; } @@ -319,11 +319,11 @@ void FestivalIntProc::synth( } // Encode quotation characters. - saidText.tqreplace("\\\"", "#!#!"); - saidText.tqreplace("\"", "\\\""); - saidText.tqreplace("#!#!", "\\\""); + saidText.replace("\\\"", "#!#!"); + saidText.replace("\"", "\\\""); + saidText.replace("#!#!", "\\\""); // Remove certain comment characters. - saidText.tqreplace("--", ""); + saidText.replace("--", ""); // Ok, let's rock. if (synthFilename.isNull()) @@ -502,7 +502,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) { TQString buf = TQString::tqfromLatin1(buffer, buflen); // kdDebug() << "FestivalIntProc::slotReceivedStdout: Received from Festival: " << buf << endl; - bool promptSeen = (buf.tqcontains("festival>") > 0); + bool promptSeen = (buf.contains("festival>") > 0); bool emitQueryVoicesFinished = false; TQStringList voiceCodesList; if (m_waitingQueryVoices && m_outputQueue.isEmpty()) @@ -515,7 +515,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) } else { if (buf.left(1) == "(") { - int rightParen = buf.tqfind(')'); + int rightParen = buf.find(')'); if (rightParen > 0) { m_waitingQueryVoices = false; @@ -562,7 +562,7 @@ void FestivalIntProc::slotReceivedStdout(KProcess*, char* buffer, int buflen) if (emitQueryVoicesFinished) { // kdDebug() << "FestivalIntProc::slotReceivedStdout: emitting queryVoicesFinished" << endl; - m_supportsSSML = (voiceCodesList.tqcontains("rab_diphone")) ? ssYes : ssNo; + m_supportsSSML = (voiceCodesList.contains("rab_diphone")) ? ssYes : ssNo; emit queryVoicesFinished(voiceCodesList); } } diff --git a/kttsd/plugins/flite/fliteproc.cpp b/kttsd/plugins/flite/fliteproc.cpp index b71efef..e8185d5 100644 --- a/kttsd/plugins/flite/fliteproc.cpp +++ b/kttsd/plugins/flite/fliteproc.cpp @@ -129,11 +129,11 @@ void FliteProc::synth( // Encode quotation characters. TQString saidText = text; /* - saidText.tqreplace("\\\"", "#!#!"); - saidText.tqreplace("\"", "\\\""); - saidText.tqreplace("#!#!", "\\\""); + saidText.replace("\\\"", "#!#!"); + saidText.replace("\"", "\\\""); + saidText.replace("#!#!", "\\\""); // Remove certain comment characters. - saidText.tqreplace("--", ""); + saidText.replace("--", ""); saidText = "\"" + saidText + "\""; */ saidText += "\n"; diff --git a/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl b/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl index afa9b43..5a81c8f 100644 --- a/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl +++ b/kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl @@ -113,7 +113,7 @@ </xsl:variable> <!-- Look for first period and space and extract corresponding substring from original. --> <xsl:choose> - <xsl:when test="tqcontains($tmp, '. ')"> + <xsl:when test="contains($tmp, '. ')"> <xsl:value-of select="substring($paragraph, 1, string-length(substring-before($tmp, '. '))+2)"/> </xsl:when> <xsl:otherwise> diff --git a/kttsd/plugins/hadifix/hadifixconfigui.ui.h b/kttsd/plugins/hadifix/hadifixconfigui.ui.h index cc6632c..ff9d381 100644 --- a/kttsd/plugins/hadifix/hadifixconfigui.ui.h +++ b/kttsd/plugins/hadifix/hadifixconfigui.ui.h @@ -53,14 +53,14 @@ void HadifixConfigUI::init () { void HadifixConfigUI::addVoice (const TQString &filename, bool isMale) { if (isMale) { - if (!maleVoices.tqcontains(filename)) { + if (!maleVoices.contains(filename)) { int id = voiceCombo->count(); maleVoices.insert (filename, id); voiceCombo->insertItem (male, filename, id); } } else { - if (!femaleVoices.tqcontains(filename)) { + if (!femaleVoices.contains(filename)) { int id = voiceCombo->count(); femaleVoices.insert (filename, id); voiceCombo->insertItem (female, filename, id); @@ -93,7 +93,7 @@ TQString HadifixConfigUI::getVoiceFilename() { int curr = voiceCombo->currentItem(); TQString filename = voiceCombo->text(curr); - if (defaultVoices.tqcontains(curr)) + if (defaultVoices.contains(curr)) filename = defaultVoices[curr]; return filename; @@ -103,7 +103,7 @@ bool HadifixConfigUI::isMaleVoice() { int curr = voiceCombo->currentItem(); TQString filename = getVoiceFilename(); - if (maleVoices.tqcontains(filename)) + if (maleVoices.contains(filename)) return maleVoices[filename] == curr; else return false; diff --git a/kttsd/plugins/hadifix/hadifixproc.cpp b/kttsd/plugins/hadifix/hadifixproc.cpp index 3e4b4ee..ad2cf21 100644 --- a/kttsd/plugins/hadifix/hadifixproc.cpp +++ b/kttsd/plugins/hadifix/hadifixproc.cpp @@ -377,9 +377,9 @@ HadifixProc::VoiceGender HadifixProc::determineGender(TQString mbrola, TQString else { if (output != 0) *output = speech.stdOut; - if (speech.stdOut.tqcontains("female", false)) + if (speech.stdOut.contains("female", false)) result = FemaleGender; - else if (speech.stdOut.tqcontains("male", false)) + else if (speech.stdOut.contains("male", false)) result = MaleGender; else result = NoGender; diff --git a/kttsd/plugins/hadifix/initialconfig.h b/kttsd/plugins/hadifix/initialconfig.h index 62ff659..1db8eb2 100644 --- a/kttsd/plugins/hadifix/initialconfig.h +++ b/kttsd/plugins/hadifix/initialconfig.h @@ -100,7 +100,7 @@ TQStringList findVoices(TQString mbrolaExec, const TQString &hadifixDataPath) { // 2b) search near the hadifix data path info.setFile(hadifixDataPath + "../../mbrola"); TQString mbrolaPath = info.dirPath (true) + "/mbrola"; - if (!list.tqcontains(mbrolaPath)) + if (!list.contains(mbrolaPath)) list += mbrolaPath; // 2c) broaden the search by adding subdirs (with a depth of 2) |