diff options
author | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-09-30 13:31:21 +0000 |
---|---|---|
committer | ubbo <ubbo@34ebc366-c3a9-4b3c-9f84-69acf7962910> | 2012-09-30 13:31:21 +0000 |
commit | acd3df80be547d901613077d7d1a41b049ca371c (patch) | |
tree | 31b3fcf91b962a92746a3f6ee777f0bf6a67ddaf | |
parent | close progressdialog when keygeneration finished (diff) | |
download | gpg4usb-acd3df80be547d901613077d7d1a41b049ca371c.tar.gz gpg4usb-acd3df80be547d901613077d7d1a41b049ca371c.zip |
connect progressinfo, doesn't do anything useful yet, maybe job needs to run in background
git-svn-id: http://cpunk.de/svn/src/gpg4usb/trunk@988 34ebc366-c3a9-4b3c-9f84-69acf7962910
-rw-r--r-- | keygendialog.cpp | 6 | ||||
-rw-r--r-- | keygendialog.h | 2 | ||||
-rw-r--r-- | kgpg/transactions/kgpggeneratekey.cpp | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/keygendialog.cpp b/keygendialog.cpp index 36040e2..35bf93a 100644 --- a/keygendialog.cpp +++ b/keygendialog.cpp @@ -175,6 +175,7 @@ void KeyGenDialog::slotKeyGenAccept() //connect(m_genkey, SIGNAL(result(KJob*)), SLOT(slotGenerateKeyDone(KJob*))); connect(genkey, SIGNAL(done(int)), SLOT(slotGenkeyDone(int))); + connect(genkey, SIGNAL(infoProgress(qulonglong,qulonglong)), SLOT(slotInfoProgress(qulonglong,qulonglong))); genkey->start(); this->accept(); @@ -241,8 +242,11 @@ void KeyGenDialog::slotGenkeyDone(int result) { QMessageBox::warning(this, infomessage, tr("gpg process did not finish. Cannot generate a new key pair.").arg(genkey->gpgErrorMessage())); } +} - +void KeyGenDialog::slotInfoProgress(qulonglong processedAmount, qulonglong totalAmount) +{ + qDebug() << "pA: " << processedAmount << " | tA: " << totalAmount; } void KeyGenDialog::slotExpireBoxChanged() diff --git a/keygendialog.h b/keygendialog.h index 38c8222..325c6f4 100644 --- a/keygendialog.h +++ b/keygendialog.h @@ -95,5 +95,7 @@ private slots: void slotGenkeyDone(int result); + void slotInfoProgress(qulonglong processedAmount, qulonglong totalAmount); + }; #endif // __KEYGENDIALOG_H__ diff --git a/kgpg/transactions/kgpggeneratekey.cpp b/kgpg/transactions/kgpggeneratekey.cpp index 52fc1a2..55ab8ba 100644 --- a/kgpg/transactions/kgpggeneratekey.cpp +++ b/kgpg/transactions/kgpggeneratekey.cpp @@ -18,6 +18,7 @@ //#include <KLocale> //#include <KMessageBox> //#include <kpimutils/email.h> +#include <QDebug> #include <QApplication> KGpgGenerateKey::KGpgGenerateKey(QObject *parent, const QString &name, const QString &email, const QString &comment, @@ -132,6 +133,8 @@ KGpgGenerateKey::nextLine(const QString &line) int result = false; + //qDebug() << "line:" << line; + if (line.contains(QLatin1String( "PROGRESS" ))) { QStringList parts(line.mid(18).split(QLatin1Char( ' ' ))); if (parts.count() >= 4) { @@ -169,6 +172,7 @@ KGpgGenerateKey::nextLine(const QString &line) } emit statusMessage(msg); + //qDebug() << "generateKey says: " << msg; return result; } |