diff --git a/examples/automotive/ButtonBar.cpp b/examples/automotive/ButtonBar.cpp index 842aba1d..69d27844 100644 --- a/examples/automotive/ButtonBar.cpp +++ b/examples/automotive/ButtonBar.cpp @@ -13,17 +13,20 @@ QSK_SUBCONTROL( ButtonBar, Indicator ) -class IndicatorLabel final : public QskGraphicLabel +namespace { - public: - IndicatorLabel( QQuickItem* parentItem = nullptr ) - : QskGraphicLabel( parentItem ) + class IndicatorLabel final : public QskGraphicLabel { - // so the skins are able to colorize them - setGraphicRole( SkinFactory::Indicator ); - setSubcontrolProxy( QskGraphicLabel::Graphic, ButtonBar::Indicator ); - } -}; + public: + IndicatorLabel( QQuickItem* parentItem = nullptr ) + : QskGraphicLabel( parentItem ) + { + // so the skins are able to colorize them + setGraphicRole( SkinFactory::Indicator ); + setSubcontrolProxy( QskGraphicLabel::Graphic, ButtonBar::Indicator ); + } + }; +} ButtonBar::ButtonBar( QQuickItem* parentItem ) : QskLinearBox( parentItem ) diff --git a/examples/iotdashboard/Box.cpp b/examples/iotdashboard/Box.cpp index 5a0d60c1..110fe628 100644 --- a/examples/iotdashboard/Box.cpp +++ b/examples/iotdashboard/Box.cpp @@ -15,25 +15,13 @@ Box::Box( const QString& title, QQuickItem* parent ) { setAutoAddChildren( true ); setAutoLayoutChildren( true ); + setPanel( true ); + setSubcontrolProxy( QskBox::Panel, Box::Panel ); auto label = new QskTextLabel( title, this ); label->setFontRole( Skin::TitleFont ); - - if( label->text().isEmpty() ) - { - label->setVisible( false ); - } -} - -QskAspect::Subcontrol Box::substitutedSubcontrol( QskAspect::Subcontrol subControl ) const -{ - if( subControl == QskBox::Panel ) - { - return Box::Panel; - } - - return subControl; + label->setVisible( !tite.isEmpty() ); } #include "moc_Box.cpp" diff --git a/examples/iotdashboard/Box.h b/examples/iotdashboard/Box.h index f3492d49..42aa5ce1 100644 --- a/examples/iotdashboard/Box.h +++ b/examples/iotdashboard/Box.h @@ -17,9 +17,4 @@ class Box : public QskLinearBox QSK_SUBCONTROLS( Panel ) Box( const QString& title, QQuickItem* parent = nullptr ); - - protected: - - QskAspect::Subcontrol substitutedSubcontrol( - QskAspect::Subcontrol ) const override; }; diff --git a/examples/iotdashboard/BoxWithButtons.cpp b/examples/iotdashboard/BoxWithButtons.cpp index 77c3e7eb..87cf442b 100644 --- a/examples/iotdashboard/BoxWithButtons.cpp +++ b/examples/iotdashboard/BoxWithButtons.cpp @@ -27,7 +27,7 @@ BoxWithButtons::BoxWithButtons( const QString& title, const QString& value, setSizePolicy( Qt::Vertical, QskSizePolicy::Maximum ); - auto layout = new QskLinearBox( Qt::Horizontal, this ); + auto* layout = new QskLinearBox( Qt::Horizontal, this ); layout->setSpacing( 20 ); QString iconFile = title.toLower(); diff --git a/src/controls/QskSkinnable.cpp b/src/controls/QskSkinnable.cpp index b96eab5b..33561ac2 100644 --- a/src/controls/QskSkinnable.cpp +++ b/src/controls/QskSkinnable.cpp @@ -217,7 +217,6 @@ class QskSkinnable::PrivateData } QskSkinHintTable hintTable; - QskHintAnimatorTable animators; typedef std::map< QskAspect::Subcontrol, QskAspect::Subcontrol > ProxyMap; @@ -297,7 +296,7 @@ void QskSkinnable::setSubcontrolProxy( if ( m_data->subcontrolProxies == nullptr ) m_data->subcontrolProxies = new PrivateData::ProxyMap(); - (*m_data->subcontrolProxies)[ subControl ] = proxy; + ( *m_data->subcontrolProxies )[ subControl ] = proxy; } void QskSkinnable::resetSubcontrolProxy( QskAspect::Subcontrol subcontrol )