From 87e43a528e71556f128b8977a6dfa0255f5a725a Mon Sep 17 00:00:00 2001 From: AdenKoperczak Date: Sat, 11 Jan 2025 13:50:49 -0500 Subject: [PATCH] use for descriptive names for when checks are made --- scwx-qt/source/scwx/qt/main/check_privilege.cpp | 4 ++-- scwx-qt/source/scwx/qt/main/check_privilege.hpp | 4 ++-- scwx-qt/source/scwx/qt/main/main.cpp | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scwx-qt/source/scwx/qt/main/check_privilege.cpp b/scwx-qt/source/scwx/qt/main/check_privilege.cpp index 25f29f22..0d1d8cba 100644 --- a/scwx-qt/source/scwx/qt/main/check_privilege.cpp +++ b/scwx-qt/source/scwx/qt/main/check_privilege.cpp @@ -94,7 +94,7 @@ PrivilegeChecker::PrivilegeChecker() : p(std::make_uniquehasAppData_ || !p->highPrivilege_) { @@ -107,7 +107,7 @@ bool PrivilegeChecker::first_check() return result != QMessageBox::Yes; } -bool PrivilegeChecker::second_check() +bool PrivilegeChecker::post_settings_check() { auto& highPrivilegeWarningEnabled = settings::GeneralSettings::Instance().high_privilege_warning_enabled(); diff --git a/scwx-qt/source/scwx/qt/main/check_privilege.hpp b/scwx-qt/source/scwx/qt/main/check_privilege.hpp index 34da5bfc..f9fcadd9 100644 --- a/scwx-qt/source/scwx/qt/main/check_privilege.hpp +++ b/scwx-qt/source/scwx/qt/main/check_privilege.hpp @@ -14,8 +14,8 @@ public: ~PrivilegeChecker(); // returning true means check failed. - bool first_check(); - bool second_check(); + bool pre_settings_check(); + bool post_settings_check(); private: class Impl; diff --git a/scwx-qt/source/scwx/qt/main/main.cpp b/scwx-qt/source/scwx/qt/main/main.cpp index dde35cbb..c1a7c891 100644 --- a/scwx-qt/source/scwx/qt/main/main.cpp +++ b/scwx-qt/source/scwx/qt/main/main.cpp @@ -82,7 +82,7 @@ int main(int argc, char* argv[]) // Test to see if scwx was run with high privilege scwx::qt::main::PrivilegeChecker privilegeChecker; - if (privilegeChecker.first_check()) + if (privilegeChecker.pre_settings_check()) { return 0; } @@ -127,7 +127,7 @@ int main(int argc, char* argv[]) scwx::qt::main::CheckProcessModules(); int result = 0; - if (privilegeChecker.second_check()) + if (privilegeChecker.post_settings_check()) { result = 1; }