summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrius Štikonas <andrius@stikonas.eu>2016-06-04 22:42:29 (GMT)
committerAndrius Štikonas <andrius@stikonas.eu>2016-06-04 22:42:29 (GMT)
commitb2a69979a3e02bb7525d8fef27be38efa426fc4c (patch)
tree50c77e5a1c013d1bcc18f9ff56b1989798c01b38
parent2490f061b9c5d954ab69e146bf43ab72abdb3ee0 (diff)
Port away from KProgressDialog to QProgressDialog.
-rw-r--r--transactions/kgpgkeyservertransaction.cpp14
-rw-r--r--transactions/kgpgkeyservertransaction.h4
2 files changed, 11 insertions, 7 deletions
diff --git a/transactions/kgpgkeyservertransaction.cpp b/transactions/kgpgkeyservertransaction.cpp
index 3656908..11258a3 100644
--- a/transactions/kgpgkeyservertransaction.cpp
+++ b/transactions/kgpgkeyservertransaction.cpp
@@ -16,7 +16,9 @@
#include "gpgproc.h"
#include <KLocale>
-#include <KProgressDialog>
+
+#include <QLabel>
+#include <QProgressDialog>
KGpgKeyserverTransaction::KGpgKeyserverTransaction(QObject *parent, const QString &keyserver, const bool withProgress, const QString &proxy)
: KGpgTransaction(parent),
@@ -89,13 +91,15 @@ KGpgKeyserverTransaction::setProgressEnable(const bool b)
m_showprogress = b;
if (b && (m_progress == Q_NULLPTR)) {
- m_progress = new KProgressDialog(qobject_cast<QWidget *>(parent()),
- i18n("Keyserver"), i18n("<b>Connecting to the server...</b>"));
+ m_progress = new QProgressDialog(qobject_cast<QWidget *>(parent()));
+ QLabel *label = new QLabel(i18n("<b>Connecting to the server...</b>"));
+ m_progress->setWindowTitle(i18n("Keyserver"));
+ m_progress->setLabel(label);
m_progress->hide();
m_progress->setModal(true);
- m_progress->progressBar()->setRange(0, 0);
+ m_progress->setRange(0, 0);
- connect(m_progress, SIGNAL(cancelClicked()), SLOT(slotAbort()));
+ connect(m_progress, SIGNAL(canceled()), SLOT(slotAbort()));
}
}
diff --git a/transactions/kgpgkeyservertransaction.h b/transactions/kgpgkeyservertransaction.h
index 5e3010e..87615c4 100644
--- a/transactions/kgpgkeyservertransaction.h
+++ b/transactions/kgpgkeyservertransaction.h
@@ -19,7 +19,7 @@
#include "kgpgtransaction.h"
-class KProgressDialog;
+class QProgressDialog;
/**
* @brief base class for transactions involving key servers
@@ -83,7 +83,7 @@ private:
int m_keyserverpos;
QString m_proxy;
int m_proxypos;
- KProgressDialog *m_progress;
+ QProgressDialog *m_progress;
bool m_showprogress;
};