summaryrefslogtreecommitdiffstats
path: root/kttsd
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commita53c68f02a359d234dee62dfa3bdd12bb17b13b5 (patch)
tree5a800b73c31a1a1251ab533dc614b521f1378ce3 /kttsd
parent389971def351e67fcf01c3dbe6b83c4d721dd755 (diff)
downloadtdeaccessibility-a53c68f02a359d234dee62dfa3bdd12bb17b13b5.tar.gz
tdeaccessibility-a53c68f02a359d234dee62dfa3bdd12bb17b13b5.zip
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
Diffstat (limited to 'kttsd')
-rw-r--r--kttsd/compat/interfaces/kspeech/kspeech.h4
-rw-r--r--kttsd/filters/main.cpp4
-rw-r--r--kttsd/filters/sbd/sbdconf.cpp4
-rw-r--r--kttsd/filters/sbd/sbdconfwidget.ui2
-rw-r--r--kttsd/filters/sbd/sbdproc.cpp38
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconf.cpp12
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerconfwidget.ui2
-rw-r--r--kttsd/filters/stringreplacer/stringreplacerproc.cpp8
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconf.cpp2
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserconfwidget.ui4
-rw-r--r--kttsd/filters/talkerchooser/talkerchooserproc.cpp4
-rw-r--r--kttsd/filters/xhtml2ssml/Doxyfile2
-rw-r--r--kttsd/filters/xhtml2ssml/xhtml2ssml.cpp2
-rw-r--r--kttsd/filters/xmltransformer/xhtml2ssml_simple.xsl8
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconf.cpp2
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerconfwidget.ui2
-rw-r--r--kttsd/filters/xmltransformer/xmltransformerproc.cpp4
-rw-r--r--kttsd/kcmkttsmgr/addtalker.cpp4
-rw-r--r--kttsd/kcmkttsmgr/kcmkttsmgr.cpp22
-rw-r--r--kttsd/kcmkttsmgr/selectevent.cpp6
-rw-r--r--kttsd/kttsd/filtermgr.cpp4
-rw-r--r--kttsd/kttsd/kttsd.cpp16
-rw-r--r--kttsd/kttsd/speaker.cpp2
-rw-r--r--kttsd/kttsd/speaker.h2
-rw-r--r--kttsd/kttsd/speechdata.cpp20
-rw-r--r--kttsd/kttsd/ssmlconvert.cpp6
-rw-r--r--kttsd/kttsd/talkermgr.cpp8
-rw-r--r--kttsd/kttsd/talkermgr.h2
-rw-r--r--kttsd/kttsjobmgr/kttsjobmgr.cpp6
-rw-r--r--kttsd/libkttsd/notify.cpp4
-rw-r--r--kttsd/libkttsd/talkercode.cpp2
-rw-r--r--kttsd/libkttsd/utils.cpp10
-rw-r--r--kttsd/plugins/command/commandconf.cpp2
-rw-r--r--kttsd/plugins/command/commandproc.cpp28
-rw-r--r--kttsd/plugins/festivalint/festivalintproc.cpp22
-rw-r--r--kttsd/plugins/flite/fliteproc.cpp8
-rw-r--r--kttsd/plugins/hadifix/SSMLtoTxt2pho.xsl2
-rw-r--r--kttsd/plugins/hadifix/hadifixconfigui.ui.h8
-rw-r--r--kttsd/plugins/hadifix/hadifixproc.cpp4
-rw-r--r--kttsd/plugins/hadifix/initialconfig.h2
40 files changed, 147 insertions, 147 deletions
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 &amp;ID tqcontains:</string>
+ <string>Application &amp;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;)"), "&amp;");
- newText.tqreplace(TQRegExp("<(?!lt;)"), "&lt;");
+ newText.replace(TQRegExp("&(?!amp;)"), "&amp;");
+ newText.replace(TQRegExp("<(?!lt;)"), "&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 &amp;ID tqcontains:</string>
+ <string>Application &amp;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&amp;xt tqcontains:</string>
+ <string>Te&amp;xt contains:</string>
</property>
<property name="tqalignment">
<set>AlignVCenter|AlignRight</set>
@@ -102,7 +102,7 @@
<cstring>appIdLabel</cstring>
</property>
<property name="text">
- <string>Application &amp;ID tqcontains:</string>
+ <string>Application &amp;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 &amp;ID tqcontains:</string>
+ <string>and Application &amp;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;)"),"&amp;");
+ text.replace(TQRegExp("&(?!amp;)"),"&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)