Added timestamp to log messages
parent
9006032f27
commit
9a223073d9
|
@ -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 New Issue