Added timestamp to log messages
This commit is contained in:
parent
9006032f27
commit
9a223073d9
1 changed files with 4 additions and 1 deletions
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue