summaryrefslogtreecommitdiffstats
path: root/kgpg/listkeys.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kgpg/listkeys.cpp')
-rw-r--r--kgpg/listkeys.cpp978
1 files changed, 489 insertions, 489 deletions
diff --git a/kgpg/listkeys.cpp b/kgpg/listkeys.cpp
index 2a10a1c..1a7ace8 100644
--- a/kgpg/listkeys.cpp
+++ b/kgpg/listkeys.cpp
@@ -21,32 +21,32 @@
#include <unistd.h>
#include <sys/wait.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qlayout.h>
-#include <qvariant.h>
-#include <qregexp.h>
-#include <qpainter.h>
-#include <qvbox.h>
-#include <qclipboard.h>
-#include <qkeysequence.h>
-#include <qtextcodec.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqlayout.h>
+#include <tqvariant.h>
+#include <tqregexp.h>
+#include <tqpainter.h>
+#include <tqvbox.h>
+#include <tqclipboard.h>
+#include <tqkeysequence.h>
+#include <tqtextcodec.h>
#include <kstatusbar.h>
-#include <qtimer.h>
-#include <qpaintdevicemetrics.h>
-#include <qtooltip.h>
-#include <qheader.h>
+#include <tqtimer.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqtooltip.h>
+#include <tqheader.h>
#include <ktempfile.h>
#include <kdebug.h>
#include <kprocess.h>
#include <kprocio.h>
-#include <qwidget.h>
+#include <tqwidget.h>
#include <kaction.h>
-#include <qcheckbox.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qradiobutton.h>
-#include <qpopupmenu.h>
+#include <tqcheckbox.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqradiobutton.h>
+#include <tqpopupmenu.h>
#include <kurlrequester.h>
#include <kio/netaccess.h>
@@ -70,8 +70,8 @@
#include <kdesktopfile.h>
#include <kmimetype.h>
#include <kstandarddirs.h>
-#include <qcombobox.h>
-#include <qtabwidget.h>
+#include <tqcombobox.h>
+#include <tqtabwidget.h>
#include <kinputdialog.h>
#include <kpassdlg.h>
#include <kpassivepopup.h>
@@ -102,15 +102,15 @@
class UpdateViewItem : public KListViewItem
{
public:
- UpdateViewItem(QListView *parent, QString name,QString email, QString tr, QString val, QString size, QString creat, QString id,bool isdefault,bool isexpired);
- UpdateViewItem(QListViewItem *parent=0, QString name=QString::null,QString email=QString::null, QString tr=QString::null, QString val=QString::null, QString size=QString::null, QString creat=QString::null, QString id=QString::null);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align);
- virtual int compare( QListViewItem * item, int c, bool ascending ) const;
- virtual QString key( int column, bool ) const;
+ UpdateViewItem(TQListView *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired);
+ UpdateViewItem(TQListViewItem *parent=0, TQString name=TQString::null,TQString email=TQString::null, TQString tr=TQString::null, TQString val=TQString::null, TQString size=TQString::null, TQString creat=TQString::null, TQString id=TQString::null);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align);
+ virtual int compare( TQListViewItem * item, int c, bool ascending ) const;
+ virtual TQString key( int column, bool ) const;
bool def,exp;
};
-UpdateViewItem::UpdateViewItem(QListView *parent, QString name,QString email, QString tr, QString val, QString size, QString creat, QString id,bool isdefault,bool isexpired)
+UpdateViewItem::UpdateViewItem(TQListView *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id,bool isdefault,bool isexpired)
: KListViewItem(parent)
{
def=isdefault;
@@ -124,7 +124,7 @@ UpdateViewItem::UpdateViewItem(QListView *parent, QString name,QString email, QS
setText(6,id);
}
-UpdateViewItem::UpdateViewItem(QListViewItem *parent, QString name,QString email, QString tr, QString val, QString size, QString creat, QString id)
+UpdateViewItem::UpdateViewItem(TQListViewItem *parent, TQString name,TQString email, TQString tr, TQString val, TQString size, TQString creat, TQString id)
: KListViewItem(parent)
{
setText(0,name);
@@ -137,21 +137,21 @@ UpdateViewItem::UpdateViewItem(QListViewItem *parent, QString name,QString email
}
-void UpdateViewItem::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment)
+void UpdateViewItem::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{
- QColorGroup _cg( cg );
+ TQColorGroup _cg( cg );
if (depth()==0)
{
if ((def) && (column<2)) {
- QFont font(p->font());
+ TQFont font(p->font());
font.setBold(true);
p->setFont(font);
}
- else if ((exp) && (column==3)) _cg.setColor( QColorGroup::Text, Qt::red );
+ else if ((exp) && (column==3)) _cg.setColor( TQColorGroup::Text, Qt::red );
}
else
if (column<2) {
- QFont font(p->font());
+ TQFont font(p->font());
font.setItalic(true);
p->setFont(font);
}
@@ -163,12 +163,12 @@ void UpdateViewItem::paintCell(QPainter *p, const QColorGroup &cg,int column, in
#include <iostream>
using namespace std;
-int UpdateViewItem :: compare( QListViewItem * item, int c, bool ascending ) const
+int UpdateViewItem :: compare( TQListViewItem * item, int c, bool ascending ) const
{
int rc = 0;
if ((c==3) || (c==5)) {
- QDate d = KGlobal::locale()->readDate(text(c));
- QDate itemDate = KGlobal::locale()->readDate(item->text(c));
+ TQDate d = KGlobal::locale()->readDate(text(c));
+ TQDate itemDate = KGlobal::locale()->readDate(item->text(c));
bool itemDateValid = itemDate.isValid();
if (d.isValid()) {
if (itemDateValid) {
@@ -184,8 +184,8 @@ int UpdateViewItem :: compare( QListViewItem * item, int c, bool ascending ) co
}
if (c==2) /* sorting by pixmap */
{
- const QPixmap* pix = pixmap(c);
- const QPixmap* itemPix = item->pixmap(c);
+ const TQPixmap* pix = pixmap(c);
+ const TQPixmap* itemPix = item->pixmap(c);
int serial,itemSerial;
if (!pix)
serial=0;
@@ -201,10 +201,10 @@ int UpdateViewItem :: compare( QListViewItem * item, int c, bool ascending ) co
rc=1;
return rc;
}
- return QListViewItem::compare(item,c,ascending);
+ return TQListViewItem::compare(item,c,ascending);
}
-QString UpdateViewItem::key( int column, bool ) const
+TQString UpdateViewItem::key( int column, bool ) const
{
return text( column ).lower();
}
@@ -213,12 +213,12 @@ QString UpdateViewItem::key( int column, bool ) const
////////////////////////////////////////////////////////////////////////////////////////////////////
//////////////// Secret key selection dialog, used when user wants to sign a key
-KgpgSelKey::KgpgSelKey(QWidget *parent, const char *name,bool allowMultipleSelection, QString preselected):
+KgpgSelKey::KgpgSelKey(TQWidget *parent, const char *name,bool allowMultipleSelection, TQString preselected):
KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
{
- QString keyname;
- page = new QWidget(this);
- QLabel *labeltxt;
+ TQString keyname;
+ page = new TQWidget(this);
+ TQLabel *labeltxt;
KIconLoader *loader = KGlobal::iconLoader();
keyPair=loader->loadIcon("kgpg_key2",KIcon::Small,20);
@@ -231,15 +231,15 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
keysListpr->setShowSortIndicator(true);
keysListpr->setFullWidth(true);
keysListpr->setAllColumnsShowFocus(true);
- if (allowMultipleSelection) keysListpr->setSelectionMode(QListView::Extended);
+ if (allowMultipleSelection) keysListpr->setSelectionMode(TQListView::Extended);
- labeltxt=new QLabel(i18n("Choose secret key:"),page);
- vbox=new QVBoxLayout(page);
+ labeltxt=new TQLabel(i18n("Choose secret key:"),page);
+ vbox=new TQVBoxLayout(page);
- if (preselected==QString::null) preselected = KGpgSettings::defaultKey();
+ if (preselected==TQString::null) preselected = KGpgSettings::defaultKey();
FILE *fp,*fp2;
- QString fullname,tst,tst2;
+ TQString fullname,tst,tst2;
char line[300];
bool selectedok=false;
@@ -248,21 +248,21 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
fp = popen("gpg --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- tst=QString::fromUtf8(line);
+ tst=TQString::fromUtf8(line);
if (tst.startsWith("sec")) {
- QStringList keyString=QStringList::split(":",tst,true);
- QString val=keyString[6];
- QString id=QString("0x"+keyString[4].right(8));
+ TQStringList keyString=TQStringList::split(":",tst,true);
+ TQString val=keyString[6];
+ TQString id=TQString("0x"+keyString[4].right(8));
if (val.isEmpty())
val=i18n("Unlimited");
fullname=keyString[9];
- fp2 = popen(QFile::encodeName(QString("gpg --no-tty --with-colons --list-key %1").arg(KShellProcess::quote(id))), "r");
+ fp2 = popen(TQFile::encodeName(TQString("gpg --no-tty --with-colons --list-key %1").arg(KShellProcess::quote(id))), "r");
bool dead=true;
while ( fgets( line, sizeof(line), fp2)) {
- tst2=QString::fromUtf8(line);
+ tst2=TQString::fromUtf8(line);
if (tst2.startsWith("pub")) {
- const QString trust2=tst2.section(':',1,1);
+ const TQString trust2=tst2.section(':',1,1);
switch( trust2[0] ) {
case 'f':
dead=false;
@@ -283,13 +283,13 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
}
pclose(fp2);
if (!fullname.isEmpty() && (!dead)) {
- QString keyMail,keyName;
+ TQString keyMail,keyName;
if (fullname.find("<")!=-1) {
keyMail=fullname.section('<',-1,-1);
keyMail.truncate(keyMail.length()-1);
keyName=fullname.section('<',0,0);
} else {
- keyMail=QString::null;
+ keyMail=TQString::null;
keyName=fullname;
}
@@ -313,10 +313,10 @@ KDialogBase( parent, name, true,i18n("Private Key List"),Ok | Cancel)
if (warn)
{
- KMessageBox::information(this,i18n("<qt><b>Some of your secret keys are untrusted.</b><br>Change their trust if you want to use them for signing.</qt>"),QString::null,"warnUntrusted");
+ KMessageBox::information(this,i18n("<qt><b>Some of your secret keys are untrusted.</b><br>Change their trust if you want to use them for signing.</qt>"),TQString::null,"warnUntrusted");
}
- 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 *)));
if (!selectedok)
@@ -347,7 +347,7 @@ void KgpgSelKey::slotOk()
accept();
}
-void KgpgSelKey::slotSelect(QListViewItem *item)
+void KgpgSelKey::slotSelect(TQListViewItem *item)
{
if (item==NULL)
return;
@@ -358,14 +358,14 @@ void KgpgSelKey::slotSelect(QListViewItem *item)
}
-QString KgpgSelKey::getkeyID()
+TQString KgpgSelKey::getkeyID()
{
///// emit selected key
if (keysListpr->currentItem()==NULL)
- return(QString::null);
- QString result;
- QPtrList< QListViewItem > list = keysListpr->selectedItems(false);
- QListViewItem *item;
+ return(TQString::null);
+ TQString result;
+ TQPtrList< TQListViewItem > list = keysListpr->selectedItems(false);
+ TQListViewItem *item;
for ( item = list.first(); item; item = list.next() )
{
result.append(item->text(2));
@@ -374,12 +374,12 @@ QString KgpgSelKey::getkeyID()
return(result);
}
-QString KgpgSelKey::getkeyMail()
+TQString KgpgSelKey::getkeyMail()
{
- QString username;
+ TQString username;
///// emit selected key
if (keysListpr->currentItem()==NULL)
- return(QString::null);
+ return(TQString::null);
else {
username=keysListpr->currentItem()->text(0);
//username=username.section(' ',0,0);
@@ -392,7 +392,7 @@ QString KgpgSelKey::getkeyMail()
/////////////////////////////////////////////////////////////////////////////////////////////
-KeyView::KeyView( QWidget *parent, const char *name )
+KeyView::KeyView( TQWidget *parent, const char *name )
: KListView( parent, name )
{
KIconLoader *loader = KGlobal::iconLoader();
@@ -405,7 +405,7 @@ KeyView::KeyView( QWidget *parent, const char *name )
pixuserid=loader->loadIcon("kgpg_identity",KIcon::Small,20);
pixuserphoto=loader->loadIcon("kgpg_photo",KIcon::Small,20);
pixRevoke=loader->loadIcon("stop",KIcon::Small,20);
- QPixmap blankFrame;
+ TQPixmap blankFrame;
blankFrame.load(locate("appdata", "pics/kgpg_blank.png"));
trustunknown.load(locate("appdata", "pics/kgpg_fill.png"));
@@ -413,18 +413,18 @@ KeyView::KeyView( QWidget *parent, const char *name )
bitBlt(&trustunknown,0,0,&blankFrame,0,0,50,15);
trustbad.load(locate("appdata", "pics/kgpg_fill.png"));
- trustbad.fill(KGpgSettings::colorBad());//QColor(172,0,0));
+ trustbad.fill(KGpgSettings::colorBad());//TQColor(172,0,0));
bitBlt(&trustbad,0,0,&blankFrame,0,0,50,15);
trustrevoked.load(locate("appdata", "pics/kgpg_fill.png"));
- trustrevoked.fill(KGpgSettings::colorRev());//QColor(30,30,30));
+ trustrevoked.fill(KGpgSettings::colorRev());//TQColor(30,30,30));
bitBlt(&trustrevoked,0,0,&blankFrame,0,0,50,15);
trustgood.load(locate("appdata", "pics/kgpg_fill.png"));
- trustgood.fill(KGpgSettings::colorGood());//QColor(144,255,0));
+ trustgood.fill(KGpgSettings::colorGood());//TQColor(144,255,0));
bitBlt(&trustgood,0,0,&blankFrame,0,0,50,15);
- connect(this,SIGNAL(expanded (QListViewItem *)),this,SLOT(expandKey(QListViewItem *)));
+ connect(this,TQT_SIGNAL(expanded (TQListViewItem *)),this,TQT_SLOT(expandKey(TQListViewItem *)));
header()->setMovingEnabled(false);
setAcceptDrops(true);
setDragEnabled(true);
@@ -434,20 +434,20 @@ KeyView::KeyView( QWidget *parent, const char *name )
void KeyView::droppedfile (KURL url)
{
- if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").arg(url.path()), QString::null, i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this,i18n("<p>Do you want to import file <b>%1</b> into your key ring?</p>").arg(url.path()), TQString::null, i18n("Import"), i18n("Do Not Import"))!=KMessageBox::Yes)
return;
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKeyURL(url);
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),this,SLOT(slotReloadKeys(QStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SLOT(slotReloadKeys(TQStringList)));
}
-void KeyView::contentsDragMoveEvent(QDragMoveEvent *e)
+void KeyView::contentsDragMoveEvent(TQDragMoveEvent *e)
{
e->accept (KURLDrag::canDecode(e));
}
-void KeyView::contentsDropEvent (QDropEvent *o)
+void KeyView::contentsDropEvent (TQDropEvent *o)
{
KURL::List list;
if ( KURLDrag::decode( o, list ) )
@@ -458,25 +458,25 @@ void KeyView::startDrag()
{
FILE *fp;
char line[200]="";
- QString keyid=currentItem()->text(6);
+ TQString keyid=currentItem()->text(6);
if (!keyid.startsWith("0x"))
return;
- QString gpgcmd="gpg --display-charset=utf-8 --no-tty --export --armor "+KShellProcess::quote(keyid.local8Bit());
+ TQString gpgcmd="gpg --display-charset=utf-8 --no-tty --export --armor "+KShellProcess::quote(keyid.local8Bit());
- QString keytxt;
- fp=popen(QFile::encodeName(gpgcmd),"r");
+ TQString keytxt;
+ fp=popen(TQFile::encodeName(gpgcmd),"r");
while ( fgets( line, sizeof(line), fp)) /// read output
- if (!QString(line).startsWith("gpg:"))
- keytxt+=QString::fromUtf8(line);
+ if (!TQString(line).startsWith("gpg:"))
+ keytxt+=TQString::fromUtf8(line);
pclose(fp);
- QDragObject *d = new QTextDrag( keytxt, this );
+ TQDragObject *d = new TQTextDrag( keytxt, this );
d->dragCopy();
// do NOT delete d.
}
-mySearchLine::mySearchLine(QWidget *parent, KeyView *listView, const char *name)
+mySearchLine::mySearchLine(TQWidget *parent, KeyView *listView, const char *name)
:KListViewSearchLine(parent,listView,name)
{
searchListView=listView;
@@ -487,7 +487,7 @@ mySearchLine::~ mySearchLine()
{}
-bool mySearchLine::itemMatches(const QListViewItem *item, const QString & s) const
+bool mySearchLine::itemMatches(const TQListViewItem *item, const TQString & s) const
{
if (item->depth()!=0) return true;
else return KListViewSearchLine::itemMatches(item,s);
@@ -495,13 +495,13 @@ else return KListViewSearchLine::itemMatches(item,s);
-void mySearchLine::updateSearch(const QString& s)
+void mySearchLine::updateSearch(const TQString& s)
{
KListViewSearchLine::updateSearch(s);
if (searchListView->displayOnlySecret || !searchListView->displayDisabled)
{
int disabledSerial=searchListView->trustbad.serialNumber();
- QListViewItem *item=searchListView->firstChild();
+ TQListViewItem *item=searchListView->firstChild();
while (item)
{
if (item->isVisible() && !(item->text(6).isEmpty()))
@@ -519,12 +519,12 @@ void mySearchLine::updateSearch(const QString& s)
/////////////////////////////////////////////////////////////////////////////////////// main window for key management
-listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterface" ), KMainWindow(parent, name,0)
+listKeys::listKeys(TQWidget *parent, const char *name) : DCOPObject( "KeyInterface" ), KMainWindow(parent, name,0)
{
//KWin::setType(Qt::WDestructiveClose);
keysList2 = new KeyView(this);
- keysList2->photoKeysList=QString::null;
+ keysList2->photoKeysList=TQString::null;
keysList2->groupNb=0;
keyStatusBar=NULL;
readOptions();
@@ -533,67 +533,67 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
installEventFilter(this);
setCaption(i18n("Key Management"));
- (void) new KAction(i18n("&Open Editor"), "edit",0,this, SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor");
- KAction *exportPublicKey = new KAction(i18n("E&xport Public Keys..."), "kgpg_export", KStdAccel::shortcut(KStdAccel::Copy),this, SLOT(slotexport()),actionCollection(),"key_export");
- KAction *deleteKey = new KAction(i18n("&Delete Keys"),"editdelete", Qt::Key_Delete,this, SLOT(confirmdeletekey()),actionCollection(),"key_delete");
- signKey = new KAction(i18n("&Sign Keys..."), "kgpg_sign", 0,this, SLOT(signkey()),actionCollection(),"key_sign");
- KAction *delSignKey = new KAction(i18n("Delete Sign&ature"),"editdelete", 0,this, SLOT(delsignkey()),actionCollection(),"key_delsign");
- KAction *infoKey = new KAction(i18n("&Edit Key"), "kgpg_info", Qt::Key_Return,this, SLOT(listsigns()),actionCollection(),"key_info");
- KAction *importKey = new KAction(i18n("&Import Key..."), "kgpg_import", KStdAccel::shortcut(KStdAccel::Paste),this, SLOT(slotPreImportKey()),actionCollection(),"key_import");
- KAction *setDefaultKey = new KAction(i18n("Set as De&fault Key"),0, 0,this, SLOT(slotSetDefKey()),actionCollection(),"key_default");
- importSignatureKey = new KAction(i18n("Import Key From Keyserver"),"network", 0,this, SLOT(preimportsignkey()),actionCollection(),"key_importsign");
- importAllSignKeys = new KAction(i18n("Import &Missing Signatures From Keyserver"),"network", 0,this, SLOT(importallsignkey()),actionCollection(),"key_importallsign");
- refreshKey = new KAction(i18n("&Refresh Keys From Keyserver"),"reload", 0,this, SLOT(refreshKeyFromServer()),actionCollection(),"key_server_refresh");
-
- KAction *createGroup=new KAction(i18n("&Create Group with Selected Keys..."), 0, 0,this, SLOT(createNewGroup()),actionCollection(),"create_group");
- KAction *delGroup= new KAction(i18n("&Delete Group"), 0, 0,this, SLOT(deleteGroup()),actionCollection(),"delete_group");
- KAction *editCurrentGroup= new KAction(i18n("&Edit Group"), 0, 0,this, SLOT(editGroup()),actionCollection(),"edit_group");
-
- KAction *newContact=new KAction(i18n("&Create New Contact in Address Book"), "kaddressbook", 0,this, SLOT(addToKAB()),actionCollection(),"add_kab");
- (void) new KAction(i18n("&Go to Default Key"), "gohome",QKeySequence(CTRL+Qt::Key_Home) ,this, SLOT(slotGotoDefaultKey()),actionCollection(),"go_default_key");
-
- KStdAction::quit(this, SLOT(quitApp()), actionCollection());
- KStdAction::find(this, SLOT(findKey()), actionCollection());
- KStdAction::findNext(this, SLOT(findNextKey()), actionCollection());
- (void) new KAction(i18n("&Refresh List"), "reload", KStdAccel::reload(),this, SLOT(refreshkey()),actionCollection(),"key_refresh");
- KAction *openPhoto= new KAction(i18n("&Open Photo"), "image", 0,this, SLOT(slotShowPhoto()),actionCollection(),"key_photo");
- KAction *deletePhoto= new KAction(i18n("&Delete Photo"), "delete", 0,this, SLOT(slotDeletePhoto()),actionCollection(),"delete_photo");
- KAction *addPhoto= new KAction(i18n("&Add Photo"), 0, 0,this, SLOT(slotAddPhoto()),actionCollection(),"add_photo");
-
- KAction *addUid= new KAction(i18n("&Add User Id"), 0, 0,this, SLOT(slotAddUid()),actionCollection(),"add_uid");
- KAction *delUid= new KAction(i18n("&Delete User Id"), 0, 0,this, SLOT(slotDelUid()),actionCollection(),"del_uid");
-
- KAction *editKey = new KAction(i18n("Edit Key in &Terminal"), "kgpg_term", QKeySequence(ALT+Qt::Key_Return),this, SLOT(slotedit()),actionCollection(),"key_edit");
- KAction *exportSecretKey = new KAction(i18n("Export Secret Key..."), 0, 0,this, SLOT(slotexportsec()),actionCollection(),"key_sexport");
- KAction *revokeKey = new KAction(i18n("Revoke Key..."), 0, 0,this, SLOT(revokeWidget()),actionCollection(),"key_revoke");
-
- KAction *deleteKeyPair = new KAction(i18n("Delete Key Pair"), 0, 0,this, SLOT(deleteseckey()),actionCollection(),"key_pdelete");
- KAction *generateKey = new KAction(i18n("&Generate Key Pair..."), "kgpg_gen", KStdAccel::shortcut(KStdAccel::New),this, SLOT(slotgenkey()),actionCollection(),"key_gener");
-
- KAction *regeneratePublic = new KAction(i18n("&Regenerate Public Key"), 0, 0,this, SLOT(slotregenerate()),actionCollection(),"key_regener");
-
- (void) new KAction(i18n("&Key Server Dialog"), "network", 0,this, SLOT(showKeyServer()),actionCollection(),"key_server");
- KStdAction::preferences(this, SLOT(showOptions()), actionCollection(),"options_configure");
- (void) new KAction(i18n("Tip of the &Day"), "idea", 0,this, SLOT(slotTip()), actionCollection(),"help_tipofday");
- (void) new KAction(i18n("View GnuPG Manual"), "contents", 0,this, SLOT(slotManpage()),actionCollection(),"gpg_man");
-
- (void) new KToggleAction(i18n("&Show only Secret Keys"), "kgpg_show", 0,this, SLOT(slotToggleSecret()),actionCollection(),"show_secret");
+ (void) new KAction(i18n("&Open Editor"), "edit",0,this, TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor");
+ KAction *exportPublicKey = new KAction(i18n("E&xport Public Keys..."), "kgpg_export", KStdAccel::shortcut(KStdAccel::Copy),this, TQT_SLOT(slotexport()),actionCollection(),"key_export");
+ KAction *deleteKey = new KAction(i18n("&Delete Keys"),"editdelete", Qt::Key_Delete,this, TQT_SLOT(confirmdeletekey()),actionCollection(),"key_delete");
+ signKey = new KAction(i18n("&Sign Keys..."), "kgpg_sign", 0,this, TQT_SLOT(signkey()),actionCollection(),"key_sign");
+ KAction *delSignKey = new KAction(i18n("Delete Sign&ature"),"editdelete", 0,this, TQT_SLOT(delsignkey()),actionCollection(),"key_delsign");
+ KAction *infoKey = new KAction(i18n("&Edit Key"), "kgpg_info", Qt::Key_Return,this, TQT_SLOT(listsigns()),actionCollection(),"key_info");
+ KAction *importKey = new KAction(i18n("&Import Key..."), "kgpg_import", KStdAccel::shortcut(KStdAccel::Paste),this, TQT_SLOT(slotPreImportKey()),actionCollection(),"key_import");
+ KAction *setDefaultKey = new KAction(i18n("Set as De&fault Key"),0, 0,this, TQT_SLOT(slotSetDefKey()),actionCollection(),"key_default");
+ importSignatureKey = new KAction(i18n("Import Key From Keyserver"),"network", 0,this, TQT_SLOT(preimportsignkey()),actionCollection(),"key_importsign");
+ importAllSignKeys = new KAction(i18n("Import &Missing Signatures From Keyserver"),"network", 0,this, TQT_SLOT(importallsignkey()),actionCollection(),"key_importallsign");
+ refreshKey = new KAction(i18n("&Refresh Keys From Keyserver"),"reload", 0,this, TQT_SLOT(refreshKeyFromServer()),actionCollection(),"key_server_refresh");
+
+ KAction *createGroup=new KAction(i18n("&Create Group with Selected Keys..."), 0, 0,this, TQT_SLOT(createNewGroup()),actionCollection(),"create_group");
+ KAction *delGroup= new KAction(i18n("&Delete Group"), 0, 0,this, TQT_SLOT(deleteGroup()),actionCollection(),"delete_group");
+ KAction *editCurrentGroup= new KAction(i18n("&Edit Group"), 0, 0,this, TQT_SLOT(editGroup()),actionCollection(),"edit_group");
+
+ KAction *newContact=new KAction(i18n("&Create New Contact in Address Book"), "kaddressbook", 0,this, TQT_SLOT(addToKAB()),actionCollection(),"add_kab");
+ (void) new KAction(i18n("&Go to Default Key"), "gohome",TQKeySequence(CTRL+Qt::Key_Home) ,this, TQT_SLOT(slotGotoDefaultKey()),actionCollection(),"go_default_key");
+
+ KStdAction::quit(this, TQT_SLOT(quitApp()), actionCollection());
+ KStdAction::find(this, TQT_SLOT(findKey()), actionCollection());
+ KStdAction::findNext(this, TQT_SLOT(findNextKey()), actionCollection());
+ (void) new KAction(i18n("&Refresh List"), "reload", KStdAccel::reload(),this, TQT_SLOT(refreshkey()),actionCollection(),"key_refresh");
+ KAction *openPhoto= new KAction(i18n("&Open Photo"), "image", 0,this, TQT_SLOT(slotShowPhoto()),actionCollection(),"key_photo");
+ KAction *deletePhoto= new KAction(i18n("&Delete Photo"), "delete", 0,this, TQT_SLOT(slotDeletePhoto()),actionCollection(),"delete_photo");
+ KAction *addPhoto= new KAction(i18n("&Add Photo"), 0, 0,this, TQT_SLOT(slotAddPhoto()),actionCollection(),"add_photo");
+
+ KAction *addUid= new KAction(i18n("&Add User Id"), 0, 0,this, TQT_SLOT(slotAddUid()),actionCollection(),"add_uid");
+ KAction *delUid= new KAction(i18n("&Delete User Id"), 0, 0,this, TQT_SLOT(slotDelUid()),actionCollection(),"del_uid");
+
+ KAction *editKey = new KAction(i18n("Edit Key in &Terminal"), "kgpg_term", TQKeySequence(ALT+Qt::Key_Return),this, TQT_SLOT(slotedit()),actionCollection(),"key_edit");
+ KAction *exportSecretKey = new KAction(i18n("Export Secret Key..."), 0, 0,this, TQT_SLOT(slotexportsec()),actionCollection(),"key_sexport");
+ KAction *revokeKey = new KAction(i18n("Revoke Key..."), 0, 0,this, TQT_SLOT(revokeWidget()),actionCollection(),"key_revoke");
+
+ KAction *deleteKeyPair = new KAction(i18n("Delete Key Pair"), 0, 0,this, TQT_SLOT(deleteseckey()),actionCollection(),"key_pdelete");
+ KAction *generateKey = new KAction(i18n("&Generate Key Pair..."), "kgpg_gen", KStdAccel::shortcut(KStdAccel::New),this, TQT_SLOT(slotgenkey()),actionCollection(),"key_gener");
+
+ KAction *regeneratePublic = new KAction(i18n("&Regenerate Public Key"), 0, 0,this, TQT_SLOT(slotregenerate()),actionCollection(),"key_regener");
+
+ (void) new KAction(i18n("&Key Server Dialog"), "network", 0,this, TQT_SLOT(showKeyServer()),actionCollection(),"key_server");
+ KStdAction::preferences(this, TQT_SLOT(showOptions()), actionCollection(),"options_configure");
+ (void) new KAction(i18n("Tip of the &Day"), "idea", 0,this, TQT_SLOT(slotTip()), actionCollection(),"help_tipofday");
+ (void) new KAction(i18n("View GnuPG Manual"), "contents", 0,this, TQT_SLOT(slotManpage()),actionCollection(),"gpg_man");
+
+ (void) new KToggleAction(i18n("&Show only Secret Keys"), "kgpg_show", 0,this, TQT_SLOT(slotToggleSecret()),actionCollection(),"show_secret");
keysList2->displayOnlySecret=false;
- (void) new KToggleAction(i18n("&Hide Expired/Disabled Keys"),0, 0,this, SLOT(slotToggleDisabled()),actionCollection(),"hide_disabled");
+ (void) new KToggleAction(i18n("&Hide Expired/Disabled Keys"),0, 0,this, TQT_SLOT(slotToggleDisabled()),actionCollection(),"hide_disabled");
keysList2->displayDisabled=true;
- sTrust=new KToggleAction(i18n("Trust"),0, 0,this, SLOT(slotShowTrust()),actionCollection(),"show_trust");
- sSize=new KToggleAction(i18n("Size"),0, 0,this, SLOT(slotShowSize()),actionCollection(),"show_size");
- sCreat=new KToggleAction(i18n("Creation"),0, 0,this, SLOT(slotShowCreat()),actionCollection(),"show_creat");
- sExpi=new KToggleAction(i18n("Expiration"),0, 0,this, SLOT(slotShowExpi()),actionCollection(),"show_expi");
+ sTrust=new KToggleAction(i18n("Trust"),0, 0,this, TQT_SLOT(slotShowTrust()),actionCollection(),"show_trust");
+ sSize=new KToggleAction(i18n("Size"),0, 0,this, TQT_SLOT(slotShowSize()),actionCollection(),"show_size");
+ sCreat=new KToggleAction(i18n("Creation"),0, 0,this, TQT_SLOT(slotShowCreat()),actionCollection(),"show_creat");
+ sExpi=new KToggleAction(i18n("Expiration"),0, 0,this, TQT_SLOT(slotShowExpi()),actionCollection(),"show_expi");
photoProps = new KSelectAction(i18n("&Photo ID's"),"kgpg_photo", actionCollection(), "photo_settings");
- connect(photoProps, SIGNAL(activated(int)), this, SLOT(slotSetPhotoSize(int)));
+ connect(photoProps, TQT_SIGNAL(activated(int)), this, TQT_SLOT(slotSetPhotoSize(int)));
// Keep the list in kgpg.kcfg in sync with this one!
- QStringList list;
+ TQStringList list;
list.append(i18n("Disable"));
list.append(i18n("Small"));
list.append(i18n("Medium"));
@@ -619,7 +619,7 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
keysList2->setSelectionModeExt(KListView::Extended);
- popup=new QPopupMenu();
+ popup=new TQPopupMenu();
exportPublicKey->plug(popup);
deleteKey->plug(popup);
signKey->plug(popup);
@@ -630,7 +630,7 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
popup->insertSeparator();
importAllSignKeys->plug(popup);
- popupsec=new QPopupMenu();
+ popupsec=new TQPopupMenu();
exportPublicKey->plug(popupsec);
signKey->plug(popupsec);
infoKey->plug(popupsec);
@@ -646,26 +646,26 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
deleteKeyPair->plug(popupsec);
revokeKey->plug(popupsec);
- popupgroup=new QPopupMenu();
+ popupgroup=new TQPopupMenu();
editCurrentGroup->plug(popupgroup);
delGroup->plug(popupgroup);
- popupout=new QPopupMenu();
+ popupout=new TQPopupMenu();
importKey->plug(popupout);
generateKey->plug(popupout);
- popupsig=new QPopupMenu();
+ popupsig=new TQPopupMenu();
importSignatureKey->plug(popupsig);
delSignKey->plug(popupsig);
- popupphoto=new QPopupMenu();
+ popupphoto=new TQPopupMenu();
openPhoto->plug(popupphoto);
deletePhoto->plug(popupphoto);
- popupuid=new QPopupMenu();
+ popupuid=new TQPopupMenu();
delUid->plug(popupuid);
- popuporphan=new QPopupMenu();
+ popuporphan=new TQPopupMenu();
regeneratePublic->plug(popuporphan);
deleteKeyPair->plug(popuporphan);
@@ -682,12 +682,12 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
setCentralWidget(keysList2);
keysList2->restoreLayout(KGlobal::config(), "KeyView");
- QObject::connect(keysList2,SIGNAL(returnPressed(QListViewItem *)),this,SLOT(listsigns()));
- QObject::connect(keysList2,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(listsigns()));
- QObject::connect(keysList2,SIGNAL(selectionChanged ()),this,SLOT(checkList()));
- QObject::connect(keysList2,SIGNAL(contextMenuRequested(QListViewItem *,const QPoint &,int)),
- this,SLOT(slotmenu(QListViewItem *,const QPoint &,int)));
- QObject::connect(keysList2,SIGNAL(destroyed()),this,SLOT(annule()));
+ TQObject::connect(keysList2,TQT_SIGNAL(returnPressed(TQListViewItem *)),this,TQT_SLOT(listsigns()));
+ TQObject::connect(keysList2,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(listsigns()));
+ TQObject::connect(keysList2,TQT_SIGNAL(selectionChanged ()),this,TQT_SLOT(checkList()));
+ TQObject::connect(keysList2,TQT_SIGNAL(contextMenuRequested(TQListViewItem *,const TQPoint &,int)),
+ this,TQT_SLOT(slotmenu(TQListViewItem *,const TQPoint &,int)));
+ TQObject::connect(keysList2,TQT_SIGNAL(destroyed()),this,TQT_SLOT(annule()));
/////////////// get all keys data
@@ -696,35 +696,35 @@ listKeys::listKeys(QWidget *parent, const char *name) : DCOPObject( "KeyInterfac
setupGUI(KMainWindow::Create | Save | ToolBar | StatusBar | Keys, "listkeys.rc");
toolBar()->insertLineSeparator();
- QToolButton *clearSearch = new QToolButton(toolBar());
+ TQToolButton *clearSearch = new TQToolButton(toolBar());
clearSearch->setTextLabel(i18n("Clear Search"), true);
- clearSearch->setIconSet(SmallIconSet(QApplication::reverseLayout() ? "clear_left"
+ clearSearch->setIconSet(SmallIconSet(TQApplication::reverseLayout() ? "clear_left"
: "locationbar_erase"));
- (void) new QLabel(i18n("Search: "),toolBar());
+ (void) new TQLabel(i18n("Search: "),toolBar());
listViewSearch = new mySearchLine(toolBar(),keysList2);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
- (void)new KAction(i18n("Filter Search"), Qt::Key_F6, listViewSearch, SLOT(setFocus()),actionCollection(), "search_focus");
+ (void)new KAction(i18n("Filter Search"), Qt::Key_F6, listViewSearch, TQT_SLOT(setFocus()),actionCollection(), "search_focus");
sTrust->setChecked(KGpgSettings::showTrust());
sSize->setChecked(KGpgSettings::showSize());
sCreat->setChecked(KGpgSettings::showCreat());
sExpi->setChecked(KGpgSettings::showExpi());
- statusbarTimer = new QTimer(this);
+ statusbarTimer = new TQTimer(this);
keyStatusBar->insertItem("",0,1);
keyStatusBar->insertFixedItem(i18n("00000 Keys, 000 Groups"),1,true);
keyStatusBar->setItemAlignment(0, AlignLeft);
keyStatusBar->changeItem("",1);
- QObject::connect(keysList2,SIGNAL(statusMessage(QString,int,bool)),this,SLOT(changeMessage(QString,int,bool)));
- QObject::connect(statusbarTimer,SIGNAL(timeout()),this,SLOT(statusBarTimeout()));
+ TQObject::connect(keysList2,TQT_SIGNAL(statusMessage(TQString,int,bool)),this,TQT_SLOT(changeMessage(TQString,int,bool)));
+ TQObject::connect(statusbarTimer,TQT_SIGNAL(timeout()),this,TQT_SLOT(statusBarTimeout()));
s_kgpgEditor= new KgpgApp(parent, "editor",WType_Dialog,actionCollection()->action("go_default_key")->shortcut(),true);
- connect(s_kgpgEditor,SIGNAL(refreshImported(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
- connect(this,SIGNAL(fontChanged(QFont)),s_kgpgEditor,SLOT(slotSetFont(QFont)));
- connect(s_kgpgEditor->view->editor,SIGNAL(refreshImported(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
+ connect(s_kgpgEditor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
+ connect(this,TQT_SIGNAL(fontChanged(TQFont)),s_kgpgEditor,TQT_SLOT(slotSetFont(TQFont)));
+ connect(s_kgpgEditor->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
}
@@ -739,10 +739,10 @@ show();
void listKeys::slotOpenEditor()
{
KgpgApp *kgpgtxtedit = new KgpgApp(this, "editor",WType_TopLevel | WDestructiveClose,actionCollection()->action("go_default_key")->shortcut());
- connect(kgpgtxtedit,SIGNAL(refreshImported(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
- connect(kgpgtxtedit,SIGNAL(encryptFiles(KURL::List)),this,SIGNAL(encryptFiles(KURL::List)));
- connect(this,SIGNAL(fontChanged(QFont)),kgpgtxtedit,SLOT(slotSetFont(QFont)));
- connect(kgpgtxtedit->view->editor,SIGNAL(refreshImported(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
+ connect(kgpgtxtedit,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
+ connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SIGNAL(encryptFiles(KURL::List)));
+ connect(this,TQT_SIGNAL(fontChanged(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont)));
+ connect(kgpgtxtedit->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
kgpgtxtedit->show();
}
@@ -751,7 +751,7 @@ void listKeys::statusBarTimeout()
keyStatusBar->changeItem("",0);
}
-void listKeys::changeMessage(QString msg, int nb, bool keep)
+void listKeys::changeMessage(TQString msg, int nb, bool keep)
{
statusbarTimer->stop();
if ((nb==0) & (!keep))
@@ -806,10 +806,10 @@ void listKeys::slotShowCreat()
}
-bool listKeys::eventFilter( QObject *, QEvent *e )
+bool listKeys::eventFilter( TQObject *, TQEvent *e )
{
- if ((e->type() == QEvent::Show) && (showTipOfDay)) {
- KTipDialog::showTip(this, QString("kgpg/tips"), false);
+ if ((e->type() == TQEvent::Show) && (showTipOfDay)) {
+ KTipDialog::showTip(this, TQString("kgpg/tips"), false);
showTipOfDay=false;
}
return FALSE;
@@ -818,7 +818,7 @@ bool listKeys::eventFilter( QObject *, QEvent *e )
void listKeys::slotToggleSecret()
{
- QListViewItem *item=keysList2->firstChild();
+ TQListViewItem *item=keysList2->firstChild();
if (!item)
return;
@@ -828,7 +828,7 @@ void listKeys::slotToggleSecret()
void listKeys::slotToggleDisabled()
{
- QListViewItem *item=keysList2->firstChild();
+ TQListViewItem *item=keysList2->firstChild();
if (!item)
return;
@@ -838,7 +838,7 @@ void listKeys::slotToggleDisabled()
void listKeys::slotGotoDefaultKey()
{
- QListViewItem *myDefaulKey = keysList2->findItem(KGpgSettings::defaultKey(),6);
+ TQListViewItem *myDefaulKey = keysList2->findItem(KGpgSettings::defaultKey(),6);
keysList2->clearSelection();
keysList2->setCurrentItem(myDefaulKey);
keysList2->setSelected(myDefaulKey,true);
@@ -851,7 +851,7 @@ void listKeys::refreshKeyFromServer()
{
if (keysList2->currentItem()==NULL)
return;
- QString keyIDS;
+ TQString keyIDS;
keysList=keysList2->selectedItems();
bool keyDepth=true;
for ( uint i = 0; i < keysList.count(); ++i )
@@ -868,7 +868,7 @@ void listKeys::refreshKeyFromServer()
kServer=new keyServer(0,"server_dialog",false);
kServer->page->kLEimportid->setText(keyIDS);
kServer->slotImport();
- connect( kServer, SIGNAL( importFinished(QString) ) , this, SLOT(refreshFinished()));
+ connect( kServer, TQT_SIGNAL( importFinished(TQString) ) , this, TQT_SLOT(refreshFinished()));
}
@@ -885,7 +885,7 @@ void listKeys::refreshFinished()
void listKeys::slotDelUid()
{
- QListViewItem *item=keysList2->currentItem();
+ TQListViewItem *item=keysList2->currentItem();
while (item->depth()>0)
item=item->parent();
@@ -903,16 +903,16 @@ void listKeys::slotDelUid()
void listKeys::slotregenerate()
{
FILE *fp;
- QString tst;
+ TQString tst;
char line[300];
- QString cmd="gpg --display-charset=utf-8 --no-secmem-warning --export-secret-key "+keysList2->currentItem()->text(6)+" | gpgsplit --no-split --secret-to-public | gpg --import";
+ TQString cmd="gpg --display-charset=utf-8 --no-secmem-warning --export-secret-key "+keysList2->currentItem()->text(6)+" | gpgsplit --no-split --secret-to-public | gpg --import";
- fp = popen(QFile::encodeName(cmd), "r");
+ fp = popen(TQFile::encodeName(cmd), "r");
while ( fgets( line, sizeof(line), fp)) {
- tst+=QString::fromUtf8(line);
+ tst+=TQString::fromUtf8(line);
}
pclose(fp);
- QString regID=keysList2->currentItem()->text(6);
+ TQString regID=keysList2->currentItem()->text(6);
keysList2->takeItem(keysList2->currentItem());
keysList2->refreshcurrentkey(regID);
}
@@ -925,16 +925,16 @@ void listKeys::slotAddUid()
addUidWidget->setMainWidget(keyUid);
//keyUid->setMinimumSize(keyUid->sizeHint());
keyUid->setMinimumWidth(300);
- connect(keyUid->kLineEdit1,SIGNAL(textChanged ( const QString & )),this,SLOT(slotAddUidEnable(const QString & )));
- if (addUidWidget->exec()!=QDialog::Accepted)
+ connect(keyUid->kLineEdit1,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(slotAddUidEnable(const TQString & )));
+ if (addUidWidget->exec()!=TQDialog::Accepted)
return;
KgpgInterface *addUidProcess=new KgpgInterface();
addUidProcess->KgpgAddUid(keysList2->currentItem()->text(6),keyUid->kLineEdit1->text(),keyUid->kLineEdit2->text(),keyUid->kLineEdit3->text());
- connect(addUidProcess,SIGNAL(addUidFinished()),keysList2,SLOT(refreshselfkey()));
- connect(addUidProcess,SIGNAL(addUidError(QString)),this,SLOT(slotGpgError(QString)));
+ connect(addUidProcess,TQT_SIGNAL(addUidFinished()),keysList2,TQT_SLOT(refreshselfkey()));
+ connect(addUidProcess,TQT_SIGNAL(addUidError(TQString)),this,TQT_SLOT(slotGpgError(TQString)));
}
-void listKeys::slotAddUidEnable(const QString & name)
+void listKeys::slotAddUidEnable(const TQString & name)
{
addUidWidget->enableButtonOK(name.length()>4);
}
@@ -942,23 +942,23 @@ void listKeys::slotAddUidEnable(const QString & name)
void listKeys::slotAddPhoto()
{
- QString mess=i18n("The image must be a JPEG file. Remember that the image is stored within your public key."
+ TQString mess=i18n("The image must be a JPEG file. Remember that the image is stored within your public key."
"If you use a very large picture, your key will become very large as well! Keeping the image "
"close to 240x288 is a good size to use.");
if (KMessageBox::warningContinueCancel(this,mess)!=KMessageBox::Continue)
return;
- QString imagePath=KFileDialog::getOpenFileName (QString::null,"image/jpeg",this);
+ TQString imagePath=KFileDialog::getOpenFileName (TQString::null,"image/jpeg",this);
if (imagePath.isEmpty())
return;
KgpgInterface *addPhotoProcess=new KgpgInterface();
addPhotoProcess->KgpgAddPhoto(keysList2->currentItem()->text(6),imagePath);
- connect(addPhotoProcess,SIGNAL(addPhotoFinished()),this,SLOT(slotUpdatePhoto()));
- connect(addPhotoProcess,SIGNAL(addPhotoError(QString)),this,SLOT(slotGpgError(QString)));
+ connect(addPhotoProcess,TQT_SIGNAL(addPhotoFinished()),this,TQT_SLOT(slotUpdatePhoto()));
+ connect(addPhotoProcess,TQT_SIGNAL(addPhotoError(TQString)),this,TQT_SLOT(slotGpgError(TQString)));
}
-void listKeys::slotGpgError(QString errortxt)
+void listKeys::slotGpgError(TQString errortxt)
{
KMessageBox::detailedSorry(this,i18n("Something unexpected happened during the requested operation.\nPlease check details for full log output."),errortxt);
}
@@ -971,8 +971,8 @@ void listKeys::slotDeletePhoto()
KgpgInterface *delPhotoProcess=new KgpgInterface();
delPhotoProcess->KgpgDeletePhoto(keysList2->currentItem()->parent()->text(6),keysList2->currentItem()->text(6));
- connect(delPhotoProcess,SIGNAL(delPhotoFinished()),this,SLOT(slotUpdatePhoto()));
- connect(delPhotoProcess,SIGNAL(delPhotoError(QString)),this,SLOT(slotGpgError(QString)));
+ connect(delPhotoProcess,TQT_SIGNAL(delPhotoFinished()),this,TQT_SLOT(slotUpdatePhoto()));
+ connect(delPhotoProcess,TQT_SIGNAL(delPhotoError(TQString)),this,TQT_SLOT(slotGpgError(TQString)));
}
void listKeys::slotUpdatePhoto()
@@ -1004,12 +1004,12 @@ void listKeys::slotSetPhotoSize(int size)
///////////////////////////// refresh keys with photo id
- QListViewItem *newdef = keysList2->firstChild();
+ TQListViewItem *newdef = keysList2->firstChild();
while (newdef) {
//if ((keysList2->photoKeysList.find(newdef->text(6))!=-1) && (newdef->childCount ()>0))
if (newdef->childCount ()>0) {
bool hasphoto=false;
- QListViewItem *newdefChild = newdef->firstChild();
+ TQListViewItem *newdefChild = newdef->firstChild();
while (newdefChild) {
if (newdefChild->text(0)==i18n("Photo id")) {
hasphoto=true;
@@ -1030,7 +1030,7 @@ void listKeys::slotSetPhotoSize(int size)
void listKeys::findKey()
{
KFindDialog fd(this,"find_dialog",0,"");
- if ( fd.exec() != QDialog::Accepted )
+ if ( fd.exec() != TQDialog::Accepted )
return;
searchString=fd.pattern();
searchOptions=fd.options();
@@ -1042,10 +1042,10 @@ void listKeys::findFirstKey()
if (searchString.isEmpty())
return;
bool foundItem=true;
- QListViewItem *item=keysList2->firstChild();
+ TQListViewItem *item=keysList2->firstChild();
if (!item)
return;
- QString searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
+ TQString searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
//
@@ -1081,13 +1081,13 @@ void listKeys::findNextKey()
return;
}
bool foundItem=true;
- QListViewItem *item=keysList2->currentItem();
+ TQListViewItem *item=keysList2->currentItem();
if (!item)
return;
while(item->depth() > 0)
item = item->parent();
item=item->nextSibling();
- QString searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
+ TQString searchText=item->text(0)+" "+item->text(1)+" "+item->text(6);
//kdDebug(2100)<<"Next string:"<<searchText<<endl;
//kdDebug(2100)<<"Search:"<<searchString<<endl;
//kdDebug(2100)<<"OPts:"<<searchOptions<<endl;
@@ -1121,8 +1121,8 @@ void listKeys::addToKAB()
{
KABC::Key key;
if (!keysList2->currentItem()) return;
- //QString email=extractKeyMail(keysList2->currentItem()).stripWhiteSpace();
- QString email=keysList2->currentItem()->text(1);
+ //TQString email=extractKeyMail(keysList2->currentItem()).stripWhiteSpace();
+ TQString email=keysList2->currentItem()->text(1);
KABC::AddressBook *ab = KABC::StdAddressBook::self();
if ( !ab->load() ) {
@@ -1134,10 +1134,10 @@ void listKeys::addToKAB()
kapp->startServiceByDesktopName( "kaddressbook" );
DCOPRef call( "kaddressbook", "KAddressBookIface" );
if( !addresseeList.isEmpty() ) {
- call.send( "showContactEditor(QString)", addresseeList.first().uid() );
+ call.send( "showContactEditor(TQString)", addresseeList.first().uid() );
}
else {
- call.send( "addEmail(QString)", QString (keysList2->currentItem()->text(0))+" <"+email+">" );
+ call.send( "addEmail(TQString)", TQString (keysList2->currentItem()->text(0))+" <"+email+">" );
}
}
@@ -1145,8 +1145,8 @@ void listKeys::addToKAB()
void listKeys::allToKAB()
{
KABC::Key key;
- QString email;
- QStringList keylist;
+ TQString email;
+ TQStringList keylist;
KABC::Addressee a;
KABC::AddressBook *ab = KABC::StdAddressBook::self();
@@ -1155,7 +1155,7 @@ void listKeys::allToKAB()
return;
}
- QListViewItem * myChild = keysList2->firstChild();
+ TQListViewItem * myChild = keysList2->firstChild();
while( myChild ) {
//email=extractKeyMail(myChild).stripWhiteSpace();
email=myChild->text(1);
@@ -1181,15 +1181,15 @@ void listKeys::allToKAB()
void listKeys::slotManpage()
{
- kapp->startServiceByDesktopName("khelpcenter", QString("man:/gpg"), 0, 0, 0, "", true);
+ kapp->startServiceByDesktopName("khelpcenter", TQString("man:/gpg"), 0, 0, 0, "", true);
}
void listKeys::slotTip()
{
- KTipDialog::showTip(this, QString("kgpg/tips"), true);
+ KTipDialog::showTip(this, TQString("kgpg/tips"), true);
}
-void listKeys::closeEvent ( QCloseEvent * e )
+void listKeys::closeEvent ( TQCloseEvent * e )
{
//kapp->ref(); // prevent KMainWindow from closing the app
//KMainWindow::closeEvent( e );
@@ -1201,7 +1201,7 @@ void listKeys::closeEvent ( QCloseEvent * e )
void listKeys::showKeyServer()
{
keyServer *ks=new keyServer(this);
- connect(ks,SIGNAL( importFinished(QString) ) , keysList2, SLOT(refreshcurrentkey(QString)));
+ connect(ks,TQT_SIGNAL( importFinished(TQString) ) , keysList2, TQT_SLOT(refreshcurrentkey(TQString)));
ks->exec();
if (ks)
delete ks;
@@ -1211,7 +1211,7 @@ void listKeys::showKeyServer()
void listKeys::checkList()
{
- QPtrList<QListViewItem> exportList=keysList2->selectedItems();
+ TQPtrList<TQListViewItem> exportList=keysList2->selectedItems();
if (exportList.count()>1)
{
stateChanged("multi_selected");
@@ -1271,7 +1271,7 @@ void listKeys::readOptions()
clipboardMode=QClipboard::Selection;
/////// re-read groups in case the config file location was changed
- QStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
+ TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
KGpgSettings::setGroups(groups.join(","));
keysList2->groupNb=groups.count();
if (keyStatusBar)
@@ -1286,12 +1286,12 @@ void listKeys::showOptions()
if (KConfigDialog::showDialog("settings"))
return;
kgpgOptions *optionsDialog=new kgpgOptions(this,"settings");
- connect(optionsDialog,SIGNAL(settingsUpdated()),this,SLOT(readAllOptions()));
- connect(optionsDialog,SIGNAL(homeChanged()),this,SLOT(refreshkey()));
- connect(optionsDialog,SIGNAL(reloadKeyList()),this,SLOT(refreshkey()));
- connect(optionsDialog,SIGNAL(refreshTrust(int,QColor)),keysList2,SLOT(refreshTrust(int,QColor)));
- connect(optionsDialog,SIGNAL(changeFont(QFont)),this,SIGNAL(fontChanged(QFont)));
- connect(optionsDialog,SIGNAL(installShredder()),this,SIGNAL(installShredder()));
+ connect(optionsDialog,TQT_SIGNAL(settingsUpdated()),this,TQT_SLOT(readAllOptions()));
+ connect(optionsDialog,TQT_SIGNAL(homeChanged()),this,TQT_SLOT(refreshkey()));
+ connect(optionsDialog,TQT_SIGNAL(reloadKeyList()),this,TQT_SLOT(refreshkey()));
+ connect(optionsDialog,TQT_SIGNAL(refreshTrust(int,TQColor)),keysList2,TQT_SLOT(refreshTrust(int,TQColor)));
+ connect(optionsDialog,TQT_SIGNAL(changeFont(TQFont)),this,TQT_SIGNAL(fontChanged(TQFont)));
+ connect(optionsDialog,TQT_SIGNAL(installShredder()),this,TQT_SIGNAL(installShredder()));
optionsDialog->exec();
delete optionsDialog;
}
@@ -1307,14 +1307,14 @@ void listKeys::slotSetDefKey()
slotSetDefaultKey(keysList2->currentItem());
}
-void listKeys::slotSetDefaultKey(QString newID)
+void listKeys::slotSetDefaultKey(TQString newID)
{
- QListViewItem *newdef = keysList2->findItem(newID,6);
+ TQListViewItem *newdef = keysList2->findItem(newID,6);
if (newdef)
slotSetDefaultKey(newdef);
}
-void listKeys::slotSetDefaultKey(QListViewItem *newdef)
+void listKeys::slotSetDefaultKey(TQListViewItem *newdef)
{
//kdDebug(2100)<<"------------------start ------------"<<endl;
if ((!newdef) || (newdef->pixmap(2)==NULL))
@@ -1328,7 +1328,7 @@ void listKeys::slotSetDefaultKey(QListViewItem *newdef)
return;
}
- QListViewItem *olddef = keysList2->findItem(KGpgSettings::defaultKey(),6);
+ TQListViewItem *olddef = keysList2->findItem(KGpgSettings::defaultKey(),6);
KGpgSettings::setDefaultKey(newdef->text(6));
KGpgSettings::writeConfig();
@@ -1340,12 +1340,12 @@ void listKeys::slotSetDefaultKey(QListViewItem *newdef)
-void listKeys::slotmenu(QListViewItem *sel, const QPoint &pos, int )
+void listKeys::slotmenu(TQListViewItem *sel, const TQPoint &pos, int )
{
//////////// popup a different menu depending on which key is selected
if (sel!=NULL) {
if (keysList2->selectedItems().count()>1) {
- QPtrList<QListViewItem> exportList=keysList2->selectedItems();
+ TQPtrList<TQListViewItem> exportList=keysList2->selectedItems();
bool keyDepth=true;
for ( uint i = 0; i < exportList.count(); ++i )
if ( exportList.at(i) )
@@ -1398,7 +1398,7 @@ void listKeys::slotmenu(QListViewItem *sel, const QPoint &pos, int )
-void listKeys::slotrevoke(QString keyID,QString revokeUrl,int reason,QString description)
+void listKeys::slotrevoke(TQString keyID,TQString revokeUrl,int reason,TQString description)
{
revKeyProcess=new KgpgInterface();
revKeyProcess->KgpgRevokeKey(keyID,revokeUrl,reason,description);
@@ -1412,69 +1412,69 @@ void listKeys::revokeWidget()
KgpgRevokeWidget *keyRevoke=new KgpgRevokeWidget();
keyRevoke->keyID->setText(keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+") "+i18n("ID: ")+keysList2->currentItem()->text(6));
- keyRevoke->kURLRequester1->setURL(QDir::homeDirPath()+"/"+keysList2->currentItem()->text(1).section('@',0,0)+".revoke");
+ keyRevoke->kURLRequester1->setURL(TQDir::homeDirPath()+"/"+keysList2->currentItem()->text(1).section('@',0,0)+".revoke");
keyRevoke->kURLRequester1->setMode(KFile::File);
keyRevoke->setMinimumSize(keyRevoke->sizeHint());
keyRevoke->show();
keyRevokeWidget->setMainWidget(keyRevoke);
- if (keyRevokeWidget->exec()!=QDialog::Accepted)
+ if (keyRevokeWidget->exec()!=TQDialog::Accepted)
return;
if (keyRevoke->cbSave->isChecked()) {
slotrevoke(keysList2->currentItem()->text(6),keyRevoke->kURLRequester1->url(),keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text());
if (keyRevoke->cbPrint->isChecked())
- connect(revKeyProcess,SIGNAL(revokeurl(QString)),this,SLOT(doFilePrint(QString)));
+ connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(doFilePrint(TQString)));
if (keyRevoke->cbImport->isChecked())
- connect(revKeyProcess,SIGNAL(revokeurl(QString)),this,SLOT(slotImportRevoke(QString)));
+ connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(slotImportRevoke(TQString)));
} else {
- slotrevoke(keysList2->currentItem()->text(6),QString::null,keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text());
+ slotrevoke(keysList2->currentItem()->text(6),TQString::null,keyRevoke->comboBox1->currentItem(),keyRevoke->textDescription->text());
if (keyRevoke->cbPrint->isChecked())
- connect(revKeyProcess,SIGNAL(revokecertificate(QString)),this,SLOT(doPrint(QString)));
+ connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(doPrint(TQString)));
if (keyRevoke->cbImport->isChecked())
- connect(revKeyProcess,SIGNAL(revokecertificate(QString)),this,SLOT(slotImportRevokeTxt(QString)));
+ connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(slotImportRevokeTxt(TQString)));
}
}
-void listKeys::slotImportRevoke(QString url)
+void listKeys::slotImportRevoke(TQString url)
{
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKeyURL(KURL::fromPathOrURL( url ));
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),keysList2,SLOT(refreshselfkey()));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),keysList2,TQT_SLOT(refreshselfkey()));
}
-void listKeys::slotImportRevokeTxt(QString revokeText)
+void listKeys::slotImportRevokeTxt(TQString revokeText)
{
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKey(revokeText);
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),keysList2,SLOT(refreshselfkey()));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),keysList2,TQT_SLOT(refreshselfkey()));
}
void listKeys::slotexportsec()
{
////////////////////// export secret key
- QString warn=i18n("Secret keys SHOULD NOT be saved in an unsafe place.\n"
+ TQString warn=i18n("Secret keys SHOULD NOT be saved in an unsafe place.\n"
"If someone else can access this file, encryption with this key will be compromised!\nContinue key export?");
int result=KMessageBox::questionYesNo(this,warn,i18n("Warning"), i18n("Export"), i18n("Do Not Export"));
if (result!=KMessageBox::Yes)
return;
- QString sname=keysList2->currentItem()->text(1).section('@',0,0);
+ TQString sname=keysList2->currentItem()->text(1).section('@',0,0);
sname=sname.section('.',0,0);
if (sname.isEmpty())
sname=keysList2->currentItem()->text(0).section(' ',0,0);
sname.append(".asc");
- sname.prepend(QDir::homeDirPath()+"/");
+ sname.prepend(TQDir::homeDirPath()+"/");
KURL url=KFileDialog::getSaveURL(sname,"*.asc|*.asc Files", this, i18n("Export PRIVATE KEY As"));
if(!url.isEmpty()) {
- QFile fgpg(url.path());
+ TQFile fgpg(url.path());
if (fgpg.exists())
fgpg.remove();
- KProcIO *p=new KProcIO(QTextCodec::codecForLocale());
- *p<<"gpg"<<"--no-tty"<<"--output"<<QFile::encodeName(url.path())<<"--armor"<<"--export-secret-keys"<<keysList2->currentItem()->text(6);
+ KProcIO *p=new KProcIO(TQTextCodec::codecForLocale());
+ *p<<"gpg"<<"--no-tty"<<"--output"<<TQFile::encodeName(url.path())<<"--armor"<<"--export-secret-keys"<<keysList2->currentItem()->text(6);
p->start(KProcess::Block);
if (fgpg.exists())
@@ -1495,11 +1495,11 @@ void listKeys::slotexport()
return;
- QPtrList<QListViewItem> exportList=keysList2->selectedItems();
+ TQPtrList<TQListViewItem> exportList=keysList2->selectedItems();
if (exportList.count()==0)
return;
- QString sname;
+ TQString sname;
if (exportList.count()==1) {
sname=keysList2->currentItem()->text(1).section('@',0,0);
@@ -1509,7 +1509,7 @@ void listKeys::slotexport()
} else
sname="keyring";
sname.append(".asc");
- sname.prepend(QDir::homeDirPath()+"/");
+ sname.prepend(TQDir::homeDirPath()+"/");
KDialogBase *dial=new KDialogBase( KDialogBase::Swallow, i18n("Public Key Export"), KDialogBase::Ok | KDialogBase::Cancel, KDialogBase::Ok, this, "key_export",true);
@@ -1520,29 +1520,29 @@ void listKeys::slotexport()
page->newFilename->setMode(KFile::File);
page->show();
- if (dial->exec()==QDialog::Accepted) {
+ if (dial->exec()==TQDialog::Accepted) {
////////////////////////// export to file
- QString expname;
+ TQString expname;
bool exportAttr=page->exportAttributes->isChecked();
if (page->checkServer->isChecked()) {
keyServer *expServer=new keyServer(0,"server_export",false);
expServer->page->exportAttributes->setChecked(exportAttr);
- QStringList exportKeysList;
+ TQStringList exportKeysList;
for ( uint i = 0; i < exportList.count(); ++i )
if ( exportList.at(i) )
exportKeysList << exportList.at(i)->text(6).stripWhiteSpace();
expServer->slotExport(exportKeysList);
return;
}
- KProcIO *p=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *p=new KProcIO(TQTextCodec::codecForLocale());
*p<<"gpg"<<"--no-tty";
if (page->checkFile->isChecked()) {
expname=page->newFilename->url().stripWhiteSpace();
if (!expname.isEmpty()) {
- QFile fgpg(expname);
+ TQFile fgpg(expname);
if (fgpg.exists())
fgpg.remove();
- *p<<"--output"<<QFile::encodeName(expname)<<"--export"<<"--armor";
+ *p<<"--output"<<TQFile::encodeName(expname)<<"--export"<<"--armor";
if (!exportAttr)
*p<<"--export-options"<<"no-include-attributes";
@@ -1559,7 +1559,7 @@ void listKeys::slotexport()
}
} else {
- QStringList klist;
+ TQStringList klist;
for ( uint i = 0; i < exportList.count(); ++i )
if ( exportList.at(i) )
@@ -1567,13 +1567,13 @@ void listKeys::slotexport()
KgpgInterface *kexp=new KgpgInterface();
- QString result=kexp->getKey(klist,exportAttr);
+ TQString result=kexp->getKey(klist,exportAttr);
if (page->checkClipboard->isChecked())
slotProcessExportClip(result);
- //connect(kexp,SIGNAL(publicKeyString(QString)),this,SLOT(slotProcessExportClip(QString)));
+ //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),this,TQT_SLOT(slotProcessExportClip(TQString)));
else
slotProcessExportMail(result);
- //connect(kexp,SIGNAL(publicKeyString(QString)),this,SLOT(slotProcessExportMail(QString)));
+ //connect(kexp,TQT_SIGNAL(publicKeyString(TQString)),this,TQT_SLOT(slotProcessExportMail(TQString)));
}
}
@@ -1582,22 +1582,22 @@ void listKeys::slotexport()
-void listKeys::slotProcessExportMail(QString keys)
+void listKeys::slotProcessExportMail(TQString keys)
{
/// start default Mail application
- kapp->invokeMailer(QString::null, QString::null, QString::null, QString::null,
+ kapp->invokeMailer(TQString::null, TQString::null, TQString::null, TQString::null,
keys, //body
- QString::null,
- QString::null); // attachments
+ TQString::null,
+ TQString::null); // attachments
}
-void listKeys::slotProcessExportClip(QString keys)
+void listKeys::slotProcessExportClip(TQString keys)
{
kapp->clipboard()->setText(keys,clipboardMode);
}
-void listKeys::showKeyInfo(QString keyID)
+void listKeys::showKeyInfo(TQString keyID)
{
KgpgKeyInfo *opts=new KgpgKeyInfo(this,"key_props",keyID);
opts->show();
@@ -1609,8 +1609,8 @@ void listKeys::slotShowPhoto()
KTrader::OfferList offers = KTrader::self()->query("image/jpeg", "Type == 'Application'");
KService::Ptr ptr = offers.first();
//KMessageBox::sorry(0,ptr->desktopEntryName());
- KProcIO *p=new KProcIO(QTextCodec::codecForLocale());
- *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<QFile::encodeName(ptr->desktopEntryName()+" %i")<<"--edit-key"<<keysList2->currentItem()->parent()->text(6)<<"uid"<<keysList2->currentItem()->text(6)<<"showphoto"<<"quit";
+ KProcIO *p=new KProcIO(TQTextCodec::codecForLocale());
+ *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQFile::encodeName(ptr->desktopEntryName()+" %i")<<"--edit-key"<<keysList2->currentItem()->parent()->text(6)<<"uid"<<keysList2->currentItem()->text(6)<<"showphoto"<<"quit";
p->start(KProcess::DontCare,true);
}
@@ -1629,16 +1629,16 @@ void listKeys::listsigns()
if (keysList2->currentItem()->pixmap(0)->serialNumber()==keysList2->pixkeyOrphan.serialNumber()) {
if (KMessageBox::questionYesNo(this,i18n("This key is an orphaned secret key (secret key without public key.) It is currently not usable.\n\n"
- "Would you like to regenerate the public key?"), QString::null, i18n("Generate"), i18n("Do Not Generate"))==KMessageBox::Yes)
+ "Would you like to regenerate the public key?"), TQString::null, i18n("Generate"), i18n("Do Not Generate"))==KMessageBox::Yes)
slotregenerate();
return;
}
///////////// open a key info dialog (KgpgKeyInfo, see begining of this file)
- QString key=keysList2->currentItem()->text(6);
+ TQString key=keysList2->currentItem()->text(6);
if (!key.isEmpty()) {
KgpgKeyInfo *opts=new KgpgKeyInfo(this,"key_props",key);
- connect(opts,SIGNAL(keyNeedsRefresh()),keysList2,SLOT(refreshselfkey()));
+ connect(opts,TQT_SIGNAL(keyNeedsRefresh()),keysList2,TQT_SLOT(refreshselfkey()));
opts->exec();
} else
editGroup();
@@ -1646,7 +1646,7 @@ void listKeys::listsigns()
void listKeys::groupAdd()
{
- QPtrList<QListViewItem> addList=gEdit->availableKeys->selectedItems();
+ TQPtrList<TQListViewItem> addList=gEdit->availableKeys->selectedItems();
for ( uint i = 0; i < addList.count(); ++i )
if ( addList.at(i) ) {
gEdit->groupKeys->insertItem(addList.at(i));
@@ -1655,7 +1655,7 @@ void listKeys::groupAdd()
void listKeys::groupRemove()
{
- QPtrList<QListViewItem> remList=gEdit->groupKeys->selectedItems();
+ TQPtrList<TQListViewItem> remList=gEdit->groupKeys->selectedItems();
for ( uint i = 0; i < remList.count(); ++i )
if ( remList.at(i) ) {
gEdit->availableKeys->insertItem(remList.at(i));
@@ -1671,14 +1671,14 @@ void listKeys::deleteGroup()
if (result!=KMessageBox::Continue)
return;
KgpgInterface::delGpgGroup(keysList2->currentItem()->text(0), KGpgSettings::gpgConfigPath());
- QListViewItem *item=keysList2->currentItem()->nextSibling();
+ TQListViewItem *item=keysList2->currentItem()->nextSibling();
delete keysList2->currentItem();
if (!item)
item=keysList2->lastChild();
keysList2->setCurrentItem(item);
keysList2->setSelected(item,true);
- QStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
+ TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
KGpgSettings::setGroups(groups.join(","));
keysList2->groupNb=groups.count();
changeMessage(i18n("%1 Keys, %2 Groups").arg(keysList2->childCount()-keysList2->groupNb).arg(keysList2->groupNb),1);
@@ -1686,8 +1686,8 @@ void listKeys::deleteGroup()
void listKeys::groupChange()
{
- QStringList selected;
- QListViewItem *item=gEdit->groupKeys->firstChild();
+ TQStringList selected;
+ TQListViewItem *item=gEdit->groupKeys->firstChild();
while (item) {
selected+=item->text(2);
item=item->nextSibling();
@@ -1697,10 +1697,10 @@ void listKeys::groupChange()
void listKeys::createNewGroup()
{
- QStringList badkeys,keysGroup;
+ TQStringList badkeys,keysGroup;
if (keysList2->selectedItems().count()>0) {
- QPtrList<QListViewItem> groupList=keysList2->selectedItems();
+ TQPtrList<TQListViewItem> groupList=keysList2->selectedItems();
bool keyDepth=true;
for ( uint i = 0; i < groupList.count(); ++i )
if ( groupList.at(i) ) {
@@ -1720,17 +1720,17 @@ void listKeys::createNewGroup()
KMessageBox::sorry(this,i18n("<qt>You cannot create a group containing signatures, subkeys or other groups.</qt>"));
return;
}
- QString groupName=KInputDialog::getText(i18n("Create New Group"),i18n("Enter new group name:"),QString::null,0,this);
+ TQString groupName=KInputDialog::getText(i18n("Create New Group"),i18n("Enter new group name:"),TQString::null,0,this);
if (groupName.isEmpty())
return;
if (!keysGroup.isEmpty()) {
if (!badkeys.isEmpty())
KMessageBox::informationList(this,i18n("Following keys are not valid or not trusted and will not be added to the group:"),badkeys);
KgpgInterface::setGpgGroupSetting(groupName,keysGroup,KGpgSettings::gpgConfigPath());
- QStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
+ TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
KGpgSettings::setGroups(groups.join(","));
keysList2->refreshgroups();
- QListViewItem *newgrp = keysList2->findItem(groupName,0);
+ TQListViewItem *newgrp = keysList2->findItem(groupName,0);
keysList2->clearSelection();
keysList2->setCurrentItem(newgrp);
@@ -1743,19 +1743,19 @@ void listKeys::createNewGroup()
}
}
-void listKeys::groupInit(QStringList keysGroup)
+void listKeys::groupInit(TQStringList keysGroup)
{
kdDebug(2100)<<"preparing group"<<endl;
- QStringList lostKeys;
+ TQStringList lostKeys;
bool foundId;
- for ( QStringList::Iterator it = keysGroup.begin(); it != keysGroup.end(); ++it ) {
+ for ( TQStringList::Iterator it = keysGroup.begin(); it != keysGroup.end(); ++it ) {
- QListViewItem *item=gEdit->availableKeys->firstChild();
+ TQListViewItem *item=gEdit->availableKeys->firstChild();
foundId=false;
while (item) {
kdDebug(2100)<<"Searching in key: "<<item->text(0)<<endl;
- if (QString(*it).right(8).lower()==item->text(2).right(8).lower()) {
+ if (TQString(*it).right(8).lower()==item->text(2).right(8).lower()) {
gEdit->groupKeys->insertItem(item);
foundId=true;
break;
@@ -1763,7 +1763,7 @@ void listKeys::groupInit(QStringList keysGroup)
item=item->nextSibling();
}
if (!foundId)
- lostKeys+=QString(*it);
+ lostKeys+=TQString(*it);
}
if (!lostKeys.isEmpty())
KMessageBox::informationList(this,i18n("Following keys are in the group but are not valid or not in your keyring. They will be removed from the group."),lostKeys);
@@ -1773,7 +1773,7 @@ void listKeys::editGroup()
{
if (!keysList2->currentItem() || !keysList2->currentItem()->text(6).isEmpty())
return;
- QStringList keysGroup;
+ TQStringList keysGroup;
//KDialogBase *dialogGroupEdit=new KDialogBase( this, "edit_group", true,i18n("Group Properties"),KDialogBase::Ok | KDialogBase::Cancel);
KDialogBase *dialogGroupEdit=new KDialogBase(KDialogBase::Swallow, i18n("Group Properties"), KDialogBase::Ok | KDialogBase::Cancel,KDialogBase::Ok,this,0,true);
@@ -1781,12 +1781,12 @@ void listKeys::editGroup()
gEdit->buttonAdd->setPixmap(KGlobal::iconLoader()->loadIcon("down",KIcon::Small,20));
gEdit->buttonRemove->setPixmap(KGlobal::iconLoader()->loadIcon("up",KIcon::Small,20));
- connect(gEdit->buttonAdd,SIGNAL(clicked()),this,SLOT(groupAdd()));
- connect(gEdit->buttonRemove,SIGNAL(clicked()),this,SLOT(groupRemove()));
- // connect(dialogGroupEdit->okClicked(),SIGNAL(clicked()),this,SLOT(groupChange()));
- connect(gEdit->availableKeys,SIGNAL(doubleClicked (QListViewItem *, const QPoint &, int)),this,SLOT(groupAdd()));
- connect(gEdit->groupKeys,SIGNAL(doubleClicked (QListViewItem *, const QPoint &, int)),this,SLOT(groupRemove()));
- QListViewItem *item=keysList2->firstChild();
+ connect(gEdit->buttonAdd,TQT_SIGNAL(clicked()),this,TQT_SLOT(groupAdd()));
+ connect(gEdit->buttonRemove,TQT_SIGNAL(clicked()),this,TQT_SLOT(groupRemove()));
+ // connect(dialogGroupEdit->okClicked(),TQT_SIGNAL(clicked()),this,TQT_SLOT(groupChange()));
+ connect(gEdit->availableKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),this,TQT_SLOT(groupAdd()));
+ connect(gEdit->groupKeys,TQT_SIGNAL(doubleClicked (TQListViewItem *, const TQPoint &, int)),this,TQT_SLOT(groupRemove()));
+ TQListViewItem *item=keysList2->firstChild();
if (item==NULL)
return;
if (item->pixmap(2)) {
@@ -1806,20 +1806,20 @@ void listKeys::editGroup()
gEdit->availableKeys->setColumnWidth(0,200);
gEdit->availableKeys->setColumnWidth(1,200);
gEdit->availableKeys->setColumnWidth(2,100);
- gEdit->availableKeys->setColumnWidthMode(0,QListView::Manual);
- gEdit->availableKeys->setColumnWidthMode(1,QListView::Manual);
- gEdit->availableKeys->setColumnWidthMode(2,QListView::Manual);
+ gEdit->availableKeys->setColumnWidthMode(0,TQListView::Manual);
+ gEdit->availableKeys->setColumnWidthMode(1,TQListView::Manual);
+ gEdit->availableKeys->setColumnWidthMode(2,TQListView::Manual);
gEdit->groupKeys->setColumnWidth(0,200);
gEdit->groupKeys->setColumnWidth(1,200);
gEdit->groupKeys->setColumnWidth(2,100);
- gEdit->groupKeys->setColumnWidthMode(0,QListView::Manual);
- gEdit->groupKeys->setColumnWidthMode(1,QListView::Manual);
- gEdit->groupKeys->setColumnWidthMode(2,QListView::Manual);
+ gEdit->groupKeys->setColumnWidthMode(0,TQListView::Manual);
+ gEdit->groupKeys->setColumnWidthMode(1,TQListView::Manual);
+ gEdit->groupKeys->setColumnWidthMode(2,TQListView::Manual);
gEdit->setMinimumSize(gEdit->sizeHint());
gEdit->show();
- if (dialogGroupEdit->exec()==QDialog::Accepted)
+ if (dialogGroupEdit->exec()==TQDialog::Accepted)
groupChange();
delete dialogGroupEdit;
}
@@ -1847,11 +1847,11 @@ void listKeys::signkey()
if (signList.count()==1) {
FILE *pass;
char line[200]="";
- QString opt,fingervalue;
- QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colons --fingerprint "+KShellProcess::quote(keysList2->currentItem()->text(6));
- pass=popen(QFile::encodeName(gpgcmd),"r");
+ TQString opt,fingervalue;
+ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colons --fingerprint "+KShellProcess::quote(keysList2->currentItem()->text(6));
+ pass=popen(TQFile::encodeName(gpgcmd),"r");
while ( fgets( line, sizeof(line), pass)) {
- opt=QString::fromUtf8(line);
+ opt=TQString::fromUtf8(line);
if (opt.startsWith("fpr")) {
fingervalue=opt.section(':',9,9);
// format fingervalue in 4-digit groups
@@ -1870,7 +1870,7 @@ void listKeys::signkey()
return;
} else {
- QStringList signKeyList;
+ TQStringList signKeyList;
for ( uint i = 0; i < signList.count(); ++i )
if ( signList.at(i) )
signKeyList+=signList.at(i)->text(0)+" ("+signList.at(i)->text(1)+")"+": "+signList.at(i)->text(6);
@@ -1882,35 +1882,35 @@ void listKeys::signkey()
////////////////// open a secret key selection dialog (KgpgSelKey, see begining of this file)
KgpgSelKey *opts=new KgpgSelKey(this);
- QLabel *signCheck = new QLabel("<qt>"+i18n("How carefully have you checked that the key really "
+ TQLabel *signCheck = new TQLabel("<qt>"+i18n("How carefully have you checked that the key really "
"belongs to the person with whom you wish to communicate:",
"How carefully have you checked that the %n keys really "
"belong to the people with whom you wish to communicate:",signList.count()),opts->page);
opts->vbox->addWidget(signCheck);
- QComboBox *signTrust=new QComboBox(opts->page);
+ TQComboBox *signTrust=new TQComboBox(opts->page);
signTrust->insertItem(i18n("I Will Not Answer"));
signTrust->insertItem(i18n("I Have Not Checked at All"));
signTrust->insertItem(i18n("I Have Done Casual Checking"));
signTrust->insertItem(i18n("I Have Done Very Careful Checking"));
opts->vbox->addWidget(signTrust);
- QCheckBox *localSign = new QCheckBox(i18n("Local signature (cannot be exported)"),opts->page);
+ TQCheckBox *localSign = new TQCheckBox(i18n("Local signature (cannot be exported)"),opts->page);
opts->vbox->addWidget(localSign);
- QCheckBox *terminalSign = new QCheckBox(i18n("Do not sign all user id's (open terminal)"),opts->page);
+ TQCheckBox *terminalSign = new TQCheckBox(i18n("Do not sign all user id's (open terminal)"),opts->page);
opts->vbox->addWidget(terminalSign);
if (signList.count()!=1)
terminalSign->setEnabled(false);
opts->setMinimumHeight(300);
- if (opts->exec()!=QDialog::Accepted) {
+ if (opts->exec()!=TQDialog::Accepted) {
delete opts;
return;
}
- globalkeyID=QString(opts->getkeyID());
- globalkeyMail=QString(opts->getkeyMail());
+ globalkeyID=TQString(opts->getkeyID());
+ globalkeyMail=TQString(opts->getkeyMail());
globalisLocal=localSign->isChecked();
globalChecked=signTrust->currentItem();
keyCount=0;
@@ -1946,7 +1946,7 @@ void listKeys::signLoop()
kdDebug(2100)<<"Sign process for key: "<<keyCount<<" on a total of "<<signList.count()<<endl;
if ( signList.at(keyCount) ) {
KgpgInterface *signKeyProcess=new KgpgInterface();
- QObject::connect(signKeyProcess,SIGNAL(signatureFinished(int)),this,SLOT(signatureResult(int)));
+ TQObject::connect(signKeyProcess,TQT_SIGNAL(signatureFinished(int)),this,TQT_SLOT(signatureResult(int)));
signKeyProcess->KgpgSignKey(signList.at(keyCount)->text(6),globalkeyID,globalkeyMail,globalisLocal,globalChecked);
}
}
@@ -1973,8 +1973,8 @@ void listKeys::importallsignkey()
keysList2->currentItem()->setOpen(true);
keysList2->currentItem()->setOpen(false);
}
- QString missingKeysList;
- QListViewItem *current = keysList2->currentItem()->firstChild();
+ TQString missingKeysList;
+ TQListViewItem *current = keysList2->currentItem()->firstChild();
while (current) {
if ((current->text(0).startsWith("[")) && (current->text(0).endsWith("]"))) ////// ugly hack to detect unknown keys
missingKeysList+=current->text(6)+" ";
@@ -1995,7 +1995,7 @@ void listKeys::preimportsignkey()
importsignkey(keysList2->currentItem()->text(6));
}
-bool listKeys::importRemoteKey(QString keyID)
+bool listKeys::importRemoteKey(TQString keyID)
{
kServer=new keyServer(0,"server_dialog",false,true);
@@ -2004,7 +2004,7 @@ bool listKeys::importRemoteKey(QString keyID)
kServer->page->tabWidget2->setTabEnabled(kServer->page->tabWidget2->page(1),false);
kServer->show();
kServer->raise();
- connect( kServer, SIGNAL( importFinished(QString) ) , this, SLOT( dcopImportFinished()));
+ connect( kServer, TQT_SIGNAL( importFinished(TQString) ) , this, TQT_SLOT( dcopImportFinished()));
return true;
}
@@ -2015,14 +2015,14 @@ void listKeys::dcopImportFinished()
{
if (kServer)
kServer=0L;
- QByteArray params;
- QDataStream stream(params, IO_WriteOnly);
+ TQByteArray params;
+ TQDataStream stream(params, IO_WriteOnly);
stream << true;
kapp->dcopClient()->emitDCOPSignal("keyImported(bool)", params);
refreshkey();
}
-void listKeys::importsignkey(QString importKeyId)
+void listKeys::importsignkey(TQString importKeyId)
{
/////////////// sign a key
kServer=new keyServer(0,"server_dialog",false);
@@ -2030,7 +2030,7 @@ void listKeys::importsignkey(QString importKeyId)
//kServer->Buttonimport->setDefault(true);
kServer->slotImport();
//kServer->show();
- connect( kServer, SIGNAL( importFinished(QString) ) , this, SLOT( importfinished()));
+ connect( kServer, TQT_SIGNAL( importFinished(TQString) ) , this, TQT_SLOT( importfinished()));
}
@@ -2052,7 +2052,7 @@ void listKeys::delsignkey()
return;
}
- QString signID,parentKey,signMail,parentMail;
+ TQString signID,parentKey,signMail,parentMail;
////////////////// open a key selection dialog (KgpgSelKey, see begining of this file)
parentKey=keysList2->currentItem()->parent()->text(6);
@@ -2064,19 +2064,19 @@ void listKeys::delsignkey()
KMessageBox::sorry(this,i18n("Edit key manually to delete a self-signature."));
return;
}
- QString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").arg(signMail).arg(parentMail);
+ TQString ask=i18n("<qt>Are you sure you want to delete signature<br><b>%1</b> from key:<br><b>%2</b>?</qt>").arg(signMail).arg(parentMail);
- if (KMessageBox::questionYesNo(this,ask,QString::null,KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(this,ask,TQString::null,KStdGuiItem::del(),KStdGuiItem::cancel())!=KMessageBox::Yes)
return;
KgpgInterface *delSignKeyProcess=new KgpgInterface();
delSignKeyProcess->KgpgDelSignature(parentKey,signID);
- connect(delSignKeyProcess,SIGNAL(delsigfinished(bool)),this,SLOT(delsignatureResult(bool)));
+ connect(delSignKeyProcess,TQT_SIGNAL(delsigfinished(bool)),this,TQT_SLOT(delsignatureResult(bool)));
}
void listKeys::delsignatureResult(bool success)
{
if (success) {
- QListViewItem *top=keysList2->currentItem();
+ TQListViewItem *top=keysList2->currentItem();
while (top->depth()!=0)
top=top->parent();
while (top->firstChild()!=0)
@@ -2116,26 +2116,26 @@ void listKeys::slotgenkey()
{
////////// generate key
keyGenerate *genkey=new keyGenerate(this,0);
- if (genkey->exec()==QDialog::Accepted) {
+ if (genkey->exec()==TQDialog::Accepted) {
if (!genkey->getmode()) /// normal mode
{
//// extract data
- QString ktype=genkey->getkeytype();
- QString ksize=genkey->getkeysize();
+ TQString ktype=genkey->getkeytype();
+ TQString ksize=genkey->getkeysize();
int kexp=genkey->getkeyexp();
- QString knumb=genkey->getkeynumb();
+ TQString knumb=genkey->getkeynumb();
newKeyName=genkey->getkeyname();
newKeyMail=genkey->getkeymail();
- QString kcomment=genkey->getkeycomm();
+ TQString kcomment=genkey->getkeycomm();
delete genkey;
//genkey->delayedDestruct();
- QCString password;
+ TQCString password;
bool goodpass=false;
while (!goodpass)
{
int code=KPasswordDialog::getNewPassword(password,i18n("<b>Enter passphrase for %1</b>:<br>Passphrase should include non alphanumeric characters and random sequences").arg(newKeyName+" <"+newKeyMail+">"));
- if (code!=QDialog::Accepted)
+ if (code!=TQDialog::Accepted)
return;
if (password.length()<5)
KMessageBox::sorry(this,i18n("This passphrase is not secure enough.\nMinimum length= 5 characters"));
@@ -2143,20 +2143,20 @@ void listKeys::slotgenkey()
goodpass=true;
}
- pop = new KPassivePopup((QWidget *)parent(),"new_key");
+ pop = new KPassivePopup((TQWidget *)parent(),"new_key");
pop->setTimeout(0);
- QWidget *wid=new QWidget(pop);
- QVBoxLayout *vbox=new QVBoxLayout(wid,3);
+ TQWidget *wid=new TQWidget(pop);
+ TQVBoxLayout *vbox=new TQVBoxLayout(wid,3);
- QVBox *passiveBox=pop->standardView(i18n("Generating new key pair."),QString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),wid);
+ TQVBox *passiveBox=pop->standardView(i18n("Generating new key pair."),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),wid);
- QMovie anim;
- anim=QMovie(locate("appdata", "pics/kgpg_anim.gif"));
+ TQMovie anim;
+ anim=TQMovie(locate("appdata", "pics/kgpg_anim.gif"));
- QLabel *tex=new QLabel(wid);
- QLabel *tex2=new QLabel(wid);
+ TQLabel *tex=new TQLabel(wid);
+ TQLabel *tex2=new TQLabel(wid);
tex->setAlignment(AlignHCenter);
tex->setMovie(anim);
tex2->setText(i18n("\nPlease wait..."));
@@ -2169,17 +2169,17 @@ void listKeys::slotgenkey()
pop->show();
changeMessage(i18n("Generating New Key..."),0,true);
- QRect qRect(QApplication::desktop()->screenGeometry());
+ TQRect qRect(TQApplication::desktop()->screenGeometry());
int iXpos=qRect.width()/2-pop->width()/2;
int iYpos=qRect.height()/2-pop->height()/2;
pop->move(iXpos,iYpos);
pop->setAutoDelete(false);
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
- message=QString::null;
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
+ message=TQString::null;
//*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--batch"<<"--passphrase-fd"<<res<<"--gen-key"<<"-a"<<"kgpg.tmp";
*proc<<"gpg"<<"--no-tty"<<"--status-fd=2"<<"--no-secmem-warning"<<"--batch"<<"--gen-key"<<"--utf8-strings";
///////// when process ends, update dialog infos
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this, SLOT(genover(KProcess *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(genover(KProcess *)));
proc->start(KProcess::NotifyOnExit,true);
if (ktype=="RSA")
@@ -2188,29 +2188,29 @@ void listKeys::slotgenkey()
{
proc->writeStdin("Key-Type: DSA");
proc->writeStdin("Subkey-Type: ELG-E");
- proc->writeStdin(QString("Subkey-Length:%1").arg(ksize));
+ proc->writeStdin(TQString("Subkey-Length:%1").arg(ksize));
}
- proc->writeStdin(QString("Passphrase:%1").arg(password));
- proc->writeStdin(QString("Key-Length:%1").arg(ksize));
- proc->writeStdin(QString("Name-Real:%1").arg(newKeyName));
+ proc->writeStdin(TQString("Passphrase:%1").arg(password));
+ proc->writeStdin(TQString("Key-Length:%1").arg(ksize));
+ proc->writeStdin(TQString("Name-Real:%1").arg(newKeyName));
if (!newKeyMail.isEmpty())
- proc->writeStdin(QString("Name-Email:%1").arg(newKeyMail));
+ proc->writeStdin(TQString("Name-Email:%1").arg(newKeyMail));
if (!kcomment.isEmpty())
- proc->writeStdin(QString("Name-Comment:%1").arg(kcomment));
+ proc->writeStdin(TQString("Name-Comment:%1").arg(kcomment));
if (kexp==0)
- proc->writeStdin(QString("Expire-Date:0"));
+ proc->writeStdin(TQString("Expire-Date:0"));
if (kexp==1)
- proc->writeStdin(QString("Expire-Date:%1").arg(knumb));
+ proc->writeStdin(TQString("Expire-Date:%1").arg(knumb));
if (kexp==2)
- proc->writeStdin(QString("Expire-Date:%1w").arg(knumb));
+ proc->writeStdin(TQString("Expire-Date:%1w").arg(knumb));
if (kexp==3)
- proc->writeStdin(QString("Expire-Date:%1m").arg(knumb));
+ proc->writeStdin(TQString("Expire-Date:%1m").arg(knumb));
if (kexp==4)
- proc->writeStdin(QString("Expire-Date:%1y").arg(knumb));
+ proc->writeStdin(TQString("Expire-Date:%1y").arg(knumb));
proc->writeStdin("%commit");
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(readgenprocess(KProcIO *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readgenprocess(KProcIO *)));
proc->closeWhenDone();
} else ////// start expert (=konsole) mode
{
@@ -2230,7 +2230,7 @@ void listKeys::slotgenkey()
void listKeys::readgenprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
if (required.find("KEY_CREATED")!=-1)
newkeyFinger=required.stripWhiteSpace().section(' ',-1);
@@ -2242,20 +2242,20 @@ void listKeys::readgenprocess(KProcIO *p)
void listKeys::genover(KProcess *)
{
- newkeyID=QString::null;
+ newkeyID=TQString::null;
continueSearch=true;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg";
*conprocess<<"--no-secmem-warning"<<"--with-colons"<<"--fingerprint"<<"--list-keys"<<newKeyName;
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(slotReadFingerProcess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(newKeyDone(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(slotReadFingerProcess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(newKeyDone(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
void listKeys::slotReadFingerProcess(KProcIO *p)
{
- QString outp;
+ TQString outp;
while (p->readln(outp)!=-1) {
if (outp.startsWith("pub") && (continueSearch)) {
newkeyID=outp.section(':',4,4).right(8).prepend("0x");
@@ -2287,9 +2287,9 @@ void listKeys::newKeyDone(KProcess *)
page->TLname->setText("<b>"+newKeyName+"</b>");
page->TLemail->setText("<b>"+newKeyMail+"</b>");
if (!newKeyMail.isEmpty())
- page->kURLRequester1->setURL(QDir::homeDirPath()+"/"+newKeyMail.section("@",0,0)+".revoke");
+ page->kURLRequester1->setURL(TQDir::homeDirPath()+"/"+newKeyMail.section("@",0,0)+".revoke");
else
- page->kURLRequester1->setURL(QDir::homeDirPath()+"/"+newKeyName.section(" ",0,0)+".revoke");
+ page->kURLRequester1->setURL(TQDir::homeDirPath()+"/"+newKeyName.section(" ",0,0)+".revoke");
page->TLid->setText("<b>"+newkeyID+"</b>");
page->LEfinger->setText(newkeyFinger);
page->CBdefault->setChecked(true);
@@ -2299,7 +2299,7 @@ void listKeys::newKeyDone(KProcess *)
delete pop;
keyCreated->exec();
- QListViewItem *newdef = keysList2->findItem(newkeyID,6);
+ TQListViewItem *newdef = keysList2->findItem(newkeyID,6);
if (newdef)
if (page->CBdefault->isChecked())
slotSetDefaultKey(newdef);
@@ -2312,30 +2312,30 @@ void listKeys::newKeyDone(KProcess *)
if (page->CBsave->isChecked()) {
slotrevoke(newkeyID,page->kURLRequester1->url(),0,i18n("backup copy"));
if (page->CBprint->isChecked())
- connect(revKeyProcess,SIGNAL(revokeurl(QString)),this,SLOT(doFilePrint(QString)));
+ connect(revKeyProcess,TQT_SIGNAL(revokeurl(TQString)),this,TQT_SLOT(doFilePrint(TQString)));
} else if (page->CBprint->isChecked()) {
- slotrevoke(newkeyID,QString::null,0,i18n("backup copy"));
- connect(revKeyProcess,SIGNAL(revokecertificate(QString)),this,SLOT(doPrint(QString)));
+ slotrevoke(newkeyID,TQString::null,0,i18n("backup copy"));
+ connect(revKeyProcess,TQT_SIGNAL(revokecertificate(TQString)),this,TQT_SLOT(doPrint(TQString)));
}
}
-void listKeys::doFilePrint(QString url)
+void listKeys::doFilePrint(TQString url)
{
- QFile qfile(url);
+ TQFile qfile(url);
if (qfile.open(IO_ReadOnly)) {
- QTextStream t( &qfile );
+ TQTextStream t( &qfile );
doPrint(t.read());
} else
KMessageBox::sorry(this,i18n("<qt>Cannot open file <b>%1</b> for printing...</qt>").arg(url));
}
-void listKeys::doPrint(QString txt)
+void listKeys::doPrint(TQString txt)
{
KPrinter prt;
//kdDebug(2100)<<"Printing..."<<endl;
if (prt.setup(this)) {
- QPainter painter(&prt);
- QPaintDeviceMetrics metrics(painter.device());
+ TQPainter painter(&prt);
+ TQPaintDeviceMetrics metrics(painter.device());
painter.drawText( 0, 0, metrics.width(), metrics.height(), AlignLeft|AlignTop|DontClip,txt );
}
}
@@ -2343,7 +2343,7 @@ void listKeys::doPrint(QString txt)
void listKeys::deleteseckey()
{
//////////////////////// delete a key
- QString res=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")";
+ TQString res=keysList2->currentItem()->text(0)+" ("+keysList2->currentItem()->text(1)+")";
int result=KMessageBox::warningContinueCancel(this,
i18n("<p>Delete <b>SECRET KEY</b> pair <b>%1</b>?</p>Deleting this key pair means you will never be able to decrypt files encrypted with this key again.").arg(res),
i18n("Warning"),
@@ -2358,7 +2358,7 @@ void listKeys::deleteseckey()
*conprocess<<"-e"<<"gpg"
<<"--no-secmem-warning"
<<"--delete-secret-key"<<keysList2->currentItem()->text(6);
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(reloadSecretKeys()));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(reloadSecretKeys()));
conprocess->start(KProcess::NotifyOnExit,KProcess::AllOutput);
}
@@ -2366,10 +2366,10 @@ void listKeys::reloadSecretKeys()
{
FILE *fp;
char line[300];
- keysList2->secretList=QString::null;
+ keysList2->secretList=TQString::null;
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if (lineRead.startsWith("sec"))
keysList2->secretList+="0x"+lineRead.section(':',4,4).right(8)+",";
}
@@ -2391,9 +2391,9 @@ void listKeys::confirmdeletekey()
if (((keysList2->secretList.find(keysList2->currentItem()->text(6))!=-1) || (keysList2->orphanList.find(keysList2->currentItem()->text(6))!=-1)) && (keysList2->selectedItems().count()==1))
deleteseckey();
else {
- QStringList keysToDelete;
- QString secList;
- QPtrList<QListViewItem> exportList=keysList2->selectedItems();
+ TQStringList keysToDelete;
+ TQString secList;
+ TQPtrList<TQListViewItem> exportList=keysList2->selectedItems();
bool secretKeyInside=false;
for ( uint i = 0; i < exportList.count(); ++i )
if ( exportList.at(i) ) {
@@ -2422,7 +2422,7 @@ void listKeys::confirmdeletekey()
void listKeys::deletekey()
{
- QPtrList<QListViewItem> exportList=keysList2->selectedItems();
+ TQPtrList<TQListViewItem> exportList=keysList2->selectedItems();
if (exportList.count()==0)
return;
KProcess gp;
@@ -2441,14 +2441,14 @@ void listKeys::deletekey()
if ( exportList.at(i) )
keysList2->refreshcurrentkey(exportList.at(i));
if (keysList2->currentItem()) {
- QListViewItem * myChild = keysList2->currentItem();
+ TQListViewItem * myChild = keysList2->currentItem();
while(!myChild->isVisible()) {
myChild = myChild->nextSibling();
if (!myChild)
break;
}
if (!myChild) {
- QListViewItem * myChild = keysList2->firstChild();
+ TQListViewItem * myChild = keysList2->firstChild();
while(!myChild->isVisible()) {
myChild = myChild->nextSibling();
if (!myChild)
@@ -2476,25 +2476,25 @@ void listKeys::slotPreImportKey()
page->resize(page->minimumSize());
dial->resize(dial->minimumSize());
- if (dial->exec()==QDialog::Accepted) {
+ if (dial->exec()==TQDialog::Accepted) {
if (page->checkFile->isChecked()) {
- QString impname=page->newFilename->url().stripWhiteSpace();
+ TQString impname=page->newFilename->url().stripWhiteSpace();
if (!impname.isEmpty()) {
changeMessage(i18n("Importing..."),0,true);
////////////////////////// import from file
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKeyURL(KURL::fromPathOrURL( impname ));
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
- connect(importKeyProcess,SIGNAL(refreshOrphaned()),keysList2,SLOT(slotReloadOrphaned()));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(refreshOrphaned()),keysList2,TQT_SLOT(slotReloadOrphaned()));
}
} else {
- QString keystr = kapp->clipboard()->text(clipboardMode);
+ TQString keystr = kapp->clipboard()->text(clipboardMode);
if (!keystr.isEmpty()) {
changeMessage(i18n("Importing..."),0,true);
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKey(keystr);
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),keysList2,SLOT(slotReloadKeys(QStringList)));
- connect(importKeyProcess,SIGNAL(refreshOrphaned()),keysList2,SLOT(slotReloadOrphaned()));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(refreshOrphaned()),keysList2,TQT_SLOT(slotReloadOrphaned()));
}
}
}
@@ -2502,54 +2502,54 @@ void listKeys::slotPreImportKey()
}
-void KeyView::expandGroup(QListViewItem *item)
+void KeyView::expandGroup(TQListViewItem *item)
{
- QStringList keysGroup=KgpgInterface::getGpgGroupSetting(item->text(0),KGpgSettings::gpgConfigPath());
+ TQStringList keysGroup=KgpgInterface::getGpgGroupSetting(item->text(0),KGpgSettings::gpgConfigPath());
kdDebug(2100)<<keysGroup<<endl;
- for ( QStringList::Iterator it = keysGroup.begin(); it != keysGroup.end(); ++it ) {
- UpdateViewItem *item2=new UpdateViewItem(item,QString(*it),QString::null,QString::null,QString::null,QString::null,QString::null,QString::null);
+ for ( TQStringList::Iterator it = keysGroup.begin(); it != keysGroup.end(); ++it ) {
+ UpdateViewItem *item2=new UpdateViewItem(item,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null);
item2->setPixmap(0,pixkeyGroup);
item2->setExpandable(false);
}
}
-QPixmap KeyView::slotGetPhoto(QString photoId,bool mini)
+TQPixmap KeyView::slotGetPhoto(TQString photoId,bool mini)
{
KTempFile *phototmp=new KTempFile();
- QString popt="cp %i "+phototmp->name();
- KProcIO *p=new KProcIO(QTextCodec::codecForLocale());
- *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<QFile::encodeName(popt)<<"--list-keys"<<photoId;
+ TQString popt="cp %i "+phototmp->name();
+ KProcIO *p=new KProcIO(TQTextCodec::codecForLocale());
+ *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(popt)<<"--list-keys"<<photoId;
p->start(KProcess::Block);
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.load(phototmp->name());
- QImage dup=pixmap.convertToImage();
- QPixmap dup2;
+ TQImage dup=pixmap.convertToImage();
+ TQPixmap dup2;
if (!mini)
- dup2.convertFromImage(dup.scale(previewSize+5,previewSize,QImage::ScaleMin));
+ dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQImage::ScaleMin));
else
- dup2.convertFromImage(dup.scale(22,22,QImage::ScaleMin));
+ dup2.convertFromImage(dup.scale(22,22,TQImage::ScaleMin));
phototmp->unlink();
delete phototmp;
return dup2;
}
-void KeyView::expandKey(QListViewItem *item)
+void KeyView::expandKey(TQListViewItem *item)
{
if (item->childCount()!=0)
return; // key has already been expanded
FILE *fp;
- QString cycle;
- QStringList tst;
+ TQString cycle;
+ TQStringList tst;
char tmpline[300];
UpdateViewItem *itemsub=NULL;
UpdateViewItem *itemuid=NULL;
UpdateViewItem *itemsig=NULL;
UpdateViewItem *itemrev=NULL;
- QPixmap keyPhotoId;
+ TQPixmap keyPhotoId;
int uidNumber=2;
bool dropFirstUid=false;
@@ -2557,11 +2557,11 @@ void KeyView::expandKey(QListViewItem *item)
cycle="pub";
bool noID=false;
- fp = popen(QFile::encodeName(QString("gpg --no-secmem-warning --no-tty --with-colons --list-sigs "+item->text(6))), "r");
+ fp = popen(TQFile::encodeName(TQString("gpg --no-secmem-warning --no-tty --with-colons --list-sigs "+item->text(6))), "r");
while ( fgets( tmpline, sizeof(tmpline), fp)) {
- QString line = QString::fromUtf8( tmpline );
- tst=QStringList::split(":",line,true);
+ TQString line = TQString::fromUtf8( tmpline );
+ tst=TQStringList::split(":",line,true);
if ((tst[0]=="pub") && (tst[9].isEmpty())) /// Primary User Id is separated from public key
uidNumber=1;
if (tst[0]=="uid" || tst[0]=="uat") {
@@ -2572,20 +2572,20 @@ void KeyView::expandKey(QListViewItem *item)
if (tst[0]=="uat") {
kdDebug(2100)<<"Found photo at uid "<<uidNumber<<endl;
- itemuid= new UpdateViewItem(item,i18n("Photo id"),QString::null,QString::null,"-","-","-",QString::number(uidNumber));
+ itemuid= new UpdateViewItem(item,i18n("Photo id"),TQString::null,TQString::null,"-","-","-",TQString::number(uidNumber));
if (displayPhoto) {
kgpgphototmp=new KTempFile();
kgpgphototmp->setAutoDelete(true);
- QString pgpgOutput="cp %i "+kgpgphototmp->name();
- KProcIO *p=new KProcIO(QTextCodec::codecForLocale());
- *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<QFile::encodeName(pgpgOutput);
- *p<<"--edit-key"<<item->text(6)<<"uid"<<QString::number(uidNumber)<<"showphoto"<<"quit";
+ TQString pgpgOutput="cp %i "+kgpgphototmp->name();
+ KProcIO *p=new KProcIO(TQTextCodec::codecForLocale());
+ *p<<"gpg"<<"--no-tty"<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput);
+ *p<<"--edit-key"<<item->text(6)<<"uid"<<TQString::number(uidNumber)<<"showphoto"<<"quit";
p->start(KProcess::Block);
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.load(kgpgphototmp->name());
- QImage dup=pixmap.convertToImage();
- QPixmap dup2;
- dup2.convertFromImage(dup.scale(previewSize+5,previewSize,QImage::ScaleMin));
+ TQImage dup=pixmap.convertToImage();
+ TQPixmap dup2;
+ dup2.convertFromImage(dup.scale(previewSize+5,previewSize,TQImage::ScaleMin));
itemuid->setPixmap(0,dup2);
delete kgpgphototmp;
//itemuid->setPixmap(0,keyPhotoId);
@@ -2595,7 +2595,7 @@ void KeyView::expandKey(QListViewItem *item)
cycle="uid";
} else {
kdDebug(2100)<<"Found uid at "<<uidNumber<<endl;
- itemuid= new UpdateViewItem(item,uidKey.gpgkeyname,uidKey.gpgkeymail,QString::null,"-","-","-","-");
+ itemuid= new UpdateViewItem(item,uidKey.gpgkeyname,uidKey.gpgkeymail,TQString::null,"-","-","-","-");
itemuid->setPixmap(2,uidKey.trustpic);
if (noID) {
item->setText(0,uidKey.gpgkeyname);
@@ -2638,7 +2638,7 @@ void KeyView::expandKey(QListViewItem *item)
} else
if (tst[0]=="sub") {
gpgKey subKey=extractKey(line);
- itemsub= new UpdateViewItem(item,i18n("%1 subkey").arg(subKey.gpgkeyalgo),QString::null,QString::null,subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid);
+ itemsub= new UpdateViewItem(item,i18n("%1 subkey").arg(subKey.gpgkeyalgo),TQString::null,TQString::null,subKey.gpgkeyexpiration,subKey.gpgkeysize,subKey.gpgkeycreation,subKey.gpgkeyid);
itemsub->setPixmap(0,pixkeySingle);
itemsub->setPixmap(2,subKey.trustpic);
cycle="sub";
@@ -2661,15 +2661,15 @@ void KeyView::refreshkeylist()
kapp->processEvents();
//////// update display of keys in main management window
kdDebug(2100)<<"Refreshing key list"<<endl;
- QString tst;
+ TQString tst;
char line[300];
UpdateViewItem *item=NULL;
bool noID=false;
bool emptyList=true;
- QString openKeys;
+ TQString openKeys;
// get current position.
- QListViewItem *current = currentItem();
+ TQListViewItem *current = currentItem();
if(current != NULL) {
while(current->depth() > 0) {
current = current->parent();
@@ -2680,22 +2680,22 @@ void KeyView::refreshkeylist()
// refill
clear();
FILE *fp2,*fp;
- QStringList issec;
- secretList=QString::null;
- orphanList=QString::null;
+ TQStringList issec;
+ secretList=TQString::null;
+ orphanList=TQString::null;
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp2)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
kdDebug(2100) << k_funcinfo << "Read one secret key line: " << lineRead << endl;
if (lineRead.startsWith("sec"))
issec<<lineRead.section(':',4,4).right(8);
}
pclose(fp2);
- QString defaultKey = KGpgSettings::defaultKey();
+ TQString defaultKey = KGpgSettings::defaultKey();
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- tst=QString::fromUtf8(line);
+ tst=TQString::fromUtf8(line);
kdDebug(2100) << k_funcinfo << "Read one public key line: " << tst << endl;
if (tst.startsWith("pub")) {
emptyList=false;
@@ -2711,13 +2711,13 @@ void KeyView::refreshkeylist()
if (pubKey.gpgkeyname.isEmpty())
noID=true;
- item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,QString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired);
+ item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired);
item->setPixmap(2,pubKey.trustpic);
item->setExpandable(true);
- QStringList::Iterator ite;
+ TQStringList::Iterator ite;
ite=issec.find(pubKey.gpgkeyid.right(8));
if (ite!=issec.end()) {
item->setPixmap(0,pixkeyPair);
@@ -2739,17 +2739,17 @@ void KeyView::refreshkeylist()
return;
}
kdDebug(2100)<<"Checking Groups"<<endl;
- QStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
+ TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
groupNb=groups.count();
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
- if (!QString(*it).isEmpty()) {
- item=new UpdateViewItem(this,QString(*it),QString::null,QString::null,QString::null,QString::null,QString::null,QString::null,false,false);
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ if (!TQString(*it).isEmpty()) {
+ item=new UpdateViewItem(this,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,false,false);
item->setPixmap(0,pixkeyGroup);
item->setExpandable(false);
}
kdDebug(2100)<<"Finished Groups"<<endl;
- QListViewItem *newPos=0L;
+ TQListViewItem *newPos=0L;
if(current != NULL) {
// select previous selected
if (!current->text(6).isEmpty())
@@ -2773,7 +2773,7 @@ void KeyView::refreshkeylist()
kdDebug(2100)<<"Refresh Finished"<<endl;
}
-void KeyView::insertOrphan(QString currentID)
+void KeyView::insertOrphan(TQString currentID)
{
FILE *fp;
char line[300];
@@ -2781,7 +2781,7 @@ void KeyView::insertOrphan(QString currentID)
bool keyFound=false;
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if ((lineRead.startsWith("sec")) && (lineRead.section(':',4,4).right(8))==currentID.right(8)) {
gpgKey orphanedKey=extractKey(lineRead);
keyFound=true;
@@ -2794,7 +2794,7 @@ void KeyView::insertOrphan(QString currentID)
// if (orphanedKey.gpgkeyname.isEmpty())
// noID=true;
- item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,QString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired);
+ item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired);
item->setPixmap(0,pixkeyOrphan);
}
}
@@ -2809,13 +2809,13 @@ void KeyView::insertOrphan(QString currentID)
setSelected(item,true);
}
-void KeyView::insertOrphanedKeys(QStringList orphans)
+void KeyView::insertOrphanedKeys(TQStringList orphans)
{
FILE *fp;
char line[300];
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if ((lineRead.startsWith("sec")) && (orphans.find(lineRead.section(':',4,4).right(8))!=orphans.end())) {
gpgKey orphanedKey=extractKey(lineRead);
@@ -2828,7 +2828,7 @@ void KeyView::insertOrphanedKeys(QStringList orphans)
// if (orphanedKey.gpgkeyname.isEmpty())
// noID=true;
orphanList+=orphanedKey.gpgkeyid+",";
- UpdateViewItem *item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,QString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired);
+ UpdateViewItem *item=new UpdateViewItem(this,orphanedKey.gpgkeyname,orphanedKey.gpgkeymail,TQString::null,orphanedKey.gpgkeyexpiration,orphanedKey.gpgkeysize,orphanedKey.gpgkeycreation,orphanedKey.gpgkeyid,isbold,isexpired);
item->setPixmap(0,pixkeyOrphan);
}
}
@@ -2837,21 +2837,21 @@ void KeyView::insertOrphanedKeys(QStringList orphans)
void KeyView::refreshgroups()
{
- QListViewItem *item=firstChild();
+ TQListViewItem *item=firstChild();
while (item) {
if (item->text(6).isEmpty()) {
- QListViewItem *item2=item->nextSibling();
+ TQListViewItem *item2=item->nextSibling();
delete item;
item=item2;
} else
item=item->nextSibling();
}
- QStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
+ TQStringList groups=KgpgInterface::getGpgGroupNames(KGpgSettings::gpgConfigPath());
groupNb=groups.count();
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
- if (!QString(*it).isEmpty()) {
- item=new UpdateViewItem(this,QString(*it),QString::null,QString::null,QString::null,QString::null,QString::null,QString::null,false,false);
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ if (!TQString(*it).isEmpty()) {
+ item=new UpdateViewItem(this,TQString(*it),TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,TQString::null,false,false);
item->setPixmap(0,pixkeyGroup);
item->setExpandable(false);
}
@@ -2868,7 +2868,7 @@ void KeyView::refreshselfkey()
refreshcurrentkey(currentItem()->parent());
}
-void KeyView::slotReloadKeys(QStringList keyIDs)
+void KeyView::slotReloadKeys(TQStringList keyIDs)
{
if (keyIDs.isEmpty())
return;
@@ -2877,7 +2877,7 @@ void KeyView::slotReloadKeys(QStringList keyIDs)
refreshkeylist();
return;
}
- for ( QStringList::Iterator it = keyIDs.begin(); it != keyIDs.end(); ++it ) {
+ for ( TQStringList::Iterator it = keyIDs.begin(); it != keyIDs.end(); ++it ) {
refreshcurrentkey(*it);
}
kdDebug(2100)<<"Refreshing key:--------"<<(keyIDs.last()).right(8).prepend("0x")<<endl;
@@ -2888,13 +2888,13 @@ void KeyView::slotReloadKeys(QStringList keyIDs)
void KeyView::slotReloadOrphaned()
{
- QStringList issec;
+ TQStringList issec;
FILE *fp,*fp2;
char line[300];
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp2)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if (lineRead.startsWith("sec"))
issec<<"0x"+lineRead.section(':',4,4).right(8);
}
@@ -2902,13 +2902,13 @@ void KeyView::slotReloadOrphaned()
fp = popen("gpg --no-secmem-warning --no-tty --with-colons --list-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if (lineRead.startsWith("pub"))
issec.remove("0x"+lineRead.section(':',4,4).right(8));
}
pclose(fp);
- QStringList::Iterator it;
+ TQStringList::Iterator it;
for ( it = issec.begin(); it != issec.end(); ++it ) {
if (findItem(*it,6)==0) {
@@ -2921,30 +2921,30 @@ void KeyView::slotReloadOrphaned()
emit statusMessage(i18n("Ready"),0);
}
-void KeyView::refreshcurrentkey(QString currentID)
+void KeyView::refreshcurrentkey(TQString currentID)
{
if (currentID.isNull()) return;
UpdateViewItem *item=NULL;
- QString issec=QString::null;
+ TQString issec=TQString::null;
FILE *fp,*fp2;
char line[300];
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colons --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp2)) {
- QString lineRead=QString::fromUtf8(line);
+ TQString lineRead=TQString::fromUtf8(line);
if (lineRead.startsWith("sec"))
issec+=lineRead.section(':',4,4);
}
pclose(fp2);
- QString defaultKey = KGpgSettings::defaultKey();
+ TQString defaultKey = KGpgSettings::defaultKey();
- QString tst;
+ TQString tst;
bool keyFound=false;
- QString cmd="gpg --no-secmem-warning --no-tty --with-colons --list-keys "+currentID;
- fp = popen(QFile::encodeName(cmd), "r");
+ TQString cmd="gpg --no-secmem-warning --no-tty --with-colons --list-keys "+currentID;
+ fp = popen(TQFile::encodeName(cmd), "r");
while ( fgets( line, sizeof(line), fp)) {
- tst=QString::fromUtf8(line);
+ tst=TQString::fromUtf8(line);
if (tst.startsWith("pub")) {
gpgKey pubKey=extractKey(tst);
keyFound=true;
@@ -2954,7 +2954,7 @@ void KeyView::refreshcurrentkey(QString currentID)
isbold=true;
if (pubKey.gpgkeytrust==i18n("Expired"))
isexpired=true;
- item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,QString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired);
+ item=new UpdateViewItem(this,pubKey.gpgkeyname,pubKey.gpgkeymail,TQString::null,pubKey.gpgkeyexpiration,pubKey.gpgkeysize,pubKey.gpgkeycreation,pubKey.gpgkeyid,isbold,isexpired);
item->setPixmap(2,pubKey.trustpic);
item->setVisible(true);
item->setExpandable(true);
@@ -2982,12 +2982,12 @@ void KeyView::refreshcurrentkey(QString currentID)
}
-void KeyView::refreshcurrentkey(QListViewItem *current)
+void KeyView::refreshcurrentkey(TQListViewItem *current)
{
if (!current)
return;
bool keyIsOpen=false;
- QString keyUpdate=current->text(6);
+ TQString keyUpdate=current->text(6);
if (keyUpdate.isEmpty())
return;
if (current->isOpen())
@@ -3000,10 +3000,10 @@ void KeyView::refreshcurrentkey(QListViewItem *current)
}
-void KeyView::refreshTrust(int color,QColor newColor)
+void KeyView::refreshTrust(int color,TQColor newColor)
{
if (!newColor.isValid()) return;
-QPixmap blankFrame,newtrust;
+TQPixmap blankFrame,newtrust;
int trustFinger=0;
blankFrame.load(locate("appdata", "pics/kgpg_blank.png"));
newtrust.load(locate("appdata", "pics/kgpg_fill.png"));
@@ -3028,7 +3028,7 @@ trustFinger=trustrevoked.serialNumber();
trustrevoked=newtrust;
break;
}
-QListViewItem *item=firstChild();
+TQListViewItem *item=firstChild();
while (item) {
if (item->pixmap(2))
{
@@ -3038,41 +3038,41 @@ QListViewItem *item=firstChild();
}
}
-gpgKey KeyView::extractKey(QString keyColon)
+gpgKey KeyView::extractKey(TQString keyColon)
{
- QStringList keyString=QStringList::split(":",keyColon,true);
+ TQStringList keyString=TQStringList::split(":",keyColon,true);
gpgKey ret;
ret.gpgkeysize=keyString[2];
ret.gpgkeycreation=keyString[5];
if(!ret.gpgkeycreation.isEmpty()) {
- QDate date = QDate::fromString(ret.gpgkeycreation, Qt::ISODate);
+ TQDate date = TQDate::fromString(ret.gpgkeycreation, Qt::ISODate);
ret.gpgkeycreation=KGlobal::locale()->formatDate(date, true);
}
- QString tid=keyString[4];
- ret.gpgkeyid=QString("0x"+tid.right(8));
+ TQString tid=keyString[4];
+ ret.gpgkeyid=TQString("0x"+tid.right(8));
ret.gpgkeyexpiration=keyString[6];
if (ret.gpgkeyexpiration.isEmpty())
ret.gpgkeyexpiration=i18n("Unlimited");
else {
- QDate date = QDate::fromString(ret.gpgkeyexpiration, Qt::ISODate);
+ TQDate date = TQDate::fromString(ret.gpgkeyexpiration, Qt::ISODate);
ret.gpgkeyexpiration=KGlobal::locale()->formatDate(date, true);
}
- QString fullname=keyString[9];
+ TQString fullname=keyString[9];
if (fullname.find("<")!=-1) {
ret.gpgkeymail=fullname.section('<',-1,-1);
ret.gpgkeymail.truncate(ret.gpgkeymail.length()-1);
ret.gpgkeyname=fullname.section('<',0,0);
//ret.gpgkeyname=ret.gpgkeyname.section('(',0,0);
} else {
- ret.gpgkeymail=QString::null;
+ ret.gpgkeymail=TQString::null;
ret.gpgkeyname=fullname;
//ret.gpgkeyname=fullname.section('(',0,0);
}
//ret.gpgkeyname=KgpgInterface::checkForUtf8(ret.gpgkeyname); // FIXME lukas
- QString algo=keyString[3];
+ TQString algo=keyString[3];
if (!algo.isEmpty())
switch( algo.toInt() ) {
case 1:
@@ -3086,12 +3086,12 @@ gpgKey KeyView::extractKey(QString keyColon)
algo=i18n("DSA");
break;
default:
- algo=QString("#" + algo);
+ algo=TQString("#" + algo);
break;
}
ret.gpgkeyalgo=algo;
- const QString trust=keyString[1];
+ const TQString trust=keyString[1];
switch( trust[0] ) {
case 'o':
ret.gpgkeytrust=i18n("Unknown");