diff options
Diffstat (limited to 'kopete/plugins/cryptography/kgpgselkey.cpp')
-rw-r--r-- | kopete/plugins/cryptography/kgpgselkey.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/kopete/plugins/cryptography/kgpgselkey.cpp b/kopete/plugins/cryptography/kgpgselkey.cpp index 70f76598..88078ece 100644 --- a/kopete/plugins/cryptography/kgpgselkey.cpp +++ b/kopete/plugins/cryptography/kgpgselkey.cpp @@ -23,12 +23,12 @@ #include <unistd.h> #include <sys/wait.h> -#include <qlayout.h> -#include <qlabel.h> +#include <tqlayout.h> +#include <tqlabel.h> #include <klistview.h> #include <klocale.h> -#include <qcheckbox.h> +#include <tqcheckbox.h> #include <kprocess.h> #include <kiconloader.h> @@ -38,11 +38,11 @@ //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////// Secret key selection dialog, used when user wants to sign a key -KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) +KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool showlocal):KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel) { - QString keyname; - QWidget *page = new QWidget(this); - QLabel *labeltxt; + TQString keyname; + TQWidget *page = new TQWidget(this); + TQLabel *labeltxt; KIconLoader *loader = KGlobal::iconLoader(); keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20); @@ -54,22 +54,22 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog keysListpr->setShowSortIndicator(true); keysListpr->setFullWidth(true); - labeltxt=new QLabel(i18n("Choose secret key:"),page); - QVBoxLayout *vbox=new QVBoxLayout(page,3); + labeltxt=new TQLabel(i18n("Choose secret key:"),page); + TQVBoxLayout *vbox=new TQVBoxLayout(page,3); vbox->addWidget(labeltxt); vbox->addWidget(keysListpr); if (showlocal==true) { - local = new QCheckBox(i18n("Local signature (cannot be exported)"),page); + local = new TQCheckBox(i18n("Local signature (cannot be exported)"),page); vbox->addWidget(local); } FILE *fp,*fp2; - QString tst,tst2; + TQString tst,tst2; char line[130]; - // FIXME: Why use popen instead of KProcess, QProcess or KProcIO?!? + // FIXME: Why use popen instead of KProcess, TQProcess or KProcIO?!? // Are we interested in having buffer overflows now? - Martijn fp = popen( "gpg --no-tty --with-colon --list-secret-keys", "r" ); while ( fgets( line, sizeof(line), fp)) @@ -77,12 +77,12 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=line; if (tst.startsWith("sec")) { - const QString trust=tst.section(':',1,1); - QString val=tst.section(':',6,6); - QString id=QString("0x"+tst.section(':',4,4).right(8)); + const TQString trust=tst.section(':',1,1); + TQString val=tst.section(':',6,6); + TQString id=TQString("0x"+tst.section(':',4,4).right(8)); if (val.isEmpty()) val=i18n("Unlimited"); - QString tr; + TQString tr; switch( trust[0] ) { case 'o': @@ -122,14 +122,14 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog tst=tst.section(":",9,9); // FIXME: Same here: don't use popen! - Martijn - fp2 = popen( QString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); + fp2 = popen( TQString( "gpg --no-tty --with-colon --list-key %1" ).arg( KShellProcess::quote( id ) ).latin1(), "r" ); bool dead=true; while ( fgets( line, sizeof(line), fp2)) { tst2=line; if (tst2.startsWith("pub")) { - const QString trust2=tst2.section(':',1,1); + const TQString trust2=tst2.section(':',1,1); switch( trust2[0] ) { case 'f': @@ -156,8 +156,8 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog pclose(fp); - QObject::connect(keysListpr,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotpreOk())); - QObject::connect(keysListpr,SIGNAL(clicked(QListViewItem *)),this,SLOT(slotSelect(QListViewItem *))); + TQObject::connect(keysListpr,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotpreOk())); + TQObject::connect(keysListpr,TQT_SIGNAL(clicked(TQListViewItem *)),this,TQT_SLOT(slotSelect(TQListViewItem *))); keysListpr->setSelected(keysListpr->firstChild(),true); @@ -167,17 +167,17 @@ KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool showlocal):KDialog setMainWidget(page); } -QString KgpgSelKey::extractKeyName(QString fullName) +TQString KgpgSelKey::extractKeyName(TQString fullName) { - QString kMail; + TQString kMail; if (fullName.find("<")!=-1) { kMail=fullName.section('<',-1,-1); kMail.truncate(kMail.length()-1); } - QString kName=fullName.section('<',0,0); + TQString kName=fullName.section('<',0,0); if (kName.find("(")!=-1) kName=kName.section('(',0,0); - return QString(kMail+" ("+kName+")").stripWhiteSpace(); + return TQString(kMail+" ("+kName+")").stripWhiteSpace(); } void KgpgSelKey::slotpreOk() @@ -196,7 +196,7 @@ void KgpgSelKey::slotOk() accept(); } -void KgpgSelKey::slotSelect(QListViewItem *item) +void KgpgSelKey::slotSelect(TQListViewItem *item) { if (item==NULL) return; if (item->depth()!=0) @@ -207,9 +207,9 @@ void KgpgSelKey::slotSelect(QListViewItem *item) } -QString KgpgSelKey::getkeyID() +TQString KgpgSelKey::getkeyID() { - QString userid; + TQString userid; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else @@ -222,9 +222,9 @@ QString KgpgSelKey::getkeyID() } } -QString KgpgSelKey::getkeyMail() +TQString KgpgSelKey::getkeyMail() { - QString username; + TQString username; ///// emit selected key if (keysListpr->currentItem()==NULL) return(""); else |