Show information dialog about outdated database file
This commit is contained in:
parent
a33b9896b3
commit
57bfe3af62
5 changed files with 19 additions and 4 deletions
|
@ -35,7 +35,13 @@ MainWindow::MainWindow()
|
|||
ui_.setupUi(this);
|
||||
|
||||
marketplace_ = std::make_unique<Marketplace>();
|
||||
marketplace_->loadFromDb();
|
||||
Database::InitResult res = marketplace_->loadFromDb();
|
||||
if (res == Database::InitResult::OUTDATED_REPLACED) {
|
||||
QMessageBox(QMessageBox::Icon::Information, "Datenbankinformation",
|
||||
"Es wurde eine <b>veraltete</b> Datenbankdatei erkannt.<br />Diese wurde "
|
||||
"umbenannt und eine <b>neue</b> Datei wurde erstellt.")
|
||||
.exec();
|
||||
}
|
||||
statusBar()->showMessage("Gespeicherte Daten wurden geladen.", STATUSBAR_TIMEOUT);
|
||||
|
||||
BasketModel* model = new BasketModel(getMarketplace(), ui_.basketView);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue