diff ui/certificate.h @ 386:cc1738b398a0

Add == operator for certificates that compares the b64line
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Apr 2014 19:02:39 +0200
parents 1220b741cd51
children 17e1c8f37d72
line wrap: on
line diff
--- a/ui/certificate.h	Tue Apr 15 17:48:06 2014 +0200
+++ b/ui/certificate.h	Tue Apr 15 19:02:39 2014 +0200
@@ -128,6 +128,9 @@
      **/
     static QList<Certificate> fromFileName (const QString& file_name);
 
+    friend inline bool operator==(const Certificate& lhs, const Certificate& rhs) {
+        return lhs.base64Line() == rhs.base64Line();
+    }
 private:
     /** @brief Helper function to parse the details of a certificate **/
     void parseDetails(const QByteArray& cert);

http://wald.intevation.org/projects/trustbridge/