diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 20:09:36 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-30 20:09:36 +0000 |
commit | c54c3c07f612a7e039b015e8a2c4d8ec9ca5e9ff (patch) | |
tree | 9252de70e029efb2850bd6ac7508e058651d07eb /src/otrlconfinterface.cpp | |
parent | c99e1ecc99f459c847136f51b98d905fcb11dd26 (diff) | |
download | kopete-otr-c54c3c07f612a7e039b015e8a2c4d8ec9ca5e9ff.tar.gz kopete-otr-c54c3c07f612a7e039b015e8a2c4d8ec9ca5e9ff.zip |
TQt4 port kopete-otr
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/kopete-otr@1238882 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/otrlconfinterface.cpp')
-rw-r--r-- | src/otrlconfinterface.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
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; |