move check_privilege.* to main

This commit is contained in:
AdenKoperczak 2025-01-11 13:46:32 -05:00
parent 4a4075b50f
commit 2f9908b54e
4 changed files with 12 additions and 12 deletions

View file

@ -1,5 +1,5 @@
#include "scwx/qt/settings/general_settings.hpp"
#include "scwx/qt/util/check_privilege.hpp"
#include "scwx/qt/main/check_privilege.hpp"
#include <QtGlobal>
#include <QStandardPaths>
#include <filesystem>
@ -13,7 +13,7 @@
# include <unistd.h>
#endif
namespace scwx::qt::util
namespace scwx::qt::main
{
bool is_high_privilege()
@ -76,6 +76,7 @@ public:
hasAppData_ = std::filesystem::exists(appDataPath);
dialog_.setStandardButtons(QMessageBox::Yes | QMessageBox::No);
dialog_.setDefaultButton(QMessageBox::No);
dialog_.setCheckBox(checkBox_);
};
@ -131,4 +132,4 @@ bool PrivilegeChecker::second_check()
}
}
} // namespace scwx::qt::util
} // namespace scwx::qt::main

View file

@ -2,7 +2,7 @@
#include <memory>
namespace scwx::qt::util
namespace scwx::qt::main
{
bool is_high_privilege();
@ -22,4 +22,4 @@ private:
std::unique_ptr<Impl> p;
};
} // namespace scwx::qt::util
} // namespace scwx::qt::main

View file

@ -14,7 +14,7 @@
#include <scwx/qt/types/qt_types.hpp>
#include <scwx/qt/ui/high_privilege_dialog.hpp>
#include <scwx/qt/ui/setup/setup_wizard.hpp>
#include <scwx/qt/util/check_privilege.hpp>
#include <scwx/qt/main/check_privilege.hpp>
#include <scwx/network/cpr.hpp>
#include <scwx/util/environment.hpp>
#include <scwx/util/logger.hpp>
@ -22,7 +22,6 @@
#include <string>
#include <vector>
#include <filesystem>
#include <aws/core/Aws.h>
#include <boost/asio.hpp>
@ -82,7 +81,7 @@ int main(int argc, char* argv[])
}
// Test to see if scwx was run with high privilege
scwx::qt::util::PrivilegeChecker privilegeChecker;
scwx::qt::main::PrivilegeChecker privilegeChecker;
if (privilegeChecker.first_check())
{
return 0;