fixed incorrect formatted history entry

This commit is contained in:
Niklas 2019-05-09 19:53:58 +02:00
parent 9134c726cb
commit 828c9542ad
2 changed files with 6 additions and 3 deletions

View File

@ -5,7 +5,6 @@
#include <utils.hpp>
#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;

View File

@ -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();