mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-02 23:25:53 +08:00
Ref T488 Update cppcheck suppressions.
This commit is contained in:
@@ -318,6 +318,7 @@ namespace BlackGui
|
||||
ui->le_SimulatorDirectory->setPlaceholderText(simDir.isEmpty() ? "Simulator directory" : simDir);
|
||||
|
||||
//! \fixme correct version when Qt multiline placeholder is fixed https://bugreports.qt.io/browse/QTBUG-43817
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
constexpr bool BrokenMultilinePlaceholder = true; // last checked with Qt 5.10
|
||||
|
||||
// we take the settings and update to latest sim.directory
|
||||
@@ -332,6 +333,7 @@ namespace BlackGui
|
||||
else
|
||||
{
|
||||
const QString ms = m.join("<br>");
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (BrokenMultilinePlaceholder && m.size() > 1)
|
||||
{
|
||||
ui->pte_ModelDirectories->setToolTip(unwrappedTooltip(ms));
|
||||
|
||||
@@ -367,6 +367,7 @@ namespace BlackMisc
|
||||
QString p = port.toLower().trimmed();
|
||||
if (!p.isEmpty())
|
||||
{
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
p.toShort(&ok);
|
||||
if (!ok)
|
||||
{
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace BlackMisc
|
||||
{
|
||||
// Work around lambda's deleted copy assignment operator
|
||||
this->~OutputIterator();
|
||||
return *new (this) OutputIterator(other);
|
||||
new (this) OutputIterator(other);
|
||||
return *this;
|
||||
}
|
||||
|
||||
//! Destructor.
|
||||
|
||||
@@ -431,6 +431,7 @@ namespace BlackMisc
|
||||
if (value.isUndefined())
|
||||
{
|
||||
constexpr bool required = false; //! \fixme add RequiredForJson flag in metaclass system
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (required) { throw CJsonException(QStringLiteral("Missing required member '%1'").arg(member.latin1Name())); }
|
||||
}
|
||||
else
|
||||
|
||||
@@ -87,6 +87,7 @@ namespace BlackMisc
|
||||
const QString p = this->part(index);
|
||||
if (p.isEmpty()) { return false; }
|
||||
bool ok = false;
|
||||
// cppcheck-suppress ignoredReturnValue
|
||||
p.toInt(&ok);
|
||||
return ok;
|
||||
}
|
||||
|
||||
@@ -2391,6 +2391,7 @@ namespace BlackSimPlugin
|
||||
void CSimulatorFsxCommon::traceSendId(const CSimConnectObject &simObject, const QString &functionName, const QString &details, bool forceTrace)
|
||||
{
|
||||
if (!forceTrace && !this->isTracingSendId()) { return; }
|
||||
// cppcheck-suppress knownConditionTrueFalse
|
||||
if (MaxSendIdTraces < 1) { return; }
|
||||
DWORD dwLastId = 0;
|
||||
const HRESULT hr = SimConnect_GetLastSentPacketID(m_hSimConnect, &dwLastId);
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace XSwiftBus
|
||||
CDBusConnection::~CDBusConnection()
|
||||
{
|
||||
close();
|
||||
if (m_connection) { dispatch(); }
|
||||
if (m_connection) { dispatch(); } // dispatch is virtual, but safe to call in dtor, as it's declared final
|
||||
if (m_dispatcher) { m_dispatcher->remove(this); }
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,8 @@ namespace XSwiftBus
|
||||
CDBusError lastError() const { return m_lastError; }
|
||||
|
||||
protected:
|
||||
virtual void dispatch() override;
|
||||
// cppcheck-suppress virtualCallInConstructor
|
||||
virtual void dispatch() override final;
|
||||
|
||||
private:
|
||||
void setDispatchStatus(DBusConnection *connection, DBusDispatchStatus status);
|
||||
|
||||
Reference in New Issue
Block a user