diff --git a/src/common/QskStateCombination.cpp b/src/common/QskStateCombination.cpp deleted file mode 100644 index 07a7b481..00000000 --- a/src/common/QskStateCombination.cpp +++ /dev/null @@ -1,14 +0,0 @@ -/****************************************************************************** - * QSkinny - Copyright (C) 2016 Uwe Rathmann - * This file may be used under the terms of the QSkinny License, Version 1.0 - *****************************************************************************/ - -#include "QskStateCombination.h" - -static void qskRegisterStateCombination() -{ - qRegisterMetaType< QskStateCombination >(); -} - -Q_CONSTRUCTOR_FUNCTION( qskRegisterStateCombination ) - diff --git a/src/common/QskStateCombination.h b/src/common/QskStateCombination.h index 8393c90b..13d64e22 100644 --- a/src/common/QskStateCombination.h +++ b/src/common/QskStateCombination.h @@ -21,6 +21,9 @@ class QSK_EXPORT QskStateCombination constexpr QskStateCombination( QskAspect::States = QskAspect::States() ) noexcept; constexpr QskStateCombination( Type, QskAspect::States = QskAspect::States() ) noexcept; + constexpr bool operator==( QskStateCombination ) const noexcept; + constexpr bool operator!=( QskStateCombination ) const noexcept; + constexpr bool isNull() const noexcept; void setType( Type ) noexcept; @@ -36,7 +39,6 @@ class QSK_EXPORT QskStateCombination }; Q_DECLARE_TYPEINFO( QskStateCombination, Q_MOVABLE_TYPE ); -Q_DECLARE_METATYPE( QskStateCombination ) constexpr inline QskStateCombination::QskStateCombination( QskAspect::State state ) noexcept @@ -90,4 +92,14 @@ constexpr inline QskAspect::States QskStateCombination::states() const noexcept return m_states; } +constexpr bool QskStateCombination::operator==( QskStateCombination other ) const noexcept +{ + return ( m_type == other.m_type ) && ( m_states == other.m_states ); +} + +constexpr bool QskStateCombination::operator!=( QskStateCombination other ) const noexcept +{ + return !( *this == other ); +} + #endif diff --git a/src/src.pro b/src/src.pro index a25be7da..0c00a0ec 100644 --- a/src/src.pro +++ b/src/src.pro @@ -63,7 +63,6 @@ SOURCES += \ common/QskScaleTickmarks.cpp \ common/QskShadowMetrics.cpp \ common/QskSizePolicy.cpp \ - common/QskStateCombination.cpp \ common/QskTextColors.cpp \ common/QskTextOptions.cpp