comparison ui/administratorwindow.cpp @ 524:a097dd86cb4d

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Tue, 29 Apr 2014 15:26:43 +0200
parents 9d3880db6ba7
children c81123298387
comparison
equal deleted inserted replaced
523:ca583ffe728a 524:a097dd86cb4d
136 setCentralWidget(base); 136 setCentralWidget(base);
137 } 137 }
138 138
139 void AdministratorWindow::loadCertificateFile() 139 void AdministratorWindow::loadCertificateFile()
140 { 140 {
141 QString lastCertFile = mSettings.value("LastCertList", QDir::homePath()).toString();
141 QString certFile = QFileDialog::getOpenFileName( 142 QString certFile = QFileDialog::getOpenFileName(
142 this, tr("Select certificate list file"), QDir::homePath(), "*.txt"); 143 this, tr("Select certificate list file"), lastCertFile, "*.txt");
143 mCertList.readList(certFile.toLocal8Bit().constData()); 144 mCertList.readList(certFile.toLocal8Bit().constData());
144 if (!mCertList.isValid()) { 145 if (!mCertList.isValid()) {
145 qDebug() << "Not a valid list."; 146 QMessageBox::warning(this, tr("Error!"), tr("Failed to load the certificate list."));
146 } else { 147 } else {
147 certificateModel->removeAll(); 148 certificateModel->removeAll();
148 loadCertificateTable(); 149 loadCertificateTable();
150 mSettings.setValue("LastCertList", certFile);
149 } 151 }
150 } 152 }
151 153
152 void AdministratorWindow::saveCertificateFile() 154 void AdministratorWindow::saveCertificateFile()
153 { 155 {

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