From 9f114660e123ce2100455c8ce4d6c2e412782773 Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 8 Oct 2018 15:50:41 +0200 Subject: [PATCH 1/3] Simplify file name --- src/core/database.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/database.cpp b/src/core/database.cpp index 21686f4..d89d156 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -43,7 +43,7 @@ void Database::newDb() fs::path sourcePath = dbname_; fs::path destPath = sourcePath.parent_path() / sourcePath.stem(); - destPath += std::string("_") += boost::posix_time::to_iso_extended_string(boost::posix_time::second_clock::local_time()) += ".db"; + destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db"; fs::copy_file(sourcePath, destPath, fs::copy_options::overwrite_existing); From 6b9ac3d28464320da7e8172461426b2b969dbacf Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Mon, 8 Oct 2018 16:14:12 +0200 Subject: [PATCH 2/3] bump to version 0.11.2 --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a4dea82..caeb2d7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,6 +1,6 @@ cmake_minimum_required(VERSION 3.8) -project(kima2 VERSION 0.11.1) +project(kima2 VERSION 0.11.2) set(CMAKE_MODULE_PATH "${CMAKE_HOME_DIRECTORY}/cmake" ${CMAKE_MODULE_PATH}) From 7571ef6a13613ea931197d8f01774be438899fbe Mon Sep 17 00:00:00 2001 From: Martin Brodbeck Date: Tue, 9 Oct 2018 08:04:47 +0200 Subject: [PATCH 3/3] Fix creating new db --- src/core/database.cpp | 2 ++ src/gui/mainwindow.cpp | 1 + 2 files changed, 3 insertions(+) diff --git a/src/core/database.cpp b/src/core/database.cpp index d89d156..0a07ddd 100644 --- a/src/core/database.cpp +++ b/src/core/database.cpp @@ -41,6 +41,8 @@ void Database::newDb() { namespace fs = std::filesystem; + sqlite3_close(db_); + fs::path sourcePath = dbname_; fs::path destPath = sourcePath.parent_path() / sourcePath.stem(); destPath += std::string("_") += boost::posix_time::to_iso_string(boost::posix_time::second_clock::local_time()) += ".db"; diff --git a/src/gui/mainwindow.cpp b/src/gui/mainwindow.cpp index 420e4a3..929ee2c 100644 --- a/src/gui/mainwindow.cpp +++ b/src/gui/mainwindow.cpp @@ -62,6 +62,7 @@ MainWindow::MainWindow() dynamic_cast(ui_.basketView->model())->cancelSale(); marketplace_->clear(); setSaleModel(); + updateStatLabel(); }); ui_.sellerNoEdit->installEventFilter(this);