refactor: CoreProcess::start return early if called with coreMode of None
This commit is contained in:
parent
9e94a4fe0e
commit
8d0c368c8f
1 changed files with 5 additions and 3 deletions
|
|
@ -322,6 +322,11 @@ void CoreProcess::start(std::optional<ProcessMode> processModeOption)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_mode == Settings::CoreMode::None) {
|
||||||
|
qFatal("set core mode before starting");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
QMutexLocker locker(&m_processMutex);
|
QMutexLocker locker(&m_processMutex);
|
||||||
|
|
||||||
const auto currentMode = Settings::value(Settings::Core::ProcessMode).value<ProcessMode>();
|
const auto currentMode = Settings::value(Settings::Core::ProcessMode).value<ProcessMode>();
|
||||||
|
|
@ -367,9 +372,6 @@ void CoreProcess::start(std::optional<ProcessMode> processModeOption)
|
||||||
args.prepend(QStringLiteral("client"));
|
args.prepend(QStringLiteral("client"));
|
||||||
if (!addClientArgs(args))
|
if (!addClientArgs(args))
|
||||||
qWarning("failed to add client args for core process, aborting start");
|
qWarning("failed to add client args for core process, aborting start");
|
||||||
} else {
|
|
||||||
qFatal("core started without mode");
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
qDebug().noquote() << "log level:" << Settings::logLevelText();
|
qDebug().noquote() << "log level:" << Settings::logLevelText();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue