mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-03-31 12:55:33 +08:00
Style
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -304,7 +304,7 @@ namespace BlackMisc
|
||||
case IndexPixmap:
|
||||
case IndexString:
|
||||
default:
|
||||
break;
|
||||
break; // also covers
|
||||
}
|
||||
|
||||
// slow, only last resort
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -38,7 +38,7 @@ namespace XSwiftBus
|
||||
CDBusServer();
|
||||
|
||||
//! Destructor
|
||||
~CDBusServer();
|
||||
~CDBusServer() override;
|
||||
|
||||
//! Set the dispatcher
|
||||
void setDispatcher(CDBusDispatcher *dispatcher);
|
||||
|
||||
Reference in New Issue
Block a user