From a53c68f02a359d234dee62dfa3bdd12bb17b13b5 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaccessibility@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kttsd/filters/sbd/sbdconf.cpp | 4 ++-- kttsd/filters/sbd/sbdconfwidget.ui | 2 +- kttsd/filters/sbd/sbdproc.cpp | 38 +++++++++++++++++++------------------- 3 files changed, 22 insertions(+), 22 deletions(-) (limited to 'kttsd/filters/sbd') 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 @@ appIdLabel - Application &ID tqcontains: + Application &ID contains: AlignVCenter|AlignRight 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 += ""; if ( !p.isEmpty() ) s += ""; @@ -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; -- cgit v1.2.1