From 561a7416e13582ed12cc1f1961b92cc501676ce0 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 13 Sep 2012 23:43:25 +0200 Subject: [PATCH] Attempting to improve logging behaviour --- src/LogCompressor.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LogCompressor.cc b/src/LogCompressor.cc index 094199a4f..0a36b2e0b 100644 --- a/src/LogCompressor.cc +++ b/src/LogCompressor.cc @@ -61,8 +61,8 @@ void LogCompressor::run() } // Verify that the output file is useable - QTemporaryFile outTmpFile; - if (!outTmpFile.open()) { + QFile outTmpFile("processed_" + outFileName); + if (!outTmpFile.open(QIODevice::WriteOnly | QIODevice::Text)) { emit logProcessingStatusChanged(tr("Log Compressor: Cannot start/compress log file, since output file %1 is not writable").arg(QFileInfo(outTmpFile.fileName()).absoluteFilePath())); return; } @@ -143,9 +143,9 @@ void LogCompressor::run() infile.close(); // Make sure we remove the source file before replacing it. - QFile::remove(outFileName); - outTmpFile.copy(outFileName); - outTmpFile.close(); +// QFile::remove(outFileName); +// outTmpFile.copy(outFileName); +// outTmpFile.close(); emit logProcessingStatusChanged(tr("Log Compressor: Writing output to file %1").arg(QFileInfo(outFileName).absoluteFilePath())); // Clean up and update the status before we return. -- 2.22.0