summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am2
-rw-r--r--src/otrguiclient.cpp26
-rw-r--r--src/otrguiclient.h7
-rw-r--r--src/otrlchatinterface.cpp146
-rw-r--r--src/otrlchatinterface.h42
-rw-r--r--src/otrlconfinterface.cpp38
-rw-r--r--src/otrlconfinterface.h30
-rw-r--r--src/otrplugin.cpp102
-rw-r--r--src/otrplugin.h7
-rw-r--r--src/otrpreferences.cpp64
-rw-r--r--src/otrpreferences.h9
-rw-r--r--src/otrprefs.ui44
-rw-r--r--src/privkeypopup.cpp6
-rw-r--r--src/privkeypopup.h5
-rw-r--r--src/privkeypopupui.ui10
-rw-r--r--src/smppopup.cpp8
-rw-r--r--src/smppopup.h3
-rw-r--r--src/smppopupui.ui14
-rw-r--r--src/verifypopup.cpp12
-rw-r--r--src/verifypopup.h3
-rw-r--r--src/verifypopupui.ui16
21 files changed, 300 insertions, 294 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index d8255f6..a914694 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -4,7 +4,7 @@ messages:
extractrc `find . -name \*.ui -o -name \*.rc` > rc.cpp
$(XGETTEXT) --keyword=i18n *.cpp -o $(top_srcdir)/po/kopete_otr.pot
-INCLUDES = $(all_includes) -I$(kde_includes)/kopete -I$(kde_includes)/kopete/ui
+INCLUDES = $(all_includes) -I$(kde_includes)/kopete -I$(kde_includes)/kde/kopete -I$(kde_includes)/kopete/ui -I$(kde_includes)/kde/kopete/ui
kde_module_LTLIBRARIES = kcm_kopete_otr.la kopete_otr.la
diff --git a/src/otrguiclient.cpp b/src/otrguiclient.cpp
index 544ae94..00d36e3 100644
--- a/src/otrguiclient.cpp
+++ b/src/otrguiclient.cpp
@@ -39,30 +39,30 @@
*/
-OtrGUIClient::OtrGUIClient( Kopete::ChatSession *parent, const char *name )
-: QObject( parent, name ), KXMLGUIClient( parent )
+OtrGUIClient::OtrGUIClient( Kopete::ChatSession *tqparent, const char *name )
+: TQObject( tqparent, name ), KXMLGUIClient( tqparent )
{
setInstance( OTRPlugin::plugin()->instance() );
connect( OTRPlugin::plugin(),
- SIGNAL( destroyed( QObject * ) ), this,
- SLOT( deleteLater() )
+ TQT_SIGNAL( destroyed( TQObject * ) ), this,
+ TQT_SLOT( deleteLater() )
);
- connect(this, SIGNAL( signalOtrChatsession(Kopete::ChatSession*, bool) ), OTRPlugin::plugin(), SLOT(slotEnableOtr(Kopete::ChatSession*, bool)));
+ connect(this, TQT_SIGNAL( signalOtrChatsession(Kopete::ChatSession*, bool) ), OTRPlugin::plugin(), TQT_SLOT(slotEnableOtr(Kopete::ChatSession*, bool)));
- connect( OTRPlugin::plugin(), SIGNAL( goneSecure( Kopete::ChatSession *, int ) ),
- this, SLOT( encryptionEnabled( Kopete::ChatSession *, int ) ) );
+ connect( OTRPlugin::plugin(), TQT_SIGNAL( goneSecure( Kopete::ChatSession *, int ) ),
+ this, TQT_SLOT( encryptionEnabled( Kopete::ChatSession *, int ) ) );
- connect( this, SIGNAL( signalVerifyFingerprint( Kopete::ChatSession * ) ), OTRPlugin::plugin(), SLOT(slotVerifyFingerprint( Kopete::ChatSession * )) );
+ connect( this, TQT_SIGNAL( signalVerifyFingerprint( Kopete::ChatSession * ) ), OTRPlugin::plugin(), TQT_SLOT(slotVerifyFingerprint( Kopete::ChatSession * )) );
- m_manager = parent;
+ m_manager = tqparent;
otrActionMenu = new KActionMenu(i18n("OTR Settings"),"otr_disabled", actionCollection(), "otr_settings");
otrActionMenu->setDelayed( false );
- actionEnableOtr = new KAction(i18n( "Start OTR session" ), "otr_private", 0,this,SLOT(slotEnableOtr()),actionCollection(), "enable_otr");
- actionDisableOtr = new KAction(i18n("End OTR session"), "otr_disabled",0, this,SLOT(slotDisableOtr()), actionCollection(), "disable_otr");
- actionVerifyFingerprint = new KAction(i18n("Authenticate Contact"), "signature",0, this,SLOT(slotVerifyFingerprint()), actionCollection(), "verify_fingerprint");
+ actionEnableOtr = new KAction(i18n( "Start OTR session" ), "otr_private", 0,this,TQT_SLOT(slotEnableOtr()),actionCollection(), "enable_otr");
+ actionDisableOtr = new KAction(i18n("End OTR session"), "otr_disabled",0, this,TQT_SLOT(slotDisableOtr()), actionCollection(), "disable_otr");
+ actionVerifyFingerprint = new KAction(i18n("Authenticate Contact"), "signature",0, this,TQT_SLOT(slotVerifyFingerprint()), actionCollection(), "verify_fingerprint");
otrActionMenu->insert(actionEnableOtr);
otrActionMenu->insert(actionDisableOtr);
@@ -70,7 +70,7 @@ OtrGUIClient::OtrGUIClient( Kopete::ChatSession *parent, const char *name )
setXMLFile("otrchatui.rc");
- encryptionEnabled( parent, OtrlChatInterface::self()->privState(parent) );
+ encryptionEnabled( tqparent, OtrlChatInterface::self()->privState(tqparent) );
}
diff --git a/src/otrguiclient.h b/src/otrguiclient.h
index 3776195..cbca74b 100644
--- a/src/otrguiclient.h
+++ b/src/otrguiclient.h
@@ -22,7 +22,7 @@
#ifndef OTRGUICLIENT_H
#define OTRGUICLIENT_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kxmlguiclient.h>
//#include <kio/job.h>
@@ -47,13 +47,14 @@ namespace Kopete { class ChatSession; }
-class OtrGUIClient : public QObject , public KXMLGUIClient
+class OtrGUIClient : public TQObject , public KXMLGUIClient
{
Q_OBJECT
+ TQ_OBJECT
public:
- OtrGUIClient( Kopete::ChatSession *parent, const char *name=0L );
+ OtrGUIClient( Kopete::ChatSession *tqparent, const char *name=0L );
~OtrGUIClient();
diff --git a/src/otrlchatinterface.cpp b/src/otrlchatinterface.cpp
index 85f1e7f..65d0df6 100644
--- a/src/otrlchatinterface.cpp
+++ b/src/otrlchatinterface.cpp
@@ -44,14 +44,14 @@
#include <kanimwidget.h>
#include <kpushbutton.h>
-#include <qvbox.h>
-#include <qlabel.h>
-#include <qnamespace.h>
-#include <qeventloop.h>
-#include <qapplication.h>
-#include <qfile.h>
-#include <qfileinfo.h>
-#include <qptrlist.h>
+#include <tqvbox.h>
+#include <tqlabel.h>
+#include <tqnamespace.h>
+#include <tqeventloop.h>
+#include <tqapplication.h>
+#include <tqfile.h>
+#include <tqfileinfo.h>
+#include <tqptrlist.h>
#include "otrlchatinterface.h"
#include "otrguiclient.h"
@@ -74,7 +74,7 @@ static OtrlPolicy policy(void *opdata, ConnContext *context){
kdDebug() << "Disabling OTR for: " << session->protocol()->pluginId() << endl;
return OTRL_POLICY_NEVER;
}
- QString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
+ TQString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
switch( policy.toInt( &noerr, 10 ) ){
case 1:
return OTRL_POLICY_ALWAYS;
@@ -93,7 +93,7 @@ static void create_privkey(void *opdata, const char *accountname, const char *pr
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
- PrivKeyPopup *popup = new PrivKeyPopup( session->view()->mainWidget(), i18n("Generating private key"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop );
+ PrivKeyPopup *popup = new PrivKeyPopup( session->view()->mainWidget(), i18n("Generating private key"), TQt::WStyle_Dialog | TQt::WStyle_StaysOnTop );
KAnimWidget *anim = new KAnimWidget( "kde", 72, popup->animFrame, "kopete" );
anim->start();
anim->show();
@@ -103,7 +103,7 @@ static void create_privkey(void *opdata, const char *accountname, const char *pr
KeyGenThread *keyGenThread = new KeyGenThread( accountname, protocol );
keyGenThread->start();
while( !keyGenThread->wait(100) ){
- qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers, 100);
+ tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers, 100);
}
popup->setCloseLock( false );
popup->close();
@@ -112,7 +112,7 @@ static void create_privkey(void *opdata, const char *accountname, const char *pr
static int is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient){
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
Kopete::ContactPtrList list = session->members();
- for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
+ for ( TQPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
if( contact->contactId().compare( recipient ) == 0 ){
Kopete::OnlineStatus status = session->contactOnlineStatus( contact );
if( status == Kopete::OnlineStatus::Unknown){
@@ -128,12 +128,12 @@ static int is_logged_in(void *opdata, const char *accountname, const char *proto
}
static void inject_message( void *opdata, const char *accountname, const char *protocol, const char *recipient, const char *message ){
- //KMessageBox::information( NULL, QString(accountname) + ":" + QString(protocol) + ":" + QString(recipient) + ":" + QString(message) );
+ //KMessageBox::information( NULL, TQString(accountname) + ":" + TQString(protocol) + ":" + TQString(recipient) + ":" + TQString(message) );
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
Kopete::ContactPtrList list = session->members();
- for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
+ for ( TQPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
if( contact->contactId().compare( recipient ) == 0 ){
- Kopete::Message msg( session->account()->myself(), contact, QString( message ), Kopete::Message::Outbound );
+ Kopete::Message msg( session->account()->myself(), contact, TQString( message ), Kopete::Message::Outbound );
session->sendMessage( msg );
return;
}
@@ -141,16 +141,16 @@ static void inject_message( void *opdata, const char *accountname, const char *p
}
static void notify(void *opdata, OtrlNotifyLevel level, const char *accountname, const char *protocol, const char *username, const char *title, const char *primary, const char *secondary){
- KMessageBox::information(NULL, QString( primary ) + QString( secondary ), QString( title ) );
+ KMessageBox::information(NULL, TQString( primary ) + TQString( secondary ), TQString( title ) );
}
static int display_otr_message( void *opdata, const char *accountname, const char *protocol, const char *username, const char *message ){
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
Kopete::ContactPtrList list = session->members();
- for ( QPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
+ for ( TQPtrListIterator<Kopete::Contact> it( list ); Kopete::Contact *contact = it.current(); ++it ){
if( contact->contactId().compare( username ) == 0 ){
- Kopete::Message msg( session->members().getFirst(), session->account()->myself(), QString( message ), Kopete::Message::Internal );
- msg.setBody( QString( message ), Kopete::Message::RichText );
+ Kopete::Message msg( session->members().getFirst(), session->account()->myself(), TQString( message ), Kopete::Message::Internal );
+ msg.setBody( TQString( message ), Kopete::Message::RichText );
session->appendMessage( msg );
return 0;
}
@@ -175,13 +175,13 @@ static void protocol_name_free(void *opdata, const char *protocol_name){
static void new_fingerprint(void *opdata, OtrlUserState us, const char *accountname, const char *protocol, const char *username, unsigned char fingerprint[20]){
kdDebug() << "Received a new Fingerprint" << endl;
Kopete::ChatSession *session= ((Kopete::ChatSession*)opdata);
- Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Received a new fingerprint from <a>%1</a>. You should authenticate this contact.</b>").arg( session->members().getFirst()->contactId() ), Kopete::Message::Internal, Kopete::Message::RichText );
+ Kopete::Message msg( session->members().getFirst(), session->account()->myself(), i18n("<b>Received a new fingerprint from <a>%1</a>. You should authenticate this contact.</b>").tqarg( session->members().getFirst()->contactId() ), Kopete::Message::Internal, Kopete::Message::RichText );
session->appendMessage( msg );
}
static void write_fingerprints(void *opdata){
kdDebug() << "Writing fingerprints" << endl;
- otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ otrl_privkey_write_fingerprints( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
}
static void gone_secure(void *opdata, ConnContext *context){
@@ -257,11 +257,11 @@ OtrlChatInterface::OtrlChatInterface(){
userstate = otrl_userstate_create();
- otrl_privkey_read( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ otrl_privkey_read( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
- otrl_privkey_read_fingerprints(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
+ otrl_privkey_read_fingerprints(userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
}
@@ -284,8 +284,8 @@ OtrlUserState OtrlChatInterface::getUserstate(){
}
-int OtrlChatInterface::decryptMessage( QString *msg, QString accountId,
- QString protocol, QString contactId , Kopete::ChatSession *chatSession){
+int OtrlChatInterface::decryptMessage( TQString *msg, TQString accountId,
+ TQString protocol, TQString contactId , Kopete::ChatSession *chatSession){
int ignoremessage;
char *newMessage = NULL;
@@ -300,7 +300,7 @@ int OtrlChatInterface::decryptMessage( QString *msg, QString accountId,
tlv = otrl_tlv_find(tlvs, OTRL_TLV_DISCONNECTED);
if( tlv ){
- Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>%1</b> has ended the OTR session. You should do the same.").arg(chatSession->members().getFirst()->contactId()) , Kopete::Message::Internal, Kopete::Message::RichText );
+ Kopete::Message msg( chatSession->members().getFirst(), chatSession->account()->myself(), i18n("<b>%1</b> has ended the OTR session. You should do the same.").tqarg(chatSession->members().getFirst()->contactId()) , Kopete::Message::Internal, Kopete::Message::RichText );
chatSession->appendMessage( msg );
OTRPlugin::plugin()->emitGoneSecure( chatSession, 3 );
@@ -315,7 +315,7 @@ int OtrlChatInterface::decryptMessage( QString *msg, QString accountId,
if (nextMsg != OTRL_SMP_EXPECT1){
abortSMP( context, chatSession );
} else {
- SMPPopup *popup = new SMPPopup( chatSession->view()->mainWidget(), i18n("Enter authentication secret"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop, context, chatSession, false );
+ SMPPopup *popup = new SMPPopup( chatSession->view()->mainWidget(), i18n("Enter authentication secret"), TQt::WStyle_Dialog | TQt::WStyle_StaysOnTop, context, chatSession, false );
popup->show();
}
}
@@ -378,42 +378,42 @@ int OtrlChatInterface::decryptMessage( QString *msg, QString accountId,
if( !ignoremessage ){
// message is decrypted
if( newMessage != NULL ){
- *msg = QString::fromUtf8(newMessage);
+ *msg = TQString::fromUtf8(newMessage);
otrl_message_free( newMessage );
- msg->replace( '\n', "<br>", false );
+ msg->tqreplace( TQString('\n'), TQString("<br>"), false );
}
}
return ignoremessage;
}
-QString OtrlChatInterface::encryptMessage( QString msg, QString accountId,
- QString protocol, QString contactId , Kopete::ChatSession *chatSession ){
+TQString OtrlChatInterface::encryptMessage( TQString msg, TQString accountId,
+ TQString protocol, TQString contactId , Kopete::ChatSession *chatSession ){
int err;
char * newMessage;
if( otrl_proto_message_type( msg ) == OTRL_MSGTYPE_NOTOTR ){
- msg.replace( '<', "&lt;", false );
+ msg.tqreplace( TQString('<'), TQString("&lt;"), false );
err = otrl_message_sending( userstate, &ui_ops, chatSession, accountId.latin1(), protocol.latin1(), contactId.latin1(), msg.utf8(), NULL, &newMessage, NULL, NULL );
if( err != 0 ){
msg = i18n("Encryption error");
} else {
if( newMessage != NULL ){
- msg = QString::fromUtf8( newMessage );
+ msg = TQString::fromUtf8( newMessage );
otrl_message_free( newMessage );
}
}
}
OtrlMessageType type = otrl_proto_message_type( msg );
if( type == OTRL_MSGTYPE_NOTOTR | type == OTRL_MSGTYPE_TAGGEDPLAINTEXT ){
- msg.replace( "&lt;", "<", false );
+ msg.tqreplace( "&lt;", "<", false );
}
return msg;
}
-QString OtrlChatInterface::getDefaultQuery( QString accountId ){
+TQString OtrlChatInterface::getDefaultQuery( TQString accountId ){
char *message;
message = otrl_proto_default_query_msg( accountId.latin1(), OTRL_POLICY_ALLOW_V2 );
- QString msg( message );
+ TQString msg( message );
otrl_message_free( message );
return msg;
}
@@ -423,12 +423,12 @@ void OtrlChatInterface::disconnectSession( Kopete::ChatSession *chatSession ){
OTRPlugin::plugin()->emitGoneSecure( chatSession, false );
Kopete::Message msg( chatSession->account()->myself(), chatSession->members().getFirst(), i18n("Terminating OTR session."), Kopete::Message::Internal );
-// msg.setBody( QString( message ), Kopete::Message::RichText );
+// msg.setBody( TQString( message ), Kopete::Message::RichText );
chatSession->appendMessage( msg );
}
-bool OtrlChatInterface::shouldDiscard( QString message ){
+bool OtrlChatInterface::shouldDiscard( TQString message ){
if( !message.isEmpty() && !message.isNull() ){
switch( otrl_proto_message_type( message.latin1() ) ){
case OTRL_MSGTYPE_TAGGEDPLAINTEXT:
@@ -470,11 +470,11 @@ int OtrlChatInterface::privState( Kopete::ChatSession *session ){
return 0;
}
-QString OtrlChatInterface::formatContact(QString contactId){
+TQString OtrlChatInterface::formatContact(TQString contactId){
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->findMetaContactByContactId(contactId);
if( metaContact ){
- QString displayName = metaContact->displayName();
+ TQString displayName = metaContact->displayName();
if((displayName != contactId) && !displayName.isNull()){
return displayName + " (" + contactId+")";
}
@@ -487,7 +487,7 @@ void OtrlChatInterface::verifyFingerprint( Kopete::ChatSession *session ){
context = otrl_context_find( userstate, session->members().getFirst()->contactId().latin1(), session->account()->accountId().latin1(), session->protocol()->displayName().latin1(), 0, NULL, NULL, NULL);
- SMPPopup *popup = new SMPPopup( session->view()->mainWidget(), i18n("Enter authentication secret"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop, context, session, true );
+ SMPPopup *popup = new SMPPopup( session->view()->mainWidget(), i18n("Enter authentication secret"), TQt::WStyle_Dialog | TQt::WStyle_StaysOnTop, context, session, true );
popup->show();
@@ -504,14 +504,14 @@ void OtrlChatInterface::setTrust( Kopete::ChatSession *session, bool trust ){
otrl_context_set_trust( fingerprint, NULL );
}
kdDebug() << "Writing fingerprints" << endl;
- otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ otrl_privkey_write_fingerprints( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
OTRPlugin::plugin()->emitGoneSecure( session, privState( session ) );
} else {
kdDebug() << "could not find fingerprint" << endl;
}
}
-Fingerprint *OtrlChatInterface::findFingerprint( QString account ){
+Fingerprint *OtrlChatInterface::findFingerprint( TQString account ){
ConnContext *context;
for( context = userstate->context_root; context != NULL; context = context->next ){
@@ -524,7 +524,7 @@ Fingerprint *OtrlChatInterface::findFingerprint( QString account ){
return NULL;
}
-QString OtrlChatInterface::findActiveFingerprint( Kopete::ChatSession *session ){
+TQString OtrlChatInterface::findActiveFingerprint( Kopete::ChatSession *session ){
ConnContext *context;
char hash[45];
@@ -555,16 +555,16 @@ bool OtrlChatInterface::isVerified( Kopete::ChatSession *session ){
void OtrlChatInterface::updateKeyfile( Kopete::Account *account ){
// Updating private keys from <=0.3
kdDebug() << "updating keys" << endl;
- QFile keyfile( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
- QString line;
- QString file;
+ TQFile keyfile( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ TQString line;
+ TQString file;
if( keyfile.open( IO_ReadWrite ) ){
kdDebug() << "file open" << endl;
while( keyfile.readLine( line, 200 ) != -1){
- if( line.find( "protocol" ) != -1 ){
- if( line.find( account->accountLabel() ) != -1 ){
- line.replace( account->accountLabel(), account->protocol()->displayName() );
+ if( line.tqfind( "protocol" ) != -1 ){
+ if( line.tqfind( account->accountLabel() ) != -1 ){
+ line.tqreplace( account->accountLabel(), account->protocol()->displayName() );
kdDebug() << "Successfully updated keyfile for account " << account->accountId() << endl;
}
}
@@ -576,20 +576,20 @@ void OtrlChatInterface::updateKeyfile( Kopete::Account *account ){
keyfile.writeBlock( file.latin1(), file.length() );
keyfile.close();
otrl_privkey_forget_all( userstate );
- otrl_privkey_read( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ otrl_privkey_read( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
file = "";
line = "";
// Updating fingerprints from <=0.3
kdDebug() << "updating fingerprints" << endl;
- QFile fingerprintfile( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ TQFile fingerprintfile( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
if( fingerprintfile.open( IO_ReadWrite ) ){
kdDebug() << "file open" << endl;
while( fingerprintfile.readLine( line, 200 ) != -1){
- int pos = line.findRev( account->accountLabel() );
+ int pos = line.tqfindRev( account->accountLabel() );
if( pos != -1 ){
- line.replace( pos, account->accountLabel().length(), account->protocol()->displayName() );
+ line.tqreplace( pos, account->accountLabel().length(), account->protocol()->displayName() );
kdDebug() << "Successfully updated fingerprint for account " << account->accountId() << endl;
}
file.append( line );
@@ -600,21 +600,21 @@ void OtrlChatInterface::updateKeyfile( Kopete::Account *account ){
fingerprintfile.writeBlock( file.latin1(), file.length() );
fingerprintfile.close();
otrl_context_forget_all( userstate );
- otrl_privkey_read_fingerprints(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
+ otrl_privkey_read_fingerprints(userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints", NULL, NULL);
}
-void OtrlChatInterface::checkFilePermissions( QString file ){
- if( QFile::exists( file ) ){
- QFile privkeys( file );
- QFileInfo privkeysInfo( privkeys );
- if( !privkeysInfo.permission( QFileInfo::ReadOwner | QFileInfo::WriteOwner ) |
- privkeysInfo.permission( QFileInfo::ReadGroup ) |
- privkeysInfo.permission( QFileInfo::WriteGroup ) |
- privkeysInfo.permission( QFileInfo::ExeGroup ) |
- privkeysInfo.permission( QFileInfo::ReadOther ) |
- privkeysInfo.permission( QFileInfo::WriteOther ) |
- privkeysInfo.permission( QFileInfo::ExeOther ) ){
+void OtrlChatInterface::checkFilePermissions( TQString file ){
+ if( TQFile::exists( file ) ){
+ TQFile privkeys( file );
+ TQFileInfo privkeysInfo( privkeys );
+ if( !privkeysInfo.permission( TQFileInfo::ReadOwner | TQFileInfo::WriteOwner ) |
+ privkeysInfo.permission( TQFileInfo::ReadGroup ) |
+ privkeysInfo.permission( TQFileInfo::WriteGroup ) |
+ privkeysInfo.permission( TQFileInfo::ExeGroup ) |
+ privkeysInfo.permission( TQFileInfo::ReadOther ) |
+ privkeysInfo.permission( TQFileInfo::WriteOther ) |
+ privkeysInfo.permission( TQFileInfo::ExeOther ) ){
kdDebug() << "Permissions of OTR storage file are wrong! Correcting..." << endl;
chmod( file, 0600);
}
@@ -622,13 +622,13 @@ void OtrlChatInterface::checkFilePermissions( QString file ){
}
-/*bool OtrlChatInterface::verifyQuestion( Kopete::ChatSession *session, QString fingerprint ){
+/*bool OtrlChatInterface::verifyQuestion( Kopete::ChatSession *session, TQString fingerprint ){
kdDebug() << "searching for Fingerprint" << endl;
if( fingerprint != NULL ){
int doVerify = KMessageBox::questionYesNo(
NULL,
- i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").arg( formatContact(session->members().getFirst()->contactId())) + "\n\n" + fingerprint + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"),
+ i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").tqarg( formatContact(session->members().getFirst()->contactId())) + "\n\n" + fingerprint + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"),
i18n("Verify fingerprint") );
if( doVerify == KMessageBox::Yes ){
return true;
@@ -654,7 +654,7 @@ void OtrlChatInterface::abortSMP( ConnContext *context, Kopete::ChatSession *ses
}
}
-void OtrlChatInterface::respondSMP( ConnContext *context, Kopete::ChatSession *session, QString secret, bool initiate ){
+void OtrlChatInterface::respondSMP( ConnContext *context, Kopete::ChatSession *session, TQString secret, bool initiate ){
if( initiate ){
context = otrl_context_find( userstate, session->members().getFirst()->contactId().latin1(), session->account()->accountId().latin1(), session->protocol()->displayName().latin1(), 0, NULL, NULL, NULL);
otrl_message_initiate_smp( userstate, &ui_ops, session, context, (unsigned char*)secret.latin1(), secret.length() );
@@ -670,7 +670,7 @@ void OtrlChatInterface::respondSMP( ConnContext *context, Kopete::ChatSession *s
/****************** KeyGenThread *******************/
-KeyGenThread::KeyGenThread( QString accountname, QString protocol ){
+KeyGenThread::KeyGenThread( TQString accountname, TQString protocol ){
this->accountname = accountname;
this->protocol = protocol;
}
@@ -678,8 +678,8 @@ KeyGenThread::KeyGenThread( QString accountname, QString protocol ){
void KeyGenThread::run()
{
- kdDebug() << "Creating private key... Storing to: " + QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true)) + "privkeys" << endl;
- otrl_privkey_generate(OtrlChatInterface::self()->getUserstate(), QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys", accountname, protocol);
- OtrlChatInterface::self()->checkFilePermissions( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ kdDebug() << "Creating private key... Storing to: " + TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true)) + "privkeys" << endl;
+ otrl_privkey_generate(OtrlChatInterface::self()->getUserstate(), TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys", accountname, protocol);
+ OtrlChatInterface::self()->checkFilePermissions( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
}
diff --git a/src/otrlchatinterface.h b/src/otrlchatinterface.h
index 9fcf632..1fa499b 100644
--- a/src/otrlchatinterface.h
+++ b/src/otrlchatinterface.h
@@ -25,11 +25,11 @@
* @author Michael Zanetti
*/
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qthread.h>
-#include <qmutex.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqthread.h>
+#include <tqmutex.h>
#include <kopetechatsession.h>
@@ -40,47 +40,47 @@ extern "C" {
#include <libotr/userstate.h>
}
-class OtrlChatInterface: public QObject
+class OtrlChatInterface: public TQObject
{
public:
~OtrlChatInterface();
static OtrlChatInterface *self();
- int decryptMessage( QString *msg, QString accountId, QString protocol, QString contactId, Kopete::ChatSession *chatSession );
- QString encryptMessage( QString msg, QString accountId,
- QString protocol, QString contactId , Kopete::ChatSession *chatSession );
- QString getDefaultQuery( QString accountId );
+ int decryptMessage( TQString *msg, TQString accountId, TQString protocol, TQString contactId, Kopete::ChatSession *chatSession );
+ TQString encryptMessage( TQString msg, TQString accountId,
+ TQString protocol, TQString contactId , Kopete::ChatSession *chatSession );
+ TQString getDefaultQuery( TQString accountId );
void disconnectSession( Kopete::ChatSession *chatSession );
void setPolicy( OtrlPolicy policy );
- bool shouldDiscard( QString message );
+ bool shouldDiscard( TQString message );
OtrlUserState getUserstate();
int privState( Kopete::ChatSession *session );
- QString formatContact(QString contactId);
+ TQString formatContact(TQString contactId);
bool isVerified( Kopete::ChatSession *session );
void updateKeyfile( Kopete::Account *account );
- void checkFilePermissions( QString file );
-// bool verifyQuestion( Kopete::ChatSession *session, QString fingerprint );
- QString findActiveFingerprint( Kopete::ChatSession *session );
+ void checkFilePermissions( TQString file );
+// bool verifyQuestion( Kopete::ChatSession *session, TQString fingerprint );
+ TQString findActiveFingerprint( Kopete::ChatSession *session );
void verifyFingerprint( Kopete::ChatSession *session );
void abortSMP( ConnContext *context, Kopete::ChatSession *session );
- void respondSMP( ConnContext *context, Kopete::ChatSession *session, QString secret, bool initiate );
+ void respondSMP( ConnContext *context, Kopete::ChatSession *session, TQString secret, bool initiate );
void setTrust( Kopete::ChatSession *session, bool trust );
private:
OtrlChatInterface();
static OtrlChatInterface *mSelf;
- Fingerprint *findFingerprint( QString username );
+ Fingerprint *findFingerprint( TQString username );
};
- class KeyGenThread : public QThread {
+ class KeyGenThread : public TQThread {
private:
- QString accountname;
- QString protocol;
+ TQString accountname;
+ TQString protocol;
public:
- KeyGenThread( QString accountname, QString protocol );
+ KeyGenThread( TQString accountname, TQString protocol );
virtual void run();
};
diff --git a/src/otrlconfinterface.cpp b/src/otrlconfinterface.cpp
index 5d95d06..ff60bf2 100644
--- a/src/otrlconfinterface.cpp
+++ b/src/otrlconfinterface.cpp
@@ -23,8 +23,8 @@
* @author Michael Zanetti
*/
-#include <qapplication.h>
-#include <qeventloop.h>
+#include <tqapplication.h>
+#include <tqeventloop.h>
#include <kopetechatsession.h>
#include <kopeteaccount.h>
@@ -45,7 +45,7 @@
/*********************** Konstruktor/Destruktor **********************/
-OtrlConfInterface::OtrlConfInterface( QWidget *preferencesDialog ){
+OtrlConfInterface::OtrlConfInterface( TQWidget *preferencesDialog ){
this->preferencesDialog = preferencesDialog;
@@ -62,8 +62,8 @@ OtrlConfInterface::~ OtrlConfInterface(){
/*********************** Functions for kcm module ************************/
-QString OtrlConfInterface::getPrivFingerprint( QString accountId, QString protocol){
-// if (otrl_privkey_read(userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" ) == 0){
+TQString OtrlConfInterface::getPrivFingerprint( TQString accountId, TQString protocol){
+// if (otrl_privkey_read(userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" ) == 0){
char fingerprint[45];
if( otrl_privkey_fingerprint( userstate, fingerprint, accountId.latin1(), protocol.latin1()) != 0 ){
return fingerprint;
@@ -73,7 +73,7 @@ QString OtrlConfInterface::getPrivFingerprint( QString accountId, QString protoc
}
-bool OtrlConfInterface::hasPrivFingerprint( QString accountId, QString protocol ){
+bool OtrlConfInterface::hasPrivFingerprint( TQString accountId, TQString protocol ){
char fingerprint[45];
if( otrl_privkey_fingerprint( userstate, fingerprint, accountId.latin1(), protocol.latin1() ) != 0 ){
return true;
@@ -82,8 +82,8 @@ bool OtrlConfInterface::hasPrivFingerprint( QString accountId, QString protocol
}
-void OtrlConfInterface::generateNewPrivKey( QString accountId, QString protocol ){
- PrivKeyPopup *popup = new PrivKeyPopup( preferencesDialog, i18n("Generating private key"), Qt::WStyle_Dialog | Qt::WStyle_StaysOnTop );
+void OtrlConfInterface::generateNewPrivKey( TQString accountId, TQString protocol ){
+ PrivKeyPopup *popup = new PrivKeyPopup( preferencesDialog, i18n("Generating private key"), TQt::WStyle_Dialog | TQt::WStyle_StaysOnTop );
KAnimWidget *anim = new KAnimWidget( "kde", 72, popup->animFrame, "kopete" );
anim->start();
anim->show();
@@ -93,18 +93,18 @@ void OtrlConfInterface::generateNewPrivKey( QString accountId, QString protocol
KeyGenThread *keyGenThread = new KeyGenThread ( accountId, protocol );
keyGenThread->start();
while( !keyGenThread->wait(100) ){
- qApp->eventLoop()->processEvents(QEventLoop::ExcludeUserInput | QEventLoop::ExcludeSocketNotifiers, 100);
+ tqApp->eventLoop()->processEvents(TQEventLoop::ExcludeUserInput | TQEventLoop::ExcludeSocketNotifiers, 100);
}
popup->setCloseLock( false );
popup->close();
}
-QValueList<QString[5]> OtrlConfInterface::readAllFingerprints(){
+TQValueList<TQString[5]> OtrlConfInterface::readAllFingerprints(){
ConnContext *context;
Fingerprint *fingerprint;
- QString entry[5];
+ TQString entry[5];
char hash[45];
- QValueList<QString[5]> list;
+ TQValueList<TQString[5]> list;
for( context = userstate->context_root; context != NULL; context = context->next ){
fingerprint = context->fingerprint_root.next;
@@ -137,7 +137,7 @@ QValueList<QString[5]> OtrlConfInterface::readAllFingerprints(){
return list;
}
-void OtrlConfInterface::verifyFingerprint( QString strFingerprint, bool trust ){
+void OtrlConfInterface::verifyFingerprint( TQString strFingerprint, bool trust ){
Fingerprint *fingerprint;
fingerprint = findFingerprint( strFingerprint );
@@ -149,13 +149,13 @@ void OtrlConfInterface::verifyFingerprint( QString strFingerprint, bool trust ){
otrl_context_set_trust( fingerprint, NULL );
}
kdDebug() << "Writing fingerprints" << endl;
- otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ otrl_privkey_write_fingerprints( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
} else {
kdDebug() << "could not find fingerprint" << endl;
}
}
-bool OtrlConfInterface::isVerified( QString strFingerprint ){
+bool OtrlConfInterface::isVerified( TQString strFingerprint ){
Fingerprint *fingerprint;
fingerprint = findFingerprint( strFingerprint );
@@ -170,15 +170,15 @@ bool OtrlConfInterface::isVerified( QString strFingerprint ){
}
-void OtrlConfInterface::forgetFingerprint( QString strFingerprint ){
+void OtrlConfInterface::forgetFingerprint( TQString strFingerprint ){
Fingerprint *fingerprint;
fingerprint = findFingerprint( strFingerprint );
otrl_context_forget_fingerprint( fingerprint, 1 );
- otrl_privkey_write_fingerprints( userstate, QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ otrl_privkey_write_fingerprints( userstate, TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
}
-Fingerprint *OtrlConfInterface::findFingerprint( QString strFingerprint ){
+Fingerprint *OtrlConfInterface::findFingerprint( TQString strFingerprint ){
// const char *cFingerprint = ;
// Fingerprint *fingerprintRoot = &userstate->context_root->fingerprint_root;
ConnContext *context;
@@ -199,7 +199,7 @@ Fingerprint *OtrlConfInterface::findFingerprint( QString strFingerprint ){
return foundFingerprint;
}
-bool OtrlConfInterface::isEncrypted( QString strFingerprint ){
+bool OtrlConfInterface::isEncrypted( TQString strFingerprint ){
Fingerprint *fingerprint;
Fingerprint *tmpFingerprint;
Fingerprint *foundFingerprint;
diff --git a/src/otrlconfinterface.h b/src/otrlconfinterface.h
index bb89b3c..5cfe244 100644
--- a/src/otrlconfinterface.h
+++ b/src/otrlconfinterface.h
@@ -25,10 +25,10 @@
* @author Michael Zanetti
*/
-#include <qstring.h>
-#include <qptrlist.h>
-#include <qvaluelist.h>
-#include <qthread.h>
+#include <tqstring.h>
+#include <tqptrlist.h>
+#include <tqvaluelist.h>
+#include <tqthread.h>
#include <kopetechatsession.h>
@@ -45,22 +45,22 @@ class OtrlConfInterface
public:
~OtrlConfInterface();
- OtrlConfInterface( QWidget *preferencesDialog );
+ OtrlConfInterface( TQWidget *preferencesDialog );
- QString getPrivFingerprint( QString accountId, QString protocol );
- void generateNewPrivKey( QString accountId, QString protocol );
- QValueList<QString[5]> readAllFingerprints();
- bool hasPrivFingerprint( QString accountId, QString protocol);
- void forgetFingerprint( QString strFingerprint );
- void verifyFingerprint( QString strFingerprint, bool trust );
- bool isVerified( QString strFingerprint );
- bool isEncrypted( QString strFingerprint );
+ TQString getPrivFingerprint( TQString accountId, TQString protocol );
+ void generateNewPrivKey( TQString accountId, TQString protocol );
+ TQValueList<TQString[5]> readAllFingerprints();
+ bool hasPrivFingerprint( TQString accountId, TQString protocol);
+ void forgetFingerprint( TQString strFingerprint );
+ void verifyFingerprint( TQString strFingerprint, bool trust );
+ bool isVerified( TQString strFingerprint );
+ bool isEncrypted( TQString strFingerprint );
private:
OtrlUserState userstate;
- QWidget *preferencesDialog;
+ TQWidget *preferencesDialog;
- Fingerprint *findFingerprint( QString strFingerprint );
+ Fingerprint *findFingerprint( TQString strFingerprint );
};
#endif
diff --git a/src/otrplugin.cpp b/src/otrplugin.cpp
index 873c800..323ee44 100644
--- a/src/otrplugin.cpp
+++ b/src/otrplugin.cpp
@@ -18,11 +18,11 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qregexp.h>
-#include <qfile.h>
-#include <qcolor.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqregexp.h>
+#include <tqfile.h>
+#include <tqcolor.h>
#include <kdebug.h>
#include <kaction.h>
@@ -62,22 +62,22 @@ typedef KGenericFactory<OTRPlugin> OTRPluginFactory;
static const KAboutData aboutdata("kopete_otr", I18N_NOOP("OTR") , "0.7" );
K_EXPORT_COMPONENT_FACTORY( kopete_otr, OTRPluginFactory( &aboutdata ) )
-OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /* args */ )
-: Kopete::Plugin( OTRPluginFactory::instance(), parent, name )
+OTRPlugin::OTRPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ )
+: Kopete::Plugin( OTRPluginFactory::instance(), tqparent, name )
{
if( !pluginStatic_ )
pluginStatic_=this;
m_inboundHandler = new OtrMessageHandlerFactory(this);
- connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToSend( Kopete::Message & ) ),
- SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
-// connect( Kopete::ChatSessionManager::self(), SIGNAL( aboutToDisplay( Kopete::Message & ) ),
-// this, SLOT( slotIncomingMessage( Kopete::Message & ) ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToSend( Kopete::Message & ) ),
+ TQT_SLOT( slotOutgoingMessage( Kopete::Message & ) ) );
+// connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( aboutToDisplay( Kopete::Message & ) ),
+// this, TQT_SLOT( slotIncomingMessage( Kopete::Message & ) ) );
- connect( Kopete::ChatSessionManager::self(), SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
- this, SLOT( slotNewChatSessionWindow( Kopete::ChatSession * ) ) );
- QObject::connect( this, SIGNAL( settingsChanged() ), this, SLOT( slotSettingsChanged() ) );
+ connect( Kopete::ChatSessionManager::self(), TQT_SIGNAL( chatSessionCreated( Kopete::ChatSession * ) ),
+ this, TQT_SLOT( slotNewChatSessionWindow( Kopete::ChatSession * ) ) );
+ TQObject::connect( this, TQT_SIGNAL( settingsChanged() ), this, TQT_SLOT( slotSettingsChanged() ) );
@@ -85,25 +85,25 @@ OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /*
otrlChatInterface = OtrlChatInterface::self();
//update key files when an account is ready to use
- if( QFile::exists( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey" ) &&
- !QFile::exists( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" ) ){
+ if( TQFile::exists( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey" ) &&
+ !TQFile::exists( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" ) ){
kdDebug() << "Detected old format keyfile. Doing updates!" << endl;
kdDebug() << "Reading old keyfile..." << endl;
- QFile fpold( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" );
- QString line;
- QString file;
+ TQFile fpold( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey" );
+ TQString line;
+ TQString file;
if( fpold.open( IO_ReadWrite ) ){
while( fpold.readLine( line, 100 ) != -1){
file.append( line );
}
}
kdDebug() << "Writing new keyfile" << endl;
- QFile fpnew( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
+ TQFile fpnew( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkeys" );
fpnew.open( IO_ReadWrite );
fpnew.writeBlock( file.latin1(), file.length() );
fpnew.close();
kdDebug() << "Writing backup for old keyfile" << endl;
- QFile fpbup( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey.old" );
+ TQFile fpbup( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "privkey.old" );
fpbup.open( IO_ReadWrite );
fpbup.writeBlock( file.latin1(), file.length() );
fpbup.close();
@@ -111,7 +111,7 @@ OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /*
fpold.remove();
kdDebug() << "Reading old fingerprintsfile..." << endl;
- QFile fpfingerprintsold( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
+ TQFile fpfingerprintsold( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints" );
line = "";
file = "";
if( fpfingerprintsold.open( IO_ReadWrite ) ){
@@ -120,35 +120,35 @@ OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /*
}
}
kdDebug() << "Writing backup for old fingerprintsfile" << endl;
- QFile fpfingerprintsbup( QString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints.old" );
+ TQFile fpfingerprintsbup( TQString(KGlobal::dirs()->saveLocation("data", "kopete_otr/", true )) + "fingerprints.old" );
fpfingerprintsbup.open( IO_ReadWrite );
fpfingerprintsbup.writeBlock( file.latin1(), file.length() );
fpfingerprintsbup.close();
kdDebug() << "Waiting for accounts to update keyfile format" << endl;
- connect( Kopete::AccountManager::self(), SIGNAL( accountRegistered( Kopete::Account * ) ),
- this, SLOT( accountReady( Kopete::Account * ) ) );
+ connect( Kopete::AccountManager::self(), TQT_SIGNAL( accountRegistered( Kopete::Account * ) ),
+ this, TQT_SLOT( accountReady( Kopete::Account * ) ) );
}
// Checking file Permissions
- OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" );
- OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkeys" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints" );
// Check also file permissions for eventuallly old beckup files
- OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey.old" );
- OtrlChatInterface::self()->checkFilePermissions( QString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints.old" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "privkey.old" );
+ OtrlChatInterface::self()->checkFilePermissions( TQString( KGlobal::dirs()->saveLocation( "data", "kopete_otr/", true ) ) + "fingerprints.old" );
//setting the policy
slotSettingsChanged();
//adding menu to contaclists menubar and contacts popup menu
- QStringList policies;
+ TQStringList policies;
policies << i18n("&Default") << i18n("Al&ways") << i18n("&Opportunistic") << i18n("&Manual") << i18n("Ne&ver");
- otrPolicyMenu = new KSelectAction( i18n( "&OTR Policy" ), QString::fromLatin1("kopete_otr"), 0, actionCollection(), "otr_policy" );
+ otrPolicyMenu = new KSelectAction( i18n( "&OTR Policy" ), TQString::tqfromLatin1("kopete_otr"), 0, actionCollection(), "otr_policy" );
otrPolicyMenu->setItems( policies );
otrPolicyMenu->popupMenu()->insertSeparator( 1 );
otrPolicyMenu->setEnabled( false );
- connect( otrPolicyMenu, SIGNAL( activated() ), this, SLOT( slotSetPolicy() ) );
- connect( Kopete::ContactList::self(), SIGNAL( metaContactSelected( bool ) ), this, SLOT( slotSelectionChanged( bool ) ) );
+ connect( otrPolicyMenu, TQT_SIGNAL( activated() ), this, TQT_SLOT( slotSetPolicy() ) );
+ connect( Kopete::ContactList::self(), TQT_SIGNAL( metaContactSelected( bool ) ), this, TQT_SLOT( slotSelectionChanged( bool ) ) );
setXMLFile( "otrui.rc" );
@@ -157,9 +157,9 @@ OTRPlugin::OTRPlugin( QObject *parent, const char *name, const QStringList & /*
//Add GUI action to all already existing kmm
// (if the plugin is launched when kopete already runing)
- QValueList<Kopete::ChatSession*> sessions =
+ TQValueList<Kopete::ChatSession*> sessions =
Kopete::ChatSessionManager::self()->sessions();
- QValueListIterator<Kopete::ChatSession*> it;
+ TQValueListIterator<Kopete::ChatSession*> it;
for (it= sessions.begin(); it!=sessions.end() ; ++it){
slotNewChatSessionWindow( *it );
}
@@ -196,11 +196,11 @@ void OTRPlugin::slotNewChatSessionWindow( Kopete::ChatSession *KMM )
void OTRPlugin::slotOutgoingMessage( Kopete::Message& msg )
{
if( msg.direction() == Kopete::Message::Outbound ){
- QString plainBody = msg.plainBody();
- QString accountId = msg.manager()->account()->accountId();
+ TQString plainBody = msg.plainBody();
+ TQString accountId = msg.manager()->account()->accountId();
Kopete::Contact *contact = msg.to().first();
- QString encBody = otrlChatInterface->encryptMessage( plainBody, accountId, msg.manager()->account()->protocol()->displayName(), contact->contactId(), msg.manager() );
+ TQString encBody = otrlChatInterface->encryptMessage( plainBody, accountId, msg.manager()->account()->protocol()->displayName(), contact->contactId(), msg.manager() );
msg.setBody( encBody, Kopete::Message::Crypted );
if( !msg.plainBody().isEmpty() ){
messageCache.insert( encBody, plainBody );
@@ -212,19 +212,19 @@ void OTRPlugin::slotEnableOtr( Kopete::ChatSession *session, bool enable ){
if( enable ){
- QString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
+ TQString policy = session->members().getFirst()->metaContact()->pluginData( OTRPlugin::plugin(), "otr_policy" );
bool noerr;
KopeteOtrKcfg::self()->readConfig();
if( policy.toInt( &noerr, 10 ) == 4 || ( policy.toInt( &noerr, 10 ) == 0 && KopeteOtrKcfg::self()->rbNever() ) ){
Kopete::Message msg( session->account()->myself(), session->members(), i18n( "Your policy settings do not allow encrypted sessions to this contact." ), Kopete::Message::Internal, Kopete::Message::RichText );
session->appendMessage( msg );
} else {
- QString body = otrlChatInterface->getDefaultQuery( session->account()->accountId() );
- Kopete::Message msg1( session->account()->myself(), session->members().getFirst(), QString( body ), Kopete::Message::Outbound );
+ TQString body = otrlChatInterface->getDefaultQuery( session->account()->accountId() );
+ Kopete::Message msg1( session->account()->myself(), session->members().getFirst(), TQString( body ), Kopete::Message::Outbound );
if( otrlChatInterface->privState( session ) > 0 ){
- body = i18n("Attempting to refresh the OTR session with <b>%1</b>...").arg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
+ body = i18n("Attempting to refresh the OTR session with <b>%1</b>...").tqarg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
} else {
- body = i18n("Attempting to start a private OTR session with <b>%1</b>...").arg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
+ body = i18n("Attempting to start a private OTR session with <b>%1</b>...").tqarg( otrlChatInterface->formatContact( session->members().getFirst()->contactId() ) );
}
Kopete::Message msg2( session->account()->myself(), session->members().getFirst(), body, Kopete::Message::Internal, Kopete::Message::RichText );
@@ -260,20 +260,20 @@ void OTRPlugin::emitGoneSecure( Kopete::ChatSession *session, int status){
emit goneSecure( session, status );
}
-QMap<QString, QString> OTRPlugin::getMessageCache(){
+TQMap<TQString, TQString> OTRPlugin::getMessageCache(){
return messageCache;
}
void OtrMessageHandler::handleMessage( Kopete::MessageEvent *event ){
Kopete::Message msg = event->message();
Kopete::ChatSession *session = msg.manager();
- QMap<QString, QString> messageCache = OTRPlugin::plugin()->getMessageCache();
+ TQMap<TQString, TQString> messageCache = OTRPlugin::plugin()->getMessageCache();
if( msg.direction() == Kopete::Message::Inbound ){
- QString body = msg.parsedBody();
+ TQString body = msg.parsedBody();
kdDebug() << "Received Message: " << msg.parsedBody() << endl;
- QString accountId = msg.manager()->account()->accountId();
- QString contactId = msg.from()->contactId();
+ TQString accountId = msg.manager()->account()->accountId();
+ TQString contactId = msg.from()->contactId();
int ignoremessage = OtrlChatInterface::self()->decryptMessage( &body, accountId, msg.manager()->account()->protocol()->displayName(), contactId, msg.manager() );
msg.setBody( body, Kopete::Message::RichText );
if( ignoremessage | OtrlChatInterface::self()->shouldDiscard( msg.plainBody() ) ){
@@ -281,7 +281,7 @@ kdDebug() << "Received Message: " << msg.parsedBody() << endl;
return;
}
} else if( msg.direction() == Kopete::Message::Outbound ){
- if( messageCache.contains( msg.plainBody() ) ){
+ if( messageCache.tqcontains( msg.plainBody() ) ){
msg.setBody( messageCache[msg.plainBody()] );
messageCache.remove( messageCache[msg.plainBody()] );
if(messageCache.count() > 5) messageCache.clear();
@@ -314,7 +314,7 @@ void OTRPlugin::slotSelectionChanged( bool single){
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->selectedMetaContacts().first();
- QString policy = metaContact->pluginData( this, "otr_policy" );
+ TQString policy = metaContact->pluginData( this, "otr_policy" );
bool noerr;
if ( !policy.isEmpty() && policy != "null" )
@@ -328,7 +328,7 @@ void OTRPlugin::slotSetPolicy(){
kdDebug() << "Setting contact policy" << endl;
Kopete::MetaContact *metaContact = Kopete::ContactList::self()->selectedMetaContacts().first();
if( metaContact ){
- metaContact->setPluginData( this, "otr_policy", QString::number( otrPolicyMenu->currentItem() ) );
+ metaContact->setPluginData( this, "otr_policy", TQString::number( otrPolicyMenu->currentItem() ) );
}
}
diff --git a/src/otrplugin.h b/src/otrplugin.h
index 2ce051d..ba9d97e 100644
--- a/src/otrplugin.h
+++ b/src/otrplugin.h
@@ -68,16 +68,17 @@ public:
class OTRPlugin : public Kopete::Plugin
{
Q_OBJECT
+ TQ_OBJECT
public:
static OTRPlugin *plugin();
- OTRPlugin( QObject *parent, const char *name, const QStringList &args );
+ OTRPlugin( TQObject *tqparent, const char *name, const TQStringList &args );
~OTRPlugin();
void emitGoneSecure( Kopete::ChatSession *session, int status );
- QMap<QString, QString> getMessageCache();
+ TQMap<TQString, TQString> getMessageCache();
public slots:
@@ -96,7 +97,7 @@ private:
static OTRPlugin* pluginStatic_;
OtrMessageHandlerFactory *m_inboundHandler;
OtrlChatInterface *otrlChatInterface;
- QMap<QString, QString> messageCache;
+ TQMap<TQString, TQString> messageCache;
KSelectAction* otrPolicyMenu;
/* KActionMenu *otrPolicyMenuBar;
diff --git a/src/otrpreferences.cpp b/src/otrpreferences.cpp
index b056d58..c904475 100644
--- a/src/otrpreferences.cpp
+++ b/src/otrpreferences.cpp
@@ -18,17 +18,17 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qcombobox.h>
-#include <qstringlist.h>
-#include <qtable.h>
-#include <qpaintdevicemetrics.h>
-#include <qvbox.h>
-#include <qradiobutton.h>
-#include <qtabwidget.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqcombobox.h>
+#include <tqstringlist.h>
+#include <tqtable.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqvbox.h>
+#include <tqradiobutton.h>
+#include <tqtabwidget.h>
#include <kgenericfactory.h>
#include <kurlrequester.h>
@@ -57,10 +57,10 @@
typedef KGenericFactory<OTRPreferences> OTRPreferencesFactory;
K_EXPORT_COMPONENT_FACTORY( kcm_kopete_otr, OTRPreferencesFactory("kcm_kopete_otr"))
-OTRPreferences::OTRPreferences(QWidget *parent, const char* /*name*/, const QStringList &args)
- : KCModule(OTRPreferencesFactory::instance(), parent, args)
+OTRPreferences::OTRPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args)
+ : KCModule(OTRPreferencesFactory::instance(), tqparent, args)
{
- ( new QVBoxLayout( this ) )->setAutoAdd( true );
+ ( new TQVBoxLayout( this ) )->setAutoAdd( true );
preferencesDialog = new OTRPrefsUI(this);
@@ -72,18 +72,18 @@ OTRPreferences::OTRPreferences(QWidget *parent, const char* /*name*/, const QStr
otrlConfInterface = new OtrlConfInterface( preferencesDialog );
- connect( preferencesDialog->btGenFingerprint, SIGNAL(clicked()), SLOT(generateFingerprint()));
- connect( preferencesDialog->cbKeys, SIGNAL(activated(int)), SLOT(showPrivFingerprint(int)));
- connect( preferencesDialog->btVerify, SIGNAL(clicked()), SLOT(verifyFingerprint()));
- connect( preferencesDialog->twSettings, SIGNAL(currentChanged(QWidget *)), SLOT(fillFingerprints()));
- connect( preferencesDialog->tbFingerprints, SIGNAL(currentChanged(int, int)), SLOT(updateButtons(int, int)));
- connect( preferencesDialog->btForget, SIGNAL( clicked() ), SLOT( forgetFingerprint() ) );
+ connect( preferencesDialog->btGenFingerprint, TQT_SIGNAL(clicked()), TQT_SLOT(generateFingerprint()));
+ connect( preferencesDialog->cbKeys, TQT_SIGNAL(activated(int)), TQT_SLOT(showPrivFingerprint(int)));
+ connect( preferencesDialog->btVerify, TQT_SIGNAL(clicked()), TQT_SLOT(verifyFingerprint()));
+ connect( preferencesDialog->twSettings, TQT_SIGNAL(currentChanged(TQWidget *)), TQT_SLOT(fillFingerprints()));
+ connect( preferencesDialog->tbFingerprints, TQT_SIGNAL(currentChanged(int, int)), TQT_SLOT(updateButtons(int, int)));
+ connect( preferencesDialog->btForget, TQT_SIGNAL( clicked() ), TQT_SLOT( forgetFingerprint() ) );
int index = 0;
int accountnr = 0;
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
if( !accounts.isEmpty() ){
- for ( QPtrListIterator<Kopete::Account> it( accounts );
+ for ( TQPtrListIterator<Kopete::Account> it( accounts );
Kopete::Account *account = it.current();
++it ){
if ( account->protocol()->pluginId() != "IRCProtocol" ){
@@ -108,7 +108,7 @@ OTRPreferences::~OTRPreferences(){
void OTRPreferences::generateFingerprint()
{
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
if( (accounts.isEmpty())){
return;
@@ -125,7 +125,7 @@ void OTRPreferences::generateFingerprint()
void OTRPreferences::showPrivFingerprint( int accountnr )
{
- QPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
+ TQPtrList<Kopete::Account> accounts = Kopete::AccountManager::self()->accounts();
if( !accounts.isEmpty() ){
Kopete::Account *account = accounts.at(privKeys[accountnr]);
preferencesDialog->tlFingerprint->setText( otrlConfInterface->getPrivFingerprint( account->accountId(), account->protocol()->displayName() ) );
@@ -133,17 +133,17 @@ void OTRPreferences::showPrivFingerprint( int accountnr )
}
void OTRPreferences::fillFingerprints(){
- QTable *fingerprintsTable = preferencesDialog->tbFingerprints;
+ TQTable *fingerprintsTable = preferencesDialog->tbFingerprints;
preferencesDialog->tbFingerprints->setNumRows(0);
- QValueList<QString[5]> list = otrlConfInterface->readAllFingerprints();
- QValueList<QString[5]>::iterator it;
+ TQValueList<TQString[5]> list = otrlConfInterface->readAllFingerprints();
+ TQValueList<TQString[5]>::iterator it;
int j = 0;
for( it = list.begin(); it != list.end(); ++it ){
preferencesDialog->tbFingerprints->setNumRows( preferencesDialog->tbFingerprints->numRows() +1 );
(*it)[0] = OtrlChatInterface::self()->formatContact((*it)[0]);
for( int i = 0; i < 5; i++ ){
//preferencesDialog->tbFingerprints->setText(j, i, (*it)[i] );
- fingerprintsTable->setItem(j,i, new QAlignTableItem(fingerprintsTable, QTableItem::Never,(*it)[i],Qt::AlignLeft));
+ fingerprintsTable->setItem(j,i, new TQAlignTableItem(fingerprintsTable, TQTableItem::Never,(*it)[i],TQt::AlignLeft));
}
j++;
}
@@ -154,7 +154,7 @@ void OTRPreferences::verifyFingerprint(){
int doVerify = KMessageBox::questionYesNo(
this,
- i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").arg(preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 0 )) + "\n\n" + preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ) + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"), i18n("Verify fingerprint") );
+ i18n("Please contact %1 via another secure way and verify that the following Fingerprint is correct:").tqarg(preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 0 )) + "\n\n" + preferencesDialog->tbFingerprints->text( preferencesDialog->tbFingerprints->currentRow(), 3 ) + "\n\n" + i18n("Are you sure you want to trust this fingerprint?"), i18n("Verify fingerprint") );
if( doVerify == KMessageBox::Yes ){
@@ -188,9 +188,9 @@ void OTRPreferences::forgetFingerprint(){
}
}
-QAlignTableItem :: QAlignTableItem( QTable *table, EditType editType, const QString& text, int alignment )
- : QTableItem( table, editType, text ) {
- align = alignment;
+TQAlignTableItem :: TQAlignTableItem( TQTable *table, EditType editType, const TQString& text, int tqalignment )
+ : TQTableItem( table, editType, text ) {
+ align = tqalignment;
}
diff --git a/src/otrpreferences.h b/src/otrpreferences.h
index 0de6d5d..6848e89 100644
--- a/src/otrpreferences.h
+++ b/src/otrpreferences.h
@@ -31,15 +31,16 @@
class OTRPreferences : public KCModule {
Q_OBJECT
+ TQ_OBJECT
public:
- OTRPreferences(QWidget *parent = 0, const char *name = 0, const QStringList &args = QStringList());
+ OTRPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList());
~OTRPreferences();
private:
OTRPrefsUI *preferencesDialog;
OtrlConfInterface *otrlConfInterface;
- QMap<int, int> privKeys;
+ TQMap<int, int> privKeys;
private slots: // Public slots
void generateFingerprint();
@@ -52,10 +53,10 @@ private slots: // Public slots
};
-class QAlignTableItem : public QTableItem {
+class TQAlignTableItem : public TQTableItem {
public :
- QAlignTableItem(QTable *table, EditType editType, const QString& text, int alignment);
+ TQAlignTableItem(TQTable *table, EditType editType, const TQString& text, int tqalignment);
private :
int align;
diff --git a/src/otrprefs.ui b/src/otrprefs.ui
index da1e238..4780951 100644
--- a/src/otrprefs.ui
+++ b/src/otrprefs.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>OTRPrefsUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>OTRPrefsUI</cstring>
</property>
@@ -19,11 +19,11 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTabWidget" row="0" column="0">
+ <widget class="TQTabWidget" row="0" column="0">
<property name="name">
<cstring>twSettings</cstring>
</property>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>settings</cstring>
</property>
@@ -34,7 +34,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QGroupBox" row="0" column="0">
+ <widget class="TQGroupBox" row="0" column="0">
<property name="name">
<cstring>groupBox1</cstring>
</property>
@@ -45,7 +45,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QPushButton" row="0" column="2">
+ <widget class="TQPushButton" row="0" column="2">
<property name="name">
<cstring>btGenFingerprint</cstring>
</property>
@@ -56,18 +56,18 @@
<string>Alt+G</string>
</property>
</widget>
- <widget class="QComboBox" row="0" column="1">
+ <widget class="TQComboBox" row="0" column="1">
<property name="name">
<cstring>cbKeys</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>400</width>
<height>32767</height>
</size>
</property>
</widget>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>textLabel2</cstring>
</property>
@@ -93,7 +93,7 @@
</widget>
</grid>
</widget>
- <widget class="QButtonGroup" row="1" column="0">
+ <widget class="TQButtonGroup" row="1" column="0">
<property name="name">
<cstring>bgPolicy</cstring>
</property>
@@ -104,7 +104,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QRadioButton" row="1" column="0">
+ <widget class="TQRadioButton" row="1" column="0">
<property name="name">
<cstring>kcfg_rbOpportunistic</cstring>
</property>
@@ -118,7 +118,7 @@
<string>Encrypt messages automatically if the other side supports OTR</string>
</property>
</widget>
- <widget class="QRadioButton" row="1" column="1">
+ <widget class="TQRadioButton" row="1" column="1">
<property name="name">
<cstring>kcfg_rbNever</cstring>
</property>
@@ -132,7 +132,7 @@
<string>Never encrypt messages</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="1">
+ <widget class="TQRadioButton" row="0" column="1">
<property name="name">
<cstring>kcfg_rbManual</cstring>
</property>
@@ -149,7 +149,7 @@
<string>Encrypt messages if the other side requests an OTR connection</string>
</property>
</widget>
- <widget class="QRadioButton" row="0" column="0">
+ <widget class="TQRadioButton" row="0" column="0">
<property name="name">
<cstring>kcfg_rbAlways</cstring>
</property>
@@ -181,7 +181,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>20</width>
<height>161</height>
@@ -190,7 +190,7 @@
</spacer>
</grid>
</widget>
- <widget class="QWidget">
+ <widget class="TQWidget">
<property name="name">
<cstring>fingerprints</cstring>
</property>
@@ -201,7 +201,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QTable" row="0" column="0" rowspan="1" colspan="2">
+ <widget class="TQTable" row="0" column="0" rowspan="1" colspan="2">
<column>
<property name="text">
<string>User</string>
@@ -209,7 +209,7 @@
</column>
<column>
<property name="text">
- <string>Status</string>
+ <string>tqStatus</string>
</property>
</column>
<column>
@@ -252,7 +252,7 @@
<enum>FollowStyle</enum>
</property>
</widget>
- <widget class="QPushButton" row="1" column="0">
+ <widget class="TQPushButton" row="1" column="0">
<property name="name">
<cstring>btVerify</cstring>
</property>
@@ -266,7 +266,7 @@
<string>Alt+V</string>
</property>
</widget>
- <widget class="QPushButton" row="1" column="1">
+ <widget class="TQPushButton" row="1" column="1">
<property name="name">
<cstring>btForget</cstring>
</property>
@@ -285,10 +285,10 @@
</widget>
</grid>
</widget>
-<slots>
+<Q_SLOTS>
<slot access="private">generateFingerprint()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kactivelabel.h</includehint>
</includehints>
diff --git a/src/privkeypopup.cpp b/src/privkeypopup.cpp
index 0fbdc60..931e3cb 100644
--- a/src/privkeypopup.cpp
+++ b/src/privkeypopup.cpp
@@ -25,8 +25,8 @@
#include "privkeypopup.h"
-PrivKeyPopup::PrivKeyPopup(QWidget* parent, const char* name, WFlags fl)
-: PrivKeyPopupUI(parent,name,fl)
+PrivKeyPopup::PrivKeyPopup(TQWidget* tqparent, const char* name, WFlags fl)
+: PrivKeyPopupUI(tqparent,name,fl)
{
}
@@ -38,7 +38,7 @@ void PrivKeyPopup::setCloseLock( bool locked ){
closeLock = locked;
}
-void PrivKeyPopup::closeEvent( QCloseEvent *e ){
+void PrivKeyPopup::closeEvent( TQCloseEvent *e ){
if( closeLock ){
e->ignore();
} else {
diff --git a/src/privkeypopup.h b/src/privkeypopup.h
index 7730356..fb0ab1e 100644
--- a/src/privkeypopup.h
+++ b/src/privkeypopup.h
@@ -30,9 +30,10 @@
class PrivKeyPopup : public PrivKeyPopupUI
{
Q_OBJECT
+ TQ_OBJECT
public:
- PrivKeyPopup(QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
+ PrivKeyPopup(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0 );
~PrivKeyPopup();
void setCloseLock( bool locked );
/*$PUBLIC_FUNCTIONS$*/
@@ -44,7 +45,7 @@ protected:
/*$PROTECTED_FUNCTIONS$*/
bool closeLock;
- void closeEvent( QCloseEvent *e );
+ void closeEvent( TQCloseEvent *e );
protected slots:
/*$PROTECTED_SLOTS$*/
diff --git a/src/privkeypopupui.ui b/src/privkeypopupui.ui
index e9fdd75..22e8409 100644
--- a/src/privkeypopupui.ui
+++ b/src/privkeypopupui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>PrivKeyPopupUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>PrivKeyPopupUI</cstring>
</property>
@@ -19,7 +19,7 @@
<property name="name">
<cstring>unnamed</cstring>
</property>
- <widget class="QLabel" row="0" column="0">
+ <widget class="TQLabel" row="0" column="0">
<property name="name">
<cstring>tlWait</cstring>
</property>
@@ -33,7 +33,7 @@
<string>Please wait while generating the private key</string>
</property>
</widget>
- <widget class="QFrame" row="0" column="1">
+ <widget class="TQFrame" row="0" column="1">
<property name="name">
<cstring>animFrame</cstring>
</property>
@@ -45,7 +45,7 @@
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="minimumSize">
+ <property name="tqminimumSize">
<size>
<width>72</width>
<height>72</height>
@@ -60,5 +60,5 @@
</widget>
</grid>
</widget>
-<layoutdefaults spacing="6" margin="11"/>
+<tqlayoutdefaults spacing="6" margin="11"/>
</UI>
diff --git a/src/smppopup.cpp b/src/smppopup.cpp
index a431e10..8ee8623 100644
--- a/src/smppopup.cpp
+++ b/src/smppopup.cpp
@@ -18,7 +18,7 @@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
***************************************************************************/
-#include "qlabel.h"
+#include "tqlabel.h"
#include "kdebug.h"
#include "klocale.h"
@@ -29,13 +29,13 @@
#include "smppopup.h"
#include "verifypopup.h"
-SMPPopup::SMPPopup(QWidget* parent, const char* name, WFlags fl, ConnContext *context, Kopete::ChatSession *session, bool initiate )
-: SMPPopupUI(parent,name,fl)
+SMPPopup::SMPPopup(TQWidget* tqparent, const char* name, WFlags fl, ConnContext *context, Kopete::ChatSession *session, bool initiate )
+: SMPPopupUI(tqparent,name,fl)
{
this->context = context;
this->session = session;
this->initiate = initiate;
- tlText->setText( i18n("Please enter the secret passphrase to authenticate %1:").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ tlText->setText( i18n("Please enter the secret passphrase to authenticate %1:").tqarg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
}
SMPPopup::~SMPPopup()
diff --git a/src/smppopup.h b/src/smppopup.h
index b486c65..44c69a0 100644
--- a/src/smppopup.h
+++ b/src/smppopup.h
@@ -33,9 +33,10 @@ extern "C"{
class SMPPopup : public SMPPopupUI
{
Q_OBJECT
+ TQ_OBJECT
public:
- SMPPopup(QWidget* parent = 0, const char* name = 0, WFlags fl = 0, ConnContext *context = 0, Kopete::ChatSession *session = 0, bool initiate = true );
+ SMPPopup(TQWidget* tqparent = 0, const char* name = 0, WFlags fl = 0, ConnContext *context = 0, Kopete::ChatSession *session = 0, bool initiate = true );
~SMPPopup();
/*$PUBLIC_FUNCTIONS$*/
diff --git a/src/smppopupui.ui b/src/smppopupui.ui
index 4120e3c..19599ac 100644
--- a/src/smppopupui.ui
+++ b/src/smppopupui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>SMPPopupUI</class>
-<widget class="QWidget">
+<widget class="TQWidget">
<property name="name">
<cstring>SMPPopupUI</cstring>
</property>
@@ -66,7 +66,7 @@
</rect>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>tlText</cstring>
</property>
@@ -81,11 +81,11 @@
<property name="text">
<string>Please enter the secret passphrase to authenticate this contact.</string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
- <widget class="QLabel">
+ <widget class="TQLabel">
<property name="name">
<cstring>pLIcon</cstring>
</property>
@@ -174,13 +174,13 @@
<slot>manualAuth()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>manualAuth()</slot>
<slot>respondSMP()</slot>
<slot>openHelp()</slot>
<slot>cancelSMP()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kpushbutton.h</includehint>
diff --git a/src/verifypopup.cpp b/src/verifypopup.cpp
index d647948..560ad7e 100644
--- a/src/verifypopup.cpp
+++ b/src/verifypopup.cpp
@@ -23,7 +23,7 @@
#include "otrlchatinterface.h"
#include "otrplugin.h"
-#include "qlabel.h"
+#include "tqlabel.h"
#include "klocale.h"
#include "kactivelabel.h"
@@ -32,13 +32,13 @@
#include "kopetechatsession.h"
#include "kopetecontact.h"
-VerifyPopup::VerifyPopup(QWidget* parent, const char* name, Kopete::ChatSession *session, bool modal, WFlags fl)
-: VerifyPopupUI(parent,name, modal,fl)
+VerifyPopup::VerifyPopup(TQWidget* tqparent, const char* name, Kopete::ChatSession *session, bool modal, WFlags fl)
+: VerifyPopupUI(tqparent,name, modal,fl)
{
this->session = session;
- alContact->setText(i18n("Verify fingerprint for %1.").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
- alFingerprint->setText(i18n("The received fingerprint is:\n\n%1\n\nContact %2 via another secure channel and verify that this fingerprint is correct.").arg(OtrlChatInterface::self()->findActiveFingerprint(session)).arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
- alVerified->setText(i18n("verified that this is in fact the correct fingerprint for %1").arg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ alContact->setText(i18n("Verify fingerprint for %1.").tqarg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ alFingerprint->setText(i18n("The received fingerprint is:\n\n%1\n\nContact %2 via another secure channel and verify that this fingerprint is correct.").tqarg(OtrlChatInterface::self()->findActiveFingerprint(session)).tqarg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
+ alVerified->setText(i18n("verified that this is in fact the correct fingerprint for %1").tqarg(OtrlChatInterface::self()->formatContact(session->members().getFirst()->contactId())));
cbVerify->insertItem(i18n("I have not"));
cbVerify->insertItem(i18n("I have"));
if( OtrlChatInterface::self()->isVerified(session)){
diff --git a/src/verifypopup.h b/src/verifypopup.h
index 212f692..2e72221 100644
--- a/src/verifypopup.h
+++ b/src/verifypopup.h
@@ -27,9 +27,10 @@
class VerifyPopup : public VerifyPopupUI
{
Q_OBJECT
+ TQ_OBJECT
public:
- VerifyPopup(QWidget* parent = 0, const char* name = 0, Kopete::ChatSession *session = NULL, bool modal = FALSE, WFlags fl = 0 );
+ VerifyPopup(TQWidget* tqparent = 0, const char* name = 0, Kopete::ChatSession *session = NULL, bool modal = FALSE, WFlags fl = 0 );
~VerifyPopup();
/*$PUBLIC_FUNCTIONS$*/
diff --git a/src/verifypopupui.ui b/src/verifypopupui.ui
index 054858e..dd13905 100644
--- a/src/verifypopupui.ui
+++ b/src/verifypopupui.ui
@@ -1,6 +1,6 @@
<!DOCTYPE UI><UI version="3.3" stdsetdef="1">
<class>VerifyPopupUI</class>
-<widget class="QDialog">
+<widget class="TQDialog">
<property name="name">
<cstring>VerifyPopupUI</cstring>
</property>
@@ -40,7 +40,7 @@
<property name="sizeType">
<enum>Expanding</enum>
</property>
- <property name="sizeHint">
+ <property name="tqsizeHint">
<size>
<width>461</width>
<height>20</height>
@@ -56,7 +56,7 @@
<property name="name">
<cstring>cbVerify</cstring>
</property>
- <property name="maximumSize">
+ <property name="tqmaximumSize">
<size>
<width>130</width>
<height>32767</height>
@@ -73,14 +73,14 @@
</font>
</property>
</widget>
- <widget class="QLabel" row="1" column="0" rowspan="1" colspan="3">
+ <widget class="TQLabel" row="1" column="0" rowspan="1" colspan="3">
<property name="name">
<cstring>alFingerprint</cstring>
</property>
<property name="text">
<string></string>
</property>
- <property name="alignment">
+ <property name="tqalignment">
<set>WordBreak|AlignVCenter</set>
</property>
</widget>
@@ -100,10 +100,10 @@
<slot>close()</slot>
</connection>
</connections>
-<slots>
+<Q_SLOTS>
<slot>cbChanged()</slot>
-</slots>
-<layoutdefaults spacing="6" margin="11"/>
+</Q_SLOTS>
+<tqlayoutdefaults spacing="6" margin="11"/>
<includehints>
<includehint>kpushbutton.h</includehint>
<includehint>kactivelabel.h</includehint>