diff ui/certificatelist.cpp @ 7:992c0ec57660

Add unit tests make CertificateList work.
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 12 Feb 2014 16:52:27 +0000
parents 9849250f50f2
children 2ad9a96518e3
line wrap: on
line diff
--- a/ui/certificatelist.cpp	Tue Feb 11 17:57:55 2014 +0000
+++ b/ui/certificatelist.cpp	Wed Feb 12 16:52:27 2014 +0000
@@ -1,12 +1,15 @@
 #include "certificatelist.h"
 
-CertificateList::CertificateList(char *fileName)
+#include <QDebug>
+
+CertificateList::CertificateList(const char *fileName)
 {
-    void *data = NULL;
-    list_status_t status = Unknown;
-    int size = 0;
+    char *data = NULL;
+    size_t size = 0;
 
-    status = readAndVerifyList(fileName, data, &size);
+    mStatus = readAndVerifyList(fileName, &data, &size);
 
-    qDebug() << "Read and verify list finished. Status is: " << status;
+    if (isValid()) {
+        mFileContent = QByteArray::fromRawData(data, size);
+    }
 }

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