From cca20abbfd8e303a2c4ea28542f7e56897d0f71a Mon Sep 17 00:00:00 2001 From: leca Date: Wed, 4 Dec 2024 04:05:02 +0300 Subject: [PATCH] pretty-printing settings.json --- .lupdate/translations/en_US.ts.stamp | 0 .lupdate/translations/ru_RU.ts.stamp | 0 deploy/appimage/deploy.sh | 2 +- settings/settings.cpp | 6 +++--- 4 files changed, 4 insertions(+), 4 deletions(-) create mode 100644 .lupdate/translations/en_US.ts.stamp create mode 100644 .lupdate/translations/ru_RU.ts.stamp diff --git a/.lupdate/translations/en_US.ts.stamp b/.lupdate/translations/en_US.ts.stamp new file mode 100644 index 0000000..e69de29 diff --git a/.lupdate/translations/ru_RU.ts.stamp b/.lupdate/translations/ru_RU.ts.stamp new file mode 100644 index 0000000..e69de29 diff --git a/deploy/appimage/deploy.sh b/deploy/appimage/deploy.sh index aea23b1..428ae5e 100755 --- a/deploy/appimage/deploy.sh +++ b/deploy/appimage/deploy.sh @@ -21,7 +21,7 @@ export TESSDATA_PREFIX=\$APPDIR/usr/share/tesseract-ocr/4.00/tessdata \$APPDIR/usr/bin/checks-parser" \ > AppDir/AppRun -cp ../../icon.png AppDir/checks-parser +cp ../../icon.png AppDir/checks-parser.png chmod +x AppDir/AppRun cp ../../checks-parser AppDir/usr/bin diff --git a/settings/settings.cpp b/settings/settings.cpp index 65a18bd..d4f2513 100644 --- a/settings/settings.cpp +++ b/settings/settings.cpp @@ -50,7 +50,7 @@ Settings::Settings(std::string path) { } })"_json; - output << settings; + output << settings.dump(4); output.flush(); output.close(); this->settings = settings; @@ -70,7 +70,7 @@ void Settings::write_setting(std::string setting, std::string value) { this->settings[setting] = value; - output << this->settings; + output << this->settings.dump(4); } std::string Settings::get_setting(std::string setting) { return this->settings[setting]; @@ -93,5 +93,5 @@ void Settings::alter_setting(std::string setting, std::string value) { void Settings::flush() { std::ofstream output(this->settings_file_path, std::fstream::trunc); - output << this->settings; + output << this->settings.dump(4); }