[PATCH 1 of 2] Remove code duplication and calculate headers only in listchanged
Wald Commits
scm-commit at wald.intevation.org
Tue Jul 1 16:44:12 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1404225568 -7200
# Node ID 3791a277f00b9fe1a8fe3ad4dc839133edc238c9
# Parent 3151034100027256b91337ef1993a6cb4f7d2f56
Remove code duplication and calculate headers only in listchanged
diff -r 315103410002 -r 3791a277f00b ui/mainwindow.cpp
--- a/ui/mainwindow.cpp Tue Jul 01 15:43:14 2014 +0200
+++ b/ui/mainwindow.cpp Tue Jul 01 16:39:28 2014 +0200
@@ -631,6 +631,8 @@
mUpdatesManual->hide();
connect(mUpdatesManual, SIGNAL(certChanged(bool, const Certificate&)),
this, SLOT(removeFromManual(bool, const Certificate&)));
+ connect(mUpdatesManual, SIGNAL(certListChanged(int)),
+ this, SLOT(listChanged(int)));
updatesNewLayout->setAlignment(Qt::AlignTop);
updatesRemoveLayout->setAlignment(Qt::AlignTop);
@@ -883,26 +885,13 @@
}
}
}
- mUpdatesHeader->setText("<h2>" +
- tr("Updates (%1/%2)")
- .arg(mUpdatesNew->selectedCertCount() + mUpdatesRemove->selectedCertCount())
- .arg(newRemoveCerts.size() + newInstallCerts.size()) + "</h2>");
+
mLastCertUpdate->setText(tr("Last update of certificates: %1")
.arg(mInstalledList.date().toString()));
- mUpdatesNewCertificates->setText("<h3>" +
- tr("Install new trusted certificates (%1/%2)")
- .arg(mUpdatesNew->selectedCertCount())
- .arg(mUpdatesNew->certificates().size()) +
- "</h3>");
-
- mUpdatesRemoveCertificates->setText("<h3>" +
- tr("Remove revoked certificates (%1/%2)")
- .arg(mUpdatesRemove->selectedCertCount())
- .arg(mUpdatesRemove->certificates().size()) +
- "</h3>");
mUpdatesManualCertificates->setText("<h3>" +
tr("Manually changed certificates (%1)").arg(0) +
"</h3>");
+ listChanged(0);
}
void MainWindow::installerError(const QString& errMsg) {
More information about the Trustbridge-commits
mailing list