This commit is contained in:
Klaus Basan
2019-04-26 01:16:15 +02:00
parent 6a9de7389a
commit c51dce8bfd
5 changed files with 11 additions and 11 deletions

View File

@@ -15,6 +15,7 @@
#include <QFlag>
using namespace BlackConfig;
using namespace BlackMisc;
using namespace BlackMisc::PhysicalQuantities;
@@ -62,7 +63,7 @@ namespace BlackCore
bool IContextSimulator::isSimulatorAvailable() const
{
return BlackConfig::CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified();
return CBuildConfig::isCompiledWithFlightSimulatorSupport() && !getSimulatorPluginInfo().isUnspecified();
}
bool IContextSimulator::isSimulatorSimulating() const

View File

@@ -815,7 +815,8 @@ namespace BlackCore
void CContextSimulator::relayStatusMessageToSimulator(const BlackMisc::CStatusMessage &message)
{
if (!this->isSimulatorAvailable()) { return; }
if (!this->isSimulatorAvailable()) { return; }
if (!sApp || sApp->isShuttingDown()) { return; }
const CSimulatorMessagesSettings simMsg = m_messageSettings.getThreadLocal();
if (simMsg.relayThisStatusMessage(message) && m_simulatorPlugin.second)
{

View File

@@ -304,7 +304,7 @@ namespace BlackMisc
case IndexPixmap:
case IndexString:
default:
break;
break; // also covers
}
// slow, only last resort

View File

@@ -36,7 +36,7 @@ namespace BlackMisc
temp.resize(0); // unlike clear(), resize(0) doesn't release the capacity if there are no implicitly shared copies
quint64 unusedArgs = (1ULL << std::min(63, args.size())) - 1;
for (auto it = format.begin(); ; )
for (auto it = format.begin(); ;)
{
const auto pc = std::find(it, format.end(), u'%');
temp.append(&*it, std::distance(it, pc));
@@ -475,18 +475,16 @@ namespace BlackMisc
switch (i)
{
case IndexMessageAsHtml:
case IndexMessage:
return this->getMessage().compare(compareValue.getMessage());
case IndexMessage: return this->getMessage().compare(compareValue.getMessage());
case IndexSeverityAsString:
case IndexSeverityAsIcon:
case IndexSeverity: return Compare::compare(this->getSeverity(), compareValue.getSeverity());
case IndexSeverity: return Compare::compare(this->getSeverity(), compareValue.getSeverity());
case IndexCategoriesAsString: return this->getCategoriesAsString().compare(compareValue.getCategoriesAsString());
case IndexCategoriesHumanReadableAsString: return this->getHumanReadablePattern().compare(compareValue.getHumanReadablePattern());
case IndexCategoriesHumanReadableAsString: return this->getHumanReadablePattern().compare(compareValue.getHumanReadablePattern());
case IndexCategoryHumanReadableOrTechnicalAsString: return this->getHumanOrTechnicalCategoriesAsString().compare(compareValue.getHumanOrTechnicalCategoriesAsString());
default: break;
}
Q_ASSERT_X(false, Q_FUNC_INFO, "Comapre failed");
return 0;
return CValueObject::comparePropertyByIndex(index, compareValue);
}
QString CStatusMessage::toHtml(bool withIcon, bool withColors) const

View File

@@ -38,7 +38,7 @@ namespace XSwiftBus
CDBusServer();
//! Destructor
~CDBusServer();
~CDBusServer() override;
//! Set the dispatcher
void setDispatcher(CDBusDispatcher *dispatcher);