summaryrefslogtreecommitdiffstats
path: root/kioslave/sftp/ksshprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kioslave/sftp/ksshprocess.cpp')
-rw-r--r--kioslave/sftp/ksshprocess.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp
index 6dfdb2419..ac425212d 100644
--- a/kioslave/sftp/ksshprocess.cpp
+++ b/kioslave/sftp/ksshprocess.cpp
@@ -266,7 +266,7 @@ KSshProcess::SshVersion KSshProcess::version() {
mVersion = UNKNOWN_VER;
for(int i = 0; i < SSH_VER_MAX; i++) {
- if( ver.tqfind(versionStrs[i]) != -1 ) {
+ if( ver.find(versionStrs[i]) != -1 ) {
mVersion = (SshVersion)i;
break;
}
@@ -380,8 +380,8 @@ bool KSshProcess::setOptions(const SshOptList& opts) {
// since KSshProcess depends on specific setting of these for
// preforming authentication correctly.
tmp = (*it).str.latin1();
- if( tmp.tqcontains("NumberOfPasswordPrompts") ||
- tmp.tqcontains("StrictHostKeyChecking") ) {
+ if( tmp.contains("NumberOfPasswordPrompts") ||
+ tmp.contains("StrictHostKeyChecking") ) {
mError = ERR_INVALID_OPT;
return false;
}
@@ -776,26 +776,26 @@ bool KSshProcess::connect() {
i18n("Error encountered while talking to ssh.");
mConnectState = STATE_FATAL;
}
- else if( line.tqfind(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) {
+ else if( line.find(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) {
mConnectState = STATE_TRY_PASSWD;
}
- else if( line.tqfind(passphrasePrompt[mVersion]) != -1 ) {
+ else if( line.find(passphrasePrompt[mVersion]) != -1 ) {
mConnectState = STATE_TRY_PASSPHRASE;
}
- else if( line.tqfind(authSuccessMsg[mVersion]) != -1 ) {
+ else if( line.find(authSuccessMsg[mVersion]) != -1 ) {
return true;
}
- else if( line.tqfind(authFailedMsg[mVersion]) != -1
- && line.tqfind(tryAgainMsg[mVersion]) == -1 ) {
+ else if( line.find(authFailedMsg[mVersion]) != -1
+ && line.find(tryAgainMsg[mVersion]) == -1 ) {
mConnectState = STATE_AUTH_FAILED;
}
- else if( line.tqfind(hostKeyMissingMsg[mVersion]) != -1 ) {
+ else if( line.find(hostKeyMissingMsg[mVersion]) != -1 ) {
mConnectState = STATE_NEW_KEY_WAIT_CONTINUE;
}
- else if( line.tqfind(hostKeyChangedMsg[mVersion]) != -1 ) {
+ else if( line.find(hostKeyChangedMsg[mVersion]) != -1 ) {
mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE;
}
- else if( line.tqfind(continuePrompt[mVersion]) != -1 ) {
+ else if( line.find(continuePrompt[mVersion]) != -1 ) {
//mConnectState = STATE_SEND_CONTINUE;
kdDebug(KSSHPROC) << "KSshProcess:connect(): "
"Got continue prompt where we shouldn't (STATE_WAIT_PROMPT)"
@@ -804,12 +804,12 @@ bool KSshProcess::connect() {
mErrorMsg =
i18n("Error encountered while talking to ssh.");
}
- else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) {
+ else if( line.find(connectionClosedMsg[mVersion]) != -1 ) {
mConnectState = STATE_FATAL;
mError = ERR_CLOSED_BY_REMOTE_HOST;
mErrorMsg = i18n("Connection closed by remote host.");
}
- else if( line.tqfind(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) {
+ else if( line.find(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) {
// always say yes to this. It always comes after commerical ssh
// prints a "continue to connect prompt". We assume that if the
// user choose to continue, then they also want to save the
@@ -924,9 +924,9 @@ bool KSshProcess::connect() {
i18n("Error encountered while talking to ssh.");
mConnectState = STATE_FATAL;
}
- else if( (line.tqfind(authFailedMsg[mVersion]) != -1
- && line.tqfind(tryAgainMsg[mVersion]) == -1)
- || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) {
+ else if( (line.find(authFailedMsg[mVersion]) != -1
+ && line.find(tryAgainMsg[mVersion]) == -1)
+ || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) {
mError = ERR_AUTH_FAILED_NEW_KEY;
mErrorMsg = i18n(
"The identity of the remote host '%1' could not be verified "
@@ -948,15 +948,15 @@ bool KSshProcess::connect() {
mConnectState = STATE_FATAL;
}
- else if( line.tqfind(continuePrompt[mVersion]) != -1 ) {
+ else if( line.find(continuePrompt[mVersion]) != -1 ) {
mConnectState = STATE_NEW_KEY_CONTINUE;
}
- else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) {
+ else if( line.find(connectionClosedMsg[mVersion]) != -1 ) {
mConnectState = STATE_FATAL;
mError = ERR_CLOSED_BY_REMOTE_HOST;
mErrorMsg = i18n("Connection closed by remote host.");
}
- else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) {
+ else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) {
mKeyFingerprint = keyFingerprintMsg[mVersion].cap();
kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl;
mConnectState = STATE_NEW_KEY_WAIT_CONTINUE;
@@ -996,9 +996,9 @@ bool KSshProcess::connect() {
i18n("Error encountered while talking to ssh.");
mConnectState = STATE_FATAL;
}
- else if( (line.tqfind(authFailedMsg[mVersion]) != -1
- && line.tqfind(tryAgainMsg[mVersion]) == -1)
- || line.tqfind(hostKeyVerifyFailedMsg[mVersion]) != -1 ) {
+ else if( (line.find(authFailedMsg[mVersion]) != -1
+ && line.find(tryAgainMsg[mVersion]) == -1)
+ || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) {
mError = ERR_AUTH_FAILED_DIFF_KEY;
mErrorMsg = i18n(
"WARNING: The identity of the remote host '%1' has changed!\n\n"
@@ -1011,15 +1011,15 @@ bool KSshProcess::connect() {
).arg(mHost).arg(mKeyFingerprint).arg(mKnownHostsFile);
mConnectState = STATE_FATAL;
}
- else if( line.tqfind(continuePrompt[mVersion]) != -1 ) {
+ else if( line.find(continuePrompt[mVersion]) != -1 ) {
mConnectState = STATE_DIFF_KEY_CONTINUE;
}
- else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) {
+ else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) {
mKeyFingerprint = keyFingerprintMsg[mVersion].cap();
kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl;
mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE;
}
- else if( line.tqfind(knownHostsFileMsg[mVersion]) != -1 ) {
+ else if( line.find(knownHostsFileMsg[mVersion]) != -1 ) {
mKnownHostsFile = (knownHostsFileMsg[mVersion]).cap(1);
kdDebug(KSSHPROC) << "Found known hosts file name: " << mKnownHostsFile << endl;
mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE;