viewdata:provide errors/warnings counters

work/spdx
Michail Vourlakos 4 years ago
parent b22ead393e
commit ae76e82297

@ -43,6 +43,8 @@ View::View(View &&o)
m_originFile(o.m_originFile),
m_originLayout(o.m_originLayout),
m_originView(o.m_originView),
errors(o.errors),
warnings(o.warnings),
subcontainments(o.subcontainments)
{
}
@ -62,6 +64,8 @@ View::View(const View &o)
m_originFile(o.m_originFile),
m_originLayout(o.m_originLayout),
m_originView(o.m_originView),
errors(o.errors),
warnings(o.warnings),
subcontainments(o.subcontainments)
{
}
@ -88,6 +92,9 @@ View &View::operator=(const View &rhs)
m_originFile = rhs.m_originFile;
m_originLayout = rhs.m_originLayout;
m_originView = rhs.m_originView;
errors = rhs.errors;
warnings = rhs.warnings;
subcontainments = rhs.subcontainments;
return (*this);
@ -110,6 +117,9 @@ View &View::operator=(View &&rhs)
m_originFile = rhs.m_originFile;
m_originLayout = rhs.m_originLayout;
m_originView = rhs.m_originView;
errors = rhs.errors;
warnings = rhs.warnings;
subcontainments = rhs.subcontainments;
return (*this);
@ -119,9 +129,9 @@ bool View::operator==(const View &rhs) const
{
return (id == rhs.id)
&& (name == rhs.name)
//&& (isActive == rhs.isActive) /*activeness is a state and is not considered*/
//&& (isMoveOrigin == rhs.isMoveOrigin) /*changing layouts is a state and is not considered*/
//&& (isMoveDestination == rhs.isMoveDestination) /*changing layouts is a state and is not considered*/
//&& (isActive == rhs.isActive) /*Disabled because this is not needed in order to track view changes for saving*/
//&& (isMoveOrigin == rhs.isMoveOrigin) /*Disabled because this is not needed in order to track view changes for saving*/
//&& (isMoveDestination == rhs.isMoveDestination) /*Disabled because this is not needed in order to track view changes for saving*/
&& (onPrimary == rhs.onPrimary)
&& (screen == rhs.screen)
&& (screenEdgeMargin == rhs.screenEdgeMargin)
@ -132,6 +142,8 @@ bool View::operator==(const View &rhs) const
&& (m_originFile == rhs.m_originFile)
&& (m_originLayout == rhs.m_originLayout)
&& (m_originView == rhs.m_originView)
//&& (errors == rhs.errors) /*Disabled because this is not needed in order to track view changes for saving*/
//&& (warnings == rhs.warnings) /*Disabled because this is not needed in order to track view changes for saving*/
&& (subcontainments == rhs.subcontainments);
}

@ -62,6 +62,9 @@ public:
Latte::Types::Alignment alignment{Latte::Types::Center};
GenericTable<Data::Generic> subcontainments;
int errors{0};
int warnings{0};
//! View sub-states
bool isMoveOrigin{false};
bool isMoveDestination{false};
@ -71,6 +74,8 @@ public:
bool hasViewTemplateOrigin() const;
bool hasLayoutOrigin() const;
bool hasSubContainment(const QString &subId) const;
bool hasErrors() const;
bool hasWarnings() const;
bool isHorizontal() const;
bool isVertical() const;

Loading…
Cancel
Save