Constness prevents automatic move.

This commit is contained in:
Roman Telezhynskyi 2024-02-19 18:20:46 +02:00
parent 643deeb521
commit a48977c1df
4 changed files with 6 additions and 6 deletions

View File

@ -1058,7 +1058,7 @@ void VPLayoutFileReader::AssertRootTag(const QString &tag) const
auto VPLayoutFileReader::ReadAttributeString(const QXmlStreamAttributes &attribs, const QString &name,
const QString &defValue) -> QString
{
const QString parameter = attribs.value(name).toString();
QString parameter = attribs.value(name).toString();
if (parameter.isEmpty())
{
if (defValue.isEmpty())

View File

@ -2778,7 +2778,7 @@ auto VAbstractPattern::ReadPatternNumber() const -> QString
//---------------------------------------------------------------------------------------------------------------------
auto VAbstractPattern::ReadLabelDateFormat() const -> QString
{
const QString globalLabelDateFormat = VAbstractApplication::VApp()->Settings()->GetLabelDateFormat();
QString globalLabelDateFormat = VAbstractApplication::VApp()->Settings()->GetLabelDateFormat();
const QDomNodeList list = elementsByTagName(TagPatternLabel);
if (list.isEmpty())

View File

@ -574,7 +574,7 @@ auto VDomDocument::GetParametrString(const QDomElement &domElement, const QStrin
{
Q_ASSERT_X(not name.isEmpty(), Q_FUNC_INFO, "name of parametr is empty");
Q_ASSERT_X(not domElement.isNull(), Q_FUNC_INFO, "domElement is null");
const QString parameter = domElement.attribute(name, defValue);
QString parameter = domElement.attribute(name, defValue);
if (parameter.isEmpty())
{
if (defValue.isEmpty())
@ -664,7 +664,7 @@ auto VDomDocument::UniqueTagText(const QString &tagName, const QString &defVal)
QDomElement const domElement = UniqueTag(tagName);
if (not domElement.isNull())
{
const QString text = domElement.text();
QString text = domElement.text();
if (text.isEmpty())
{
return defVal;

View File

@ -282,8 +282,8 @@ auto DrawName(VAbstractPattern *doc, quint32 d1id, quint32 d2id) -> QString
return {};
}
const QString draw1Name = draw1.attribute(VAbstractPattern::AttrName);
const QString draw2Name = draw2.attribute(VAbstractPattern::AttrName);
QString draw1Name = draw1.attribute(VAbstractPattern::AttrName);
QString draw2Name = draw2.attribute(VAbstractPattern::AttrName);
if (draw1Name == draw2Name)
{