mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Try Clazy fix-its
clazy is a compiler plugin which allows clang to understand Qt semantics. You get more than 50 Qt related compiler warnings, ranging from unneeded memory allocations to misusage of API, including fix-its for automatic refactoring. https://invent.kde.org/sdk/clazy
This commit is contained in:
@@ -184,7 +184,7 @@ void AddTextsGroupCommand::redo()
|
||||
}
|
||||
else
|
||||
{
|
||||
for(DynamicElementTextItem *deti : m_deti_list)
|
||||
for (DynamicElementTextItem* deti : std::as_const(m_deti_list))
|
||||
m_element.data()->addTextToGroup(
|
||||
deti,
|
||||
m_group.data());
|
||||
@@ -194,7 +194,7 @@ void AddTextsGroupCommand::redo()
|
||||
else if(m_group)
|
||||
{
|
||||
m_element.data()->addTextGroup(m_group.data());
|
||||
for(DynamicElementTextItem *deti : m_deti_list)
|
||||
for (DynamicElementTextItem* deti : std::as_const(m_deti_list))
|
||||
m_element.data()->addTextToGroup(deti, m_group.data());
|
||||
}
|
||||
}
|
||||
@@ -236,8 +236,9 @@ void RemoveTextsGroupCommand::undo()
|
||||
if(m_element && m_group)
|
||||
{
|
||||
m_element.data()->addTextGroup(m_group.data());
|
||||
|
||||
for(const QPointer<DynamicElementTextItem>& p : m_text_list)
|
||||
|
||||
for (const QPointer<DynamicElementTextItem>& p :
|
||||
std::as_const(m_text_list))
|
||||
if(p)
|
||||
m_element.data()->addTextToGroup(
|
||||
p.data(),
|
||||
@@ -252,7 +253,8 @@ void RemoveTextsGroupCommand::redo()
|
||||
{
|
||||
if(m_element && m_group)
|
||||
{
|
||||
for(const QPointer<DynamicElementTextItem>& p : m_text_list)
|
||||
for (const QPointer<DynamicElementTextItem>& p :
|
||||
std::as_const(m_text_list))
|
||||
if(p)
|
||||
m_element.data()->removeTextFromGroup(
|
||||
p.data(),
|
||||
|
||||
Reference in New Issue
Block a user