diff options
author | Saturneric <[email protected]> | 2022-01-23 10:55:39 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-01-23 10:55:39 +0000 |
commit | 06617014c2f87891cc65cdc04f2c3767877989e6 (patch) | |
tree | dfe2679655a5ae725fde4937443e1e0ad6aee762 /src | |
parent | <refactor>(ui): tidy up codes and comments. (diff) | |
download | GpgFrontend-06617014c2f87891cc65cdc04f2c3767877989e6.tar.gz GpgFrontend-06617014c2f87891cc65cdc04f2c3767877989e6.zip |
<refactor>(ui): tidy up codes and comments.
1. tidy up src.
Diffstat (limited to 'src')
-rw-r--r-- | src/before_exit.cpp | 4 | ||||
-rw-r--r-- | src/init.cpp | 18 | ||||
-rw-r--r-- | src/main.cpp | 25 | ||||
-rw-r--r-- | src/signal.cpp | 5 |
4 files changed, 52 insertions, 0 deletions
diff --git a/src/before_exit.cpp b/src/before_exit.cpp index d8af7e98..d8ab8f00 100644 --- a/src/before_exit.cpp +++ b/src/before_exit.cpp @@ -28,6 +28,10 @@ #include "ui/settings/GlobalSettingStation.h" +/** + * @brief + * + */ void before_exit() { LOG(INFO) << "called"; GpgFrontend::UI::GlobalSettingStation::GetInstance().ResetRootCerts(); diff --git a/src/init.cpp b/src/init.cpp index 088f79b4..43477c53 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -30,6 +30,12 @@ #include "ui/settings/GlobalSettingStation.h" +/** + * @brief Get the files of directory object + * + * @param _path + * @return std::vector<boost::filesystem::path> + */ std::vector<boost::filesystem::path> get_files_of_directory( const boost::filesystem::path& _path) { namespace fs = boost::filesystem; @@ -45,6 +51,10 @@ std::vector<boost::filesystem::path> get_files_of_directory( return path_list; } +/** + * @brief + * + */ void init_logging() { using namespace boost::posix_time; using namespace boost::gregorian; @@ -71,6 +81,10 @@ void init_logging() { LOG(INFO) << _("logfile Path") << logfile_path; } +/** + * @brief + * + */ void init_certs() { std::vector<vmime::shared_ptr<vmime::security::cert::X509Certificate>> root_certs; @@ -84,6 +98,10 @@ void init_certs() { LOG(INFO) << _("root certs loaded") << _instance.GetRootCerts().size(); } +/** + * @brief + * + */ void init_locale() { auto& settings = GpgFrontend::UI::GlobalSettingStation::GetInstance().GetUISettings(); diff --git a/src/main.cpp b/src/main.cpp index 414916bb..73b0f424 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -45,10 +45,35 @@ INITIALIZE_EASYLOGGINGPP // Recover buff jmp_buf recover_env; +/** + * @brief + * + */ extern void init_logging(); + +/** + * @brief + * + */ extern void init_certs(); + +/** + * @brief + * + */ extern void init_locale(); + +/** + * @brief + * + * @param sig + */ extern void handle_signal(int sig); + +/** + * @brief + * + */ extern void before_exit(); int main(int argc, char* argv[]) { diff --git a/src/signal.cpp b/src/signal.cpp index 8e624556..5df80d51 100644 --- a/src/signal.cpp +++ b/src/signal.cpp @@ -32,6 +32,11 @@ extern jmp_buf recover_env; +/** + * @brief + * + * @param sig + */ void handle_signal(int sig) { static int _repeat_handle_num = 1, last_sig = sig; LOG(INFO) << "signal caught" << sig; |