Mercurial > trustbridge
changeset 79:1dd8e91972a8
Add accessors to certificate's in certificatelist
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Wed, 19 Mar 2014 16:35:49 +0000 |
parents | 2f5db8c70bc2 |
children | 01286d0872ca |
files | ui/certificate.h ui/certificate_win.cpp ui/certificatelist.cpp ui/certificatelist.h |
diffstat | 4 files changed, 15 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ui/certificate.h Wed Mar 19 16:35:13 2014 +0000 +++ b/ui/certificate.h Wed Mar 19 16:35:49 2014 +0000 @@ -32,7 +32,7 @@ * for this certificate * **/ - QString shortDescription(); + const QString& shortDescription() const; private: bool mValid;
--- a/ui/certificate_win.cpp Wed Mar 19 16:35:13 2014 +0000 +++ b/ui/certificate_win.cpp Wed Mar 19 16:35:49 2014 +0000 @@ -4,7 +4,10 @@ #include <QDebug> -Certificate::Certificate(const QByteArray& asn1data) : mValid(false) { +Certificate::Certificate(const QByteArray& asn1data) : + mValid(false), + mShortDescription(QObject::tr("Invalid Certificate")) +{ // asn1data is expected to be \0 terminated as this is what // qt does in ::fromBase64 so the actual asn1data is
--- a/ui/certificatelist.cpp Wed Mar 19 16:35:13 2014 +0000 +++ b/ui/certificatelist.cpp Wed Mar 19 16:35:49 2014 +0000 @@ -66,3 +66,11 @@ { readList(fileName); } + +const QList<Certificate>& CertificateList::getInstallCertificates() const { + return mCertificatesInstall; +} + +const QList<Certificate>& CertificateList::getRemoveCertificates() const { + return mCertificatesRemove; +}
--- a/ui/certificatelist.h Wed Mar 19 16:35:13 2014 +0000 +++ b/ui/certificatelist.h Wed Mar 19 16:35:49 2014 +0000 @@ -44,7 +44,8 @@ */ bool isValid() const {return mStatus == Valid;} - const QList<Certificate>& getCertificates() const; + const QList<Certificate>& getInstallCertificates() const; + const QList<Certificate>& getRemoveCertificates() const; private: QString mFileName;