code beautifying

This commit is contained in:
Martin Brodbeck 2019-09-30 10:39:00 +02:00
parent 857f706443
commit 2a5cf16998

View file

@ -11,8 +11,8 @@
#include <utils.h>
#include <excelreader.h>
#include <csvreader.h>
#include <excelreader.h>
#include <posprinter.h>
#include <exception>
@ -47,7 +47,8 @@ MainWindow::MainWindow()
ui_.salesView->header()->setSectionResizeMode(QHeaderView::ResizeToContents);
setSaleModel();
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::closeAllWindows, Qt::QueuedConnection);
connect(ui_.actionQuit, &QAction::triggered, qApp, QApplication::closeAllWindows,
Qt::QueuedConnection);
connect(ui_.newAction, &QAction::triggered, this, [=]() {
if (marketplace_->getSellers().size() == 0 && marketplace_->getSales().size() == 0) {
return;
@ -368,7 +369,8 @@ void MainWindow::onCancelSaleButtonClicked([[maybe_unused]] bool checked)
QString lastPriceValue(formatCentAsEuroString(0).c_str());
if (ui_.salesView->model()->rowCount() > 0) {
lastPriceValue = ui_.salesView->model()->data(ui_.salesView->model()->index(0, 1)).toString();
lastPriceValue =
ui_.salesView->model()->data(ui_.salesView->model()->index(0, 1)).toString();
}
ui_.lastPriceLabel1->setText(lastPriceValue);
ui_.lastPriceLabel2->setText(lastPriceValue);
@ -455,8 +457,9 @@ void MainWindow::onImportSellerExcelActionTriggered()
QMessageBox::StandardButton::Ok, this)
.exec();
auto filename = QFileDialog::getOpenFileName(this, "Verkäufer importieren", QString(),
"Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)");
auto filename = QFileDialog::getOpenFileName(
this, "Verkäufer importieren", QString(),
"Alle unterstützte Dateien (*.xlsx *.csv);;Excel Dateien (*.xlsx);;CSV Dateien (*.csv)");
if (filename.isEmpty())
return;
@ -595,4 +598,3 @@ void MainWindow::updateStatLabel()
ui_.statLabel->setText(statistics.c_str());
}