Code style.

This commit is contained in:
Roman Telezhynskyi 2021-11-18 13:29:53 +02:00
parent 421a8df4be
commit 679bb9af48
3 changed files with 7 additions and 6 deletions

View File

@ -328,7 +328,7 @@ void VWidgetGroups::FillTable(QMap<quint32, VGroupData> groups)
++currentRow;
const VGroupData data = i.value();
QTableWidgetItem *item = new QTableWidgetItem();
auto *item = new QTableWidgetItem();
item->setTextAlignment(Qt::AlignHCenter);
(data.visible) ? item->setIcon(QIcon("://icon/16x16/open_eye.png"))
: item->setIcon(QIcon("://icon/16x16/closed_eye.png"));

View File

@ -474,19 +474,20 @@ int VAbstractPattern::CountPP() const
//---------------------------------------------------------------------------------------------------------------------
QDomElement VAbstractPattern::GetPPElement(const QString &name)
{
if (name.isEmpty() == false)
if (not name.isEmpty())
{
const QDomNodeList elements = this->documentElement().elementsByTagName( TagDraw );
if (elements.size() == 0)
{
return QDomElement();
}
for ( qint32 i = 0; i < elements.count(); i++ )
{
QDomElement element = elements.at( i ).toElement();
if (element.isNull() == false)
QDomElement element = elements.at(i).toElement();
if (not element.isNull())
{
if ( element.attribute( AttrName ) == name )
if (element.attribute(AttrName) == name)
{
return element;
}

View File

@ -42,7 +42,7 @@ AddToCalc::AddToCalc(const QDomElement &xml, VAbstractPattern *doc, QUndoCommand
: VUndoCommand(xml, doc, parent), nameActivDraw(doc->GetNameActivPP()), cursor(doc->getCursor())
{
setText(tr("add object"));
nodeId = doc->GetParametrId(xml);
nodeId = VAbstractPattern::GetParametrId(xml);
}
//---------------------------------------------------------------------------------------------------------------------