mirror of
https://github.com/ciphervance/supercell-wx.git
synced 2025-10-30 22:50:05 +00:00
Add test mode to use alternate settings directory
This commit is contained in:
parent
5633a30e39
commit
d24918fbd5
1 changed files with 7 additions and 0 deletions
|
|
@ -11,6 +11,7 @@
|
||||||
#include <scwx/qt/types/qt_types.hpp>
|
#include <scwx/qt/types/qt_types.hpp>
|
||||||
#include <scwx/qt/ui/setup/setup_wizard.hpp>
|
#include <scwx/qt/ui/setup/setup_wizard.hpp>
|
||||||
#include <scwx/network/cpr.hpp>
|
#include <scwx/network/cpr.hpp>
|
||||||
|
#include <scwx/util/environment.hpp>
|
||||||
#include <scwx/util/logger.hpp>
|
#include <scwx/util/logger.hpp>
|
||||||
#include <scwx/util/threads.hpp>
|
#include <scwx/util/threads.hpp>
|
||||||
|
|
||||||
|
|
@ -19,6 +20,7 @@
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
#include <spdlog/spdlog.h>
|
#include <spdlog/spdlog.h>
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
#include <QStandardPaths>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
|
|
||||||
static const std::string logPrefix_ = "scwx::main";
|
static const std::string logPrefix_ = "scwx::main";
|
||||||
|
|
@ -45,6 +47,11 @@ int main(int argc, char* argv[])
|
||||||
QCoreApplication::installTranslator(&translator);
|
QCoreApplication::installTranslator(&translator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!scwx::util::GetEnvironment("SCWX_TEST").empty())
|
||||||
|
{
|
||||||
|
QStandardPaths::setTestModeEnabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
// Start the io_context main loop
|
// Start the io_context main loop
|
||||||
boost::asio::io_context& ioContext = scwx::util::io_context();
|
boost::asio::io_context& ioContext = scwx::util::io_context();
|
||||||
auto work = boost::asio::make_work_guard(ioContext);
|
auto work = boost::asio::make_work_guard(ioContext);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue