mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Convert the Log widget to use custom View/Model
Co-authored-by: sledgehammer999 <hammered999@gmail.com>
This commit is contained in:
committed by
sledgehammer999
parent
eea693979a
commit
65d1b588d9
@@ -72,7 +72,7 @@ void Logger::freeInstance()
|
||||
void Logger::addMessage(const QString &message, const Log::MsgType &type)
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
const Log::Msg msg = {m_msgCounter++, QDateTime::currentMSecsSinceEpoch(), type, message.toHtmlEscaped()};
|
||||
const Log::Msg msg = {m_msgCounter++, QDateTime::currentMSecsSinceEpoch(), type, message};
|
||||
m_messages.push_back(msg);
|
||||
locker.unlock();
|
||||
|
||||
@@ -82,7 +82,7 @@ void Logger::addMessage(const QString &message, const Log::MsgType &type)
|
||||
void Logger::addPeer(const QString &ip, const bool blocked, const QString &reason)
|
||||
{
|
||||
QWriteLocker locker(&m_lock);
|
||||
const Log::Peer msg = {m_peerCounter++, QDateTime::currentMSecsSinceEpoch(), ip.toHtmlEscaped(), blocked, reason.toHtmlEscaped()};
|
||||
const Log::Peer msg = {m_peerCounter++, QDateTime::currentMSecsSinceEpoch(), ip, blocked, reason};
|
||||
m_peers.push_back(msg);
|
||||
locker.unlock();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user