[SCM] ktp-text-ui packaging branch, master, updated. debian/15.12.1-1-1918-gdf4b0ec
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:25:05 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-text-ui.git;a=commitdiff;h=8a07df0
The following commit has been merged in the master branch:
commit 8a07df00f2999a79274e3169af5caa841afad75b
Author: Martin Klapetek <mklapetek at kde.org>
Date: Fri Jan 9 20:30:41 2015 +0100
[lib] Port KDialog to QDialog
---
lib/proxy-service.cpp | 29 +++++++++++++++++++++--------
1 file changed, 21 insertions(+), 8 deletions(-)
diff --git a/lib/proxy-service.cpp b/lib/proxy-service.cpp
index 0bd1fc9..0011b39 100644
--- a/lib/proxy-service.cpp
+++ b/lib/proxy-service.cpp
@@ -24,14 +24,18 @@
#include <QMap>
#include <QScopedPointer>
#include <QCloseEvent>
-#include <KDialog>
+#include <QDialog>
+#include <QDialogButtonBox>
+#include <QVBoxLayout>
+#include <QPushButton>
+
#include <KLocalizedString>
-class KeyGenDialog : public KDialog
+class KeyGenDialog : public QDialog
{
public:
KeyGenDialog(const QString &accountName, QWidget *parent = 0)
- : KDialog(parent),
+ : QDialog(parent),
blocked(true),
accountName(accountName)
{
@@ -39,10 +43,17 @@ class KeyGenDialog : public KDialog
ui.setupUi(widget);
ui.lbText->setText(i18n("Generating the private key for %1...", accountName));
ui.lbTime->setText(i18n("This may take some time"));
- setMainWidget(widget);
- this->setCaption(i18n("Please wait"));
- this->setButtons(KDialog::Ok);
- this->enableButton(KDialog::Ok, false);
+
+ QVBoxLayout *mainLayout = new QVBoxLayout(this);
+ setLayout(mainLayout);
+ mainLayout->addWidget(widget);
+
+ buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok, this);
+ buttonBox->button(QDialogButtonBox::Ok)->setDisabled(true);
+ mainLayout->addWidget(buttonBox);
+
+ this->setWindowTitle(i18n("Please wait"));
+
ui.keyIcon->setPixmap(QIcon::fromTheme(QStringLiteral("dialog-password")).pixmap( 48, 48 ));
}
~KeyGenDialog()
@@ -77,13 +88,15 @@ class KeyGenDialog : public KDialog
} else {
ui.lbText->setText(i18n("Finished generating the private key for %1", accountName));
}
- this->enableButton(KDialog::Ok, true);
+ buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true);
+
}
private:
bool blocked;
const QString accountName;
Ui::KeyGenDialog ui;
+ QDialogButtonBox *buttonBox;
};
--
ktp-text-ui packaging
More information about the pkg-kde-commits
mailing list