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; ++currentRow;
const VGroupData data = i.value(); const VGroupData data = i.value();
QTableWidgetItem *item = new QTableWidgetItem(); auto *item = new QTableWidgetItem();
item->setTextAlignment(Qt::AlignHCenter); item->setTextAlignment(Qt::AlignHCenter);
(data.visible) ? item->setIcon(QIcon("://icon/16x16/open_eye.png")) (data.visible) ? item->setIcon(QIcon("://icon/16x16/open_eye.png"))
: item->setIcon(QIcon("://icon/16x16/closed_eye.png")); : item->setIcon(QIcon("://icon/16x16/closed_eye.png"));

View File

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

View File

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