making clazy happier
This commit is contained in:
parent
9caad94075
commit
c3b6830eb5
|
@ -24,7 +24,7 @@ protected:
|
||||||
virtual void updateSkin( QskSkin*, QskSkin* newSkin ) override final
|
virtual void updateSkin( QskSkin*, QskSkin* newSkin ) override final
|
||||||
{
|
{
|
||||||
DefaultSkin* skin = static_cast< DefaultSkin* >( newSkin );
|
DefaultSkin* skin = static_cast< DefaultSkin* >( newSkin );
|
||||||
skin->resetColors();
|
skin->resetHints();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ void DefaultSkin::toggleScheme()
|
||||||
transition.process();
|
transition.process();
|
||||||
}
|
}
|
||||||
|
|
||||||
void DefaultSkin::resetColors()
|
void DefaultSkin::resetHints()
|
||||||
{
|
{
|
||||||
delete m_palette;
|
delete m_palette;
|
||||||
m_palette = new Palette( m_scheme );
|
m_palette = new Palette( m_scheme );
|
||||||
|
|
|
@ -12,7 +12,7 @@ public:
|
||||||
virtual ~DefaultSkin();
|
virtual ~DefaultSkin();
|
||||||
|
|
||||||
void toggleScheme();
|
void toggleScheme();
|
||||||
void resetColors();
|
void resetHints();
|
||||||
|
|
||||||
enum Scheme
|
enum Scheme
|
||||||
{
|
{
|
||||||
|
|
|
@ -152,7 +152,7 @@ void QskInputCompositionModel::composeKey( Qt::Key key )
|
||||||
if ( firstCandidate.isEmpty() )
|
if ( firstCandidate.isEmpty() )
|
||||||
{
|
{
|
||||||
commit( oldPreedit.left( spaceLeft ) );
|
commit( oldPreedit.left( spaceLeft ) );
|
||||||
spaceLeft -= oldPreedit.left( spaceLeft ).length();
|
spaceLeft -= oldPreedit.leftRef( spaceLeft ).length();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -129,11 +129,11 @@ static QByteArray qskEnumString( const char* name, int value )
|
||||||
|
|
||||||
QByteArray qskStateKey( const QMetaObject* metaObject, quint16 state )
|
QByteArray qskStateKey( const QMetaObject* metaObject, quint16 state )
|
||||||
{
|
{
|
||||||
auto& stateTable = qskAspectRegistry->stateTable;
|
const auto& stateTable = qskAspectRegistry->stateTable;
|
||||||
|
|
||||||
for ( auto mo = metaObject; mo != nullptr; mo = mo->superClass() )
|
for ( auto mo = metaObject; mo != nullptr; mo = mo->superClass() )
|
||||||
{
|
{
|
||||||
auto it = stateTable.find( mo );
|
const auto it = stateTable.find( mo );
|
||||||
if ( it != stateTable.end() )
|
if ( it != stateTable.end() )
|
||||||
{
|
{
|
||||||
for ( const auto& info : it->second )
|
for ( const auto& info : it->second )
|
||||||
|
@ -144,7 +144,7 @@ QByteArray qskStateKey( const QMetaObject* metaObject, quint16 state )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return QByteArray();;
|
return QByteArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
static QByteArray qskStateString(
|
static QByteArray qskStateString(
|
||||||
|
|
|
@ -417,7 +417,7 @@ void QskControl::setFocusPolicy( Qt::FocusPolicy policy )
|
||||||
d->focusPolicy = policy & ~Qt::TabFocus;
|
d->focusPolicy = policy & ~Qt::TabFocus;
|
||||||
QQuickItem::setActiveFocusOnTab( policy & Qt::TabFocus );
|
QQuickItem::setActiveFocusOnTab( policy & Qt::TabFocus );
|
||||||
|
|
||||||
Q_EMIT ( focusPolicyChanged() );
|
Q_EMIT focusPolicyChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ void QskListView::setPreferredWidthFromColumns( bool on )
|
||||||
m_data->preferredWidthFromColumns = on;
|
m_data->preferredWidthFromColumns = on;
|
||||||
resetImplicitSize();
|
resetImplicitSize();
|
||||||
|
|
||||||
Q_EMIT preferredWidthFromColumns();
|
Q_EMIT preferredWidthFromColumnsChanged();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -40,7 +40,7 @@ public:
|
||||||
|
|
||||||
Q_SIGNALS:
|
Q_SIGNALS:
|
||||||
void orientationChanged( Qt::Orientation );
|
void orientationChanged( Qt::Orientation );
|
||||||
void thicknessChanged() const;
|
void thicknessChanged();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Qt::Orientation m_orientation;
|
Qt::Orientation m_orientation;
|
||||||
|
|
|
@ -135,7 +135,7 @@ int QskShortcut::addShortcut( QQuickWindow* window, const QKeySequence& key,
|
||||||
const QMetaObject* metaObject = receiver->metaObject();
|
const QMetaObject* metaObject = receiver->metaObject();
|
||||||
|
|
||||||
const int methodIndex = metaObject->indexOfMethod(
|
const int methodIndex = metaObject->indexOfMethod(
|
||||||
QMetaObject::normalizedSignature( method ).data() + 1 );
|
QMetaObject::normalizedSignature( method ).constData() + 1 );
|
||||||
|
|
||||||
if ( methodIndex >= 0 )
|
if ( methodIndex >= 0 )
|
||||||
{
|
{
|
||||||
|
|
|
@ -81,7 +81,7 @@ QStringList Qsk::skinNames()
|
||||||
{
|
{
|
||||||
QStringList names;
|
QStringList names;
|
||||||
|
|
||||||
for ( auto factory : qskGetFactoryTable() )
|
for ( const auto& factory : qskGetFactoryTable() )
|
||||||
{
|
{
|
||||||
if ( factory )
|
if ( factory )
|
||||||
names += factory->skinNames();
|
names += factory->skinNames();
|
||||||
|
@ -94,7 +94,7 @@ QskSkin* Qsk::createSkin( const QString& skinName )
|
||||||
{
|
{
|
||||||
if ( !skinName.isEmpty() )
|
if ( !skinName.isEmpty() )
|
||||||
{
|
{
|
||||||
for ( auto factory : qskGetFactoryTable() )
|
for ( const auto& factory : qskGetFactoryTable() )
|
||||||
{
|
{
|
||||||
QskSkin* skin = factory->createSkin( skinName );
|
QskSkin* skin = factory->createSkin( skinName );
|
||||||
if ( skin )
|
if ( skin )
|
||||||
|
|
|
@ -70,7 +70,7 @@ static QVector< AnimatorCandidate > qskAnimatorCandidates(
|
||||||
if ( !oldTable.hasHints() )
|
if ( !oldTable.hasHints() )
|
||||||
return candidates;
|
return candidates;
|
||||||
|
|
||||||
for ( auto entry : newTable.hints() )
|
for ( const auto& entry : newTable.hints() )
|
||||||
{
|
{
|
||||||
const auto aspect = entry.first;
|
const auto aspect = entry.first;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ namespace
|
||||||
{
|
{
|
||||||
const auto subControls = control->subControls();
|
const auto subControls = control->subControls();
|
||||||
|
|
||||||
for ( auto candidate : candidates )
|
for ( const auto& candidate : candidates )
|
||||||
{
|
{
|
||||||
using namespace QskAspect;
|
using namespace QskAspect;
|
||||||
|
|
||||||
|
|
|
@ -910,7 +910,7 @@ void QskGraphic::updateState( const QPaintEngineState& state )
|
||||||
}
|
}
|
||||||
else if ( auto gradient = pen.brush().gradient() )
|
else if ( auto gradient = pen.brush().gradient() )
|
||||||
{
|
{
|
||||||
for ( auto stop : gradient->stops() )
|
for ( const auto& stop : gradient->stops() )
|
||||||
qskInsertColor( stop.second, m_data->colorTable );
|
qskInsertColor( stop.second, m_data->colorTable );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -925,7 +925,7 @@ void QskGraphic::updateState( const QPaintEngineState& state )
|
||||||
}
|
}
|
||||||
else if ( auto gradient = brush.gradient() )
|
else if ( auto gradient = brush.gradient() )
|
||||||
{
|
{
|
||||||
for ( auto stop : gradient->stops() )
|
for ( const auto& stop : gradient->stops() )
|
||||||
qskInsertColor( stop.second, m_data->colorTable );
|
qskInsertColor( stop.second, m_data->colorTable );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,7 +32,6 @@ static void qskOkGraphic( QPainter* painter )
|
||||||
|
|
||||||
painter->setPen( Qt::NoPen );
|
painter->setPen( Qt::NoPen );
|
||||||
|
|
||||||
painter->setBrush( QColor( "#4caf50" ) );
|
|
||||||
painter->setBrush( QColor( 76, 175, 80 ) );
|
painter->setBrush( QColor( 76, 175, 80 ) );
|
||||||
painter->drawPath( path );
|
painter->drawPath( path );
|
||||||
}
|
}
|
||||||
|
|
|
@ -116,7 +116,7 @@ static void qskRenderText(
|
||||||
for ( int i = 0; i < layout->lineCount(); ++i )
|
for ( int i = 0; i < layout->lineCount(); ++i )
|
||||||
{
|
{
|
||||||
auto line = layout->lineAt( i );
|
auto line = layout->lineAt( i );
|
||||||
for ( auto glyphRun : line.glyphRuns() )
|
for ( const auto& glyphRun : line.glyphRuns() )
|
||||||
{
|
{
|
||||||
const bool doCreate = !glyphNode;
|
const bool doCreate = !glyphNode;
|
||||||
if ( doCreate )
|
if ( doCreate )
|
||||||
|
|
|
@ -24,7 +24,7 @@ static void foolFontconfig()
|
||||||
"\t<dir>%1</dir>\n"
|
"\t<dir>%1</dir>\n"
|
||||||
"\t<cachedir>%2/cache</cachedir>\n"
|
"\t<cachedir>%2/cache</cachedir>\n"
|
||||||
"</fontconfig>\n";
|
"</fontconfig>\n";
|
||||||
fontConfig = fontConfig.arg( dir.path() ).arg( dir.path() );
|
fontConfig = fontConfig.arg( dir.path(), dir.path() );
|
||||||
|
|
||||||
QFile f( dir.path() + "/fonts.conf" );
|
QFile f( dir.path() + "/fonts.conf" );
|
||||||
f.open( QIODevice::WriteOnly );
|
f.open( QIODevice::WriteOnly );
|
||||||
|
|
|
@ -23,7 +23,6 @@ const QskGraphic* SkinnyShapeProvider::loadGraphic( const QString& id ) const
|
||||||
const QSizeF sz( 40, 40 );
|
const QSizeF sz( 40, 40 );
|
||||||
|
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
QColor color;
|
|
||||||
|
|
||||||
if ( shapeName == "rectangle" )
|
if ( shapeName == "rectangle" )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue