making clazy happy
This commit is contained in:
parent
e9facebb29
commit
b4edcddbf4
@ -247,8 +247,6 @@ QSGNode* SpeedometerSkinlet::updateNeedleNode(
|
|||||||
auto needleWidth = speedometer->metric( Speedometer::Needle | QskAspect::MinimumWidth );
|
auto needleWidth = speedometer->metric( Speedometer::Needle | QskAspect::MinimumWidth );
|
||||||
auto needleMargin = speedometer->metric( Speedometer::Needle | QskAspect::Margin );
|
auto needleMargin = speedometer->metric( Speedometer::Needle | QskAspect::Margin );
|
||||||
|
|
||||||
QRectF needleRect( center.x() - needleWidth, center.y() - needleWidth,
|
|
||||||
panelRadius - ( needleWidth + needleMargin ), 2 * needleWidth );
|
|
||||||
float xStart = center.x();
|
float xStart = center.x();
|
||||||
float yStart = center.y();
|
float yStart = center.y();
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ MainWindow::MainWindow()
|
|||||||
const QString resourceDir( ":/qvg" );
|
const QString resourceDir( ":/qvg" );
|
||||||
const QStringList icons = QDir( resourceDir ).entryList();
|
const QStringList icons = QDir( resourceDir ).entryList();
|
||||||
|
|
||||||
for ( auto icon : icons )
|
for ( const auto& icon : icons )
|
||||||
{
|
{
|
||||||
auto title = icon;
|
auto title = icon;
|
||||||
m_tabView->addTab( title.replace( ".qvg", "" ),
|
m_tabView->addTab( title.replace( ".qvg", "" ),
|
||||||
|
@ -116,10 +116,10 @@ namespace
|
|||||||
of setting up direct connections between qskSetup and each control
|
of setting up direct connections between qskSetup and each control
|
||||||
*/
|
*/
|
||||||
QObject::connect( qskSetup, &QskSetup::controlFlagsChanged,
|
QObject::connect( qskSetup, &QskSetup::controlFlagsChanged,
|
||||||
[ this ] { updateControlFlags(); } );
|
qskSetup, [ this ] { updateControlFlags(); } );
|
||||||
|
|
||||||
QObject::connect( qskSetup, &QskSetup::skinChanged,
|
QObject::connect( qskSetup, &QskSetup::skinChanged,
|
||||||
[ this ] { updateSkin(); } );
|
qskSetup, [ this ] { updateSkin(); } );
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void insert( QskControl* control )
|
inline void insert( QskControl* control )
|
||||||
|
@ -29,7 +29,7 @@ class QskFocusIndicator::PrivateData
|
|||||||
public:
|
public:
|
||||||
void resetConnections()
|
void resetConnections()
|
||||||
{
|
{
|
||||||
for ( const auto& connection : connections )
|
for ( const auto& connection : qskAsConst( connections ) )
|
||||||
QObject::disconnect( connection );
|
QObject::disconnect( connection );
|
||||||
|
|
||||||
connections.clear();
|
connections.clear();
|
||||||
|
@ -78,7 +78,7 @@ class QskShortcut::PrivateData
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ( oldId != id )
|
if ( oldId != id )
|
||||||
shortcut->Q_EMIT shortcutIdChanged( id );
|
Q_EMIT shortcut->shortcutIdChanged( id );
|
||||||
}
|
}
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -79,7 +79,7 @@ class QSK_EXPORT QskShortcut : public QObject, public QQmlParserStatus
|
|||||||
void activated();
|
void activated();
|
||||||
void activatedAmbiguously();
|
void activatedAmbiguously();
|
||||||
|
|
||||||
int shortcutIdChanged( int ) const;
|
int shortcutIdChanged( int );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool event( QEvent* ) override;
|
bool event( QEvent* ) override;
|
||||||
|
@ -331,7 +331,7 @@ class QskSkinManager::PrivateData
|
|||||||
{
|
{
|
||||||
if ( !pluginsRegistered )
|
if ( !pluginsRegistered )
|
||||||
{
|
{
|
||||||
for ( auto path : pluginPaths )
|
for ( const auto& path : qskAsConst( pluginPaths ) )
|
||||||
registerPlugins( path + QStringLiteral( "/skins" ) );
|
registerPlugins( path + QStringLiteral( "/skins" ) );
|
||||||
|
|
||||||
pluginsRegistered = true;
|
pluginsRegistered = true;
|
||||||
@ -350,7 +350,9 @@ class QskSkinManager::PrivateData
|
|||||||
|
|
||||||
FactoryLoader* loader = nullptr;
|
FactoryLoader* loader = nullptr;
|
||||||
|
|
||||||
for ( auto fileName : dir.entryList( QDir::Files ) )
|
const auto dirEntries = dir.entryList( QDir::Files );
|
||||||
|
|
||||||
|
for ( const auto& fileName : dirEntries )
|
||||||
{
|
{
|
||||||
if ( loader == nullptr )
|
if ( loader == nullptr )
|
||||||
loader = new FactoryLoader();
|
loader = new FactoryLoader();
|
||||||
@ -423,7 +425,7 @@ void QskSkinManager::setPluginPaths( const QStringList& paths )
|
|||||||
QSet< QString > pathSet; // checking for duplicates
|
QSet< QString > pathSet; // checking for duplicates
|
||||||
QStringList pluginPaths;
|
QStringList pluginPaths;
|
||||||
|
|
||||||
for ( auto path : paths )
|
for ( const auto& path : paths )
|
||||||
{
|
{
|
||||||
const auto pluginPath = qskResolvedPath( path );
|
const auto pluginPath = qskResolvedPath( path );
|
||||||
if ( !pluginPath.isEmpty() && !pathSet.contains( pluginPath ) )
|
if ( !pluginPath.isEmpty() && !pathSet.contains( pluginPath ) )
|
||||||
|
@ -33,11 +33,11 @@ static inline void qskBindSignals(
|
|||||||
const QQuickTextInput* wrappedInput, QskTextInput* input )
|
const QQuickTextInput* wrappedInput, QskTextInput* input )
|
||||||
{
|
{
|
||||||
QObject::connect( wrappedInput, &QQuickTextInput::textChanged,
|
QObject::connect( wrappedInput, &QQuickTextInput::textChanged,
|
||||||
input, [ input ] { input->Q_EMIT textChanged( input->text() ); } );
|
input, [ input ] { Q_EMIT input->textChanged( input->text() ); } );
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
|
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
|
||||||
QObject::connect( wrappedInput, &QQuickTextInput::textEdited,
|
QObject::connect( wrappedInput, &QQuickTextInput::textEdited,
|
||||||
input, [ input ] { input->Q_EMIT textEdited( input->text() ); } );
|
input, [ input ] { Q_EMIT input->textEdited( input->text() ); } );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
QObject::connect( wrappedInput, &QQuickTextInput::validatorChanged,
|
QObject::connect( wrappedInput, &QQuickTextInput::validatorChanged,
|
||||||
@ -58,7 +58,7 @@ static inline void qskBindSignals(
|
|||||||
input, &QskTextInput::maximumLengthChanged );
|
input, &QskTextInput::maximumLengthChanged );
|
||||||
|
|
||||||
QObject::connect( wrappedInput, &QQuickTextInput::echoModeChanged,
|
QObject::connect( wrappedInput, &QQuickTextInput::echoModeChanged,
|
||||||
input, [ input ] { input->Q_EMIT echoModeChanged( input->echoMode() ); } );
|
input, [ input ] { Q_EMIT input->echoModeChanged( input->echoMode() ); } );
|
||||||
|
|
||||||
QObject::connect( wrappedInput, &QQuickTextInput::passwordCharacterChanged,
|
QObject::connect( wrappedInput, &QQuickTextInput::passwordCharacterChanged,
|
||||||
input, &QskTextInput::passwordCharacterChanged );
|
input, &QskTextInput::passwordCharacterChanged );
|
||||||
@ -569,7 +569,7 @@ void QskTextInput::setEditing( bool on )
|
|||||||
if ( status == QQuickTextInputPrivate::AcceptableInput )
|
if ( status == QQuickTextInputPrivate::AcceptableInput )
|
||||||
{
|
{
|
||||||
if ( fixup() )
|
if ( fixup() )
|
||||||
m_data->textInput->Q_EMIT editingFinished();
|
Q_EMIT m_data->textInput->editingFinished();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
@ -154,7 +154,7 @@ QskWindow::~QskWindow()
|
|||||||
items += child;
|
items += child;
|
||||||
}
|
}
|
||||||
|
|
||||||
for ( auto item : qskAsConst( items ) )
|
for ( auto& item : qskAsConst( items ) )
|
||||||
delete item;
|
delete item;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ namespace
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
static QPointer< QskInputContext > qskInputContext = nullptr;
|
static QPointer< QskInputContext > qskInputContext;
|
||||||
|
|
||||||
static void qskSendToPlatformContext( QEvent::Type type )
|
static void qskSendToPlatformContext( QEvent::Type type )
|
||||||
{
|
{
|
||||||
|
@ -298,9 +298,6 @@ void QskInputPanel::attachInputItem( QQuickItem* item )
|
|||||||
|
|
||||||
if ( item )
|
if ( item )
|
||||||
{
|
{
|
||||||
auto context = QskInputContext::instance();
|
|
||||||
const auto locale = context->locale();
|
|
||||||
|
|
||||||
if ( m_data->predictor )
|
if ( m_data->predictor )
|
||||||
m_data->predictor->reset();
|
m_data->predictor->reset();
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ void SkinnyShortcut::changeFonts( int increment )
|
|||||||
skin->setFont( role, font );
|
skin->setFont( role, font );
|
||||||
}
|
}
|
||||||
|
|
||||||
qskSetup->Q_EMIT skinChanged( skin );
|
Q_EMIT qskSetup->skinChanged( skin );
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void countNodes( const QSGNode* node, int& counter )
|
static inline void countNodes( const QSGNode* node, int& counter )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user