PD: [skip ci] Fix several clazy issues:
* Maybe you meant to call base method instead [-Wclazy-skipped-base-method] * Missing reference in range-for with non trivial type [-Wclazy-range-loop-reference] * Mixing iterators with const_iterators [-Wclazy-strict-iterators] * Unused QByteArray [-Wclazy-unused-non-trivial-variable] * C++11 range-loop might detach Qt container (QList) [-Wclazy-range-loop-detach]
This commit is contained in:
@@ -258,7 +258,7 @@ void TaskPipeParameters::removeFromListWidget(QListWidget* widget, QString items
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(itemstr, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
@@ -758,7 +758,7 @@ void TaskPipeOrientation::removeFromListWidget(QListWidget* widget, QString name
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(name, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
@@ -876,7 +876,6 @@ void TaskPipeScaling::indexesMoved()
|
||||
PartDesign::Pipe* pipe = static_cast<PartDesign::Pipe*>(vp->getObject());
|
||||
auto originals = pipe->Sections.getSubListValues();
|
||||
|
||||
QByteArray name;
|
||||
int rows = model->rowCount();
|
||||
for (int i = 0; i < rows; i++) {
|
||||
QModelIndex index = model->index(i, 0);
|
||||
@@ -988,7 +987,7 @@ void TaskPipeScaling::removeFromListWidget(QListWidget* widget, QString name)
|
||||
{
|
||||
QList<QListWidgetItem*> items = widget->findItems(name, Qt::MatchExactly);
|
||||
if (!items.empty()) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.begin(); i != items.end(); i++) {
|
||||
for (QList<QListWidgetItem*>::const_iterator i = items.cbegin(); i != items.cend(); i++) {
|
||||
QListWidgetItem* it = widget->takeItem(widget->row(*i));
|
||||
delete it;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user