summaryrefslogtreecommitdiffstats
path: root/korn/password.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'korn/password.cpp')
-rw-r--r--korn/password.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/korn/password.cpp b/korn/password.cpp
index a3eb76ed9..764b90f98 100644
--- a/korn/password.cpp
+++ b/korn/password.cpp
@@ -23,16 +23,16 @@
#include <kdebug.h>
#include <kwallet.h>
-#include <qstring.h>
-#include <qstringlist.h>
+#include <tqstring.h>
+#include <tqstringlist.h>
KWallet::Wallet* KOrnPassword::m_wallet = 0;
bool KOrnPassword::m_openFailed = false;
bool KOrnPassword::m_useWallet = false; //Not default true until moving works
-QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig )
+TQString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase &fallbackConfig )
{
- QString result;
+ TQString result;
if( readKOrnPassword( box, account, result ) )
return result;
@@ -40,9 +40,9 @@ QString KOrnPassword::readKOrnPassword( int box, int account, const KConfigBase
return fallbackConfig.readEntry( "password" );
}
-QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig )
+TQString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallbackConfig )
{
- QString password;
+ TQString password;
open();
if( !m_wallet || !m_wallet->isOpen() || m_openFailed )
@@ -52,13 +52,13 @@ QString KOrnPassword::readKMailPassword( int accountnr, const KConfigBase& fallb
return KMailDecrypt( fallbackConfig.readEntry( "pass" ));
m_wallet->setFolder( "kmail" );
- if( m_wallet->readPassword( QString( "account-%1" ).arg( accountnr ), password ) != 0 )
+ if( m_wallet->readPassword( TQString( "account-%1" ).arg( accountnr ), password ) != 0 )
return fallbackConfig.readEntry( "password" );
return password;
}
-void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const QString& password )
+void KOrnPassword::writeKOrnPassword( int box, int account, KConfigBase& fallbackConfig, const TQString& password )
{
if( writeKOrnPassword( box, account, password ) )
{
@@ -95,7 +95,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account )
m_wallet->setFolder( "korn" );
//Write to wallet
- if( m_wallet->removeEntry( QString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 )
+ if( m_wallet->removeEntry( TQString( "account-%1-%2" ).arg( box ).arg( account ) ) != 0 )
//Writing failed
return false;
@@ -106,7 +106,7 @@ bool KOrnPassword::deleteKOrnPassword( int box, int account )
void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& configSrc,
int boxDest, int accountDest, KConfigBase &configDest )
{
- QString password;
+ TQString password;
password = readKOrnPassword( boxSrc, accountSrc, configSrc );
deleteKOrnPassword( boxSrc, accountSrc, configSrc );
@@ -115,7 +115,7 @@ void KOrnPassword::moveKOrnPassword( int boxSrc, int accountSrc, KConfigBase& co
void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config1, int box2, int account2, KConfigBase &config2 )
{
- QString password1, password2;
+ TQString password1, password2;
password1 = readKOrnPassword( box1, account1, config1 );
password2 = readKOrnPassword( box2, account2, config2 );
deleteKOrnPassword( box1, account1, config1 );
@@ -126,7 +126,7 @@ void KOrnPassword::swapKOrnPassword( int box1, int account1, KConfigBase &config
void KOrnPassword::swapKOrnWalletPassword( int box1, int account1, int box2, int account2 )
{
- QString password1, password2;
+ TQString password1, password2;
bool passExist1, passExist2;
passExist1 = readKOrnPassword( box1, account1, password1 );
passExist2 = readKOrnPassword( box2, account2, password2 );
@@ -152,7 +152,7 @@ void KOrnPassword::swapKOrnWalletPasswords( int box1, int accountnumber1 ,int bo
void KOrnPassword::rewritePassword( int box, int account, KConfigBase &config, bool newUseWalletValue )
{
bool useWallet = m_useWallet;
- QString password;
+ TQString password;
setUseWallet( !newUseWalletValue );
password = readKOrnPassword( box, account, config );
@@ -184,7 +184,7 @@ void KOrnPassword::open()
m_openFailed = true;
}
-bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
+bool KOrnPassword::readKOrnPassword( int box, int account, TQString& password )
{
if( !m_useWallet )
return false;
@@ -201,7 +201,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
return false;
m_wallet->setFolder( "korn" );
- if( m_wallet->readPassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
+ if( m_wallet->readPassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
//Error during reading the password: use the one in the config file
return false;
@@ -209,7 +209,7 @@ bool KOrnPassword::readKOrnPassword( int box, int account, QString& password )
return true;
}
-bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& password )
+bool KOrnPassword::writeKOrnPassword( int box, int account, const TQString& password )
{
if( !m_useWallet )
//Wallet should not be used => saving in the config file
@@ -228,7 +228,7 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw
m_wallet->setFolder( "korn" );
//Write to wallet
- if( m_wallet->writePassword( QString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
+ if( m_wallet->writePassword( TQString( "account-%1-%2" ).arg( box ).arg( account ), password ) != 0 )
//Writing failed
return false;
@@ -237,11 +237,11 @@ bool KOrnPassword::writeKOrnPassword( int box, int account, const QString& passw
}
//This function is copyed from kmail/kmaccount.cpp
-QString KOrnPassword::KMailDecrypt( const QString& enc )
+TQString KOrnPassword::KMailDecrypt( const TQString& enc )
{
- QString result;
+ TQString result;
for (uint i = 0; i < enc.length(); i++)
- result += (enc[i].unicode() <= 0x21) ? enc[i] : QChar(0x1001F - enc[i].unicode());
+ result += (enc[i].unicode() <= 0x21) ? enc[i] : TQChar(0x1001F - enc[i].unicode());
return result;
}