summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndre Heinecke <aheinecke@intevation.de>2016-08-26 14:49:35 (GMT)
committerAndre Heinecke <aheinecke@intevation.de>2016-09-05 13:52:11 (GMT)
commit781fc0393303435c91a4510f78e0c11e352515cc (patch)
treeaac3acfb42caf3cee93384d0529d8347a5af2a18
parentc47c6c2bf5f729f1c9dc95aa2a2ca8525a5181d7 (diff)
Remove keep open when done from resultpage
This action does not make much sense and behaves confusingly in that you would have to check it each time. Better remove it.
-rw-r--r--src/crypto/decryptverifyemailcontroller.cpp2
-rw-r--r--src/crypto/gui/newresultpage.cpp36
-rw-r--r--src/crypto/gui/newresultpage.h6
3 files changed, 0 insertions, 44 deletions
diff --git a/src/crypto/decryptverifyemailcontroller.cpp b/src/crypto/decryptverifyemailcontroller.cpp
index a5ac056..83656cb 100644
--- a/src/crypto/decryptverifyemailcontroller.cpp
+++ b/src/crypto/decryptverifyemailcontroller.cpp
@@ -83,8 +83,6 @@ public:
KDAB_SET_OBJECT_NAME(m_resultPage);
m_resultPage.setSubTitle(i18n("Status and progress of the crypto operations is shown here."));
- // there's no way we're letting users fast-forward over the decryption/verification results...
- m_resultPage.setKeepOpenWhenDoneShown(false);
addPage(&m_resultPage);
}
diff --git a/src/crypto/gui/newresultpage.cpp b/src/crypto/gui/newresultpage.cpp
index a34942f..9a6a03d 100644
--- a/src/crypto/gui/newresultpage.cpp
+++ b/src/crypto/gui/newresultpage.cpp
@@ -71,7 +71,6 @@ public:
void result(const shared_ptr<const Task::Result> &result);
void started(const shared_ptr<Task> &result);
void allDone();
- void keepOpenWhenDone(bool keep);
QLabel *labelForTag(const QString &tag);
std::vector< shared_ptr<TaskCollection> > m_collections;
@@ -81,7 +80,6 @@ public:
QVBoxLayout *m_progressLabelLayout;
int m_lastErrorItemIndex;
ResultListWidget *m_resultList;
- QCheckBox *m_keepOpenCB;
};
NewResultPage::Private::Private(NewResultPage *qq) : q(qq), m_lastErrorItemIndex(0)
@@ -98,11 +96,6 @@ NewResultPage::Private::Private(NewResultPage *qq) : q(qq), m_lastErrorItemIndex
m_resultList = new ResultListWidget;
connect(m_resultList, &ResultListWidget::linkActivated, q, &NewResultPage::linkActivated);
layout->addWidget(m_resultList, 1);
- m_keepOpenCB = new QCheckBox;
- m_keepOpenCB->setText(i18n("Keep open after operation completed"));
- m_keepOpenCB->setChecked(true);
- connect(m_keepOpenCB, &QAbstractButton::toggled, q, &NewResultPage::keepOpenWhenDone);
- layout->addWidget(m_keepOpenCB);
connect(&m_hideProgressTimer, &QTimer::timeout, m_progressBar, &QProgressBar::hide);
}
@@ -116,10 +109,6 @@ void NewResultPage::Private::progress(const QString &msg, int progress, int tota
m_progressBar->setValue(progress);
}
-void NewResultPage::Private::keepOpenWhenDone(bool)
-{
-}
-
void NewResultPage::Private::allDone()
{
assert(!m_collections.empty());
@@ -128,8 +117,6 @@ void NewResultPage::Private::allDone()
}
m_progressBar->setRange(0, 100);
m_progressBar->setValue(100);
- const bool errorOccurred =
- kdtools::any(m_collections, mem_fn(&TaskCollection::errorOccurred));
m_collections.clear();
Q_FOREACH (const QString &i, m_progressLabelByTag.keys()) {
if (!i.isEmpty()) {
@@ -142,11 +129,6 @@ void NewResultPage::Private::allDone()
cancel->setEnabled(false);
}
Q_EMIT q->completeChanged();
- if (!m_keepOpenCB->isChecked() && !errorOccurred)
- if (QWizard *wiz = q->wizard())
- if (QAbstractButton *btn = wiz->button(QWizard::FinishButton)) {
- QTimer::singleShot(500, btn, SLOT(animateClick()));
- }
m_hideProgressTimer.start();
}
@@ -176,24 +158,6 @@ NewResultPage::~NewResultPage()
{
}
-bool NewResultPage::keepOpenWhenDone() const
-{
- return d->m_keepOpenCB->isChecked();
-}
-
-void NewResultPage::setKeepOpenWhenDone(bool keep)
-{
- d->m_keepOpenCB->setChecked(keep);
-}
-
-void NewResultPage::setKeepOpenWhenDoneShown(bool on)
-{
- d->m_keepOpenCB->setVisible(on);
- if (!on) {
- d->m_keepOpenCB->setChecked(true);
- }
-}
-
void NewResultPage::setTaskCollection(const shared_ptr<TaskCollection> &coll)
{
//clear(); ### PENDING(marc) implement
diff --git a/src/crypto/gui/newresultpage.h b/src/crypto/gui/newresultpage.h
index 106b691..104a312 100644
--- a/src/crypto/gui/newresultpage.h
+++ b/src/crypto/gui/newresultpage.h
@@ -70,11 +70,6 @@ public:
bool isComplete() const Q_DECL_OVERRIDE;
- bool keepOpenWhenDone() const;
- void setKeepOpenWhenDone(bool keep);
-
- void setKeepOpenWhenDoneShown(bool on);
-
Q_SIGNALS:
void linkActivated(const QString &link);
@@ -84,7 +79,6 @@ private:
Q_PRIVATE_SLOT(d, void progress(QString, int, int))
Q_PRIVATE_SLOT(d, void result(boost::shared_ptr<const Kleo::Crypto::Task::Result>))
Q_PRIVATE_SLOT(d, void started(boost::shared_ptr<Kleo::Crypto::Task>))
- Q_PRIVATE_SLOT(d, void keepOpenWhenDone(bool))
Q_PRIVATE_SLOT(d, void allDone())
};