Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
0a5106b8
Commit
0a5106b8
authored
Aug 08, 2014
by
Fabio Bas
Browse files
Don't leak a QSettings object at every logged message
parent
e12d66df
Changes
1
Hide whitespace changes
Inline
Side-by-side
servatrice/src/server_logger.cpp
View file @
0a5106b8
...
...
@@ -50,9 +50,9 @@ void ServerLogger::logMessage(QString message, void *caller)
callerString
=
QString
::
number
((
qulonglong
)
caller
,
16
)
+
" "
;
//filter out all log entries based on values in configuration file
QSettings
*
settings
=
new
QS
ettings
(
"servatrice.ini"
,
QSettings
::
IniFormat
);
bool
shouldWeWriteLog
=
settings
->
value
(
"server/writelog"
).
toBool
();
QString
logFilters
=
settings
->
value
(
"server/logfilters"
).
toString
();
QSettings
s
ettings
(
"servatrice.ini"
,
QSettings
::
IniFormat
);
bool
shouldWeWriteLog
=
settings
.
value
(
"server/writelog"
).
toBool
();
QString
logFilters
=
settings
.
value
(
"server/logfilters"
).
toString
();
QStringList
listlogFilters
=
logFilters
.
split
(
","
,
QString
::
SkipEmptyParts
);
bool
shouldWeSkipLine
=
false
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment