Apply clang-tidy's modernize-use-auto

git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@5449 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
scorpio810
2018-07-19 16:27:20 +00:00
parent e4b1ba9797
commit b97b01d63c
98 changed files with 427 additions and 427 deletions

View File

@@ -349,7 +349,7 @@ bool AlignmentTextsGroupCommand::mergeWith(const QUndoCommand *other)
if (id() != other->id() || other->childCount())
return false;
AlignmentTextsGroupCommand const *undo = static_cast<const AlignmentTextsGroupCommand *>(other);
auto const *undo = static_cast<const AlignmentTextsGroupCommand *>(other);
if (m_group != undo->m_group)
return false;

View File

@@ -38,7 +38,7 @@ ChangeElementInformationCommand::ChangeElementInformationCommand(Element *elmt,
bool ChangeElementInformationCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id()) return false;
ChangeElementInformationCommand const *undo = static_cast<const ChangeElementInformationCommand*>(other);
auto const *undo = static_cast<const ChangeElementInformationCommand*>(other);
if (m_element != undo->m_element) return false;
m_new_info = undo->m_new_info;
return true;

View File

@@ -45,7 +45,7 @@ LinkElementCommand::LinkElementCommand(Element *element_, QUndoCommand *parent):
bool LinkElementCommand::mergeWith(const QUndoCommand *other)
{
if (id() != other->id() || other->childCount()) return false;
LinkElementCommand const *undo = static_cast<const LinkElementCommand *> (other);
auto const *undo = static_cast<const LinkElementCommand *> (other);
if (m_element != undo->m_element) return false;
m_linked_after = undo->m_linked_after;
return true;

View File

@@ -61,7 +61,7 @@ m_diagram(diagram)
break;
case QGraphicsItemGroup::Type:
{
if(ElementTextItemGroup *grp = dynamic_cast<ElementTextItemGroup *>(item))
if(auto *grp = dynamic_cast<ElementTextItemGroup *>(item))
if(grp->parentElement() && !grp->parentElement()->isSelected())
m_undo << new QPropertyUndoCommand(grp, "rotation", QVariant(item->rotation()), QVariant(item->rotation()+angle), this);
}

View File

@@ -43,7 +43,7 @@ m_diagram(diagram)
texts_list << dti;
if(dti->type() == ConductorTextItem::Type)
{
ConductorTextItem *cti = static_cast<ConductorTextItem *>(dti);
auto *cti = static_cast<ConductorTextItem *>(dti);
m_cond_texts.insert(cti, cti->wasRotateByUser());
}
}
@@ -143,7 +143,7 @@ void RotateTextsCommand::setupAnimation(QObject *target, const QByteArray &prope
if(m_anim_group == nullptr)
m_anim_group = new QParallelAnimationGroup();
QPropertyAnimation *animation = new QPropertyAnimation(target, propertyName);
auto *animation = new QPropertyAnimation(target, propertyName);
animation->setDuration(300);
animation->setStartValue(start);
animation->setEndValue(end);