mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 04:38:04 -06:00
Use coarse timestamp format
Since format in milliseconds doesn't add additional value and is slower than just seconds.
This commit is contained in:
@@ -155,7 +155,7 @@ LogMessageModel::LogMessageModel(QObject *parent)
|
||||
|
||||
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 QColor foreground = m_foregroundForMessageTypes[message.type];
|
||||
|
||||
@@ -173,7 +173,7 @@ LogPeerModel::LogPeerModel(QObject *parent)
|
||||
|
||||
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
|
||||
? 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);
|
||||
|
||||
Reference in New Issue
Block a user