From 828c9542ad5fbaf5736ad88c9ad8321caf72184a Mon Sep 17 00:00:00 2001 From: Gurkengewuerz Date: Thu, 9 May 2019 19:53:58 +0200 Subject: [PATCH] fixed incorrect formatted history entry --- src/logs/requestlogging.cpp | 3 +-- src/mainwindow.cpp | 6 +++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/logs/requestlogging.cpp b/src/logs/requestlogging.cpp index 27aa3ec..c5b6b9f 100644 --- a/src/logs/requestlogging.cpp +++ b/src/logs/requestlogging.cpp @@ -5,7 +5,6 @@ #include #include "mainwindow.hpp" -#include "ui_mainwindow.h" // $type $url $status $time // $type = GET POST PATCH DELETE etc @@ -50,7 +49,7 @@ void requestlogging::addEntry(RequestContext context) { context.reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), context.filename, context.reply->url().toString(), - timeNow); + timeNow.replace("_", " ")); } using requestlogging::LoggedRequest; diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index eaf6191..39600c3 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -218,7 +218,11 @@ void MainWindow::on_treeWidget_doubleClicked(const QModelIndex &) { file = settings::dir().absoluteFilePath("responses/" + file.left(file.length() - 4)); QFile dataFile(file); - if (!dataFile.open(QIODevice::ReadOnly)) return; + if (!dataFile.open(QIODevice::ReadOnly)) { + logger::info(file); + logger::error(dataFile.errorString()); + return; + } MonospaceTextDialog *dialog = new MonospaceTextDialog(file, dataFile.readAll()); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show();