[PATCH 2 of 2] Store last folder from which certificates were added
Wald Commits
scm-commit at wald.intevation.org
Tue Oct 14 18:11:41 CEST 2014
# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1413303096 -7200
# Node ID b6fb5d3470239fa31eecef933c6b986d69d13f65
# Parent c582b935c12024a4b29c6a22fbdea13dd0b1dc41
Store last folder from which certificates were added.
diff -r c582b935c120 -r b6fb5d347023 ui/administratorwindow.cpp
--- a/ui/administratorwindow.cpp Tue Oct 14 18:10:17 2014 +0200
+++ b/ui/administratorwindow.cpp Tue Oct 14 18:11:36 2014 +0200
@@ -184,11 +184,14 @@
void AdministratorWindow::addCertificates()
{
QStringList certFiles = QFileDialog::getOpenFileNames(
- this, tr("Select certificate"), QDir::homePath(), "*.pem *.der *.crt *.cer");
+ this, tr("Select certificate"), mSettings.value("LastCertAddDir", QDir::homePath()).toString(),
+ "*.pem *.der *.crt *.cer");
for (int i = 0; i < certFiles.size(); i++) {
QString certFile = certFiles.at(i);
QList<Certificate> certs = Certificate::fromFileName(certFile);
addToCertificateTable(certs);
+ QDir certDir (certFile);
+ mSettings.setValue("LastCertAddDir", certDir.absolutePath());
}
certificateView->resizeColumnsToContents();
certificateView->setColumnWidth(0, 60);
More information about the Trustbridge-commits
mailing list