mirror of
https://github.com/swift-project/pilotclient.git
synced 2026-04-14 16:55:36 +08:00
Fixed clazy warnings: unnecessary containers and containers being detached.
This commit is contained in:
@@ -59,7 +59,7 @@ namespace BlackGui
|
||||
if (c.isEmpty()) { return; }
|
||||
if (c.startsWith('.'))
|
||||
{
|
||||
if (c.toLower().contains("help"))
|
||||
if (c.contains("help", Qt::CaseInsensitive))
|
||||
{
|
||||
this->setCommandTooltip();
|
||||
return;
|
||||
|
||||
@@ -320,10 +320,10 @@ namespace BlackGui
|
||||
QList<CMenuAction> toQList() const;
|
||||
|
||||
//! First action
|
||||
CMenuAction first() const { return toQList().first(); }
|
||||
CMenuAction first() const { return m_actions.first(); }
|
||||
|
||||
//! Last action
|
||||
CMenuAction last() const { return toQList().last(); }
|
||||
CMenuAction last() const { return m_actions.last(); }
|
||||
|
||||
//! All actions;
|
||||
operator QList<QAction *>() const;
|
||||
|
||||
@@ -513,7 +513,7 @@ namespace BlackGui
|
||||
|
||||
if (!m_pendingMessageCalls.isEmpty())
|
||||
{
|
||||
std::function<void()> f = m_pendingMessageCalls.front();
|
||||
std::function<void()> f = m_pendingMessageCalls.constFirst();
|
||||
m_pendingMessageCalls.removeFirst();
|
||||
const QPointer<COverlayMessages> myself(this);
|
||||
QTimer::singleShot(500, this, [ = ]
|
||||
|
||||
Reference in New Issue
Block a user