diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 8b03e70..01727af 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -17,7 +17,6 @@ MainWindow::MainWindow() &MainWindow::on_actionEditSeller_triggered); connect(ui_.sellerNoEdit, &QLineEdit::returnPressed, this, &MainWindow::on_sellerNoEdit_checkSellerNo); - connect(ui_.paidButton, &QPushButton::clicked, this, &MainWindow::on_paidButton_triggered); marketplace_ = std::make_unique(); marketplace_->loadFromDb(); @@ -26,6 +25,7 @@ MainWindow::MainWindow() BasketModel* model = new BasketModel(getMarketplace(), ui_.basketView); ui_.basketView->setModel(model); ui_.basketView->setColumnHidden(0, true); // hide the uuid + } void MainWindow::on_actionEditSeller_triggered() @@ -44,14 +44,6 @@ void MainWindow::on_actionEditSeller_triggered() } } -void MainWindow::on_paidButton_triggered() -{ - if (marketplace_->basketSize() > 0) { - dynamic_cast(ui_.basketView->model())->finishSale(); - } - return; -} - void MainWindow::on_sellerNoEdit_checkSellerNo() { using std::regex, std::regex_match, std::smatch; diff --git a/src/gui/mainwindow.h b/src/gui/mainwindow.h index 68f2afd..d6f5160 100644 --- a/src/gui/mainwindow.h +++ b/src/gui/mainwindow.h @@ -17,12 +17,10 @@ class MainWindow : public QMainWindow MainWindow(); Marketplace* getMarketplace() { return marketplace_.get(); } - private slots: + private: void on_actionEditSeller_triggered(); void on_sellerNoEdit_checkSellerNo(); - void on_paidButton_triggered(); - private: Ui::MainWindow ui_; std::unique_ptr marketplace_; }; diff --git a/src/gui/pricedialog.cpp b/src/gui/pricedialog.cpp index bbf9957..9b657e8 100644 --- a/src/gui/pricedialog.cpp +++ b/src/gui/pricedialog.cpp @@ -16,8 +16,7 @@ void PriceDialog::accept() { if (static_cast(std::round(ui_.priceSpinBox->value() * 100.0L)) % 50 != 0) { QMessageBox(QMessageBox::Icon::Warning, "Falsche Preiseingabe", - "Es sind nur 0,50 Cent-Schritte erlaubt.", QMessageBox::StandardButton::Ok, - this) + "Es sind 0,50 Cent-Schritte erlaubt", QMessageBox::StandardButton::Ok, this) .exec(); } else { QDialog::accept();