mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-26 18:55:38 +08:00
Ref T180, formatting
This commit is contained in:
@@ -124,6 +124,10 @@ namespace BlackCore
|
|||||||
//! Work around for audio context, #382
|
//! Work around for audio context, #382
|
||||||
void fakedSetComVoiceRoom(const BlackMisc::Audio::CVoiceRoomList &requestedRooms);
|
void fakedSetComVoiceRoom(const BlackMisc::Audio::CVoiceRoomList &requestedRooms);
|
||||||
|
|
||||||
|
//! Request a message to be displayed on console, whatever the console is
|
||||||
|
//! \note no guarantee it is really written to console
|
||||||
|
void requestDisplayOnConsole(const QString &message);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
//! Log a log message
|
//! Log a log message
|
||||||
//! \note Not pure because it can be called from the base class constructor.
|
//! \note Not pure because it can be called from the base class constructor.
|
||||||
@@ -192,13 +196,13 @@ namespace BlackCore
|
|||||||
//! Remote enabled version of writing a text file
|
//! Remote enabled version of writing a text file
|
||||||
virtual bool writeToFile(const QString &fileName, const QString &content) = 0;
|
virtual bool writeToFile(const QString &fileName, const QString &content) = 0;
|
||||||
|
|
||||||
//! Remote enabled version of reading a text file
|
//! Remote enabled version of reading a text file
|
||||||
virtual QString readFromFile(const QString &fileName) const = 0;
|
virtual QString readFromFile(const QString &fileName) const = 0;
|
||||||
|
|
||||||
//! Remote enabled version of deleting a file
|
//! Remote enabled version of deleting a file
|
||||||
virtual bool removeFile(const QString &fileName) = 0;
|
virtual bool removeFile(const QString &fileName) = 0;
|
||||||
|
|
||||||
//! Remote enabled version of file exists
|
//! Remote enabled version of file exists
|
||||||
virtual bool existsFile(const QString &fileName) const = 0;
|
virtual bool existsFile(const QString &fileName) const = 0;
|
||||||
|
|
||||||
//! The HTML help for dot commands
|
//! The HTML help for dot commands
|
||||||
|
|||||||
@@ -159,7 +159,7 @@ namespace BlackCore
|
|||||||
if (!m_registeredApplications.contains(application))
|
if (!m_registeredApplications.contains(application))
|
||||||
{
|
{
|
||||||
m_registeredApplications.push_back(application);
|
m_registeredApplications.push_back(application);
|
||||||
emit registrationChanged();
|
emit this->registrationChanged();
|
||||||
emit this->hotkeyActionsRegistered(CInputManager::instance()->allAvailableActions(), {});
|
emit this->hotkeyActionsRegistered(CInputManager::instance()->allAvailableActions(), {});
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -372,7 +372,6 @@ namespace BlackCore
|
|||||||
for (const CSimulatorPluginInfo &p : plugins)
|
for (const CSimulatorPluginInfo &p : plugins)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!p.isUnspecified());
|
Q_ASSERT(!p.isUnspecified());
|
||||||
|
|
||||||
if (p.isValid())
|
if (p.isValid())
|
||||||
{
|
{
|
||||||
listenForSimulator(p);
|
listenForSimulator(p);
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ namespace BlackCore
|
|||||||
|
|
||||||
// DBus
|
// DBus
|
||||||
BlackMisc::CDBusServer *m_dbusServer = nullptr;
|
BlackMisc::CDBusServer *m_dbusServer = nullptr;
|
||||||
bool m_initDBusConnection = false;
|
bool m_initDBusConnection = false;
|
||||||
QDBusConnection m_dbusConnection { "default" };
|
QDBusConnection m_dbusConnection { "default" };
|
||||||
|
|
||||||
// contexts:
|
// contexts:
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
class QShowEvent;
|
class QShowEvent;
|
||||||
|
|
||||||
namespace Ui { class CInternalsComponent; }
|
namespace Ui { class CInternalsComponent; }
|
||||||
|
|
||||||
namespace BlackGui
|
namespace BlackGui
|
||||||
{
|
{
|
||||||
namespace Components
|
namespace Components
|
||||||
|
|||||||
@@ -221,7 +221,7 @@ namespace BlackGui
|
|||||||
virtual void cmdLineVersionMessage() const override;
|
virtual void cmdLineVersionMessage() const override;
|
||||||
//! @}
|
//! @}
|
||||||
|
|
||||||
//! Handle paring of special GUI cmd arguments
|
//! Handle parsing of special GUI cmd arguments
|
||||||
virtual bool parsingHookIn() override;
|
virtual bool parsingHookIn() override;
|
||||||
|
|
||||||
//! Check for a new version (update)
|
//! Check for a new version (update)
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ namespace BlackSimPlugin
|
|||||||
{
|
{
|
||||||
m_simConnected = true;
|
m_simConnected = true;
|
||||||
this->initSimulatorInternals();
|
this->initSimulatorInternals();
|
||||||
emitSimulatorCombinedStatus();
|
this->emitSimulatorCombinedStatus();
|
||||||
|
|
||||||
// Internals depends on sim data which take a while to be read
|
// Internals depends on sim data which take a while to be read
|
||||||
// this is a trich and I re-init again after a while (which is not really expensive)
|
// this is a trich and I re-init again after a while (which is not really expensive)
|
||||||
@@ -317,7 +317,7 @@ namespace BlackSimPlugin
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
emitSimulatorCombinedStatus(); // force sending status
|
this->emitSimulatorCombinedStatus(); // force sending status
|
||||||
}
|
}
|
||||||
|
|
||||||
void CSimulatorFsxCommon::onSimStopped()
|
void CSimulatorFsxCommon::onSimStopped()
|
||||||
@@ -676,7 +676,7 @@ namespace BlackSimPlugin
|
|||||||
if (!simObject.getAircraftModelString().isEmpty())
|
if (!simObject.getAircraftModelString().isEmpty())
|
||||||
{
|
{
|
||||||
m_addPendingAircraft.push_back(simObject.getAircraft());
|
m_addPendingAircraft.push_back(simObject.getAircraft());
|
||||||
CLogMessage(this).warning("Aircraft removed, '%1' '%2' object id '%3' out of reality bubble or other reason. Interpolator: %4")
|
CLogMessage(this).warning("Aircraft removed, '%1' '%2' object id '%3' out of reality bubble or other reason. Interpolator: '%4'")
|
||||||
<< callsign.toQString() << simObject.getAircraftModelString()
|
<< callsign.toQString() << simObject.getAircraftModelString()
|
||||||
<< objectID << simObject.getInterpolatorInfo();
|
<< objectID << simObject.getInterpolatorInfo();
|
||||||
}
|
}
|
||||||
@@ -686,13 +686,13 @@ namespace BlackSimPlugin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// in all cases we remove
|
// in all cases we remove the object
|
||||||
const int c = m_simConnectObjects.remove(callsign);
|
const int c = m_simConnectObjects.remove(callsign);
|
||||||
const bool removedAny = (c > 0);
|
const bool removedAny = (c > 0);
|
||||||
const bool updated = this->updateAircraftRendered(simObject.getCallsign(), false);
|
const bool updated = this->updateAircraftRendered(simObject.getCallsign(), false);
|
||||||
if (updated)
|
if (updated)
|
||||||
{
|
{
|
||||||
emit aircraftRenderingChanged(simObject.getAircraft());
|
emit this->aircraftRenderingChanged(simObject.getAircraft());
|
||||||
}
|
}
|
||||||
|
|
||||||
// models we have to add again after removing
|
// models we have to add again after removing
|
||||||
@@ -900,7 +900,7 @@ namespace BlackSimPlugin
|
|||||||
if (simObject.isPendingAdded())
|
if (simObject.isPendingAdded())
|
||||||
{
|
{
|
||||||
// problem: we try to delete an aircraft just requested to be added
|
// problem: we try to delete an aircraft just requested to be added
|
||||||
// best solution so far, call remove again with a delays
|
// best solution so far, call remove again with a delay
|
||||||
QTimer::singleShot(2000, this, [ = ]
|
QTimer::singleShot(2000, this, [ = ]
|
||||||
{
|
{
|
||||||
this->physicallyRemoveRemoteAircraft(callsign);
|
this->physicallyRemoveRemoteAircraft(callsign);
|
||||||
@@ -916,12 +916,12 @@ namespace BlackSimPlugin
|
|||||||
m_hints.remove(simObject.getCallsign());
|
m_hints.remove(simObject.getCallsign());
|
||||||
|
|
||||||
// mark in provider
|
// mark in provider
|
||||||
const bool updated = updateAircraftRendered(callsign, false);
|
const bool updated = this->updateAircraftRendered(callsign, false);
|
||||||
if (updated)
|
if (updated)
|
||||||
{
|
{
|
||||||
CSimulatedAircraft aircraft(simObject.getAircraft());
|
CSimulatedAircraft aircraft(simObject.getAircraft());
|
||||||
aircraft.setRendered(false);
|
aircraft.setRendered(false);
|
||||||
emit aircraftRenderingChanged(aircraft);
|
emit this->aircraftRenderingChanged(aircraft);
|
||||||
}
|
}
|
||||||
|
|
||||||
// cleanup function, actually this should not be needed
|
// cleanup function, actually this should not be needed
|
||||||
|
|||||||
Reference in New Issue
Block a user