mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-13 08:43:08 -07:00
Convert the Log widget to use custom View/Model
Co-authored-by: sledgehammer999 <hammered999@gmail.com>
This commit is contained in:
parent
59f99bb984
commit
fd89717330
14 changed files with 610 additions and 195 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue