From be1d731de3aa4430c1b06a6e52d44df77a55183b Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Thu, 9 Aug 2018 13:02:33 +0200 Subject: [PATCH] use path to open json file (sales) --- src/gui/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 4d4659f..280ca62 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -439,9 +439,11 @@ void MainWindow::onImportSalesJsonActionTriggered() if (filename.isEmpty()) return; + std::filesystem::path filePath(filename.toStdWString()); + delete ui_.salesView->model(); try { - JsonUtil::importSales(filename.toStdString(), marketplace_.get(), + JsonUtil::importSales(filePath, marketplace_.get(), settings.value("global/cashPointNo").toInt()); } catch (std::runtime_error& err) { QMessageBox(QMessageBox::Icon::Warning, "Import nicht möglich", err.what(), QMessageBox::Ok,