From 99104a932f5e0fbeace78c843d7dbb25e9ae10de Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 7 Oct 2019 08:32:37 +0200 Subject: [PATCH 1/2] code cleanup --- src/core/article.h | 2 +- src/core/seller.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/article.h b/src/core/article.h index 50c0a9d..990ea1f 100644 --- a/src/core/article.h +++ b/src/core/article.h @@ -16,7 +16,7 @@ class Article : public EntityUuid public: Article() = default; Article(int price); - //virtual ~Article() = default; + virtual ~Article() = default; void setArticleNo(int articleNo); void setPrice(int price); diff --git a/src/core/seller.h b/src/core/seller.h index a4bfde1..0c84958 100644 --- a/src/core/seller.h +++ b/src/core/seller.h @@ -14,7 +14,7 @@ class Seller : public EntityInt { public: Seller() = default; - ~Seller() = default; + virtual ~Seller() = default; Seller(const std::string& firstName, const std::string& lastName, int sellerNo = 0, int numArticlesOffered = 0); From acc8408b0aec794e47ac9eea45885455b834e6d8 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 7 Oct 2019 08:32:51 +0200 Subject: [PATCH 2/2] Fix file system problem (umlauts) on Linux --- src/gui/mainwindow.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 4ce75db..a39fbbd 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -462,7 +462,11 @@ void MainWindow::onImportSellerExcelActionTriggered() if (filename.isEmpty()) return; +#if defined(_WIN64) || defined(_WIN32) fs::path filePath(filename.toStdWString()); +#else + fs::path filePath(filename.toStdString()); +#endif std::size_t numImported{}; if (case_insensitive_match(filePath.extension().string(), std::string(".xlsx"))) { @@ -498,7 +502,11 @@ void MainWindow::onImportSellerJsonActionTriggered() if (filename.isEmpty()) return; +#if defined(_WIN64) || defined(_WIN32) fs::path filePath(filename.toStdWString()); +#else + fs::path filePath(filename.toStdString()); +#endif JsonUtil::importSellers(filePath, marketplace_.get()); updateStatLabel(); @@ -529,7 +537,11 @@ void MainWindow::onExportSalesJsonActionTriggered() if (filename.isEmpty()) return; +#if defined(_WIN64) || defined(_WIN32) fs::path filePath(filename.toStdWString()); +#else + fs::path filePath(filename.toStdString()); +#endif JsonUtil::exportSales(filePath, marketplace_.get(), settings.value("global/cashPointNo").toInt()); @@ -545,7 +557,11 @@ void MainWindow::onImportSalesJsonActionTriggered() if (filename.isEmpty()) return; +#if defined(_WIN64) || defined(_WIN32) fs::path filePath(filename.toStdWString()); +#else + fs::path filePath(filename.toStdString()); +#endif delete ui_.salesView->model(); try {