mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-14 19:18:55 -07:00
Pass log messages by const ref (#5914)
* Pass log messages by const ref * Rename method
This commit is contained in:
parent
bd8306bd33
commit
4a54412d47
4 changed files with 9 additions and 9 deletions
|
|
@ -28,7 +28,7 @@ DlgViewLog::DlgViewLog(QWidget *parent) : QDialog(parent)
|
|||
resize(800, 500);
|
||||
|
||||
loadInitialLogBuffer();
|
||||
connect(&Logger::getInstance(), &Logger::logEntryAdded, this, &DlgViewLog::logEntryAdded);
|
||||
connect(&Logger::getInstance(), &Logger::logEntryAdded, this, &DlgViewLog::appendLogEntry);
|
||||
}
|
||||
|
||||
void DlgViewLog::actCheckBoxChanged(bool abNewValue)
|
||||
|
|
@ -40,10 +40,10 @@ void DlgViewLog::loadInitialLogBuffer()
|
|||
{
|
||||
QList<QString> logBuffer = Logger::getInstance().getLogBuffer();
|
||||
for (const QString &message : logBuffer)
|
||||
logEntryAdded(message);
|
||||
appendLogEntry(message);
|
||||
}
|
||||
|
||||
void DlgViewLog::logEntryAdded(QString message)
|
||||
void DlgViewLog::appendLogEntry(const QString &message)
|
||||
{
|
||||
static auto colorEscapeCodePattern = QRegularExpression("\033\\[\\d+m");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue