mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 17:40:05 +00:00
move check_privilege.* to main
This commit is contained in:
parent
4a4075b50f
commit
2f9908b54e
4 changed files with 12 additions and 12 deletions
|
|
@ -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
|
||||
|
|
@ -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
|
||||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue