Apply clang-tidy's performance-unnecessary-value-param, performance-for-

range-copy


git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5448 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-07-19 14:14:31 +00:00
parent 05fea9b94a
commit e4b1ba9797
97 changed files with 263 additions and 238 deletions

View File

@@ -45,7 +45,7 @@ DynamicTextFieldEditor::~DynamicTextFieldEditor()
{
delete ui;
if(!m_connection_list.isEmpty())
for(QMetaObject::Connection con : m_connection_list)
for(const QMetaObject::Connection& con : m_connection_list)
disconnect(con);
}
@@ -59,7 +59,7 @@ bool DynamicTextFieldEditor::setPart(CustomElementPart *part)
{
//Remove previous connection
if(!m_connection_list.isEmpty())
for(QMetaObject::Connection con : m_connection_list)
for(const QMetaObject::Connection& con : m_connection_list)
disconnect(con);
QGraphicsItem *qgi = part->toItem();
@@ -129,7 +129,7 @@ void DynamicTextFieldEditor::updateForm()
}
}
void DynamicTextFieldEditor::setColorPushButton(QColor color)
void DynamicTextFieldEditor::setColorPushButton(const QColor& color)
{
QPalette palette;
palette.setColor(QPalette::Button, color);
@@ -155,10 +155,10 @@ void DynamicTextFieldEditor::fillInfoComboBox()
//We use a QMap because the keys of the map are sorted, then no matter the curent local,
//the value of the combo box are always alphabetically sorted
QMap <QString, QString> info_map;
for(QString str : strl)
for(const QString& str : strl)
info_map.insert(QETApp::elementTranslatedInfoKey(str), str);
for (QString key : info_map.keys())
for (const QString& key : info_map.keys())
ui->m_elmt_info_cb->addItem(key, info_map.value(key));
}