Modeling: Hopefully unconfuse MSVC 2013 compiler

Change-Id: I5e98dc014a78ef23d325c5cfbf06027042c9aaa6
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-11-25 09:13:03 +01:00
parent adff3e1275
commit 1ad0d015b9

View File

@@ -45,6 +45,28 @@
#include <QSet>
#include <QDebug>
namespace {
class DepthProperties
{
public:
DepthProperties() = default;
DepthProperties(qmt::DefaultStyleEngine::ElementType elementType,
qmt::DObject::VisualPrimaryRole visualPrimaryRole,
qmt::DObject::VisualSecondaryRole visualSecondaryRole)
: m_elementType(elementType),
m_visualPrimaryRole(visualPrimaryRole),
m_visualSecondaryRole(visualSecondaryRole)
{
}
qmt::DefaultStyleEngine::ElementType m_elementType = qmt::DefaultStyleEngine::TypeOther;
qmt::DObject::VisualPrimaryRole m_visualPrimaryRole = qmt::DObject::PrimaryRoleNormal;
qmt::DObject::VisualSecondaryRole m_visualSecondaryRole = qmt::DObject::SecondaryRoleNone;
};
} // namespace
namespace qmt {
// TODO use tuple instead of these 4 explicit key classes
@@ -241,26 +263,6 @@ const Style *DefaultStyleEngine::applyObjectStyle(const Style *baseStyle, const
{
ElementType elementType = objectType(styledObject.object());
class DepthProperties
{
public:
DepthProperties()
{
}
DepthProperties(ElementType elementType, DObject::VisualPrimaryRole visualPrimaryRole,
DObject::VisualSecondaryRole visualSecondaryRole)
: m_elementType(elementType),
m_visualPrimaryRole(visualPrimaryRole),
m_visualSecondaryRole(visualSecondaryRole)
{
}
ElementType m_elementType = DefaultStyleEngine::TypeOther;
DObject::VisualPrimaryRole m_visualPrimaryRole = DObject::PrimaryRoleNormal;
DObject::VisualSecondaryRole m_visualSecondaryRole = DObject::SecondaryRoleNone;
};
// find colliding elements which best match visual appearance of styled object
DObject::VisualPrimaryRole styledVisualPrimaryRole = styledObject.objectVisuals().visualPrimaryRole();
DObject::VisualSecondaryRole styledVisualSecondaryRole = styledObject.objectVisuals().visualSecondaryRole();