Commit Graph

9 Commits

Author SHA1 Message Date
6bfa4fa643 LogWidget: Use FixedSizeQueue for a log messages buffer
Messages buffer is intended to be of a fixed capacity (MAX_LOG_LINES),
which cannot be achieved by std::queue unless we manually pop() extra elements.
std::queue uses std::deque internally which most likely results in allocations performed continuously.
FixedSizeQueue keeps a single buffer during its entire lifetime, avoiding any allocations except the ones
performed by stored objects.
2019-08-31 21:18:07 +02:00
b088fc37d5 LogWidget: Do not use QueueOnObject to construct log queue,
instead store a std::string constructed from string_view and convert to QString just before appending
2019-08-31 11:59:09 +02:00
e746d95d01 LogWidget: Stop update timer when log window is invisible so it doesn't continuously update in the background 2019-08-31 11:57:27 +02:00
7cec8601f1 LogWidget: Remove scrollbar tampering code (doesn't seem to do anything), clear text queue on clearing log 2019-08-31 11:57:07 +02:00
eb7d42dfe8 LogWidget: Replace QTextEdit with QPlainTextEdit for better performance
QTextEdit is heavy, similar in functionality to WordPad,
while QPlainTextEdit is lightweight like Notepad.
Qt documentation recommends using QPlainTextEdit for log viewers,
and it also allows to set automatic cutoff of oldest messages beyond a fixed point,
which we now set to MAX_LOG_LINES (5000)
2019-08-31 10:46:04 +02:00
0abb1c6ea6 Qt/LogWidget: Make logging asynchronous 2019-02-08 13:21:21 +01:00
d5692afd7d LogWidget: Preserve spaces and newlines 2018-12-02 19:12:12 +04:00
e9158bae6f Qt/LogWidget: Fix messages not being escaped properly 2018-07-14 23:06:18 +02:00
13ba24c5a6 Move DolphinQt2 to DolphinQt 2018-07-07 00:48:38 +02:00