From 69cac65817d949cda2672ec4f0aa73d5e66a0ba1 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 22 Jun 2011 00:30:31 +0000 Subject: TQt4 port kdenetwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdenetwork@1237912 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- .../plugins/cryptography/cryptographyguiclient.cpp | 14 +++---- .../plugins/cryptography/cryptographyguiclient.h | 3 +- kopete/plugins/cryptography/cryptographyplugin.cpp | 32 +++++++-------- kopete/plugins/cryptography/cryptographyplugin.h | 3 +- .../cryptography/cryptographypreferences.cpp | 4 +- .../plugins/cryptography/cryptographypreferences.h | 3 +- .../plugins/cryptography/cryptographyprefsbase.ui | 30 +++++++------- .../cryptography/cryptographyselectuserkey.cpp | 2 +- .../cryptography/cryptographyselectuserkey.h | 1 + .../plugins/cryptography/cryptographyuserkey_ui.ui | 14 +++---- kopete/plugins/cryptography/kgpginterface.cpp | 28 ++++++------- kopete/plugins/cryptography/kgpginterface.h | 1 + kopete/plugins/cryptography/kgpgselkey.cpp | 16 ++++---- kopete/plugins/cryptography/kgpgselkey.h | 3 +- kopete/plugins/cryptography/popuppublic.cpp | 48 +++++++++++----------- kopete/plugins/cryptography/popuppublic.h | 5 ++- 16 files changed, 107 insertions(+), 100 deletions(-) (limited to 'kopete/plugins/cryptography') diff --git a/kopete/plugins/cryptography/cryptographyguiclient.cpp b/kopete/plugins/cryptography/cryptographyguiclient.cpp index 898e7f1a..fecb025e 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.cpp +++ b/kopete/plugins/cryptography/cryptographyguiclient.cpp @@ -27,16 +27,16 @@ class CryptographyPlugin; -CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) - : TQObject(parent) , KXMLGUIClient(parent) +CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *tqparent ) + : TQObject(tqparent) , KXMLGUIClient(tqparent) { - if(!parent || parent->members().isEmpty()) + if(!tqparent || tqparent->members().isEmpty()) { deleteLater(); //we refuse to build this client, it is based on wrong parametters return; } - TQPtrList mb=parent->members(); + TQPtrList mb=tqparent->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) @@ -48,8 +48,8 @@ CryptographyGUIClient::CryptographyGUIClient(Kopete::ChatSession *parent ) setInstance( KGenericFactory::instance() ); - 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") ) ; + m_action=new KToggleAction( i18n("Encrypt Messages" ), TQString::tqfromLatin1( "encrypted" ), 0, this, TQT_SLOT(slotToggled()), actionCollection() , "cryptographyToggle" ); + m_action->setChecked( first->pluginData( CryptographyPlugin::plugin() , "encrypt_messages") != TQString::tqfromLatin1("off") ) ; setXMLFile("cryptographychatui.rc"); } @@ -60,7 +60,7 @@ CryptographyGUIClient::~CryptographyGUIClient() void CryptographyGUIClient::slotToggled() { - TQPtrList mb=static_cast(parent())->members(); + TQPtrList mb=static_cast(tqparent())->members(); Kopete::MetaContact *first=mb.first()->metaContact(); if(!first) diff --git a/kopete/plugins/cryptography/cryptographyguiclient.h b/kopete/plugins/cryptography/cryptographyguiclient.h index 7f3d8c4f..5b8b22ed 100644 --- a/kopete/plugins/cryptography/cryptographyguiclient.h +++ b/kopete/plugins/cryptography/cryptographyguiclient.h @@ -27,8 +27,9 @@ class KToggleAction; class CryptographyGUIClient : public TQObject, public KXMLGUIClient { Q_OBJECT + TQ_OBJECT public: - CryptographyGUIClient(Kopete::ChatSession *parent = 0); + CryptographyGUIClient(Kopete::ChatSession *tqparent = 0); ~CryptographyGUIClient(); private: diff --git a/kopete/plugins/cryptography/cryptographyplugin.cpp b/kopete/plugins/cryptography/cryptographyplugin.cpp index 4e2e9686..bd1ce0dc 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.cpp +++ b/kopete/plugins/cryptography/cryptographyplugin.cpp @@ -45,14 +45,14 @@ //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 TQRegExp CryptographyPlugin::isHTML( TQString::fromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); +const TQRegExp CryptographyPlugin::isHTML( TQString::tqfromLatin1( "^[^<>]*(|[\\s/][^><]*>)[^><]*)+$" ) , false ); typedef KGenericFactory CryptographyPluginFactory; static const KAboutData aboutdata("kopete_cryptography", I18N_NOOP("Cryptography") , "1.0" ); K_EXPORT_COMPONENT_FACTORY( kopete_cryptography, CryptographyPluginFactory( &aboutdata ) ) -CryptographyPlugin::CryptographyPlugin( TQObject *parent, const char *name, const TQStringList & /* args */ ) -: Kopete::Plugin( CryptographyPluginFactory::instance(), parent, name ), +CryptographyPlugin::CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList & /* args */ ) +: Kopete::Plugin( CryptographyPluginFactory::instance(), tqparent, name ), m_cachedPass() { if( !pluginStatic_ ) @@ -154,14 +154,14 @@ bool CryptographyPlugin::passphraseHandling() void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) { TQString body = msg.plainBody(); - if( !body.startsWith( TQString::fromLatin1("-----BEGIN PGP MESSAGE----") ) - || !body.contains( TQString::fromLatin1("-----END PGP MESSAGE----") ) ) + if( !body.startsWith( TQString::tqfromLatin1("-----BEGIN PGP MESSAGE----") ) + || !body.tqcontains( TQString::tqfromLatin1("-----END PGP MESSAGE----") ) ) return; if( msg.direction() != Kopete::Message::Inbound ) { TQString plainBody; - if ( m_cachedMessages.contains( body ) ) + if ( m_cachedMessages.tqcontains( body ) ) { plainBody = m_cachedMessages[ body ]; m_cachedMessages.remove( body ); @@ -179,16 +179,16 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) plainBody = TQStyleSheet::escape( plainBody ); //this is the same algoritm as in Kopete::Message::escapedBody(); - plainBody.replace( TQString::fromLatin1( "\n" ), TQString::fromLatin1( "
" ) ) - .replace( TQString::fromLatin1( "\t" ), TQString::fromLatin1( "    " ) ) - .replace( TQRegExp( TQString::fromLatin1( "\\s\\s" ) ), TQString::fromLatin1( "  " ) ); + plainBody.tqreplace( TQString::tqfromLatin1( "\n" ), TQString::tqfromLatin1( "
" ) ) + .tqreplace( TQString::tqfromLatin1( "\t" ), TQString::tqfromLatin1( "    " ) ) + .tqreplace( TQRegExp( TQString::tqfromLatin1( "\\s\\s" ) ), TQString::tqfromLatin1( "  " ) ); } - msg.setBody( TQString::fromLatin1("
") + msg.setBody( TQString::tqfromLatin1("
") + i18n("Outgoing Encrypted Message: ") - + TQString::fromLatin1("
") + + TQString::tqfromLatin1("
") + plainBody - + TQString::fromLatin1("
") + + TQString::tqfromLatin1("
") , Kopete::Message::RichText ); } @@ -202,7 +202,7 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) //the Message::unescape is there because client like fire replace linebreak by
to work even if the protocol doesn't allow newlines (IRC) // cf http://fire.sourceforge.net/forums/viewtopic.php?t=174 and Bug #96052 - if(body.contains("<")) + if(body.tqcontains("<")) body= Kopete::Message::unescape(body); body = KgpgInterface::KgpgDecryptText( body, mPrivateKeyID ); @@ -215,11 +215,11 @@ void CryptographyPlugin::slotIncomingMessage( Kopete::Message& msg ) body = Kopete::Message::escape( body ); } - msg.setBody( TQString::fromLatin1("
") + msg.setBody( TQString::tqfromLatin1("
") + i18n("Incoming Encrypted Message: ") - + TQString::fromLatin1("
") + + TQString::tqfromLatin1("
") + body - + TQString::fromLatin1("
") + + TQString::tqfromLatin1("
") , Kopete::Message::RichText ); } diff --git a/kopete/plugins/cryptography/cryptographyplugin.h b/kopete/plugins/cryptography/cryptographyplugin.h index 1b1e4489..249eac9e 100644 --- a/kopete/plugins/cryptography/cryptographyplugin.h +++ b/kopete/plugins/cryptography/cryptographyplugin.h @@ -40,6 +40,7 @@ namespace Kopete class CryptographyPlugin : public Kopete::Plugin { Q_OBJECT + TQ_OBJECT public: enum CacheMode @@ -55,7 +56,7 @@ public: static bool passphraseHandling(); static const TQRegExp isHTML; - CryptographyPlugin( TQObject *parent, const char *name, const TQStringList &args ); + CryptographyPlugin( TQObject *tqparent, const char *name, const TQStringList &args ); ~CryptographyPlugin(); public slots: diff --git a/kopete/plugins/cryptography/cryptographypreferences.cpp b/kopete/plugins/cryptography/cryptographypreferences.cpp index 8e1b96ee..765fb098 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.cpp +++ b/kopete/plugins/cryptography/cryptographypreferences.cpp @@ -27,8 +27,8 @@ typedef KGenericFactory CryptographyPreferencesFactory; K_EXPORT_COMPONENT_FACTORY( kcm_kopete_cryptography, CryptographyPreferencesFactory("kcm_kopete_cryptography")) -CryptographyPreferences::CryptographyPreferences(TQWidget *parent, const char* /*name*/, const TQStringList &args) - : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), parent, args) +CryptographyPreferences::CryptographyPreferences(TQWidget *tqparent, const char* /*name*/, const TQStringList &args) + : KCAutoConfigModule(CryptographyPreferencesFactory::instance(), tqparent, args) { // Add actuall widget generated from ui file. preferencesDialog = new CryptographyPrefsUI(this); diff --git a/kopete/plugins/cryptography/cryptographypreferences.h b/kopete/plugins/cryptography/cryptographypreferences.h index 6053e96b..d032bc6e 100644 --- a/kopete/plugins/cryptography/cryptographypreferences.h +++ b/kopete/plugins/cryptography/cryptographypreferences.h @@ -29,8 +29,9 @@ class KAutoConfig; */ class CryptographyPreferences : public KCAutoConfigModule { Q_OBJECT + TQ_OBJECT public: - CryptographyPreferences(TQWidget *parent = 0, const char *name = 0, const TQStringList &args = TQStringList()); + CryptographyPreferences(TQWidget *tqparent = 0, const char *name = 0, const TQStringList &args = TQStringList()); private: CryptographyPrefsUI *preferencesDialog; private slots: // Public slots diff --git a/kopete/plugins/cryptography/cryptographyprefsbase.ui b/kopete/plugins/cryptography/cryptographyprefsbase.ui index ecec3507..6cd3caca 100644 --- a/kopete/plugins/cryptography/cryptographyprefsbase.ui +++ b/kopete/plugins/cryptography/cryptographyprefsbase.ui @@ -1,7 +1,7 @@ CryptographyPrefsUI Olivier Goffart - + CryptographyPrefsUI @@ -17,7 +17,7 @@ unnamed - + TextLabel1 @@ -25,7 +25,7 @@ Your private PGP key: - + m_selectOwnKey @@ -41,7 +41,7 @@ true - + Also_my_key @@ -63,14 +63,14 @@ Expanding - + 21 50 - + m_cache @@ -81,7 +81,7 @@ unnamed - + Cache_Till_App_Close @@ -92,7 +92,7 @@ true - + Cache_Time @@ -114,7 +114,7 @@ 15 - + textLabel1 @@ -130,7 +130,7 @@ minutes - + Cache_Till_Time @@ -146,7 +146,7 @@ For - + Cache_Never @@ -156,7 +156,7 @@ - + No_Passphrase_Handling @@ -184,12 +184,12 @@ Cache_Time Cache_Never - + m_selectOwnKey_clicked() m_selectOwnKey_toggled(bool) m_selectOwnKey_stateChanged(int) - - + + klineedit.h diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp index ae92647b..9d692e08 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.cpp +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.cpp @@ -35,7 +35,7 @@ CryptographySelectUserKey::CryptographySelectUserKey(const TQString& key ,Kopete 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_titleLabel->setText(i18n("Select public key for %1").tqarg(mc->displayName())); view->m_editKey->setText(key); } CryptographySelectUserKey::~CryptographySelectUserKey() diff --git a/kopete/plugins/cryptography/cryptographyselectuserkey.h b/kopete/plugins/cryptography/cryptographyselectuserkey.h index 7ca5ec8e..a7f47853 100644 --- a/kopete/plugins/cryptography/cryptographyselectuserkey.h +++ b/kopete/plugins/cryptography/cryptographyselectuserkey.h @@ -29,6 +29,7 @@ class CryptographyUserKey_ui; class CryptographySelectUserKey : public KDialogBase { Q_OBJECT + TQ_OBJECT public: CryptographySelectUserKey(const TQString &key, Kopete::MetaContact *mc); ~CryptographySelectUserKey(); diff --git a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui index d84f2fec..ff766de4 100644 --- a/kopete/plugins/cryptography/cryptographyuserkey_ui.ui +++ b/kopete/plugins/cryptography/cryptographyuserkey_ui.ui @@ -1,6 +1,6 @@ CryptographyUserKey_ui - + CryptographyUserKey_ui @@ -16,7 +16,7 @@ unnamed - + TextLabel3 @@ -32,7 +32,7 @@ true - + m_selectKey @@ -50,14 +50,14 @@ Expanding - + 20 20 - + m_removeButton @@ -65,7 +65,7 @@ Remove - + m_titleLabel @@ -75,5 +75,5 @@ - + diff --git a/kopete/plugins/cryptography/kgpginterface.cpp b/kopete/plugins/cryptography/kgpginterface.cpp index e41e246d..d74f9baa 100644 --- a/kopete/plugins/cryptography/kgpginterface.cpp +++ b/kopete/plugins/cryptography/kgpginterface.cpp @@ -50,12 +50,12 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString userIDs=userIDs.simplifyWhiteSpace(); Options=Options.stripWhiteSpace(); - int ct=userIDs.find(" "); + int ct=userIDs.tqfind(" "); while (ct!=-1) // if multiple keys... { dests+=" --recipient "+userIDs.section(' ',0,0); userIDs.remove(0,ct+1); - ct=userIDs.find(" "); + ct=userIDs.tqfind(" "); } dests+=" --recipient "+userIDs; @@ -75,7 +75,7 @@ TQString KgpgInterface::KgpgEncryptText(TQString text,TQString userIDs, TQString if( !encResult.isEmpty() ) return encResult; else - return TQString::null; + return TQString(); } TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) @@ -95,15 +95,15 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) { /// pipe for passphrase //userID=TQString::fromUtf8(userID); - userID.replace('<',"<"); - TQString passdlg=i18n("Enter passphrase for %1:").arg(userID); + userID.tqreplace('<',"<"); + TQString passdlg=i18n("Enter passphrase for %1:").tqarg(userID); if (counter>1) - passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").arg(TQString::number(4-counter))); + passdlg.prepend(i18n("Bad passphrase
You have %1 tries left.
").tqarg(TQString::number(4-counter))); /// pipe for passphrase int code=KPasswordDialog::getPassword(password,passdlg); if (code!=TQDialog::Accepted) - return TQString::null; + return TQString(); CryptographyPlugin::setCachedPass(password); } @@ -135,7 +135,7 @@ TQString KgpgInterface::KgpgDecryptText(TQString text,TQString userID) if( !encResult.isEmpty() ) return encResult; else - return TQString::null; + return TQString(); } TQString KgpgInterface::checkForUtf8(TQString txt) @@ -147,22 +147,22 @@ TQString KgpgInterface::checkForUtf8(TQString txt) /* Make sure the encoding is UTF-8. * Test structure suggested by Werner Koch */ if (txt.isEmpty()) - return TQString::null; + return TQString(); for (s = txt.ascii(); *s && !(*s & 0x80); s++) ; - if (*s && !strchr (txt.ascii(), 0xc3) && (txt.find("\\x")==-1)) + if (*s && !strchr (txt.ascii(), 0xc3) && (txt.tqfind("\\x")==-1)) return txt; /* The string is not in UTF-8 */ //if (strchr (txt.ascii(), 0xc3)) return (txt+" +++"); - if (txt.find("\\x")==-1) + if (txt.tqfind("\\x")==-1) 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 ) { + // if (!strchr (txt.ascii(), 0xc3) || (txt.tqfind("\\x")!=-1)) { + for ( int idx = 0 ; (idx = txt.tqfind( "\\x", idx )) >= 0 ; ++idx ) { char str[2] = "x"; str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 ); - txt.replace( idx, 4, str ); + txt.tqreplace( idx, 4, str ); } if (!strchr (txt.ascii(), 0xc3)) return TQString::fromUtf8(txt.ascii()); diff --git a/kopete/plugins/cryptography/kgpginterface.h b/kopete/plugins/cryptography/kgpginterface.h index f324359e..9da953fe 100644 --- a/kopete/plugins/cryptography/kgpginterface.h +++ b/kopete/plugins/cryptography/kgpginterface.h @@ -30,6 +30,7 @@ class KgpgInterface : public TQObject { Q_OBJECT + TQ_OBJECT public: /** diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp index 88078ece..1f3d5a39 100644 --- a/kopete/plugins/cryptography/kgpgselkey.cpp +++ b/kopete/plugins/cryptography/kgpgselkey.cpp @@ -38,7 +38,7 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *tqparent, const char *name,bool showlocal):KDialogBase( tqparent, name, true,i18n("Private Key List"),Ok | Cancel) { TQString keyname; TQWidget *page = new TQWidget(this); @@ -122,7 +122,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo tst=tst.section(":",9,9); // FIXME: Same here: don't use popen! - Martijn - fp2 = popen( TQString( "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" ).tqarg( KShellProcess::quote( id ) ).latin1(), "r" ); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { @@ -147,7 +147,7 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo if (!tst.isEmpty() && (!dead)) { KListViewItem *item=new KListViewItem(keysListpr,extractKeyName(tst)); - KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").arg(id).arg(tr).arg(val)); + KListViewItem *sub= new KListViewItem(item,i18n("ID: %1, trust: %2, expiration: %3").tqarg(id).tqarg(tr).tqarg(val)); sub->setSelectable(false); item->setPixmap(0,keyPair); } @@ -163,20 +163,20 @@ KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialo keysListpr->setSelected(keysListpr->firstChild(),true); page->show(); - resize(this->minimumSize()); + resize(this->tqminimumSize()); setMainWidget(page); } TQString KgpgSelKey::extractKeyName(TQString fullName) { TQString kMail; - if (fullName.find("<")!=-1) + if (fullName.tqfind("<")!=-1) { kMail=fullName.section('<',-1,-1); kMail.truncate(kMail.length()-1); } TQString kName=fullName.section('<',0,0); - if (kName.find("(")!=-1) kName=kName.section('(',0,0); + if (kName.tqfind("(")!=-1) kName=kName.section('(',0,0); return TQString(kMail+" ("+kName+")").stripWhiteSpace(); } @@ -201,8 +201,8 @@ void KgpgSelKey::slotSelect(TQListViewItem *item) if (item==NULL) return; if (item->depth()!=0) { - keysListpr->setSelected(item->parent(),true); - keysListpr->setCurrentItem(item->parent()); + keysListpr->setSelected(item->tqparent(),true); + keysListpr->setCurrentItem(item->tqparent()); } } diff --git a/kopete/plugins/cryptography/kgpgselkey.h b/kopete/plugins/cryptography/kgpgselkey.h index 1e357482..190e8186 100644 --- a/kopete/plugins/cryptography/kgpgselkey.h +++ b/kopete/plugins/cryptography/kgpgselkey.h @@ -41,9 +41,10 @@ struct gpgKey { class KgpgSelKey : public KDialogBase { Q_OBJECT + TQ_OBJECT public: - KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool showlocal=true); + KgpgSelKey( TQWidget *tqparent = 0, const char *name = 0,bool showlocal=true); KListView *keysListpr; TQPixmap keyPair; TQCheckBox *local; diff --git a/kopete/plugins/cryptography/popuppublic.cpp b/kopete/plugins/cryptography/popuppublic.cpp index 9c1561f1..43787d47 100644 --- a/kopete/plugins/cryptography/popuppublic.cpp +++ b/kopete/plugins/cryptography/popuppublic.cpp @@ -57,14 +57,14 @@ class UpdateViewItem2 : public KListViewItem { public: - UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault); + UpdateViewItem2(TQListView *tqparent, 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(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault) - : KListViewItem(parent) +UpdateViewItem2::UpdateViewItem2(TQListView *tqparent, TQString name,TQString mail,TQString id,bool isDefault) + : KListViewItem(tqparent) { def=isDefault; setText(0,name); @@ -73,14 +73,14 @@ def=isDefault; } -void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment) +void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int tqalignment) { if ((def) && (column<2)) { TQFont font(p->font()); font.setBold(true); p->setFont(font); } - KListViewItem::paintCell(p, cg, column, width, alignment); + KListViewItem::paintCell(p, cg, column, width, tqalignment); } TQString UpdateViewItem2 :: key(int c,bool ) const @@ -90,8 +90,8 @@ TQString UpdateViewItem2 :: key(int c,bool ) const /////////////// main view -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) +popupPublic::popupPublic(TQWidget *tqparent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey): +KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, tqparent, name,true) { TQWidget *page = plainPage(); TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint()); @@ -108,7 +108,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent keySingle=loader->loadIcon("kgpg_key1",KIcon::Small,20); keyGroup=loader->loadIcon("kgpg_key3",KIcon::Small,20); - if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile)); + if (filemode) setCaption(i18n("Select Public Key for %1").tqarg(sfile)); fmode=filemode; TQHButtonGroup *hBar=new TQHButtonGroup(page); @@ -144,7 +144,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0); KActionCollection *actcol=new KActionCollection(this); - (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); + (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, TQT_TQOBJECT(this), TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key"); CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions); @@ -165,16 +165,16 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent "box enables you to use any key, even if it has not be signed.")); if (filemode) { - TQWidget *parentBox=new TQWidget(boutonboxoptions); - TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0); + TQWidget *tqparentBox=new TQWidget(boutonboxoptions); + TQHBoxLayout *shredBox=new TQHBoxLayout(tqparentBox,0); //shredBox->setFrameStyle(TQFrame::NoFrame); //shredBox->setMargin(0); - CBshred=new TQCheckBox(i18n("Shred source file"),parentBox); + CBshred=new TQCheckBox(i18n("Shred source file"),tqparentBox); TQWhatsThis::add (CBshred,i18n("Shred source file: permanently remove source file. No recovery will be possible")); TQString shredWhatsThis = i18n( "Shred source file:

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.

But you must be aware that this is not secure 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).

"); - KActiveLabel *warn= new KActiveLabel( i18n("Read this before using shredding").arg(shredWhatsThis),parentBox ); + KActiveLabel *warn= new KActiveLabel( i18n("Read this before using shredding").tqarg(shredWhatsThis),tqparentBox ); shredBox->addWidget(CBshred); shredBox->addWidget(warn); } @@ -187,7 +187,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent //BEGIN modified for Kopete - setWFlags( getWFlags() | Qt::WDestructiveClose ); + setWFlags( getWFlags() | TQt::WDestructiveClose ); /*CBarmor->setChecked( KGpgSettings::asciiArmor() ); @@ -221,7 +221,7 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent char line[200]="\0"; FILE *fp2; - seclist=TQString::null; + seclist=TQString(); fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r"); while ( fgets( line, sizeof(line), fp2)) @@ -269,7 +269,7 @@ void popupPublic::sort() if (current==NULL) return; - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())){ if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -279,7 +279,7 @@ void popupPublic::sort() while ( current->nextSibling() ) { current = current->nextSibling(); - if ((untrustedList.find(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { + if ((untrustedList.tqfind(current->text(2))!=untrustedList.end()) && (!current->text(2).isEmpty())) { if (current->isSelected()) { current->setSelected(false); reselect=true; @@ -342,7 +342,7 @@ void popupPublic::refreshkeys() { if (!TQString(*it).isEmpty()) { - UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false); + UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString(),TQString(),false); item->setPixmap(0,keyGroup); } } @@ -433,16 +433,16 @@ void popupPublic::slotprocread(KProcIO *p) untrustedList<setSelectable(false); - if (seclist.find(tst,0,FALSE)!=-1) + if (seclist.tqfind(tst,0,FALSE)!=-1) item->setPixmap(0,keyPair); else item->setPixmap(0,keySingle); diff --git a/kopete/plugins/cryptography/popuppublic.h b/kopete/plugins/cryptography/popuppublic.h index 7e3208aa..17c05ebb 100644 --- a/kopete/plugins/cryptography/popuppublic.h +++ b/kopete/plugins/cryptography/popuppublic.h @@ -31,12 +31,13 @@ class KListView; class TQButtonGroup; class KProcIO; -class popupPublic : public KDialogBase //QDialog +class popupPublic : public KDialogBase //TQDialog { Q_OBJECT + TQ_OBJECT public: - popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home)); + popupPublic(TQWidget *tqparent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+TQt::Key_Home)); ~popupPublic(); KListView *keysList; TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid; -- cgit v1.2.1