Fix parsing of timestamp in packet logs, change file ending
This commit is contained in:
parent
2111f5844a
commit
9eb2a913b7
@ -156,7 +156,7 @@ nlohmann::json DevicePacketLog::LogEntry::toJSON()
|
||||
void DevicePacketLog::LogEntry::fromJSON(nlohmann::json j)
|
||||
{
|
||||
type = QString::fromStdString(j.value("type", "")) == "Packet" ? Type::Packet : Type::InvalidBytes;
|
||||
timestamp = QDateTime::fromMSecsSinceEpoch(j.value("timestamp", 0UL), Qt::TimeSpec::UTC);
|
||||
timestamp = QDateTime::fromMSecsSinceEpoch(j.value("timestamp", 0ULL), Qt::TimeSpec::UTC);
|
||||
serial = QString::fromStdString(j.value("serial", ""));
|
||||
datapoint = nullptr;
|
||||
p = nullptr;
|
||||
|
@ -28,7 +28,7 @@ DevicePacketLogView::DevicePacketLogView(QWidget *parent) :
|
||||
updateTree();
|
||||
});
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Save), &QPushButton::clicked, [=](){
|
||||
QString filename = QFileDialog::getSaveFileName(nullptr, "Load USB log data", "", "USB log files (*.usblog)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
QString filename = QFileDialog::getSaveFileName(nullptr, "Load LibreVNA log data", "", "LibreVNA log files (*.vnalog)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
if(filename.isEmpty()) {
|
||||
// aborted selection
|
||||
return;
|
||||
@ -42,7 +42,7 @@ DevicePacketLogView::DevicePacketLogView(QWidget *parent) :
|
||||
file.close();
|
||||
});
|
||||
connect(ui->buttonBox->button(QDialogButtonBox::Open), &QPushButton::clicked, [=](){
|
||||
QString filename = QFileDialog::getOpenFileName(nullptr, "Load USB log data", "", "USB log files (*.usblog)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
QString filename = QFileDialog::getOpenFileName(nullptr, "Load LibreVNA log data", "", "LibreVNA log files (*.vnalog)", nullptr, QFileDialog::DontUseNativeDialog);
|
||||
if(filename.isEmpty()) {
|
||||
// aborted selection
|
||||
return;
|
||||
|
Loading…
Reference in New Issue
Block a user