forked from qt-creator/qt-creator
QmlDesigner: Compile fix against C++20
Move the initialization of the traceToken into c'tors. Otherwise, the following error occurs: internal compiler error: in assign_temp, at function.c:986 Change-Id: I20abfbf70e01fc6268ae6d4245272ef3a89daed5 Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
@@ -53,6 +53,7 @@ public:
|
|||||||
, minorVersion(minorVersion)
|
, minorVersion(minorVersion)
|
||||||
, isValid(true)
|
, isValid(true)
|
||||||
, internalId(internalId)
|
, internalId(internalId)
|
||||||
|
, traceToken(ModelTracing::category().beginObject("InternalNode"_t))
|
||||||
{}
|
{}
|
||||||
|
|
||||||
InternalNodeAbstractProperty::Pointer parentProperty() const { return m_parentProperty.lock(); }
|
InternalNodeAbstractProperty::Pointer parentProperty() const { return m_parentProperty.lock(); }
|
||||||
@@ -223,8 +224,7 @@ public:
|
|||||||
ModuleId moduleId;
|
ModuleId moduleId;
|
||||||
ImportedTypeNameId importedTypeNameId;
|
ImportedTypeNameId importedTypeNameId;
|
||||||
TypeId typeId;
|
TypeId typeId;
|
||||||
NO_UNIQUE_ADDRESS ModelTracing::ObjectTraceToken traceToken = ModelTracing::category().beginObject(
|
NO_UNIQUE_ADDRESS ModelTracing::ObjectTraceToken traceToken;
|
||||||
"InternalNode"_t);
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
AuxiliaryDatas m_auxiliaryDatas;
|
AuxiliaryDatas m_auxiliaryDatas;
|
||||||
|
|||||||
@@ -2,19 +2,19 @@
|
|||||||
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
||||||
|
|
||||||
#include "internalproperty.h"
|
#include "internalproperty.h"
|
||||||
#include "internalbindingproperty.h"
|
|
||||||
#include "internalvariantproperty.h"
|
|
||||||
#include "internalnodelistproperty.h"
|
|
||||||
#include "internalnodeproperty.h"
|
|
||||||
#include "internalsignalhandlerproperty.h"
|
|
||||||
#include "internalnode_p.h"
|
#include "internalnode_p.h"
|
||||||
|
|
||||||
namespace QmlDesigner {
|
namespace QmlDesigner::Internal {
|
||||||
|
|
||||||
namespace Internal {
|
static auto traceTokenInitArg(const QByteArray &name)
|
||||||
|
{
|
||||||
|
return ModelTracing::category().beginObject("InternalProperty"_t, keyValue("name", name));
|
||||||
|
}
|
||||||
|
|
||||||
// Creates invalid InternalProperty
|
// Creates invalid InternalProperty
|
||||||
InternalProperty::InternalProperty() = default;
|
InternalProperty::InternalProperty()
|
||||||
|
: traceToken(traceTokenInitArg(m_name))
|
||||||
|
{}
|
||||||
|
|
||||||
InternalProperty::~InternalProperty() = default;
|
InternalProperty::~InternalProperty() = default;
|
||||||
|
|
||||||
@@ -23,9 +23,9 @@ InternalProperty::InternalProperty(const PropertyName &name,
|
|||||||
PropertyType propertyType)
|
PropertyType propertyType)
|
||||||
: m_name(name)
|
: m_name(name)
|
||||||
, m_propertyOwner(propertyOwner)
|
, m_propertyOwner(propertyOwner)
|
||||||
, m_propertyType{propertyType}
|
, m_propertyType(propertyType)
|
||||||
{
|
, traceToken(traceTokenInitArg(m_name))
|
||||||
}
|
{}
|
||||||
|
|
||||||
bool InternalProperty::isValid() const
|
bool InternalProperty::isValid() const
|
||||||
{
|
{
|
||||||
@@ -52,7 +52,5 @@ void InternalProperty::resetDynamicTypeName()
|
|||||||
m_dynamicType.clear();
|
m_dynamicType.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} //namespace QmlDesigner::Internal
|
||||||
} //namespace Internal
|
|
||||||
} //namespace QmlDesigner
|
|
||||||
|
|
||||||
|
|||||||
@@ -193,8 +193,7 @@ private:
|
|||||||
TypeName m_dynamicType;
|
TypeName m_dynamicType;
|
||||||
std::weak_ptr<InternalNode> m_propertyOwner;
|
std::weak_ptr<InternalNode> m_propertyOwner;
|
||||||
PropertyType m_propertyType = PropertyType::None;
|
PropertyType m_propertyType = PropertyType::None;
|
||||||
NO_UNIQUE_ADDRESS ModelTracing::ObjectTraceToken traceToken = ModelTracing::category().beginObject(
|
NO_UNIQUE_ADDRESS ModelTracing::ObjectTraceToken traceToken;
|
||||||
"InternalProperty"_t, keyValue("name", m_name));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
|||||||
Reference in New Issue
Block a user