mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-01-10 16:19:59 +01:00
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:
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user