summaryrefslogtreecommitdiffstats
path: root/kopete/libkopete/kopetepassword.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/libkopete/kopetepassword.cpp')
-rw-r--r--kopete/libkopete/kopetepassword.cpp98
1 files changed, 49 insertions, 49 deletions
diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp
index f0b788a9..5edc1b27 100644
--- a/kopete/libkopete/kopetepassword.cpp
+++ b/kopete/libkopete/kopetepassword.cpp
@@ -21,10 +21,10 @@
#include <kwallet.h>
-#include <qapplication.h>
-#include <qlabel.h>
-#include <qlineedit.h>
-#include <qcheckbox.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
+#include <tqlineedit.h>
+#include <tqcheckbox.h>
#include <kactivelabel.h>
#include <kapplication.h>
@@ -40,7 +40,7 @@
class Kopete::Password::Private
{
public:
- Private( const QString &group, uint maxLen, bool blanksAllowed )
+ Private( const TQString &group, uint maxLen, bool blanksAllowed )
: refCount( 1 ), configGroup( group ), remembered( false ), maximumLength( maxLen ),
isWrong( false ), allowBlankPassword( blanksAllowed )
{
@@ -58,11 +58,11 @@ public:
/** Reference count */
int refCount;
/** Group to use for KConfig and KWallet */
- const QString configGroup;
+ const TQString configGroup;
/** Is the password being remembered? */
bool remembered;
- /** The current password in the KConfig file, or QString::null if no password there */
- QString passwordFromKConfig;
+ /** The current password in the KConfig file, or TQString::null if no password there */
+ TQString passwordFromKConfig;
/** The maximum length allowed for this password, or -1 if there is no limit */
uint maximumLength;
/** Is the current password known to be wrong? */
@@ -70,7 +70,7 @@ public:
/** Are we allowed to have blank passwords? */
bool allowBlankPassword;
/** The cached password */
- QString cachedValue;
+ TQString cachedValue;
};
/**
@@ -81,8 +81,8 @@ public:
class KopetePasswordRequest : public KopetePasswordRequestBase
{
public:
- KopetePasswordRequest( QObject *owner, Kopete::Password &pass )
- : QObject( owner ), mPassword( pass ), mWallet( 0 )
+ KopetePasswordRequest( TQObject *owner, Kopete::Password &pass )
+ : TQObject( owner ), mPassword( pass ), mWallet( 0 )
{
}
@@ -92,7 +92,7 @@ public:
void begin()
{
kdDebug( 14010 ) << k_funcinfo << endl;
- Kopete::WalletManager::self()->openWallet( this, SLOT( walletReceived( KWallet::Wallet* ) ) );
+ Kopete::WalletManager::self()->openWallet( this, TQT_SLOT( walletReceived( KWallet::Wallet* ) ) );
}
void walletReceived( KWallet::Wallet *wallet )
@@ -123,16 +123,16 @@ protected:
class KopetePasswordGetRequest : public KopetePasswordRequest
{
public:
- KopetePasswordGetRequest( QObject *owner, Kopete::Password &pass )
+ KopetePasswordGetRequest( TQObject *owner, Kopete::Password &pass )
: KopetePasswordRequest( owner, pass )
{
}
- QString grabPassword()
+ TQString grabPassword()
{
// Before trying to read from the wallet, check if the config file holds a password.
// If so, remove it from the config and set it through KWallet instead.
- QString pwd;
+ TQString pwd;
if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() )
{
pwd = mPassword.d->passwordFromKConfig;
@@ -146,10 +146,10 @@ public:
if ( mPassword.d->remembered && !mPassword.d->passwordFromKConfig.isNull() )
return mPassword.d->passwordFromKConfig;
- return QString::null;
+ return TQString::null;
}
- void finished( const QString &result )
+ void finished( const TQString &result )
{
mPassword.d->cachedValue = result;
emit requestFinished( result );
@@ -160,14 +160,14 @@ public:
class KopetePasswordGetRequestPrompt : public KopetePasswordGetRequest
{
public:
- KopetePasswordGetRequestPrompt( QObject *owner, Kopete::Password &pass, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source )
+ KopetePasswordGetRequestPrompt( TQObject *owner, Kopete::Password &pass, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source )
: KopetePasswordGetRequest( owner, pass ), mImage( image ), mPrompt( prompt ), mSource( source ), mView( 0 )
{
}
void processRequest()
{
- QString result = grabPassword();
+ TQString result = grabPassword();
if ( mSource == Kopete::Password::FromUser || result.isNull() )
doPasswordDialog();
else
@@ -198,15 +198,15 @@ public:
mView->adjustSize();
passwdDialog->adjustSize();
- connect( passwdDialog, SIGNAL( okClicked() ), SLOT( slotOkPressed() ) );
- connect( passwdDialog, SIGNAL( cancelClicked() ), SLOT( slotCancelPressed() ) );
- connect( this, SIGNAL( destroyed() ), passwdDialog, SLOT( deleteLater() ) );
+ connect( passwdDialog, TQT_SIGNAL( okClicked() ), TQT_SLOT( slotOkPressed() ) );
+ connect( passwdDialog, TQT_SIGNAL( cancelClicked() ), TQT_SLOT( slotCancelPressed() ) );
+ connect( this, TQT_SIGNAL( destroyed() ), passwdDialog, TQT_SLOT( deleteLater() ) );
passwdDialog->show();
}
void slotOkPressed()
{
- QString result = QString::fromLocal8Bit( mView->m_password->password() );
+ TQString result = TQString::fromLocal8Bit( mView->m_password->password() );
if ( mView->m_save_passwd->isChecked() )
mPassword.set( result );
@@ -215,12 +215,12 @@ public:
void slotCancelPressed()
{
- finished( QString::null );
+ finished( TQString::null );
}
private:
- QPixmap mImage;
- QString mPrompt;
+ TQPixmap mImage;
+ TQString mPrompt;
Kopete::Password::PasswordSource mSource;
unsigned int mMaxLength;
KopetePasswordDialog *mView;
@@ -229,7 +229,7 @@ private:
class KopetePasswordGetRequestNoPrompt : public KopetePasswordGetRequest
{
public:
- KopetePasswordGetRequestNoPrompt( QObject *owner, Kopete::Password &pass )
+ KopetePasswordGetRequestNoPrompt( TQObject *owner, Kopete::Password &pass )
: KopetePasswordGetRequest( owner, pass )
{
}
@@ -248,7 +248,7 @@ public:
class KopetePasswordSetRequest : public KopetePasswordRequest
{
public:
- KopetePasswordSetRequest( Kopete::Password &pass, const QString &newPass )
+ KopetePasswordSetRequest( Kopete::Password &pass, const TQString &newPass )
: KopetePasswordRequest( 0, pass ), mNewPass( newPass )
{
if ( KApplication *app = KApplication::kApplication() )
@@ -276,7 +276,7 @@ public:
if ( mWallet && mWallet->writePassword( mPassword.d->configGroup, mNewPass ) == 0 )
{
mPassword.d->remembered = true;
- mPassword.d->passwordFromKConfig = QString::null;
+ mPassword.d->passwordFromKConfig = TQString::null;
mPassword.writeConfig();
return true;
}
@@ -288,13 +288,13 @@ public:
//NOTE: This will start a nested event loop. However, this is fine; the only code we
// call after this point is in Kopete::Password, so as long as we've not been deleted
- // everything should work out OK. We have no parent QObject, so we should survive.
+ // everything should work out OK. We have no parent TQObject, so we should survive.
if ( KMessageBox::warningContinueCancel( Kopete::UI::Global::mainWidget(),
i18n( "<qt>Kopete is unable to save your password securely in your wallet;<br>"
"do you want to save the password in the <b>unsafe</b> configuration file instead?</qt>" ),
i18n( "Unable to Store Secure Password" ),
- KGuiItem( i18n( "Store &Unsafe" ), QString::fromLatin1( "unlock" ) ),
- QString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue )
+ KGuiItem( i18n( "Store &Unsafe" ), TQString::fromLatin1( "unlock" ) ),
+ TQString::fromLatin1( "KWalletFallbackToKConfig" ) ) != KMessageBox::Continue )
{
return false;
}
@@ -306,7 +306,7 @@ public:
}
private:
- QString mNewPass;
+ TQString mNewPass;
};
class KopetePasswordClearRequest : public KopetePasswordRequest
@@ -329,7 +329,7 @@ public:
if ( clearPassword() )
{
mPassword.setWrong( true );
- mPassword.d->cachedValue = QString::null;
+ mPassword.d->cachedValue = TQString::null;
}
delete this;
@@ -339,7 +339,7 @@ public:
kdDebug( 14010 ) << k_funcinfo << " clearing password" << endl;
mPassword.d->remembered = false;
- mPassword.d->passwordFromKConfig = QString::null;
+ mPassword.d->passwordFromKConfig = TQString::null;
mPassword.writeConfig();
if ( mWallet )
mWallet->removeEntry( mPassword.d->configGroup );
@@ -347,21 +347,21 @@ public:
}
};
-Kopete::Password::Password( const QString &configGroup, uint maximumLength, const char *name )
- : QObject( 0, name ), d( new Private( configGroup, maximumLength, false ) )
+Kopete::Password::Password( const TQString &configGroup, uint maximumLength, const char *name )
+ : TQObject( 0, name ), d( new Private( configGroup, maximumLength, false ) )
{
readConfig();
}
-Kopete::Password::Password( const QString &configGroup, uint maximumLength,
+Kopete::Password::Password( const TQString &configGroup, uint maximumLength,
bool allowBlankPassword, const char *name )
- : QObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) )
+ : TQObject( 0, name ), d( new Private( configGroup, maximumLength, allowBlankPassword ) )
{
readConfig();
}
Kopete::Password::Password( Password &other, const char *name )
- : QObject( 0, name ), d( other.d->incRef() )
+ : TQObject( 0, name ), d( other.d->incRef() )
{
}
@@ -383,9 +383,9 @@ void Kopete::Password::readConfig()
KConfig *config = KGlobal::config();
config->setGroup( d->configGroup );
- QString passwordCrypted = config->readEntry( "Password" );
+ TQString passwordCrypted = config->readEntry( "Password" );
if ( passwordCrypted.isNull() )
- d->passwordFromKConfig = QString::null;
+ d->passwordFromKConfig = TQString::null;
else
d->passwordFromKConfig = KStringHandler::obscure( passwordCrypted );
@@ -448,30 +448,30 @@ void Kopete::Password::setWrong( bool bWrong )
d->isWrong = bWrong;
writeConfig();
- if ( bWrong ) d->cachedValue = QString::null;
+ if ( bWrong ) d->cachedValue = TQString::null;
}
-void Kopete::Password::requestWithoutPrompt( QObject *returnObj, const char *slot )
+void Kopete::Password::requestWithoutPrompt( TQObject *returnObj, const char *slot )
{
KopetePasswordRequest *request = new KopetePasswordGetRequestNoPrompt( returnObj, *this );
// call connect on returnObj so we can still connect if 'slot' is protected/private
- returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot );
+ returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot );
request->begin();
}
-void Kopete::Password::request( QObject *returnObj, const char *slot, const QPixmap &image, const QString &prompt, Kopete::Password::PasswordSource source )
+void Kopete::Password::request( TQObject *returnObj, const char *slot, const TQPixmap &image, const TQString &prompt, Kopete::Password::PasswordSource source )
{
KopetePasswordRequest *request = new KopetePasswordGetRequestPrompt( returnObj, *this, image, prompt, source );
- returnObj->connect( request, SIGNAL( requestFinished( const QString & ) ), slot );
+ returnObj->connect( request, TQT_SIGNAL( requestFinished( const TQString & ) ), slot );
request->begin();
}
-QString Kopete::Password::cachedValue()
+TQString Kopete::Password::cachedValue()
{
return d->cachedValue;
}
-void Kopete::Password::set( const QString &pass )
+void Kopete::Password::set( const TQString &pass )
{
// if we're being told to forget the password, and we aren't remembering one,
// don't try to open the wallet. fixes bug #71804.