From afa037fe907580582a97f90295f4e3e668bdbac7 Mon Sep 17 00:00:00 2001 From: Oleg Korshul Date: Mon, 13 Jul 2020 15:07:49 +0300 Subject: [PATCH] Refactoring --- Fb2File/Fb2File.cpp | 16 +++++++++++----- Fb2File/Fb2File.pro | 2 +- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Fb2File/Fb2File.cpp b/Fb2File/Fb2File.cpp index 9becf9335e..ef40899ae6 100644 --- a/Fb2File/Fb2File.cpp +++ b/Fb2File/Fb2File.cpp @@ -10,6 +10,11 @@ #include #include +#ifndef VALUE2STR +#define VALUE_TO_STRING(x) #x +#define VALUE2STR(x) VALUE_TO_STRING(x) +#endif + // Информация об авторе книги. Тэг author, translator struct SAuthor { @@ -1223,11 +1228,12 @@ int CFb2File::Convert(const std::wstring& sPath, const std::wstring& sDirectory, sApplication = NSSystemUtils::gc_EnvApplicationNameDefault; // Получить версию - /* - #if defined(INTVER) - std::string sVersion = VALUE2STR(INTVER)); - #endif - */ +#if defined(INTVER) + std::string sVersion = VALUE2STR(INTVER); +#endif + sApplication += L"/"; + sApplication += UTF8_TO_U(sVersion); + return TRUE; } diff --git a/Fb2File/Fb2File.pro b/Fb2File/Fb2File.pro index a303a47100..d6b9a3bdf6 100644 --- a/Fb2File/Fb2File.pro +++ b/Fb2File/Fb2File.pro @@ -16,7 +16,7 @@ CORE_ROOT_DIR = $$PWD/../../core PWD_ROOT_DIR = $$PWD include($$CORE_ROOT_DIR/Common/base.pri) -ADD_DEPENDENCY(kernel, OfficeUtils) +ADD_DEPENDENCY(kernel) SOURCES += Fb2File.cpp