From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kioslave/sftp/ksshprocess.cpp | 54 +++++++++++++++++++++---------------------- 1 file changed, 27 insertions(+), 27 deletions(-) (limited to 'kioslave/sftp/ksshprocess.cpp') diff --git a/kioslave/sftp/ksshprocess.cpp b/kioslave/sftp/ksshprocess.cpp index 9b2323bd6..6dfdb2419 100644 --- a/kioslave/sftp/ksshprocess.cpp +++ b/kioslave/sftp/ksshprocess.cpp @@ -206,7 +206,7 @@ void KSshProcess::removeSignalHandlers() { KSshProcess::KSshProcess() : mVersion(UNKNOWN_VER), mConnected(false), mRunning(false), mConnectState(0) { - mSshPath = KStandardDirs::findExe(TQString::fromLatin1("ssh")); + mSshPath = KStandardDirs::findExe(TQString::tqfromLatin1("ssh")); kdDebug(KSSHPROC) << "KSshProcess::KSshProcess(): ssh path [" << mSshPath << "]" << endl; @@ -266,7 +266,7 @@ KSshProcess::SshVersion KSshProcess::version() { mVersion = UNKNOWN_VER; for(int i = 0; i < SSH_VER_MAX; i++) { - if( ver.find(versionStrs[i]) != -1 ) { + if( ver.tqfind(versionStrs[i]) != -1 ) { mVersion = (SshVersion)i; break; } @@ -292,7 +292,7 @@ TQString KSshProcess::versionStr() { return TQString::null; } - return TQString::fromLatin1(versionStrs[mVersion]); + return TQString::tqfromLatin1(versionStrs[mVersion]); } */ @@ -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.contains("NumberOfPasswordPrompts") || - tmp.contains("StrictHostKeyChecking") ) { + if( tmp.tqcontains("NumberOfPasswordPrompts") || + tmp.tqcontains("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.find(TQString::fromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { + else if( line.tqfind(TQString::tqfromLatin1(passwordPrompt[mVersion]), 0, false) != -1 ) { mConnectState = STATE_TRY_PASSWD; } - else if( line.find(passphrasePrompt[mVersion]) != -1 ) { + else if( line.tqfind(passphrasePrompt[mVersion]) != -1 ) { mConnectState = STATE_TRY_PASSPHRASE; } - else if( line.find(authSuccessMsg[mVersion]) != -1 ) { + else if( line.tqfind(authSuccessMsg[mVersion]) != -1 ) { return true; } - else if( line.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1 ) { + else if( line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1 ) { mConnectState = STATE_AUTH_FAILED; } - else if( line.find(hostKeyMissingMsg[mVersion]) != -1 ) { + else if( line.tqfind(hostKeyMissingMsg[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_WAIT_CONTINUE; } - else if( line.find(hostKeyChangedMsg[mVersion]) != -1 ) { + else if( line.tqfind(hostKeyChangedMsg[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(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.find(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.find(changeHostKeyOnDiskPrompt[mVersion]) != -1 ) { + else if( line.tqfind(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.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1) - || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1) + || line.tqfind(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.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_NEW_KEY_CONTINUE; } - else if( line.find(connectionClosedMsg[mVersion]) != -1 ) { + else if( line.tqfind(connectionClosedMsg[mVersion]) != -1 ) { mConnectState = STATE_FATAL; mError = ERR_CLOSED_BY_REMOTE_HOST; mErrorMsg = i18n("Connection closed by remote host."); } - else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.tqfind(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.find(authFailedMsg[mVersion]) != -1 - && line.find(tryAgainMsg[mVersion]) == -1) - || line.find(hostKeyVerifyFailedMsg[mVersion]) != -1 ) { + else if( (line.tqfind(authFailedMsg[mVersion]) != -1 + && line.tqfind(tryAgainMsg[mVersion]) == -1) + || line.tqfind(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.find(continuePrompt[mVersion]) != -1 ) { + else if( line.tqfind(continuePrompt[mVersion]) != -1 ) { mConnectState = STATE_DIFF_KEY_CONTINUE; } - else if( line.find(keyFingerprintMsg[mVersion]) != -1 ) { + else if( line.tqfind(keyFingerprintMsg[mVersion]) != -1 ) { mKeyFingerprint = keyFingerprintMsg[mVersion].cap(); kdDebug(KSSHPROC) << "Found key fingerprint: " << mKeyFingerprint << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; } - else if( line.find(knownHostsFileMsg[mVersion]) != -1 ) { + else if( line.tqfind(knownHostsFileMsg[mVersion]) != -1 ) { mKnownHostsFile = (knownHostsFileMsg[mVersion]).cap(1); kdDebug(KSSHPROC) << "Found known hosts file name: " << mKnownHostsFile << endl; mConnectState = STATE_DIFF_KEY_WAIT_CONTINUE; -- cgit v1.2.3