summaryrefslogtreecommitdiffstats
path: root/kopete
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2018-12-01 23:39:45 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2018-12-01 23:39:45 +0900
commit53fe3bf43aeb43f51f6b6ebb7453938e85c0223b (patch)
treed63838d4442041515669c84a02700bbca9f1aa77 /kopete
parentca937b0c3ebc76d1a079e5d4b22022c4ccb29889 (diff)
downloadtdenetwork-53fe3bf43aeb43f51f6b6ebb7453938e85c0223b.tar.gz
tdenetwork-53fe3bf43aeb43f51f6b6ebb7453938e85c0223b.zip
Adapted to new KPasswordEdit::password() signature. This relates to bug 2961.
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'kopete')
-rw-r--r--kopete/libkopete/kopetepassword.cpp2
-rw-r--r--kopete/libkopete/ui/kopetepasswordwidget.cpp2
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp6
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.h6
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp7
-rw-r--r--kopete/protocols/jabber/jabberaccount.cpp2
-rw-r--r--kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp6
-rw-r--r--kopete/protocols/jabber/ui/jabberregisteraccount.cpp7
8 files changed, 19 insertions, 19 deletions
diff --git a/kopete/libkopete/kopetepassword.cpp b/kopete/libkopete/kopetepassword.cpp
index 5fd729a7..c4d2b439 100644
--- a/kopete/libkopete/kopetepassword.cpp
+++ b/kopete/libkopete/kopetepassword.cpp
@@ -206,7 +206,7 @@ public:
void slotOkPressed()
{
- TQString result = TQString::fromLocal8Bit( mView->m_password->password() );
+ TQString result = mView->m_password->password();
if ( mView->m_save_passwd->isChecked() )
mPassword.set( result );
diff --git a/kopete/libkopete/ui/kopetepasswordwidget.cpp b/kopete/libkopete/ui/kopetepasswordwidget.cpp
index 23a48d00..fe1f29a0 100644
--- a/kopete/libkopete/ui/kopetepasswordwidget.cpp
+++ b/kopete/libkopete/ui/kopetepasswordwidget.cpp
@@ -108,7 +108,7 @@ bool Kopete::UI::PasswordWidget::validate()
TQString Kopete::UI::PasswordWidget::password() const
{
- return TQString::fromLocal8Bit( mPassword->password() );
+ return mPassword->password();
}
bool Kopete::UI::PasswordWidget::remember() const
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index 5e10cec9..ae38143f 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -117,12 +117,12 @@ CryptographyPlugin* CryptographyPlugin::plugin()
CryptographyPlugin* CryptographyPlugin::pluginStatic_ = 0L;
-TQCString CryptographyPlugin::cachedPass()
+TQString CryptographyPlugin::cachedPass()
{
return pluginStatic_->m_cachedPass;
}
-void CryptographyPlugin::setCachedPass(const TQCString& p)
+void CryptographyPlugin::setCachedPass(const TQString& p)
{
if(pluginStatic_->mCacheMode==Never)
return;
@@ -308,7 +308,7 @@ void CryptographyPlugin::slotSelectContactKey()
void CryptographyPlugin::slotForgetCachedPass()
{
- m_cachedPass=TQCString();
+ m_cachedPass=TQString();
m_cachedPass_timer->stop();
}
diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h
index ad96767e..05d0ecfa 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.h
+++ b/kopete/plugins/cryptography/cryptographyplugin.h
@@ -51,8 +51,8 @@ public:
};
static CryptographyPlugin *plugin();
- static TQCString cachedPass();
- static void setCachedPass(const TQCString &pass);
+ static TQString cachedPass();
+ static void setCachedPass(const TQString &pass);
static bool passphraseHandling();
static const TQRegExp isHTML;
@@ -75,7 +75,7 @@ private slots:
private:
static CryptographyPlugin* pluginStatic_;
Kopete::SimpleMessageHandlerFactory *m_inboundHandler;
- TQCString m_cachedPass;
+ TQString m_cachedPass;
TQTimer *m_cachedPass_timer;
//cache messages for showing
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index 5763e910..79cd2510 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -85,7 +85,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
char buffer[200];
int counter=0,ppass[2];
- TQCString password = CryptographyPlugin::cachedPass();
+ TQString password = CryptographyPlugin::cachedPass();
bool passphraseHandling=CryptographyPlugin::passphraseHandling();
while ((counter<3) && (encResult.isEmpty()))
@@ -111,7 +111,8 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
pipe(ppass);
pass = fdopen(ppass[1], "w");
- fwrite(password, sizeof(char), strlen(password), pass);
+ TQCString pass2 = password.local8Bit();
+ fwrite(pass2, sizeof(char), pass2.length(), pass);
// fwrite("\n", sizeof(char), 1, pass);
fclose(pass);
}
@@ -129,7 +130,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
encResult += TQString::fromUtf8(buffer);
pclose(fp);
- password = TQCString();
+ password.fill(' ');
}
if( !encResult.isEmpty() )
diff --git a/kopete/protocols/jabber/jabberaccount.cpp b/kopete/protocols/jabber/jabberaccount.cpp
index 4cc2c866..3fa61483 100644
--- a/kopete/protocols/jabber/jabberaccount.cpp
+++ b/kopete/protocols/jabber/jabberaccount.cpp
@@ -1515,7 +1515,7 @@ void JabberAccount::slotGroupChatError (const XMPP::Jid &jid, int error, const T
{
case JabberClient::InvalidPasswordForMUC:
{
- TQCString password;
+ TQString password;
int result = KPasswordDialog::getPassword(password, i18n("A password is required to join the room %1.").arg(jid.node()));
if (result == KPasswordDialog::Accepted)
m_jabberClient->joinGroupChat(jid.domain(), jid.node(), jid.resource(), password);
diff --git a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
index c665bf94..c890b158 100644
--- a/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
+++ b/kopete/protocols/jabber/ui/dlgjabberchangepassword.cpp
@@ -49,7 +49,7 @@ DlgJabberChangePassword::~DlgJabberChangePassword()
void DlgJabberChangePassword::slotOk ()
{
- if ( !strlen ( m_mainWidget->peCurrentPassword->password () )
+ if ( m_mainWidget->peCurrentPassword->password().length() == 0
|| ( m_account->password().cachedValue () != m_mainWidget->peCurrentPassword->password () ) )
{
KMessageBox::queuedMessageBox ( this, KMessageBox::Sorry,
@@ -58,7 +58,7 @@ void DlgJabberChangePassword::slotOk ()
return;
}
- if ( strcmp ( m_mainWidget->peNewPassword1->password (), m_mainWidget->peNewPassword2->password () ) != 0 )
+ if ( m_mainWidget->peNewPassword1->password() != m_mainWidget->peNewPassword2->password() )
{
KMessageBox::queuedMessageBox ( this, KMessageBox::Sorry,
i18n ( "Your new passwords do not match. Please enter them again." ),
@@ -66,7 +66,7 @@ void DlgJabberChangePassword::slotOk ()
return;
}
- if ( !strlen ( m_mainWidget->peNewPassword1->password () ) )
+ if ( !m_mainWidget->peNewPassword1->password().length() )
{
KMessageBox::queuedMessageBox ( this, KMessageBox::Sorry,
i18n ( "For security reasons, you are not allowed to set an empty password." ),
diff --git a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
index f3d01c76..753636e0 100644
--- a/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
+++ b/kopete/protocols/jabber/ui/jabberregisteraccount.cpp
@@ -146,8 +146,8 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ).isEmpty () ||
- TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ).isEmpty () ) )
+ ( mMainWidget->lePassword->password().isEmpty() ||
+ mMainWidget->lePasswordVerify->password().isEmpty() ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Please enter the same password twice." ) );
valid = false;
@@ -155,8 +155,7 @@ void JabberRegisterAccount::validateData ()
}
if ( valid &&
- ( TQString::fromLatin1 ( mMainWidget->lePassword->password () ) !=
- TQString::fromLatin1 ( mMainWidget->lePasswordVerify->password () ) ) )
+ ( mMainWidget->lePassword->password() != mMainWidget->lePasswordVerify->password() ) )
{
mMainWidget->lblStatusMessage->setText ( i18n ( "Password entries do not match." ) );
valid = false;