Added timestamp to log messages

pull/6/head
mandlm 2017-10-18 11:47:04 +02:00 committed by mandlm
parent 9006032f27
commit 9a223073d9
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
#include "mainwindow.h" #include "mainwindow.h"
#include "ui_mainwindow.h" #include "ui_mainwindow.h"
#include "sniffthread.h" #include "sniffthread.h"
#include <QTime>
MainWindow::MainWindow(QWidget *parent) : MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent), QMainWindow(parent),
@ -22,5 +23,7 @@ MainWindow::~MainWindow()
void MainWindow::dataReceived(QString data) void MainWindow::dataReceived(QString data)
{ {
ui->listWidget->addItem(data); QTime currentTime = QTime::currentTime();
ui->listWidget->addItem(currentTime.toString(Qt::ISODate) + ": " + data);
} }