From ffdece92b427e96351e27a717fce332c19b0f12e Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Fri, 27 Sep 2019 08:37:18 +0200 Subject: [PATCH] added importing from csv (continued and finished) --- src/gui/mainwindow.cpp | 4 ++-- src/gui/mainwindow.ui | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index c0fb637..bb3888a 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -446,7 +446,7 @@ void MainWindow::onImportSellerExcelActionTriggered() .exec(); auto filename = QFileDialog::getOpenFileName(this, "Verkäufer importieren", QString(), - "Excel Dateien (*.xlsx);CSV Dateien (*.csv)"); + "Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)"); if (filename.isEmpty()) return; @@ -454,7 +454,7 @@ void MainWindow::onImportSellerExcelActionTriggered() fs::path filePath(filename.toStdWString()); std::size_t numImported{}; - if (case_insensitive_match(filePath.extension().string(), std::string("xslx"))) { + if (case_insensitive_match(filePath.extension().string(), std::string(".xlsx"))) { numImported = ExcelReader::readSellersFromFile(filePath, marketplace_.get()); } else { numImported = CsvReader::readSellersFromFile(filePath, marketplace_.get()); diff --git a/src/gui/mainwindow.ui b/src/gui/mainwindow.ui index d686bf4..baca01d 100644 --- a/src/gui/mainwindow.ui +++ b/src/gui/mainwindow.ui @@ -419,7 +419,7 @@ drucken 0 0 817 - 24 + 30 @@ -511,7 +511,7 @@ drucken - Aus Excel-Datei (initial) + Aus Excel/CSV-Datei (initial)