summaryrefslogtreecommitdiffstats
path: root/kopete/plugins/cryptography
diff options
context:
space:
mode:
Diffstat (limited to 'kopete/plugins/cryptography')
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.cpp10
-rw-r--r--kopete/plugins/cryptography/cryptographyguiclient.h4
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.cpp88
-rw-r--r--kopete/plugins/cryptography/cryptographyplugin.h16
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.cpp8
-rw-r--r--kopete/plugins/cryptography/cryptographypreferences.h2
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.cpp16
-rw-r--r--kopete/plugins/cryptography/cryptographyselectuserkey.h6
-rw-r--r--kopete/plugins/cryptography/kgpginterface.cpp48
-rw-r--r--kopete/plugins/cryptography/kgpginterface.h24
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.cpp58
-rw-r--r--kopete/plugins/cryptography/kgpgselkey.h32
-rw-r--r--kopete/plugins/cryptography/popuppublic.cpp170
-rw-r--r--kopete/plugins/cryptography/popuppublic.h18
14 files changed, 250 insertions, 250 deletions
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp
index 0c53eee0..898e7f1a 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.cpp
+++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp
@@ -28,7 +28,7 @@
class CryptographyPlugin;
CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
- : QObject(parent) , KXMLGUIClient(parent)
+ : TQObject(parent) , KXMLGUIClient(parent)
{
if(!parent || parent->members().isEmpty())
{
@@ -36,7 +36,7 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
return;
}
- QPtrList<Kopete::Contact> mb=parent->members();
+ TQPtrList<Kopete::Contact> mb=parent->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
@@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent )
setInstance( KGenericFactory<CryptographyPlugin>::instance() );
- m_action=new KToggleAction( i18n("Encrypt Messages" ), QString::fromLatin1( "encrypted" ), 0, this, SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
- m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != QString::fromLatin1("off") ) ;
+ m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::fromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" );
+ m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::fromLatin1("off") ) ;
setXMLFile("cryptographychatui.rc");
}
@@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient()
void CryptographyGUIClient::slotToggled()
{
- QPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
+ TQPtrList<Kopete::Contact> mb=static_cast<Kopete::ChatSession*>(parent())->members();
Kopete::MetaContact *first=mb.first()->metaContact();
if(!first)
diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h
index 5a1aee2c..7f3d8c4f 100644
--- a/kopete/plugins/cryptography/cryptographyguiclient.h
+++ b/kopete/plugins/cryptography/cryptographyguiclient.h
@@ -15,7 +15,7 @@
#ifndef CRYPTOGUICLIENT_H
#define CRYPTOGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
namespace Kopete { class ChatSession; }
@@ -24,7 +24,7 @@ class KToggleAction;
/**
*@author Olivier Goffart
*/
-class CryptographyGUIClient : public QObject, public KXMLGUIClient
+class CryptographyGUIClient : public TQObject, public KXMLGUIClient
{
Q_OBJECT
public:
diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp
index 701ad8bd..4e2e9686 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.cpp
+++ b/kopete/plugins/cryptography/cryptographyplugin.cpp
@@ -15,9 +15,9 @@
* *
***************************************************************************/
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qregexp.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
#include <kdebug.h>
#include <kaction.h>
@@ -45,13 +45,13 @@
//In Jabber, the JEP says it's not. so we don't use richtext in our message, but some client did.
//We limit the html to some basis tag to limit security problem (bad links)
// - Olivier
-const QRegExp CryptographyPlugin::isHTML( QString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
+const TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(</?(html|body|br|p|font|center|b|i|u|span|div|pre)(>|[\\s/][^><]*>)[^><]*)+$" ) , false );
typedef KGenericFactory<CryptographyPlugin> CryptographyPluginFactory;
static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" );
K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) )
-CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
+CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ )
: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ),
m_cachedPass()
{
@@ -59,27 +59,27 @@ CryptographyPlugin::CryptographyPlugin( QObject *parent, const char *name, const
pluginStatic_=this;
m_inboundHandler = new Kopete::SimpleMessageHandlerFactory( Kopete::Message::Inbound,
- Kopete::MessageHandlerFactory::InStageToSent, this, SLOT( slotIncomingMessage( Kopete::Message& ) ) );
+ Kopete::MessageHandlerFactory::InStageToSent, this, TQT_SLOT( slotIncomingMessage( Kopete::Message& ) ) );
connect( Kopete::ChatSessionManager::self(),
- SIGNAL( aboutToSend( Kopete::Message & ) ),
- SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+ TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
- m_cachedPass_timer = new QTimer(this, "m_cachedPass_timer" );
- QObject::connect(m_cachedPass_timer, SIGNAL(timeout()), this, SLOT(slotForgetCachedPass() ));
+ m_cachedPass_timer = new TQTimer(this, "m_cachedPass_timer" );
+ TQObject::connect(m_cachedPass_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotForgetCachedPass() ));
- KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey");
- connect ( Kopete::ContactList::self() , SIGNAL( metaContactSelected(bool)) , action , SLOT(setEnabled(bool)));
+ KAction *action=new KAction( i18n("&Select Cryptography Public Key..."), "encrypted", 0, this, TQT_SLOT (slotSelectContactKey()), actionCollection() , "contactSelectKey");
+ connect ( Kopete::ContactList::self() , TQT_SIGNAL( metaContactSelected(bool)) , action , TQT_SLOT(setEnabled(bool)));
action->setEnabled(Kopete::ContactList::self()->selectedMetaContacts().count()==1 );
setXMLFile("cryptographyui.rc");
loadSettings();
- connect(this, SIGNAL(settingsChanged()), this, SLOT( loadSettings() ) );
+ connect(this, TQT_SIGNAL(settingsChanged()), this, TQT_SLOT( loadSettings() ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * )) , TQT_SLOT( slotNewKMM( Kopete::ChatSession * ) ) );
//Add GUI action to all already existing kmm (if the plugin is launched when kopete already rining)
- QValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
- for (QValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
+ TQValueList<Kopete::ChatSession*> sessions = Kopete::ChatSessionManager::self()->sessions();
+ for (TQValueListIterator<Kopete::ChatSession*> it= sessions.begin(); it!=sessions.end() ; ++it)
{
slotNewKMM(*it);
}
@@ -117,12 +117,12 @@ CryptographyPlugin* CryptographyPlugin::plugin()
CryptographyPlugin* CryptographyPlugin::pluginStatic_ = 0L;
-QCString CryptographyPlugin::cachedPass()
+TQCString CryptographyPlugin::cachedPass()
{
return pluginStatic_->m_cachedPass;
}
-void CryptographyPlugin::setCachedPass(const QCString& p)
+void CryptographyPlugin::setCachedPass(const TQCString& p)
{
if(pluginStatic_->mCacheMode==Never)
return;
@@ -144,7 +144,7 @@ bool CryptographyPlugin::passphraseHandling()
m_actionCollection = new KActionCollection(this);
KAction *actionTranslate = new KAction( i18n ("Translate"), 0,
- this, SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" );
+ this, TQT_SLOT( slotTranslateChat() ), m_actionCollection, "actionTranslate" );
m_actionCollection->insert( actionTranslate );
m_currentChatSession=KMM;
@@ -153,14 +153,14 @@ bool CryptographyPlugin::passphraseHandling()
void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
{
- QString body = msg.plainBody();
- if( !body.startsWith( QString::fromLatin1("-----BEGIN PGP MESSAGE----") )
- || !body.contains( QString::fromLatin1("-----END PGP MESSAGE----") ) )
+ TQString body = msg.plainBody();
+ if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") )
+ || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) )
return;
if( msg.direction() != Kopete::Message::Inbound )
{
- QString plainBody;
+ TQString plainBody;
if ( m_cachedMessages.contains( body ) )
{
plainBody = m_cachedMessages[ body ];
@@ -176,19 +176,19 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
//Check if this is a RTF message before escaping it
if( !isHTML.exactMatch( plainBody ) )
{
- plainBody = QStyleSheet::escape( plainBody );
+ plainBody = TQStyleSheet::escape( plainBody );
//this is the same algoritm as in Kopete::Message::escapedBody();
- plainBody.replace( QString::fromLatin1( "\n" ), QString::fromLatin1( "<br/>" ) )
- .replace( QString::fromLatin1( "\t" ), QString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
- .replace( QRegExp( QString::fromLatin1( "\\s\\s" ) ), QString::fromLatin1( "&nbsp; " ) );
+ plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "<br/>" ) )
+ .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "&nbsp;&nbsp;&nbsp;&nbsp;" ) )
+ .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "&nbsp; " ) );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Outgoing Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ plainBody
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg )
body = Kopete::Message::escape( body );
}
- msg.setBody( QString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ msg.setBody( TQString::fromLatin1("<table width=\"100%\" border=0 cellspacing=0 cellpadding=0><tr><td class=\"highlight\"><font size=\"-1\"><b>")
+ i18n("Incoming Encrypted Message: ")
- + QString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ + TQString::fromLatin1("</b></font></td></tr><tr><td class=\"highlight\">")
+ body
- + QString::fromLatin1(" </td></tr></table>")
+ + TQString::fromLatin1(" </td></tr></table>")
, Kopete::Message::RichText );
}
@@ -230,11 +230,11 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(msg.direction() != Kopete::Message::Outbound)
return;
- QStringList keys;
- QPtrList<Kopete::Contact> contactlist = msg.to();
+ TQStringList keys;
+ TQPtrList<Kopete::Contact> contactlist = msg.to();
for( Kopete::Contact *c = contactlist.first(); c; c = contactlist.next() )
{
- QString tmpKey;
+ TQString tmpKey;
if( c->metaContact() )
{
if(c->metaContact()->pluginData( this, "encrypt_messages" ) == "off" )
@@ -251,7 +251,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
if(mAlsoMyKey) //encrypt also with the self key
keys.append( mPrivateKeyID );
- QString key = keys.join( " " );
+ TQString key = keys.join( " " );
if(key.isEmpty())
{
@@ -259,12 +259,12 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
return;
}
- QString original=msg.plainBody();
+ TQString original=msg.plainBody();
/* Code From KGPG */
////////////////// encode from editor
- QString encryptOptions="";
+ TQString encryptOptions="";
//if (utrust==true)
encryptOptions+=" --always-trust ";
@@ -279,7 +279,7 @@ void CryptographyPlugin::slotOutgoingMessage( Kopete::Message& msg )
// if (selec==NULL) {KMessageBox::sorry(Kopete::UI::Global::mainWidget(),i18n("You have not chosen an encryption key..."));return;}
- QString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions);
+ TQString resultat=KgpgInterface::KgpgEncryptText(original,key,encryptOptions);
if (!resultat.isEmpty())
{
msg.setBody(resultat,Kopete::Message::PlainText);
@@ -295,7 +295,7 @@ void CryptographyPlugin::slotSelectContactKey()
Kopete::MetaContact *m=Kopete::ContactList::self()->selectedMetaContacts().first();
if(!m)
return;
- QString key = m->pluginData( this, "gpgKey" );
+ TQString key = m->pluginData( this, "gpgKey" );
CryptographySelectUserKey *opts = new CryptographySelectUserKey( key, m );
opts->exec();
if( opts->result() )
@@ -308,14 +308,14 @@ void CryptographyPlugin::slotSelectContactKey()
void CryptographyPlugin::slotForgetCachedPass()
{
- m_cachedPass=QCString();
+ m_cachedPass=TQCString();
m_cachedPass_timer->stop();
}
void CryptographyPlugin::slotNewKMM(Kopete::ChatSession *KMM)
{
- connect(this , SIGNAL( destroyed(QObject*)) ,
- new CryptographyGUIClient(KMM) , SLOT(deleteLater()));
+ connect(this , TQT_SIGNAL( destroyed(TQObject*)) ,
+ new CryptographyGUIClient(KMM) , TQT_SLOT(deleteLater()));
}
diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h
index 506617cc..f34bd175 100644
--- a/kopete/plugins/cryptography/cryptographyplugin.h
+++ b/kopete/plugins/cryptography/cryptographyplugin.h
@@ -50,12 +50,12 @@ public:
};
static CryptographyPlugin *plugin();
- static QCString cachedPass();
- static void setCachedPass(const QCString &pass);
+ static TQCString cachedPass();
+ static void setCachedPass(const TQCString &pass);
static bool passphraseHandling();
- static const QRegExp isHTML;
+ static const TQRegExp isHTML;
- CryptographyPlugin( QObject *parent, const char *name, const QStringList &args );
+ CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args );
~CryptographyPlugin();
public slots:
@@ -74,14 +74,14 @@ private slots:
private:
static CryptographyPlugin* pluginStatic_;
Kopete::SimpleMessageHandlerFactory *m_inboundHandler;
- QCString m_cachedPass;
- QTimer *m_cachedPass_timer;
+ TQCString m_cachedPass;
+ TQTimer *m_cachedPass_timer;
//cache messages for showing
- QMap<QString, QString> m_cachedMessages;
+ TQMap<TQString, TQString> m_cachedMessages;
//Settings
- QString mPrivateKeyID;
+ TQString mPrivateKeyID;
int mCacheMode;
unsigned int mCacheTime;
bool mAlsoMyKey;
diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp
index 1039aac8..8e1b96ee 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.cpp
+++ b/kopete/plugins/cryptography/cryptographypreferences.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <klineedit.h>
#include <kgenericfactory.h>
@@ -27,12 +27,12 @@
typedef KGenericFactory<CryptographyPreferences> CryptographyPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography"))
-CryptographyPreferences::CryptographyPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
+CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args)
: KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args)
{
// Add actuall widget generated from ui file.
preferencesDialog = new CryptographyPrefsUI(this);
- connect (preferencesDialog->m_selectOwnKey , SIGNAL(pressed()) , this , SLOT(slotSelectPressed()));
+ connect (preferencesDialog->m_selectOwnKey , TQT_SIGNAL(pressed()) , this , TQT_SLOT(slotSelectPressed()));
setMainWidget( preferencesDialog ,"Cryptography Plugin");
}
@@ -40,7 +40,7 @@ void CryptographyPreferences::slotSelectPressed()
{
KgpgSelKey opts(this,0,false);
opts.exec();
- if (opts.result()==QDialog::Accepted)
+ if (opts.result()==TQDialog::Accepted)
preferencesDialog->PGP_private_key->setText(opts.getkeyID());
}
diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h
index 057eacf1..6053e96b 100644
--- a/kopete/plugins/cryptography/cryptographypreferences.h
+++ b/kopete/plugins/cryptography/cryptographypreferences.h
@@ -30,7 +30,7 @@ class KAutoConfig;
class CryptographyPreferences : public KCAutoConfigModule {
Q_OBJECT
public:
- CryptographyPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList());
private:
CryptographyPrefsUI *preferencesDialog;
private slots: // Public slots
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
index 4f1cc35e..ae92647b 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp
@@ -17,8 +17,8 @@
#include <klocale.h>
#include <klineedit.h>
-#include <qpushbutton.h>
-#include <qlabel.h>
+#include <tqpushbutton.h>
+#include <tqlabel.h>
#include "cryptographyuserkey_ui.h"
#include "kopetemetacontact.h"
@@ -26,14 +26,14 @@
#include "cryptographyselectuserkey.h"
-CryptographySelectUserKey::CryptographySelectUserKey(const QString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok )
+CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete::MetaContact *mc) : KDialogBase( 0l, "CryptographySelectUserKey", /*modal = */true, i18n("Select Contact's Public Key") , KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok )
{
m_metaContact=mc;
view = new CryptographyUserKey_ui(this,"CryptographyUserKey_ui");
setMainWidget(view);
- connect (view->m_selectKey , SIGNAL(clicked()) , this , SLOT(slotSelectPressed()));
- connect (view->m_removeButton , SIGNAL(clicked()) , this , SLOT(slotRemovePressed()));
+ connect (view->m_selectKey , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotSelectPressed()));
+ connect (view->m_removeButton , TQT_SIGNAL(clicked()) , this , TQT_SLOT(slotRemovePressed()));
view->m_titleLabel->setText(i18n("Select public key for %1").arg(mc->displayName()));
view->m_editKey->setText(key);
@@ -45,12 +45,12 @@ CryptographySelectUserKey::~CryptographySelectUserKey()
void CryptographySelectUserKey::slotSelectPressed()
{
popupPublic *dialog=new popupPublic(this, "public_keys", 0,false);
- connect(dialog,SIGNAL(selectedKey(QString &,QString,bool,bool)),this,SLOT(keySelected(QString &)));
+ connect(dialog,TQT_SIGNAL(selectedKey(TQString &,TQString,bool,bool)),this,TQT_SLOT(keySelected(TQString &)));
dialog->show();
}
-void CryptographySelectUserKey::keySelected(QString &key)
+void CryptographySelectUserKey::keySelected(TQString &key)
{
view->m_editKey->setText(key);
}
@@ -60,7 +60,7 @@ void CryptographySelectUserKey::slotRemovePressed()
view->m_editKey->setText("");
}
-QString CryptographySelectUserKey::publicKey() const
+TQString CryptographySelectUserKey::publicKey() const
{
return view->m_editKey->text();
}
diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h
index 1a8828cf..7ca5ec8e 100644
--- a/kopete/plugins/cryptography/cryptographyselectuserkey.h
+++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h
@@ -30,14 +30,14 @@ class CryptographyUserKey_ui;
class CryptographySelectUserKey : public KDialogBase {
Q_OBJECT
public:
- CryptographySelectUserKey(const QString &key, Kopete::MetaContact *mc);
+ CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc);
~CryptographySelectUserKey();
- QString publicKey() const;
+ TQString publicKey() const;
private slots:
- void keySelected(QString &);
+ void keySelected(TQString &);
void slotSelectPressed();
/** No descriptions */
void slotRemovePressed();
diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp
index 51b35a63..e41e246d 100644
--- a/kopete/plugins/cryptography/kgpginterface.cpp
+++ b/kopete/plugins/cryptography/kgpginterface.cpp
@@ -26,7 +26,7 @@
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kprocio.h>
@@ -40,10 +40,10 @@ KgpgInterface::KgpgInterface()
KgpgInterface::~KgpgInterface()
{}
-QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Options)
+TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString Options)
{
FILE *fp;
- QString dests,encResult;
+ TQString dests,encResult;
char buffer[200];
userIDs=userIDs.stripWhiteSpace();
@@ -59,7 +59,7 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt
}
dests+=" --recipient "+userIDs;
- QCString gpgcmd = "echo -n ";
+ TQCString gpgcmd = "echo -n ";
gpgcmd += KShellProcess::quote( text ).utf8();
gpgcmd += " | gpg --no-secmem-warning --no-tty ";
gpgcmd += Options.local8Bit();
@@ -75,17 +75,17 @@ QString KgpgInterface::KgpgEncryptText(QString text,QString userIDs, QString Opt
if( !encResult.isEmpty() )
return encResult;
else
- return QString::null;
+ return TQString::null;
}
-QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
+TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID)
{
FILE *fp,*pass;
- QString encResult;
+ TQString encResult;
char buffer[200];
int counter=0,ppass[2];
- QCString password = CryptographyPlugin::cachedPass();
+ TQCString password = CryptographyPlugin::cachedPass();
bool passphraseHandling=CryptographyPlugin::passphraseHandling();
while ((counter<3) && (encResult.isEmpty()))
@@ -94,16 +94,16 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
if(passphraseHandling && password.isNull())
{
/// pipe for passphrase
- //userID=QString::fromUtf8(userID);
+ //userID=TQString::fromUtf8(userID);
userID.replace('<',"&lt;");
- QString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
+ TQString passdlg=i18n("Enter passphrase for <b>%1</b>:").arg(userID);
if (counter>1)
- passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(QString::number(4-counter)));
+ passdlg.prepend(i18n("<b>Bad passphrase</b><br> You have %1 tries left.<br>").arg(TQString::number(4-counter)));
/// pipe for passphrase
int code=KPasswordDialog::getPassword(password,passdlg);
- if (code!=QDialog::Accepted)
- return QString::null;
+ if (code!=TQDialog::Accepted)
+ return TQString::null;
CryptographyPlugin::setCachedPass(password);
}
@@ -116,29 +116,29 @@ QString KgpgInterface::KgpgDecryptText(QString text,QString userID)
fclose(pass);
}
- QCString gpgcmd="echo ";
+ TQCString gpgcmd="echo ";
gpgcmd += KShellProcess::quote(text).utf8();
gpgcmd += " | gpg --no-secmem-warning --no-tty ";
if(passphraseHandling)
- gpgcmd += "--passphrase-fd " + QString::number(ppass[0]).local8Bit();
+ gpgcmd += "--passphrase-fd " + TQString::number(ppass[0]).local8Bit();
gpgcmd += " -d ";
////////// encode with untrusted keys or armor if checked by user
fp = popen(gpgcmd, "r");
while ( fgets( buffer, sizeof(buffer), fp))
- encResult += QString::fromUtf8(buffer);
+ encResult += TQString::fromUtf8(buffer);
pclose(fp);
- password = QCString();
+ password = TQCString();
}
if( !encResult.isEmpty() )
return encResult;
else
- return QString::null;
+ return TQString::null;
}
-QString KgpgInterface::checkForUtf8(QString txt)
+TQString KgpgInterface::checkForUtf8(TQString txt)
{
// code borrowed from gpa
@@ -147,7 +147,7 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* Make sure the encoding is UTF-8.
* Test structure suggested by Werner Koch */
if (txt.isEmpty())
- return QString::null;
+ return TQString::null;
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
@@ -157,17 +157,17 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
if (txt.find("\\x")==-1)
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
// if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
- str[0] = (char) QString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
+ str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
txt.replace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
else
- return QString::fromUtf8(QString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
+ return TQString::fromUtf8(TQString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
}
diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h
index b70bc68a..f324359e 100644
--- a/kopete/plugins/cryptography/kgpginterface.h
+++ b/kopete/plugins/cryptography/kgpginterface.h
@@ -26,8 +26,8 @@
/**
* Encrypt a file using gpg.
*/
-//class KgpgEncryptFile : public QObject {
-class KgpgInterface : public QObject {
+//class KgpgEncryptFile : public TQObject {
+class KgpgInterface : public TQObject {
Q_OBJECT
@@ -39,26 +39,26 @@ class KgpgInterface : public QObject {
/**Encrypt text function
- * @param text QString text to be encrypted.
+ * @param text TQString text to be encrypted.
* @param userIDs the recipients key id's.
* @param Options String with the wanted gpg options. ex: "--armor"
* returns the encrypted text or empty string if encyption failed
*/
- static QString KgpgEncryptText(QString text,QString userIDs, QString Options="");
+ static TQString KgpgEncryptText(TQString text,TQString userIDs, TQString Options="");
/**Decrypt text function
- * @param text QString text to be decrypted.
- * @param userID QString the name of the decryption key (only used to prompt user for passphrase)
+ * @param text TQString text to be decrypted.
+ * @param userID TQString the name of the decryption key (only used to prompt user for passphrase)
*/
- static QString KgpgDecryptText(QString text,QString userID);
-// static QString KgpgDecryptFileToText(KURL srcUrl,QString userID);
+ static TQString KgpgDecryptText(TQString text,TQString userID);
+// static TQString KgpgDecryptFileToText(KURL srcUrl,TQString userID);
/*
* Destructor for the class.
*/
~KgpgInterface();
- static QString checkForUtf8(QString txt);
+ static TQString checkForUtf8(TQString txt);
private slots:
@@ -69,12 +69,12 @@ signals:
/**
* @internal structure for communication
*/
- QString message,tempKeyFile,userIDs,txtprocess,output;
- QCString passphrase;
+ TQString message,tempKeyFile,userIDs,txtprocess,output;
+ TQCString passphrase;
bool deleteSuccess,konsLocal,anonymous,txtsent,decfinished,decok,badmdc;
int signSuccess;
int step,signb,sigsearch;
- QString konsSignKey, konsKeyID;
+ TQString konsSignKey, konsKeyID;
/**
diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp
index 70f76598..88078ece 100644
--- a/kopete/plugins/cryptography/kgpgselkey.cpp
+++ b/kopete/plugins/cryptography/kgpgselkey.cpp
@@ -23,12 +23,12 @@
#include <unistd.h>
#include <sys/wait.h>
-#include <qlayout.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
#include <klistview.h>
#include <klocale.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kprocess.h>
#include <kiconloader.h>
@@ -38,11 +38,11 @@
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////// Secret key selection dialog, used when user wants to sign a key
-KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
+KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
{
- QString keyname;
- QWidget *page = new QWidget(this);
- QLabel *labeltxt;
+ TQString keyname;
+ TQWidget *page = new TQWidget(this);
+ TQLabel *labeltxt;
KIconLoader *loader = KGlobal::iconLoader();
keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20);
@@ -54,22 +54,22 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
keysListpr->setShowSortIndicator(true);
keysListpr->setFullWidth(true);
- labeltxt=new QLabel(i18n("Choose secret key:"),page);
- QVBoxLayout *vbox=new QVBoxLayout(page,3);
+ labeltxt=new TQLabel(i18n("Choose secret key:"),page);
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,3);
vbox->addWidget(labeltxt);
vbox->addWidget(keysListpr);
if (showlocal==true)
{
- local = new QCheckBox(i18n("Local signature (cannot be exported)"),page);
+ local = new TQCheckBox(i18n("Local signature (cannot be exported)"),page);
vbox->addWidget(local);
}
FILE *fp,*fp2;
- QString tst,tst2;
+ TQString tst,tst2;
char line[130];
- // FIXME: Why use popen instead of KProcess, QProcess or KProcIO?!?
+ // FIXME: Why use popen instead of KProcess, TQProcess or KProcIO?!?
// Are we interested in having buffer overflows now? - Martijn
fp = popen( "gpg --no-tty --with-colon --list-secret-keys", "r" );
while ( fgets( line, sizeof(line), fp))
@@ -77,12 +77,12 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
tst=line;
if (tst.startsWith("sec"))
{
- const QString trust=tst.section(':',1,1);
- QString val=tst.section(':',6,6);
- QString id=QString("0x"+tst.section(':',4,4).right(8));
+ const TQString trust=tst.section(':',1,1);
+ TQString val=tst.section(':',6,6);
+ TQString id=TQString("0x"+tst.section(':',4,4).right(8));
if (val.isEmpty())
val=i18n("Unlimited");
- QString tr;
+ TQString tr;
switch( trust[0] )
{
case 'o':
@@ -122,14 +122,14 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
tst=tst.section(":",9,9);
// FIXME: Same here: don't use popen! - Martijn
- fp2 = popen( QString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" );
+ fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" );
bool dead=true;
while ( fgets( line, sizeof(line), fp2))
{
tst2=line;
if (tst2.startsWith("pub"))
{
- const QString trust2=tst2.section(':',1,1);
+ const TQString trust2=tst2.section(':',1,1);
switch( trust2[0] )
{
case 'f':
@@ -156,8 +156,8 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
pclose(fp);
- QObject::connect(keysListpr,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotpreOk()));
- QObject::connect(keysListpr,SIGNAL(clicked(QListViewItem *)),this,SLOT(slotSelect(QListViewItem *)));
+ TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk()));
+ TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *)));
keysListpr->setSelected(keysListpr->firstChild(),true);
@@ -167,17 +167,17 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog
setMainWidget(page);
}
-QString KgpgSelKey::extractKeyName(QString fullName)
+TQString KgpgSelKey::extractKeyName(TQString fullName)
{
- QString kMail;
+ TQString kMail;
if (fullName.find("<")!=-1)
{
kMail=fullName.section('<',-1,-1);
kMail.truncate(kMail.length()-1);
}
- QString kName=fullName.section('<',0,0);
+ TQString kName=fullName.section('<',0,0);
if (kName.find("(")!=-1) kName=kName.section('(',0,0);
- return QString(kMail+" ("+kName+")").stripWhiteSpace();
+ return TQString(kMail+" ("+kName+")").stripWhiteSpace();
}
void KgpgSelKey::slotpreOk()
@@ -196,7 +196,7 @@ void KgpgSelKey::slotOk()
accept();
}
-void KgpgSelKey::slotSelect(QListViewItem *item)
+void KgpgSelKey::slotSelect(TQListViewItem *item)
{
if (item==NULL) return;
if (item->depth()!=0)
@@ -207,9 +207,9 @@ void KgpgSelKey::slotSelect(QListViewItem *item)
}
-QString KgpgSelKey::getkeyID()
+TQString KgpgSelKey::getkeyID()
{
- QString userid;
+ TQString userid;
///// emit selected key
if (keysListpr->currentItem()==NULL) return("");
else
@@ -222,9 +222,9 @@ QString KgpgSelKey::getkeyID()
}
}
-QString KgpgSelKey::getkeyMail()
+TQString KgpgSelKey::getkeyMail()
{
- QString username;
+ TQString username;
///// emit selected key
if (keysListpr->currentItem()==NULL) return("");
else
diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h
index 11bcc498..f511f999 100644
--- a/kopete/plugins/cryptography/kgpgselkey.h
+++ b/kopete/plugins/cryptography/kgpgselkey.h
@@ -27,15 +27,15 @@ class KListView;
class QCheckBox;
typedef struct gpgKey{
- QString gpgkeymail;
- QString gpgkeyname;
- QString gpgkeyid;
- QString gpgkeytrust;
- QString gpgkeyvalidity;
- QString gpgkeysize;
- QString gpgkeycreation;
- QString gpgkeyexpiration;
- QString gpgkeyalgo;
+ TQString gpgkeymail;
+ TQString gpgkeyname;
+ TQString gpgkeyid;
+ TQString gpgkeytrust;
+ TQString gpgkeyvalidity;
+ TQString gpgkeysize;
+ TQString gpgkeycreation;
+ TQString gpgkeyexpiration;
+ TQString gpgkeyalgo;
};
class KgpgSelKey : public KDialogBase
@@ -43,19 +43,19 @@ class KgpgSelKey : public KDialogBase
Q_OBJECT
public:
- KgpgSelKey( QWidget *parent = 0, const char *name = 0,bool showlocal=true);
+ KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true);
KListView *keysListpr;
-QPixmap keyPair;
-QCheckBox *local;
+TQPixmap keyPair;
+TQCheckBox *local;
private slots:
void slotOk();
void slotpreOk();
-void slotSelect(QListViewItem *item);
-QString extractKeyName(QString fullName);
+void slotSelect(TQListViewItem *item);
+TQString extractKeyName(TQString fullName);
public:
- QString getkeyID();
- QString getkeyMail();
+ TQString getkeyID();
+ TQString getkeyMail();
bool getlocal();
};
diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp
index 36008bcf..9c1561f1 100644
--- a/kopete/plugins/cryptography/popuppublic.cpp
+++ b/kopete/plugins/cryptography/popuppublic.cpp
@@ -18,18 +18,18 @@
***************************************************************************/
//////////////////////////////////////////////////////// code for choosing a public key from a list for encryption
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qapplication.h>
-#include <qlabel.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqapplication.h>
+#include <tqlabel.h>
#include <kdeversion.h>
#include <klistview.h>
@@ -57,13 +57,13 @@
class UpdateViewItem2 : public KListViewItem
{
public:
- UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align);
- virtual QString key(int c,bool ) const;
+ UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align);
+ virtual TQString key(int c,bool ) const;
bool def;
};
-UpdateViewItem2::UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault)
+UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault)
: KListViewItem(parent)
{
def=isDefault;
@@ -73,28 +73,28 @@ def=isDefault;
}
-void UpdateViewItem2::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment)
+void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{
if ((def) && (column<2)) {
- QFont font(p->font());
+ TQFont font(p->font());
font.setBold(true);
p->setFont(font);
}
KListViewItem::paintCell(p, cg, column, width, alignment);
}
-QString UpdateViewItem2 :: key(int c,bool ) const
+TQString UpdateViewItem2 :: key(int c,bool ) const
{
return text(c).lower();
}
/////////////// main view
-popupPublic::popupPublic(QWidget *parent, const char *name,QString sfile,bool filemode,KShortcut goDefaultKey):
+popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey):
KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true)
{
- QWidget *page = plainPage();
- QVBoxLayout *vbox=new QVBoxLayout(page,0,spacingHint());
+ TQWidget *page = plainPage();
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint());
vbox->setAutoAdd(true);
setButtonText(KDialogBase::Details,i18n("Options"));
@@ -111,17 +111,17 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile));
fmode=filemode;
- QHButtonGroup *hBar=new QHButtonGroup(page);
- //hBar->setFrameStyle(QFrame::NoFrame);
+ TQHButtonGroup *hBar=new TQHButtonGroup(page);
+ //hBar->setFrameStyle(TQFrame::NoFrame);
hBar->setMargin(0);
- QToolButton *clearSearch = new QToolButton(hBar);
+ TQToolButton *clearSearch = new TQToolButton(hBar);
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left"
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left"
: "locationbar_erase"));
- (void) new QLabel(i18n("Search: "),hBar);
+ (void) new TQLabel(i18n("Search: "),hBar);
KListViewSearchLine* listViewSearch = new KListViewSearchLine(hBar);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
keysList = new KListView( page );
keysList->addColumn(i18n("Name"));
@@ -136,54 +136,54 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
keysList->setFullWidth(true);
keysList->setAllColumnsShowFocus(true);
keysList->setSelectionModeExt(KListView::Extended);
- keysList->setColumnWidthMode(0,QListView::Manual);
- keysList->setColumnWidthMode(1,QListView::Manual);
+ keysList->setColumnWidthMode(0,TQListView::Manual);
+ keysList->setColumnWidthMode(1,TQListView::Manual);
keysList->setColumnWidth(0,210);
keysList->setColumnWidth(1,210);
- boutonboxoptions=new QButtonGroup(5,Qt::Vertical ,page,0);
+ boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0);
KActionCollection *actcol=new KActionCollection(this);
- (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
+ (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
- CBarmor=new QCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
- CBuntrusted=new QCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
- CBhideid=new QCheckBox(i18n("Hide user id"),boutonboxoptions);
+ CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
+ CBuntrusted=new TQCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
+ CBhideid=new TQCheckBox(i18n("Hide user id"),boutonboxoptions);
setDetailsWidget(boutonboxoptions);
- QWhatsThis::add
+ TQWhatsThis::add
(keysList,i18n("<b>Public keys list</b>: select the key that will be used for encryption."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBarmor,i18n("<b>ASCII encryption</b>: makes it possible to open the encrypted file/message in a text editor"));
- QWhatsThis::add
+ TQWhatsThis::add
(CBhideid,i18n("<b>Hide user ID</b>: Do not put the keyid into encrypted packets. This option hides the receiver "
"of the message and is a countermeasure against traffic analysis. It may slow down the decryption process because "
"all available secret keys are tried."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBuntrusted,i18n("<b>Allow encryption with untrusted keys</b>: when you import a public key, it is usually "
"marked as untrusted and you cannot use it unless you sign it in order to make it 'trusted'. Checking this "
"box enables you to use any key, even if it has not be signed."));
if (filemode) {
- QWidget *parentBox=new QWidget(boutonboxoptions);
- QHBoxLayout *shredBox=new QHBoxLayout(parentBox,0);
- //shredBox->setFrameStyle(QFrame::NoFrame);
+ TQWidget *parentBox=new TQWidget(boutonboxoptions);
+ TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0);
+ //shredBox->setFrameStyle(TQFrame::NoFrame);
//shredBox->setMargin(0);
- CBshred=new QCheckBox(i18n("Shred source file"),parentBox);
- QWhatsThis::add
+ CBshred=new TQCheckBox(i18n("Shred source file"),parentBox);
+ TQWhatsThis::add
(CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
- QString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
+ TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox );
shredBox->addWidget(CBshred);
shredBox->addWidget(warn);
}
- CBsymmetric=new QCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
- QWhatsThis::add
+ CBsymmetric=new TQCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
+ TQWhatsThis::add
(CBsymmetric,i18n("<b>Symmetrical encryption</b>: encryption does not use keys. You just need to give a password "
"to encrypt/decrypt the file"));
- QObject::connect(CBsymmetric,SIGNAL(toggled(bool)),this,SLOT(isSymetric(bool)));
+ TQObject::connect(CBsymmetric,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(isSymetric(bool)));
//BEGIN modified for Kopete
@@ -206,27 +206,27 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
//END modified for Kopete
/*if (KGpgSettings::allowCustomEncryptionOptions()) {
- QHButtonGroup *bGroup = new QHButtonGroup(page);
- //bGroup->setFrameStyle(QFrame::NoFrame);
- (void) new QLabel(i18n("Custom option:"),bGroup);
+ TQHButtonGroup *bGroup = new TQHButtonGroup(page);
+ //bGroup->setFrameStyle(TQFrame::NoFrame);
+ (void) new TQLabel(i18n("Custom option:"),bGroup);
KLineEdit *optiontxt=new KLineEdit(bGroup);
optiontxt->setText(customOptions);
- QWhatsThis::add
+ TQWhatsThis::add
(optiontxt,i18n("<b>Custom option</b>: for experienced users only, allows you to enter a gpg command line option, like: '--armor'"));
- QObject::connect(optiontxt,SIGNAL(textChanged ( const QString & )),this,SLOT(customOpts(const QString & )));
+ TQObject::connect(optiontxt,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(customOpts(const TQString & )));
}*/
- QObject::connect(keysList,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotOk()));
-// QObject::connect(this,SIGNAL(okClicked()),this,SLOT(crypte()));
- QObject::connect(CBuntrusted,SIGNAL(toggled(bool)),this,SLOT(refresh(bool)));
+ TQObject::connect(keysList,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotOk()));
+// TQObject::connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(crypte()));
+ TQObject::connect(CBuntrusted,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(refresh(bool)));
char line[200]="\0";
FILE *fp2;
- seclist=QString::null;
+ seclist=TQString::null;
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r");
while ( fgets( line, sizeof(line), fp2))
{
- QString readLine=line;
+ TQString readLine=line;
if (readLine.startsWith("sec")) seclist+=", 0x"+readLine.section(":",4,4).right(8);
}
pclose(fp2);
@@ -251,7 +251,7 @@ accept();
void popupPublic::enable()
{
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
current->setVisible(true);
@@ -265,7 +265,7 @@ void popupPublic::enable()
void popupPublic::sort()
{
bool reselect=false;
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
@@ -289,7 +289,7 @@ void popupPublic::sort()
}
if (reselect) {
- QListViewItem *firstvisible;
+ TQListViewItem *firstvisible;
firstvisible=keysList->firstChild();
while (firstvisible->isVisible()!=true) {
firstvisible=firstvisible->nextSibling();
@@ -310,14 +310,14 @@ void popupPublic::isSymetric(bool state)
}
-void popupPublic::customOpts(const QString &str)
+void popupPublic::customOpts(const TQString &str)
{
customOptions=str;
}
void popupPublic::slotGotoDefaultKey()
{
- /*QListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
+ /*TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
keysList->clearSelection();
keysList->setCurrentItem(myDefaulKey);
keysList->setSelected(myDefaulKey,true);
@@ -335,14 +335,14 @@ void popupPublic::refresh(bool state)
void popupPublic::refreshkeys()
{
keysList->clear();
- /*QStringList groups= QStringList::split(",", KGpgSettings::groups());
+ /*TQStringList groups= TQStringList::split(",", KGpgSettings::groups());
if (!groups.isEmpty())
{
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- if (!QString(*it).isEmpty())
+ if (!TQString(*it).isEmpty())
{
- UpdateViewItem2 *item=new UpdateViewItem2(keysList,QString(*it),QString::null,QString::null,false);
+ UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false);
item->setPixmap(0,keyGroup);
}
}
@@ -350,14 +350,14 @@ void popupPublic::refreshkeys()
KProcIO *encid=new KProcIO();
*encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
///////// when process ends, update dialog infos
- QObject::connect(encid, SIGNAL(processExited(KProcess *)),this, SLOT(slotpreselect()));
- QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *)));
+ TQObject::connect(encid, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotpreselect()));
+ TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *)));
encid->start(KProcess::NotifyOnExit,true);
}
void popupPublic::slotpreselect()
{
-QListViewItem *it;
+TQListViewItem *it;
//if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2);
//else {
it=keysList->firstChild();
@@ -386,20 +386,20 @@ void popupPublic::slotprocread(KProcIO *p)
{
///////////////////////////////////////////////////////////////// extract encryption keys
bool dead;
- QString tst,keyname,keymail;
+ TQString tst,keyname,keymail;
- QString defaultKey ;// = KGpgSettings::defaultKey().right(8);
+ TQString defaultKey ;// = KGpgSettings::defaultKey().right(8);
while (p->readln(tst)!=-1) {
if (tst.startsWith("pub")) {
- QStringList keyString=QStringList::split(":",tst,true);
+ TQStringList keyString=TQStringList::split(":",tst,true);
dead=false;
- const QString trust=keyString[1];
- QString val=keyString[6];
- QString id=QString("0x"+keyString[4].right(8));
+ const TQString trust=keyString[1];
+ TQString val=keyString[6];
+ TQString id=TQString("0x"+keyString[4].right(8));
if (val.isEmpty())
val=i18n("Unlimited");
- QString tr;
+ TQString tr;
switch( trust[0] ) {
case 'o':
untrustedList<<id;
@@ -442,7 +442,7 @@ void popupPublic::slotprocread(KProcIO *p)
//if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=tst;//.section('(',0,0);
}
@@ -480,9 +480,9 @@ void popupPublic::slotOk()
////// emit selected data
kdDebug(2100)<<"Ok pressed"<<endl;
- QStringList selectedKeys;
- QString userid;
- QPtrList<QListViewItem> list=keysList->selectedItems();
+ TQStringList selectedKeys;
+ TQString userid;
+ TQPtrList<TQListViewItem> list=keysList->selectedItems();
for ( uint i = 0; i < list.count(); ++i )
if ( list.at(i) ) {
@@ -492,7 +492,7 @@ kdDebug(2100)<<"Ok pressed"<<endl;
if (selectedKeys.isEmpty() && !CBsymmetric->isChecked())
return;
kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
- QStringList returnOptions;
+ TQStringList returnOptions;
if (CBuntrusted->isChecked())
returnOptions<<"--always-trust";
if (CBarmor->isChecked())
@@ -500,14 +500,14 @@ kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
if (CBhideid->isChecked())
returnOptions<<"--throw-keyid";
/*if ((KGpgSettings::allowCustomEncryptionOptions()) && (!customOptions.stripWhiteSpace().isEmpty()))
- returnOptions.operator+ (QStringList::split(QString(" "),customOptions.simplifyWhiteSpace()));*/
+ returnOptions.operator+ (TQStringList::split(TQString(" "),customOptions.simplifyWhiteSpace()));*/
//hide();
//MODIFIED for kopete
if (fmode)
- emit selectedKey(selectedKeys.first(),QString(),CBshred->isChecked(),CBsymmetric->isChecked());
+ emit selectedKey(selectedKeys.first(),TQString(),CBshred->isChecked(),CBsymmetric->isChecked());
else
- emit selectedKey(selectedKeys.first(),QString(),false,CBsymmetric->isChecked());
+ emit selectedKey(selectedKeys.first(),TQString(),false,CBsymmetric->isChecked());
accept();
}
diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h
index 7e147385..ac8ab068 100644
--- a/kopete/plugins/cryptography/popuppublic.h
+++ b/kopete/plugins/cryptography/popuppublic.h
@@ -36,22 +36,22 @@ class popupPublic : public KDialogBase //QDialog
Q_OBJECT
public:
- popupPublic(QWidget *parent=0, const char *name=0,QString sfile="",bool filemode=false,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home));
+ popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home));
~popupPublic();
KListView *keysList;
- QCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
+ TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
bool fmode,trusted;
- QPixmap keyPair,keySingle,keyGroup;
- QString seclist;
- QStringList untrustedList;
+ TQPixmap keyPair,keySingle,keyGroup;
+ TQString seclist;
+ TQStringList untrustedList;
private:
KConfig *config;
- QButtonGroup *boutonboxoptions;
- QString customOptions;
+ TQButtonGroup *boutonboxoptions;
+ TQString customOptions;
private slots:
- void customOpts(const QString &);
+ void customOpts(const TQString &);
void slotprocread(KProcIO *);
void slotpreselect();
void refreshkeys();
@@ -69,7 +69,7 @@ protected slots:
virtual void slotOk();
signals:
- void selectedKey(QString & ,QString,bool,bool);
+ void selectedKey(TQString & ,TQString,bool,bool);
void keyListFilled();
};