Mercurial > trustbridge
comparison ui/administratorwindow.cpp @ 1324:b6fb5d347023
Store last folder from which certificates were added.
author | Andre Heinecke <andre.heinecke@intevation.de> |
---|---|
date | Tue, 14 Oct 2014 18:11:36 +0200 |
parents | c582b935c120 |
children |
comparison
equal
deleted
inserted
replaced
1323:c582b935c120 | 1324:b6fb5d347023 |
---|---|
182 } | 182 } |
183 | 183 |
184 void AdministratorWindow::addCertificates() | 184 void AdministratorWindow::addCertificates() |
185 { | 185 { |
186 QStringList certFiles = QFileDialog::getOpenFileNames( | 186 QStringList certFiles = QFileDialog::getOpenFileNames( |
187 this, tr("Select certificate"), QDir::homePath(), "*.pem *.der *.crt *.cer"); | 187 this, tr("Select certificate"), mSettings.value("LastCertAddDir", QDir::homePath()).toString(), |
188 "*.pem *.der *.crt *.cer"); | |
188 for (int i = 0; i < certFiles.size(); i++) { | 189 for (int i = 0; i < certFiles.size(); i++) { |
189 QString certFile = certFiles.at(i); | 190 QString certFile = certFiles.at(i); |
190 QList<Certificate> certs = Certificate::fromFileName(certFile); | 191 QList<Certificate> certs = Certificate::fromFileName(certFile); |
191 addToCertificateTable(certs); | 192 addToCertificateTable(certs); |
193 QDir certDir (certFile); | |
194 mSettings.setValue("LastCertAddDir", certDir.absolutePath()); | |
192 } | 195 } |
193 certificateView->resizeColumnsToContents(); | 196 certificateView->resizeColumnsToContents(); |
194 certificateView->setColumnWidth(0, 60); | 197 certificateView->setColumnWidth(0, 60); |
195 } | 198 } |
196 | 199 |