summaryrefslogtreecommitdiffstats
path: root/src
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
commit6224b01d20b07f221e84236067669a5597e09d4e (patch)
tree9c79652fa56a5399e56849bd9071f7bb79beb2d7 /src
parent6b54f83eebca9b8e9af2344cee6559029c9d9953 (diff)
downloadknutclient-6224b01d20b07f221e84236067669a5597e09d4e.tar.gz
knutclient-6224b01d20b07f221e84236067669a5597e09d4e.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/knutclient@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src')
-rw-r--r--src/knutanalog.cpp2
-rwxr-xr-xsrc/knutclient.cpp2
-rwxr-xr-xsrc/knutnet.cpp40
-rw-r--r--src/knutprintupsvar.cpp2
4 files changed, 23 insertions, 23 deletions
diff --git a/src/knutanalog.cpp b/src/knutanalog.cpp
index c894768..5c5234d 100644
--- a/src/knutanalog.cpp
+++ b/src/knutanalog.cpp
@@ -829,7 +829,7 @@ void KNutAnalog::paintText ( TQPainter *paint ) {
int index;
if (m_inscription.length() >1) {
- if ((index = m_inscription.tqfind(" ")) != -1) {
+ if ((index = m_inscription.find(" ")) != -1) {
// mezera nalezena space found
nadpis1 = m_inscription.left(index);
nadpis2 = m_inscription.mid(index+1,(uint)(m_inscription.length() - index - 1));
diff --git a/src/knutclient.cpp b/src/knutclient.cpp
index b146e0e..54c0b52 100755
--- a/src/knutclient.cpp
+++ b/src/knutclient.cpp
@@ -401,7 +401,7 @@ void KNutClient::initVars (void) {
// only for backwards compatibility with older release then 0.7
if (upsData.upsAddress.isEmpty()) {
int charPos;
- if ((charPos=upsData.upsName.tqfind('@')) == -1) {
+ if ((charPos=upsData.upsName.find('@')) == -1) {
upsData.upsAddress=upsData.upsName;
upsData.upsName="";
}
diff --git a/src/knutnet.cpp b/src/knutnet.cpp
index 50d9f5c..bfb2f49 100755
--- a/src/knutnet.cpp
+++ b/src/knutnet.cpp
@@ -528,12 +528,12 @@ int KNutNet::version (int countRepeat, const int delay) {
outBuffer=outBuffer.stripWhiteSpace ();
if (outBuffer.length() > 0) {
- outBuffer = outBuffer.mid(outBuffer.tqfind("upsd")+4);
- int n = outBuffer.tqfind(".");
+ outBuffer = outBuffer.mid(outBuffer.find("upsd")+4);
+ int n = outBuffer.find(".");
if (n > 0) {
TQString firstNumber= outBuffer.left(n);
TQString secondNumber= outBuffer.mid(n+1);
- int n = secondNumber.tqfind(".");
+ int n = secondNumber.find(".");
if (n > 0) {
bool ok;
secondNumber = secondNumber.left(n);
@@ -637,7 +637,7 @@ TQString KNutNet::parseValue (const TQString line) {
if (line.isEmpty()) return "";
if (line[0] != "\"") {
- if ((m_posChar=line.tqfind(' ')) == -1) return line;
+ if ((m_posChar=line.find(' ')) == -1) return line;
else return line.left(m_posChar+1);
}
else {
@@ -676,7 +676,7 @@ int KNutNet::parseTypeValue (TQString line, int& lenString ) {
inputStream >> word;
if (word == "RW") ret += RW_FLAG;
if (word == "ENUM") ret += ENUM_FLAG;
- if (word.tqfind("STRING:") != -1) {
+ if (word.find("STRING:") != -1) {
word = word.mid(7);
ret += STRING_FLAG;
lenString = word.toInt();
@@ -700,7 +700,7 @@ int KNutNet::parseLine(TQString& line, TQString& upsName ,TQString& varName, TQS
if (line.isEmpty()) return NONE;
- if ((posChar=line.tqfind(' ')) == -1) {
+ if ((posChar=line.find(' ')) == -1) {
if (setKey(line) == OK) return OK;
else return NONE;
}
@@ -718,7 +718,7 @@ int KNutNet::parseLine(TQString& line, TQString& upsName ,TQString& varName, TQS
value = parseValue(line);
return key1;
default:
- if ((posChar=line.tqfind(' ')) == -1) return NONE;
+ if ((posChar=line.find(' ')) == -1) return NONE;
word2 = line.left(posChar);
key2 = setKey( word2);
line = line.mid(posChar+1);
@@ -740,7 +740,7 @@ int KNutNet::parseLine(TQString& line, TQString& upsName ,TQString& varName, TQS
return key1;
}
- if ((posChar=line.tqfind(' ')) == -1) return NONE;
+ if ((posChar=line.find(' ')) == -1) return NONE;
word3 = line.left(posChar);
key3 = setKey( word3);
@@ -787,7 +787,7 @@ int KNutNet::parseLine(TQString& line, TQString& upsName ,TQString& varName, TQS
return BEGIN_LIST_CMD;
}
if (key3 == ENUM) {
- if ((posChar=line.tqfind(' ')) == -1) return NONE;
+ if ((posChar=line.find(' ')) == -1) return NONE;
upsName = line.left(posChar);
line=line.mid(posChar+1);
varName = line.stripWhiteSpace();
@@ -809,7 +809,7 @@ int KNutNet::parseLine(TQString& line, TQString& upsName ,TQString& varName, TQS
return END_LIST_CMD;
}
if (key3 == ENUM) {
- if ((posChar=line.tqfind(' ')) == -1) return NONE;
+ if ((posChar=line.find(' ')) == -1) return NONE;
upsName = line.left(posChar);
line=line.mid(posChar+1);
varName = line.stripWhiteSpace();
@@ -831,18 +831,18 @@ int KNutNet::newDescription (const TQCString inBuffer, TQString& upsDescription
outBuffer=outBuffer.stripWhiteSpace ();
TQString word1, word2, word3;
- if ((m_posChar = outBuffer.tqfind(' ')) == -1)
+ if ((m_posChar = outBuffer.find(' ')) == -1)
word1 = outBuffer;
else {
word1 = outBuffer.left(m_posChar);
word2 = outBuffer.mid(m_posChar+1);
}
if (word1 == "DESC") {
- if ((m_posChar = word2.tqfind('\"')) == -1) word3="";
+ if ((m_posChar = word2.find('\"')) == -1) word3="";
else
{
word3 = word2.mid(m_posChar+1);
- if ((m_posChar = word3.tqfind('\"')) != -1) word3=word3.left(m_posChar);
+ if ((m_posChar = word3.find('\"')) != -1) word3=word3.left(m_posChar);
}
if (!word3.isEmpty()) upsDescription=word3;
}
@@ -920,14 +920,14 @@ int KNutNet::getUpsData (const TQCString sBuffer, TQString& rBuffer, const TQCSt
rBuffer.append(recvBuffer.data()); // adds reading data to main input buffer
if (endString.isEmpty()) endRecv = false;
else {
- if (recvBuffer.tqfindRev(endString.data()) == -1) {
+ if (recvBuffer.findRev(endString.data()) == -1) {
//doesn't find right end of input data
if (m_commandSocket->bytesAvailable() == 0) m_commandSocket->waitForMore(1000);
if (m_commandSocket->bytesAvailable() > 0) endRecv=true; // makes other cyckle og while
else endRecv=false;
}
//finds right end of input data
- else endRecv = false; // we have found what we want to tqfind
+ else endRecv = false; // we have found what we want to find
}
} while (endRecv);
return 0; // all is OK
@@ -1287,14 +1287,14 @@ int KNutNet::getUpsVars1 ( void) {
while (!(inLine = varInputStream.readLine()).isNull()) {
inLine=inLine.stripWhiteSpace();
- if ((m_posChar=inLine.tqfind(' ')) == -1) word1=inLine;
+ if ((m_posChar=inLine.find(' ')) == -1) word1=inLine;
else {
word1=inLine.left(m_posChar);
inLine = inLine.mid(m_posChar+1);
}
if (word1.isEmpty()) { m_error = UnknownFormat; return m_error; }
if (inCountLine == 1) {
- if ((m_posChar=inLine.tqfind(' ')) == -1) word2=inLine;
+ if ((m_posChar=inLine.find(' ')) == -1) word2=inLine;
else word2=inLine.left(m_posChar);
if (word1 =="ENUM") {
if (word2 != word) { m_error = UnknownFormat; return m_error; }
@@ -1313,10 +1313,10 @@ int KNutNet::getUpsVars1 ( void) {
else {
if (word1 == "END") break;
if (word1 != "OPTION") { m_error = UnknownFormat; return m_error; }
- if ((m_posChar = inLine.tqfind('\"')) == -1) word2 = "";
+ if ((m_posChar = inLine.find('\"')) == -1) word2 = "";
else {
word2 = inLine.mid(m_posChar+1);
- if ((m_posChar=word2.tqfind('\"')) != -1) word2 = word2.left(m_posChar);
+ if ((m_posChar=word2.find('\"')) != -1) word2 = word2.left(m_posChar);
}
enumString->push_back(word2);
varMax++;
@@ -1604,7 +1604,7 @@ int KNutNet::getUpsValues1 (const bool allVars ) {// allVars = true vse; allVars
if (word1 == "ANS") {
// answer - odpoved
// odstranime pripadne jmeno upsky
- if ((m_posChar = word2.tqfind('@')) != -1) word2 = word2.left(m_posChar);
+ if ((m_posChar = word2.find('@')) != -1) word2 = word2.left(m_posChar);
if ( word2 != (*it).upsVarName ) {
m_error=UnknownAnswer;
return m_error;// neni to odpoved na spravnou promennou
diff --git a/src/knutprintupsvar.cpp b/src/knutprintupsvar.cpp
index 7a38c2f..36e5a92 100644
--- a/src/knutprintupsvar.cpp
+++ b/src/knutprintupsvar.cpp
@@ -171,7 +171,7 @@ void KNutPrintUpsVar::slotReloadVars (void) {
myListItem = table;
do {
- n = varName.tqfind(".");
+ n = varName.find(".");
if (n > 0) {
left = varName.left(n);
varName = varName.mid(n+1);