summaryrefslogtreecommitdiffstats
path: root/kmouth/speech.cpp
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 /kmouth/speech.cpp
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 'kmouth/speech.cpp')
-rw-r--r--kmouth/speech.cpp22
1 files changed, 11 insertions, 11 deletions
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();
}
}