From 7b4b568859c070a818305faa8ec94f4127bb3a4f Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Sun, 12 Jul 2009 09:08:38 +0000 Subject: [PATCH] - Display date as well as time in log window --- src/bittorrent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/bittorrent.cpp b/src/bittorrent.cpp index 3574d9c76..fe886c657 100644 --- a/src/bittorrent.cpp +++ b/src/bittorrent.cpp @@ -29,7 +29,7 @@ */ #include -#include +#include #include #include #include @@ -856,7 +856,7 @@ void bittorrent::addConsoleMessage(QString msg, QColor color) { if(consoleMessages.size() > 100) { consoleMessages.removeFirst(); } - consoleMessages.append(QString::fromUtf8("")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8(" - ") + msg + QString::fromUtf8("")); + consoleMessages.append(QString::fromUtf8("")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8(" - ") + msg + QString::fromUtf8("")); } void bittorrent::addPeerBanMessage(QString ip, bool from_ipfilter) { @@ -864,9 +864,9 @@ void bittorrent::addPeerBanMessage(QString ip, bool from_ipfilter) { peerBanMessages.removeFirst(); } if(from_ipfilter) - peerBanMessages.append(QString::fromUtf8("")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8(" - ")+tr("%1 was blocked due to your IP filter", "x.y.z.w was blocked").arg(ip)); + peerBanMessages.append(QString::fromUtf8("")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8(" - ")+tr("%1 was blocked due to your IP filter", "x.y.z.w was blocked").arg(ip)); else - peerBanMessages.append(QString::fromUtf8("")+ QTime::currentTime().toString(QString::fromUtf8("hh:mm:ss")) + QString::fromUtf8(" - ")+tr("%1 was banned due to corrupt pieces", "x.y.z.w was banned").arg(ip)); + peerBanMessages.append(QString::fromUtf8("")+ QDateTime::currentDateTime().toString(QString::fromUtf8("dd/MM/yyyy hh:mm:ss")) + QString::fromUtf8(" - ")+tr("%1 was banned due to corrupt pieces", "x.y.z.w was banned").arg(ip)); } bool bittorrent::isFilePreviewPossible(QString hash) const{