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

View File

@@ -815,7 +815,8 @@ namespace BlackCore
void CContextSimulator::relayStatusMessageToSimulator(const BlackMisc::CStatusMessage &message) 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(); const CSimulatorMessagesSettings simMsg = m_messageSettings.getThreadLocal();
if (simMsg.relayThisStatusMessage(message) && m_simulatorPlugin.second) if (simMsg.relayThisStatusMessage(message) && m_simulatorPlugin.second)
{ {

View File

@@ -304,7 +304,7 @@ namespace BlackMisc
case IndexPixmap: case IndexPixmap:
case IndexString: case IndexString:
default: default:
break; break; // also covers
} }
// slow, only last resort // 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 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; 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'%'); const auto pc = std::find(it, format.end(), u'%');
temp.append(&*it, std::distance(it, pc)); temp.append(&*it, std::distance(it, pc));
@@ -475,18 +475,16 @@ namespace BlackMisc
switch (i) switch (i)
{ {
case IndexMessageAsHtml: case IndexMessageAsHtml:
case IndexMessage: case IndexMessage: return this->getMessage().compare(compareValue.getMessage());
return this->getMessage().compare(compareValue.getMessage());
case IndexSeverityAsString: case IndexSeverityAsString:
case IndexSeverityAsIcon: 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 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()); case IndexCategoryHumanReadableOrTechnicalAsString: return this->getHumanOrTechnicalCategoriesAsString().compare(compareValue.getHumanOrTechnicalCategoriesAsString());
default: break; default: break;
} }
Q_ASSERT_X(false, Q_FUNC_INFO, "Comapre failed"); return CValueObject::comparePropertyByIndex(index, compareValue);
return 0;
} }
QString CStatusMessage::toHtml(bool withIcon, bool withColors) const QString CStatusMessage::toHtml(bool withIcon, bool withColors) const

View File

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