summaryrefslogtreecommitdiff
path: root/noncore/unsupported/mail2/passdiag.cpp
Unidiff
Diffstat (limited to 'noncore/unsupported/mail2/passdiag.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/unsupported/mail2/passdiag.cpp38
1 files changed, 0 insertions, 38 deletions
diff --git a/noncore/unsupported/mail2/passdiag.cpp b/noncore/unsupported/mail2/passdiag.cpp
deleted file mode 100644
index d3daa2c..0000000
--- a/noncore/unsupported/mail2/passdiag.cpp
+++ b/dev/null
@@ -1,38 +0,0 @@
1#include <qmessagebox.h>
2#include <qpushbutton.h>
3#include <qlineedit.h>
4#include <qlabel.h>
5
6#include "passdiag.h"
7
8PassDiag::PassDiag(QString text, QWidget *parent, const char *name, bool modal, WFlags fl)
9 : PassDiagBase(parent, name, modal, fl)
10{
11 infoLabel->setText(text);
12
13 connect(ok, SIGNAL(clicked()), SLOT(accept()));
14 connect(cancel, SIGNAL(clicked()), SLOT(close()));
15}
16
17void PassDiag::accept()
18{
19 if (password->text().isEmpty()) {
20 QMessageBox::information(this, tr("Error"), tr("<p>You have to enter a password or click on cancel.</p>"), tr("Ok"));
21 return;
22 }
23
24 QDialog::accept();
25}
26
27QString PassDiag::getPassword(QWidget *parent, QString text)
28{
29 PassDiag *diag = new PassDiag(text, parent, 0, true);
30 diag->show();
31
32 if (QDialog::Accepted == diag->exec()) {
33 return diag->password->text();
34 }
35
36 return 0;
37}
38