mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-10 00:04:48 -07:00
add checkbox option to clear log (#2963)
This commit is contained in:
parent
297f1f2555
commit
0eae4dbe54
5 changed files with 48 additions and 8 deletions
|
|
@ -21,9 +21,13 @@ Logger::~Logger()
|
|||
void Logger::logToFile(bool enabled)
|
||||
{
|
||||
if (enabled)
|
||||
{
|
||||
openLogfileSession();
|
||||
}
|
||||
else
|
||||
{
|
||||
closeLogfileSession();
|
||||
}
|
||||
}
|
||||
|
||||
QString Logger::getClientVersion()
|
||||
|
|
@ -34,7 +38,9 @@ QString Logger::getClientVersion()
|
|||
void Logger::openLogfileSession()
|
||||
{
|
||||
if (logToFileEnabled)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
fileHandle.setFileName(LOGGER_FILENAME);
|
||||
fileHandle.open(QIODevice::WriteOnly | QIODevice::Truncate | QIODevice::Text);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue