making clang happy
This commit is contained in:
parent
324ed2f80c
commit
9caad94075
|
@ -288,7 +288,7 @@ namespace QskAspect
|
||||||
|
|
||||||
inline constexpr quint64 Aspect::value() const
|
inline constexpr quint64 Aspect::value() const
|
||||||
{
|
{
|
||||||
return *reinterpret_cast< const quint64* >( this );
|
return *( const quint64* ) this;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline bool Aspect::isAnimator() const
|
inline bool Aspect::isAnimator() const
|
||||||
|
@ -398,7 +398,7 @@ namespace QskAspect
|
||||||
|
|
||||||
inline constexpr Aspect operator|( Subcontrol subControl, const Aspect& aspect )
|
inline constexpr Aspect operator|( Subcontrol subControl, const Aspect& aspect )
|
||||||
{
|
{
|
||||||
return subControl | aspect;
|
return aspect | subControl;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline constexpr Aspect operator|( Type type, const Aspect& aspect )
|
inline constexpr Aspect operator|( Type type, const Aspect& aspect )
|
||||||
|
|
|
@ -76,7 +76,7 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
inline constexpr QskBoxShapeMetrics( Qt::SizeMode sizeMode, const QSizeF radii[4] ):
|
inline constexpr QskBoxShapeMetrics( Qt::SizeMode sizeMode, const QSizeF radii[4] ):
|
||||||
m_radii( { radii[0], radii[1], radii[2], radii[3] } ),
|
m_radii{ radii[0], radii[1], radii[2], radii[3] },
|
||||||
m_sizeMode( sizeMode ),
|
m_sizeMode( sizeMode ),
|
||||||
m_aspectRatioMode( Qt::KeepAspectRatio )
|
m_aspectRatioMode( Qt::KeepAspectRatio )
|
||||||
{
|
{
|
||||||
|
@ -88,7 +88,7 @@ private:
|
||||||
};
|
};
|
||||||
|
|
||||||
inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics():
|
inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics():
|
||||||
m_radii( { { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 } } ),
|
m_radii{ { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 }, { 0.0, 0.0 } },
|
||||||
m_sizeMode( Qt::AbsoluteSize ),
|
m_sizeMode( Qt::AbsoluteSize ),
|
||||||
m_aspectRatioMode( Qt::KeepAspectRatio )
|
m_aspectRatioMode( Qt::KeepAspectRatio )
|
||||||
{
|
{
|
||||||
|
@ -101,8 +101,8 @@ inline QskBoxShapeMetrics::QskBoxShapeMetrics( qreal radius, Qt::SizeMode sizeMo
|
||||||
|
|
||||||
inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics( qreal topLeft, qreal topRight,
|
inline constexpr QskBoxShapeMetrics::QskBoxShapeMetrics( qreal topLeft, qreal topRight,
|
||||||
qreal bottomLeft, qreal bottomRight, Qt::SizeMode sizeMode ):
|
qreal bottomLeft, qreal bottomRight, Qt::SizeMode sizeMode ):
|
||||||
m_radii( { { topLeft, topLeft }, { topRight, topRight },
|
m_radii{ { topLeft, topLeft }, { topRight, topRight },
|
||||||
{ bottomLeft, bottomLeft }, { bottomRight, bottomRight } } ),
|
{ bottomLeft, bottomLeft }, { bottomRight, bottomRight } },
|
||||||
m_sizeMode( sizeMode ),
|
m_sizeMode( sizeMode ),
|
||||||
m_aspectRatioMode( Qt::KeepAspectRatio )
|
m_aspectRatioMode( Qt::KeepAspectRatio )
|
||||||
{
|
{
|
||||||
|
|
|
@ -145,41 +145,26 @@ void QskObjectCounter::reset()
|
||||||
|
|
||||||
int QskObjectCounter::created( ObjectType objectType ) const
|
int QskObjectCounter::created( ObjectType objectType ) const
|
||||||
{
|
{
|
||||||
if ( objectType >= 0 && objectType < 2 )
|
return m_counter[objectType].created;
|
||||||
return m_counter[objectType].created;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskObjectCounter::destroyed( ObjectType objectType ) const
|
int QskObjectCounter::destroyed( ObjectType objectType ) const
|
||||||
{
|
{
|
||||||
if ( objectType >= 0 && objectType < 2 )
|
return m_counter[objectType].destroyed;
|
||||||
return m_counter[objectType].destroyed;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskObjectCounter::current( ObjectType objectType ) const
|
int QskObjectCounter::current( ObjectType objectType ) const
|
||||||
{
|
{
|
||||||
if ( objectType >= 0 && objectType < 2 )
|
return m_counter[objectType].current;
|
||||||
return m_counter[objectType].current;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int QskObjectCounter::maximum( ObjectType objectType ) const
|
int QskObjectCounter::maximum( ObjectType objectType ) const
|
||||||
{
|
{
|
||||||
if ( objectType >= 0 && objectType < 2 )
|
return m_counter[objectType].maximum;
|
||||||
return m_counter[objectType].maximum;
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void QskObjectCounter::debugStatistics( QDebug debug, ObjectType objectType ) const
|
void QskObjectCounter::debugStatistics( QDebug debug, ObjectType objectType ) const
|
||||||
{
|
{
|
||||||
if ( objectType < 0 || objectType >= 2 )
|
|
||||||
return;
|
|
||||||
|
|
||||||
const Counter& c = m_counter[objectType];
|
const Counter& c = m_counter[objectType];
|
||||||
|
|
||||||
QDebugStateSaver saver( debug );
|
QDebugStateSaver saver( debug );
|
||||||
|
|
|
@ -181,15 +181,6 @@ static qreal qskRowStretch( const QskInputPanel::KeyRow& keyRow )
|
||||||
return stretch;
|
return stretch;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline int qskKeyCount( const QskInputPanel::KeyDataRow& keyRow )
|
|
||||||
{
|
|
||||||
int keyCount = QskInputPanel::KeyCount;
|
|
||||||
while ( !keyRow[ keyCount - 1 ].key )
|
|
||||||
--keyCount;
|
|
||||||
|
|
||||||
return keyCount;
|
|
||||||
}
|
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
struct KeyCounter
|
struct KeyCounter
|
||||||
|
|
|
@ -416,7 +416,7 @@ void QskSkinTransition::process()
|
||||||
|
|
||||||
qskSkinAnimator->reset();
|
qskSkinAnimator->reset();
|
||||||
|
|
||||||
if ( ( m_animation.duration <= 0 ) || ( m_mask == QskAspect::Type( 0 ) ) )
|
if ( ( m_animation.duration <= 0 ) || ( m_mask == 0 ) )
|
||||||
{
|
{
|
||||||
// no animations, we can apply the changes
|
// no animations, we can apply the changes
|
||||||
updateSkin( m_skins[0], m_skins[1] );
|
updateSkin( m_skins[0], m_skins[1] );
|
||||||
|
|
|
@ -18,7 +18,7 @@ class QRectF;
|
||||||
class QColor;
|
class QColor;
|
||||||
class QFont;
|
class QFont;
|
||||||
class QMarginsF;
|
class QMarginsF;
|
||||||
class QMetaObject;
|
struct QMetaObject;
|
||||||
class QVariant;
|
class QVariant;
|
||||||
class QDebug;
|
class QDebug;
|
||||||
|
|
||||||
|
|
|
@ -56,6 +56,10 @@ namespace
|
||||||
class LayoutStyleInfo final : public QAbstractLayoutStyleInfo
|
class LayoutStyleInfo final : public QAbstractLayoutStyleInfo
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
LayoutStyleInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
virtual qreal spacing( Qt::Orientation ) const override
|
virtual qreal spacing( Qt::Orientation ) const override
|
||||||
{
|
{
|
||||||
// later from the theme !!
|
// later from the theme !!
|
||||||
|
|
|
@ -16,19 +16,6 @@
|
||||||
|
|
||||||
static QSGVertexColorMaterial qskMaterialVertex;
|
static QSGVertexColorMaterial qskMaterialVertex;
|
||||||
|
|
||||||
static inline bool qskHasAlpha( const QRgb* rgbValues )
|
|
||||||
{
|
|
||||||
return qAlpha( rgbValues[0] ) || qAlpha( rgbValues[1] )
|
|
||||||
|| qAlpha( rgbValues[2] ) || qAlpha( rgbValues[3] );
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline bool qskIsMonochrome( const QRgb* rgbValues )
|
|
||||||
{
|
|
||||||
return ( rgbValues[0] == rgbValues[1] )
|
|
||||||
&& ( rgbValues[1] == rgbValues[2] )
|
|
||||||
&& ( rgbValues[2] == rgbValues[3] );
|
|
||||||
}
|
|
||||||
|
|
||||||
static inline uint qskMetricsHash( const QskBoxShapeMetrics& shape,
|
static inline uint qskMetricsHash( const QskBoxShapeMetrics& shape,
|
||||||
const QskBoxBorderMetrics& borderMetrics )
|
const QskBoxBorderMetrics& borderMetrics )
|
||||||
{
|
{
|
||||||
|
@ -190,7 +177,7 @@ void QskBoxNode::setMonochrome( bool on )
|
||||||
setMaterial( new QSGFlatColorMaterial() );
|
setMaterial( new QSGFlatColorMaterial() );
|
||||||
|
|
||||||
const QSGGeometry g( QSGGeometry::defaultAttributes_Point2D(), 0 );
|
const QSGGeometry g( QSGGeometry::defaultAttributes_Point2D(), 0 );
|
||||||
memcpy( &m_geometry, &g, sizeof( QSGGeometry ) );
|
memcpy( (void *)&m_geometry, (void *)&g, sizeof( QSGGeometry ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -198,6 +185,6 @@ void QskBoxNode::setMonochrome( bool on )
|
||||||
delete material;
|
delete material;
|
||||||
|
|
||||||
const QSGGeometry g( QSGGeometry::defaultAttributes_ColoredPoint2D(), 0 );
|
const QSGGeometry g( QSGGeometry::defaultAttributes_ColoredPoint2D(), 0 );
|
||||||
memcpy( &m_geometry, &g, sizeof( QSGGeometry ) );
|
memcpy( (void *)&m_geometry, (void *)&g, sizeof( QSGGeometry ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue