making clang happy
This commit is contained in:
parent
3df57c6025
commit
13867df163
@ -24,7 +24,6 @@ class Box : public QskLinearBox
|
|||||||
private:
|
private:
|
||||||
QString m_title;
|
QString m_title;
|
||||||
QskTextLabel* m_label;
|
QskTextLabel* m_label;
|
||||||
QskControl* m_content;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // BOX_H
|
#endif // BOX_H
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
#include <QskLinearBox.h>
|
#include <QskLinearBox.h>
|
||||||
#include <QskTextLabel.h>
|
#include <QskTextLabel.h>
|
||||||
|
|
||||||
class MenuBarTopLabel : public QskGraphicLabel
|
class MenuBarTopLabel final : public QskGraphicLabel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -23,7 +23,7 @@ class MenuBarTopLabel : public QskGraphicLabel
|
|||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol effectiveSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
if( subControl == QskGraphicLabel::Graphic )
|
if( subControl == QskGraphicLabel::Graphic )
|
||||||
{
|
{
|
||||||
@ -34,7 +34,7 @@ class MenuBarTopLabel : public QskGraphicLabel
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MenuBarGraphicLabel : public QskGraphicLabel
|
class MenuBarGraphicLabel final : public QskGraphicLabel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ class MenuBarGraphicLabel : public QskGraphicLabel
|
|||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol effectiveSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
if( subControl == QskGraphicLabel::Graphic )
|
if( subControl == QskGraphicLabel::Graphic )
|
||||||
{
|
{
|
||||||
@ -58,7 +58,7 @@ class MenuBarGraphicLabel : public QskGraphicLabel
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MenuBarLabel : public QskTextLabel
|
class MenuBarLabel final : public QskTextLabel
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ class MenuBarLabel : public QskTextLabel
|
|||||||
}
|
}
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol effectiveSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override final
|
QskAspect::Subcontrol subControl ) const override
|
||||||
{
|
{
|
||||||
if( subControl == QskTextLabel::Text )
|
if( subControl == QskTextLabel::Text )
|
||||||
{
|
{
|
||||||
@ -82,7 +82,7 @@ class MenuBarLabel : public QskTextLabel
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class MenuItem : public QskLinearBox
|
class MenuItem final : public QskLinearBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -92,14 +92,13 @@ class MenuItem : public QskLinearBox
|
|||||||
|
|
||||||
MenuItem( const QString& name, QQuickItem* parent );
|
MenuItem( const QString& name, QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol subControl ) const override final;
|
QskAspect::Subcontrol effectiveSubcontrol( QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString m_name;
|
QString m_name;
|
||||||
bool m_isActive = false;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class MenuBar : public QskLinearBox
|
class MenuBar final : public QskLinearBox
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
@ -109,7 +108,7 @@ class MenuBar : public QskLinearBox
|
|||||||
MenuBar( QQuickItem* parent );
|
MenuBar( QQuickItem* parent );
|
||||||
|
|
||||||
QskAspect::Subcontrol effectiveSubcontrol(
|
QskAspect::Subcontrol effectiveSubcontrol(
|
||||||
QskAspect::Subcontrol subControl ) const override final;
|
QskAspect::Subcontrol ) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QList< QString > m_entryStrings;
|
QList< QString > m_entryStrings;
|
||||||
|
@ -523,7 +523,7 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect );
|
|||||||
|
|
||||||
#define QSK_STATE( type, name, value ) \
|
#define QSK_STATE( type, name, value ) \
|
||||||
static_assert( \
|
static_assert( \
|
||||||
( value >= QskAspect::FirstUserState ) && ( value <= QskAspect::LastUserState ), \
|
( ( value ) >= QskAspect::FirstUserState ) && ( ( value ) <= QskAspect::LastUserState ), \
|
||||||
"Invalid state" \
|
"Invalid state" \
|
||||||
); \
|
); \
|
||||||
const QskAspect::State type::name = \
|
const QskAspect::State type::name = \
|
||||||
@ -531,8 +531,8 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect );
|
|||||||
|
|
||||||
#define QSK_SYSTEM_STATE( type, name, value ) \
|
#define QSK_SYSTEM_STATE( type, name, value ) \
|
||||||
static_assert( \
|
static_assert( \
|
||||||
( value >= QskAspect::FirstSystemState && value < QskAspect::FirstUserState ) || \
|
( ( value ) >= QskAspect::FirstSystemState && ( value ) < QskAspect::FirstUserState ) || \
|
||||||
( value > QskAspect::LastUserState && value <= QskAspect::LastSystemState ), \
|
( ( value ) > QskAspect::LastUserState && ( value ) <= QskAspect::LastSystemState ), \
|
||||||
"Invalid system state" \
|
"Invalid system state" \
|
||||||
); \
|
); \
|
||||||
const QskAspect::State type::name = \
|
const QskAspect::State type::name = \
|
||||||
|
@ -190,7 +190,8 @@ inline void QskBoxShapeMetrics::setRadius(
|
|||||||
|
|
||||||
inline constexpr QSizeF QskBoxShapeMetrics::radius( Qt::Corner corner ) const noexcept
|
inline constexpr QSizeF QskBoxShapeMetrics::radius( Qt::Corner corner ) const noexcept
|
||||||
{
|
{
|
||||||
return ( ( corner >= 0 ) && ( corner < 4 ) ) ? m_radii[ corner ] : QSizeF();
|
return ( ( static_cast< int >( corner ) >= 0 ) && ( static_cast< int >( corner ) < 4 ) )
|
||||||
|
? m_radii[ corner ] : QSizeF();
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void QskBoxShapeMetrics::setSizeMode( Qt::SizeMode sizeMode ) noexcept
|
inline void QskBoxShapeMetrics::setSizeMode( Qt::SizeMode sizeMode ) noexcept
|
||||||
|
@ -63,7 +63,7 @@ QRectF QskProgressBarSkinlet::subControlRect(
|
|||||||
{
|
{
|
||||||
const auto bar = static_cast< const QskProgressBar* >( skinnable );
|
const auto bar = static_cast< const QskProgressBar* >( skinnable );
|
||||||
|
|
||||||
if( ( subControl == QskProgressBar::Groove ) )
|
if( subControl == QskProgressBar::Groove )
|
||||||
{
|
{
|
||||||
const auto extent = bar->extent();
|
const auto extent = bar->extent();
|
||||||
|
|
||||||
|
@ -195,14 +195,14 @@ QskSkin* QskSetup::setSkin( const QString& skinName )
|
|||||||
if ( m_data->skin && ( skinName == m_data->skinName ) )
|
if ( m_data->skin && ( skinName == m_data->skinName ) )
|
||||||
return m_data->skin;
|
return m_data->skin;
|
||||||
|
|
||||||
QskSkin* skin = QskSkinManager::instance()->createSkin( skinName );
|
auto skin = QskSkinManager::instance()->createSkin( skinName );
|
||||||
if ( skin == nullptr )
|
if ( skin == nullptr )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if ( skin->parent() == nullptr )
|
if ( skin->parent() == nullptr )
|
||||||
skin->setParent( this );
|
skin->setParent( this );
|
||||||
|
|
||||||
const QskSkin* oldSkin = m_data->skin;
|
const auto oldSkin = m_data->skin;
|
||||||
|
|
||||||
m_data->skin = skin;
|
m_data->skin = skin;
|
||||||
m_data->skinName = skinName;
|
m_data->skinName = skinName;
|
||||||
|
@ -1040,7 +1040,7 @@ QDebug operator<<( QDebug debug, const QskGraphic& graphic )
|
|||||||
debug << "\n controlPointsRect:" << graphic.boundingRect();
|
debug << "\n controlPointsRect:" << graphic.boundingRect();
|
||||||
debug << "\n commandTypes:" << graphic.commandTypes();
|
debug << "\n commandTypes:" << graphic.commandTypes();
|
||||||
|
|
||||||
for ( const auto command : graphic.commands() )
|
for ( const auto& command : graphic.commands() )
|
||||||
{
|
{
|
||||||
switch ( command.type() )
|
switch ( command.type() )
|
||||||
{
|
{
|
||||||
|
@ -167,6 +167,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
Element( QQuickItem*, const QRect& );
|
Element( QQuickItem*, const QRect& );
|
||||||
Element( const QSizeF& spacing, const QRect& );
|
Element( const QSizeF& spacing, const QRect& );
|
||||||
|
Element( const Element& );
|
||||||
|
|
||||||
Element& operator=( const Element& );
|
Element& operator=( const Element& );
|
||||||
|
|
||||||
@ -210,6 +211,16 @@ Element::Element( const QSizeF& spacing, const QRect& grid )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Element::Element( const Element& other )
|
||||||
|
: m_grid( other.m_grid )
|
||||||
|
, m_isSpacer (other.m_isSpacer )
|
||||||
|
{
|
||||||
|
if ( other.m_isSpacer )
|
||||||
|
m_spacing = other.m_spacing;
|
||||||
|
else
|
||||||
|
m_item = other.m_item;
|
||||||
|
}
|
||||||
|
|
||||||
Element& Element::operator=( const Element& other )
|
Element& Element::operator=( const Element& other )
|
||||||
{
|
{
|
||||||
m_isSpacer = other.m_isSpacer;
|
m_isSpacer = other.m_isSpacer;
|
||||||
|
@ -18,6 +18,7 @@ namespace
|
|||||||
public:
|
public:
|
||||||
Element( QQuickItem* item );
|
Element( QQuickItem* item );
|
||||||
Element( qreal spacing );
|
Element( qreal spacing );
|
||||||
|
Element( const Element& );
|
||||||
|
|
||||||
Element& operator=( const Element& );
|
Element& operator=( const Element& );
|
||||||
|
|
||||||
@ -63,6 +64,16 @@ Element::Element( qreal spacing )
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Element::Element( const Element& other )
|
||||||
|
: m_stretch( other.m_stretch )
|
||||||
|
, m_isSpacer( other.m_isSpacer )
|
||||||
|
{
|
||||||
|
if ( other.m_isSpacer )
|
||||||
|
m_spacing = other.m_spacing;
|
||||||
|
else
|
||||||
|
m_item = other.m_item;
|
||||||
|
}
|
||||||
|
|
||||||
Element& Element::operator=( const Element& other )
|
Element& Element::operator=( const Element& other )
|
||||||
{
|
{
|
||||||
m_isSpacer = other.m_isSpacer;
|
m_isSpacer = other.m_isSpacer;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user