|
|
@ -155,7 +155,7 @@ LogMessageModel::LogMessageModel(QObject *parent) |
|
|
|
|
|
|
|
|
|
|
|
void LogMessageModel::handleNewMessage(const Log::Msg &message) |
|
|
|
void LogMessageModel::handleNewMessage(const Log::Msg &message) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const QString time = QLocale::system().toString(QDateTime::fromMSecsSinceEpoch(message.timestamp), QLocale::ShortFormat); |
|
|
|
const QString time = QLocale::system().toString(QDateTime::fromSecsSinceEpoch(message.timestamp), QLocale::ShortFormat); |
|
|
|
const QString messageText = message.message; |
|
|
|
const QString messageText = message.message; |
|
|
|
const QColor foreground = m_foregroundForMessageTypes[message.type]; |
|
|
|
const QColor foreground = m_foregroundForMessageTypes[message.type]; |
|
|
|
|
|
|
|
|
|
|
@ -173,7 +173,7 @@ LogPeerModel::LogPeerModel(QObject *parent) |
|
|
|
|
|
|
|
|
|
|
|
void LogPeerModel::handleNewMessage(const Log::Peer &peer) |
|
|
|
void LogPeerModel::handleNewMessage(const Log::Peer &peer) |
|
|
|
{ |
|
|
|
{ |
|
|
|
const QString time = QLocale::system().toString(QDateTime::fromMSecsSinceEpoch(peer.timestamp), QLocale::ShortFormat); |
|
|
|
const QString time = QLocale::system().toString(QDateTime::fromSecsSinceEpoch(peer.timestamp), QLocale::ShortFormat); |
|
|
|
const QString message = peer.blocked |
|
|
|
const QString message = peer.blocked |
|
|
|
? tr("%1 was blocked. Reason: %2.", "0.0.0.0 was blocked. Reason: reason for blocking.").arg(peer.ip, peer.reason) |
|
|
|
? tr("%1 was blocked. Reason: %2.", "0.0.0.0 was blocked. Reason: reason for blocking.").arg(peer.ip, peer.reason) |
|
|
|
: tr("%1 was banned", "0.0.0.0 was banned").arg(peer.ip); |
|
|
|
: tr("%1 was banned", "0.0.0.0 was banned").arg(peer.ip); |
|
|
|