summaryrefslogtreecommitdiffstats
path: root/kgpg
diff options
context:
space:
mode:
Diffstat (limited to 'kgpg')
-rw-r--r--kgpg/dcopiface.h4
-rw-r--r--kgpg/detailedconsole.cpp26
-rw-r--r--kgpg/detailedconsole.h4
-rw-r--r--kgpg/keygener.cpp56
-rw-r--r--kgpg/keygener.h14
-rw-r--r--kgpg/keyinfowidget.cpp140
-rw-r--r--kgpg/keyinfowidget.h26
-rw-r--r--kgpg/keyservers.cpp208
-rw-r--r--kgpg/keyservers.h12
-rw-r--r--kgpg/kgpg.cpp324
-rw-r--r--kgpg/kgpg.h40
-rw-r--r--kgpg/kgpgeditor.cpp196
-rw-r--r--kgpg/kgpgeditor.h22
-rw-r--r--kgpg/kgpginterface.cpp768
-rw-r--r--kgpg/kgpginterface.h152
-rw-r--r--kgpg/kgpglibrary.cpp80
-rw-r--r--kgpg/kgpglibrary.h34
-rw-r--r--kgpg/kgpgoptions.cpp158
-rw-r--r--kgpg/kgpgoptions.h38
-rw-r--r--kgpg/kgpgsettings_addons.h6
-rw-r--r--kgpg/kgpgview.cpp126
-rw-r--r--kgpg/kgpgview.h48
-rw-r--r--kgpg/listkeys.cpp978
-rw-r--r--kgpg/listkeys.h154
-rw-r--r--kgpg/main.cpp4
-rw-r--r--kgpg/popuppublic.cpp166
-rw-r--r--kgpg/popuppublic.h18
27 files changed, 1901 insertions, 1901 deletions
diff --git a/kgpg/dcopiface.h b/kgpg/dcopiface.h
index d9b3455..8cd8752 100644
--- a/kgpg/dcopiface.h
+++ b/kgpg/dcopiface.h
@@ -24,8 +24,8 @@ class KeyInterface : virtual public DCOPObject
{
K_DCOP
k_dcop:
- virtual void showKeyInfo(QString keyID) =0;
- virtual bool importRemoteKey(QString keyID)=0;
+ virtual void showKeyInfo(TQString keyID) =0;
+ virtual bool importRemoteKey(TQString keyID)=0;
virtual void showOptions()=0;
virtual void showKeyServer()=0;
virtual void showKeyManager()=0;
diff --git a/kgpg/detailedconsole.cpp b/kgpg/detailedconsole.cpp
index 985ca01..3251056 100644
--- a/kgpg/detailedconsole.cpp
+++ b/kgpg/detailedconsole.cpp
@@ -16,10 +16,10 @@
***************************************************************************/
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvgroupbox.h>
-#include <qtextedit.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvgroupbox.h>
+#include <tqtextedit.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -30,18 +30,18 @@
#include "detailedconsole.h"
-KDetailedConsole::KDetailedConsole(QWidget *parent, const char *name,const QString &boxLabel,const QString &errormessage)
+KDetailedConsole::KDetailedConsole(TQWidget *parent, const char *name,const TQString &boxLabel,const TQString &errormessage)
: KDialogBase(parent,name,true,i18n("Sorry"),KDialogBase::Details|KDialogBase::Ok|KDialogBase::Cancel, KDialogBase::Ok)
{
- QWidget *page = new QWidget( this );
+ TQWidget *page = new TQWidget( this );
setMainWidget(page);
- QVBoxLayout *vbox=new QVBoxLayout(page,0, spacingHint() );
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,0, spacingHint() );
- QLabel *lab1=new QLabel(page);
+ TQLabel *lab1=new TQLabel(page);
lab1->setText(boxLabel);
- QVGroupBox *detailsGroup = new QVGroupBox( i18n("Details"), page);
- (void) new QLabel(errormessage,detailsGroup);
+ TQVGroupBox *detailsGroup = new TQVGroupBox( i18n("Details"), page);
+ (void) new TQLabel(errormessage,detailsGroup);
//labdetails->setMinimumSize(labdetails->sizeHint());
setDetailsWidget(detailsGroup);
vbox->addWidget(lab1);
@@ -51,12 +51,12 @@ KDetailedConsole::KDetailedConsole(QWidget *parent, const char *name,const QStri
KDetailedConsole::~KDetailedConsole()
{}
-KDetailedInfo::KDetailedInfo(QWidget *parent, const char *name , const QString &boxLabel,const QString &errormessage,QStringList keysList)
+KDetailedInfo::KDetailedInfo(TQWidget *parent, const char *name , const TQString &boxLabel,const TQString &errormessage,TQStringList keysList)
: KDialogBase(Swallow, i18n("Info"),KDialogBase::Details|KDialogBase::Ok, KDialogBase::Ok,parent,name,true)
{
bool checkboxResult;
- KMessageBox::createKMessageBox(this, QMessageBox::Information,
- boxLabel, keysList,QString::null,&checkboxResult, 0,errormessage);
+ KMessageBox::createKMessageBox(this, TQMessageBox::Information,
+ boxLabel, keysList,TQString::null,&checkboxResult, 0,errormessage);
}
KDetailedInfo::~KDetailedInfo()
diff --git a/kgpg/detailedconsole.h b/kgpg/detailedconsole.h
index 5d0e669..282516c 100644
--- a/kgpg/detailedconsole.h
+++ b/kgpg/detailedconsole.h
@@ -24,7 +24,7 @@ class KDetailedConsole : public KDialogBase
{
public:
- KDetailedConsole(QWidget *parent=0, const char *name=0,const QString &boxLabel=QString::null,const QString &errormessage=QString::null);
+ KDetailedConsole(TQWidget *parent=0, const char *name=0,const TQString &boxLabel=TQString::null,const TQString &errormessage=TQString::null);
~KDetailedConsole();
};
@@ -34,7 +34,7 @@ class KDetailedInfo : public KDialogBase
{
public:
- KDetailedInfo(QWidget *parent=0, const char *name=0,const QString &boxLabel=QString::null,const QString &errormessage=QString::null,QStringList keysList=QStringList());
+ KDetailedInfo(TQWidget *parent=0, const char *name=0,const TQString &boxLabel=TQString::null,const TQString &errormessage=TQString::null,TQStringList keysList=TQStringList());
~KDetailedInfo();
};
diff --git a/kgpg/keygener.cpp b/kgpg/keygener.cpp
index 739bb55..26ecebe 100644
--- a/kgpg/keygener.cpp
+++ b/kgpg/keygener.cpp
@@ -18,43 +18,43 @@
/////////////////////////////////////////////// code for new key generation
-#include <qwhatsthis.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qvbox.h>
+#include <tqwhatsthis.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqvbox.h>
#include <kcombobox.h>
#include <klineedit.h>
-#include <qcheckbox.h>
-#include <qbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qvbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqvbuttongroup.h>
#include <kmessagebox.h>
#include <klocale.h>
#include "keygener.h"
/////////////////////// main window
-keyGenerate::keyGenerate(QWidget *parent, const char *name):KDialogBase( parent, name, true,i18n("Key Generation"),Apply | Ok | Cancel)
+keyGenerate::keyGenerate(TQWidget *parent, const char *name):KDialogBase( parent, name, true,i18n("Key Generation"),Apply | Ok | Cancel)
{
expert=false;
setButtonApply(i18n("Expert Mode"));
- QWidget *page = new QWidget(this);
- QVBoxLayout *vbox=new QVBoxLayout(page);
+ TQWidget *page = new TQWidget(this);
+ TQVBoxLayout *vbox=new TQVBoxLayout(page);
- QVButtonGroup *bgroup1=new QVButtonGroup(i18n("Generate Key Pair"),page);
+ TQVButtonGroup *bgroup1=new TQVButtonGroup(i18n("Generate Key Pair"),page);
- (void) new QLabel(i18n("Name:"),bgroup1);
+ (void) new TQLabel(i18n("Name:"),bgroup1);
kname=new KLineEdit("",bgroup1);
kname->setFocus();
- (void) new QLabel(i18n("Email:"),bgroup1);
+ (void) new TQLabel(i18n("Email:"),bgroup1);
mail=new KLineEdit("",bgroup1);
- (void) new QLabel(i18n("Comment (optional):"),bgroup1);
+ (void) new TQLabel(i18n("Comment (optional):"),bgroup1);
comment=new KLineEdit("",bgroup1);
- (void) new QLabel(i18n("Expiration:"),bgroup1);
- QHButtonGroup *bgroup=new QHButtonGroup(bgroup1);
+ (void) new TQLabel(i18n("Expiration:"),bgroup1);
+ TQHButtonGroup *bgroup=new TQHButtonGroup(bgroup1);
numb=new KLineEdit("0",bgroup);
numb->setMaxLength(4);
numb->setDisabled(true);
@@ -65,9 +65,9 @@ keyGenerate::keyGenerate(QWidget *parent, const char *name):KDialogBase( parent,
keyexp->insertItem(i18n("Months"),3);
keyexp->insertItem(i18n("Years"),4);
keyexp->setMinimumSize(keyexp->sizeHint());
- connect(keyexp,SIGNAL(activated(int)),this,SLOT(activateexp(int)));
+ connect(keyexp,TQT_SIGNAL(activated(int)),this,TQT_SLOT(activateexp(int)));
- (void) new QLabel(i18n("Key size:"),bgroup1);
+ (void) new TQLabel(i18n("Key size:"),bgroup1);
keysize = new KComboBox(bgroup1);
keysize->insertItem("768");
keysize->insertItem("1024");
@@ -76,7 +76,7 @@ keyGenerate::keyGenerate(QWidget *parent, const char *name):KDialogBase( parent,
keysize->setCurrentItem("1024");
keysize->setMinimumSize(keysize->sizeHint());
- (void) new QLabel(i18n("Algorithm:"),bgroup1);
+ (void) new TQLabel(i18n("Algorithm:"),bgroup1);
keykind = new KComboBox(bgroup1);
keykind->insertItem("DSA & ElGamal");
keykind->insertItem("RSA");
@@ -90,11 +90,11 @@ keyGenerate::keyGenerate(QWidget *parent, const char *name):KDialogBase( parent,
void keyGenerate::slotOk()
{
- if (QString(kname->text()).stripWhiteSpace().isEmpty()) {
+ if (TQString(kname->text()).stripWhiteSpace().isEmpty()) {
KMessageBox::sorry(this,i18n("You must give a name."));
return;
}
- QString vmail=mail->text();
+ TQString vmail=mail->text();
if (vmail.isEmpty())
{
if (KMessageBox::warningContinueCancel(this,i18n("You are about to create a key with no email address"))!=KMessageBox::Continue) return;
@@ -126,12 +126,12 @@ bool keyGenerate::getmode()
}
-QString keyGenerate::getkeytype()
+TQString keyGenerate::getkeytype()
{
return(keykind->currentText());
}
-QString keyGenerate::getkeysize()
+TQString keyGenerate::getkeysize()
{
return(keysize->currentText());
}
@@ -141,7 +141,7 @@ int keyGenerate::getkeyexp()
return(keyexp->currentItem());
}
-QString keyGenerate::getkeynumb()
+TQString keyGenerate::getkeynumb()
{
if (numb->text()!=NULL)
return(numb->text());
@@ -149,7 +149,7 @@ QString keyGenerate::getkeynumb()
return ("");
}
-QString keyGenerate::getkeyname()
+TQString keyGenerate::getkeyname()
{
if (kname->text()!=NULL)
return(kname->text());
@@ -157,7 +157,7 @@ QString keyGenerate::getkeyname()
return ("");
}
-QString keyGenerate::getkeymail()
+TQString keyGenerate::getkeymail()
{
if (mail->text()!=NULL)
return(mail->text());
@@ -165,7 +165,7 @@ QString keyGenerate::getkeymail()
return ("");
}
-QString keyGenerate::getkeycomm()
+TQString keyGenerate::getkeycomm()
{
if (comment->text()!=NULL)
return(comment->text());
diff --git a/kgpg/keygener.h b/kgpg/keygener.h
index 0c1cd89..f9d662d 100644
--- a/kgpg/keygener.h
+++ b/kgpg/keygener.h
@@ -26,7 +26,7 @@ class keyGenerate : public KDialogBase
{
Q_OBJECT
public:
- keyGenerate(QWidget *parent=0, const char *name=0);
+ keyGenerate(TQWidget *parent=0, const char *name=0);
KComboBox *keykind,*keysize,*keyexp;
KLineEdit *numb,*comment,*kname,*mail;
@@ -37,12 +37,12 @@ public slots:
void slotApply();
void activateexp(int state);
bool getmode();
- QString getkeycomm();
- QString getkeynumb();
- QString getkeymail();
- QString getkeyname();
- QString getkeysize();
- QString getkeytype();
+ TQString getkeycomm();
+ TQString getkeynumb();
+ TQString getkeymail();
+ TQString getkeyname();
+ TQString getkeysize();
+ TQString getkeytype();
int getkeyexp();
};
diff --git a/kgpg/keyinfowidget.cpp b/kgpg/keyinfowidget.cpp
index 4704eba..21dbb1c 100644
--- a/kgpg/keyinfowidget.cpp
+++ b/kgpg/keyinfowidget.cpp
@@ -17,21 +17,21 @@
#include <klocale.h>
#include <kprocess.h>
-#include <qdatetime.h>
-#include <qfile.h>
+#include <tqdatetime.h>
+#include <tqfile.h>
#include <kprocio.h>
#include <kpassivepopup.h>
#include <kaction.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <ktempfile.h>
-#include <qimage.h>
+#include <tqimage.h>
#include <kdatepicker.h>
-#include <qpushbutton.h>
+#include <tqpushbutton.h>
#include <kcombobox.h>
-#include <qlabel.h>
+#include <tqlabel.h>
#include <kiconloader.h>
-#include <qcheckbox.h>
-#include <qlayout.h>
+#include <tqcheckbox.h>
+#include <tqlayout.h>
#include <kactivelabel.h>
#include <klineedit.h>
#include <ktrader.h>
@@ -43,20 +43,20 @@
#include "kgpgsettings.h"
#include "kgpginterface.h"
-KgpgKeyInfo::KgpgKeyInfo(QWidget *parent, const char *name,QString sigkey):KDialogBase( Swallow, i18n("Key Properties"), Close, Close, parent, name,true)
+KgpgKeyInfo::KgpgKeyInfo(TQWidget *parent, const char *name,TQString sigkey):KDialogBase( Swallow, i18n("Key Properties"), Close, Close, parent, name,true)
{
FILE *pass;
char line[200]="";
- QString gpgOutput,fullID;
+ TQString gpgOutput,fullID;
hasPhoto=false;
bool isSecret=false;
keyWasChanged=false;
prop=new KeyProperties();
setMainWidget(prop);
- QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-secret-key "+KShellProcess::quote(sigkey);
- pass=popen(QFile::encodeName(gpgcmd),"r");
+ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-secret-key "+KShellProcess::quote(sigkey);
+ pass=popen(TQFile::encodeName(gpgcmd),"r");
while ( fgets( line, sizeof(line), pass)) {
gpgOutput=line;
if (gpgOutput.startsWith("sec")) isSecret=true;
@@ -72,18 +72,18 @@ KgpgKeyInfo::KgpgKeyInfo(QWidget *parent, const char *name,QString sigkey):KDial
if (hasPhoto) {
KgpgInterface *photoProcess=new KgpgInterface();
photoProcess->KgpgGetPhotoList(displayedKeyID);
- connect(photoProcess,SIGNAL(signalPhotoList(QStringList)),this,SLOT(slotSetMainPhoto(QStringList)));
+ connect(photoProcess,TQT_SIGNAL(signalPhotoList(TQStringList)),this,TQT_SLOT(slotSetMainPhoto(TQStringList)));
}
else
prop->comboId->setEnabled(false);
- connect(prop->changeExp,SIGNAL(clicked()),this,SLOT(slotChangeExp()));
- connect(this,SIGNAL(closeClicked()),this,SLOT(slotPreOk()));
- connect(prop->changePass,SIGNAL(clicked()),this,SLOT(slotChangePass()));
- connect(prop->comboId,SIGNAL(activated (const QString &)),this,SLOT(reloadMainPhoto(const QString &)));
- connect(prop->cbDisabled,SIGNAL(toggled(bool)),this,SLOT(slotDisableKey(bool)));
- connect(prop->kCOwnerTrust,SIGNAL(activated (int)),this,SLOT(slotChangeTrust(int)));
- connect(this,SIGNAL(changeMainPhoto(const QPixmap&)),this,SLOT(slotSetPhoto(const QPixmap&)));
+ connect(prop->changeExp,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotChangeExp()));
+ connect(this,TQT_SIGNAL(closeClicked()),this,TQT_SLOT(slotPreOk()));
+ connect(prop->changePass,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotChangePass()));
+ connect(prop->comboId,TQT_SIGNAL(activated (const TQString &)),this,TQT_SLOT(reloadMainPhoto(const TQString &)));
+ connect(prop->cbDisabled,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotDisableKey(bool)));
+ connect(prop->kCOwnerTrust,TQT_SIGNAL(activated (int)),this,TQT_SLOT(slotChangeTrust(int)));
+ connect(this,TQT_SIGNAL(changeMainPhoto(const TQPixmap&)),this,TQT_SLOT(slotSetPhoto(const TQPixmap&)));
//prop->setMinimumSize(prop->sizeHint());
}
@@ -104,23 +104,23 @@ loadKey(displayedKeyID);
keyWasChanged=true;
}
-void KgpgKeyInfo::loadKey(QString Keyid)
+void KgpgKeyInfo::loadKey(TQString Keyid)
{
-QColor trustColor;
-QString fingervalue=QString::null;
+TQColor trustColor;
+TQString fingervalue=TQString::null;
FILE *pass;
char line[200]="";
-QString gpgOutput,fullID;
+TQString gpgOutput,fullID;
-QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint --list-key "+KShellProcess::quote(Keyid);
+TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint --list-key "+KShellProcess::quote(Keyid);
- pass=popen(QFile::encodeName(gpgcmd),"r");
+ pass=popen(TQFile::encodeName(gpgcmd),"r");
while ( fgets( line, sizeof(line), pass)) {
- gpgOutput=QString::fromUtf8(line);
+ gpgOutput=TQString::fromUtf8(line);
if (gpgOutput.startsWith("uat"))
hasPhoto=true;
if (gpgOutput.startsWith("pub")) {
- QString algo=gpgOutput.section(':',3,3);
+ TQString algo=gpgOutput.section(':',3,3);
switch( algo.toInt() ) {
case 1:
algo="RSA";
@@ -133,13 +133,13 @@ QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint
algo="DSA";
break;
default:
- algo=QString("#" + algo);
+ algo=TQString("#" + algo);
break;
}
prop->tLAlgo->setText(algo);
- const QString trust=gpgOutput.section(':',1,1);
- QString tr;
+ const TQString trust=gpgOutput.section(':',1,1);
+ TQString tr;
switch( trust[0] ) {
case 'o':
tr= i18n("Unknown");
@@ -202,22 +202,22 @@ QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint
displayedKeyID=fullID.right(8);
prop->tLID->setText(fullID);
- QString fullname=gpgOutput.section(':',9,9);
+ TQString fullname=gpgOutput.section(':',9,9);
- QDate date = QDate::fromString(gpgOutput.section(':',5,5), Qt::ISODate);
+ TQDate date = TQDate::fromString(gpgOutput.section(':',5,5), Qt::ISODate);
prop->tLCreation->setText(KGlobal::locale()->formatDate(date));
if (gpgOutput.section(':',6,6).isEmpty()) expirationDate=i18n("Unlimited");
else
{
- date = QDate::fromString(gpgOutput.section(':',6,6), Qt::ISODate);
+ date = TQDate::fromString(gpgOutput.section(':',6,6), Qt::ISODate);
expirationDate=KGlobal::locale()->formatDate(date);
}
prop->tLExpiration->setText(expirationDate);
prop->tLLength->setText(gpgOutput.section(':',2,2));
- const QString otrust=gpgOutput.section(':',8,8);
+ const TQString otrust=gpgOutput.section(':',8,8);
int ownerTrust=0;
/* Don't know=1; Do NOT trust=2; Marginally=3; Fully=4; Ultimately=5; */
@@ -242,7 +242,7 @@ QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint
prop->kCOwnerTrust->setCurrentItem(ownerTrust);
if (fullname.find("<")!=-1) {
- QString kmail=fullname;
+ TQString kmail=fullname;
if (fullname.find(")")!=-1)
kmail=kmail.section(')',1);
kmail=kmail.section('<',1);
@@ -256,16 +256,16 @@ QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint
} else
prop->tLMail->setText(i18n("none"));
- QString kname=fullname.section('<',0,0);
+ TQString kname=fullname.section('<',0,0);
if (fullname.find("(")!=-1) {
kname=kname.section('(',0,0);
- QString comment=fullname.section('(',1,1);
+ TQString comment=fullname.section('(',1,1);
comment=comment.section(')',0,0);
prop->tLComment->setText(KgpgInterface::checkForUtf8(comment));
} else
prop->tLComment->setText(i18n("none"));
- prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).replace(QRegExp("<"),"&lt;")+"</b></qt>");
+ prop->tLName->setText("<qt><b>"+KgpgInterface::checkForUtf8(kname).replace(TQRegExp("<"),"&lt;")+"</b></qt>");
}
if (gpgOutput.startsWith("fpr") && (fingervalue.isNull())) {
@@ -281,23 +281,23 @@ QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --with-fingerprint
pclose(pass);
}
-void KgpgKeyInfo::slotSetMainPhoto(QStringList list)
+void KgpgKeyInfo::slotSetMainPhoto(TQStringList list)
{
prop->comboId->insertStringList(list);
reloadMainPhoto(prop->comboId->currentText());
}
-void KgpgKeyInfo::reloadMainPhoto(const QString &uid)
+void KgpgKeyInfo::reloadMainPhoto(const TQString &uid)
{
kgpginfotmp=new KTempFile();
kgpginfotmp->setAutoDelete(true);
- QString pgpgOutput="cp %i "+kgpginfotmp->name();
+ TQString pgpgOutput="cp %i "+kgpginfotmp->name();
KProcIO *p=new KProcIO();
- *p<<"gpg"<<"--no-tty"<<"--show-photos"<<"--photo-viewer"<<QFile::encodeName(pgpgOutput);
+ *p<<"gpg"<<"--no-tty"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput);
*p<<"--edit-key"<<displayedKeyID<<"uid"<<uid<<"showphoto";
- QObject::connect(p, SIGNAL(readReady(KProcIO *)),this, SLOT(finishphotoreadprocess(KProcIO *)));
- QObject::connect(p, SIGNAL(processExited(KProcess *)),this, SLOT(slotMainImageRead(KProcess *)));
+ TQObject::connect(p, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(finishphotoreadprocess(KProcIO *)));
+ TQObject::connect(p, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotMainImageRead(KProcess *)));
p->start(KProcess::NotifyOnExit,true);
}
@@ -306,7 +306,7 @@ void KgpgKeyInfo::reloadMainPhoto(const QString &uid)
void KgpgKeyInfo::slotMainImageRead(KProcess *p)
{
p->deleteLater();
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.load(kgpginfotmp->name());
emit changeMainPhoto(pixmap);
kgpginfotmp->unlink();
@@ -317,11 +317,11 @@ KgpgKeyInfo::~KgpgKeyInfo()
{
}
-void KgpgKeyInfo::slotSetPhoto(const QPixmap &pix)
+void KgpgKeyInfo::slotSetPhoto(const TQPixmap &pix)
{
-QImage dup=pix.convertToImage();
-QPixmap dup2;
-dup2.convertFromImage(dup.scale(prop->pLPhoto->width(),prop->pLPhoto->height(),QImage::ScaleMin));
+TQImage dup=pix.convertToImage();
+TQPixmap dup2;
+dup2.convertFromImage(dup.scale(prop->pLPhoto->width(),prop->pLPhoto->height(),TQImage::ScaleMin));
prop->pLPhoto->setPixmap(dup2);
}
@@ -330,7 +330,7 @@ prop->pLPhoto->setPixmap(dup2);
void KgpgKeyInfo::finishphotoreadprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1)
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin("quit");
@@ -346,15 +346,15 @@ void KgpgKeyInfo::openPhoto()
KService::Ptr ptr = offers.first();
//KMessageBox::sorry(0,ptr->desktopEntryName());
KProcIO *p=new KProcIO();
- *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<QFile::encodeName(ptr->desktopEntryName()+" %i")<<"--list-keys"<<displayedKeyID;
+ *p<<"gpg"<<"--show-photos"<<"--photo-viewer"<<TQFile::encodeName(ptr->desktopEntryName()+" %i")<<"--list-keys"<<displayedKeyID;
p->start(KProcess::DontCare,true);
}
void KgpgKeyInfo::slotChangeExp()
{
chdate=new KDialogBase( this, "choose_date", true,i18n("Choose New Expiration"),KDialogBase::Ok | KDialogBase::Cancel);
-QWidget *page = new QWidget(chdate);
-kb= new QCheckBox(i18n("Unlimited"),page );
+TQWidget *page = new TQWidget(chdate);
+kb= new TQCheckBox(i18n("Unlimited"),page );
if (prop->tLExpiration->text()==i18n("Unlimited"))
{
@@ -364,31 +364,31 @@ kdt->setEnabled(false);
}
else
kdt= new KDatePicker(page,KGlobal::locale()->readDate(prop->tLExpiration->text()));
-QVBoxLayout *vbox=new QVBoxLayout(page,3);
+TQVBoxLayout *vbox=new TQVBoxLayout(page,3);
vbox->addWidget(kdt);
vbox->addWidget(kb);
-connect(kb,SIGNAL(toggled(bool)),this,SLOT(slotEnableDate(bool)));
-connect(chdate,SIGNAL(okClicked()),this,SLOT(slotChangeDate()));
-connect(kdt,SIGNAL(dateChanged(QDate)),this,SLOT(slotCheckDate(QDate)));
-connect(kdt,SIGNAL(dateEntered(QDate)),this,SLOT(slotCheckDate(QDate)));
+connect(kb,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotEnableDate(bool)));
+connect(chdate,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotChangeDate()));
+connect(kdt,TQT_SIGNAL(dateChanged(TQDate)),this,TQT_SLOT(slotCheckDate(TQDate)));
+connect(kdt,TQT_SIGNAL(dateEntered(TQDate)),this,TQT_SLOT(slotCheckDate(TQDate)));
chdate->setMainWidget(page);
chdate->show();
}
-void KgpgKeyInfo::slotCheckDate(QDate date)
+void KgpgKeyInfo::slotCheckDate(TQDate date)
{
-chdate->enableButtonOK(date>=QDate::currentDate ());
+chdate->enableButtonOK(date>=TQDate::currentDate ());
}
void KgpgKeyInfo::slotChangeDate()
{
KgpgInterface *KeyExpirationProcess=new KgpgInterface();
if (kb->isChecked())
- KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,QDate::currentDate(),true);
+ KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,TQDate::currentDate(),true);
else
KeyExpirationProcess->KgpgKeyExpire(displayedKeyID,kdt->date(),false);
- connect(KeyExpirationProcess,SIGNAL(expirationFinished(int)),this,SLOT(slotInfoExpirationChanged(int)));
+ connect(KeyExpirationProcess,TQT_SIGNAL(expirationFinished(int)),this,TQT_SLOT(slotInfoExpirationChanged(int)));
}
void KgpgKeyInfo::slotEnableDate(bool isOn)
@@ -401,13 +401,13 @@ chdate->enableButtonOK(true);
else
{
kdt->setEnabled(true);
-chdate->enableButtonOK(kdt->date()>=QDate::currentDate ());
+chdate->enableButtonOK(kdt->date()>=TQDate::currentDate ());
}
}
void KgpgKeyInfo::slotinfoimgread(KProcess *)
{
- QPixmap pixmap;
+ TQPixmap pixmap;
pixmap.load(kgpginfotmp->name());
emit signalPhotoId(pixmap);
kgpginfotmp->unlink();
@@ -417,32 +417,32 @@ void KgpgKeyInfo::slotChangePass()
{
KgpgInterface *ChangeKeyPassProcess=new KgpgInterface();
ChangeKeyPassProcess->KgpgChangePass(displayedKeyID);
- connect(ChangeKeyPassProcess,SIGNAL(passwordChanged()),this,SLOT(slotInfoPasswordChanged()));
+ connect(ChangeKeyPassProcess,TQT_SIGNAL(passwordChanged()),this,TQT_SLOT(slotInfoPasswordChanged()));
}
void KgpgKeyInfo::slotChangeTrust(int newTrust)
{
KgpgInterface *KeyTrustProcess=new KgpgInterface();
KeyTrustProcess->KgpgTrustExpire(displayedKeyID,newTrust);
- connect(KeyTrustProcess,SIGNAL(trustfinished()),this,SLOT(slotInfoTrustChanged()));
+ connect(KeyTrustProcess,TQT_SIGNAL(trustfinished()),this,TQT_SLOT(slotInfoTrustChanged()));
}
void KgpgKeyInfo::slotInfoPasswordChanged()
{
-KPassivePopup::message(i18n("Passphrase for the key was changed"),QString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this);
+KPassivePopup::message(i18n("Passphrase for the key was changed"),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this);
}
void KgpgKeyInfo::slotInfoTrustChanged()
{
keyWasChanged=true;
loadKey(displayedKeyID);
-//KPassivePopup::message(i18n("Owner trust of the key was changed"),QString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this,0,600);
+//KPassivePopup::message(i18n("Owner trust of the key was changed"),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this,0,600);
}
void KgpgKeyInfo::slotInfoExpirationChanged(int res)
{
-QString infoMessage,infoText;
+TQString infoMessage,infoText;
if (res==3)
{
keyWasChanged=true;
diff --git a/kgpg/keyinfowidget.h b/kgpg/keyinfowidget.h
index af8ba64..832670a 100644
--- a/kgpg/keyinfowidget.h
+++ b/kgpg/keyinfowidget.h
@@ -19,7 +19,7 @@
#define KEYINFOWIDGET_H
#include <kdialogbase.h>
-#include <qpixmap.h>
+#include <tqpixmap.h>
class KTempFile;
class QLabel;
@@ -36,7 +36,7 @@ class KgpgKeyInfo : public KDialogBase
public:
- KgpgKeyInfo( QWidget *parent = 0, const char *name = 0,QString sigkey=0);
+ KgpgKeyInfo( TQWidget *parent = 0, const char *name = 0,TQString sigkey=0);
~KgpgKeyInfo();
KeyProperties *prop;
@@ -47,35 +47,35 @@ private slots:
void slotChangeExp();
void slotEnableDate(bool isOn);
void slotChangeDate();
- void slotCheckDate(QDate date);
+ void slotCheckDate(TQDate date);
void openPhoto();
- void slotSetPhoto(const QPixmap &pix);
+ void slotSetPhoto(const TQPixmap &pix);
void finishphotoreadprocess(KProcIO *p);
void slotMainImageRead(KProcess *);
- void slotSetMainPhoto(QStringList list);
- void reloadMainPhoto(const QString &uid);
+ void slotSetMainPhoto(TQStringList list);
+ void reloadMainPhoto(const TQString &uid);
void slotInfoPasswordChanged();
void slotInfoExpirationChanged(int res);
void slotInfoTrustChanged();
void slotChangeTrust(int newTrust);
- void loadKey(QString Keyid);
+ void loadKey(TQString Keyid);
void slotDisableKey(bool isOn);
private:
KTempFile *kgpginfotmp;
- QLabel *keyinfoPhoto;
- QString displayedKeyID;
- QString expirationDate;
+ TQLabel *keyinfoPhoto;
+ TQString displayedKeyID;
+ TQString expirationDate;
bool hasPhoto,keyWasChanged;
KDialogBase *chdate;
- QCheckBox *kb;
+ TQCheckBox *kb;
KDatePicker *kdt;
int counter;
signals:
- void signalPhotoId(const QPixmap&);
- void changeMainPhoto(const QPixmap&);
+ void signalPhotoId(const TQPixmap&);
+ void changeMainPhoto(const TQPixmap&);
void keyNeedsRefresh();
};
diff --git a/kgpg/keyservers.cpp b/kgpg/keyservers.cpp
index 1afd9d3..bbe22bd 100644
--- a/kgpg/keyservers.cpp
+++ b/kgpg/keyservers.cpp
@@ -17,23 +17,23 @@
#include <stdlib.h>
-#include <qfile.h>
-#include <qcheckbox.h>
+#include <tqfile.h>
+#include <tqcheckbox.h>
#include <kapplication.h>
#include <kiconloader.h>
#include <kcombobox.h>
#include <kdialogbase.h>
#include <kmessagebox.h>
-#include <qtextcodec.h>
-#include <qlayout.h>
-#include <qlabel.h>
-#include <qdialog.h>
-#include <qpushbutton.h>
-#include <qbuttongroup.h>
-#include <qhbuttongroup.h>
-#include <qvbuttongroup.h>
-#include <qregexp.h>
-#include <qcursor.h>
+#include <tqtextcodec.h>
+#include <tqlayout.h>
+#include <tqlabel.h>
+#include <tqdialog.h>
+#include <tqpushbutton.h>
+#include <tqbuttongroup.h>
+#include <tqhbuttongroup.h>
+#include <tqvbuttongroup.h>
+#include <tqregexp.h>
+#include <tqcursor.h>
#include <klocale.h>
#include <kprocess.h>
@@ -52,7 +52,7 @@
#include "detailedconsole.h"
#include "keyservers.h"
-keyServer::keyServer(QWidget *parent, const char *name,bool modal,bool autoClose):KDialogBase( Swallow, i18n("Key Server"), Close, Close, parent, name,modal)
+keyServer::keyServer(TQWidget *parent, const char *name,bool modal,bool autoClose):KDialogBase( Swallow, i18n("Key Server"), Close, Close, parent, name,modal)
{
autoCloseWindow=autoClose;
config=new KSimpleConfig ("kgpgrc");
@@ -62,15 +62,15 @@ keyServer::keyServer(QWidget *parent, const char *name,bool modal,bool autoClose
syncCombobox();
page->kLEimportid->setFocus();
- connect(page->Buttonimport,SIGNAL(clicked()),this,SLOT(slotImport()));
- connect(page->Buttonsearch,SIGNAL(clicked()),this,SLOT(slotSearch()));
- connect(page->Buttonexport,SIGNAL(clicked()),this,SLOT(slotPreExport()));
- connect(this,SIGNAL(okClicked()),this,SLOT(slotOk()));
+ connect(page->Buttonimport,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotImport()));
+ connect(page->Buttonsearch,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSearch()));
+ connect(page->Buttonexport,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotPreExport()));
+ connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(slotOk()));
- connect(page->cBproxyI,SIGNAL(toggled(bool)),this,SLOT(slotEnableProxyI(bool)));
- connect(page->cBproxyE,SIGNAL(toggled(bool)),this,SLOT(slotEnableProxyE(bool)));
+ connect(page->cBproxyI,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotEnableProxyI(bool)));
+ connect(page->cBproxyE,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(slotEnableProxyE(bool)));
- connect(page->kLEimportid, SIGNAL( textChanged ( const QString & )), this, SLOT( slotTextChanged( const QString &)));
+ connect(page->kLEimportid, TQT_SIGNAL( textChanged ( const TQString & )), this, TQT_SLOT( slotTextChanged( const TQString &)));
page->cBproxyI->setChecked(KGpgSettings::useProxy());
page->cBproxyE->setChecked(KGpgSettings::useProxy());
const char *httpproxy = getenv("http_proxy");
@@ -82,9 +82,9 @@ keyServer::keyServer(QWidget *parent, const char *name,bool modal,bool autoClose
}
- KProcIO *encid=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *encid=new KProcIO(TQTextCodec::codecForLocale());
*encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
- QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *)));
+ TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *)));
encid->start(KProcess::NotifyOnExit,true);
page->Buttonimport->setEnabled( !page->kLEimportid->text().isEmpty());
page->Buttonsearch->setEnabled( !page->kLEimportid->text().isEmpty());
@@ -96,7 +96,7 @@ keyServer::~keyServer()
{}
-void keyServer::slotTextChanged( const QString &text)
+void keyServer::slotTextChanged( const TQString &text)
{
page->Buttonimport->setEnabled( !text.isEmpty());
page->Buttonsearch->setEnabled( !text.isEmpty());
@@ -118,13 +118,13 @@ void keyServer::slotprocread(KProcIO *p)
{
///////////////////////////////////////////////////////////////// extract encryption keys
bool dead;
- QString tst;
- //QPixmap pixkeySingle(KGlobal::iconLoader()->loadIcon("kgpg_key1",KIcon::Small,20));
+ TQString tst;
+ //TQPixmap pixkeySingle(KGlobal::iconLoader()->loadIcon("kgpg_key1",KIcon::Small,20));
while (p->readln(tst)!=-1) {
//tst=tst.stripWhiteSpace();
if (tst.startsWith("pub")) {
- const QString trust=tst.section(':',1,1);
- QString id=QString("0x"+tst.section(':',4,4).right(8));
+ const TQString trust=tst.section(':',1,1);
+ TQString id=TQString("0x"+tst.section(':',4,4).right(8));
switch( trust[0] ) {
case 'i':
dead=true;
@@ -171,22 +171,22 @@ void keyServer::slotSearch()
dialogServer->setButtonText(KDialogBase::Ok,i18n("&Import"));
dialogServer->enableButtonOK(false);
listpop=new searchRes();
- listpop->kLVsearch->setColumnWidthMode(0,QListView::Manual);
- listpop->kLVsearch->setColumnWidthMode(1,QListView::Manual);
+ listpop->kLVsearch->setColumnWidthMode(0,TQListView::Manual);
+ listpop->kLVsearch->setColumnWidthMode(1,TQListView::Manual);
listpop->kLVsearch->setColumnWidth(0,150);
listpop->kLVsearch->setColumnWidth(1,130);
listpop->statusText->setText(i18n("Connecting to the server..."));
- connect(listpop->kLVsearch,SIGNAL(selectionChanged()),this,SLOT(transferKeyID()));
- connect(dialogServer,SIGNAL(okClicked()),this,SLOT(preimport()));
- connect(listpop->kLVsearch,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),dialogServer,SIGNAL(okClicked()));
+ connect(listpop->kLVsearch,TQT_SIGNAL(selectionChanged()),this,TQT_SLOT(transferKeyID()));
+ connect(dialogServer,TQT_SIGNAL(okClicked()),this,TQT_SLOT(preimport()));
+ connect(listpop->kLVsearch,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),dialogServer,TQT_SIGNAL(okClicked()));
- connect(dialogServer,SIGNAL(closeClicked()),this,SLOT(handleQuit()));
- connect( listpop , SIGNAL( destroyed() ) , this, SLOT( abortSearch()));
+ connect(dialogServer,TQT_SIGNAL(closeClicked()),this,TQT_SLOT(handleQuit()));
+ connect( listpop , TQT_SIGNAL( destroyed() ) , this, TQT_SLOT( abortSearch()));
count=0;
cycle=false;
- readmessage=QString::null;
- searchproc=new KProcIO(QTextCodec::codecForLocale());
- QString keyserv=page->kCBimportks->currentText();
+ readmessage=TQString::null;
+ searchproc=new KProcIO(TQTextCodec::codecForLocale());
+ TQString keyserv=page->kCBimportks->currentText();
*searchproc<<"gpg"<<"--utf8-strings";
if (page->cBproxyI->isChecked()) {
searchproc->setEnvironment("http_proxy",page->kLEproxyI->text());
@@ -196,10 +196,10 @@ void keyServer::slotSearch()
*searchproc<<"--keyserver"<<keyserv<<"--command-fd=0"<<"--status-fd=2"<<"--search-keys"<<page->kLEimportid->text().stripWhiteSpace();
keyNumbers=0;
- QObject::connect(searchproc, SIGNAL(processExited(KProcess *)),this, SLOT(slotsearchresult(KProcess *)));
- QObject::connect(searchproc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotsearchread(KProcIO *)));
+ TQObject::connect(searchproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotsearchresult(KProcess *)));
+ TQObject::connect(searchproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotsearchread(KProcIO *)));
searchproc->start(KProcess::NotifyOnExit,true);
- QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
+ TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor));
dialogServer->setMainWidget(listpop);
listpop->setMinimumSize(listpop->sizeHint());
listpop->setMinimumWidth(550);
@@ -210,7 +210,7 @@ void keyServer::handleQuit()
{
if (searchproc->isRunning())
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
disconnect(searchproc,0,0,0);
searchproc->kill();
}
@@ -242,9 +242,9 @@ void keyServer::transferKeyID()
{
if (!listpop->kLVsearch->firstChild())
return;
- QString kid,keysToSearch;
+ TQString kid,keysToSearch;
listpop->kLEID->clear();
- QPtrList< QListViewItem >searchList=listpop->kLVsearch->selectedItems();
+ TQPtrList< TQListViewItem >searchList=listpop->kLVsearch->selectedItems();
for ( uint i = 0; i < searchList.count(); ++i )
{
@@ -257,9 +257,9 @@ void keyServer::transferKeyID()
void keyServer::slotsearchresult(KProcess *)
{
- QString nb;
+ TQString nb;
dialogServer->enableButtonOK(true);
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
nb=nb.setNum(keyNumbers);
//listpop->kLVsearch->setColumnText(0,i18n("Found %1 matching keys").arg(nb));
listpop->statusText->setText(i18n("Found %1 matching keys").arg(nb));
@@ -273,10 +273,10 @@ void keyServer::slotsearchresult(KProcess *)
void keyServer::slotsearchread(KProcIO *p)
{
- QString required;
- QString keymail,keyname;
+ TQString required;
+ TQString keymail,keyname;
while (p->readln(required,true)!=-1) {
- //required=QString::fromUtf8(required);
+ //required=TQString::fromUtf8(required);
if (required.find("keysearch.prompt")!=-1) {
if (count<4)
@@ -285,39 +285,39 @@ void keyServer::slotsearchread(KProcIO *p)
p->writeStdin("Q");
p->closeWhenDone();
}
- required=QString::null;
+ required=TQString::null;
}
if (required.find("GOT_IT")!=-1) {
count++;
- required=QString::null;
+ required=TQString::null;
}
if (required.find("(")==0) {
cycle=true;
- QString fullname=required.remove(0,required.find(")")+1).stripWhiteSpace();
+ TQString fullname=required.remove(0,required.find(")")+1).stripWhiteSpace();
if (fullname.find("<")!=-1) {
keymail=fullname.section('<',-1,-1);
if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1);
keyname=fullname.section('<',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=fullname;
}
- kitem=new KListViewItem(listpop->kLVsearch,keyname,keymail,QString::null,QString::null);
+ kitem=new KListViewItem(listpop->kLVsearch,keyname,keymail,TQString::null,TQString::null);
keyNumbers++;
count=0;
- required=QString::null;
+ required=TQString::null;
}
if ((cycle) && (!required.isEmpty())) {
- QString subkey=required.stripWhiteSpace();
+ TQString subkey=required.stripWhiteSpace();
if (subkey.find(" key ")!=-1 && subkey.at(0).isDigit ())
{
- QString kid=subkey.section(",",0,0).stripWhiteSpace();
+ TQString kid=subkey.section(",",0,0).stripWhiteSpace();
kid=kid.right(8);
kitem->setText(3,kid);
- QString creation=subkey.section("created",1,1);
+ TQString creation=subkey.section("created",1,1);
if (creation.startsWith(":")) creation=creation.right(creation.length()-1);
kitem->setText(2,creation);
cycle=false;
@@ -329,29 +329,29 @@ void keyServer::slotsearchread(KProcIO *p)
if (keymail.endsWith(">")) keymail.truncate(keymail.length()-1);
keyname=subkey.section('<',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=subkey;
}
- KListViewItem *subk = new KListViewItem(kitem,keyname,keymail,QString::null,QString::null);
+ KListViewItem *subk = new KListViewItem(kitem,keyname,keymail,TQString::null,TQString::null);
subk->setSelectable(false);
}
- required=QString::null;
+ required=TQString::null;
}
}
}
void keyServer::slotPreExport()
{
- slotExport(QStringList(page->kCBexportkey->currentText().section(':', 0, 0)));
+ slotExport(TQStringList(page->kCBexportkey->currentText().section(':', 0, 0)));
}
-void keyServer::slotExport(QStringList keyIds)
+void keyServer::slotExport(TQStringList keyIds)
{
if (page->kCBexportks->currentText().isEmpty())
return;
- readmessage=QString::null;
- exportproc=new KProcIO(QTextCodec::codecForLocale());
- QString keyserv=page->kCBexportks->currentText();
+ readmessage=TQString::null;
+ exportproc=new KProcIO(TQTextCodec::codecForLocale());
+ TQString keyserv=page->kCBexportks->currentText();
*exportproc<<"gpg"<<"--utf8-strings";
if (!page->exportAttributes->isChecked())
@@ -364,27 +364,27 @@ void keyServer::slotExport(QStringList keyIds)
*exportproc<< "--keyserver-options"<<"no-honor-http-proxy";
*exportproc << "--status-fd=2" << "--keyserver" << keyserv << "--send-keys" << keyIds;
- QObject::connect(exportproc, SIGNAL(processExited(KProcess *)),this, SLOT(slotexportresult(KProcess *)));
- QObject::connect(exportproc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotimportread(KProcIO *)));
+ TQObject::connect(exportproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotexportresult(KProcess *)));
+ TQObject::connect(exportproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotimportread(KProcIO *)));
exportproc->start(KProcess::NotifyOnExit,true);
- QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
- importpop = new QDialog( this,0,true,Qt::WDestructiveClose);
- QVBoxLayout *vbox=new QVBoxLayout(importpop,3);
- QLabel *tex=new QLabel(importpop);
+ TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor));
+ importpop = new TQDialog( this,0,true,Qt::WDestructiveClose);
+ TQVBoxLayout *vbox=new TQVBoxLayout(importpop,3);
+ TQLabel *tex=new TQLabel(importpop);
tex->setText(i18n("<b>Connecting to the server...</b>"));
- QPushButton *Buttonabort=new QPushButton(i18n("&Abort"),importpop);
+ TQPushButton *Buttonabort=new TQPushButton(i18n("&Abort"),importpop);
vbox->addWidget(tex);
vbox->addWidget(Buttonabort);
importpop->setMinimumWidth(250);
importpop->adjustSize();
importpop->show();
- connect(importpop,SIGNAL(destroyed ()),this,SLOT(abortExport()));
- connect(Buttonabort,SIGNAL(clicked ()),importpop,SLOT(close()));
+ connect(importpop,TQT_SIGNAL(destroyed ()),this,TQT_SLOT(abortExport()));
+ connect(Buttonabort,TQT_SIGNAL(clicked ()),importpop,TQT_SLOT(close()));
}
void keyServer::abortExport()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (exportproc->isRunning())
{
disconnect(exportproc,0,0,0);
@@ -394,7 +394,7 @@ void keyServer::abortExport()
void keyServer::slotexportresult(KProcess*)
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
KMessageBox::information(0,readmessage);
if (importpop)
delete importpop;
@@ -409,9 +409,9 @@ void keyServer::slotImport()
KMessageBox::sorry(this,i18n("You must enter a search string."));
return;
}
- readmessage=QString::null;
- importproc=new KProcIO(QTextCodec::codecForLocale());
- QString keyserv=page->kCBimportks->currentText();
+ readmessage=TQString::null;
+ importproc=new KProcIO(TQTextCodec::codecForLocale());
+ TQString keyserv=page->kCBimportks->currentText();
*importproc<<"gpg"<<"--utf8-strings";
if (page->cBproxyI->isChecked()) {
@@ -421,56 +421,56 @@ void keyServer::slotImport()
*importproc<< "--keyserver-options"<<"no-honor-http-proxy";
*importproc<<"--status-fd=2"<<"--keyserver"<<keyserv<<"--recv-keys";
- QString keyNames=page->kLEimportid->text();
+ TQString keyNames=page->kLEimportid->text();
keyNames=keyNames.stripWhiteSpace();
keyNames=keyNames.simplifyWhiteSpace();
while (!keyNames.isEmpty()) {
- QString fkeyNames=keyNames.section(' ',0,0);
+ TQString fkeyNames=keyNames.section(' ',0,0);
keyNames.remove(0,fkeyNames.length());
keyNames=keyNames.stripWhiteSpace();
- *importproc<<QFile::encodeName(fkeyNames);
+ *importproc<<TQFile::encodeName(fkeyNames);
}
- QObject::connect(importproc, SIGNAL(processExited(KProcess *)),this, SLOT(slotimportresult(KProcess *)));
- QObject::connect(importproc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotimportread(KProcIO *)));
+ TQObject::connect(importproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotimportresult(KProcess *)));
+ TQObject::connect(importproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotimportread(KProcIO *)));
importproc->start(KProcess::NotifyOnExit,true);
importproc->closeWhenDone();
- QApplication::setOverrideCursor(QCursor(Qt::BusyCursor));
- importpop = new QDialog( this,0,true,Qt::WDestructiveClose);
- QVBoxLayout *vbox=new QVBoxLayout(importpop,3);
- QLabel *tex=new QLabel(importpop);
+ TQApplication::setOverrideCursor(TQCursor(Qt::BusyCursor));
+ importpop = new TQDialog( this,0,true,Qt::WDestructiveClose);
+ TQVBoxLayout *vbox=new TQVBoxLayout(importpop,3);
+ TQLabel *tex=new TQLabel(importpop);
tex->setText(i18n("<b>Connecting to the server...</b>"));
- QPushButton *Buttonabort=new QPushButton(i18n("&Abort"),importpop);
+ TQPushButton *Buttonabort=new TQPushButton(i18n("&Abort"),importpop);
vbox->addWidget(tex);
vbox->addWidget(Buttonabort);
importpop->setMinimumWidth(250);
importpop->adjustSize();
importpop->show();
- connect(Buttonabort,SIGNAL(clicked()),importpop,SLOT(close()));
- connect(importpop,SIGNAL(destroyed ()),this,SLOT(abortImport()));
+ connect(Buttonabort,TQT_SIGNAL(clicked()),importpop,TQT_SLOT(close()));
+ connect(importpop,TQT_SIGNAL(destroyed ()),this,TQT_SLOT(abortImport()));
}
void keyServer::abortImport()
{
- QApplication::restoreOverrideCursor();
+ TQApplication::restoreOverrideCursor();
if (importproc->isRunning())
{
disconnect(importproc,0,0,0);
importproc->kill();
- emit importFinished(QString::null);
+ emit importFinished(TQString::null);
}
if (autoCloseWindow) close();
}
void keyServer::slotimportresult(KProcess*)
{
- QApplication::restoreOverrideCursor();
- QString importedNb,importedNbSucess,importedNbProcess,resultMessage, parsedOutput,importedNbUnchanged,importedNbSig;
- QString notImportesNbSec,importedNbMissing,importedNbRSA,importedNbUid,importedNbSub,importedNbRev,readNbSec;
- QString importedNbSec,dupNbSec;
+ TQApplication::restoreOverrideCursor();
+ TQString importedNb,importedNbSucess,importedNbProcess,resultMessage, parsedOutput,importedNbUnchanged,importedNbSig;
+ TQString notImportesNbSec,importedNbMissing,importedNbRSA,importedNbUid,importedNbSub,importedNbRev,readNbSec;
+ TQString importedNbSec,dupNbSec;
parsedOutput=readmessage;
- QStringList importedKeys;
+ TQStringList importedKeys;
while (parsedOutput.find("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8);
@@ -521,7 +521,7 @@ void keyServer::slotimportresult(KProcess*)
} else
resultMessage=i18n("No key imported... \nCheck detailed log for more infos");
- QString lastID=QString("0x"+importedKeys.last().section(" ",0,0).right(8));
+ TQString lastID=TQString("0x"+importedKeys.last().section(" ",0,0).right(8));
if (!lastID.isEmpty())
{
//kdDebug(2100)<<"++++++++++imported key"<<lastID<<endl;
@@ -539,7 +539,7 @@ void keyServer::slotimportresult(KProcess*)
void keyServer::slotimportread(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1)
readmessage+=required+"\n";
}
@@ -547,9 +547,9 @@ void keyServer::slotimportread(KProcIO *p)
void keyServer::syncCombobox()
{
config->setGroup("Servers");
- QString serverList=config->readEntry("Server_List");
+ TQString serverList=config->readEntry("Server_List");
- QString optionsServer=KgpgInterface::getGpgSetting("keyserver", KGpgSettings::gpgConfigPath());
+ TQString optionsServer=KgpgInterface::getGpgSetting("keyserver", KGpgSettings::gpgConfigPath());
page->kCBexportks->clear();
page->kCBimportks->clear();
@@ -561,8 +561,8 @@ void keyServer::syncCombobox()
else if ( serverList.isEmpty() )
serverList = "hkp://wwwkeys.eu.pgp.net,hkp://search.keyserver.net,hkp://wwwkeys.pgp.net,hkp://pgp.dtype.org,hkp://wwwkeys.us.pgp.net"; // same as ini kgpgoptions.cpp
- page->kCBexportks->insertStringList(QStringList::split(",",serverList));
- page->kCBimportks->insertStringList(QStringList::split(",",serverList));
+ page->kCBexportks->insertStringList(TQStringList::split(",",serverList));
+ page->kCBimportks->insertStringList(TQStringList::split(",",serverList));
}
void keyServer::slotOk()
diff --git a/kgpg/keyservers.h b/kgpg/keyservers.h
index e17af85..c1935f3 100644
--- a/kgpg/keyservers.h
+++ b/kgpg/keyservers.h
@@ -32,7 +32,7 @@ class keyServer : public KDialogBase
{
Q_OBJECT
public:
- keyServer(QWidget *parent=0, const char *name=0,bool modal=false,bool autoClose=false);
+ keyServer(TQWidget *parent=0, const char *name=0,bool modal=false,bool autoClose=false);
~keyServer();
keyServerWidget *page;
@@ -51,20 +51,20 @@ public slots:
void slotimportread(KProcIO *p);
void slotprocread(KProcIO *p);
void slotPreExport();
- void slotExport(QStringList keyIds);
+ void slotExport(TQStringList keyIds);
void preimport();
void slotsearchresult(KProcess *);
void slotEnableProxyI(bool on);
void slotEnableProxyE(bool on);
void handleQuit();
- void slotTextChanged( const QString &text);
+ void slotTextChanged( const TQString &text);
private:
- QDialog *importpop;
+ TQDialog *importpop;
KSimpleConfig *config;
uint keyNumbers;
- QString readmessage;
+ TQString readmessage;
KProcIO *importproc,*exportproc;
KProcIO *searchproc;
searchRes *listpop;
@@ -74,7 +74,7 @@ private:
KDialogBase *dialogServer;
signals:
- void importFinished(QString);
+ void importFinished(TQString);
};
#endif // KEYSERVERS_H
diff --git a/kgpg/kgpg.cpp b/kgpg/kgpg.cpp
index a14ab64..223d7bd 100644
--- a/kgpg/kgpg.cpp
+++ b/kgpg/kgpg.cpp
@@ -17,15 +17,15 @@
#include <stdlib.h>
-#include <qlabel.h>
-#include <qclipboard.h>
-#include <qfile.h>
-#include <qpopupmenu.h>
-#include <qwidget.h>
-#include <qcheckbox.h>
-#include <qmovie.h>
-#include <qcstring.h>
-#include <qhbuttongroup.h>
+#include <tqlabel.h>
+#include <tqclipboard.h>
+#include <tqfile.h>
+#include <tqpopupmenu.h>
+#include <tqwidget.h>
+#include <tqcheckbox.h>
+#include <tqmovie.h>
+#include <tqcstring.h>
+#include <tqhbuttongroup.h>
#include <kglobal.h>
#include <kactivelabel.h>
#include <kdeversion.h>
@@ -34,16 +34,16 @@
#include <kapplication.h>
#include <kmessagebox.h>
#include <kcombobox.h>
-#include <qregexp.h>
+#include <tqregexp.h>
#include <kcmdlineargs.h>
-#include <qtooltip.h>
+#include <tqtooltip.h>
#include <kdebug.h>
#include <kurlrequesterdlg.h>
#include <klineedit.h>
#include <kio/renamedlg.h>
#include <kpassivepopup.h>
-#include <qlayout.h>
-#include <qbuttongroup.h>
+#include <tqlayout.h>
+#include <tqbuttongroup.h>
#include <kiconloader.h>
#include <ktempfile.h>
#include <kwin.h>
@@ -59,7 +59,7 @@
#include <kstandarddirs.h>
#include <kfiledialog.h>
#include <kpopupmenu.h>
-#include <qcursor.h>
+#include <tqcursor.h>
#include <kdesktopfile.h>
#include "kgpgeditor.h"
@@ -74,31 +74,31 @@
#include "kgpglibrary.h"
#include "kgpgwizard.h"
-MyView::MyView( QWidget *parent, const char *name )
- : QLabel( parent, name )
+MyView::MyView( TQWidget *parent, const char *name )
+ : TQLabel( parent, name )
{
setBackgroundMode( X11ParentRelative );
openTasks=0;
- KAction *saveDecrypt=new KAction(i18n("&Decrypt && Save File"),"decrypted",0,this, SLOT(decryptDroppedFile()),this,"decrypt_file");
- KAction *showDecrypt=new KAction(i18n("&Show Decrypted File"),"edit",0,this, SLOT(showDroppedFile()),this,"show_file");
- KAction *encrypt=new KAction(i18n("&Encrypt File"),"encrypted",0,this, SLOT(encryptDroppedFile()),this,"encrypt_file");
- KAction *sign=new KAction(i18n("&Sign File"), "signature",0,this, SLOT(signDroppedFile()),this,"sign_file");
- //QToolTip::add(this,i18n("KGpg drag & drop encryption applet"));
+ KAction *saveDecrypt=new KAction(i18n("&Decrypt && Save File"),"decrypted",0,this, TQT_SLOT(decryptDroppedFile()),this,"decrypt_file");
+ KAction *showDecrypt=new KAction(i18n("&Show Decrypted File"),"edit",0,this, TQT_SLOT(showDroppedFile()),this,"show_file");
+ KAction *encrypt=new KAction(i18n("&Encrypt File"),"encrypted",0,this, TQT_SLOT(encryptDroppedFile()),this,"encrypt_file");
+ KAction *sign=new KAction(i18n("&Sign File"), "signature",0,this, TQT_SLOT(signDroppedFile()),this,"sign_file");
+ //TQToolTip::add(this,i18n("KGpg drag & drop encryption applet"));
readOptions();
resize(24,24);
setPixmap( KSystemTray::loadIcon("kgpg_docked"));
setAcceptDrops(true);
- droppopup=new QPopupMenu();
+ droppopup=new TQPopupMenu();
showDecrypt->plug(droppopup);
saveDecrypt->plug(droppopup);
- udroppopup=new QPopupMenu();
+ udroppopup=new TQPopupMenu();
encrypt->plug(udroppopup);
sign->plug(udroppopup);
- QToolTip::add(this, i18n("KGpg - encryption tool"));
+ TQToolTip::add(this, i18n("KGpg - encryption tool"));
}
MyView::~MyView()
@@ -114,26 +114,26 @@ MyView::~MyView()
void MyView::clipEncrypt()
{
popupPublic *dialoguec=new popupPublic(0, "public_keys", 0,false,goDefaultKey);
- connect(dialoguec,SIGNAL(selectedKey(QStringList,QStringList,bool,bool)),this,SLOT(encryptClipboard(QStringList,QStringList,bool,bool)));
+ connect(dialoguec,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(encryptClipboard(TQStringList,TQStringList,bool,bool)));
dialoguec->exec();
delete dialoguec;
}
void MyView::clipDecrypt()
{
- QString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace();
+ TQString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace();
droppedtext(clippie,false);
}
void MyView::clipSign(bool openEditor)
{
- QString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace();
+ TQString clippie=kapp->clipboard()->text(clipboardMode).stripWhiteSpace();
if (!clippie.isEmpty()) {
KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey);
- connect(this,SIGNAL(setFont(QFont)),kgpgtxtedit,SLOT(slotSetFont(QFont)));
- connect(kgpgtxtedit,SIGNAL(encryptFiles(KURL::List)),this,SLOT(encryptFiles(KURL::List)));
+ connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont)));
+ connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List)));
if (!openEditor)
- connect(kgpgtxtedit->view,SIGNAL(verifyFinished()),kgpgtxtedit,SLOT(closeWindow()));
+ connect(kgpgtxtedit->view,TQT_SIGNAL(verifyFinished()),kgpgtxtedit,TQT_SLOT(closeWindow()));
kgpgtxtedit->view->editor->setText(clippie);
kgpgtxtedit->view->clearSign();
kgpgtxtedit->show();
@@ -145,23 +145,23 @@ void MyView::clipSign(bool openEditor)
void MyView::encryptDroppedFolder()
{
compressionScheme=0;
- kgpgfoldertmp=new KTempFile(QString::null);
+ kgpgfoldertmp=new KTempFile(TQString::null);
kgpgfoldertmp->setAutoDelete(true);
if (KMessageBox::warningContinueCancel(0,i18n("<qt>KGpg will now create a temporary archive file:<br><b>%1</b> to process the encryption. The file will be deleted after the encryption is finished.</qt>").arg(kgpgfoldertmp->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpFile")==KMessageBox::Cancel)
return;
dialogue=new popupPublic(0,"Public keys",droppedUrls.first().fileName(),true,goDefaultKey);
- QHButtonGroup *bGroup = new QHButtonGroup(dialogue->plainPage());
- (void) new QLabel(i18n("Compression method for archive:"),bGroup);
+ TQHButtonGroup *bGroup = new TQHButtonGroup(dialogue->plainPage());
+ (void) new TQLabel(i18n("Compression method for archive:"),bGroup);
KComboBox *optionbx=new KComboBox(bGroup);
optionbx->insertItem(i18n("Zip"));
optionbx->insertItem(i18n("Gzip"));
optionbx->insertItem(i18n("Bzip2"));
bGroup->show();
- connect(dialogue,SIGNAL(keyListFilled ()),dialogue,SLOT(slotSetVisible()));
- connect(optionbx,SIGNAL(activated (int)),this,SLOT(slotSetCompression(int)));
- connect(dialogue,SIGNAL(selectedKey(QStringList,QStringList,bool,bool)),this,SLOT(startFolderEncode(QStringList,QStringList,bool,bool)));
+ connect(dialogue,TQT_SIGNAL(keyListFilled ()),dialogue,TQT_SLOT(slotSetVisible()));
+ connect(optionbx,TQT_SIGNAL(activated (int)),this,TQT_SLOT(slotSetCompression(int)));
+ connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(startFolderEncode(TQStringList,TQStringList,bool,bool)));
dialogue->CBshred->setEnabled(false);
dialogue->exec();
dialogue=0L;
@@ -172,9 +172,9 @@ void MyView::slotSetCompression(int cp)
compressionScheme=cp;
}
-void MyView::startFolderEncode(QStringList selec,QStringList encryptOptions,bool ,bool symetric)
+void MyView::startFolderEncode(TQStringList selec,TQStringList encryptOptions,bool ,bool symetric)
{
-QString extension;
+TQString extension;
if (compressionScheme==0)
extension=".zip";
@@ -191,11 +191,11 @@ if (encryptOptions.find("armor")!=encryptOptions.end () )
extension+=".gpg";
KURL encryptedFile(droppedUrls.first().path()+extension);
-QFile encryptedFolder(droppedUrls.first().path()+extension);
+TQFile encryptedFolder(droppedUrls.first().path()+extension);
if (encryptedFolder.exists()) {
dialogue->hide();
- KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),QString::null,encryptedFile.path(),KIO::M_OVERWRITE);
- if (over->exec()==QDialog::Rejected)
+ KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,encryptedFile.path(),KIO::M_OVERWRITE);
+ if (over->exec()==TQDialog::Rejected)
{
delete over;
return;
@@ -232,8 +232,8 @@ pop = new KPassivePopup();
KgpgInterface *folderprocess=new KgpgInterface();
folderprocess->KgpgEncryptFile(selec,KURL(kgpgfoldertmp->name()),encryptedFile,encryptOptions,symetric);
- connect(folderprocess,SIGNAL(encryptionfinished(KURL)),this,SLOT(slotFolderFinished(KURL)));
- connect(folderprocess,SIGNAL(errormessage(QString)),this,SLOT(slotFolderFinishedError(QString)));
+ connect(folderprocess,TQT_SIGNAL(encryptionfinished(KURL)),this,TQT_SLOT(slotFolderFinished(KURL)));
+ connect(folderprocess,TQT_SIGNAL(errormessage(TQString)),this,TQT_SLOT(slotFolderFinishedError(TQString)));
}
void MyView::slotFolderFinished(KURL)
@@ -242,22 +242,22 @@ void MyView::slotFolderFinished(KURL)
delete kgpgfoldertmp;
}
-void MyView::slotFolderFinishedError(QString errmsge)
+void MyView::slotFolderFinishedError(TQString errmsge)
{
delete pop;
delete kgpgfoldertmp;
KMessageBox::sorry(0,errmsge);
}
-void MyView::busyMessage(QString mssge,bool reset)
+void MyView::busyMessage(TQString mssge,bool reset)
{
if (reset) openTasks=0;
if (!mssge.isEmpty())
{
openTasks++;
-QToolTip::remove(this);
-QToolTip::add(this, mssge);
-setMovie(QMovie(locate("appdata","pics/kgpg_docked.gif")));
+TQToolTip::remove(this);
+TQToolTip::add(this, mssge);
+setMovie(TQMovie(locate("appdata","pics/kgpg_docked.gif")));
}
else openTasks--;
@@ -266,18 +266,18 @@ else openTasks--;
if (openTasks<=0)
{
setPixmap( KSystemTray::loadIcon("kgpg_docked"));
-QToolTip::remove(this);
-QToolTip::add(this, i18n("KGpg - encryption tool"));
+TQToolTip::remove(this);
+TQToolTip::add(this, i18n("KGpg - encryption tool"));
openTasks=0;
}
}
void MyView::encryptDroppedFile()
{
- QStringList opts;
+ TQStringList opts;
KgpgLibrary *lib=new KgpgLibrary(this,KGpgSettings::pgpExtension());
- connect(lib,SIGNAL(systemMessage(QString,bool)),this,SLOT(busyMessage(QString,bool)));
- if (KGpgSettings::fileKey()!=QString::null) {
+ connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool)));
+ if (KGpgSettings::fileKey()!=TQString::null) {
if (KGpgSettings::allowUntrustedKeys())
opts<<"--always-trust";
if (KGpgSettings::asciiArmor())
@@ -286,9 +286,9 @@ void MyView::encryptDroppedFile()
opts<<"--throw-keyid";
if (KGpgSettings::pgpCompatibility())
opts<<"--pgp6";
- lib->slotFileEnc(droppedUrls,opts,QStringList::split(" ",KGpgSettings::fileKey()),goDefaultKey);
+ lib->slotFileEnc(droppedUrls,opts,TQStringList::split(" ",KGpgSettings::fileKey()),goDefaultKey);
} else
- lib->slotFileEnc(droppedUrls,QString::null,QString::null,goDefaultKey);
+ lib->slotFileEnc(droppedUrls,TQString::null,TQString::null,goDefaultKey);
}
void MyView::encryptFiles(KURL::List urls)
@@ -300,18 +300,18 @@ encryptDroppedFile();
void MyView::shredDroppedFile()
{
KDialogBase *shredConfirm=new KDialogBase( this, "confirm_shred", true,i18n("Shred Files"),KDialogBase::Ok | KDialogBase::Cancel);
-QWidget *page = new QWidget(shredConfirm);
+TQWidget *page = new TQWidget(shredConfirm);
shredConfirm->setMainWidget(page);
-QBoxLayout *layout=new QBoxLayout(page,QBoxLayout::TopToBottom,0);
+TQBoxLayout *layout=new TQBoxLayout(page,TQBoxLayout::TopToBottom,0);
layout->setAutoAdd(true);
(void) new KActiveLabel( i18n("Do you really want to <a href=\"whatsthis:%1\">shred</a> these files?").arg(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>")),page);
KListBox *lb=new KListBox(page);
lb->insertStringList(droppedUrls.toStringList());
-if (shredConfirm->exec()==QDialog::Accepted)
+if (shredConfirm->exec()==TQDialog::Accepted)
{
KgpgLibrary *lib=new KgpgLibrary(this);
- connect(lib,SIGNAL(systemMessage(QString,bool)),this,SLOT(busyMessage(QString,bool)));
+ connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool)));
lib->shredprocessenc(droppedUrls);
}
delete shredConfirm;
@@ -324,17 +324,17 @@ void MyView::slotVerifyFile()
if (droppedUrl.isEmpty())
return;
- QString sigfile=QString::null;
+ TQString sigfile=TQString::null;
////////////////////////////////////// try to find detached signature.
if (!droppedUrl.fileName().endsWith(".sig")) {
sigfile=droppedUrl.path()+".sig";
- QFile fsig(sigfile);
+ TQFile fsig(sigfile);
if (!fsig.exists()) {
sigfile=droppedUrl.path()+".asc";
- QFile fsig(sigfile);
+ TQFile fsig(sigfile);
////////////// if no .asc or .sig signature file included, assume the file is internally signed
if (!fsig.exists())
- sigfile=QString::null;
+ sigfile=TQString::null;
}
} else {
sigfile=droppedUrl.path();
@@ -344,10 +344,10 @@ void MyView::slotVerifyFile()
///////////////////////// pipe gpg command
KgpgInterface *verifyFileProcess=new KgpgInterface();
verifyFileProcess->KgpgVerifyFile(droppedUrl,KURL(sigfile));
- connect (verifyFileProcess,SIGNAL(verifyquerykey(QString)),this,SLOT(importSignature(QString)));
+ connect (verifyFileProcess,TQT_SIGNAL(verifyquerykey(TQString)),this,TQT_SLOT(importSignature(TQString)));
}
-void MyView::importSignature(QString ID)
+void MyView::importSignature(TQString ID)
{
keyServer *kser=new keyServer(0,"server_dialog",false);
kser->page->kLEimportid->setText(ID);
@@ -360,17 +360,17 @@ void MyView::signDroppedFile()
if (droppedUrl.isEmpty())
return;
- QString signKeyID;
+ TQString signKeyID;
////////////////// select a private key to sign file --> listkeys.cpp
KgpgSelKey *opts=new KgpgSelKey(0,"select_secret");
- if (opts->exec()==QDialog::Accepted)
+ if (opts->exec()==TQDialog::Accepted)
signKeyID=opts->getkeyID();
else {
delete opts;
return;
}
delete opts;
- QStringList Options;
+ TQStringList Options;
if (KGpgSettings::asciiArmor())
Options<<"--armor";
if (KGpgSettings::pgpCompatibility())
@@ -389,7 +389,7 @@ void MyView::decryptDroppedFile()
decryptNextFile();
}
- QString oldname=droppedUrls.first().fileName();
+ TQString oldname=droppedUrls.first().fileName();
if (oldname.endsWith(".gpg") || oldname.endsWith(".asc") || oldname.endsWith(".pgp"))
oldname.truncate(oldname.length()-4);
else
@@ -397,17 +397,17 @@ void MyView::decryptDroppedFile()
/*
if (oldname.endsWith(".tar.gz")) {
isFolder=true;
- kgpgFolderExtract=new KTempFile(QString::null,".tar.gz");
+ kgpgFolderExtract=new KTempFile(TQString::null,".tar.gz");
kgpgFolderExtract->setAutoDelete(true);
swapname=KURL(kgpgFolderExtract->name());
if (KMessageBox::warningContinueCancel(0,i18n("<qt>The file to decrypt is an archive. KGpg will create a temporary unencrypted archive file:<br><b>%1</b> before processing the archive extraction. This temporary file will be deleted after the decryption is finished.</qt>").arg(kgpgFolderExtract->name()),i18n("Temporary File Creation"),KStdGuiItem::cont(),"FolderTmpDecFile")==KMessageBox::Cancel)
return;
} else*/ {
swapname=KURL(droppedUrls.first().directory(0,0)+oldname);
- QFile fgpg(swapname.path());
+ TQFile fgpg(swapname.path());
if (fgpg.exists()) {
- KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),QString::null,swapname.path(),KIO::M_OVERWRITE);
- if (over->exec()==QDialog::Rejected)
+ KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,swapname.path(),KIO::M_OVERWRITE);
+ if (over->exec()==TQDialog::Rejected)
{
delete over;
decryptNextFile();
@@ -419,10 +419,10 @@ void MyView::decryptDroppedFile()
}
KgpgLibrary *lib=new KgpgLibrary(this);
lib->slotFileDec(droppedUrls.first(),swapname,KGpgSettings::customDecrypt());
- connect(lib,SIGNAL(importOver(QStringList)),this,SIGNAL(importedKeys(QStringList)));
- connect(lib,SIGNAL(systemMessage(QString,bool)),this,SLOT(busyMessage(QString,bool)));
+ connect(lib,TQT_SIGNAL(importOver(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList)));
+ connect(lib,TQT_SIGNAL(systemMessage(TQString,bool)),this,TQT_SLOT(busyMessage(TQString,bool)));
// if (isFolder)
- connect(lib,SIGNAL(decryptionOver()),this,SLOT(decryptNextFile()));
+ connect(lib,TQT_SIGNAL(decryptionOver()),this,TQT_SLOT(decryptNextFile()));
}
@@ -446,7 +446,7 @@ void MyView::unArchive()
//KURL savePath=KURL::getURL(droppedUrl,this,i18n(""));
KURLRequesterDlg *savePath=new KURLRequesterDlg(droppedUrl.directory(false),i18n("Extract to: "),0,"extract");
savePath->fileDialog()->setMode(KFile::Directory);
- if (!savePath->exec()==QDialog::Accepted) {
+ if (!savePath->exec()==TQDialog::Accepted) {
delete kgpgFolderExtract;
return;
}
@@ -462,10 +462,10 @@ void MyView::showDroppedFile()
kdDebug(2100)<<"------Show dropped file"<<endl;
KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey);
kgpgtxtedit->view->editor->slotDroppedFile(droppedUrls.first());
- connect(kgpgtxtedit,SIGNAL(encryptFiles(KURL::List)),this,SLOT(encryptFiles(KURL::List)));
- connect(this,SIGNAL(setFont(QFont)),kgpgtxtedit,SLOT(slotSetFont(QFont)));
- connect(kgpgtxtedit,SIGNAL(refreshImported(QStringList)),this,SIGNAL(importedKeys(QStringList)));
- connect(kgpgtxtedit->view->editor,SIGNAL(refreshImported(QStringList)),this,SIGNAL(importedKeys(QStringList)));
+ connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List)));
+ connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont)));
+ connect(kgpgtxtedit,TQT_SIGNAL(refreshImported(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList)));
+ connect(kgpgtxtedit->view->editor,TQT_SIGNAL(refreshImported(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList)));
kgpgtxtedit->show();
}
@@ -493,7 +493,7 @@ void MyView::droppedfile (KURL::List url)
showDroppedFile();
break;
case KGpgSettings::EnumEncryptedDropEvent::Ask:
- droppopup->exec(QCursor::pos ());
+ droppopup->exec(TQCursor::pos ());
kdDebug(2100)<<"Drop menu--------"<<endl;
break;
}
@@ -508,19 +508,19 @@ void MyView::droppedfile (KURL::List url)
signDroppedFile();
break;
case KGpgSettings::EnumUnencryptedDropEvent::Ask:
- udroppopup->exec(QCursor::pos ());
+ udroppopup->exec(TQCursor::pos ());
break;
}
}
-void MyView::droppedtext (QString inputText,bool allowEncrypt)
+void MyView::droppedtext (TQString inputText,bool allowEncrypt)
{
if (inputText.startsWith("-----BEGIN PGP MESSAGE")) {
KgpgApp *kgpgtxtedit = new KgpgApp(0, "editor",WDestructiveClose,goDefaultKey);
- connect(kgpgtxtedit,SIGNAL(encryptFiles(KURL::List)),this,SLOT(encryptFiles(KURL::List)));
- connect(this,SIGNAL(setFont(QFont)),kgpgtxtedit,SLOT(slotSetFont(QFont)));
+ connect(kgpgtxtedit,TQT_SIGNAL(encryptFiles(KURL::List)),this,TQT_SLOT(encryptFiles(KURL::List)));
+ connect(this,TQT_SIGNAL(setFont(TQFont)),kgpgtxtedit,TQT_SLOT(slotSetFont(TQFont)));
kgpgtxtedit->view->editor->setText(inputText);
kgpgtxtedit->view->slotdecode();
kgpgtxtedit->show();
@@ -533,7 +533,7 @@ void MyView::droppedtext (QString inputText,bool allowEncrypt)
else {
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKey(inputText);
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),this,SIGNAL(importedKeys(QStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SIGNAL(importedKeys(TQStringList)));
return;
}
}
@@ -546,21 +546,21 @@ void MyView::droppedtext (QString inputText,bool allowEncrypt)
}
-void MyView::dragEnterEvent(QDragEnterEvent *e)
+void MyView::dragEnterEvent(TQDragEnterEvent *e)
{
- e->accept (KURLDrag::canDecode(e) || QTextDrag::canDecode (e));
+ e->accept (KURLDrag::canDecode(e) || TQTextDrag::canDecode (e));
}
-void MyView::dropEvent (QDropEvent *o)
+void MyView::dropEvent (TQDropEvent *o)
{
KURL::List list;
- QString text;
+ TQString text;
if ( KURLDrag::decode( o, list ) )
droppedfile(list);
- else if ( QTextDrag::decode(o, text) )
+ else if ( TQTextDrag::decode(o, text) )
{
- QApplication::clipboard()->setText(text,clipboardMode);
+ TQApplication::clipboard()->setText(text,clipboardMode);
droppedtext(text);
}
}
@@ -575,12 +575,12 @@ void MyView::readOptions()
if (KGpgSettings::firstRun()) {
firstRun();
} else {
- QString path = KGpgSettings::gpgConfigPath();
+ TQString path = KGpgSettings::gpgConfigPath();
if (path.isEmpty()) {
- if (KMessageBox::questionYesNo(0,i18n("<qt>You have not set a path to your GnuPG config file.<br>This may cause some surprising results in KGpg's execution.<br>Would you like to start KGpg's Wizard to fix this problem?</qt>"),QString::null,i18n("Start Wizard"),i18n("Do Not Start"))==KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(0,i18n("<qt>You have not set a path to your GnuPG config file.<br>This may cause some surprising results in KGpg's execution.<br>Would you like to start KGpg's Wizard to fix this problem?</qt>"),TQString::null,i18n("Start Wizard"),i18n("Do Not Start"))==KMessageBox::Yes)
startWizard();
} else {
- QStringList groups=KgpgInterface::getGpgGroupNames(path);
+ TQStringList groups=KgpgInterface::getGpgGroupNames(path);
if (!groups.isEmpty())
KGpgSettings::setGroups(groups.join(","));
}
@@ -597,10 +597,10 @@ void MyView::firstRun()
}
-static QString getGpgHome()
+static TQString getGpgHome()
{
char *env=getenv("GNUPGHOME");
- QString gpgHome(env ? env : QDir::homeDirPath()+"/.gnupg/");
+ TQString gpgHome(env ? env : TQDir::homeDirPath()+"/.gnupg/");
gpgHome.replace("//", "/");
@@ -616,29 +616,29 @@ void MyView::startWizard()
{
kdDebug(2100)<<"Starting Wizard"<<endl;
wiz=new KgpgWizard(0,"wizard");
- QString gpgHome(getGpgHome());
- QString confPath=gpgHome+"options";
- if (!QFile(confPath).exists()) {
+ TQString gpgHome(getGpgHome());
+ TQString confPath=gpgHome+"options";
+ if (!TQFile(confPath).exists()) {
confPath=gpgHome+"gpg.conf";
- if (!QFile(confPath).exists()) {
- if (KMessageBox::questionYesNo(this,i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed. Should KGpg try to create a config file ?</qt>"),QString::null,i18n("Create Config"),i18n("Do Not Create"))==KMessageBox::Yes) {
+ if (!TQFile(confPath).exists()) {
+ if (KMessageBox::questionYesNo(this,i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed. Should KGpg try to create a config file ?</qt>"),TQString::null,i18n("Create Config"),i18n("Do Not Create"))==KMessageBox::Yes) {
confPath=gpgHome+"options";
- QFile file(confPath);
+ TQFile file(confPath);
if ( file.open( IO_WriteOnly ) ) {
- QTextStream stream( &file );
+ TQTextStream stream( &file );
stream <<"# GnuPG config file created by KGpg"<< "\n";
file.close();
}
} else {
wiz->text_optionsfound->setText(i18n("<qt><b>The GnuPG configuration file was not found</b>. Please make sure you have GnuPG installed and give the path to the config file.</qt>"));
- confPath=QString::null;
+ confPath=TQString::null;
}
}
}
int gpgVersion=KgpgInterface::getGpgVersion();
if (gpgVersion<120) wiz->txtGpgVersion->setText(i18n("Your GnuPG version seems to be older than 1.2.0. Photo Id's and Key Groups will not work properly. Please consider upgrading GnuPG (http://gnupg.org)."));
- else wiz->txtGpgVersion->setText(QString::null);
+ else wiz->txtGpgVersion->setText(TQString::null);
wiz->kURLRequester1->setURL(confPath);
/*
@@ -646,20 +646,20 @@ void MyView::startWizard()
wiz->kURLRequester2->setMode(2);*/
FILE *fp,*fp2;
- QString tst,tst2,name,trustedvals="idre-";
- QString firstKey=QString::null;
+ TQString tst,tst2,name,trustedvals="idre-";
+ TQString firstKey=TQString::null;
char line[300];
bool counter=false;
fp = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp)) {
- tst=QString::fromUtf8(line);
+ tst=TQString::fromUtf8(line);
if (tst.startsWith("sec")) {
name=KgpgInterface::checkForUtf8(tst.section(':',9,9));
if (!name.isEmpty()) {
- fp2 = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-keys "+QFile::encodeName(tst.section(':',4,4)), "r");
+ fp2 = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-keys "+TQFile::encodeName(tst.section(':',4,4)), "r");
while ( fgets( line, sizeof(line), fp2)) {
- tst2=QString::fromUtf8(line);
+ tst2=TQString::fromUtf8(line);
if (tst2.startsWith("pub") && (trustedvals.find(tst2.section(':',1,1))==-1)) {
counter=true;
wiz->CBdefault->insertItem(tst.section(':',4,4).right(8)+": "+name);
@@ -674,17 +674,17 @@ void MyView::startWizard()
}
pclose(fp);
wiz->CBdefault->setCurrentItem(firstKey);
- //connect(wiz->pushButton4,SIGNAL(clicked()),this,SLOT(slotGenKey()));
+ //connect(wiz->pushButton4,TQT_SIGNAL(clicked()),this,TQT_SLOT(slotGenKey()));
if (!counter)
- connect(wiz->finishButton(),SIGNAL(clicked()),this,SLOT(slotGenKey()));
+ connect(wiz->finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotGenKey()));
else {
wiz->textGenerate->hide();
wiz->setTitle(wiz->page_4,i18n("Step Three: Select your Default Private Key"));
- connect(wiz->finishButton(),SIGNAL(clicked()),this,SLOT(slotSaveOptionsPath()));
+ connect(wiz->finishButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotSaveOptionsPath()));
}
- connect(wiz->nextButton(),SIGNAL(clicked()),this,SLOT(slotWizardChange()));
- connect( wiz , SIGNAL( destroyed() ) , this, SLOT( slotWizardClose()));
- connect(wiz,SIGNAL(helpClicked()),this,SLOT(help()));
+ connect(wiz->nextButton(),TQT_SIGNAL(clicked()),this,TQT_SLOT(slotWizardChange()));
+ connect( wiz , TQT_SIGNAL( destroyed() ) , this, TQT_SLOT( slotWizardClose()));
+ connect(wiz,TQT_SIGNAL(helpClicked()),this,TQT_SLOT(help()));
wiz->setFinishEnabled(wiz->page_4,true);
wiz->show();
@@ -692,17 +692,17 @@ void MyView::startWizard()
void MyView::slotWizardChange()
{
- QString tst,name;
+ TQString tst,name;
char line[300];
FILE *fp;
if (wiz->indexOf(wiz->currentPage())==2) {
- QString defaultID=KgpgInterface::getGpgSetting("default-key",wiz->kURLRequester1->url());
+ TQString defaultID=KgpgInterface::getGpgSetting("default-key",wiz->kURLRequester1->url());
if (defaultID.isEmpty())
return;
- fp = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-secret-keys "+QFile::encodeName(defaultID), "r");
+ fp = popen("gpg --display-charset=utf-8 --no-tty --with-colon --list-secret-keys "+TQFile::encodeName(defaultID), "r");
while ( fgets( line, sizeof(line), fp)) {
- tst=QString::fromUtf8(line);
+ tst=TQString::fromUtf8(line);
if (tst.startsWith("sec")) {
name=KgpgInterface::checkForUtf8(tst.section(':',9,9));
wiz->CBdefault->setCurrentItem(tst.section(':',4,4).right(8)+": "+name);
@@ -737,7 +737,7 @@ qWarning("Save wizard settings...");
KGpgSettings::setGpgConfigPath( wiz->kURLRequester1->url() );
KGpgSettings::setFirstRun( false );
- QString defaultID=wiz->CBdefault->currentText().section(':',0,0);
+ TQString defaultID=wiz->CBdefault->currentText().section(':',0,0);
/* if (!defaultID.isEmpty()) {
KGpgSettings::setDefaultKey(defaultID);
}*/
@@ -771,25 +771,25 @@ void MyView::help()
kapp->invokeHelp(0,"kgpg");
}
-kgpgapplet::kgpgapplet(QWidget *parent, const char *name)
+kgpgapplet::kgpgapplet(TQWidget *parent, const char *name)
: KSystemTray(parent,name)
{
w=new MyView(this);
w->show();
KPopupMenu *conf_menu=contextMenu();
- KgpgEncryptClipboard = new KAction(i18n("&Encrypt Clipboard"), "kgpg", 0,w, SLOT(clipEncrypt()),actionCollection(),"clip_encrypt");
- KgpgDecryptClipboard = new KAction(i18n("&Decrypt Clipboard"), 0, 0,w, SLOT(clipDecrypt()),actionCollection(),"clip_decrypt");
- KgpgSignClipboard = new KAction(i18n("&Sign/Verify Clipboard"), "signature", 0,w, SLOT(clipSign()),actionCollection(),"clip_sign");
+ KgpgEncryptClipboard = new KAction(i18n("&Encrypt Clipboard"), "kgpg", 0,w, TQT_SLOT(clipEncrypt()),actionCollection(),"clip_encrypt");
+ KgpgDecryptClipboard = new KAction(i18n("&Decrypt Clipboard"), 0, 0,w, TQT_SLOT(clipDecrypt()),actionCollection(),"clip_decrypt");
+ KgpgSignClipboard = new KAction(i18n("&Sign/Verify Clipboard"), "signature", 0,w, TQT_SLOT(clipSign()),actionCollection(),"clip_sign");
KAction *KgpgOpenEditor;
if (KGpgSettings::leftClick()==KGpgSettings::EnumLeftClick::KeyManager)
- KgpgOpenEditor = new KAction(i18n("&Open Editor"), "edit", 0,parent, SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor");
+ KgpgOpenEditor = new KAction(i18n("&Open Editor"), "edit", 0,parent, TQT_SLOT(slotOpenEditor()),actionCollection(),"kgpg_editor");
else
- KgpgOpenEditor = new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, SLOT(slotOpenKeyManager()),actionCollection(),"kgpg_editor");
+ KgpgOpenEditor = new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, TQT_SLOT(slotOpenKeyManager()),actionCollection(),"kgpg_editor");
- KAction *KgpgOpenServer = new KAction(i18n("&Key Server Dialog"), "network", 0,this, SLOT(slotOpenServerDialog()),actionCollection(),"kgpg_server");
- KAction *KgpgPreferences=KStdAction::preferences(this, SLOT(showOptions()), actionCollection());
+ KAction *KgpgOpenServer = new KAction(i18n("&Key Server Dialog"), "network", 0,this, TQT_SLOT(slotOpenServerDialog()),actionCollection(),"kgpg_server");
+ KAction *KgpgPreferences=KStdAction::preferences(this, TQT_SLOT(showOptions()), actionCollection());
- connect (conf_menu,SIGNAL(aboutToShow()),this,SLOT(checkMenu()));
+ connect (conf_menu,TQT_SIGNAL(aboutToShow()),this,TQT_SLOT(checkMenu()));
KgpgEncryptClipboard->plug(conf_menu);
KgpgDecryptClipboard->plug(conf_menu);
@@ -820,21 +820,21 @@ void kgpgapplet::checkMenu()
void kgpgapplet::showOptions()
{
-QByteArray data;
+TQByteArray data;
if (!kapp->dcopClient()->send("kgpg", "KeyInterface", "showOptions()",data))
kdDebug(2100) <<"there was some error using DCOP."<<endl;
}
void kgpgapplet::slotOpenKeyManager()
{
-QByteArray data;
+TQByteArray data;
if (!kapp->dcopClient()->send("kgpg", "KeyInterface", "showKeyManager()",data))
kdDebug(2100) <<"there was some error using DCOP."<<endl;
}
void kgpgapplet::slotOpenServerDialog()
{
-QByteArray data;
+TQByteArray data;
if (!kapp->dcopClient()->send("kgpg", "KeyInterface", "showKeyServer()",data))
kdDebug(2100) <<"there was some error using DCOP."<<endl;
}
@@ -876,7 +876,7 @@ s_keyManager->keysList2->saveLayout(KGlobal::config(),"KeyView");
quit();
}
-void KgpgAppletApp::wizardOver(QString defaultKeyId)
+void KgpgAppletApp::wizardOver(TQString defaultKeyId)
{
if (defaultKeyId.length()==10)
s_keyManager->slotSetDefaultKey(defaultKeyId);
@@ -897,9 +897,9 @@ int KgpgAppletApp::newInstance()
s_keyManager=new listKeys(0, "key_manager");
- QString gpgPath= KGpgSettings::gpgConfigPath();
- if (!gpgPath.isEmpty() && KURL(gpgPath).directory(false)!=QDir::homeDirPath()+"/.gnupg/")
- setenv("GNUPGHOME", QFile::encodeName(KURL::fromPathOrURL(gpgPath).directory(false)), 1);
+ TQString gpgPath= KGpgSettings::gpgConfigPath();
+ if (!gpgPath.isEmpty() && KURL(gpgPath).directory(false)!=TQDir::homeDirPath()+"/.gnupg/")
+ setenv("GNUPGHOME", TQFile::encodeName(KURL::fromPathOrURL(gpgPath).directory(false)), 1);
s_keyManager->refreshkey();
@@ -909,16 +909,16 @@ int KgpgAppletApp::newInstance()
{
kgpg_applet=new kgpgapplet(s_keyManager->s_kgpgEditor,"kgpg_systrayapplet");
}
- connect(s_keyManager,SIGNAL(encryptFiles(KURL::List)),kgpg_applet->w,SLOT(encryptFiles(KURL::List)));
- connect(s_keyManager,SIGNAL(installShredder()),kgpg_applet->w,SLOT(installShred()));
- connect(s_keyManager->s_kgpgEditor,SIGNAL(encryptFiles(KURL::List)),kgpg_applet->w,SLOT(encryptFiles(KURL::List)));
-
- connect( kgpg_applet, SIGNAL(quitSelected()), this, SLOT(slotHandleQuit()));
- connect(s_keyManager,SIGNAL(readAgainOptions()),kgpg_applet->w,SLOT(readOptions()));
- connect(kgpg_applet->w,SIGNAL(updateDefault(QString)),this,SLOT(wizardOver(QString)));
- connect(kgpg_applet->w,SIGNAL(createNewKey()),s_keyManager,SLOT(slotgenkey()));
- connect(s_keyManager,SIGNAL(fontChanged(QFont)),kgpg_applet->w,SIGNAL(setFont(QFont)));
- connect(kgpg_applet->w,SIGNAL(importedKeys(QStringList)),s_keyManager->keysList2,SLOT(slotReloadKeys(QStringList)));
+ connect(s_keyManager,TQT_SIGNAL(encryptFiles(KURL::List)),kgpg_applet->w,TQT_SLOT(encryptFiles(KURL::List)));
+ connect(s_keyManager,TQT_SIGNAL(installShredder()),kgpg_applet->w,TQT_SLOT(installShred()));
+ connect(s_keyManager->s_kgpgEditor,TQT_SIGNAL(encryptFiles(KURL::List)),kgpg_applet->w,TQT_SLOT(encryptFiles(KURL::List)));
+
+ connect( kgpg_applet, TQT_SIGNAL(quitSelected()), this, TQT_SLOT(slotHandleQuit()));
+ connect(s_keyManager,TQT_SIGNAL(readAgainOptions()),kgpg_applet->w,TQT_SLOT(readOptions()));
+ connect(kgpg_applet->w,TQT_SIGNAL(updateDefault(TQString)),this,TQT_SLOT(wizardOver(TQString)));
+ connect(kgpg_applet->w,TQT_SIGNAL(createNewKey()),s_keyManager,TQT_SLOT(slotgenkey()));
+ connect(s_keyManager,TQT_SIGNAL(fontChanged(TQFont)),kgpg_applet->w,TQT_SIGNAL(setFont(TQFont)));
+ connect(kgpg_applet->w,TQT_SIGNAL(importedKeys(TQStringList)),s_keyManager->keysList2,TQT_SLOT(slotReloadKeys(TQStringList)));
kgpg_applet->show();
@@ -954,8 +954,8 @@ int KgpgAppletApp::newInstance()
kgpg_applet->w->droppedUrl=urlList.first();
bool directoryInside=false;
- QStringList lst=urlList.toStringList();
- for ( QStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
+ TQStringList lst=urlList.toStringList();
+ for ( TQStringList::Iterator it = lst.begin(); it != lst.end(); ++it ) {
if (KMimeType::findByURL(KURL( *it ))->name()=="inode/directory")
directoryInside=true;
}
@@ -1006,10 +1006,10 @@ int KgpgAppletApp::newInstance()
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
-void MyView::encryptClipboard(QStringList selec,QStringList encryptOptions,bool,bool symmetric)
+void MyView::encryptClipboard(TQStringList selec,TQStringList encryptOptions,bool,bool symmetric)
{
if (kapp->clipboard()->text(clipboardMode).isEmpty()) {
- KPassivePopup::message(i18n("Clipboard is empty."),QString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this);
+ KPassivePopup::message(i18n("Clipboard is empty."),TQString::null,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),this);
return;
}
if (KGpgSettings::pgpCompatibility())
@@ -1018,34 +1018,34 @@ void MyView::encryptClipboard(QStringList selec,QStringList encryptOptions,bool,
if (symmetric) selec.clear();
KgpgInterface *txtEncrypt=new KgpgInterface();
- connect (txtEncrypt,SIGNAL(txtencryptionfinished(QString)),this,SLOT(slotSetClip(QString)));
- connect (txtEncrypt,SIGNAL(txtencryptionstarted()),this,SLOT(slotPassiveClip()));
+ connect (txtEncrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),this,TQT_SLOT(slotSetClip(TQString)));
+ connect (txtEncrypt,TQT_SIGNAL(txtencryptionstarted()),this,TQT_SLOT(slotPassiveClip()));
txtEncrypt->KgpgEncryptText(kapp->clipboard()->text(clipboardMode),selec,encryptOptions);
}
void MyView::slotPassiveClip()
{
-QString newtxt=kapp->clipboard()->text(clipboardMode);
+TQString newtxt=kapp->clipboard()->text(clipboardMode);
if (newtxt.length()>300)
- newtxt=QString(newtxt.left(250).stripWhiteSpace())+"...\n"+QString(newtxt.right(40).stripWhiteSpace());
+ newtxt=TQString(newtxt.left(250).stripWhiteSpace())+"...\n"+TQString(newtxt.right(40).stripWhiteSpace());
- newtxt.replace(QRegExp("<"),"&lt;"); ///// disable html tags
- newtxt.replace(QRegExp("\n"),"<br>");
+ newtxt.replace(TQRegExp("<"),"&lt;"); ///// disable html tags
+ newtxt.replace(TQRegExp("\n"),"<br>");
pop = new KPassivePopup( this);
pop->setView(i18n("Encrypted following text:"),newtxt,KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));
pop->setTimeout(3200);
pop->show();
- 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);
}
-void MyView::slotSetClip(QString newtxt)
+void MyView::slotSetClip(TQString newtxt)
{
if (newtxt.isEmpty()) return;
- QApplication::clipboard()->setText(newtxt,clipboardMode);//,QClipboard::Clipboard); QT 3.1 only
+ TQApplication::clipboard()->setText(newtxt,clipboardMode);//,QClipboard::Clipboard); QT 3.1 only
}
diff --git a/kgpg/kgpg.h b/kgpg/kgpg.h
index aff3d18..94d8f59 100644
--- a/kgpg/kgpg.h
+++ b/kgpg/kgpg.h
@@ -28,9 +28,9 @@
#include <kurl.h>
#include <kshortcut.h>
-#include <qlabel.h>
-#include <qstringlist.h>
-#include <qclipboard.h>
+#include <tqlabel.h>
+#include <tqstringlist.h>
+#include <tqclipboard.h>
class QPopupMenu;
@@ -46,7 +46,7 @@ class MyView : public QLabel
Q_OBJECT
public:
- MyView( QWidget *parent = 0, const char *name = 0);
+ MyView( TQWidget *parent = 0, const char *name = 0);
~MyView();
KURL droppedUrl;
@@ -56,9 +56,9 @@ public:
QClipboard::Mode clipboardMode;
private:
- QPopupMenu *droppopup,*udroppopup;
+ TQPopupMenu *droppopup,*udroppopup;
KAboutData *_aboutData;
- QStringList customDecrypt;
+ TQStringList customDecrypt;
KgpgWizard *wiz;
KPassivePopup *pop;
KTempFile *kgpgFolderExtract;
@@ -66,7 +66,7 @@ private:
popupPublic *dialogue;
public slots:
- void busyMessage(QString mssge,bool reset=false);
+ void busyMessage(TQString mssge,bool reset=false);
void encryptDroppedFile();
void decryptDroppedFile();
void slotVerifyFile();
@@ -77,9 +77,9 @@ public slots:
void clipEncrypt();
void shredDroppedFile();
void encryptDroppedFolder();
- void startFolderEncode(QStringList selec,QStringList encryptOptions,bool ,bool symetric);
+ void startFolderEncode(TQStringList selec,TQStringList encryptOptions,bool ,bool symetric);
void slotFolderFinished(KURL);
- void slotFolderFinishedError(QString errmsge);
+ void slotFolderFinishedError(TQString errmsge);
void encryptFiles(KURL::List urls);
void installShred();
@@ -89,33 +89,33 @@ private slots:
void slotWizardChange();
void slotSaveOptionsPath();
void slotGenKey();
- void importSignature(QString ID);
- void slotSetClip(QString newtxt);
+ void importSignature(TQString ID);
+ void slotSetClip(TQString newtxt);
void slotPassiveClip();
- void encryptClipboard(QStringList selec,QStringList encryptOptions,bool,bool symmetric);
+ void encryptClipboard(TQStringList selec,TQStringList encryptOptions,bool,bool symmetric);
void help();
void about();
void firstRun();
void readOptions();
void droppedfile (KURL::List);
- void droppedtext (QString inputText, bool allowEncrypt=true);
+ void droppedtext (TQString inputText, bool allowEncrypt=true);
void unArchive();
void slotSetCompression(int cp);
void decryptNextFile();
protected:
- virtual void dragEnterEvent(QDragEnterEvent *);
- virtual void dropEvent (QDropEvent*);
+ virtual void dragEnterEvent(TQDragEnterEvent *);
+ virtual void dropEvent (TQDropEvent*);
protected slots:
signals:
- void setFont(QFont);
+ void setFont(TQFont);
void readAgain2();
void createNewKey();
- void updateDefault(QString);
- void importedKeys(QStringList);
+ void updateDefault(TQString);
+ void importedKeys(TQStringList);
};
class kgpgapplet : public KSystemTray//KUniqueApplication
@@ -123,7 +123,7 @@ class kgpgapplet : public KSystemTray//KUniqueApplication
Q_OBJECT
public:
- kgpgapplet( QWidget *parent = 0, const char *name = 0);
+ kgpgapplet( TQWidget *parent = 0, const char *name = 0);
/** destructor */
~kgpgapplet();
MyView *w;
@@ -161,7 +161,7 @@ private:
private slots:
void slotHandleQuit();
- void wizardOver(QString defaultKeyId);
+ void wizardOver(TQString defaultKeyId);
};
#endif // KGPGAPPLET_H
diff --git a/kgpg/kgpgeditor.cpp b/kgpg/kgpgeditor.cpp
index 9db9ce3..269f5ea 100644
--- a/kgpg/kgpgeditor.cpp
+++ b/kgpg/kgpgeditor.cpp
@@ -21,20 +21,20 @@
#include <kfiledialog.h>
#include <klocale.h>
#include <dcopclient.h>
-#include <qpaintdevicemetrics.h>
-#include <qcstring.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqcstring.h>
#include <kencodingfiledialog.h>
-#include <qradiobutton.h>
-#include <qclipboard.h>
-#include <qtextcodec.h>
-#include <qpainter.h>
+#include <tqradiobutton.h>
+#include <tqclipboard.h>
+#include <tqtextcodec.h>
+#include <tqpainter.h>
#include <kprinter.h>
#include <kmessagebox.h>
#include <kdebug.h>
#include <klineedit.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kurlrequester.h>
#include <ktempfile.h>
#include <kio/netaccess.h>
@@ -53,10 +53,10 @@
#include "listkeys.h"
#include "kgpglibrary.h"
-KgpgApp::KgpgApp(QWidget *parent, const char *name, WFlags f,KShortcut goHome,bool mainWindow):KMainWindow(parent, name,f)
+KgpgApp::KgpgApp(TQWidget *parent, const char *name, WFlags f,KShortcut goHome,bool mainWindow):KMainWindow(parent, name,f)
{
isMainWindow=mainWindow;
- textEncoding=QString::null;
+ textEncoding=TQString::null;
readOptions();
goDefaultKey=goHome;
// call inits to invoke all other construction parts
@@ -77,19 +77,19 @@ delete view;
void KgpgApp::slotOptions()
{
-QByteArray data;
+TQByteArray data;
if (!kapp->dcopClient()->send("kgpg", "KeyInterface", "showOptions()",data))
kdDebug(2100) <<"there was some error using DCOP."<<endl;
}
void KgpgApp::slotKeyManager()
{
-QByteArray data;
+TQByteArray data;
if (!kapp->dcopClient()->send("kgpg", "KeyInterface", "showKeyManager()",data))
kdDebug(2100) <<"there was some error using DCOP."<<endl;
}
-void KgpgApp::closeEvent ( QCloseEvent * e )
+void KgpgApp::closeEvent ( TQCloseEvent * e )
{
if (!isMainWindow)
{
@@ -114,10 +114,10 @@ void KgpgApp::saveOptions()
void KgpgApp::readOptions(bool doresize)
{
- customDecrypt=QStringList::split(QString(" "), KGpgSettings::customDecrypt().simplifyWhiteSpace());
+ customDecrypt=TQStringList::split(TQString(" "), KGpgSettings::customDecrypt().simplifyWhiteSpace());
if (doresize) {
- QSize size= KGpgSettings::editorGeometry();
+ TQSize size= KGpgSettings::editorGeometry();
if (!size.isEmpty())
resize(size);
}
@@ -126,36 +126,36 @@ void KgpgApp::readOptions(bool doresize)
void KgpgApp::initActions()
{
- KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection());
- KStdAction::open(this, SLOT(slotFileOpen()), actionCollection());
- KStdAction::saveAs(this, SLOT(slotFileSaveAs()), actionCollection());
- KStdAction::quit(this, SLOT(slotFileQuit()), actionCollection());
- KStdAction::cut(this, SLOT(slotEditCut()), actionCollection());
- KStdAction::copy(this, SLOT(slotEditCopy()), actionCollection());
- KStdAction::paste(this, SLOT(slotEditPaste()), actionCollection());
- KStdAction::selectAll(this, SLOT(slotSelectAll()), actionCollection());
- KStdAction::preferences(this, SLOT(slotOptions()), actionCollection(),"kgpg_config");
-
- //KStdAction::keyBindings(guiFactory(), SLOT(configureShortcuts()), actionCollection());
- //KStdAction::configureToolbars(this, SLOT(slotConfigureToolbars()), actionCollection());
-
- fileSave = KStdAction::save(this, SLOT(slotFileSave()), actionCollection());
- (void) new KAction(i18n("&Encrypt File..."), "encrypted", 0,this, SLOT(slotFilePreEnc()), actionCollection(),"file_encrypt");
- (void) new KAction(i18n("&Decrypt File..."), "decrypted", 0,this, SLOT(slotFilePreDec()), actionCollection(),"file_decrypt");
- (void) new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, SLOT(slotKeyManager()), actionCollection(),"key_manage");
- editUndo = KStdAction::undo(this, SLOT(slotundo()), actionCollection());
- editRedo = KStdAction::redo(this, SLOT(slotredo()), actionCollection());
- //(void) new KAction(i18n("&Manage Keys"), "kgpg_manage", CTRL+Key_K,this, SLOT(slotManageKey()), actionCollection(),"keys_manage");
- (void) new KAction(i18n("&Generate Signature..."),0, this, SLOT(slotPreSignFile()), actionCollection(), "sign_generate");
- (void) new KAction(i18n("&Verify Signature..."),0, this, SLOT(slotPreVerifyFile()), actionCollection(), "sign_verify");
- (void) new KAction(i18n("&Check MD5 Sum..."), 0,this, SLOT(slotCheckMd5()), actionCollection(), "sign_check");
- KStdAction::print(this, SLOT(slotFilePrint()), actionCollection());
+ KStdAction::openNew(this, TQT_SLOT(slotFileNew()), actionCollection());
+ KStdAction::open(this, TQT_SLOT(slotFileOpen()), actionCollection());
+ KStdAction::saveAs(this, TQT_SLOT(slotFileSaveAs()), actionCollection());
+ KStdAction::quit(this, TQT_SLOT(slotFileQuit()), actionCollection());
+ KStdAction::cut(this, TQT_SLOT(slotEditCut()), actionCollection());
+ KStdAction::copy(this, TQT_SLOT(slotEditCopy()), actionCollection());
+ KStdAction::paste(this, TQT_SLOT(slotEditPaste()), actionCollection());
+ KStdAction::selectAll(this, TQT_SLOT(slotSelectAll()), actionCollection());
+ KStdAction::preferences(this, TQT_SLOT(slotOptions()), actionCollection(),"kgpg_config");
+
+ //KStdAction::keyBindings(guiFactory(), TQT_SLOT(configureShortcuts()), actionCollection());
+ //KStdAction::configureToolbars(this, TQT_SLOT(slotConfigureToolbars()), actionCollection());
+
+ fileSave = KStdAction::save(this, TQT_SLOT(slotFileSave()), actionCollection());
+ (void) new KAction(i18n("&Encrypt File..."), "encrypted", 0,this, TQT_SLOT(slotFilePreEnc()), actionCollection(),"file_encrypt");
+ (void) new KAction(i18n("&Decrypt File..."), "decrypted", 0,this, TQT_SLOT(slotFilePreDec()), actionCollection(),"file_decrypt");
+ (void) new KAction(i18n("&Open Key Manager"), "kgpg", 0,this, TQT_SLOT(slotKeyManager()), actionCollection(),"key_manage");
+ editUndo = KStdAction::undo(this, TQT_SLOT(slotundo()), actionCollection());
+ editRedo = KStdAction::redo(this, TQT_SLOT(slotredo()), actionCollection());
+ //(void) new KAction(i18n("&Manage Keys"), "kgpg_manage", CTRL+Key_K,this, TQT_SLOT(slotManageKey()), actionCollection(),"keys_manage");
+ (void) new KAction(i18n("&Generate Signature..."),0, this, TQT_SLOT(slotPreSignFile()), actionCollection(), "sign_generate");
+ (void) new KAction(i18n("&Verify Signature..."),0, this, TQT_SLOT(slotPreVerifyFile()), actionCollection(), "sign_verify");
+ (void) new KAction(i18n("&Check MD5 Sum..."), 0,this, TQT_SLOT(slotCheckMd5()), actionCollection(), "sign_check");
+ KStdAction::print(this, TQT_SLOT(slotFilePrint()), actionCollection());
// comment out for now, only confusing
- //encodingAction=new KToggleAction(i18n("&Unicode (utf-8) Encoding"), 0, 0,this, SLOT(slotSetCharset()),actionCollection(),"charsets");
+ //encodingAction=new KToggleAction(i18n("&Unicode (utf-8) Encoding"), 0, 0,this, TQT_SLOT(slotSetCharset()),actionCollection(),"charsets");
}
-void KgpgApp::slotSetFont(QFont myFont)
+void KgpgApp::slotSetFont(TQFont myFont)
{
view->editor->setFont (myFont);
}
@@ -165,10 +165,10 @@ void KgpgApp::slotSetCharset()
{
//////// work in progress
//if (encodingAction->isChecked())
-//view->editor->setText(QString::fromUtf8(view->editor->text().ascii()));
+//view->editor->setText(TQString::fromUtf8(view->editor->text().ascii()));
//else
{
-if (checkEncoding(QTextCodec::codecForLocale ())) return;
+if (checkEncoding(TQTextCodec::codecForLocale ())) return;
view->editor->setText(view->editor->text().utf8());
}
}
@@ -181,7 +181,7 @@ void KgpgApp::initView()
view = new KgpgView(this,0);
// doc->addView(view);
- connect(view,SIGNAL(resetEncoding(bool)),this,SLOT(slotResetEncoding(bool)));
+ connect(view,TQT_SIGNAL(resetEncoding(bool)),this,TQT_SLOT(slotResetEncoding(bool)));
setCentralWidget(view);
setCaption(i18n("Untitled"),false); /// doc->URL().fileName(),false);
@@ -204,19 +204,19 @@ void KgpgApp::slotFileNew()
{
////// delete all text from editor
- view->editor->setText(QString::null);
+ view->editor->setText(TQString::null);
editRedo->setEnabled(false);
editUndo->setEnabled(false);
setCaption(i18n("Untitled"), false);
fileSave->setEnabled(false);
- Docname=QString::null;
+ Docname=TQString::null;
slotResetEncoding(false);
}
void KgpgApp::slotFilePreEnc()
{
- QStringList opts;
- KURL::List urls=KFileDialog::getOpenURLs(QString::null,
+ TQStringList opts;
+ KURL::List urls=KFileDialog::getOpenURLs(TQString::null,
i18n("*|All Files"), this, i18n("Open File to Encode"));
if (urls.isEmpty())
return;
@@ -226,14 +226,14 @@ void KgpgApp::slotFilePreEnc()
void KgpgApp::slotFilePreDec()
{
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString::null,
i18n("*|All Files"), this, i18n("Open File to Decode"));
if (url.isEmpty())
return;
- QString oldname=url.fileName();
+ TQString oldname=url.fileName();
- QString newname;
+ TQString newname;
if (oldname.endsWith(".gpg") || oldname.endsWith(".asc") || oldname.endsWith(".pgp"))
oldname.truncate(oldname.length()-4);
@@ -252,7 +252,7 @@ void KgpgApp::slotFilePreDec()
page->checkClipboard->setText(i18n("Editor"));
page->resize(page->minimumSize());
popn->resize(popn->minimumSize());
- if (popn->exec()==QDialog::Accepted) {
+ if (popn->exec()==TQDialog::Accepted) {
if (page->checkFile->isChecked())
newname=page->newFilename->url();
} else {
@@ -263,10 +263,10 @@ void KgpgApp::slotFilePreDec()
if (!newname.isEmpty()) {
- QFile fgpg(newname);
+ TQFile fgpg(newname);
if (fgpg.exists()) {
- KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),QString::null,newname,KIO::M_OVERWRITE);
- if (over->exec()==QDialog::Rejected)
+ KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,newname,KIO::M_OVERWRITE);
+ if (over->exec()==TQDialog::Rejected)
{
delete over;
return;
@@ -276,7 +276,7 @@ void KgpgApp::slotFilePreDec()
}
KgpgLibrary *lib=new KgpgLibrary(this);
lib->slotFileDec(url,KURL(newname), customDecrypt);
- connect(lib,SIGNAL(importOver(QStringList)),this,SIGNAL(refreshImported(QStringList)));
+ connect(lib,TQT_SIGNAL(importOver(TQStringList)),this,TQT_SIGNAL(refreshImported(TQStringList)));
} else
openEncryptedDocumentFile(url);
}
@@ -284,7 +284,7 @@ void KgpgApp::slotFilePreDec()
void KgpgApp::slotFileOpen()
{
KEncodingFileDialog::Result loadResult;
- loadResult=KEncodingFileDialog::getOpenURLAndEncoding(QString::null,QString::null,QString::null,this);
+ loadResult=KEncodingFileDialog::getOpenURLAndEncoding(TQString::null,TQString::null,TQString::null,this);
KURL url=loadResult.URLs.first();
textEncoding=loadResult.encoding;
@@ -298,7 +298,7 @@ void KgpgApp::slotFileOpen()
}
-bool KgpgApp::checkEncoding(QTextCodec *codec)
+bool KgpgApp::checkEncoding(TQTextCodec *codec)
{
///////////// KGlobal::locale()->encoding()->name()
return codec->canEncode(view->editor->text());
@@ -306,12 +306,12 @@ return codec->canEncode(view->editor->text());
void KgpgApp::slotFileSave()
{
- QString filn=Docname.path();
+ TQString filn=Docname.path();
if (filn.isEmpty()) {
slotFileSaveAs();
return;
}
- QTextCodec*cod=QTextCodec::codecForName (textEncoding.ascii());
+ TQTextCodec*cod=TQTextCodec::codecForName (textEncoding.ascii());
// slotStatusMsg(i18n("Saving file..."));
if (!checkEncoding(cod)) {
KMessageBox::sorry(this,i18n("The document could not been saved, as the selected encoding cannot encode every unicode character in it."));
@@ -320,31 +320,31 @@ void KgpgApp::slotFileSave()
KTempFile tmpfile;
if (Docname.isLocalFile()) {
- QFile f(filn);
+ TQFile f(filn);
if ( !f.open( IO_WriteOnly ) ) {
KMessageBox::sorry(this,i18n("The document could not be saved, please check your permissions and disk space."));
return;
}
- QTextStream t( &f );
+ TQTextStream t( &f );
t.setCodec(cod);
- //t.setEncoding( QTextStream::Latin1 );
+ //t.setEncoding( TQTextStream::Latin1 );
t << view->editor->text();//.utf8();
f.close();
}
else {
/*FIXME use following code:
- QFile f( fName );
+ TQFile f( fName );
00983 if ( !f.open( IO_ReadOnly ) )
00984 return;
-00985 QFileInfo info ( f );
-00986 smModificationTime = new QTime( info.lastModified().time() );
-00987 QTextStream t(&f);
-00988 t.setEncoding( QTextStream::Latin1 );
-00989 QString s = t.readLine();
+00985 TQFileInfo info ( f );
+00986 smModificationTime = new TQTime( info.lastModified().time() );
+00987 TQTextStream t(&f);
+00988 t.setEncoding( TQTextStream::Latin1 );
+00989 TQString s = t.readLine();
00990 f.close();
*/
- QTextStream *stream = tmpfile.textStream();
+ TQTextStream *stream = tmpfile.textStream();
stream->setCodec(cod);
*stream << view->editor->text();//.utf8();
tmpfile.close();
@@ -364,20 +364,20 @@ void KgpgApp::slotFileSave()
void KgpgApp::slotFileSaveAs()
{
- //KURL url=KFileDialog::getSaveURL(QDir::currentDirPath(),i18n("*|All Files"), this, i18n("Save As"));
+ //KURL url=KFileDialog::getSaveURL(TQDir::currentDirPath(),i18n("*|All Files"), this, i18n("Save As"));
KEncodingFileDialog::Result saveResult;
- saveResult=KEncodingFileDialog::getSaveURLAndEncoding (QString::null,QString::null,QString::null,this);
+ saveResult=KEncodingFileDialog::getSaveURLAndEncoding (TQString::null,TQString::null,TQString::null,this);
KURL url=saveResult.URLs.first();
- QString selectedEncoding=saveResult.encoding;
+ TQString selectedEncoding=saveResult.encoding;
if(!url.isEmpty()) {
if (url.isLocalFile())
{
- QString filn=url.path();
- QFile f(filn);
+ TQString filn=url.path();
+ TQFile f(filn);
if (f.exists()) {
- QString message=i18n("Overwrite existing file %1?").arg(url.fileName());
- int result=KMessageBox::warningContinueCancel(this,QString(message),i18n("Warning"),i18n("Overwrite"));
+ TQString message=i18n("Overwrite existing file %1?").arg(url.fileName());
+ int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite"));
if (result==KMessageBox::Cancel)
return;
}
@@ -385,8 +385,8 @@ void KgpgApp::slotFileSaveAs()
}
else if (KIO::NetAccess::exists(url,false,this))
{
- QString message=i18n("Overwrite existing file %1?").arg(url.fileName());
- int result=KMessageBox::warningContinueCancel(this,QString(message),i18n("Warning"),i18n("Overwrite"));
+ TQString message=i18n("Overwrite existing file %1?").arg(url.fileName());
+ int result=KMessageBox::warningContinueCancel(this,TQString(message),i18n("Warning"),i18n("Overwrite"));
if (result==KMessageBox::Cancel)
return;
}
@@ -396,15 +396,15 @@ void KgpgApp::slotFileSaveAs()
}
}
-void KgpgApp::openDocumentFile(const KURL& url,QString encoding)
+void KgpgApp::openDocumentFile(const KURL& url,TQString encoding)
{
-QString tempOpenFile;
+TQString tempOpenFile;
/////////////////////////////////////////////////
if( KIO::NetAccess::download( url, tempOpenFile,this ) ) {
- QFile qfile(tempOpenFile);
+ TQFile qfile(tempOpenFile);
if (qfile.open(IO_ReadOnly)) {
- QTextStream t( &qfile );
- t.setCodec(QTextCodec::codecForName (encoding.ascii()));
+ TQTextStream t( &qfile );
+ t.setCodec(TQTextCodec::codecForName (encoding.ascii()));
view->editor->setText(t.read());
qfile.close();
fileSave->setEnabled(false);
@@ -419,8 +419,8 @@ void KgpgApp::slotFilePrint()
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,view->editor->text() );
}
}
@@ -463,14 +463,14 @@ void KgpgApp::slotCheckMd5()
{
///////////////////////////////////////////////////////////////////////// display md5 sum for a chosen file
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString::null,
i18n("*|All Files"), this, i18n("Open File to Verify"));
if (!url.isEmpty()) {
Md5Widget *mdwidget=new Md5Widget(this,0,url);
mdwidget->exec();
delete mdwidget;
- // KMessageBox::information(this,QString("MD5 sum for "+url.fileName()+" is:\n"+checkfile.hexDigest().data()));
+ // KMessageBox::information(this,TQString("MD5 sum for "+url.fileName()+" is:\n"+checkfile.hexDigest().data()));
}
}
@@ -478,7 +478,7 @@ void KgpgApp::slotCheckMd5()
void KgpgApp::slotPreSignFile()
{
////////////////////////////////////// create a detached signature for a chosen file
- KURL url=KFileDialog::getOpenURL(QString::null,i18n("*|All Files"), this, i18n("Open File to Sign"));
+ KURL url=KFileDialog::getOpenURL(TQString::null,i18n("*|All Files"), this, i18n("Open File to Sign"));
if (!url.isEmpty())
slotSignFile(url);
}
@@ -486,18 +486,18 @@ void KgpgApp::slotPreSignFile()
void KgpgApp::slotSignFile(KURL url)
{
////////////////////////////////////// create a detached signature for a chosen file
- QString signKeyID;
+ TQString signKeyID;
if (!url.isEmpty()) {
////////////////// select a private key to sign file --> listkeys.cpp
KgpgSelKey *opts=new KgpgSelKey(this,"select_secret");
- if (opts->exec()==QDialog::Accepted)
+ if (opts->exec()==TQDialog::Accepted)
signKeyID=opts->getkeyID();
else {
delete opts;
return;
}
delete opts;
- QString Options;
+ TQString Options;
if (KGpgSettings::asciiArmor())
Options="--armor";
if (KGpgSettings::pgpCompatibility())
@@ -509,7 +509,7 @@ void KgpgApp::slotSignFile(KURL url)
void KgpgApp::slotPreVerifyFile()
{
- KURL url=KFileDialog::getOpenURL(QString::null,
+ KURL url=KFileDialog::getOpenURL(TQString::null,
i18n("*|All Files"), this, i18n("Open File to Verify"));
slotVerifyFile(url);
}
@@ -517,28 +517,28 @@ void KgpgApp::slotPreVerifyFile()
void KgpgApp::slotVerifyFile(KURL url)
{
/////////////////////////////////// check file signature
- QString sigfile=QString::null;
+ TQString sigfile=TQString::null;
if (!url.isEmpty()) {
////////////////////////////////////// try to find detached signature.
if (!url.fileName().endsWith(".sig")) {
sigfile=url.path()+".sig";
- QFile fsig(sigfile);
+ TQFile fsig(sigfile);
if (!fsig.exists()) {
sigfile=url.path()+".asc";
- QFile fsig(sigfile);
+ TQFile fsig(sigfile);
////////////// if no .asc or .sig signature file included, assume the file is internally signed
if (!fsig.exists())
- sigfile=QString::null;
+ sigfile=TQString::null;
}
}
///////////////////////// pipe gpg command
KgpgInterface *verifyFileProcess=new KgpgInterface();
verifyFileProcess->KgpgVerifyFile(url,KURL(sigfile));
- connect (verifyFileProcess,SIGNAL(verifyquerykey(QString)),this,SLOT(importSignatureKey(QString)));
+ connect (verifyFileProcess,TQT_SIGNAL(verifyquerykey(TQString)),this,TQT_SLOT(importSignatureKey(TQString)));
}
}
-void KgpgApp::importSignatureKey(QString ID)
+void KgpgApp::importSignatureKey(TQString ID)
{
keyServer *kser=new keyServer(0,"server_dialog",false);
kser->page->kLEimportid->setText(ID);
diff --git a/kgpg/kgpgeditor.h b/kgpg/kgpgeditor.h
index 0e8cda9..31af386 100644
--- a/kgpg/kgpgeditor.h
+++ b/kgpg/kgpgeditor.h
@@ -24,7 +24,7 @@
#include <kmainwindow.h>
-#include <qstringlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
class KPassivePopup;
@@ -42,18 +42,18 @@ class KgpgApp : public KMainWindow
public:
/** construtor of KgpgApp, calls all init functions to create the application.
*/
- KgpgApp(QWidget *parent=0, const char *name=0,WFlags f = 0,KShortcut goHome=QKeySequence(CTRL+Qt::Key_Home),bool mainWindow=false);
+ KgpgApp(TQWidget *parent=0, const char *name=0,WFlags f = 0,KShortcut goHome=TQKeySequence(CTRL+Qt::Key_Home),bool mainWindow=false);
~KgpgApp();
/** opens a file specified by commandline option
*/
- void openDocumentFile(const KURL& url,QString encoding=QString::null);
+ void openDocumentFile(const KURL& url,TQString encoding=TQString::null);
void openEncryptedDocumentFile(const KURL& url);
/** returns a pointer to the current document connected to the KTMainWindow instance and is used by
* the View class to access the document object's methods
*/
KURL Docname;
int version;
- QString messages;
+ TQString messages;
KgpgView *view;
KShortcut goDefaultKey;
@@ -63,7 +63,7 @@ protected:
void saveOptions();
void initActions();
void initView();
- void closeEvent( QCloseEvent * e );
+ void closeEvent( TQCloseEvent * e );
private slots:
//void slotOptions();
@@ -86,34 +86,34 @@ private slots:
void slotSignFile(KURL url);
void slotVerifyFile(KURL url);
void slotPreVerifyFile();
- void importSignatureKey(QString ID);
+ void importSignatureKey(TQString ID);
void slotundo();
void slotredo();
void slotSetCharset();
- bool checkEncoding(QTextCodec *codec);
+ bool checkEncoding(TQTextCodec *codec);
void slotOptions();
void slotKeyManager();
public slots:
- void slotSetFont(QFont myFont);
+ void slotSetFont(TQFont myFont);
void closeWindow();
private:
- QStringList customDecrypt;
+ TQStringList customDecrypt;
//KToggleAction *encodingAction ;
KURL urlselected;
KAction* fileSave, *editUndo, *editRedo;
KComboBox *fontCombo;
bool isMainWindow;
- QString textEncoding;
+ TQString textEncoding;
signals:
-void refreshImported(QStringList);
+void refreshImported(TQStringList);
void openChangeFont();
void openConfigDialog();
void encryptFiles(KURL::List fileList);
diff --git a/kgpg/kgpginterface.cpp b/kgpg/kgpginterface.cpp
index 5286c3c..d02c2a5 100644
--- a/kgpg/kgpginterface.cpp
+++ b/kgpg/kgpginterface.cpp
@@ -17,15 +17,15 @@
#include <stdio.h>
-#include <qdialog.h>
-#include <qclipboard.h>
-#include <qlayout.h>
-#include <qregexp.h>
-#include <qstring.h>
-#include <qlabel.h>
-#include <qapplication.h>
+#include <tqdialog.h>
+#include <tqclipboard.h>
+#include <tqlayout.h>
+#include <tqregexp.h>
+#include <tqstring.h>
+#include <tqlabel.h>
+#include <tqapplication.h>
#include <kio/netaccess.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kmessagebox.h>
#include <klocale.h>
@@ -36,11 +36,11 @@
#include <kpassivepopup.h>
#include <kiconloader.h>
#include <kaction.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include <kprocess.h>
#include <kprocio.h>
#include <kconfig.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kled.h>
#include <kdebug.h>
#include <ktempfile.h>
@@ -56,13 +56,13 @@ KgpgInterface::KgpgInterface()
int KgpgInterface::getGpgVersion()
{
FILE *fp;
- QString readResult,gpgString;
+ TQString readResult,gpgString;
char buffer[200];
bool readLine=true;
- QString gpgcmd="gpg --version";
+ TQString gpgcmd="gpg --version";
- fp = popen(QFile::encodeName(gpgcmd), "r");
+ fp = popen(TQFile::encodeName(gpgcmd), "r");
while ( fgets( buffer, sizeof(buffer), fp)) {
readResult=buffer;
if (readLine) {
@@ -74,13 +74,13 @@ FILE *fp;
return (100*gpgString.section('.',0,0).toInt()+10*gpgString.section('.',1,1).toInt()+gpgString.section('.',2,2).toInt());
}
-void KgpgInterface::updateIDs(QString txtString)
+void KgpgInterface::updateIDs(TQString txtString)
{
int cut=txtString.find(' ',22,false);
txtString.remove(0,cut);
if (txtString.find("(",0,false)!=-1)
txtString=txtString.section('(',0,0)+txtString.section(')',-1);
- txtString.replace(QRegExp("<"),"&lt;");
+ txtString.replace(TQRegExp("<"),"&lt;");
if (userIDs.find(txtString)==-1)
{
if (!userIDs.isEmpty())
@@ -89,30 +89,30 @@ void KgpgInterface::updateIDs(QString txtString)
}
}
-void KgpgInterface::KgpgEncryptFile(QStringList encryptKeys,KURL srcUrl,KURL destUrl, QStringList Options, bool symetrical)
+void KgpgInterface::KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL destUrl, TQStringList Options, bool symetrical)
{
sourceFile=srcUrl;
- message=QString::null;
+ message=TQString::null;
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
- *proc<<"--output"<<QFile::encodeName(destUrl.path());
+ *proc<<"--output"<<TQFile::encodeName(destUrl.path());
if (!symetrical) {
*proc<<"-e";
- for ( QStringList::Iterator it = encryptKeys.begin(); it != encryptKeys.end(); ++it )
+ for ( TQStringList::Iterator it = encryptKeys.begin(); it != encryptKeys.end(); ++it )
*proc<<"--recipient"<< *it;
} else //////////// symetrical encryption, prompt for password
*proc<<"-c";
- *proc<<QFile::encodeName(srcUrl.path());
+ *proc<<TQFile::encodeName(srcUrl.path());
///////// when process ends, update dialog infos
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(encryptfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(readencprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(encryptfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readencprocess(KProcIO *)));
proc->start(KProcess::NotifyOnExit,true);
}
@@ -132,7 +132,7 @@ void KgpgInterface::encryptfin(KProcess *)
void KgpgInterface::readencprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
if (required.find("BEGIN_ENCRYPTION",0,false)!=-1)
emit processstarted(sourceFile.path());
@@ -140,9 +140,9 @@ void KgpgInterface::readencprocess(KProcIO *p)
if (required.find("openfile.overwrite.okay")!=-1)
p->writeStdin("Yes");
else if ((required.find("passphrase.enter")!=-1)) {
- QCString passphrase;
+ TQCString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("Enter passphrase for your file (symmetrical encryption):"));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
p->deleteLater();
emit processaborted(true);
return;
@@ -160,28 +160,28 @@ void KgpgInterface::readencprocess(KProcIO *p)
////////////////////////////////////////////////////////////////////////////////////////////////////////// File decryption
-void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,QStringList Options)
+void KgpgInterface::KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Options)
{
- message=QString::null;
+ message=TQString::null;
step=3;
decryptUrl=srcUrl.path();
- userIDs=QString::null;
+ userIDs=TQString::null;
anonymous=false;
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
if (!destUrl.fileName().isEmpty()) // a filename was entered
- *proc<<"-o"<<QFile::encodeName(destUrl.path());
+ *proc<<"-o"<<TQFile::encodeName(destUrl.path());
- *proc<<"-d"<<QFile::encodeName(srcUrl.path());
+ *proc<<"-d"<<TQFile::encodeName(srcUrl.path());
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(decryptfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(readdecprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(decryptfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readdecprocess(KProcIO *)));
proc->start(KProcess::NotifyOnExit,true);
}
@@ -196,7 +196,7 @@ void KgpgInterface::decryptfin(KProcess *)
void KgpgInterface::readdecprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
if (required.find("BEGIN_DECRYPTION",0,false)!=-1)
emit processstarted(decryptUrl);
@@ -213,9 +213,9 @@ void KgpgInterface::readdecprocess(KProcIO *p)
else if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- userIDs.replace(QRegExp("<"),"&lt;");
- QCString passphrase;
- QString passdlgmessage;
+ userIDs.replace(TQRegExp("<"),"&lt;");
+ TQCString passphrase;
+ TQString passdlgmessage;
if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
if ((step<3) && (!anonymous))
@@ -223,13 +223,13 @@ void KgpgInterface::readdecprocess(KProcIO *p)
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
p->deleteLater();
emit processaborted(true);
return;
}
p->writeStdin(passphrase,true);
- userIDs=QString::null;
+ userIDs=TQString::null;
if (step>1) step--;
else step=3;
} else {
@@ -245,24 +245,24 @@ void KgpgInterface::readdecprocess(KProcIO *p)
////////////////////////////////////////////////////////////////////////////////////////////////////////// Text encryption
-void KgpgInterface::KgpgEncryptText(QString text,QStringList userIDs, QStringList Options)
+void KgpgInterface::KgpgEncryptText(TQString text,TQStringList userIDs, TQStringList Options)
{
- message=QString::null;
- //QTextCodec *codec = KGlobal::charsets()->codecForName(KGlobal::locale()->encoding());
- QTextCodec *codec =QTextCodec::codecForLocale ();
+ message=TQString::null;
+ //TQTextCodec *codec = KGlobal::charsets()->codecForName(KGlobal::locale()->encoding());
+ TQTextCodec *codec =TQTextCodec::codecForLocale ();
if (codec->canEncode(text)) txtToEncrypt=text;
else txtToEncrypt=text.utf8();
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=1"<<"--utf8-strings";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
if (!userIDs.isEmpty())
{
*proc<<"-e";
- for ( QStringList::Iterator it = userIDs.begin(); it != userIDs.end(); ++it )
+ for ( TQStringList::Iterator it = userIDs.begin(); it != userIDs.end(); ++it )
*proc<<"--recipient"<< *it;
}
else
@@ -270,8 +270,8 @@ void KgpgInterface::KgpgEncryptText(QString text,QStringList userIDs, QStringLis
///////// when process ends, update dialog infos
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(txtencryptfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(txtreadencprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(txtencryptfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(txtreadencprocess(KProcIO *)));
proc->start(KProcess::NotifyOnExit,false);
emit txtencryptionstarted();
}
@@ -282,26 +282,26 @@ void KgpgInterface::txtencryptfin(KProcess *)
if (!message.isEmpty())
emit txtencryptionfinished(message);
else
- emit txtencryptionfinished(QString::null);
+ emit txtencryptionfinished(TQString::null);
}
void KgpgInterface::txtreadencprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
if (required.find("BEGIN_ENCRYPTION",0,false)!=-1)
{
p->writeStdin(txtToEncrypt,false);
- txtToEncrypt=QString::null;
+ txtToEncrypt=TQString::null;
p->closeWhenDone();
}
else
if ((required.find("passphrase.enter")!=-1))
{
- QCString passphrase;
- QString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)");
+ TQCString passphrase;
+ TQString passdlgmessage=i18n("Enter passphrase (symmetrical encryption)");
int code=KPasswordDialog::getNewPassword(passphrase,passdlgmessage);
- if (code!=QDialog::Accepted)
+ if (code!=TQDialog::Accepted)
{
p->deleteLater();
return;
@@ -316,13 +316,13 @@ void KgpgInterface::txtreadencprocess(KProcIO *p)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// Text decryption
-void KgpgInterface::KgpgDecryptText(QString text,QStringList Options)
+void KgpgInterface::KgpgDecryptText(TQString text,TQStringList Options)
{
- gpgOutput=QString::null;
- log=QString::null;
+ gpgOutput=TQString::null;
+ log=TQString::null;
- message=QString::null;
- userIDs=QString::null;
+ message=TQString::null;
+ userIDs=TQString::null;
step=3;
anonymous=false;
decfinished=false;
@@ -330,15 +330,15 @@ void KgpgInterface::KgpgDecryptText(QString text,QStringList Options)
badmdc=false;
KProcess *proc=new KProcess();
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=2"<<"--no-batch"<<"--utf8-strings";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
*proc<<"-d";
///////// when process ends, update dialog infos
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(txtdecryptfin(KProcess *)));
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this, SLOT(getOutput(KProcess *, char *, int)));
- connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(getCmdOutput(KProcess *, char *, int)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(txtdecryptfin(KProcess *)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this, TQT_SLOT(getOutput(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),this, TQT_SLOT(getCmdOutput(KProcess *, char *, int)));
proc->start(KProcess::NotifyOnExit,KProcess::All);
proc->writeStdin(text.utf8(), text.length());
}
@@ -360,19 +360,19 @@ emit txtdecryptionfailed(log);
void KgpgInterface::getOutput(KProcess *, char *data, int )
{
- message.append(QString::fromUtf8(data));
+ message.append(TQString::fromUtf8(data));
}
void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
{
- gpgOutput.append(QString::fromUtf8(data));
+ gpgOutput.append(TQString::fromUtf8(data));
log.append(data);
int pos;
while ((pos=gpgOutput.find("\n"))!=-1)
{
- QString required=gpgOutput.left(pos);
+ TQString required=gpgOutput.left(pos);
gpgOutput.remove(0,pos+2);
if (required.find("USERID_HINT",0,false)!=-1)
@@ -390,15 +390,15 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
{
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- QCString passphrase;
- QString passdlgmessage;
+ TQCString passphrase;
+ TQString passdlgmessage;
if (anonymous)
passdlgmessage=i18n("<b>No user id found</b>. Trying all secret keys.<br>");
if ((step<3) && (!anonymous))
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
- if (code!=QDialog::Accepted)
+ if (code!=TQDialog::Accepted)
{
p->deleteLater();
emit processaborted(true);
@@ -406,7 +406,7 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
}
passphrase.append("\n");
p->writeStdin(passphrase,passphrase.length());
- userIDs=QString::null;
+ userIDs=TQString::null;
if (step>1) step--;
else step=3;
}
@@ -420,7 +420,7 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
if (required.find("BEGIN_DECRYPTION")!=-1)
{
p->closeStdin();
- required=QString::null;
+ required=TQString::null;
}
if (required.find("END_DECRYPTION")!=-1) decfinished=true;
@@ -432,26 +432,26 @@ void KgpgInterface::getCmdOutput(KProcess *p, char *data, int )
////////////////////////////////////////////////////////////////////////////////////////////////////////// Text signing
-void KgpgInterface::KgpgSignText(QString text,QString userIDs, QStringList Options)
+void KgpgInterface::KgpgSignText(TQString text,TQString userIDs, TQStringList Options)
{
- message=QString::null;
+ message=TQString::null;
step=4;
- QString txtprocess;
- QTextCodec *codec =QTextCodec::codecForLocale ();
+ TQString txtprocess;
+ TQTextCodec *codec =TQTextCodec::codecForLocale ();
if (codec->canEncode(text)) txtprocess=text;
else txtprocess=text.utf8();
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=1"<<"--utf8-strings";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
*proc<<"--clearsign"<<"-u"<<userIDs;
///////// when process ends, update dialog infos
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(txtsignfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(txtsignprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(txtsignfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(txtsignprocess(KProcIO *)));
//emit txtsigningstarted();
@@ -473,12 +473,12 @@ void KgpgInterface::txtsignfin(KProcess *)
if (!message.isEmpty())
emit txtSignOver(message);
else
- emit txtSignOver(QString::null);
+ emit txtSignOver(TQString::null);
}
void KgpgInterface::txtsignprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
// kdDebug(2100)<<"SIGNING: "<<required<<endl;
@@ -488,7 +488,7 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
if (required.find("GOOD_PASSPHRASE")!=-1)
{
p->writeStdin(message,true);
- message=QString::null;
+ message=TQString::null;
p->closeWhenDone();
}
@@ -498,13 +498,13 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
else step=3;
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- QCString passphrase;
- QString passdlgmessage;
+ TQCString passphrase;
+ TQString passdlgmessage;
if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. You have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
- if (code!=QDialog::Accepted)
+ if (code!=TQDialog::Accepted)
{
p->deleteLater();
return;
@@ -519,11 +519,11 @@ void KgpgInterface::txtsignprocess(KProcIO *p)
//////////////////////////////////////////////// decrypt file to text
-void KgpgInterface::KgpgDecryptFileToText(KURL srcUrl,QStringList Options)
+void KgpgInterface::KgpgDecryptFileToText(KURL srcUrl,TQStringList Options)
{
- message=QString::null;
- userIDs=QString::null;
+ message=TQString::null;
+ userIDs=TQString::null;
step=3;
anonymous=false;
decfinished=false;
@@ -532,16 +532,16 @@ badmdc=false;
KProcess *proc=new KProcess();
*proc<<"gpg"<<"--no-tty"<<"--utf8-strings"<<"--no-secmem-warning"<<"--command-fd=0"<<"--status-fd=2"<<"--no-batch"<<"-o"<<"-";
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) {
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it ) {
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
}
- *proc<<"-d"<<QFile::encodeName(srcUrl.path());
+ *proc<<"-d"<<TQFile::encodeName(srcUrl.path());
///////// when process ends, update dialog infos
- connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(txtdecryptfin(KProcess *)));
- connect(proc, SIGNAL(receivedStdout(KProcess *, char *, int)),this, SLOT(getOutput(KProcess *, char *, int)));
- connect(proc, SIGNAL(receivedStderr(KProcess *, char *, int)),this, SLOT(getCmdOutput(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(txtdecryptfin(KProcess *)));
+ connect(proc, TQT_SIGNAL(receivedStdout(KProcess *, char *, int)),this, TQT_SLOT(getOutput(KProcess *, char *, int)));
+ connect(proc, TQT_SIGNAL(receivedStderr(KProcess *, char *, int)),this, TQT_SLOT(getCmdOutput(KProcess *, char *, int)));
proc->start(KProcess::NotifyOnExit,KProcess::All);
}
@@ -549,18 +549,18 @@ badmdc=false;
/////////////////////////////////////////////////////// verify text
-void KgpgInterface::KgpgVerifyText(QString text)
+void KgpgInterface::KgpgVerifyText(TQString text)
{
- QTextCodec *codec =QTextCodec::codecForLocale ();
+ TQTextCodec *codec =TQTextCodec::codecForLocale ();
if (!codec->canEncode(text)) text=text.utf8();
signmiss=false;
- signID=QString::null;
- message=QString::null;
- KProcIO *verifyproc=new KProcIO(QTextCodec::codecForLocale());
+ signID=TQString::null;
+ message=TQString::null;
+ KProcIO *verifyproc=new KProcIO(TQTextCodec::codecForLocale());
*verifyproc<<"gpg"<<"--no-secmem-warning"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings"<<"--verify";
- connect(verifyproc, SIGNAL(processExited(KProcess *)),this, SLOT(slotverifyresult(KProcess *)));
- connect(verifyproc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotverifyread(KProcIO *)));
+ connect(verifyproc, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotverifyresult(KProcess *)));
+ connect(verifyproc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotverifyread(KProcIO *)));
verifyproc->start(KProcess::NotifyOnExit,true);
verifyproc->writeStdin (text);
verifyproc->closeWhenDone();
@@ -579,20 +579,20 @@ if (signmiss) emit missingSignature(signID);
void KgpgInterface::slotverifyread(KProcIO *p)
{
-QString required;
+TQString required;
while (p->readln(required,true)!=-1)
{
message+=required+"\n";
required=required.section("]",1,-1).stripWhiteSpace();
if (required.startsWith("GOODSIG"))
{
- QString userName=required.section(" ",2,-1).replace(QRegExp("<"),"&lt;");
+ TQString userName=required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;");
userName=checkForUtf8(userName);
signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(userName).arg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("BADSIG"))
{
- signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").arg(required.section(" ",2,-1).replace(QRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
+ signID=i18n("<qt><b>Bad signature</b> from:<br>%1<br>Key ID: %2<br><br><b>Text is corrupted.</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("NO_PUBKEY"))
{
@@ -611,45 +611,45 @@ QString required;
/////////////////////////////////////////////////////////////////////////////////////////////////// MD5
-Md5Widget::Md5Widget(QWidget *parent, const char *name,KURL url):KDialogBase( parent, name, true,i18n("MD5 Checksum"),Apply | Close)
+Md5Widget::Md5Widget(TQWidget *parent, const char *name,KURL url):KDialogBase( parent, name, true,i18n("MD5 Checksum"),Apply | Close)
{
setButtonApply(i18n("Compare MD5 with Clipboard"));
- mdSum=QString::null;
- QFile f(url.path());
+ mdSum=TQString::null;
+ TQFile f(url.path());
f.open( IO_ReadOnly);
KMD5 checkfile;
checkfile.reset();
checkfile.update(f);
mdSum=checkfile.hexDigest().data();
f.close();
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
resize( 360, 150 );
- QGridLayout *MyDialogLayout = new QGridLayout( page, 1, 1, 5, 6, "MyDialogLayout");
+ TQGridLayout *MyDialogLayout = new TQGridLayout( page, 1, 1, 5, 6, "MyDialogLayout");
- QLabel *TextLabel1 = new QLabel( page, "TextLabel1" );
+ TQLabel *TextLabel1 = new TQLabel( page, "TextLabel1" );
TextLabel1->setText(i18n("MD5 sum for <b>%1</b> is:").arg(url.fileName()));
MyDialogLayout->addWidget( TextLabel1, 0, 0 );
KLineEdit *KRestrictedLine1 = new KLineEdit(mdSum,page);
KRestrictedLine1->setReadOnly(true);
- KRestrictedLine1->setPaletteBackgroundColor(QColor(255,255,255));
+ KRestrictedLine1->setPaletteBackgroundColor(TQColor(255,255,255));
MyDialogLayout->addWidget( KRestrictedLine1, 1, 0 );
- QHBoxLayout *Layout4 = new QHBoxLayout( 0, 0, 6, "Layout4");
+ TQHBoxLayout *Layout4 = new TQHBoxLayout( 0, 0, 6, "Layout4");
- KLed1=new KLed(QColor(80,80,80),KLed::Off,KLed::Sunken,KLed::Circular,page,"KLed1");
+ KLed1=new KLed(TQColor(80,80,80),KLed::Off,KLed::Sunken,KLed::Circular,page,"KLed1");
KLed1->off();
- KLed1->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, 0, 0, KLed1->sizePolicy().hasHeightForWidth() ) );
+ KLed1->setSizePolicy( TQSizePolicy( (TQSizePolicy::SizeType)0, (TQSizePolicy::SizeType)0, 0, 0, KLed1->sizePolicy().hasHeightForWidth() ) );
Layout4->addWidget( KLed1 );
- TextLabel1_2 = new QLabel( page, "TextLabel1_2" );
+ TextLabel1_2 = new TQLabel( page, "TextLabel1_2" );
TextLabel1_2->setText(i18n( "<b>Unknown status</b>" ) );
Layout4->addWidget( TextLabel1_2 );
MyDialogLayout->addLayout( Layout4, 2, 0 );
- QSpacerItem* spacer = new QSpacerItem( 0, 0, QSizePolicy::Minimum, QSizePolicy::Expanding );
+ TQSpacerItem* spacer = new TQSpacerItem( 0, 0, TQSizePolicy::Minimum, TQSizePolicy::Expanding );
MyDialogLayout->addItem( spacer, 3, 0 );
page->show();
@@ -664,8 +664,8 @@ Md5Widget::~Md5Widget()
void Md5Widget::slotApply()
{
- QClipboard *cb = QApplication::clipboard();
- QString text;
+ QClipboard *cb = TQApplication::clipboard();
+ TQString text;
// Copy text from the clipboard (paste)
text = cb->text(QClipboard::Clipboard);
if ( !text.isEmpty() ) {
@@ -674,14 +674,14 @@ void Md5Widget::slotApply()
text.remove(text.find(' '),1);
if (text==mdSum) {
TextLabel1_2->setText(i18n("<b>Correct checksum</b>, file is ok."));
- KLed1->setColor(QColor(0,255,0));
+ KLed1->setColor(TQColor(0,255,0));
KLed1->on();
}//KMessageBox::sorry(0,"OK");
else if (text.length()!=mdSum.length())
KMessageBox::sorry(0,i18n("Clipboard content is not a MD5 sum."));
else {
TextLabel1_2->setText(i18n("<b>Wrong checksum, FILE CORRUPTED</b>"));
- KLed1->setColor(QColor(255,0,0));
+ KLed1->setColor(TQColor(255,0,0));
KLed1->on();
}
}
@@ -690,23 +690,23 @@ void Md5Widget::slotApply()
///////////////////////////////////////////////////////////////////////////////////////////// signatures
-void KgpgInterface::KgpgSignFile(QString keyID,KURL srcUrl,QStringList Options)
+void KgpgInterface::KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options)
{
////////////////////////////////////// create a detached signature for a chosen file
- message=QString::null;
+ message=TQString::null;
step=3;
///////////// create gpg command
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
keyID=keyID.stripWhiteSpace();
*proc<<"gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--utf8-strings"<<"--status-fd=2"<<"--command-fd=0"<<"-u"<<keyID.local8Bit();
- for ( QStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
- if (!QFile::encodeName(*it).isEmpty()) *proc<< QFile::encodeName(*it);
+ for ( TQStringList::Iterator it = Options.begin(); it != Options.end(); ++it )
+ if (!TQFile::encodeName(*it).isEmpty()) *proc<< TQFile::encodeName(*it);
- *proc<<"--output"<<QFile::encodeName(srcUrl.path()+".sig");
- *proc<<"--detach-sig"<<QFile::encodeName(srcUrl.path());
+ *proc<<"--output"<<TQFile::encodeName(srcUrl.path()+".sig");
+ *proc<<"--detach-sig"<<TQFile::encodeName(srcUrl.path());
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(signfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(readsignprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(signfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readsignprocess(KProcIO *)));
proc->start(KProcess::NotifyOnExit,true);
}
@@ -726,7 +726,7 @@ void KgpgInterface::signfin(KProcess *)
void KgpgInterface::readsignprocess(KProcIO *p)
{
- QString required;
+ TQString required;
while (p->readln(required,true)!=-1) {
if (required.find("USERID_HINT",0,false)!=-1)
updateIDs(required);
@@ -737,19 +737,19 @@ void KgpgInterface::readsignprocess(KProcIO *p)
else if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- QCString passphrase;
- QString passdlgmessage;
+ TQCString passphrase;
+ TQString passdlgmessage;
if (step<3)
passdlgmessage=i18n("<b>Bad passphrase</b>. you have %1 tries left.<br>").arg(step);
passdlgmessage+=i18n("Enter passphrase for <b>%1</b>").arg(userIDs);
int code=KPasswordDialog::getPassword(passphrase,passdlgmessage);
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
p->deleteLater();
emit signfinished();
return;
}
p->writeStdin(passphrase,true);
- userIDs=QString::null;
+ userIDs=TQString::null;
if (step>1) step--;
else step=3;
} else {
@@ -767,26 +767,26 @@ void KgpgInterface::readsignprocess(KProcIO *p)
void KgpgInterface::KgpgVerifyFile(KURL sigUrl,KURL srcUrl)
{
////////////////////////////////////// verify signature for a chosen file
- message=QString::null;
- signID=QString::null;
+ message=TQString::null;
+ signID=TQString::null;
signmiss=false;
///////////// create gpg command
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
file=sigUrl;
*proc<<"gpg"<<"--no-tty"<<"--utf8-strings"<<"--no-secmem-warning"<<"--status-fd=2"<<"--verify";
if (!srcUrl.isEmpty())
- *proc<<QFile::encodeName(srcUrl.path());
- *proc<<QFile::encodeName(sigUrl.path());
+ *proc<<TQFile::encodeName(srcUrl.path());
+ *proc<<TQFile::encodeName(sigUrl.path());
- QObject::connect(proc, SIGNAL(processExited(KProcess *)),this,SLOT(verifyfin(KProcess *)));
- QObject::connect(proc,SIGNAL(readReady(KProcIO *)),this,SLOT(readprocess(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(processExited(KProcess *)),this,TQT_SLOT(verifyfin(KProcess *)));
+ TQObject::connect(proc,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(readprocess(KProcIO *)));
proc->start(KProcess::NotifyOnExit,true);
}
void KgpgInterface::readprocess(KProcIO *p)
{
-QString required;
+TQString required;
while (p->readln(required,true)!=-1)
{
message+=required+"\n";
@@ -799,12 +799,12 @@ QString required;
signID=i18n("No signature found.");
if (required.startsWith("GOODSIG"))
{
- signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(required.section(" ",2,-1).replace(QRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
+ signID=i18n("<qt>Good signature from:<br><b>%1</b><br>Key ID: %2</qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("BADSIG"))
{
signID=i18n("<qt><b>BAD signature</b> from:<br> %1<br>Key id: %2<br><br>"
- "<b>The file is corrupted!</b></qt>").arg(required.section(" ",2,-1).replace(QRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
+ "<b>The file is corrupted!</b></qt>").arg(required.section(" ",2,-1).replace(TQRegExp("<"),"&lt;")).arg("0x"+required.section(" ",1,1).right(8));
}
if (required.startsWith("NO_PUBKEY"))
{
@@ -827,7 +827,7 @@ void KgpgInterface::verifyfin(KProcess *)
}
else {
if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>"
- "Do you want to import this key from a keyserver?</qt>").arg(signID),file.fileName(),QString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes)
+ "Do you want to import this key from a keyserver?</qt>").arg(signID),file.fileName(),TQString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes)
emit verifyquerykey(signID);
}
emit verifyfinished();
@@ -837,14 +837,14 @@ void KgpgInterface::verifyfin(KProcess *)
//////////////////////////////////////////////////////////// sign a key
-void KgpgInterface::KgpgSignKey(QString keyID,QString signKeyID,QString signKeyMail,bool local,int checking)
+void KgpgInterface::KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail,bool local,int checking)
{
- signKeyMail.replace(QRegExp("<"),"&lt;");
+ signKeyMail.replace(TQRegExp("<"),"&lt;");
konsChecked=checking;
konsLocal=local;
konsSignKey=signKeyID;
konsKeyID=keyID;
- errMessage=QString::null;
+ errMessage=TQString::null;
if (checkuid(keyID)>0)
{
openSignConsole();
@@ -853,20 +853,20 @@ void KgpgInterface::KgpgSignKey(QString keyID,QString signKeyID,QString signKeyM
signSuccess=0;
step=1;
- output=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ output=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--utf8-strings"<<"--command-fd=0"<<"--status-fd=2"<<"-u"<<signKeyID;
*conprocess<<"--edit-key"<<keyID;
if (local) *conprocess<<"lsign";
else *conprocess<<"sign";
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(sigprocess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(signover(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(sigprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(signover(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
void KgpgInterface::sigprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1)
{
@@ -889,44 +889,44 @@ void KgpgInterface::sigprocess(KProcIO *p)
if (required.find("sign_uid.expire")!=-1) {
p->writeStdin("Never");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("sign_uid.class")!=-1) {
- p->writeStdin(QString::number(konsChecked));
- required=QString::null;
+ p->writeStdin(TQString::number(konsChecked));
+ required=TQString::null;
}
if (required.find("sign_uid.okay")!=-1) {
p->writeStdin("Y");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("sign_all.okay")!=-1) {
p->writeStdin("Y");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString signpass;
+ TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>%1 Enter passphrase for <b>%2</b>:</qt>")
.arg(errMessage).arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
signSuccess=4; ///// aborted by user mode
- required=QString::null;
+ required=TQString::null;
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(signpass,true);
- required=QString::null;
+ required=TQString::null;
// step=2;
}
if ((step==2) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin("save");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("BAD_PASSPHRASE")!=-1) {
errMessage=i18n("<b>Bad passphrase</b>. Try again.</br>");
- required=QString::null;
+ required=TQString::null;
signSuccess=2; ///// bad passphrase
}
if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
@@ -948,7 +948,7 @@ void KgpgInterface::signover(KProcess *)
else {
KDetailedConsole *q=new KDetailedConsole(0,"sign_error",i18n("<qt>Signing key <b>%1</b> with key <b>%2</b> failed.<br>"
"Do you want to try signing the key in console mode?</qt>").arg(konsKeyID).arg(konsSignKey),output);
- if (q->exec()==QDialog::Accepted)
+ if (q->exec()==TQDialog::Accepted)
openSignConsole();
else
emit signatureFinished(0);
@@ -975,7 +975,7 @@ void KgpgInterface::openSignConsole()
//////////////////////////////////////////////////////////////////////////// delete signature
-void KgpgInterface::KgpgDelSignature(QString keyID,QString signKeyID)
+void KgpgInterface::KgpgDelSignature(TQString keyID,TQString signKeyID)
{
if (checkuid(keyID)>0) {
KMessageBox::sorry(0,i18n("This key has more than one user ID.\nEdit the key manually to delete signature."));
@@ -987,13 +987,13 @@ void KgpgInterface::KgpgDelSignature(QString keyID,QString signKeyID)
step=0;
FILE *fp;
- QString encResult;
+ TQString encResult;
char buffer[200];
signb=0;
sigsearch=0;
- QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-sigs "+keyID;
- fp = popen(QFile::encodeName(gpgcmd), "r");
+ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-sigs "+keyID;
+ fp = popen(TQFile::encodeName(gpgcmd), "r");
while ( fgets( buffer, sizeof(buffer), fp)) {
encResult=buffer;
if (encResult.startsWith("sig")) {
@@ -1004,11 +1004,11 @@ void KgpgInterface::KgpgDelSignature(QString keyID,QString signKeyID)
signb++;
}
pclose(fp);
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--utf8-strings"<<"--command-fd=0"<<"--status-fd=2";
*conprocess<<"--edit-key"<<keyID<<"uid 1"<<"delsig";
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(delsigprocess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(delsignover(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(delsigprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(delsignover(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
@@ -1016,7 +1016,7 @@ void KgpgInterface::KgpgDelSignature(QString keyID,QString signKeyID)
void KgpgInterface::delsigprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1)
{
if (required.find("keyedit.delsig")!=-1){
@@ -1027,11 +1027,11 @@ void KgpgInterface::delsigprocess(KProcIO *p)
} else
p->writeStdin("n");
sigsearch++;
- required=QString::null;
+ required=TQString::null;
}
if ((step==1) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin("save");
- required=QString::null;
+ required=TQString::null;
deleteSuccess=true;
}
if (required.find("GET_LINE")!=-1) {
@@ -1049,16 +1049,16 @@ void KgpgInterface::delsignover(KProcess *)
/////////////////////////////////////////////////// check if a key has more than one id
-int KgpgInterface::checkuid(QString KeyID)
+int KgpgInterface::checkuid(TQString KeyID)
{
FILE *fp;
- QString encResult;
+ TQString encResult;
char buffer[200];
int uidcnt=0;
- QString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-sigs "+KeyID;
+ TQString gpgcmd="gpg --no-tty --no-secmem-warning --with-colon --list-sigs "+KeyID;
////////// encode with untrusted keys or armor if checked by user
- fp = popen(QFile::encodeName(gpgcmd), "r");
+ fp = popen(TQFile::encodeName(gpgcmd), "r");
while (fgets(buffer, sizeof(buffer), fp)) {
encResult=buffer;
if (encResult.startsWith("uid"))
@@ -1072,27 +1072,27 @@ int KgpgInterface::checkuid(QString KeyID)
/////////////////////////////////////////////////////////////// change key expiration
-void KgpgInterface::KgpgKeyExpire(QString keyID,QDate date,bool unlimited)
+void KgpgInterface::KgpgKeyExpire(TQString keyID,TQDate date,bool unlimited)
{
expSuccess=0;
step=0;
if (unlimited)
expirationDelay=0;
else
- expirationDelay=QDate::currentDate().daysTo(date);
- output=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ expirationDelay=TQDate::currentDate().daysTo(date);
+ output=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"expire";
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(expprocess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(expover(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(expprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(expover(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,KProcess::AllOutput);
}
void KgpgInterface::expprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
@@ -1106,32 +1106,32 @@ void KgpgInterface::expprocess(KProcIO *p)
}
if (required.find("keygen.valid")!=-1) {
- p->writeStdin(QString::number(expirationDelay));
- required=QString::null;
+ p->writeStdin(TQString::number(expirationDelay));
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString signpass;
+ TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(signpass,true);
- required=QString::null;
+ required=TQString::null;
// step=2;
}
if ((step==2) && (required.find("keyedit.prompt")!=-1)) {
p->writeStdin("save");
p->closeWhenDone();
- required=QString::null;
+ required=TQString::null;
}
if ((step==2) && (required.find("keyedit.save.okay")!=-1)) {
p->writeStdin("YES");
p->closeWhenDone();
- required=QString::null;
+ required=TQString::null;
}
if (required.find("BAD_PASSPHRASE")!=-1) {
p->writeStdin("quit");
@@ -1157,7 +1157,7 @@ void KgpgInterface::expover(KProcess *)
else {
KDetailedConsole *q=new KDetailedConsole(0,"sign_error",i18n("<qt><b>Changing expiration failed.</b><br>"
"Do you want to try changing the key expiration in console mode?</qt>"),output);
- if (q->exec()==QDialog::Accepted)
+ if (q->exec()==TQDialog::Accepted)
KMessageBox::sorry(0,"work in progress...");
//openSignConsole();
else
@@ -1169,40 +1169,40 @@ void KgpgInterface::expover(KProcess *)
/////////////////////////////////////////////////////////////// change key trust
-void KgpgInterface::KgpgTrustExpire(QString keyID,int keyTrust)
+void KgpgInterface::KgpgTrustExpire(TQString keyID,int keyTrust)
{
trustValue=keyTrust+1;
/* Don't know=1; Do NOT trust=2; Marginally=3; Fully=4; Ultimately=5; */
- output=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ output=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"trust";
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(trustprocess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(trustover(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(trustprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(trustover(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
void KgpgInterface::trustprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.find("edit_ownertrust.set_ultimate.okay")!=-1) {
p->writeStdin("YES");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("edit_ownertrust.value")!=-1) {
- p->writeStdin(QString::number(trustValue));
- required=QString::null;
+ p->writeStdin(TQString::number(trustValue));
+ required=TQString::null;
}
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin("save");
p->closeWhenDone();
- required=QString::null;
+ required=TQString::null;
}
if (required.find("GET_")!=-1) /////// gpg asks for something unusal, turn to konsole mode
@@ -1226,23 +1226,23 @@ void KgpgInterface::trustover(KProcess *)
/////////////////////////////////////////////////////////////// change passphrase
-void KgpgInterface::KgpgChangePass(QString keyID)
+void KgpgInterface::KgpgChangePass(TQString keyID)
{
step=1;
- output=QString::null;
- message=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ output=TQString::null;
+ message=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<<"gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--no-use-agent"<<"--command-fd=0"<<"--status-fd=2"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"passwd";
- QObject::connect(conprocess,SIGNAL(readReady(KProcIO *)),this,SLOT(passprocess(KProcIO *)));
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(passover(KProcess *)));
+ TQObject::connect(conprocess,TQT_SIGNAL(readReady(KProcIO *)),this,TQT_SLOT(passprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(passover(KProcess *)));
conprocess->start(KProcess::NotifyOnExit,KProcess::AllOutput);
}
void KgpgInterface::passprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
@@ -1257,7 +1257,7 @@ void KgpgInterface::passprocess(KProcIO *p)
p->writeStdin("save");
}
else p->writeStdin("quit");
- required=QString::null;
+ required=TQString::null;
}
if ((required.find("GOOD_PASSPHRASE")!=-1) && (step==2))
@@ -1271,13 +1271,13 @@ void KgpgInterface::passprocess(KProcIO *p)
if ((required.find("passphrase.enter")!=-1)) {
if (userIDs.isEmpty())
userIDs=i18n("[No user id found]");
- userIDs.replace(QRegExp("<"),"&lt;");
+ userIDs.replace(TQRegExp("<"),"&lt;");
if (step==1) {
- QCString passphrase;
+ TQCString passphrase;
int code=KPasswordDialog::getPassword(passphrase,i18n("<qt>%1 Enter passphrase for <b>%2</b></qt>")
.arg(message).arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
p->writeStdin("quit");
// p->closeWhenDone();
emit processaborted(true);
@@ -1289,9 +1289,9 @@ void KgpgInterface::passprocess(KProcIO *p)
}
if (step==3) {
- QCString passphrase;
+ TQCString passphrase;
int code=KPasswordDialog::getNewPassword(passphrase,i18n("<qt>Enter new passphrase for <b>%1</b><br>If you forget this passphrase, all your encrypted files and messages will be lost !<br></qt>").arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
step=4;
p->writeStdin("quit");
p->writeStdin("quit");
@@ -1300,10 +1300,10 @@ void KgpgInterface::passprocess(KProcIO *p)
return;
}
p->writeStdin(passphrase,true);
- userIDs=QString::null;
+ userIDs=TQString::null;
}
- required=QString::null;
+ required=TQString::null;
}
@@ -1327,18 +1327,18 @@ void KgpgInterface::passover(KProcess *)
////////////////////////////////////////////////////////////// key export
-QString KgpgInterface::getKey(QStringList IDs, bool attributes)
+TQString KgpgInterface::getKey(TQStringList IDs, bool attributes)
{
- keyString=QString::null;
- KProcIO *proc=new KProcIO(QTextCodec::codecForLocale());
+ keyString=TQString::null;
+ KProcIO *proc=new KProcIO(TQTextCodec::codecForLocale());
*proc<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--utf8-strings";
*proc<<"--export"<<"--armor";
if (!attributes)
*proc<<"--export-options"<<"no-include-attributes";
- for ( QStringList::Iterator it = IDs.begin(); it != IDs.end(); ++it )
+ for ( TQStringList::Iterator it = IDs.begin(); it != IDs.end(); ++it )
*proc << *it;
- QObject::connect(proc, SIGNAL(readReady(KProcIO *)),this, SLOT(slotReadKey(KProcIO *)));
+ TQObject::connect(proc, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotReadKey(KProcIO *)));
proc->start(KProcess::Block,false);
return keyString;
}
@@ -1346,7 +1346,7 @@ QString KgpgInterface::getKey(QStringList IDs, bool attributes)
void KgpgInterface::slotReadKey(KProcIO *p)
{
- QString outp;
+ TQString outp;
while (p->readln(outp)!=-1)
if (!outp.startsWith("gpg:")) keyString+=outp+"\n";
}
@@ -1359,26 +1359,26 @@ void KgpgInterface::importKeyURL(KURL url)
///////////// import a key
if( KIO::NetAccess::download( url, tempKeyFile,0) ) {
- message=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ message=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--utf8-strings"<<"--import";
*conprocess<<"--allow-secret-key-import";
*conprocess<<tempKeyFile;
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(importURLover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(importprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(importURLover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(importprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
}
-void KgpgInterface::importKey(QString keystr)
+void KgpgInterface::importKey(TQString keystr)
{
///////////// import a key
- message=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ message=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--no-secmem-warning"<<"--status-fd=2"<<"--import";
*conprocess<<"--allow-secret-key-import";
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(importover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(importprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(importover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(importprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
conprocess->writeStdin(keystr, true);
conprocess->closeWhenDone();
@@ -1386,13 +1386,13 @@ void KgpgInterface::importKey(QString keystr)
void KgpgInterface::importover(KProcess *)
{
-QStringList importedKeysIds;
-QStringList messageList;
-QString resultMessage;
+TQStringList importedKeysIds;
+TQStringList messageList;
+TQString resultMessage;
bool secretImport=false;
kdDebug(2100)<<"Importing is over"<<endl;
- QString parsedOutput=message;
- QStringList importedKeys;
+ TQString parsedOutput=message;
+ TQStringList importedKeys;
while (parsedOutput.find("IMPORTED")!=-1) {
parsedOutput.remove(0,parsedOutput.find("IMPORTED")+8);
@@ -1403,7 +1403,7 @@ kdDebug(2100)<<"Importing is over"<<endl;
if (message.find("IMPORT_RES")!=-1) {
parsedOutput=message.section("IMPORT_RES",-1,-1).stripWhiteSpace();
- messageList=QStringList::split(" ",parsedOutput,true);
+ messageList=TQStringList::split(" ",parsedOutput,true);
resultMessage=i18n("<qt>%n key processed.<br></qt>","<qt>%n keys processed.<br></qt>",messageList[0].toULong());
if (messageList[4]!="0")
@@ -1458,7 +1458,7 @@ void KgpgInterface::importURLover(KProcess *p)
void KgpgInterface::importprocess(KProcIO *p)
{
- QString outp;
+ TQString outp;
while (p->readln(outp)!=-1) {
if (outp.find("http-proxy")==-1)
message+=outp+"\n";
@@ -1469,19 +1469,19 @@ void KgpgInterface::importprocess(KProcIO *p)
/////////////////////////////////////////////////////////////////////////////////////// User ID's
-void KgpgInterface::KgpgAddUid(QString keyID,QString name,QString email,QString comment)
+void KgpgInterface::KgpgAddUid(TQString keyID,TQString name,TQString email,TQString comment)
{
uidName=name;
uidComment=comment;
uidEmail=email;
-output=QString::null;
+output=TQString::null;
addSuccess=true;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"adduid";
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(adduidover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(adduidprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(adduidover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(adduidprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
@@ -1493,7 +1493,7 @@ else emit addUidError(output);
void KgpgInterface::adduidprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.find("USERID_HINT",0,false)!=-1)
@@ -1501,37 +1501,37 @@ void KgpgInterface::adduidprocess(KProcIO *p)
if (required.find("keygen.name")!=-1) {
p->writeStdin(uidName);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("keygen.email")!=-1) {
p->writeStdin(uidEmail);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("keygen.comment")!=-1) {
p->writeStdin(uidComment);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString delpass;
+ TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>")
.arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
//addSuccess=false;
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(delpass,true);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin("save");
- required=QString::null;
+ required=TQString::null;
}
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
@@ -1554,24 +1554,24 @@ void KgpgInterface::adduidprocess(KProcIO *p)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// photo id's
-void KgpgInterface::KgpgGetPhotoList(QString keyID)
+void KgpgInterface::KgpgGetPhotoList(TQString keyID)
{
photoList.clear();
-output=QString::null;
+output=TQString::null;
photoCount=1;
userIDs=keyID;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0";
*conprocess<<"--with-colon"<<"--list-keys"<<keyID;
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(photoreadover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(photoreadprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(photoreadover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(photoreadprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
void KgpgInterface::photoreadprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.startsWith("uat") || required.startsWith("uid")) photoCount++;
@@ -1582,7 +1582,7 @@ void KgpgInterface::photoreadprocess(KProcIO *p)
void KgpgInterface::photoreadover(KProcess *)
{
for (int i=1;i<photoCount+1;i++)
-if (isPhotoId(i)) photoList+=QString::number(i);
+if (isPhotoId(i)) photoList+=TQString::number(i);
emit signalPhotoList(photoList);
}
@@ -1591,11 +1591,11 @@ bool KgpgInterface::isPhotoId(int uid)
{
KTempFile *kgpginfotmp=new KTempFile();
kgpginfotmp->setAutoDelete(true);
- QString pgpgOutput="cp %i "+kgpginfotmp->name();
+ TQString pgpgOutput="cp %i "+kgpginfotmp->name();
-KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
- *conprocess<<"--photo-viewer"<<QFile::encodeName(pgpgOutput)<<"--edit-key"<<userIDs<<"uid"<<QString::number(uid)<<"showphoto";
+ *conprocess<<"--photo-viewer"<<TQFile::encodeName(pgpgOutput)<<"--edit-key"<<userIDs<<"uid"<<TQString::number(uid)<<"showphoto";
conprocess->start(KProcess::Block);
if (kgpginfotmp->file()->size()>0)
{
@@ -1606,15 +1606,15 @@ KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
return false;
}
-void KgpgInterface::KgpgDeletePhoto(QString keyID,QString uid)
+void KgpgInterface::KgpgDeletePhoto(TQString keyID,TQString uid)
{
delSuccess=true;
- output=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ output=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"uid"<<uid<<"deluid";
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(delphotoover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(delphotoprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(delphotoover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(delphotoprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
@@ -1626,7 +1626,7 @@ else emit delPhotoError(output);
void KgpgInterface::delphotoprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.find("USERID_HINT",0,false)!=-1)
@@ -1634,26 +1634,26 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
if (required.find("keyedit.remove.uid.okay")!=-1) {
p->writeStdin("YES");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString delpass;
+ TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
//deleteSuccess=false;
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(delpass,true);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin("save");
- required=QString::null;
+ required=TQString::null;
}
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
@@ -1668,16 +1668,16 @@ void KgpgInterface::delphotoprocess(KProcIO *p)
}
-void KgpgInterface::KgpgAddPhoto(QString keyID,QString imagePath)
+void KgpgInterface::KgpgAddPhoto(TQString keyID,TQString imagePath)
{
photoUrl=imagePath;
-output=QString::null;
+output=TQString::null;
addSuccess=true;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--command-fd=0"<<"--utf8-strings";
*conprocess<<"--edit-key"<<keyID<<"addphoto";
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(addphotoover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(addphotoprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(addphotoover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(addphotoprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
@@ -1689,7 +1689,7 @@ else emit addPhotoError(output);
void KgpgInterface::addphotoprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
if (required.find("USERID_HINT",0,false)!=-1)
@@ -1697,11 +1697,11 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
if (required.find("photoid.jpeg.add")!=-1) {
p->writeStdin(photoUrl);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("photoid.jpeg.size")!=-1) {
- if (KMessageBox::questionYesNo(0,i18n("This image is very large. Use it anyway?"), QString::null, i18n("Use Anyway"), i18n("Do Not Use"))==KMessageBox::Yes)
+ if (KMessageBox::questionYesNo(0,i18n("This image is very large. Use it anyway?"), TQString::null, i18n("Use Anyway"), i18n("Do Not Use"))==KMessageBox::Yes)
p->writeStdin("Yes");
else
{
@@ -1709,26 +1709,26 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
p->writeStdin("");
p->writeStdin("quit");
}
- required=QString::null;
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString delpass;
+ TQCString delpass;
int code=KPasswordDialog::getPassword(delpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
//deleteSuccess=false;
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(delpass,true);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("keyedit.prompt")!=-1) {
p->writeStdin("save");
- required=QString::null;
+ required=TQString::null;
}
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
@@ -1745,20 +1745,20 @@ void KgpgInterface::addphotoprocess(KProcIO *p)
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// key revocation
-void KgpgInterface::KgpgRevokeKey(QString keyID,QString revokeUrl,int reason,QString description)
+void KgpgInterface::KgpgRevokeKey(TQString keyID,TQString revokeUrl,int reason,TQString description)
{
revokeReason=reason;
revokeSuccess=false;
revokeDescription=description;
certificateUrl=revokeUrl;
- output=QString::null;
- KProcIO *conprocess=new KProcIO(QTextCodec::codecForLocale());
+ output=TQString::null;
+ KProcIO *conprocess=new KProcIO(TQTextCodec::codecForLocale());
*conprocess<< "gpg"<<"--no-tty"<<"--status-fd=2"<<"--logger-fd=2"<<"--command-fd=0"<<"--utf8-strings";
if (!revokeUrl.isEmpty())
*conprocess<<"-o"<<revokeUrl;
*conprocess<<"--gen-revoke"<<keyID;
- QObject::connect(conprocess, SIGNAL(processExited(KProcess *)),this, SLOT(revokeover(KProcess *)));
- QObject::connect(conprocess, SIGNAL(readReady(KProcIO *)),this, SLOT(revokeprocess(KProcIO *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(revokeover(KProcess *)));
+ TQObject::connect(conprocess, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(revokeprocess(KProcIO *)));
conprocess->start(KProcess::NotifyOnExit,true);
}
@@ -1778,7 +1778,7 @@ void KgpgInterface::revokeover(KProcess *)
void KgpgInterface::revokeprocess(KProcIO *p)
{
- QString required=QString::null;
+ TQString required=TQString::null;
while (p->readln(required,true)!=-1) {
output+=required+"\n";
@@ -1790,32 +1790,32 @@ void KgpgInterface::revokeprocess(KProcIO *p)
if ((required.find("gen_revoke.okay")!=-1) || (required.find("ask_revocation_reason.okay")!=-1) || (required.find("openfile.overwrite.okay")!=-1)) {
p->writeStdin("YES");
- required=QString::null;
+ required=TQString::null;
}
if (required.find("ask_revocation_reason.code")!=-1) {
- p->writeStdin(QString::number(revokeReason));
- required=QString::null;
+ p->writeStdin(TQString::number(revokeReason));
+ required=TQString::null;
}
if (required.find("passphrase.enter")!=-1) {
- QCString signpass;
+ TQCString signpass;
int code=KPasswordDialog::getPassword(signpass,i18n("<qt>Enter passphrase for <b>%1</b>:</qt>").arg(userIDs));
- if (code!=QDialog::Accepted) {
+ if (code!=TQDialog::Accepted) {
expSuccess=3; ///// aborted by user mode
p->writeStdin("quit");
p->closeWhenDone();
return;
}
p->writeStdin(signpass,true);
- required=QString::null;
+ required=TQString::null;
}
if (required.find("ask_revocation_reason.text")!=-1) {
// kdDebug(2100)<<"description"<<endl;
p->writeStdin(revokeDescription);
- revokeDescription=QString::null;
- required=QString::null;
+ revokeDescription=TQString::null;
+ required=TQString::null;
}
if ((required.find("GET_")!=-1)) /////// gpg asks for something unusal, turn to konsole mode
{
@@ -1831,13 +1831,13 @@ void KgpgInterface::revokeprocess(KProcIO *p)
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// parsing of ./gnupg/options file
-QString KgpgInterface::getGpgSetting(QString name,QString configFile)
+TQString KgpgInterface::getGpgSetting(TQString name,TQString configFile)
{
name=name.stripWhiteSpace()+" ";
- QFile qfile(QFile::encodeName(configFile));
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith(name)) {
@@ -1850,26 +1850,26 @@ QString KgpgInterface::getGpgSetting(QString name,QString configFile)
}
qfile.close();
}
- return QString::null;
+ return TQString::null;
}
-QString KgpgInterface::getGpgMultiSetting(QString name,QString configFile)
+TQString KgpgInterface::getGpgMultiSetting(TQString name,TQString configFile)
{
// get GnuPG setting for item that can have multiple entries (eg. encrypt-to)
-QString parsedResult=QString::null;
+TQString parsedResult=TQString::null;
name=name.stripWhiteSpace()+" ";
- QFile qfile(QFile::encodeName(configFile));
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith(name)) {
result=result.stripWhiteSpace();
result.remove(0,name.length());
- if (parsedResult!=QString::null)
+ if (parsedResult!=TQString::null)
parsedResult+=" "+result.stripWhiteSpace();
else
parsedResult+=result.stripWhiteSpace();
@@ -1882,53 +1882,53 @@ QString parsedResult=QString::null;
return parsedResult;
}
-void KgpgInterface::delGpgGroup(QString name, QString configFile)
+void KgpgInterface::delGpgGroup(TQString name, TQString configFile)
{
- QString textToWrite;
- QFile qfile(QFile::encodeName(configFile));
+ TQString textToWrite;
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith("group ")) {
- QString result2=result.stripWhiteSpace();
+ TQString result2=result.stripWhiteSpace();
result2.remove(0,6);
result2=result2.stripWhiteSpace();
if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("=")))
- result=QString::null;
+ result=TQString::null;
}
- if (result!=QString::null) textToWrite+=result+"\n";
+ if (result!=TQString::null) textToWrite+=result+"\n";
result=t.readLine();
}
qfile.close();
if (qfile.open(IO_WriteOnly)) {
- QTextStream t( &qfile);
+ TQTextStream t( &qfile);
t << textToWrite;
qfile.close();
}
}
}
-void KgpgInterface::setGpgGroupSetting(QString name,QStringList values, QString configFile)
+void KgpgInterface::setGpgGroupSetting(TQString name,TQStringList values, TQString configFile)
{
- QString textToWrite;
+ TQString textToWrite;
bool found=false;
- QFile qfile(QFile::encodeName(configFile));
+ TQFile qfile(TQFile::encodeName(configFile));
kdDebug(2100)<<"Changing group: "<<name<<endl;
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith("group ")) {
- QString result2=result.stripWhiteSpace();
+ TQString result2=result.stripWhiteSpace();
result2.remove(0,6);
result2=result2.stripWhiteSpace();
if (result2.startsWith(name) && (result2.remove(0,name.length()).stripWhiteSpace().startsWith("="))) {
// kdDebug(2100)<<"Found group: "<<name<<endl;
//kdDebug(2100)<<"New values: "<<values<<endl;
- result=QString("group %1=%2").arg(name).arg(values.join(" "));
+ result=TQString("group %1=%2").arg(name).arg(values.join(" "));
found=true;
}
}
@@ -1937,10 +1937,10 @@ void KgpgInterface::setGpgGroupSetting(QString name,QStringList values, QString
}
qfile.close();
if (!found)
- textToWrite+="\n"+QString("group %1=%2").arg(name).arg(values.join(" "));
+ textToWrite+="\n"+TQString("group %1=%2").arg(name).arg(values.join(" "));
if (qfile.open(IO_WriteOnly)) {
- QTextStream t( &qfile);
+ TQTextStream t( &qfile);
t << textToWrite;
qfile.close();
}
@@ -1949,13 +1949,13 @@ void KgpgInterface::setGpgGroupSetting(QString name,QStringList values, QString
-QStringList KgpgInterface::getGpgGroupSetting(QString name,QString configFile)
+TQStringList KgpgInterface::getGpgGroupSetting(TQString name,TQString configFile)
{
- QFile qfile(QFile::encodeName(configFile));
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
result=result.stripWhiteSpace();
@@ -1966,23 +1966,23 @@ QStringList KgpgInterface::getGpgGroupSetting(QString name,QString configFile)
kdDebug(2100)<<"Found group: "<<name<<endl;
result=result.section('=',1);
result=result.section('#',0,0);
- return QStringList::split (" ",result);
+ return TQStringList::split (" ",result);
}
}
result=t.readLine();
}
qfile.close();
}
- return QString::null;
+ return TQString::null;
}
-QStringList KgpgInterface::getGpgGroupNames(QString configFile)
+TQStringList KgpgInterface::getGpgGroupNames(TQString configFile)
{
- QStringList groups;
- QFile qfile(QFile::encodeName(configFile));
+ TQStringList groups;
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
result=result.stripWhiteSpace();
@@ -1998,13 +1998,13 @@ QStringList KgpgInterface::getGpgGroupNames(QString configFile)
}
-bool KgpgInterface::getGpgBoolSetting(QString name,QString configFile)
+bool KgpgInterface::getGpgBoolSetting(TQString name,TQString configFile)
{
name=name;
- QFile qfile(QFile::encodeName(configFile));
+ TQFile qfile(TQFile::encodeName(configFile));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith(name)) {
@@ -2017,26 +2017,26 @@ bool KgpgInterface::getGpgBoolSetting(QString name,QString configFile)
return false;
}
-void KgpgInterface::setGpgSetting(QString name,QString value,QString url)
+void KgpgInterface::setGpgSetting(TQString name,TQString value,TQString url)
{
name=name+" ";
- QString textToWrite;
+ TQString textToWrite;
bool found=false;
- QFile qfile(QFile::encodeName(url));
+ TQFile qfile(TQFile::encodeName(url));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith(name)) {
if (!value.isEmpty())
result=name+" "+value;
else
- result=QString::null;
+ result=TQString::null;
found=true;
}
- if (result!=QString::null) textToWrite+=result+"\n";
+ if (result!=TQString::null) textToWrite+=result+"\n";
result=t.readLine();
}
qfile.close();
@@ -2044,7 +2044,7 @@ void KgpgInterface::setGpgSetting(QString name,QString value,QString url)
textToWrite+="\n"+name+" "+value;
if (qfile.open(IO_WriteOnly)) {
- QTextStream t( &qfile);
+ TQTextStream t( &qfile);
t << textToWrite;
qfile.close();
}
@@ -2052,16 +2052,16 @@ void KgpgInterface::setGpgSetting(QString name,QString value,QString url)
}
-void KgpgInterface::setGpgMultiSetting(QString name,QStringList values,QString url)
+void KgpgInterface::setGpgMultiSetting(TQString name,TQStringList values,TQString url)
{
name=name+" ";
- QString textToWrite;
+ TQString textToWrite;
bool found=false;
- QFile qfile(QFile::encodeName(url));
+ TQFile qfile(TQFile::encodeName(url));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (!result.stripWhiteSpace().startsWith(name))
@@ -2077,32 +2077,32 @@ void KgpgInterface::setGpgMultiSetting(QString name,QStringList values,QString u
}
if (qfile.open(IO_WriteOnly)) {
- QTextStream t( &qfile);
+ TQTextStream t( &qfile);
t << textToWrite;
qfile.close();
}
}
}
-void KgpgInterface::setGpgBoolSetting(QString name,bool enable,QString url)
+void KgpgInterface::setGpgBoolSetting(TQString name,bool enable,TQString url)
{
- QString textToWrite;
+ TQString textToWrite;
bool found=false;
- QFile qfile(QFile::encodeName(url));
+ TQFile qfile(TQFile::encodeName(url));
if (qfile.open(IO_ReadOnly) && (qfile.exists())) {
- QString result;
- QTextStream t( &qfile );
+ TQString result;
+ TQTextStream t( &qfile );
result=t.readLine();
while (result!=NULL) {
if (result.stripWhiteSpace().startsWith(name)) {
if (enable)
result=name;
else
- result=QString::null;
+ result=TQString::null;
found=true;
}
- if (result!=QString::null) textToWrite+=result+"\n";
+ if (result!=TQString::null) textToWrite+=result+"\n";
result=t.readLine();
}
qfile.close();
@@ -2110,26 +2110,26 @@ void KgpgInterface::setGpgBoolSetting(QString name,bool enable,QString url)
textToWrite+=name;
if (qfile.open(IO_WriteOnly)) {
- QTextStream t( &qfile);
+ TQTextStream t( &qfile);
t << textToWrite;
qfile.close();
}
}
}
-QString KgpgInterface::checkForUtf8bis(QString txt)
+TQString KgpgInterface::checkForUtf8bis(TQString txt)
{
if (strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1))
txt=checkForUtf8(txt);
else {
txt=checkForUtf8(txt);
- txt=QString::fromUtf8(txt.ascii());
+ txt=TQString::fromUtf8(txt.ascii());
}
return txt;
}
-QString KgpgInterface::checkForUtf8(QString txt)
+TQString KgpgInterface::checkForUtf8(TQString txt)
{
// code borrowed from gpa
const char *s;
@@ -2137,7 +2137,7 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* Make sure the encoding is UTF-8.
* Test structure suggested by Werner Koch */
if (txt.isEmpty())
- return QString::null;
+ return TQString::null;
for (s = txt.ascii(); *s && !(*s & 0x80); s++)
;
@@ -2147,17 +2147,17 @@ QString KgpgInterface::checkForUtf8(QString txt)
/* The string is not in UTF-8 */
//if (strchr (txt.ascii(), 0xc3)) return (txt+" +++");
if (txt.find("\\x")==-1)
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
// if (!strchr (txt.ascii(), 0xc3) || (txt.find("\\x")!=-1)) {
for ( int idx = 0 ; (idx = txt.find( "\\x", idx )) >= 0 ; ++idx ) {
char str[2] = "x";
- str[0] = (char) QString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
+ str[0] = (char) TQString( txt.mid( idx + 2, 2 ) ).toShort( 0, 16 );
txt.replace( idx, 4, str );
}
if (!strchr (txt.ascii(), 0xc3))
- return QString::fromUtf8(txt.ascii());
+ return TQString::fromUtf8(txt.ascii());
else
- return QString::fromUtf8(QString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
+ return TQString::fromUtf8(TQString::fromUtf8(txt.ascii()).ascii()); // perform Utf8 twice, or some keys display badly
return txt;
}
diff --git a/kgpg/kgpginterface.h b/kgpg/kgpginterface.h
index 4fb21b2..e9b9452 100644
--- a/kgpg/kgpginterface.h
+++ b/kgpg/kgpginterface.h
@@ -19,10 +19,10 @@
#define KGPGINTERFACE_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kdialogbase.h>
#include <kurl.h>
-#include <qdatetime.h>
+#include <tqdatetime.h>
class QLabel;
class KProcIO;
@@ -58,7 +58,7 @@ public slots:
* @param Options String with the wanted gpg options. ex: "--armor"
* @param symetrical bool whether the encryption should be symmetrical.
*/
- void KgpgEncryptFile(QStringList encryptKeys,KURL srcUrl,KURL destUrl,QStringList Options=QString::null,bool symetrical=false);
+ void KgpgEncryptFile(TQStringList encryptKeys,KURL srcUrl,KURL destUrl,TQStringList Options=TQString::null,bool symetrical=false);
/**Encrypt file function
* @param userIDs the key user identification.
@@ -66,14 +66,14 @@ public slots:
* @param destUrl Kurl for the decrypted file.
* @param chances int number of trials left for decryption (used only as an info displayed in the password dialog)
*/
- void KgpgDecryptFile(KURL srcUrl,KURL destUrl,QStringList Options=QStringList());
+ void KgpgDecryptFile(KURL srcUrl,KURL destUrl,TQStringList Options=TQStringList());
/**Sign file function
- * @param keyID QString the signing key ID.
+ * @param keyID TQString the signing key ID.
* @param srcUrl Kurl of the file to sign.
* @param Options String with the wanted gpg options. ex: "--armor"
*/
- void KgpgSignFile(QString keyID,KURL srcUrl,QStringList Options=QStringList());
+ void KgpgSignFile(TQString keyID,KURL srcUrl,TQStringList Options=TQStringList());
/**Verify file function
* @param sigUrl Kurl of the signature file.
@@ -81,7 +81,7 @@ public slots:
*/
void KgpgVerifyFile(KURL sigUrl,KURL srcUrl=KURL()) ;
- void KgpgVerifyText(QString text);
+ void KgpgVerifyText(TQString text);
void slotverifyread(KProcIO *p);
void slotverifyresult(KProcess*);
@@ -91,77 +91,77 @@ public slots:
*/
void importKeyURL(KURL url);
/**Import key function
- * @param keystr QString containing th key. Allows public & secret key import.
+ * @param keystr TQString containing th key. Allows public & secret key import.
*/
- void importKey(QString keystr);
+ void importKey(TQString keystr);
/**Key signature function
- * @param keyID QString the ID of the key to be signed
- * @param signKeyID QString the ID of the signing key
- * @param signKeyMail QString the name of the signing key (only used to prompt user for passphrase)
+ * @param keyID TQString the ID of the key to be signed
+ * @param signKeyID TQString the ID of the signing key
+ * @param signKeyMail TQString the name of the signing key (only used to prompt user for passphrase)
* @param local bool should the signature be local
*/
- void KgpgSignKey(QString keyID,QString signKeyID,QString signKeyMail=QString::null,bool local=false,int checking=0);
+ void KgpgSignKey(TQString keyID,TQString signKeyID,TQString signKeyMail=TQString::null,bool local=false,int checking=0);
/**Key signature deletion function
- * @param keyID QString the ID of the key
- * @param signKeyID QString the ID of the signature key
+ * @param keyID TQString the ID of the key
+ * @param signKeyID TQString the ID of the signature key
*/
- void KgpgDelSignature(QString keyID,QString signKeyID);
+ void KgpgDelSignature(TQString keyID,TQString signKeyID);
/**Encrypt text function
- * @param text QString text to be encrypted.
+ * @param text TQString text to be encrypted.
* @param userIDs the recipients key id's.
* @param Options String with the wanted gpg options. ex: "--armor"
* returns the encrypted text or empty string if encyption failed
*/
- void KgpgEncryptText(QString text,QStringList userIDs, QStringList Options=QString::null);
+ void KgpgEncryptText(TQString text,TQStringList userIDs, TQStringList Options=TQString::null);
/**Decrypt text function
- * @param text QString text to be decrypted.
- * @param userID QString the name of the decryption key (only used to prompt user for passphrase)
+ * @param text TQString text to be decrypted.
+ * @param userID TQString the name of the decryption key (only used to prompt user for passphrase)
*/
- //static QString KgpgDecryptText(QString text,QString userID);
- void KgpgDecryptText(QString text,QStringList Options=QString::null);
+ //static TQString KgpgDecryptText(TQString text,TQString userID);
+ void KgpgDecryptText(TQString text,TQStringList Options=TQString::null);
void txtdecryptfin(KProcess *);
/**Extract list of photographic user id's
* @param keyID the recipients key id's.
*/
- void KgpgGetPhotoList(QString keyID);
+ void KgpgGetPhotoList(TQString keyID);
void getOutput(KProcess *, char *data, int );
void getCmdOutput(KProcess *p, char *data, int );
- QString getKey(QStringList IDs, bool attributes);
+ TQString getKey(TQStringList IDs, bool attributes);
- void KgpgKeyExpire(QString keyID,QDate date,bool unlimited);
- void KgpgTrustExpire(QString keyID,int keyTrust);
- void KgpgChangePass(QString keyID);
+ void KgpgKeyExpire(TQString keyID,TQDate date,bool unlimited);
+ void KgpgTrustExpire(TQString keyID,int keyTrust);
+ void KgpgChangePass(TQString keyID);
- void KgpgRevokeKey(QString keyID,QString revokeUrl,int reason,QString description);
+ void KgpgRevokeKey(TQString keyID,TQString revokeUrl,int reason,TQString description);
void revokeover(KProcess *);
void revokeprocess(KProcIO *p);
- void KgpgDeletePhoto(QString keyID,QString uid);
- void KgpgAddPhoto(QString keyID,QString imagePath);
+ void KgpgDeletePhoto(TQString keyID,TQString uid);
+ void KgpgAddPhoto(TQString keyID,TQString imagePath);
- void KgpgAddUid(QString keyID,QString name,QString email,QString comment);
+ void KgpgAddUid(TQString keyID,TQString name,TQString email,TQString comment);
- void KgpgDecryptFileToText(KURL srcUrl,QStringList Options);
- void KgpgSignText(QString text,QString userIDs, QStringList Options);
-
- static QString getGpgSetting(QString name,QString configFile);
- static QString getGpgMultiSetting(QString name,QString configFile);
- static void setGpgSetting(QString name,QString ID,QString url);
- static void setGpgMultiSetting(QString name,QStringList values,QString url);
- static bool getGpgBoolSetting(QString name,QString configFile);
- static void setGpgBoolSetting(QString name,bool enable,QString url);
- static QStringList getGpgGroupNames(QString configFile);
- static QStringList getGpgGroupSetting(QString name,QString configFile);
- static void setGpgGroupSetting(QString name,QStringList values, QString configFile);
- static void delGpgGroup(QString name, QString configFile);
- static QString checkForUtf8(QString txt);
- static QString checkForUtf8bis(QString txt);
+ void KgpgDecryptFileToText(KURL srcUrl,TQStringList Options);
+ void KgpgSignText(TQString text,TQString userIDs, TQStringList Options);
+
+ static TQString getGpgSetting(TQString name,TQString configFile);
+ static TQString getGpgMultiSetting(TQString name,TQString configFile);
+ static void setGpgSetting(TQString name,TQString ID,TQString url);
+ static void setGpgMultiSetting(TQString name,TQStringList values,TQString url);
+ static bool getGpgBoolSetting(TQString name,TQString configFile);
+ static void setGpgBoolSetting(TQString name,bool enable,TQString url);
+ static TQStringList getGpgGroupNames(TQString configFile);
+ static TQStringList getGpgGroupSetting(TQString name,TQString configFile);
+ static void setGpgGroupSetting(TQString name,TQStringList values, TQString configFile);
+ static void delGpgGroup(TQString name, TQString configFile);
+ static TQString checkForUtf8(TQString txt);
+ static TQString checkForUtf8bis(TQString txt);
static int getGpgVersion();
@@ -196,7 +196,7 @@ private slots:
/**
* Checks the number of uid's for a key-> if greater than one, key signature will switch to konsole mode
*/
- int checkuid(QString KeyID);
+ int checkuid(TQString KeyID);
/**
* Reads output of the delete signature process
@@ -259,7 +259,7 @@ private slots:
void photoreadover(KProcess *);
void photoreadprocess(KProcIO *p);
bool isPhotoId(int uid);
- void updateIDs(QString txtString);
+ void updateIDs(TQString txtString);
void txtsignprocess(KProcIO *p);
void txtsignfin(KProcess *);
@@ -269,13 +269,13 @@ private slots:
signals:
- void missingSignature(QString);
- void verifyOver(QString,QString);
+ void missingSignature(TQString);
+ void verifyOver(TQString,TQString);
/**
* emitted when a txt decryption failed. returns log output
*/
- void txtdecryptionfailed(QString);
+ void txtdecryptionfailed(TQString);
/**
* emitted when a txt encryption starts.
*/
@@ -284,15 +284,15 @@ signals:
/**
* emitted when a txt decryption finished. returns decrypted text
*/
- void txtdecryptionfinished(QString);
+ void txtdecryptionfinished(TQString);
/**
* emitted when a txt encryption finished. returns encrypted text
*/
- void txtencryptionfinished(QString);
+ void txtencryptionfinished(TQString);
/**
* emitted when an error occurred
*/
- void errormessage(QString);
+ void errormessage(TQString);
/**
* true if encryption successful, false on error.
*/
@@ -313,7 +313,7 @@ signals:
/**
* emitted when the process starts
*/
- void processstarted(QString);
+ void processstarted(TQString);
/**
* true if decryption successful, false on error.
*/
@@ -325,7 +325,7 @@ signals:
/**
* true if import successful, false on error.
*/
- void importfinished(QStringList);
+ void importfinished(TQStringList);
/**
* true if verify successful, false on error.
*/
@@ -333,51 +333,51 @@ signals:
/**
* emmitted if signature key is missing & user want to import it from keyserver
*/
- void verifyquerykey(QString ID);
+ void verifyquerykey(TQString ID);
/**
* true if signature successful, false on error.
*/
void signfinished();
void delPhotoFinished();
- void delPhotoError(QString);
+ void delPhotoError(TQString);
void addPhotoFinished();
- void addPhotoError(QString);
+ void addPhotoError(TQString);
void refreshOrphaned();
void addUidFinished();
- void addUidError(QString);
+ void addUidError(TQString);
void trustfinished();
- void revokecertificate(QString);
- void revokeurl(QString);
+ void revokecertificate(TQString);
+ void revokeurl(TQString);
void expirationFinished(int);
- void signalPhotoList(QStringList);
+ void signalPhotoList(TQStringList);
void passwordChanged();
- void txtSignOver(QString);
+ void txtSignOver(TQString);
private:
/**
* @internal structure for communication
*/
- QString message,tempKeyFile,userIDs,output,keyString,txtToEncrypt,log;
- QCString passphrase;
+ TQString message,tempKeyFile,userIDs,output,keyString,txtToEncrypt,log;
+ TQCString passphrase;
bool deleteSuccess,konsLocal,anonymous,decfinished,decok,badmdc,revokeSuccess,addSuccess,delSuccess;
bool signmiss;
- QString signID;
+ TQString signID;
int signSuccess,expSuccess,trustValue,konsChecked;
int step,signb,sigsearch,expirationDelay;
- QString konsSignKey, konsKeyID,errMessage;
+ TQString konsSignKey, konsKeyID,errMessage;
int revokeReason,photoCount;
- QString revokeDescription,certificateUrl,photoUrl;
- QStringList photoList;
- QString uidName, uidEmail, uidComment;
+ TQString revokeDescription,certificateUrl,photoUrl;
+ TQStringList photoList;
+ TQString uidName, uidEmail, uidComment;
KURL sourceFile;
- QString decryptUrl;
+ TQString decryptUrl;
- QString gpgOutput;
+ TQString gpgOutput;
/**
* @internal structure for the file information
@@ -390,14 +390,14 @@ class Md5Widget :public KDialogBase
{
Q_OBJECT
public:
- Md5Widget(QWidget *parent=0, const char *name=0,KURL url=KURL());
+ Md5Widget(TQWidget *parent=0, const char *name=0,KURL url=KURL());
~Md5Widget();
public slots:
void slotApply();
private:
- QString mdSum;
+ TQString mdSum;
KLed *KLed1;
- QLabel *TextLabel1_2;
+ TQLabel *TextLabel1_2;
};
#endif // KGPGINTERFACE_HKGPGINTERFACE_H
diff --git a/kgpg/kgpglibrary.cpp b/kgpg/kgpglibrary.cpp
index 55455f9..419eca0 100644
--- a/kgpg/kgpglibrary.cpp
+++ b/kgpg/kgpglibrary.cpp
@@ -15,15 +15,15 @@
* *
***************************************************************************/
-#include <qhbox.h>
-#include <qvbox.h>
+#include <tqhbox.h>
+#include <tqvbox.h>
#include <klocale.h>
#include <kapplication.h>
#include <kconfig.h>
#include <kmessagebox.h>
#include <krun.h>
-#include <qfile.h>
+#include <tqfile.h>
#include <kpassivepopup.h>
#include <kiconloader.h>
#include "kgpglibrary.h"
@@ -31,7 +31,7 @@
#include "kgpginterface.h"
#include <kio/renamedlg.h>
-KgpgLibrary::KgpgLibrary(QWidget *parent, bool pgpExtension)
+KgpgLibrary::KgpgLibrary(TQWidget *parent, bool pgpExtension)
{
if (pgpExtension)
extension=".pgp";
@@ -45,16 +45,16 @@ KgpgLibrary::~KgpgLibrary()
{}
-void KgpgLibrary::slotFileEnc(KURL::List urls,QStringList opts,QStringList defaultKey,KShortcut goDefaultKey)
+void KgpgLibrary::slotFileEnc(KURL::List urls,TQStringList opts,TQStringList defaultKey,KShortcut goDefaultKey)
{
///////////////////////////////////////////////////////////////////////// encode file file
if (!urls.empty()) {
urlselecteds=urls;
if (defaultKey.isEmpty()) {
- QString fileNames=urls.first().fileName();
+ TQString fileNames=urls.first().fileName();
if (urls.count()>1) fileNames+=",...";
popupPublic *dialogue=new popupPublic(0,"Public keys",fileNames,true,goDefaultKey);
- connect(dialogue,SIGNAL(selectedKey(QStringList,QStringList,bool,bool)),this,SLOT(startencode(QStringList,QStringList,bool,bool)));
+ connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(startencode(TQStringList,TQStringList,bool,bool)));
dialogue->exec();
delete dialogue;
} else
@@ -62,7 +62,7 @@ void KgpgLibrary::slotFileEnc(KURL::List urls,QStringList opts,QStringList defau
}
}
-void KgpgLibrary::startencode(QStringList encryptKeys,QStringList encryptOptions,bool shred,bool symetric)
+void KgpgLibrary::startencode(TQStringList encryptKeys,TQStringList encryptOptions,bool shred,bool symetric)
{
popIsActive=false;
//KURL::List::iterator it;
@@ -75,7 +75,7 @@ void KgpgLibrary::startencode(QStringList encryptKeys,QStringList encryptOptions
}
-void KgpgLibrary::fastencode(KURL &fileToCrypt,QStringList selec,QStringList encryptOptions,bool symetric)
+void KgpgLibrary::fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList encryptOptions,bool symetric)
{
////////////////// encode from file
if ((selec.isEmpty()) && (!symetric)) {
@@ -89,14 +89,14 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,QStringList selec,QStringList enc
else
dest.setPath(urlselected.path()+extension);
- QFile fgpg(dest.path());
+ TQFile fgpg(dest.path());
if (fgpg.exists()) {
- KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),QString::null,dest.path(),KIO::M_OVERWRITE);
- if (over->exec()==QDialog::Rejected)
+ KIO::RenameDlg *over=new KIO::RenameDlg(0,i18n("File Already Exists"),TQString::null,dest.path(),KIO::M_OVERWRITE);
+ if (over->exec()==TQDialog::Rejected)
{
delete over;
- emit systemMessage(QString::null,true);
+ emit systemMessage(TQString::null,true);
return;
}
dest=over->newDestURL();
@@ -111,20 +111,20 @@ void KgpgLibrary::fastencode(KURL &fileToCrypt,QStringList selec,QStringList enc
cryptFileProcess->KgpgEncryptFile(selec,urlselected,dest,encryptOptions,symetric);
if (!popIsActive)
{
- //connect(cryptFileProcess,SIGNAL(processstarted(QString)),this,SLOT(processpopup2(QString)));
+ //connect(cryptFileProcess,TQT_SIGNAL(processstarted(TQString)),this,TQT_SLOT(processpopup2(TQString)));
popIsActive=true;
}
- connect(cryptFileProcess,SIGNAL(encryptionfinished(KURL)),this,SLOT(processenc(KURL)));
- connect(cryptFileProcess,SIGNAL(errormessage(QString)),this,SLOT(processencerror(QString)));
+ connect(cryptFileProcess,TQT_SIGNAL(encryptionfinished(KURL)),this,TQT_SLOT(processenc(KURL)));
+ connect(cryptFileProcess,TQT_SIGNAL(errormessage(TQString)),this,TQT_SLOT(processencerror(TQString)));
}
-void KgpgLibrary::processpopup2(QString fileName)
+void KgpgLibrary::processpopup2(TQString fileName)
{
//pop->setTimeout(0);
pop->setView(i18n("Processing encryption (%1)").arg(fileName),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));
pop->show();
- /*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);*/
@@ -134,7 +134,7 @@ void KgpgLibrary::processpopup2(QString fileName)
void KgpgLibrary::shredpreprocessenc(KURL fileToShred)
{
popIsActive=false;
- emit systemMessage(QString::null);
+ emit systemMessage(TQString::null);
shredprocessenc(fileToShred);
}
@@ -144,16 +144,16 @@ emit systemMessage(i18n("Shredding %n file","Shredding %n files",filesToShred.co
KIO::Job *job;
job = KIO::del( filesToShred, true );
-connect( job, SIGNAL( result( KIO::Job * ) ),SLOT( slotShredResult( KIO::Job * ) ) );
+connect( job, TQT_SIGNAL( result( KIO::Job * ) ),TQT_SLOT( slotShredResult( KIO::Job * ) ) );
}
void KgpgLibrary::slotShredResult( KIO::Job * job )
{
- emit systemMessage(QString::null);
+ emit systemMessage(TQString::null);
if (job && job->error())
{
- job->showErrorDialog( (QWidget*)parent() );
- emit systemMessage(QString::null,true);
+ job->showErrorDialog( (TQWidget*)parent() );
+ emit systemMessage(TQString::null,true);
KPassivePopup::message(i18n("KGpg Error"),i18n("Process halted, not all files were shredded."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop),panel,"kgpg_error",0);
}
}
@@ -161,42 +161,42 @@ void KgpgLibrary::slotShredResult( KIO::Job * job )
void KgpgLibrary::processenc(KURL)
{
- emit systemMessage(QString::null);
+ emit systemMessage(TQString::null);
if (_shred) shredprocessenc(urlselecteds.first());
urlselecteds.pop_front ();
if (urlselecteds.count()>0)
fastencode(urlselecteds.first(),_encryptKeys,_encryptOptions,_symetric);
}
-void KgpgLibrary::processencerror(QString mssge)
+void KgpgLibrary::processencerror(TQString mssge)
{
popIsActive=false;
- emit systemMessage(QString::null,true);
+ emit systemMessage(TQString::null,true);
KMessageBox::detailedSorry(panel,i18n("<b>Process halted</b>.<br>Not all files were encrypted."),mssge);
}
-void KgpgLibrary::slotFileDec(KURL srcUrl,KURL destUrl,QStringList customDecryptOption)
+void KgpgLibrary::slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryptOption)
{
////////////////////////////////////////////////////////////////// decode file from konqueror or menu
KgpgInterface *decryptFileProcess=new KgpgInterface();
pop = new KPassivePopup();
urlselected=srcUrl;
decryptFileProcess->KgpgDecryptFile(srcUrl,destUrl,customDecryptOption);
- connect(decryptFileProcess,SIGNAL(processaborted(bool)),this,SLOT(processdecover()));
- connect(decryptFileProcess,SIGNAL(processstarted(QString)),this,SLOT(processpopup(QString)));
- connect(decryptFileProcess,SIGNAL(decryptionfinished()),this,SLOT(processdecover()));
- connect(decryptFileProcess,SIGNAL(errormessage(QString)),this,SLOT(processdecerror(QString)));
+ connect(decryptFileProcess,TQT_SIGNAL(processaborted(bool)),this,TQT_SLOT(processdecover()));
+ connect(decryptFileProcess,TQT_SIGNAL(processstarted(TQString)),this,TQT_SLOT(processpopup(TQString)));
+ connect(decryptFileProcess,TQT_SIGNAL(decryptionfinished()),this,TQT_SLOT(processdecover()));
+ connect(decryptFileProcess,TQT_SIGNAL(errormessage(TQString)),this,TQT_SLOT(processdecerror(TQString)));
}
-void KgpgLibrary::processpopup(QString fileName)
+void KgpgLibrary::processpopup(TQString fileName)
{
emit systemMessage(i18n("Decrypting %1").arg(fileName));
pop->setTimeout(0);
pop->setView(i18n("Processing decryption"),i18n("Please wait..."),KGlobal::iconLoader()->loadIcon("kgpg",KIcon::Desktop));
pop->show();
- 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);
@@ -204,21 +204,21 @@ void KgpgLibrary::processpopup(QString fileName)
void KgpgLibrary::processdecover()
{
- emit systemMessage(QString::null);
+ emit systemMessage(TQString::null);
delete pop;
emit decryptionOver();
}
-void KgpgLibrary::processdecerror(QString mssge)
+void KgpgLibrary::processdecerror(TQString mssge)
{
delete pop;
- emit systemMessage(QString::null);
+ emit systemMessage(TQString::null);
///// test if file is a public key
- QFile qfile(QFile::encodeName(urlselected.path()));
+ TQFile qfile(TQFile::encodeName(urlselected.path()));
if (qfile.open(IO_ReadOnly)) {
- QTextStream t( &qfile );
- QString result(t.read());
+ TQTextStream t( &qfile );
+ TQString result(t.read());
qfile.close();
////////////// if pgp data found, decode it
if (result.startsWith("-----BEGIN PGP PUBLIC KEY BLOCK")) {////// dropped file is a public key, ask for import
@@ -228,7 +228,7 @@ void KgpgLibrary::processdecerror(QString mssge)
else {
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKeyURL(urlselected);
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),this,SIGNAL(importOver(QStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SIGNAL(importOver(TQStringList)));
return;
}
} else if (result.startsWith("-----BEGIN PGP PRIVATE KEY BLOCK")) {////// dropped file is a public key, ask for import
diff --git a/kgpg/kgpglibrary.h b/kgpg/kgpglibrary.h
index 1892f5f..7eb7364 100644
--- a/kgpg/kgpglibrary.h
+++ b/kgpg/kgpglibrary.h
@@ -19,7 +19,7 @@
#ifndef KGPGLIBRARY_H
#define KGPGLIBRARY_H
-#include <qobject.h>
+#include <tqobject.h>
#include <kurl.h>
#include <kshortcut.h>
#include <kio/job.h>
@@ -36,45 +36,45 @@ public:
/**
* Initialize the class
*/
- KgpgLibrary(QWidget *parent=0,bool pgpExtension=false);
+ KgpgLibrary(TQWidget *parent=0,bool pgpExtension=false);
~KgpgLibrary();
KURL::List urlselecteds;
public slots:
- void slotFileEnc(KURL::List urls=KURL(""),QStringList opts=QString::null,QStringList defaultKey=QString::null,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home));
- void slotFileDec(KURL srcUrl,KURL destUrl,QStringList customDecryptOption=QStringList());
+ void slotFileEnc(KURL::List urls=KURL(""),TQStringList opts=TQString::null,TQStringList defaultKey=TQString::null,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home));
+ void slotFileDec(KURL srcUrl,KURL destUrl,TQStringList customDecryptOption=TQStringList());
void shredprocessenc(KURL::List filesToShred);
private slots:
- void startencode(QStringList encryptKeys,QStringList encryptOptions,bool shred,bool symetric);
- void fastencode(KURL &fileToCrypt,QStringList selec,QStringList encryptOptions,bool symetric);
-// void startencode(QString &selec,QString encryptOptions,bool shred,bool symetric);
+ void startencode(TQStringList encryptKeys,TQStringList encryptOptions,bool shred,bool symetric);
+ void fastencode(KURL &fileToCrypt,TQStringList selec,TQStringList encryptOptions,bool symetric);
+// void startencode(TQString &selec,TQString encryptOptions,bool shred,bool symetric);
void slotShredResult( KIO::Job * job );
void shredpreprocessenc(KURL fileToShred);
void processenc(KURL);
void processdecover();
- void processdecerror(QString mssge);
- void processencerror(QString mssge);
- void processpopup(QString fileName);
- void processpopup2(QString fileName);
+ void processdecerror(TQString mssge);
+ void processencerror(TQString mssge);
+ void processpopup(TQString fileName);
+ void processpopup2(TQString fileName);
private:
- QString customDecrypt,tempFile,extension;
+ TQString customDecrypt,tempFile,extension;
KURL urlselected;
KPassivePopup *pop;
KProgress *shredProgressBar;
bool popIsActive;
- QWidget *panel;
- QStringList _encryptKeys;
- QStringList _encryptOptions;
+ TQWidget *panel;
+ TQStringList _encryptKeys;
+ TQStringList _encryptOptions;
bool _shred;
bool _symetric;
signals:
void decryptionOver();
- void importOver(QStringList);
- void systemMessage(QString,bool reset=false);
+ void importOver(TQStringList);
+ void systemMessage(TQString,bool reset=false);
};
#endif // KGPGLIBRARY_H
diff --git a/kgpg/kgpgoptions.cpp b/kgpg/kgpgoptions.cpp
index a45e8a6..8667c1d 100644
--- a/kgpg/kgpgoptions.cpp
+++ b/kgpg/kgpgoptions.cpp
@@ -18,19 +18,19 @@
/////////////////////////////////////////////// code for the option dialog box
#include <config.h>
-#include <qlayout.h>
-#include <qtabwidget.h>
-#include <qlabel.h>
-#include <qtoolbutton.h>
-#include <qfile.h>
+#include <tqlayout.h>
+#include <tqtabwidget.h>
+#include <tqlabel.h>
+#include <tqtoolbutton.h>
+#include <tqfile.h>
#include <kconfig.h>
#include <kdeversion.h>
#include <klocale.h>
#include <kprocio.h>
-#include <qcheckbox.h>
-#include <qradiobutton.h>
-#include <qpushbutton.h>
-#include <qfont.h>
+#include <tqcheckbox.h>
+#include <tqradiobutton.h>
+#include <tqpushbutton.h>
+#include <tqfont.h>
#include <kaction.h>
#include <kmessagebox.h>
#include <klineedit.h>
@@ -62,7 +62,7 @@ class QTabWidget;
/////////////////////// main window
-kgpgOptions::kgpgOptions(QWidget *parent, const char *name)
+kgpgOptions::kgpgOptions(TQWidget *parent, const char *name)
: KConfigDialog( parent, name, KGpgSettings::self())
{
defaultServerList="hkp://wwwkeys.eu.pgp.net ";
@@ -70,17 +70,17 @@ kgpgOptions::kgpgOptions(QWidget *parent, const char *name)
defaultServerList+=",hkp://search.keyserver.net,hkp://wwwkeys.pgp.net,hkp://pgp.dtype.org,hkp://wwwkeys.us.pgp.net";
config = new KConfig ("kgpgrc");
config->setGroup("Servers");
- serverList=QStringList::split (",",config->readEntry("Server_List",defaultServerList));
+ serverList=TQStringList::split (",",config->readEntry("Server_List",defaultServerList));
keyServer = KgpgInterface::getGpgSetting("keyserver", KGpgSettings::gpgConfigPath());
if (!keyServer.isEmpty()) serverList.prepend(keyServer+" "+i18n("(Default)"));
- defaultHomePath=QDir::homeDirPath()+"/.gnupg/";
- if (QFile(defaultHomePath+"options").exists()) defaultConfigPath="options";
+ defaultHomePath=TQDir::homeDirPath()+"/.gnupg/";
+ if (TQFile(defaultHomePath+"options").exists()) defaultConfigPath="options";
else
{
- if (QFile(defaultHomePath+"gpg.conf").exists()) defaultConfigPath="gpg.conf";
- else defaultConfigPath=QString::null;
+ if (TQFile(defaultHomePath+"gpg.conf").exists()) defaultConfigPath="gpg.conf";
+ else defaultConfigPath=TQString::null;
}
kdDebug(2100)<<"Adding pages"<<endl;
@@ -90,8 +90,8 @@ kdDebug(2100)<<"Adding pages"<<endl;
page4=new GPGConf();
page6=new ServerConf();
page7=new MiscConf();
- QBoxLayout *fontLayout=new QBoxLayout(page3->tabWidget3->page(1),QBoxLayout::TopToBottom,10);
- kfc=new KFontChooser(page3->tabWidget3->page(1),"kcfg_Font",false,QStringList(),false);
+ TQBoxLayout *fontLayout=new TQBoxLayout(page3->tabWidget3->page(1),TQBoxLayout::TopToBottom,10);
+ kfc=new KFontChooser(page3->tabWidget3->page(1),"kcfg_Font",false,TQStringList(),false);
fontLayout->addWidget(kfc);
page7->shredInfo->setText(i18n( "<qt><p>You must be aware that <b>shredding is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>"));
@@ -105,30 +105,30 @@ kdDebug(2100)<<"Adding pages"<<endl;
addPage(page6, i18n("Key Servers"), "network");
addPage(page7, i18n("Misc"), "misc");
- page1->clear_akey->setIconSet(QIconSet(QPixmap(SmallIcon("clear_left"))));
- page1->clear_fkey->setIconSet(QIconSet(QPixmap(SmallIcon("clear_left"))));
+ page1->clear_akey->setIconSet(TQIconSet(TQPixmap(SmallIcon("clear_left"))));
+ page1->clear_fkey->setIconSet(TQIconSet(TQPixmap(SmallIcon("clear_left"))));
// The following widgets are managed manually.
- connect(page1->change_fkey, SIGNAL(clicked()), this, SLOT(insertFileKey()));
- connect(page1->clear_fkey, SIGNAL(clicked()), page1->kcfg_FileKey, SLOT(clear()));
- connect(page1->change_akey, SIGNAL(clicked()), this, SLOT(insertAlwaysKey()));
- connect(page1->clear_akey, SIGNAL(clicked()), page1->alwaysKey, SLOT(clear()));
- connect(page1->alwaysKey, SIGNAL(textChanged(const QString&)), this, SLOT(updateButtons()));
- connect(page4->gpg_conf_path, SIGNAL(textChanged(const QString&)), this, SLOT(updateButtons()));
- connect(page4->gpg_home_path, SIGNAL(textChanged(const QString&)), this, SLOT(updateButtons()));
- connect(page4->use_agent, SIGNAL(toggled(bool)), this, SLOT(updateButtons()));
- connect(page4->changeHome, SIGNAL(clicked()), this, SLOT(slotChangeHome()));
- connect(page4->kcfg_PubKeyring, SIGNAL(toggled (bool)), page4->kcfg_PubKeyringUrl, SLOT(setEnabled(bool)));
- connect(page4->kcfg_PubKeyring, SIGNAL(toggled (bool)), this, SLOT(checkAdditionalState(bool)));
- connect(page4->kcfg_PrivKeyring, SIGNAL(toggled (bool)), page4->kcfg_PrivKeyringUrl, SLOT(setEnabled(bool)));
- connect(page4->kcfg_PrivKeyring, SIGNAL(toggled (bool)), this, SLOT(checkAdditionalState(bool)));
- connect(page6->server_add, SIGNAL(clicked()), this, SLOT(slotAddKeyServer()));
- connect(page6->server_del, SIGNAL(clicked()), this, SLOT(slotDelKeyServer()));
- connect(page6->server_default, SIGNAL(clicked()), this, SLOT(slotDefaultKeyServer()));
- connect(page6->ServerBox, SIGNAL(currentChanged ( QListBoxItem *)), this, SLOT(updateButtons()));
- connect(page7->pushShredder, SIGNAL(clicked ()), this, SIGNAL(installShredder()));
-
- //connect(this, SIGNAL(settingsChanged()), SLOT(updateSettings()));
+ connect(page1->change_fkey, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertFileKey()));
+ connect(page1->clear_fkey, TQT_SIGNAL(clicked()), page1->kcfg_FileKey, TQT_SLOT(clear()));
+ connect(page1->change_akey, TQT_SIGNAL(clicked()), this, TQT_SLOT(insertAlwaysKey()));
+ connect(page1->clear_akey, TQT_SIGNAL(clicked()), page1->alwaysKey, TQT_SLOT(clear()));
+ connect(page1->alwaysKey, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateButtons()));
+ connect(page4->gpg_conf_path, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateButtons()));
+ connect(page4->gpg_home_path, TQT_SIGNAL(textChanged(const TQString&)), this, TQT_SLOT(updateButtons()));
+ connect(page4->use_agent, TQT_SIGNAL(toggled(bool)), this, TQT_SLOT(updateButtons()));
+ connect(page4->changeHome, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotChangeHome()));
+ connect(page4->kcfg_PubKeyring, TQT_SIGNAL(toggled (bool)), page4->kcfg_PubKeyringUrl, TQT_SLOT(setEnabled(bool)));
+ connect(page4->kcfg_PubKeyring, TQT_SIGNAL(toggled (bool)), this, TQT_SLOT(checkAdditionalState(bool)));
+ connect(page4->kcfg_PrivKeyring, TQT_SIGNAL(toggled (bool)), page4->kcfg_PrivKeyringUrl, TQT_SLOT(setEnabled(bool)));
+ connect(page4->kcfg_PrivKeyring, TQT_SIGNAL(toggled (bool)), this, TQT_SLOT(checkAdditionalState(bool)));
+ connect(page6->server_add, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotAddKeyServer()));
+ connect(page6->server_del, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDelKeyServer()));
+ connect(page6->server_default, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotDefaultKeyServer()));
+ connect(page6->ServerBox, TQT_SIGNAL(currentChanged ( TQListBoxItem *)), this, TQT_SLOT(updateButtons()));
+ connect(page7->pushShredder, TQT_SIGNAL(clicked ()), this, TQT_SIGNAL(installShredder()));
+
+ //connect(this, TQT_SIGNAL(settingsChanged()), TQT_SLOT(updateSettings()));
keyGood=KGpgSettings::colorGood();
keyUnknown=KGpgSettings::colorUnknown();
@@ -155,11 +155,11 @@ page4->kcfg_OnlyAdditional->setEnabled(false);
void kgpgOptions::insertFileKey()
{
- QString signKeyID;
+ TQString signKeyID;
///// open key selection dialog
KgpgSelKey *opts=new KgpgSelKey(this,0,true,page1->kcfg_FileKey->text());
- if (opts->exec()==QDialog::Accepted) {
+ if (opts->exec()==TQDialog::Accepted) {
page1->kcfg_FileKey->setText(opts->getkeyID());
} else {
delete opts;
@@ -170,11 +170,11 @@ void kgpgOptions::insertFileKey()
void kgpgOptions::insertAlwaysKey()
{
- QString signKeyID;
+ TQString signKeyID;
///// open key selection dialog
KgpgSelKey *opts=new KgpgSelKey(this,0,true,page1->alwaysKey->text());
- if (opts->exec()==QDialog::Accepted) {
+ if (opts->exec()==TQDialog::Accepted) {
page1->alwaysKey->setText(opts->getkeyID());
} else {
delete opts;
@@ -185,13 +185,13 @@ void kgpgOptions::insertAlwaysKey()
void kgpgOptions::slotChangeHome()
{
-QString gpgHome=KFileDialog::getExistingDirectory(page4->gpg_home_path->text(),this,i18n("New GnuPG Home Location"));
+TQString gpgHome=KFileDialog::getExistingDirectory(page4->gpg_home_path->text(),this,i18n("New GnuPG Home Location"));
if (gpgHome.isEmpty()) return;
if (!gpgHome.endsWith("/")) gpgHome.append("/");
- QString confPath="options";
- if (!QFile(gpgHome+confPath).exists()) {
+ TQString confPath="options";
+ if (!TQFile(gpgHome+confPath).exists()) {
confPath="gpg.conf";
- if (!QFile(gpgHome+confPath).exists())
+ if (!TQFile(gpgHome+confPath).exists())
{
if (KMessageBox::questionYesNo(this,i18n("No configuration file was found in the selected location.\nDo you want to create it now ?\n\nWithout configuration file, neither KGpg nor Gnupg will work properly."),i18n("No Configuration File Found"),i18n("Create"),i18n("Ignore"))==KMessageBox::Yes) ////////// Try to create config File by running gpg once
{
@@ -199,19 +199,19 @@ if (!gpgHome.endsWith("/")) gpgHome.append("/");
*p<<"gpg"<<"--homedir"<<gpgHome<<"--no-tty"<<"--list-secret-keys";
p->start(KProcess::Block); //// start gnupg so that it will create a config file
confPath="gpg.conf";
- QFile confFile(gpgHome+confPath);
+ TQFile confFile(gpgHome+confPath);
if (!confFile.open(IO_WriteOnly))
{KMessageBox::sorry(this,i18n("Cannot create configuration file. Please check if destination media is mounted and if you have write access"));
return;
}
else
{
- QTextStream stream( &confFile );
+ TQTextStream stream( &confFile );
stream<<"# Config file created by KGpg\n\n";
confFile.close();
}
}
- else confPath=QString::null;
+ else confPath=TQString::null;
}
}
page4->gpg_conf_path->setText(confPath);
@@ -220,7 +220,7 @@ if (!gpgHome.endsWith("/")) gpgHome.append("/");
void kgpgOptions::updateWidgets()
{
-QString pubKeyring,privKeyring;
+TQString pubKeyring,privKeyring;
gpgConfigPath = KGpgSettings::gpgConfigPath();
page4->gpg_conf_path->setText(KURL(gpgConfigPath).fileName());
@@ -278,15 +278,15 @@ void kgpgOptions::updateWidgetsDefault()
page4->gpg_conf_path->setText(defaultConfigPath);
page4->gpg_home_path->setText(defaultHomePath);
- page4->kcfg_PubKeyringUrl->setURL(QString::null);
+ page4->kcfg_PubKeyringUrl->setURL(TQString::null);
page4->kcfg_PubKeyring->setChecked(false);
- page4->kcfg_PrivKeyringUrl->setURL(QString::null);
+ page4->kcfg_PrivKeyringUrl->setURL(TQString::null);
page4->kcfg_PrivKeyring->setChecked(false);
page4->kcfg_OnlyAdditional->setChecked(false);
page6->ServerBox->clear();
- page6->ServerBox->insertStringList(QStringList::split(",",defaultServerList));
+ page6->ServerBox->insertStringList(TQStringList::split(",",defaultServerList));
kdDebug(2100)<<"Finishing default options"<<endl;
}
@@ -305,7 +305,7 @@ bool kgpgOptions::isDefault()
if (page4->use_agent->isChecked() != defaultUseAgent)
return false;
- QString currList;
+ TQString currList;
for (uint i=0;i<page6->ServerBox->count();i++)
currList+=page6->ServerBox->text(i)+",";
currList.truncate(currList.length()-1);
@@ -328,7 +328,7 @@ bool kgpgOptions::hasChanged()
if (page4->use_agent->isChecked() != useAgent)
return true;
- QStringList currList;
+ TQStringList currList;
for (uint i=0;i<page6->ServerBox->count();i++)
currList.append(page6->ServerBox->text(i));
if (currList!=serverList) return true;
@@ -345,7 +345,7 @@ void kgpgOptions::updateSettings()
if (page4->gpg_home_path->text()!=KURL(gpgConfigPath).directory(false))
{
if (page4->gpg_home_path->text()!=defaultHomePath)
- setenv("GNUPGHOME", QFile::encodeName(page4->gpg_home_path->text()), 1);
+ setenv("GNUPGHOME", TQFile::encodeName(page4->gpg_home_path->text()), 1);
else setenv("GNUPGHOME","",1);
emit homeChanged();
gpgConfigPath = KGpgSettings::gpgConfigPath();
@@ -364,7 +364,7 @@ void kgpgOptions::updateSettings()
else
{
if (KgpgInterface::getGpgSetting("keyring", gpgConfigPath)!="") emitReload=true;
- KgpgInterface::setGpgSetting("keyring",QString::null, gpgConfigPath);
+ KgpgInterface::setGpgSetting("keyring",TQString::null, gpgConfigPath);
}
if (page4->kcfg_PrivKeyring->isChecked())
@@ -375,7 +375,7 @@ void kgpgOptions::updateSettings()
else
{
if (KgpgInterface::getGpgSetting("secret-keyring", gpgConfigPath)!="") emitReload=true;
- KgpgInterface::setGpgSetting("secret-keyring",QString::null, gpgConfigPath);
+ KgpgInterface::setGpgSetting("secret-keyring",TQString::null, gpgConfigPath);
}
emit changeFont(kfc->font());
@@ -392,7 +392,7 @@ void kgpgOptions::updateSettings()
else
slotRemoveMenu("decryptfile.desktop");
- KgpgInterface::setGpgMultiSetting("encrypt-to",QStringList::split(" ",page1->alwaysKey->text()),KGpgSettings::gpgConfigPath());
+ KgpgInterface::setGpgMultiSetting("encrypt-to",TQStringList::split(" ",page1->alwaysKey->text()),KGpgSettings::gpgConfigPath());
alwaysKeyID = page1->alwaysKey->text();
useAgent = page4->use_agent->isChecked();
@@ -411,11 +411,11 @@ void kgpgOptions::updateSettings()
////////////////// save key servers
- QString currList;
- serverList=QStringList ();
+ TQString currList;
+ serverList=TQStringList ();
for (uint i=0;i<page6->ServerBox->count();i++)
{
- QString currItem=page6->ServerBox->text(i);
+ TQString currItem=page6->ServerBox->text(i);
if (currItem.find(" ")!=-1) // it is the default keyserver
keyServer=currItem.section(" ",0,0);
else
@@ -443,10 +443,10 @@ void kgpgOptions::updateSettings()
}
-void kgpgOptions::slotInstallSign(QString mimetype)
+void kgpgOptions::slotInstallSign(TQString mimetype)
{
- QString path=locateLocal("data","konqueror/servicemenus/signfile.desktop");
+ TQString path=locateLocal("data","konqueror/servicemenus/signfile.desktop");
KDesktopFile configl2(path, false);
if (configl2.isImmutable() ==false) {
configl2.setGroup("Desktop Entry");
@@ -460,10 +460,10 @@ void kgpgOptions::slotInstallSign(QString mimetype)
}
}
-void kgpgOptions::slotInstallDecrypt(QString mimetype)
+void kgpgOptions::slotInstallDecrypt(TQString mimetype)
{
- QString path=locateLocal("data","konqueror/servicemenus/decryptfile.desktop");
+ TQString path=locateLocal("data","konqueror/servicemenus/decryptfile.desktop");
KDesktopFile configl2(path, false);
if (configl2.isImmutable() ==false) {
configl2.setGroup("Desktop Entry");
@@ -478,11 +478,11 @@ void kgpgOptions::slotInstallDecrypt(QString mimetype)
}
-void kgpgOptions::slotRemoveMenu(QString menu)
+void kgpgOptions::slotRemoveMenu(TQString menu)
{
- QString path=locateLocal("data","konqueror/servicemenus/"+menu);
- QFile qfile(path);
+ TQString path=locateLocal("data","konqueror/servicemenus/"+menu);
+ TQFile qfile(path);
if (qfile.exists())
qfile.remove();
{
@@ -493,23 +493,23 @@ void kgpgOptions::slotRemoveMenu(QString menu)
}
-QString kgpgOptions::namecode(QString kid)
+TQString kgpgOptions::namecode(TQString kid)
{
for ( uint counter = 0; counter<names.count(); counter++ )
- if (QString(ids[counter].right(8))==kid)
+ if (TQString(ids[counter].right(8))==kid)
return names[counter];
- return QString::null;
+ return TQString::null;
}
-QString kgpgOptions::idcode(QString kname)
+TQString kgpgOptions::idcode(TQString kname)
{
for ( uint counter = 0; counter<names.count(); counter++ )
if (names[counter]==kname)
- return QString(ids[counter].right(8));
- return QString::null;
+ return TQString(ids[counter].right(8));
+ return TQString::null;
}
@@ -518,7 +518,7 @@ void kgpgOptions::listkey()
//////// update display of keys in main management window
FILE *fp;
- QString tst,name,trustedvals="idre-",issec;
+ TQString tst,name,trustedvals="idre-",issec;
int counter=0;
char line[300];
@@ -526,7 +526,7 @@ void kgpgOptions::listkey()
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys", "r");
while ( fgets( line, sizeof(line), fp2)) {
- QString lineRead=line;
+ TQString lineRead=line;
if (lineRead.startsWith("sec"))
issec+=lineRead.section(':',4,4);
}
@@ -569,7 +569,7 @@ void kgpgOptions::listkey()
void kgpgOptions::slotAddKeyServer()
{
-QString newServer=KInputDialog::getText(i18n("Add New Key Server"),i18n("Server URL:"));
+TQString newServer=KInputDialog::getText(i18n("Add New Key Server"),i18n("Server URL:"));
if (!newServer.isEmpty())
page6->ServerBox->insertItem(newServer.stripWhiteSpace());
page6->ServerBox->setSelected(page6->ServerBox->findItem(newServer.stripWhiteSpace()),true);
diff --git a/kgpg/kgpgoptions.h b/kgpg/kgpgoptions.h
index 05a7b32..14b0300 100644
--- a/kgpg/kgpgoptions.h
+++ b/kgpg/kgpgoptions.h
@@ -40,9 +40,9 @@ class kgpgOptions : public KConfigDialog
{
Q_OBJECT
public:
- kgpgOptions(QWidget *parent=0, const char *name=0);
+ kgpgOptions(TQWidget *parent=0, const char *name=0);
~kgpgOptions();
- QStringList names,ids;
+ TQStringList names,ids;
Encryption *page1;
Decryption *page2;
UIConf *page3;
@@ -53,22 +53,22 @@ public:
private:
KConfig *config;
- QString alwaysKeyID,alwaysKeyName;
+ TQString alwaysKeyID,alwaysKeyName;
bool firstDisplay;
- QPixmap pixkeySingle,pixkeyDouble;
- QString fileEncryptionKey;
- QString gpgConfigPath;
- QString keyServer,defaultServerList;
- QString defaultKeyServer;
- QFont startFont;
+ TQPixmap pixkeySingle,pixkeyDouble;
+ TQString fileEncryptionKey;
+ TQString gpgConfigPath;
+ TQString keyServer,defaultServerList;
+ TQString defaultKeyServer;
+ TQFont startFont;
bool useAgent;
bool defaultUseAgent;
bool encryptToAlways;
bool defaultEncryptToAlways;
- QStringList serverList;
- QString defaultConfigPath,defaultHomePath;
- QColor keyGood,keyBad,keyUnknown,keyRev;
+ TQStringList serverList;
+ TQString defaultConfigPath,defaultHomePath;
+ TQColor keyGood,keyBad,keyUnknown,keyRev;
private:
bool hasChanged();
@@ -86,18 +86,18 @@ private slots:
void insertFileKey();
void listkey();
- QString namecode(QString kid);
- QString idcode(QString kname);
- void slotInstallDecrypt(QString mimetype);
- void slotInstallSign(QString mimetype);
- void slotRemoveMenu(QString menu);
+ TQString namecode(TQString kid);
+ TQString idcode(TQString kname);
+ void slotInstallDecrypt(TQString mimetype);
+ void slotInstallSign(TQString mimetype);
+ void slotRemoveMenu(TQString menu);
void slotChangeHome();
signals:
void updateDisplay();
void settingsUpdated();
- void changeFont(QFont);
+ void changeFont(TQFont);
void homeChanged();
- void refreshTrust(int, QColor);
+ void refreshTrust(int, TQColor);
void installShredder();
void reloadKeyList();
};
diff --git a/kgpg/kgpgsettings_addons.h b/kgpg/kgpgsettings_addons.h
index 6b2e8f5..63ff09a 100644
--- a/kgpg/kgpgsettings_addons.h
+++ b/kgpg/kgpgsettings_addons.h
@@ -17,7 +17,7 @@
public:
static
- QString defaultKey()
+ TQString defaultKey()
{
if (self()->mDefaultKey.isEmpty())
{
@@ -29,7 +29,7 @@ public:
}
static
- void setDefaultKey(const QString &_defaultKey)
+ void setDefaultKey(const TQString &_defaultKey)
{
self()->mDefaultKey = _defaultKey;
KgpgInterface::setGpgSetting("default-key",_defaultKey.right(8),gpgConfigPath());
@@ -38,4 +38,4 @@ public:
}
private:
- QString mDefaultKey;
+ TQString mDefaultKey;
diff --git a/kgpg/kgpgview.cpp b/kgpg/kgpgview.cpp
index c9bff6a..9aa23ea 100644
--- a/kgpg/kgpgview.cpp
+++ b/kgpg/kgpgview.cpp
@@ -18,12 +18,12 @@
////////////////////////////////////////////////////////////// code for the main view (editor)
// include files for Qt
-//#include <qprinter.h>
+//#include <tqprinter.h>
// application specific includes
-#include <qscrollview.h>
-#include <qregexp.h>
+#include <tqscrollview.h>
+#include <tqregexp.h>
#include <kio/netaccess.h>
#include <klocale.h>
@@ -31,13 +31,13 @@
#include <kurldrag.h>
#include <kmessagebox.h>
-#include <qfile.h>
-#include <qlayout.h>
+#include <tqfile.h>
+#include <tqlayout.h>
#include <kbuttonbox.h>
#include <unistd.h>
#include <kaction.h>
#include <klineedit.h>
-#include <qtextcodec.h>
+#include <tqtextcodec.h>
#include "kgpgsettings.h"
@@ -53,7 +53,7 @@
//////////////// configuration for editor
-MyEditor::MyEditor( QWidget *parent, const char *name )
+MyEditor::MyEditor( TQWidget *parent, const char *name )
: KTextEdit( parent, name )
{
setTextFormat(PlainText);
@@ -61,34 +61,34 @@ MyEditor::MyEditor( QWidget *parent, const char *name )
setAcceptDrops(true);
}
-void MyEditor::contentsDragEnterEvent( QDragEnterEvent *e )
+void MyEditor::contentsDragEnterEvent( TQDragEnterEvent *e )
{
//////////////// if a file is dragged into editor ...
- e->accept (KURLDrag::canDecode(e) || QTextDrag::canDecode (e));
- //e->accept (QTextDrag::canDecode (e));
+ e->accept (KURLDrag::canDecode(e) || TQTextDrag::canDecode (e));
+ //e->accept (TQTextDrag::canDecode (e));
}
-void MyEditor::contentsDropEvent( QDropEvent *e )
+void MyEditor::contentsDropEvent( TQDropEvent *e )
{
///////////////// decode dropped file
KURL::List list;
- QString text;
+ TQString text;
if ( KURLDrag::decode( e, list ) )
slotDroppedFile(list.first());
- else if ( QTextDrag::decode(e, text) )
+ else if ( TQTextDrag::decode(e, text) )
insert(text);
}
void MyEditor::slotDroppedFile(KURL url)
{
///////////////// decide what to do with dropped file
- QString text;
+ TQString text;
if (!tempFile.isEmpty()) {
KIO::NetAccess::removeTempFile(tempFile);
- tempFile=QString::null;
+ tempFile=TQString::null;
}
if (url.isLocalFile())
@@ -111,14 +111,14 @@ void MyEditor::slotDroppedFile(KURL url)
}
-bool MyEditor::slotCheckContent(QString fileToCheck, bool checkForPgpMessage)
+bool MyEditor::slotCheckContent(TQString fileToCheck, bool checkForPgpMessage)
{
-QFile qfile(fileToCheck);
+TQFile qfile(fileToCheck);
if (qfile.open(IO_ReadOnly)) {
////////// open file
- QTextStream t( &qfile );
- QString result(t.read());
+ TQTextStream t( &qfile );
+ TQString result(t.read());
////////////// if pgp data found, decode it
if ((checkForPgpMessage) && (result.startsWith("-----BEGIN PGP MESSAGE"))) {
qfile.close();
@@ -134,7 +134,7 @@ QFile qfile(fileToCheck);
} else {
KgpgInterface *importKeyProcess=new KgpgInterface();
importKeyProcess->importKeyURL(KURL(fileToCheck));
- connect(importKeyProcess,SIGNAL(importfinished(QStringList)),this,SLOT(slotProcessResult(QStringList)));
+ connect(importKeyProcess,TQT_SIGNAL(importfinished(TQStringList)),this,TQT_SLOT(slotProcessResult(TQStringList)));
return true;
}
} else {
@@ -154,50 +154,50 @@ QFile qfile(fileToCheck);
}
-void MyEditor::editorUpdateDecryptedtxt(QString newtxt)
+void MyEditor::editorUpdateDecryptedtxt(TQString newtxt)
{
setText(newtxt);
}
-void MyEditor::editorFailedDecryptedtxt(QString newtxt)
+void MyEditor::editorFailedDecryptedtxt(TQString newtxt)
{
if (!slotCheckContent(tempFile,false))
KMessageBox::detailedSorry(this,i18n("Decryption failed."),newtxt);
}
-void MyEditor::slotDecodeFile(QString fname)
+void MyEditor::slotDecodeFile(TQString fname)
{
//////////////// decode file from given url into editor
- QFile qfile(QFile::encodeName(fname));
+ TQFile qfile(TQFile::encodeName(fname));
if (qfile.open(IO_ReadOnly)) {
KgpgInterface *txtDecrypt=new KgpgInterface();
- connect (txtDecrypt,SIGNAL(txtdecryptionfinished(QString)),this,SLOT(editorUpdateDecryptedtxt(QString)));
- connect (txtDecrypt,SIGNAL(txtdecryptionfailed(QString)),this,SLOT(editorFailedDecryptedtxt(QString)));
- txtDecrypt->KgpgDecryptFileToText(KURL(fname),QStringList::split(QString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace()));
+ connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),this,TQT_SLOT(editorUpdateDecryptedtxt(TQString)));
+ connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),this,TQT_SLOT(editorFailedDecryptedtxt(TQString)));
+ txtDecrypt->KgpgDecryptFileToText(KURL(fname),TQStringList::split(TQString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace()));
} else
KMessageBox::sorry(this,i18n("Unable to read file."));
}
-void MyEditor::slotProcessResult(QStringList iKeys)
+void MyEditor::slotProcessResult(TQStringList iKeys)
{
emit refreshImported(iKeys);
KIO::NetAccess::removeTempFile(tempFile);
- tempFile=QString::null;
+ tempFile=TQString::null;
}
////////////////////////// main view configuration
-KgpgView::KgpgView(QWidget *parent, const char *name) : QWidget(parent, name)
+KgpgView::KgpgView(TQWidget *parent, const char *name) : TQWidget(parent, name)
{
editor=new MyEditor(this);
windowAutoClose=true;
///// layout
- QVBoxLayout *vbox=new QVBoxLayout(this,3);
+ TQVBoxLayout *vbox=new TQVBoxLayout(this,3);
editor->setReadOnly( false );
editor->setUndoRedoEnabled(true);
@@ -208,11 +208,11 @@ KgpgView::KgpgView(QWidget *parent, const char *name) : QWidget(parent, name)
KButtonBox *boutonbox=new KButtonBox(this,KButtonBox::Horizontal,15,12);
boutonbox->addStretch(1);
- bouton0=boutonbox->addButton(i18n("S&ign/Verify"),this,SLOT(clearSign()),TRUE);
- bouton1=boutonbox->addButton(i18n("En&crypt"),this,SLOT(popuppublic()),TRUE);
- bouton2=boutonbox->addButton(i18n("&Decrypt"),this,SLOT(slotdecode()),TRUE);
+ bouton0=boutonbox->addButton(i18n("S&ign/Verify"),this,TQT_SLOT(clearSign()),TRUE);
+ bouton1=boutonbox->addButton(i18n("En&crypt"),this,TQT_SLOT(popuppublic()),TRUE);
+ bouton2=boutonbox->addButton(i18n("&Decrypt"),this,TQT_SLOT(slotdecode()),TRUE);
- QObject::connect(editor,SIGNAL(textChanged()),this,SLOT(modified()));
+ TQObject::connect(editor,TQT_SIGNAL(textChanged()),this,TQT_SLOT(modified()));
boutonbox->layout();
editor->resize(editor->maximumSize());
@@ -226,7 +226,7 @@ void KgpgView::modified()
/////////////// notify for changes in editor window
KgpgApp *win=(KgpgApp *) parent();
if (win->fileSave->isEnabled()==false) {
- QString capt=win->Docname.fileName();
+ TQString capt=win->Docname.fileName();
if (capt.isEmpty())
capt=i18n("untitled");
win->setCaption(capt,true);
@@ -236,10 +236,10 @@ void KgpgView::modified()
}
-void KgpgView::slotAskForImport(QString ID)
+void KgpgView::slotAskForImport(TQString ID)
{
if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id: %1<br><br>"
- "Do you want to import this key from a keyserver?</qt>").arg(ID),i18n("Missing Key"), QString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) {
+ "Do you want to import this key from a keyserver?</qt>").arg(ID),i18n("Missing Key"), TQString::null, i18n("Import"), i18n("Do Not Import"))==KMessageBox::Yes) {
keyServer *kser=new keyServer(0,"server_dialog",false,true);
kser->page->kLEimportid->setText(ID);
kser->slotImport();
@@ -248,7 +248,7 @@ if (KMessageBox::questionYesNo(0,i18n("<qt><b>Missing signature:</b><br>Key id:
else emit verifyFinished();
}
-void KgpgView::slotVerifyResult(QString mssge,QString log)
+void KgpgView::slotVerifyResult(TQString mssge,TQString log)
{
emit verifyFinished();
//KMessageBox::information(0,mssge);
@@ -257,21 +257,21 @@ emit verifyFinished();
void KgpgView::clearSign()
{
- QString mess=editor->text();
+ TQString mess=editor->text();
if (mess.startsWith("-----BEGIN PGP SIGNED")) {
////////////////////// this is a signed message, verify it
KgpgInterface *verifyProcess=new KgpgInterface();
- connect(verifyProcess,SIGNAL(missingSignature(QString)),this,SLOT(slotAskForImport(QString)));
- connect(verifyProcess,SIGNAL(verifyOver(QString,QString)),this,SLOT(slotVerifyResult(QString,QString)));
+ connect(verifyProcess,TQT_SIGNAL(missingSignature(TQString)),this,TQT_SLOT(slotAskForImport(TQString)));
+ connect(verifyProcess,TQT_SIGNAL(verifyOver(TQString,TQString)),this,TQT_SLOT(slotVerifyResult(TQString,TQString)));
verifyProcess->KgpgVerifyText(mess);
}
else {
///// Sign the text in Editor
- QString signKeyID;
+ TQString signKeyID;
///// open key selection dialog
KgpgSelKey *opts=new KgpgSelKey(this,0);
- if (opts->exec()==QDialog::Accepted) {
+ if (opts->exec()==TQDialog::Accepted) {
signKeyID=opts->getkeyID();
} else {
delete opts;
@@ -280,8 +280,8 @@ void KgpgView::clearSign()
delete opts;
KgpgInterface *signProcess=new KgpgInterface();
- connect(signProcess,SIGNAL(txtSignOver(QString)),this,SLOT(slotSignResult(QString)));
- QStringList options=NULL;
+ connect(signProcess,TQT_SIGNAL(txtSignOver(TQString)),this,TQT_SLOT(slotSignResult(TQString)));
+ TQStringList options=NULL;
if (KGpgSettings::pgpCompatibility())
options<<"--pgp6";
signProcess->KgpgSignText(mess,signKeyID,options);
@@ -289,7 +289,7 @@ void KgpgView::clearSign()
}
-void KgpgView::slotSignResult(QString signResult)
+void KgpgView::slotSignResult(TQString signResult)
{
if (signResult.isEmpty())
KMessageBox::sorry(this,i18n("Signing not possible: bad passphrase or missing key"));
@@ -312,7 +312,7 @@ void KgpgView::popuppublic()
//////// open dialog --> popuppublic.cpp
popupPublic *dialogue=new popupPublic(this, "public_keys", 0,false,((KgpgApp *) parent())->goDefaultKey);
- connect(dialogue,SIGNAL(selectedKey(QStringList,QStringList,bool,bool)),this,SLOT(encodetxt(QStringList,QStringList,bool,bool)));
+ connect(dialogue,TQT_SIGNAL(selectedKey(TQStringList,TQStringList,bool,bool)),this,TQT_SLOT(encodetxt(TQStringList,TQStringList,bool,bool)));
dialogue->exec();
delete dialogue;
}
@@ -324,14 +324,14 @@ void KgpgView::slotdecode()
{
/////////////// decode data from the editor. triggered by the decode button
- QString dests,encUsers;
- messages=QString::null;
+ TQString dests,encUsers;
+ messages=TQString::null;
- //QString resultat=KgpgInterface::KgpgDecryptText(editor->text(),encUsers);
+ //TQString resultat=KgpgInterface::KgpgDecryptText(editor->text(),encUsers);
KgpgInterface *txtDecrypt=new KgpgInterface();
- connect (txtDecrypt,SIGNAL(txtdecryptionfinished(QString)),this,SLOT(updateDecryptedtxt(QString)));
- connect (txtDecrypt,SIGNAL(txtdecryptionfailed(QString)),this,SLOT(failedDecryptedtxt(QString)));
- txtDecrypt->KgpgDecryptText(editor->text(),QStringList::split(QString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace()));
+ connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfinished(TQString)),this,TQT_SLOT(updateDecryptedtxt(TQString)));
+ connect (txtDecrypt,TQT_SIGNAL(txtdecryptionfailed(TQString)),this,TQT_SLOT(failedDecryptedtxt(TQString)));
+ txtDecrypt->KgpgDecryptText(editor->text(),TQStringList::split(TQString(" "),KGpgSettings::customDecrypt().simplifyWhiteSpace()));
/*
KgpgApp *win=(KgpgApp *) parent();
@@ -342,27 +342,27 @@ void KgpgView::slotdecode()
}*/
}
-void KgpgView::updateDecryptedtxt(QString newtxt)
+void KgpgView::updateDecryptedtxt(TQString newtxt)
{
//kdDebug(2100)<<"UTF8 Test Result--------------"<<KgpgView::checkForUtf8()<<endl;
editor->setText(newtxt);
emit resetEncoding(false);
}
-bool KgpgView::checkForUtf8(QString text)
+bool KgpgView::checkForUtf8(TQString text)
{ //// try to guess if the decrypted text uses utf-8 encoding
- QTextCodec *codec =QTextCodec::codecForLocale ();
+ TQTextCodec *codec =TQTextCodec::codecForLocale ();
if (codec->canEncode(text)) return true;
return false;
}
-void KgpgView::failedDecryptedtxt(QString newtxt)
+void KgpgView::failedDecryptedtxt(TQString newtxt)
{
KMessageBox::detailedSorry(this,i18n("Decryption failed."),newtxt);
}
-void KgpgView::encodetxt(QStringList selec,QStringList encryptOptions,bool, bool symmetric)
+void KgpgView::encodetxt(TQStringList selec,TQStringList encryptOptions,bool, bool symmetric)
{
////////////////// encode from editor
if (KGpgSettings::pgpCompatibility())
@@ -371,7 +371,7 @@ void KgpgView::encodetxt(QStringList selec,QStringList encryptOptions,bool, bool
if (symmetric) selec.clear();
KgpgInterface *txtCrypt=new KgpgInterface();
- connect (txtCrypt,SIGNAL(txtencryptionfinished(QString)),this,SLOT(updatetxt(QString)));
+ connect (txtCrypt,TQT_SIGNAL(txtencryptionfinished(TQString)),this,TQT_SLOT(updatetxt(TQString)));
txtCrypt->KgpgEncryptText(editor->text(),selec,encryptOptions);
//KMessageBox::sorry(0,"OVER");
@@ -380,7 +380,7 @@ void KgpgView::encodetxt(QStringList selec,QStringList encryptOptions,bool, bool
//else KMessageBox::sorry(this,i18n("Decryption failed."));
}
-void KgpgView::updatetxt(QString newtxt)
+void KgpgView::updatetxt(TQString newtxt)
{
if (!newtxt.isEmpty())
editor->setText(newtxt);
@@ -395,9 +395,9 @@ delete editor;
}
/*
-void KgpgView::print(QPrinter *pPrinter)
+void KgpgView::print(TQPrinter *pPrinter)
{
- QPainter printpainter;
+ TQPainter printpainter;
printpainter.begin(pPrinter);
// TODO: add your printing code here
diff --git a/kgpg/kgpgview.h b/kgpg/kgpgview.h
index d6183bb..87ff206 100644
--- a/kgpg/kgpgview.h
+++ b/kgpg/kgpgview.h
@@ -30,7 +30,7 @@ class QDragEnterEvent;
//class KgpgDoc;
/** The KgpgView class provides the view widget for the KgpgApp instance.
- * The View instance inherits QWidget as a base class and represents the view object of a KTMainWindow. As KgpgView is part of the
+ * The View instance inherits TQWidget as a base class and represents the view object of a KTMainWindow. As KgpgView is part of the
* docuement-view model, it needs a reference to the document object connected with it by the KgpgApp class to manipulate and display
* the document structure provided by the KgpgDoc class.
*
@@ -43,25 +43,25 @@ class MyEditor : public KTextEdit
Q_OBJECT
public:
- MyEditor( QWidget *parent = 0, const char *name = 0);
+ MyEditor( TQWidget *parent = 0, const char *name = 0);
private:
- QString message,messages,tempFile;
+ TQString message,messages,tempFile;
public slots:
- void slotDecodeFile(QString);
+ void slotDecodeFile(TQString);
void slotDroppedFile(KURL url);
- void slotProcessResult(QStringList iKeys);
- bool slotCheckContent(QString fileToCheck, bool checkForPgpMessage=true);
+ void slotProcessResult(TQStringList iKeys);
+ bool slotCheckContent(TQString fileToCheck, bool checkForPgpMessage=true);
protected:
- void contentsDragEnterEvent( QDragEnterEvent *e );
- void contentsDropEvent( QDropEvent *e );
+ void contentsDragEnterEvent( TQDragEnterEvent *e );
+ void contentsDropEvent( TQDropEvent *e );
private slots:
- void editorUpdateDecryptedtxt(QString newtxt);
- void editorFailedDecryptedtxt(QString newtxt);
+ void editorUpdateDecryptedtxt(TQString newtxt);
+ void editorFailedDecryptedtxt(TQString newtxt);
signals:
- void refreshImported(QStringList);
+ void refreshImported(TQStringList);
};
@@ -71,7 +71,7 @@ class KgpgView : public QWidget
friend class MyEditor;
public:
/** Constructor for the main view */
- KgpgView(QWidget *parent = 0, const char *name=0);
+ KgpgView(TQWidget *parent = 0, const char *name=0);
/** Destructor for the main view */
~KgpgView();
@@ -82,34 +82,34 @@ public:
*/
// KgpgDoc *getDocument() const;
- // QTextEdit *editor;
+ // TQTextEdit *editor;
MyEditor *editor;
KURL fselected;
bool windowAutoClose;
/** contains the implementation for printing functionality */
- // void print(QPrinter *pPrinter);
+ // void print(TQPrinter *pPrinter);
- QPushButton *bouton1,*bouton2,*bouton0;
+ TQPushButton *bouton1,*bouton2,*bouton0;
private:
- QString messages;
+ TQString messages;
public slots:
void slotdecode();
void clearSign();
private slots:
- void slotVerifyResult(QString mssge,QString log);
- void slotSignResult(QString signResult);
- void slotAskForImport(QString ID);
+ void slotVerifyResult(TQString mssge,TQString log);
+ void slotSignResult(TQString signResult);
+ void slotAskForImport(TQString ID);
void popuppublic();
void modified();
- void encodetxt(QStringList selec,QStringList encryptOptions,bool, bool symmetric);
- void updatetxt(QString);
- void updateDecryptedtxt(QString newtxt);
- void failedDecryptedtxt(QString newtxt);
- bool checkForUtf8(QString text);
+ void encodetxt(TQStringList selec,TQStringList encryptOptions,bool, bool symmetric);
+ void updatetxt(TQString);
+ void updateDecryptedtxt(TQString newtxt);
+ void failedDecryptedtxt(TQString newtxt);
+ bool checkForUtf8(TQString text);
signals:
void resetEncoding(bool);
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");
diff --git a/kgpg/listkeys.h b/kgpg/listkeys.h
index b2610db..33b246b 100644
--- a/kgpg/listkeys.h
+++ b/kgpg/listkeys.h
@@ -24,15 +24,15 @@
#include <klistviewsearchline.h>
#include <kactionclasses.h>
-#include <qclipboard.h>
+#include <tqclipboard.h>
#include "dcopiface.h"
-#include <qptrlist.h>
-#include <qstringlist.h>
+#include <tqptrlist.h>
+#include <tqstringlist.h>
#include <kurl.h>
-#include <qcheckbox.h>
+#include <tqcheckbox.h>
#include <kmainwindow.h>
class QPushButton;
@@ -53,16 +53,16 @@ class KSelectAction;
struct gpgKey
{
- QString gpgkeymail;
- QString gpgkeyname;
- QString gpgkeyid;
- QString gpgkeytrust;
- QString gpgkeyvalidity;
- QString gpgkeysize;
- QString gpgkeycreation;
- QString gpgkeyexpiration;
- QString gpgkeyalgo;
- QPixmap trustpic;
+ TQString gpgkeymail;
+ TQString gpgkeyname;
+ TQString gpgkeyid;
+ TQString gpgkeytrust;
+ TQString gpgkeyvalidity;
+ TQString gpgkeysize;
+ TQString gpgkeycreation;
+ TQString gpgkeyexpiration;
+ TQString gpgkeyalgo;
+ TQPixmap trustpic;
};
class KgpgSelKey : public KDialogBase
@@ -70,20 +70,20 @@ class KgpgSelKey : public KDialogBase
Q_OBJECT
public:
- KgpgSelKey( QWidget *parent = 0, const char *name = 0,bool allowMultipleSelection=false, QString preselected=QString::null);
+ KgpgSelKey( TQWidget *parent = 0, const char *name = 0,bool allowMultipleSelection=false, TQString preselected=TQString::null);
KListView *keysListpr;
- QPixmap keyPair;
- QCheckBox *local;
- QVBoxLayout *vbox;
- QWidget *page;
+ TQPixmap keyPair;
+ TQCheckBox *local;
+ TQVBoxLayout *vbox;
+ TQWidget *page;
private slots:
void slotOk();
void slotpreOk();
- void slotSelect(QListViewItem *item);
+ void slotSelect(TQListViewItem *item);
public slots:
- QString getkeyID();
- QString getkeyMail();
+ TQString getkeyID();
+ TQString getkeyMail();
};
@@ -93,19 +93,19 @@ class KeyView : public KListView
Q_OBJECT
friend class listKeys;
public:
- KeyView( QWidget *parent = 0, const char *name = 0);
+ KeyView( TQWidget *parent = 0, const char *name = 0);
bool displayPhoto,displayOnlySecret,displayDisabled;
int previewSize;
- QString secretList;
- QPixmap trustbad;
+ TQString secretList;
+ TQPixmap trustbad;
private:
- QString orphanList;
- QString photoKeysList;
- QPixmap pixkeyPair, pixkeySingle, pixkeyGroup, pixsignature, pixuserid, pixuserphoto;
- QPixmap trustunknown, trustrevoked, trustgood, pixRevoke, pixkeyOrphan;
- QListViewItem *itemToOpen;
+ TQString orphanList;
+ TQString photoKeysList;
+ TQPixmap pixkeyPair, pixkeySingle, pixkeyGroup, pixsignature, pixuserid, pixuserphoto;
+ TQPixmap trustunknown, trustrevoked, trustgood, pixRevoke, pixkeyOrphan;
+ TQListViewItem *itemToOpen;
KTempFile *kgpgphototmp;
int groupNb;
@@ -114,44 +114,44 @@ public slots:
void slotAddColumn(int c);
private slots:
- void refreshTrust(int color,QColor newColor);
+ void refreshTrust(int color,TQColor newColor);
void droppedfile (KURL);
void refreshkeylist();
- gpgKey extractKey(QString keyColon);
- void expandKey(QListViewItem *item);
- void expandGroup(QListViewItem *item);
- void refreshcurrentkey(QListViewItem *current);
- void refreshcurrentkey(QString currentID);
+ gpgKey extractKey(TQString keyColon);
+ void expandKey(TQListViewItem *item);
+ void expandGroup(TQListViewItem *item);
+ void refreshcurrentkey(TQListViewItem *current);
+ void refreshcurrentkey(TQString currentID);
void refreshselfkey();
void refreshgroups();
- void insertOrphanedKeys(QStringList orpans);
- void insertOrphan(QString currentID);
- QPixmap slotGetPhoto(QString photoId,bool mini=false);
- void slotReloadKeys(QStringList keyIDs);
+ void insertOrphanedKeys(TQStringList orpans);
+ void insertOrphan(TQString currentID);
+ TQPixmap slotGetPhoto(TQString photoId,bool mini=false);
+ void slotReloadKeys(TQStringList keyIDs);
void slotReloadOrphaned();
signals:
- void statusMessage(QString,int,bool keep=false);
+ void statusMessage(TQString,int,bool keep=false);
protected:
virtual void startDrag();
- virtual void contentsDragMoveEvent(QDragMoveEvent *e);
- virtual void contentsDropEvent (QDropEvent*);
+ virtual void contentsDragMoveEvent(TQDragMoveEvent *e);
+ virtual void contentsDropEvent (TQDropEvent*);
};
class mySearchLine: public KListViewSearchLine
{
Q_OBJECT
public:
- mySearchLine(QWidget *parent = 0, KeyView *listView = 0, const char *name = 0);
+ mySearchLine(TQWidget *parent = 0, KeyView *listView = 0, const char *name = 0);
virtual ~mySearchLine();
private:
KeyView *searchListView;
public slots:
-virtual void updateSearch(const QString &s = QString::null);
+virtual void updateSearch(const TQString &s = TQString::null);
protected:
-virtual bool itemMatches(const QListViewItem *item, const QString & s) const;
+virtual bool itemMatches(const TQListViewItem *item, const TQString & s) const;
};
@@ -161,13 +161,13 @@ class listKeys : public KMainWindow, virtual public KeyInterface
Q_OBJECT
public:
- listKeys(QWidget *parent=0, const char *name=0);
+ listKeys(TQWidget *parent=0, const char *name=0);
~listKeys();
- QLabel *keyPhoto;
+ TQLabel *keyPhoto;
KeyView *keysList2;
- QPopupMenu *popup,*popupsec,*popupout,*popupsig,*popupgroup,*popupphoto,*popupuid,*popuporphan;
- QString message;
- QStringList keynames;
+ TQPopupMenu *popup,*popupsec,*popupout,*popupsig,*popupgroup,*popupphoto,*popupuid,*popuporphan;
+ TQString message;
+ TQStringList keynames;
KPassivePopup *pop;
KToggleAction *sTrust,*sCreat,*sExpi,*sSize;
KSelectAction *photoProps;
@@ -175,45 +175,45 @@ public:
KgpgApp *s_kgpgEditor;
private:
- QPushButton *bouton1,*bouton2,*bouton0;
- QString tempKeyFile,newKeyMail,newKeyName,newkeyFinger,newkeyID;
+ TQPushButton *bouton1,*bouton2,*bouton0;
+ TQString tempKeyFile,newKeyMail,newKeyName,newkeyFinger,newkeyID;
KListViewSearchLine* listViewSearch;
bool continueSearch;
bool showPhoto;
keyServer *kServer;
KTempFile *kgpgtmp;
KAction *importSignatureKey,*importAllSignKeys,*signKey,*refreshKey;
- QPtrList<QListViewItem> signList,keysList;
+ TQPtrList<TQListViewItem> signList,keysList;
uint globalCount,keyCount;
int globalChecked;
bool globalisLocal,showTipOfDay;
- QString globalkeyMail,globalkeyID,searchString;
+ TQString globalkeyMail,globalkeyID,searchString;
long searchOptions;
groupEdit *gEdit;
KgpgInterface *revKeyProcess;
KDialogBase *addUidWidget;
QClipboard::Mode clipboardMode;
- QTimer *statusbarTimer;
+ TQTimer *statusbarTimer;
protected:
- void closeEvent( QCloseEvent * e );
- bool eventFilter( QObject *, QEvent *e );
+ void closeEvent( TQCloseEvent * e );
+ bool eventFilter( TQObject *, TQEvent *e );
public slots:
void slotgenkey();
void refreshkey();
void readAllOptions();
- void showKeyInfo(QString keyID);
+ void showKeyInfo(TQString keyID);
void findKey();
void findFirstKey();
void findNextKey();
- void slotSetDefaultKey(QString newID);
+ void slotSetDefaultKey(TQString newID);
private slots:
void quitApp();
void slotOpenEditor();
- void changeMessage(QString,int, bool keep=false);
+ void changeMessage(TQString,int, bool keep=false);
void statusBarTimeout();
void slotShowTrust();
void slotShowSize();
@@ -224,8 +224,8 @@ private slots:
void slotGotoDefaultKey();
void slotDelUid();
void slotAddUid();
- void slotAddUidEnable(const QString & name);
- void slotGpgError(QString errortxt);
+ void slotAddUidEnable(const TQString & name);
+ void slotGpgError(TQString errortxt);
void slotUpdatePhoto();
void slotDeletePhoto();
void slotAddPhoto();
@@ -233,10 +233,10 @@ private slots:
void slotShowPhoto();
void readgenprocess(KProcIO *p);
void newKeyDone(KProcess *);
- void slotrevoke(QString keyID,QString revokeUrl,int reason,QString description);
+ void slotrevoke(TQString keyID,TQString revokeUrl,int reason,TQString description);
void revokeWidget();
- void doFilePrint(QString url);
- void doPrint(QString txt);
+ void doFilePrint(TQString url);
+ void doPrint(TQString txt);
void checkList();
void signLoop();
void slotManpage();
@@ -244,13 +244,13 @@ private slots:
void showKeyServer();
void showKeyManager();
void slotReadFingerProcess(KProcIO *p);
- void slotProcessExportMail(QString keys);
- void slotProcessExportClip(QString keys);
+ void slotProcessExportMail(TQString keys);
+ void slotProcessExportClip(TQString keys);
void readOptions();
void genover(KProcess *p);
void showOptions();
void slotSetDefKey();
- void slotSetDefaultKey(QListViewItem *newdef);
+ void slotSetDefaultKey(TQListViewItem *newdef);
void annule();
void confirmdeletekey();
void deletekey();
@@ -258,8 +258,8 @@ private slots:
void signkey();
void delsignkey();
void preimportsignkey();
- bool importRemoteKey(QString keyID);
- void importsignkey(QString importKeyId);
+ bool importRemoteKey(TQString keyID);
+ void importsignkey(TQString importKeyId);
void importallsignkey();
void importfinished();
void signatureResult(int success);
@@ -267,7 +267,7 @@ private slots:
void listsigns();
void slotexport();
void slotexportsec();
- void slotmenu(QListViewItem *,const QPoint &,int);
+ void slotmenu(TQListViewItem *,const TQPoint &,int);
void slotPreImportKey();
void slotedit();
void addToKAB();
@@ -275,12 +275,12 @@ private slots:
void editGroup();
void groupAdd();
void groupRemove();
- void groupInit(QStringList keysGroup);
+ void groupInit(TQStringList keysGroup);
void groupChange();
void createNewGroup();
void deleteGroup();
- void slotImportRevoke(QString url);
- void slotImportRevokeTxt(QString revokeText);
+ void slotImportRevoke(TQString url);
+ void slotImportRevokeTxt(TQString revokeText);
void refreshKeyFromServer();
void refreshFinished();
void slotregenerate();
@@ -289,9 +289,9 @@ private slots:
signals:
void readAgainOptions();
- void certificate(QString);
+ void certificate(TQString);
void closeAsked();
- void fontChanged(QFont);
+ void fontChanged(TQFont);
void encryptFiles(KURL::List);
void installShredder();
diff --git a/kgpg/main.cpp b/kgpg/main.cpp
index 622739f..e0bce49 100644
--- a/kgpg/main.cpp
+++ b/kgpg/main.cpp
@@ -15,7 +15,7 @@
* *
***************************************************************************/
-#include <qstring.h>
+#include <tqstring.h>
#include <kmessagebox.h>
@@ -55,7 +55,7 @@ int main(int argc, char *argv[])
KUniqueApplication::addCmdLineOptions();
- //KMessageBox::sorry(0,"nombre: "+QString::number(i));
+ //KMessageBox::sorry(0,"nombre: "+TQString::number(i));
if (!KUniqueApplication::start())
return 0;
diff --git a/kgpg/popuppublic.cpp b/kgpg/popuppublic.cpp
index 167423c..3a1461d 100644
--- a/kgpg/popuppublic.cpp
+++ b/kgpg/popuppublic.cpp
@@ -16,17 +16,17 @@
***************************************************************************/
//////////////////////////////////////////////////////// code for choosing a public key from a list for encryption
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qptrlist.h>
-#include <qwhatsthis.h>
-#include <qpainter.h>
-#include <qiconset.h>
-#include <qbuttongroup.h>
-#include <qcheckbox.h>
-#include <qhbuttongroup.h>
-#include <qtoolbutton.h>
-#include <qtextcodec.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqptrlist.h>
+#include <tqwhatsthis.h>
+#include <tqpainter.h>
+#include <tqiconset.h>
+#include <tqbuttongroup.h>
+#include <tqcheckbox.h>
+#include <tqhbuttongroup.h>
+#include <tqtoolbutton.h>
+#include <tqtextcodec.h>
#include <kdeversion.h>
#include <klistview.h>
@@ -54,13 +54,13 @@
class UpdateViewItem2 : public KListViewItem
{
public:
- UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault);
- virtual void paintCell(QPainter *p, const QColorGroup &cg,int col, int width, int align);
- virtual QString key(int c,bool ) const;
+ UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault);
+ virtual void paintCell(TQPainter *p, const TQColorGroup &cg,int col, int width, int align);
+ virtual TQString key(int c,bool ) const;
bool def;
};
-UpdateViewItem2::UpdateViewItem2(QListView *parent, QString name,QString mail,QString id,bool isDefault)
+UpdateViewItem2::UpdateViewItem2(TQListView *parent, TQString name,TQString mail,TQString id,bool isDefault)
: KListViewItem(parent)
{
def=isDefault;
@@ -70,29 +70,29 @@ def=isDefault;
}
-void UpdateViewItem2::paintCell(QPainter *p, const QColorGroup &cg,int column, int width, int alignment)
+void UpdateViewItem2::paintCell(TQPainter *p, const TQColorGroup &cg,int column, int width, int alignment)
{
if ((def) && (column<2)) {
- QFont font(p->font());
+ TQFont font(p->font());
font.setBold(true);
p->setFont(font);
}
KListViewItem::paintCell(p, cg, column, width, alignment);
}
-QString UpdateViewItem2 :: key(int c,bool ) const
+TQString UpdateViewItem2 :: key(int c,bool ) const
{
return text(c).lower();
}
/////////////// main view
-popupPublic::popupPublic(QWidget *parent, const char *name,QString sfile,bool filemode,KShortcut goDefaultKey):
+popupPublic::popupPublic(TQWidget *parent, const char *name,TQString sfile,bool filemode,KShortcut goDefaultKey):
KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent, name,true)
{
- QWidget *page = plainPage();
- QVBoxLayout *vbox=new QVBoxLayout(page,0,spacingHint());
+ TQWidget *page = plainPage();
+ TQVBoxLayout *vbox=new TQVBoxLayout(page,0,spacingHint());
vbox->setAutoAdd(true);
setButtonText(KDialogBase::Details,i18n("Options"));
@@ -109,18 +109,18 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
if (filemode) setCaption(i18n("Select Public Key for %1").arg(sfile));
fmode=filemode;
- QHButtonGroup *hBar=new QHButtonGroup(page);
- //hBar->setFrameStyle(QFrame::NoFrame);
+ TQHButtonGroup *hBar=new TQHButtonGroup(page);
+ //hBar->setFrameStyle(TQFrame::NoFrame);
hBar->setMargin(0);
#if KDE_IS_VERSION( 3, 2, 90 )
- QToolButton *clearSearch = new QToolButton(hBar);
+ TQToolButton *clearSearch = new TQToolButton(hBar);
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: "),hBar);
+ (void) new TQLabel(i18n("Search: "),hBar);
KListViewSearchLine* listViewSearch = new KListViewSearchLine(hBar);
- connect(clearSearch, SIGNAL(pressed()), listViewSearch, SLOT(clear()));
+ connect(clearSearch, TQT_SIGNAL(pressed()), listViewSearch, TQT_SLOT(clear()));
#endif
keysList = new KListView( page );
@@ -138,54 +138,54 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
keysList->setFullWidth(true);
keysList->setAllColumnsShowFocus(true);
keysList->setSelectionModeExt(KListView::Extended);
- keysList->setColumnWidthMode(0,QListView::Manual);
- keysList->setColumnWidthMode(1,QListView::Manual);
+ keysList->setColumnWidthMode(0,TQListView::Manual);
+ keysList->setColumnWidthMode(1,TQListView::Manual);
keysList->setColumnWidth(0,210);
keysList->setColumnWidth(1,210);
- boutonboxoptions=new QButtonGroup(5,Qt::Vertical ,page,0);
+ boutonboxoptions=new TQButtonGroup(5,Qt::Vertical ,page,0);
KActionCollection *actcol=new KActionCollection(this);
- (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
+ (void) new KAction(i18n("&Go to Default Key"),goDefaultKey, this, TQT_SLOT(slotGotoDefaultKey()),actcol,"go_default_key");
- CBarmor=new QCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
- CBuntrusted=new QCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
- CBhideid=new QCheckBox(i18n("Hide user id"),boutonboxoptions);
+ CBarmor=new TQCheckBox(i18n("ASCII armored encryption"),boutonboxoptions);
+ CBuntrusted=new TQCheckBox(i18n("Allow encryption with untrusted keys"),boutonboxoptions);
+ CBhideid=new TQCheckBox(i18n("Hide user id"),boutonboxoptions);
setDetailsWidget(boutonboxoptions);
- QWhatsThis::add
+ TQWhatsThis::add
(keysList,i18n("<b>Public keys list</b>: select the key that will be used for encryption."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBarmor,i18n("<b>ASCII encryption</b>: makes it possible to open the encrypted file/message in a text editor"));
- QWhatsThis::add
+ TQWhatsThis::add
(CBhideid,i18n("<b>Hide user ID</b>: Do not put the keyid into encrypted packets. This option hides the receiver "
"of the message and is a countermeasure against traffic analysis. It may slow down the decryption process because "
"all available secret keys are tried."));
- QWhatsThis::add
+ TQWhatsThis::add
(CBuntrusted,i18n("<b>Allow encryption with untrusted keys</b>: when you import a public key, it is usually "
"marked as untrusted and you cannot use it unless you sign it in order to make it 'trusted'. Checking this "
"box enables you to use any key, even if it has not be signed."));
if (filemode) {
- QWidget *parentBox=new QWidget(boutonboxoptions);
- QHBoxLayout *shredBox=new QHBoxLayout(parentBox,0);
- //shredBox->setFrameStyle(QFrame::NoFrame);
+ TQWidget *parentBox=new TQWidget(boutonboxoptions);
+ TQHBoxLayout *shredBox=new TQHBoxLayout(parentBox,0);
+ //shredBox->setFrameStyle(TQFrame::NoFrame);
//shredBox->setMargin(0);
- CBshred=new QCheckBox(i18n("Shred source file"),parentBox);
- QWhatsThis::add
+ CBshred=new TQCheckBox(i18n("Shred source file"),parentBox);
+ TQWhatsThis::add
(CBshred,i18n("<b>Shred source file</b>: permanently remove source file. No recovery will be possible"));
- QString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
+ TQString shredWhatsThis = i18n( "<qt><b>Shred source file:</b><br /><p>Checking this option will shred (overwrite several times before erasing) the files you have encrypted. This way, it is almost impossible that the source file is recovered.</p><p><b>But you must be aware that this is not secure</b> on all file systems, and that parts of the file may have been saved in a temporary file or in the spooler of your printer if you previously opened it in an editor or tried to print it. Only works on files (not on folders).</p></qt>");
KActiveLabel *warn= new KActiveLabel( i18n("<a href=\"whatsthis:%1\">Read this before using shredding</a>").arg(shredWhatsThis),parentBox );
shredBox->addWidget(CBshred);
shredBox->addWidget(warn);
}
- CBsymmetric=new QCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
- QWhatsThis::add
+ CBsymmetric=new TQCheckBox(i18n("Symmetrical encryption"),boutonboxoptions);
+ TQWhatsThis::add
(CBsymmetric,i18n("<b>Symmetrical encryption</b>: encryption does not use keys. You just need to give a password "
"to encrypt/decrypt the file"));
- QObject::connect(CBsymmetric,SIGNAL(toggled(bool)),this,SLOT(isSymetric(bool)));
+ TQObject::connect(CBsymmetric,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(isSymetric(bool)));
CBarmor->setChecked( KGpgSettings::asciiArmor() );
CBuntrusted->setChecked( KGpgSettings::allowUntrustedKeys() );
@@ -193,27 +193,27 @@ KDialogBase( Plain, i18n("Select Public Key"), Details | Ok | Cancel, Ok, parent
if (filemode) CBshred->setChecked( KGpgSettings::shredSource() );
if (KGpgSettings::allowCustomEncryptionOptions()) {
- QHButtonGroup *bGroup = new QHButtonGroup(page);
- //bGroup->setFrameStyle(QFrame::NoFrame);
- (void) new QLabel(i18n("Custom option:"),bGroup);
+ TQHButtonGroup *bGroup = new TQHButtonGroup(page);
+ //bGroup->setFrameStyle(TQFrame::NoFrame);
+ (void) new TQLabel(i18n("Custom option:"),bGroup);
KLineEdit *optiontxt=new KLineEdit(bGroup);
optiontxt->setText(customOptions);
- QWhatsThis::add
+ TQWhatsThis::add
(optiontxt,i18n("<b>Custom option</b>: for experienced users only, allows you to enter a gpg command line option, like: '--armor'"));
- QObject::connect(optiontxt,SIGNAL(textChanged ( const QString & )),this,SLOT(customOpts(const QString & )));
+ TQObject::connect(optiontxt,TQT_SIGNAL(textChanged ( const TQString & )),this,TQT_SLOT(customOpts(const TQString & )));
}
- QObject::connect(keysList,SIGNAL(doubleClicked(QListViewItem *,const QPoint &,int)),this,SLOT(slotOk()));
-// QObject::connect(this,SIGNAL(okClicked()),this,SLOT(crypte()));
- QObject::connect(CBuntrusted,SIGNAL(toggled(bool)),this,SLOT(refresh(bool)));
+ TQObject::connect(keysList,TQT_SIGNAL(doubleClicked(TQListViewItem *,const TQPoint &,int)),this,TQT_SLOT(slotOk()));
+// TQObject::connect(this,TQT_SIGNAL(okClicked()),this,TQT_SLOT(crypte()));
+ TQObject::connect(CBuntrusted,TQT_SIGNAL(toggled(bool)),this,TQT_SLOT(refresh(bool)));
char line[200]="\0";
FILE *fp2;
- seclist=QString::null;
+ seclist=TQString::null;
fp2 = popen("gpg --no-secmem-warning --no-tty --with-colon --list-secret-keys ", "r");
while ( fgets( line, sizeof(line), fp2))
{
- QString readLine=QString::fromUtf8(line);
+ TQString readLine=TQString::fromUtf8(line);
if (readLine.startsWith("sec")) seclist+=", 0x"+readLine.section(":",4,4).right(8);
}
pclose(fp2);
@@ -238,7 +238,7 @@ accept();
void popupPublic::enable()
{
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
current->setVisible(true);
@@ -252,7 +252,7 @@ void popupPublic::enable()
void popupPublic::sort()
{
bool reselect=false;
- QListViewItem *current = keysList->firstChild();
+ TQListViewItem *current = keysList->firstChild();
if (current==NULL)
return;
@@ -276,7 +276,7 @@ void popupPublic::sort()
}
if (reselect || !keysList->currentItem()->isVisible()) {
- QListViewItem *firstvisible;
+ TQListViewItem *firstvisible;
firstvisible=keysList->firstChild();
while (firstvisible->isVisible()!=true) {
firstvisible=firstvisible->nextSibling();
@@ -297,14 +297,14 @@ void popupPublic::isSymetric(bool state)
}
-void popupPublic::customOpts(const QString &str)
+void popupPublic::customOpts(const TQString &str)
{
customOptions=str;
}
void popupPublic::slotGotoDefaultKey()
{
- QListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
+ TQListViewItem *myDefaulKey = keysList->findItem(KGpgSettings::defaultKey(),2);
keysList->clearSelection();
keysList->setCurrentItem(myDefaulKey);
keysList->setSelected(myDefaulKey,true);
@@ -322,29 +322,29 @@ void popupPublic::refresh(bool state)
void popupPublic::refreshkeys()
{
keysList->clear();
- QStringList groups= QStringList::split(",", KGpgSettings::groups());
+ TQStringList groups= TQStringList::split(",", KGpgSettings::groups());
if (!groups.isEmpty())
{
- for ( QStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
+ for ( TQStringList::Iterator it = groups.begin(); it != groups.end(); ++it )
{
- if (!QString(*it).isEmpty())
+ if (!TQString(*it).isEmpty())
{
- UpdateViewItem2 *item=new UpdateViewItem2(keysList,QString(*it),QString::null,QString::null,false);
+ UpdateViewItem2 *item=new UpdateViewItem2(keysList,TQString(*it),TQString::null,TQString::null,false);
item->setPixmap(0,keyGroup);
}
}
}
- KProcIO *encid=new KProcIO(QTextCodec::codecForLocale());
+ KProcIO *encid=new KProcIO(TQTextCodec::codecForLocale());
*encid << "gpg"<<"--no-secmem-warning"<<"--no-tty"<<"--with-colon"<<"--list-keys";
///////// when process ends, update dialog infos
- QObject::connect(encid, SIGNAL(processExited(KProcess *)),this, SLOT(slotpreselect()));
- QObject::connect(encid, SIGNAL(readReady(KProcIO *)),this, SLOT(slotprocread(KProcIO *)));
+ TQObject::connect(encid, TQT_SIGNAL(processExited(KProcess *)),this, TQT_SLOT(slotpreselect()));
+ TQObject::connect(encid, TQT_SIGNAL(readReady(KProcIO *)),this, TQT_SLOT(slotprocread(KProcIO *)));
encid->start(KProcess::NotifyOnExit,true);
}
void popupPublic::slotpreselect()
{
-QListViewItem *it=NULL;
+TQListViewItem *it=NULL;
if (!keysList->firstChild()) return;
if (fmode) it=keysList->findItem(KGpgSettings::defaultKey(),2);
if (!trusted)
@@ -368,20 +368,20 @@ void popupPublic::slotprocread(KProcIO *p)
{
///////////////////////////////////////////////////////////////// extract encryption keys
bool dead;
- QString tst,keyname,keymail;
+ TQString tst,keyname,keymail;
- QString defaultKey = KGpgSettings::defaultKey().right(8);
+ TQString defaultKey = KGpgSettings::defaultKey().right(8);
while (p->readln(tst)!=-1) {
if (tst.startsWith("pub")) {
- QStringList keyString=QStringList::split(":",tst,true);
+ TQStringList keyString=TQStringList::split(":",tst,true);
dead=false;
- const QString trust=keyString[1];
- QString val=keyString[6];
- QString id=QString("0x"+keyString[4].right(8));
+ const TQString trust=keyString[1];
+ TQString val=keyString[6];
+ TQString id=TQString("0x"+keyString[4].right(8));
if (val.isEmpty())
val=i18n("Unlimited");
- QString tr;
+ TQString tr;
switch( trust[0] ) {
case 'o':
untrustedList<<id;
@@ -424,7 +424,7 @@ void popupPublic::slotprocread(KProcIO *p)
//if (keyname.find("(")!=-1)
// keyname=keyname.section('(',0,0);
} else {
- keymail=QString::null;
+ keymail=TQString::null;
keyname=tst;//.section('(',0,0);
}
if ((!dead) && (!tst.isEmpty())) {
@@ -447,9 +447,9 @@ void popupPublic::slotOk()
{
////// emit selected data
kdDebug(2100)<<"Ok pressed"<<endl;
- QStringList selectedKeys;
- QString userid;
- QPtrList<QListViewItem> list=keysList->selectedItems();
+ TQStringList selectedKeys;
+ TQString userid;
+ TQPtrList<TQListViewItem> list=keysList->selectedItems();
for ( uint i = 0; i < list.count(); ++i )
if ( list.at(i) && list.at(i)->isVisible()) {
@@ -460,7 +460,7 @@ kdDebug(2100)<<"Ok pressed"<<endl;
return;
if (CBsymmetric->isChecked()) selectedKeys=NULL;
kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
- QStringList returnOptions;
+ TQStringList returnOptions;
if (CBuntrusted->isChecked())
returnOptions<<"--always-trust";
if (CBarmor->isChecked())
@@ -468,7 +468,7 @@ kdDebug(2100)<<"Selected Key:"<<selectedKeys<<endl;
if (CBhideid->isChecked())
returnOptions<<"--throw-keyid";
if ((KGpgSettings::allowCustomEncryptionOptions()) && (!customOptions.stripWhiteSpace().isEmpty()))
- returnOptions.operator+ (QStringList::split(QString(" "),customOptions.simplifyWhiteSpace()));
+ returnOptions.operator+ (TQStringList::split(TQString(" "),customOptions.simplifyWhiteSpace()));
//hide();
if (fmode)
emit selectedKey(selectedKeys,returnOptions,CBshred->isChecked(),CBsymmetric->isChecked());
diff --git a/kgpg/popuppublic.h b/kgpg/popuppublic.h
index e0d2bb5..e158adc 100644
--- a/kgpg/popuppublic.h
+++ b/kgpg/popuppublic.h
@@ -34,22 +34,22 @@ class popupPublic : public KDialogBase //QDialog
Q_OBJECT
public:
- popupPublic(QWidget *parent=0, const char *name=0,QString sfile="",bool filemode=false,KShortcut goDefaultKey=QKeySequence(CTRL+Qt::Key_Home));
+ popupPublic(TQWidget *parent=0, const char *name=0,TQString sfile="",bool filemode=false,KShortcut goDefaultKey=TQKeySequence(CTRL+Qt::Key_Home));
~popupPublic();
KListView *keysList;
- QCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
+ TQCheckBox *CBarmor,*CBuntrusted,*CBshred,*CBsymmetric,*CBhideid;
bool fmode,trusted;
- QPixmap keyPair,keySingle,keyGroup;
- QString seclist;
- QStringList untrustedList;
+ TQPixmap keyPair,keySingle,keyGroup;
+ TQString seclist;
+ TQStringList untrustedList;
private:
KConfig *config;
- QButtonGroup *boutonboxoptions;
- QString customOptions;
+ TQButtonGroup *boutonboxoptions;
+ TQString customOptions;
private slots:
- void customOpts(const QString &);
+ void customOpts(const TQString &);
void slotprocread(KProcIO *);
void slotpreselect();
void refreshkeys();
@@ -67,7 +67,7 @@ protected slots:
virtual void slotOk();
signals:
- void selectedKey(QStringList ,QStringList,bool,bool);
+ void selectedKey(TQStringList ,TQStringList,bool,bool);
void keyListFilled();
};