mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 12:48:57 +00:00
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)
This commit is contained in:
parent
5ea4f998c0
commit
eb7d42dfe8
2 changed files with 19 additions and 17 deletions
|
@ -14,9 +14,8 @@
|
|||
class QCheckBox;
|
||||
class QCloseEvent;
|
||||
class QComboBox;
|
||||
class QPlainTextEdit;
|
||||
class QPushButton;
|
||||
class QVBoxLayout;
|
||||
class QTextEdit;
|
||||
class QTimer;
|
||||
|
||||
class LogWidget final : public QDockWidget, LogListener
|
||||
|
@ -43,9 +42,7 @@ private:
|
|||
QCheckBox* m_log_wrap;
|
||||
QComboBox* m_log_font;
|
||||
QPushButton* m_log_clear;
|
||||
QVBoxLayout* m_main_layout;
|
||||
QTextEdit* m_log_text;
|
||||
QWidget* m_tab_log;
|
||||
QPlainTextEdit* m_log_text;
|
||||
|
||||
QTimer* m_timer;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue