[PATCH 1 of 2] Added method to get the current certificate list changes

Wald Commits scm-commit at wald.intevation.org
Thu May 22 18:29:54 CEST 2014


# HG changeset patch
# User Raimund Renkert <rrenkert at intevation.de>
# Date 1400776087 -7200
# Node ID 9db7034b2d6cc637443264aeaa918d67b66b91e9
# Parent  f115da3645d55cd7173855cb80a7873b120b469e
Added method to get the current certificate list changes.

diff -r f115da3645d5 -r 9db7034b2d6c ui/administratorwindow.cpp
--- a/ui/administratorwindow.cpp	Thu May 22 16:07:02 2014 +0000
+++ b/ui/administratorwindow.cpp	Thu May 22 18:28:07 2014 +0200
@@ -274,3 +274,14 @@
 
     return entries;
 }
+
+QList<Certificate> AdministratorWindow::currentChanges()
+{
+    QList<Certificate> changed;
+    foreach(const Certificate& cert, certificates()) {
+        if (!mCertList.getCertificates().contains(cert)) {
+            changed.append(cert);
+        }
+    }
+    return changed;
+}
diff -r f115da3645d5 -r 9db7034b2d6c ui/administratorwindow.h
--- a/ui/administratorwindow.h	Thu May 22 16:07:02 2014 +0000
+++ b/ui/administratorwindow.h	Thu May 22 18:28:07 2014 +0200
@@ -51,6 +51,11 @@
      */
     void logChanges(const QString &currentCerts);
 
+    /** @brief get the currently changed certificates.
+     * @return a list of certificates.
+     */
+    QList<Certificate> currentChanges();
+
 private slots:
     void createInstaller();
     void showAbout();


More information about the Trustbridge-commits mailing list