diff --git a/gui/CMakeLists.txt b/gui/CMakeLists.txt index 589ee31..742374b 100644 --- a/gui/CMakeLists.txt +++ b/gui/CMakeLists.txt @@ -55,6 +55,9 @@ set(PROJECT_SOURCES cool_progressbar.cpp davis.rc version.h + qrc_files_restorer.h + qrc_files_restorer.cpp + ) qt5_add_resources(PROJECT_SOURCES res.qrc) diff --git a/gui/main.cpp b/gui/main.cpp index d8dea16..b4633b0 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -5,6 +5,7 @@ #include "QStyleFactory" #include "QUrl" #include "davis_gui.h" +#include "qrc_files_restorer.h" #include void applyDark() { @@ -40,6 +41,7 @@ void applyDark() { }; int main(int argc, char *argv[]) { + QrcFilesRestorer::restoreFilesFromQrc(":/res/4restore"); dvs::mayBeCreateJsWorkingFolder(); if (dvs::isPlotlyScriptExists() == false) { qDebug() << "try to copy file....."; diff --git a/gui/qrc_files_restorer.cpp b/gui/qrc_files_restorer.cpp index 668f271..b00c159 100644 --- a/gui/qrc_files_restorer.cpp +++ b/gui/qrc_files_restorer.cpp @@ -1,4 +1,5 @@ #include "qrc_files_restorer.h" +#include #include #include #include diff --git a/gui/res.qrc b/gui/res.qrc index 909447d..8ecdc71 100644 --- a/gui/res.qrc +++ b/gui/res.qrc @@ -9,11 +9,12 @@ res/davis.mp3 res/content_copy_200dp_969696_FILL0_wght300_GRAD0_opsz48.png res/check_200dp_969696_FILL0_wght300_GRAD0_opsz48.png - date_time_formats.json - keys.json - user_keys_list.json res/icon/D-16x16.png res/newYear.gif - bin.json + res/4restore/bin.json + res/4restore/date_time_formats.json + res/4restore/keys.json + res/4restore/settings.json + res/4restore/user_keys_list.json diff --git a/gui/bin.json b/gui/res/4restore/bin.json similarity index 100% rename from gui/bin.json rename to gui/res/4restore/bin.json diff --git a/gui/date_time_formats.json b/gui/res/4restore/date_time_formats.json similarity index 100% rename from gui/date_time_formats.json rename to gui/res/4restore/date_time_formats.json diff --git a/gui/keys.json b/gui/res/4restore/keys.json similarity index 100% rename from gui/keys.json rename to gui/res/4restore/keys.json diff --git a/gui/settings.json b/gui/res/4restore/settings.json similarity index 100% rename from gui/settings.json rename to gui/res/4restore/settings.json diff --git a/gui/user_keys_list.json b/gui/res/4restore/user_keys_list.json similarity index 100% rename from gui/user_keys_list.json rename to gui/res/4restore/user_keys_list.json