cli: set user-id per command line

This commit is contained in:
Megamouse 2021-04-02 00:54:32 +02:00
parent 98687d474b
commit 9c7230e79f
11 changed files with 165 additions and 119 deletions

View file

@ -16,7 +16,7 @@ headless_application::headless_application(int& argc, char** argv) : QCoreApplic
bool headless_application::Init()
{
// Force init the emulator
InitializeEmulator("00000001", true, false); // TODO: get user from cli args if possible
InitializeEmulator(m_active_user.empty() ? "00000001" : m_active_user, false);
// Create callbacks from the emulator, which reference the handlers.
InitializeCallbacks();
@ -24,7 +24,7 @@ bool headless_application::Init()
// Create connects to propagate events throughout Gui.
InitializeConnects();
// As per QT recommendations to avoid conflicts for POSIX functions
// As per Qt recommendations to avoid conflicts for POSIX functions
std::setlocale(LC_NUMERIC, "C");
return true;