Mercurial > trustbridge
diff ui/administratorwindow.cpp @ 570:c9d296f04995
Inform the user when logging fails.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 23 May 2014 16:16:33 +0000 |
parents | 75e39c52aa94 |
children | 75cd2fbf9ac6 |
line wrap: on
line diff
--- a/ui/administratorwindow.cpp Fri May 23 10:21:20 2014 +0000 +++ b/ui/administratorwindow.cpp Fri May 23 16:16:33 2014 +0000 @@ -231,6 +231,8 @@ QFile logFile(logFilePath); if (!logFile.open(QIODevice::Append)) { + QMessageBox::warning(this, tr("Error!"), tr("Failed to open log file: ") + + logFilePath + tr(" Changes are not logged!")); qDebug() << "Failed to open log file: " << logFilePath; return; } @@ -239,7 +241,8 @@ newCertList.readList(currentCerts.toLocal8Bit()); QByteArray entries = createLogEntries(newCertList); if(logFile.write(entries) != entries.size()) { - qDebug() << "Failed to write log file: " << logFilePath; + QMessageBox::warning(this, tr("Error!"), tr("Failed to write log file: ") + + logFilePath + tr(" Changes are not logged!")); return; } logFile.close();