mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-13 15:45:42 +08:00
Style, singleShot guard, Doxygen
This commit is contained in:
@@ -166,6 +166,7 @@ namespace BlackCore
|
|||||||
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const = 0;
|
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const = 0;
|
||||||
|
|
||||||
//! Verify prerequisites for simulation like an existing model set
|
//! Verify prerequisites for simulation like an existing model set
|
||||||
|
//! \pre system needs to be initialized to work correctly
|
||||||
virtual BlackMisc::CStatusMessageList verifyPrerequisites() const = 0;
|
virtual BlackMisc::CStatusMessageList verifyPrerequisites() const = 0;
|
||||||
|
|
||||||
//! Number of installed models in simulator eco system
|
//! Number of installed models in simulator eco system
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ namespace BlackCore
|
|||||||
Q_ASSERT(s);
|
Q_ASSERT(s);
|
||||||
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
|
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
|
||||||
"requestUiConsoleMessage", this, SIGNAL(requestUiConsoleMessage(QString, bool)));
|
"requestUiConsoleMessage", this, SIGNAL(requestUiConsoleMessage(QString, bool)));
|
||||||
|
|
||||||
Q_ASSERT(s);
|
Q_ASSERT(s);
|
||||||
Q_UNUSED(s);
|
Q_UNUSED(s);
|
||||||
this->relayBaseClassSignals(serviceName, connection, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName());
|
this->relayBaseClassSignals(serviceName, connection, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName());
|
||||||
|
|||||||
@@ -270,73 +270,73 @@ namespace BlackCore
|
|||||||
QString CGlobalSetup::convertToQString(const QString &separator, bool i18n) const
|
QString CGlobalSetup::convertToQString(const QString &separator, bool i18n) const
|
||||||
{
|
{
|
||||||
QString s =
|
QString s =
|
||||||
"timestamp: "
|
QStringLiteral("timestamp: ")
|
||||||
% this->getFormattedUtcTimestampYmdhms()
|
% this->getFormattedUtcTimestampYmdhms()
|
||||||
% separator
|
% separator
|
||||||
% "Global setup loaded: "
|
% QStringLiteral("Global setup loaded: ")
|
||||||
% boolToYesNo(this->wasLoaded())
|
% boolToYesNo(this->wasLoaded())
|
||||||
% separator
|
% separator
|
||||||
|
|
||||||
% "For development: "
|
% QStringLiteral("For development: ")
|
||||||
% boolToYesNo(isDevelopment())
|
% boolToYesNo(isDevelopment())
|
||||||
% separator
|
% separator
|
||||||
|
|
||||||
% "Mapping min.version: "
|
% QStringLiteral("Mapping min.version: ")
|
||||||
% this->getMappingMinimumVersionString()
|
% this->getMappingMinimumVersionString()
|
||||||
% separator
|
% separator
|
||||||
|
|
||||||
% "Distribution URLs: "
|
% QStringLiteral("Distribution URLs: ")
|
||||||
% getSwiftUpdateInfoFileUrls().toQString(i18n)
|
% getSwiftUpdateInfoFileUrls().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "Bootstrap URLs: "
|
% QStringLiteral("Bootstrap URLs: ")
|
||||||
% getSwiftBootstrapFileUrls().toQString(i18n)
|
% getSwiftBootstrapFileUrls().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "News URLs: "
|
% QStringLiteral("News URLs: ")
|
||||||
% getSwiftLatestNewsUrls().toQString(i18n)
|
% getSwiftLatestNewsUrls().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "Help URLs: "
|
% QStringLiteral("Help URLs: ")
|
||||||
% m_onlineHelpUrls.toQString(i18n)
|
% m_onlineHelpUrls.toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "swift map URLs: "
|
% QStringLiteral("swift map URLs: ")
|
||||||
% getSwiftMapUrls().toQString(i18n)
|
% getSwiftMapUrls().toQString(i18n)
|
||||||
% separator;
|
% separator;
|
||||||
s +=
|
s +=
|
||||||
"DB root directory: "
|
QStringLiteral("DB root directory: ")
|
||||||
% getDbRootDirectoryUrl().toQString(i18n)
|
% getDbRootDirectoryUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "ICAO DB reader: "
|
% QStringLiteral("ICAO DB reader: ")
|
||||||
% getDbIcaoReaderUrl().toQString(i18n)
|
% getDbIcaoReaderUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "Model DB reader: "
|
% QStringLiteral("Model DB reader: ")
|
||||||
% getDbModelReaderUrl().toQString(i18n)
|
% getDbModelReaderUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "Airport DB reader: "
|
% QStringLiteral("Airport DB reader: ")
|
||||||
% getDbAirportReaderUrl().toQString(i18n)
|
% getDbAirportReaderUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "DB home page: "
|
% QStringLiteral("DB home page: ")
|
||||||
% getDbHomePageUrl().toQString(i18n)
|
% getDbHomePageUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "DB login service: "
|
% QStringLiteral("DB login service: ")
|
||||||
% getDbLoginServiceUrl().toQString(i18n)
|
% getDbLoginServiceUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "DB client ping service: "
|
% QStringLiteral("DB client ping service: ")
|
||||||
% getDbClientPingServiceUrl().toQString(i18n);
|
% getDbClientPingServiceUrl().toQString(i18n);
|
||||||
s +=
|
s +=
|
||||||
"VATSIM bookings: "
|
QStringLiteral("VATSIM bookings: ")
|
||||||
% getVatsimBookingsUrl().toQString(i18n)
|
% getVatsimBookingsUrl().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "VATSIM METARs: "
|
% QStringLiteral("VATSIM METARs: ")
|
||||||
% getVatsimMetarsUrls().toQString(i18n)
|
% getVatsimMetarsUrls().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
% "VATSIM data file: "
|
% QStringLiteral("VATSIM data file: ")
|
||||||
% getVatsimDataFileUrls().toQString(i18n)
|
% getVatsimDataFileUrls().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
|
|
||||||
% "FSD test servers: "
|
% QStringLiteral("FSD test servers: ")
|
||||||
% getFsdTestServers().toQString(i18n)
|
% getFsdTestServers().toQString(i18n)
|
||||||
% separator
|
% separator
|
||||||
|
|
||||||
% "Crash report server: "
|
% QStringLiteral("Crash report server: ")
|
||||||
% getCrashReportServerUrl().toQString(i18n);
|
% getCrashReportServerUrl().toQString(i18n);
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
|
|||||||
@@ -1140,8 +1140,4 @@ namespace BlackCore
|
|||||||
this->stopImpl();
|
this->stopImpl();
|
||||||
m_isRunning = false;
|
m_isRunning = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ISimulatorFactory::~ISimulatorFactory()
|
|
||||||
{ }
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -604,7 +604,7 @@ namespace BlackCore
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! ISimulatorVirtual destructor
|
//! ISimulatorVirtual destructor
|
||||||
virtual ~ISimulatorFactory();
|
virtual ~ISimulatorFactory() {}
|
||||||
|
|
||||||
//! Create a new instance of a driver
|
//! Create a new instance of a driver
|
||||||
//! \param info metadata about simulator
|
//! \param info metadata about simulator
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ namespace BlackCore
|
|||||||
const CUrlLogList outdatedPendingUrls = m_urlReadLog.findOutdatedPending(OutdatedPendingCallMs);
|
const CUrlLogList outdatedPendingUrls = m_urlReadLog.findOutdatedPending(OutdatedPendingCallMs);
|
||||||
if (!outdatedPendingUrls.isEmpty())
|
if (!outdatedPendingUrls.isEmpty())
|
||||||
{
|
{
|
||||||
CLogMessage(this).warning("Detected outdated pending calls: '%1'") << outdatedPendingUrls.toQString(true);
|
CLogMessage(this).warning("Detected outdated reader pending calls: '%1'") << outdatedPendingUrls.toQString(true);
|
||||||
m_urlReadLog.removeOlderThanNowMinusOffset(OutdatedPendingCallMs); // clean up
|
m_urlReadLog.removeOlderThanNowMinusOffset(OutdatedPendingCallMs); // clean up
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ namespace BlackMisc
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//! Constructor
|
//! Constructor
|
||||||
CGenericDBusInterface(const QString &serviceName, const QString &path, const QString &interfaceName, const QDBusConnection &connection, QObject *parent = 0) :
|
CGenericDBusInterface(const QString &serviceName, const QString &path, const QString &interfaceName, const QDBusConnection &connection, QObject *parent = nullptr) :
|
||||||
QDBusAbstractInterface(serviceName, path, interfaceName.toUtf8().constData(), connection, parent)
|
QDBusAbstractInterface(serviceName, path, interfaceName.toUtf8().constData(), connection, parent)
|
||||||
{ }
|
{ }
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ namespace BlackMisc
|
|||||||
static const QString r("voice listening only");
|
static const QString r("voice listening only");
|
||||||
static const QString u("unknown");
|
static const QString u("unknown");
|
||||||
|
|
||||||
switch (this->m_voiceCapabilities)
|
switch (m_voiceCapabilities)
|
||||||
{
|
{
|
||||||
case Voice: return v;
|
case Voice: return v;
|
||||||
case TextOnly: return t;
|
case TextOnly: return t;
|
||||||
@@ -64,7 +64,7 @@ namespace BlackMisc
|
|||||||
|
|
||||||
CIcon CVoiceCapabilities::toIcon() const
|
CIcon CVoiceCapabilities::toIcon() const
|
||||||
{
|
{
|
||||||
switch (this->m_voiceCapabilities)
|
switch (m_voiceCapabilities)
|
||||||
{
|
{
|
||||||
case Voice: return CIcon::iconByIndex(CIcons::NetworkCapabilityVoiceBackground);
|
case Voice: return CIcon::iconByIndex(CIcons::NetworkCapabilityVoiceBackground);
|
||||||
case TextOnly: return CIcon::iconByIndex(CIcons::NetworkCapabilityTextOnly);
|
case TextOnly: return CIcon::iconByIndex(CIcons::NetworkCapabilityTextOnly);
|
||||||
|
|||||||
@@ -6,10 +6,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>273</width>
|
<width>275</width>
|
||||||
<height>191</height>
|
<height>175</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>250</width>
|
||||||
|
<height>150</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>X-Plane plugin settings</string>
|
<string>X-Plane plugin settings</string>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -46,6 +46,7 @@
|
|||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QPointer>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
|
||||||
class QHBoxLayout;
|
class QHBoxLayout;
|
||||||
@@ -177,7 +178,12 @@ void SwiftGuiStd::init()
|
|||||||
emit sGui->startUpCompleted(true);
|
emit sGui->startUpCompleted(true);
|
||||||
m_init = true;
|
m_init = true;
|
||||||
|
|
||||||
QTimer::singleShot(2500, this, &SwiftGuiStd::verifyPrerequisites);
|
QPointer<SwiftGuiStd> myself(this);
|
||||||
|
QTimer::singleShot(5000, this, [ = ]
|
||||||
|
{
|
||||||
|
if (!myself) { return; }
|
||||||
|
this->verifyPrerequisites();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwiftGuiStd::initStyleSheet()
|
void SwiftGuiStd::initStyleSheet()
|
||||||
|
|||||||
Reference in New Issue
Block a user