comparison ui/administratorwindow.cpp @ 429:f07bc5de2a87

Adminstration: "Add certificate" can now load multiple certificate files.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 17 Apr 2014 13:22:55 +0200
parents d08e39b913ee
children 6dec8101793c
comparison
equal deleted inserted replaced
428:d1819cd56dee 429:f07bc5de2a87
159 dialog->show(); 159 dialog->show();
160 } 160 }
161 161
162 void AdministratorWindow::addCertificates() 162 void AdministratorWindow::addCertificates()
163 { 163 {
164 QString certFile = QFileDialog::getOpenFileName( 164 QStringList certFiles = QFileDialog::getOpenFileNames(
165 this, tr("Select certificate"), QDir::homePath(), "*.pem *.der"); 165 this, tr("Select certificate"), QDir::homePath(), "*.pem *.der");
166 QList<Certificate> certs = Certificate::fromFileName(certFile); 166 for (int i = 0; i < certFiles.size(); i++) {
167 addToCertificateTable(certs); 167 QString certFile = certFiles.at(i);
168 QList<Certificate> certs = Certificate::fromFileName(certFile);
169 addToCertificateTable(certs);
170 }
168 certificateView->resizeColumnsToContents(); 171 certificateView->resizeColumnsToContents();
169 certificateView->setColumnWidth(0, 60); 172 certificateView->setColumnWidth(0, 60);
170 } 173 }
171 174
172 void AdministratorWindow::removeCertificates() 175 void AdministratorWindow::removeCertificates()

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