[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r1649: Qt 4.2 doesn't like it if you try to call flush() or close() (in trunk: . src/util)
Author: edmanm
Date: 2007-02-24 13:33:17 -0500 (Sat, 24 Feb 2007)
New Revision: 1649
Modified:
trunk/
trunk/src/util/log.cpp
Log:
r1695@adrastea: edmanm | 2007-02-24 13:26:20 -0500
Qt 4.2 doesn't like it if you try to call flush() or close() on a QFile that
isn't open (Qt 4.1 doesn't mind).
Property changes on: trunk
___________________________________________________________________
svk:merge ticket from /vidalia/local/trunk [r1695] on 54b3572a-7227-0410-958f-53ecd705b71a
Modified: trunk/src/util/log.cpp
===================================================================
--- trunk/src/util/log.cpp 2007-02-24 18:32:28 UTC (rev 1648)
+++ trunk/src/util/log.cpp 2007-02-24 18:33:17 UTC (rev 1649)
@@ -96,8 +96,10 @@
void
Log::close()
{
- _logFile.flush();
- _logFile.close();
+ if (_logFile.isOpen()) {
+ _logFile.flush();
+ _logFile.close();
+ }
}
/** Creates a log message with severity <b>level</b> and initial message