Style, singleShot guard, Doxygen

This commit is contained in:
Klaus Basan
2018-08-08 04:57:38 +02:00
parent 6db9083c03
commit 6897abe912
10 changed files with 42 additions and 34 deletions

View File

@@ -166,6 +166,7 @@ namespace BlackCore
virtual BlackMisc::Simulation::CSimulatorInfo simulatorsWithInitializedModelSet() const = 0;
//! Verify prerequisites for simulation like an existing model set
//! \pre system needs to be initialized to work correctly
virtual BlackMisc::CStatusMessageList verifyPrerequisites() const = 0;
//! Number of installed models in simulator eco system

View File

@@ -83,7 +83,6 @@ namespace BlackCore
Q_ASSERT(s);
s = connection.connect(serviceName, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName(),
"requestUiConsoleMessage", this, SIGNAL(requestUiConsoleMessage(QString, bool)));
Q_ASSERT(s);
Q_UNUSED(s);
this->relayBaseClassSignals(serviceName, connection, IContextSimulator::ObjectPath(), IContextSimulator::InterfaceName());

View File

@@ -270,73 +270,73 @@ namespace BlackCore
QString CGlobalSetup::convertToQString(const QString &separator, bool i18n) const
{
QString s =
"timestamp: "
QStringLiteral("timestamp: ")
% this->getFormattedUtcTimestampYmdhms()
% separator
% "Global setup loaded: "
% QStringLiteral("Global setup loaded: ")
% boolToYesNo(this->wasLoaded())
% separator
% "For development: "
% QStringLiteral("For development: ")
% boolToYesNo(isDevelopment())
% separator
% "Mapping min.version: "
% QStringLiteral("Mapping min.version: ")
% this->getMappingMinimumVersionString()
% separator
% "Distribution URLs: "
% QStringLiteral("Distribution URLs: ")
% getSwiftUpdateInfoFileUrls().toQString(i18n)
% separator
% "Bootstrap URLs: "
% QStringLiteral("Bootstrap URLs: ")
% getSwiftBootstrapFileUrls().toQString(i18n)
% separator
% "News URLs: "
% QStringLiteral("News URLs: ")
% getSwiftLatestNewsUrls().toQString(i18n)
% separator
% "Help URLs: "
% QStringLiteral("Help URLs: ")
% m_onlineHelpUrls.toQString(i18n)
% separator
% "swift map URLs: "
% QStringLiteral("swift map URLs: ")
% getSwiftMapUrls().toQString(i18n)
% separator;
s +=
"DB root directory: "
QStringLiteral("DB root directory: ")
% getDbRootDirectoryUrl().toQString(i18n)
% separator
% "ICAO DB reader: "
% QStringLiteral("ICAO DB reader: ")
% getDbIcaoReaderUrl().toQString(i18n)
% separator
% "Model DB reader: "
% QStringLiteral("Model DB reader: ")
% getDbModelReaderUrl().toQString(i18n)
% separator
% "Airport DB reader: "
% QStringLiteral("Airport DB reader: ")
% getDbAirportReaderUrl().toQString(i18n)
% separator
% "DB home page: "
% QStringLiteral("DB home page: ")
% getDbHomePageUrl().toQString(i18n)
% separator
% "DB login service: "
% QStringLiteral("DB login service: ")
% getDbLoginServiceUrl().toQString(i18n)
% separator
% "DB client ping service: "
% QStringLiteral("DB client ping service: ")
% getDbClientPingServiceUrl().toQString(i18n);
s +=
"VATSIM bookings: "
QStringLiteral("VATSIM bookings: ")
% getVatsimBookingsUrl().toQString(i18n)
% separator
% "VATSIM METARs: "
% QStringLiteral("VATSIM METARs: ")
% getVatsimMetarsUrls().toQString(i18n)
% separator
% "VATSIM data file: "
% QStringLiteral("VATSIM data file: ")
% getVatsimDataFileUrls().toQString(i18n)
% separator
% "FSD test servers: "
% QStringLiteral("FSD test servers: ")
% getFsdTestServers().toQString(i18n)
% separator
% "Crash report server: "
% QStringLiteral("Crash report server: ")
% getCrashReportServerUrl().toQString(i18n);
return s;

View File

@@ -1140,8 +1140,4 @@ namespace BlackCore
this->stopImpl();
m_isRunning = false;
}
ISimulatorFactory::~ISimulatorFactory()
{ }
} // namespace

View File

@@ -604,7 +604,7 @@ namespace BlackCore
{
public:
//! ISimulatorVirtual destructor
virtual ~ISimulatorFactory();
virtual ~ISimulatorFactory() {}
//! Create a new instance of a driver
//! \param info metadata about simulator

View File

@@ -177,7 +177,7 @@ namespace BlackCore
const CUrlLogList outdatedPendingUrls = m_urlReadLog.findOutdatedPending(OutdatedPendingCallMs);
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
}

View File

@@ -37,7 +37,7 @@ namespace BlackMisc
{
public:
//! 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)
{ }

View File

@@ -35,7 +35,7 @@ namespace BlackMisc
static const QString r("voice listening only");
static const QString u("unknown");
switch (this->m_voiceCapabilities)
switch (m_voiceCapabilities)
{
case Voice: return v;
case TextOnly: return t;
@@ -64,7 +64,7 @@ namespace BlackMisc
CIcon CVoiceCapabilities::toIcon() const
{
switch (this->m_voiceCapabilities)
switch (m_voiceCapabilities)
{
case Voice: return CIcon::iconByIndex(CIcons::NetworkCapabilityVoiceBackground);
case TextOnly: return CIcon::iconByIndex(CIcons::NetworkCapabilityTextOnly);

View File

@@ -6,10 +6,16 @@
<rect>
<x>0</x>
<y>0</y>
<width>273</width>
<height>191</height>
<width>275</width>
<height>175</height>
</rect>
</property>
<property name="minimumSize">
<size>
<width>250</width>
<height>150</height>
</size>
</property>
<property name="windowTitle">
<string>X-Plane plugin settings</string>
</property>

View File

@@ -46,6 +46,7 @@
#include <QStatusBar>
#include <QString>
#include <QTimer>
#include <QPointer>
#include <QVBoxLayout>
class QHBoxLayout;
@@ -177,7 +178,12 @@ void SwiftGuiStd::init()
emit sGui->startUpCompleted(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()