summaryrefslogtreecommitdiffstats
path: root/kttsd/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/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/kttsd')
-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
8 files changed, 30 insertions, 30 deletions
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.