mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 15:15:50 +08:00
Ref T292, Ref T285 minor style improvements, renamings
This commit is contained in:
@@ -274,20 +274,21 @@ namespace BlackCore
|
||||
|
||||
QString CApplication::getExecutableForApplication(CApplicationInfo::Application application) const
|
||||
{
|
||||
QString search;
|
||||
QString searchFor;
|
||||
switch (application)
|
||||
{
|
||||
case CApplicationInfo::PilotClientCore: search = "core"; break;
|
||||
case CApplicationInfo::Laucher: search = "launcher"; break;
|
||||
case CApplicationInfo::MappingTool: search = "data"; break;
|
||||
case CApplicationInfo::PilotClientGui: search = "gui"; break;
|
||||
case CApplicationInfo::PilotClientCore: searchFor = "core"; break;
|
||||
case CApplicationInfo::Laucher: searchFor = "launcher"; break;
|
||||
case CApplicationInfo::MappingTool: searchFor = "data"; break;
|
||||
case CApplicationInfo::PilotClientGui: searchFor = "gui"; break;
|
||||
default: break;
|
||||
}
|
||||
if (search.isEmpty()) { return ""; }
|
||||
if (searchFor.isEmpty()) { return ""; }
|
||||
|
||||
for (const QString &executable : CFileUtils::getSwiftExecutables())
|
||||
{
|
||||
if (!executable.contains("swift", Qt::CaseInsensitive)) { continue; }
|
||||
if (executable.contains(search, Qt::CaseInsensitive)) { return executable; }
|
||||
if (executable.contains(searchFor, Qt::CaseInsensitive)) { return executable; }
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
@@ -204,12 +204,12 @@ namespace BlackCore
|
||||
{
|
||||
msgs.push_back(CStatusMessage(this).error("No network interface, simulation will not work properly"));
|
||||
}
|
||||
const CSimulatorInfo sims = this->simulatorsWithInitializedModelSet();
|
||||
if (sims.isNoSimulator())
|
||||
const CSimulatorInfo simulators = this->simulatorsWithInitializedModelSet();
|
||||
if (simulators.isNoSimulator())
|
||||
{
|
||||
msgs.push_back(CStatusMessage(this).error("No model set so far, you need at least one model set. Hint: You can create a model set in the mapping tool, or copy an existing set in the launcher."));
|
||||
}
|
||||
else if (sims.isXPlane() || CSimulatorInfo(m_enabledSimulators.get()).isXPlane())
|
||||
else if (simulators.isXPlane() || CSimulatorInfo(m_enabledSimulators.get()).isXPlane())
|
||||
{
|
||||
// ever used with XPlane
|
||||
const QString pluginDir = CXPlaneUtil::pluginDirFromRootDir(m_simulatorSettings.getSimulatorDirectoryOrDefault(CSimulatorInfo::XPLANE));
|
||||
|
||||
Reference in New Issue
Block a user