Fixed clazy warnings: unnecessary containers and containers being detached.

This commit is contained in:
Mat Sutcliffe
2018-12-17 17:43:31 +00:00
parent 462172a87f
commit c71d358648
9 changed files with 14 additions and 14 deletions

View File

@@ -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;

View File

@@ -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;

View File

@@ -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, [ = ]