mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-14 22:42:14 -07:00
Pass log messages by const ref
This commit is contained in:
parent
69107f79e3
commit
d49e4f889a
4 changed files with 7 additions and 7 deletions
|
|
@ -42,7 +42,7 @@ void DlgViewLog::loadInitialLogBuffer()
|
|||
logEntryAdded(message);
|
||||
}
|
||||
|
||||
void DlgViewLog::logEntryAdded(QString message)
|
||||
void DlgViewLog::logEntryAdded(const QString &message)
|
||||
{
|
||||
logArea->appendPlainText(message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ private:
|
|||
|
||||
void loadInitialLogBuffer();
|
||||
private slots:
|
||||
void logEntryAdded(QString message);
|
||||
void logEntryAdded(const QString &message);
|
||||
void actCheckBoxChanged(bool abNewValue);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -81,12 +81,12 @@ void Logger::closeLogfileSession()
|
|||
fileHandle.close();
|
||||
}
|
||||
|
||||
void Logger::log(QtMsgType /* type */, const QMessageLogContext & /* ctx */, const QString message)
|
||||
void Logger::log(QtMsgType /* type */, const QMessageLogContext & /* ctx */, const QString &message)
|
||||
{
|
||||
QMetaObject::invokeMethod(this, "internalLog", Qt::QueuedConnection, Q_ARG(const QString &, message));
|
||||
}
|
||||
|
||||
void Logger::internalLog(QString message)
|
||||
void Logger::internalLog(const QString &message)
|
||||
{
|
||||
QMutexLocker locker(&mutex);
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ public:
|
|||
}
|
||||
|
||||
void logToFile(bool enabled);
|
||||
void log(QtMsgType type, const QMessageLogContext &ctx, QString message);
|
||||
void log(QtMsgType type, const QMessageLogContext &ctx, const QString &message);
|
||||
QString getClientVersion();
|
||||
QString getClientOperatingSystem();
|
||||
QString getSystemArchitecture();
|
||||
|
|
@ -57,10 +57,10 @@ protected:
|
|||
void closeLogfileSession();
|
||||
|
||||
protected slots:
|
||||
void internalLog(QString message);
|
||||
void internalLog(const QString &message);
|
||||
|
||||
signals:
|
||||
void logEntryAdded(QString message);
|
||||
void logEntryAdded(const QString &message);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue