mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 23:30:04 +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
|
|
@ -51,9 +51,11 @@ find_package(Qt${QT_VERSION_MAJOR}
|
|||
set(SRC_EXE_MAIN source/scwx/qt/main/main.cpp)
|
||||
|
||||
set(HDR_MAIN source/scwx/qt/main/application.hpp
|
||||
source/scwx/qt/main/check_privilege.hpp
|
||||
source/scwx/qt/main/main_window.hpp
|
||||
source/scwx/qt/main/process_validation.hpp)
|
||||
set(SRC_MAIN source/scwx/qt/main/application.cpp
|
||||
source/scwx/qt/main/check_privilege.cpp
|
||||
source/scwx/qt/main/main_window.cpp
|
||||
source/scwx/qt/main/process_validation.cpp)
|
||||
set(UI_MAIN source/scwx/qt/main/main_window.ui)
|
||||
|
|
@ -356,8 +358,7 @@ set(SRC_UI_SETUP source/scwx/qt/ui/setup/audio_codec_page.cpp
|
|||
source/scwx/qt/ui/setup/map_provider_page.cpp
|
||||
source/scwx/qt/ui/setup/setup_wizard.cpp
|
||||
source/scwx/qt/ui/setup/welcome_page.cpp)
|
||||
set(HDR_UTIL source/scwx/qt/util/check_privilege.hpp
|
||||
source/scwx/qt/util/color.hpp
|
||||
set(HDR_UTIL source/scwx/qt/util/color.hpp
|
||||
source/scwx/qt/util/file.hpp
|
||||
source/scwx/qt/util/geographic_lib.hpp
|
||||
source/scwx/qt/util/imgui.hpp
|
||||
|
|
@ -371,8 +372,7 @@ set(HDR_UTIL source/scwx/qt/util/check_privilege.hpp
|
|||
source/scwx/qt/util/q_file_input_stream.hpp
|
||||
source/scwx/qt/util/time.hpp
|
||||
source/scwx/qt/util/tooltip.hpp)
|
||||
set(SRC_UTIL source/scwx/qt/util/check_privilege.cpp
|
||||
source/scwx/qt/util/color.cpp
|
||||
set(SRC_UTIL source/scwx/qt/util/color.cpp
|
||||
source/scwx/qt/util/file.cpp
|
||||
source/scwx/qt/util/geographic_lib.cpp
|
||||
source/scwx/qt/util/imgui.cpp
|
||||
|
|
|
|||
|
|
@ -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