From fbf2a33a9aeb54fb2697f0fbed6093a4aed7c680 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Sat, 5 Dec 2020 15:09:31 +0100 Subject: [PATCH] uncrustified --- .../gallery/progressbar/ProgressBarPage.cpp | 50 +++++++++---------- examples/gallery/slider/SliderPage.cpp | 6 +-- examples/layouts/StackLayoutPage.cpp | 4 +- examples/tabview/main.cpp | 2 +- examples/thumbnails/main.cpp | 4 +- playground/anchors/AnchorBox.cpp | 6 +-- playground/grids/main.cpp | 10 ++-- playground/shadows/BoxShadowNode.cpp | 49 +++++++++--------- playground/shadows/BoxShadowNode.h | 2 +- playground/shadows/ShadowedBox.cpp | 2 +- playground/shadows/ShadowedBox.h | 6 +-- qmlexport/QskQml.cpp | 2 +- skins/material/QskMaterialSkin.cpp | 6 +-- src/common/QskAspect.h | 2 +- src/common/QskBoxShapeMetrics.cpp | 2 +- src/common/QskGradient.cpp | 2 +- src/common/QskIntervalF.cpp | 8 +-- src/common/QskMetaFunction.cpp | 2 +- src/common/QskMetaFunction.hpp | 18 +++---- src/common/QskMetaInvokable.cpp | 4 +- src/common/QskRgbPalette.h | 2 +- src/common/QskRgbValue.cpp | 4 +- src/common/QskScaleEngine.cpp | 30 +++++------ src/common/QskScaleEngine.h | 12 ++--- src/common/QskScaleTickmarks.cpp | 8 +-- src/common/QskScaleTickmarks.h | 34 ++++++------- src/common/QskShadowMetrics.cpp | 4 +- src/common/QskShadowMetrics.h | 2 +- src/common/QskSizePolicy.cpp | 4 +- src/controls/QskShortcutMap.cpp | 2 +- src/controls/QskWindow.cpp | 2 +- src/dialogs/QskDialogSubWindow.cpp | 2 +- src/graphic/QskGraphic.cpp | 6 +-- src/graphic/QskGraphicProvider.cpp | 2 +- src/inputpanel/QskVirtualKeyboard.cpp | 2 +- src/layouts/QskGridBox.cpp | 22 ++++---- src/layouts/QskGridLayoutEngine.cpp | 8 +-- src/layouts/QskLayoutChain.cpp | 2 +- src/layouts/QskLayoutEngine2D.cpp | 4 +- src/layouts/QskLinearBox.cpp | 12 ++--- src/nodes/QskPlainTextRenderer.cpp | 2 +- src/nodes/QskSGNode.cpp | 4 +- src/nodes/QskScaleRenderer.cpp | 14 +++--- src/nodes/QskScaleRenderer.h | 2 +- src/nodes/QskTextureNode.cpp | 2 +- src/nodes/QskTextureRenderer.h | 3 +- src/nodes/QskTickmarksNode.cpp | 2 +- 47 files changed, 189 insertions(+), 191 deletions(-) diff --git a/examples/gallery/progressbar/ProgressBarPage.cpp b/examples/gallery/progressbar/ProgressBarPage.cpp index ce4e352c..75fad19e 100644 --- a/examples/gallery/progressbar/ProgressBarPage.cpp +++ b/examples/gallery/progressbar/ProgressBarPage.cpp @@ -14,31 +14,31 @@ namespace { class ProgressBar : public QskProgressBar - { - public: - ProgressBar( QskLinearBox* box ) - : QskProgressBar( box ) - { - setOrientation( ( box->orientation() == Qt::Horizontal ) - ? Qt::Vertical : Qt::Horizontal ); - - setBoundaries( 0, 100 ); - } - - void setTheme( QskRgbPalette::Theme theme ) - { - const auto pal = QskRgbPalette::palette( theme ); - - QVector< QRgb > rgb; - rgb += pal.rgb( QskRgbPalette::W200 ); - rgb += pal.rgb( QskRgbPalette::W400 ); - rgb += pal.rgb( QskRgbPalette::W600 ); - rgb += pal.rgb( QskRgbPalette::W900 ); - - const auto stops = QskRgbPalette::colorStops( rgb, true ); - - setBarGradient( QskGradient( orientation(), stops ) ); - } + { + public: + ProgressBar( QskLinearBox* box ) + : QskProgressBar( box ) + { + setOrientation( ( box->orientation() == Qt::Horizontal ) + ? Qt::Vertical : Qt::Horizontal ); + + setBoundaries( 0, 100 ); + } + + void setTheme( QskRgbPalette::Theme theme ) + { + const auto pal = QskRgbPalette::palette( theme ); + + QVector< QRgb > rgb; + rgb += pal.rgb( QskRgbPalette::W200 ); + rgb += pal.rgb( QskRgbPalette::W400 ); + rgb += pal.rgb( QskRgbPalette::W600 ); + rgb += pal.rgb( QskRgbPalette::W900 ); + + const auto stops = QskRgbPalette::colorStops( rgb, true ); + + setBarGradient( QskGradient( orientation(), stops ) ); + } }; } diff --git a/examples/gallery/slider/SliderPage.cpp b/examples/gallery/slider/SliderPage.cpp index 30450698..2d31d4b8 100644 --- a/examples/gallery/slider/SliderPage.cpp +++ b/examples/gallery/slider/SliderPage.cpp @@ -59,8 +59,8 @@ void SliderPage::populate() { auto slider = new QskSlider( Qt::Vertical, hBox ); - - slider->setMinimum( 0 ); + + slider->setMinimum( 0 ); slider->setMaximum( 1000 ); slider->setPageSize( 10 ); slider->setStepSize( 10 ); @@ -70,7 +70,7 @@ void SliderPage::populate() { auto slider = new OtherSlider( hBox ); slider->setOrientation( Qt::Vertical ); - + slider->setMinimum( 0 ); slider->setMaximum( 10 ); slider->setStepSize( 1 ); diff --git a/examples/layouts/StackLayoutPage.cpp b/examples/layouts/StackLayoutPage.cpp index 3e49d351..0b091848 100644 --- a/examples/layouts/StackLayoutPage.cpp +++ b/examples/layouts/StackLayoutPage.cpp @@ -81,7 +81,7 @@ namespace Q_SIGNALS: void transitionStarted( int ms ); - + private: void addRectangle( const char* colorName ) { @@ -133,7 +133,7 @@ namespace if ( m_elapsed.elapsed() >= m_duration ) reset(); else - setValue( m_elapsed.elapsed() / m_duration * 100.0 ); + setValue( m_elapsed.elapsed() / m_duration * 100.0 ); } private: diff --git a/examples/tabview/main.cpp b/examples/tabview/main.cpp index f7c8c369..8b235e60 100644 --- a/examples/tabview/main.cpp +++ b/examples/tabview/main.cpp @@ -63,7 +63,7 @@ class TabView : public QskTabView { if ( tabPosition() == pos[i] ) { - setTabPosition( pos[ ( i + 1 ) % 4 ] ); + setTabPosition( pos[ ( i + 1 ) % 4 ] ); break; } } diff --git a/examples/thumbnails/main.cpp b/examples/thumbnails/main.cpp index 04f0af7e..15a50a90 100644 --- a/examples/thumbnails/main.cpp +++ b/examples/thumbnails/main.cpp @@ -86,7 +86,7 @@ class Thumbnail : public QskPushButton static_cast< SkinnyShapeFactory::Shape >( shape ), size ); QskGraphic graphic; - + QPen pen( Qt::black, 3 ); pen.setJoinStyle( Qt::MiterJoin ); pen.setCosmetic( true ); @@ -204,7 +204,7 @@ class ScrollArea : public QskScrollArea setFlickRecognizerTimeout( 300 ); connect( this, &QskScrollView::scrollPosChanged, - this, &ScrollArea::updateVisibilities ); + this, &ScrollArea::updateVisibilities ); } protected: diff --git a/playground/anchors/AnchorBox.cpp b/playground/anchors/AnchorBox.cpp index 50c8cba5..593409ed 100644 --- a/playground/anchors/AnchorBox.cpp +++ b/playground/anchors/AnchorBox.cpp @@ -384,9 +384,9 @@ QSizeF AnchorBox::layoutSizeHint( Qt::SizeHint which, const QSizeF& constraint ) void AnchorBox::updateHints() { - /* - The solver seems to run into overflows with - std::numeric_limits< unsigned float >::max() + /* + The solver seems to run into overflows with + std::numeric_limits< unsigned float >::max() */ const qreal max = std::numeric_limits< unsigned int >::max(); diff --git a/playground/grids/main.cpp b/playground/grids/main.cpp index ab4e613e..b316789d 100644 --- a/playground/grids/main.cpp +++ b/playground/grids/main.cpp @@ -326,10 +326,10 @@ void Box::test11() void Box::test12() { - /* - We have different strategies where to put the spaces, when - there is more space than the elements are willing to accept. - QSkinny has the extraSpacingAt parameter to control this. + /* + We have different strategies where to put the spaces, when + there is more space than the elements are willing to accept. + QSkinny has the extraSpacingAt parameter to control this. */ insert( "PaleVioletRed", 0, 0 ); @@ -364,7 +364,7 @@ class MainWidget : public QWidget /* Not using layouts here to avoid confusion while debugging. - */ + */ const auto r = contentsRect(); const int spacing = 5; diff --git a/playground/shadows/BoxShadowNode.cpp b/playground/shadows/BoxShadowNode.cpp index a19d562e..2756da32 100644 --- a/playground/shadows/BoxShadowNode.cpp +++ b/playground/shadows/BoxShadowNode.cpp @@ -11,15 +11,15 @@ namespace { class Shader final : public QSGMaterialShader { - public: + public: Shader(); - char const *const *attributeNames() const override; - + char const* const* attributeNames() const override; + void initialize() override; - void updateState( const QSGMaterialShader::RenderState &state, - QSGMaterial *newMaterial, QSGMaterial *oldMaterial) override; + void updateState( const QSGMaterialShader::RenderState& state, + QSGMaterial* newMaterial, QSGMaterial* oldMaterial) override; private: int m_matrixLocation = -1; @@ -32,10 +32,10 @@ namespace }; class Material final : public QSGMaterial - { + { public: Material(); - + QSGMaterialShader* createShader() const override; QSGMaterialType* type() const override; @@ -47,7 +47,7 @@ namespace QVector4D radius = QVector4D{0.0, 0.0, 0.0, 0.0}; QColor color = Qt::black; QVector2D offset; - }; + }; Shader::Shader() { @@ -55,14 +55,14 @@ namespace setShaderSourceFile( QOpenGLShader::Vertex, root + "boxshadow.vert" ); setShaderSourceFile( QOpenGLShader::Fragment, root + "boxshadow.frag" ); - } + } char const* const* Shader::attributeNames() const { - static char const *const names[] = { "in_vertex", "in_coord", nullptr }; + static char const* const names[] = { "in_vertex", "in_coord", nullptr }; return names; } - + void Shader::initialize() { QSGMaterialShader::initialize(); @@ -78,20 +78,20 @@ namespace m_colorLocation = p->uniformLocation( "color" ); } - void Shader::updateState( const QSGMaterialShader::RenderState &state, - QSGMaterial *newMaterial, QSGMaterial *oldMaterial ) + void Shader::updateState( const QSGMaterialShader::RenderState& state, + QSGMaterial* newMaterial, QSGMaterial* oldMaterial ) { auto p = program(); - if ( state.isMatrixDirty() ) - p->setUniformValue(m_matrixLocation, state.combinedMatrix()); + if ( state.isMatrixDirty() ) + p->setUniformValue(m_matrixLocation, state.combinedMatrix() ); if ( state.isOpacityDirty() ) - p->setUniformValue(m_opacityLocation, state.opacity()); + p->setUniformValue(m_opacityLocation, state.opacity() ); if ( oldMaterial == nullptr || newMaterial->compare( oldMaterial ) != 0 ) { - auto material = static_cast< const Material* >(newMaterial); + auto material = static_cast< const Material* >( newMaterial ); p->setUniformValue( m_aspectLocation, material->aspect ); p->setUniformValue( m_extentLocation, material->extent ); @@ -105,7 +105,7 @@ namespace { setFlag( QSGMaterial::Blending, true ); } - + QSGMaterialShader* Material::createShader() const { return new Shader(); @@ -165,7 +165,7 @@ void BoxShadowNode::setRect( const QRectF& rect ) { Q_D( BoxShadowNode ); - if ( rect == d->rect) + if ( rect == d->rect ) return; d->rect = rect; @@ -173,7 +173,7 @@ void BoxShadowNode::setRect( const QRectF& rect ) QVector2D newAspect( 1.0, 1.0 ); if ( rect.width() >= rect.height() ) - newAspect.setX( rect.width() / rect.height()); + newAspect.setX( rect.width() / rect.height() ); else newAspect.setY( rect.height() / rect.width() ); @@ -188,7 +188,7 @@ void BoxShadowNode::setShape( const QskBoxShapeMetrics& shape ) { Q_D( BoxShadowNode ); - const float t = 0.5 * std::min( d->rect.width(), d->rect.height()); + const float t = 0.5 * std::min( d->rect.width(), d->rect.height() ); const float r1 = shape.radius( Qt::BottomRightCorner ).width(); const float r2 = shape.radius( Qt::TopRightCorner ).width(); @@ -216,7 +216,7 @@ void BoxShadowNode::setColor( const QColor& color ) const auto c = QColor::fromRgbF( color.redF() * a, color.greenF() * a, color.blueF() * a, a ); - if ( d->material.color != c ) + if ( d->material.color != c ) { d->material.color = c; markDirty(QSGNode::DirtyMaterial); @@ -234,7 +234,7 @@ void BoxShadowNode::setShadow( qreal extent, qreal dx, qreal dy ) const float uniformExtent = ( extent / minDimension ) * 2.0; - if ( !qFuzzyCompare( d->material.extent, uniformExtent ) ) + if ( !qFuzzyCompare( d->material.extent, uniformExtent ) ) { d->material.extent = uniformExtent; markDirty(QSGNode::DirtyMaterial); @@ -258,8 +258,7 @@ void BoxShadowNode::updateGeometry() auto rect = d->rect.adjusted( -sz * aspect.x(), -sz * aspect.y(), - sz * aspect.x(), sz * aspect.y() - ); + sz * aspect.x(), sz * aspect.y() ); auto offsetLength = d->material.offset.length(); diff --git a/playground/shadows/BoxShadowNode.h b/playground/shadows/BoxShadowNode.h index a6584d70..c1ea5157 100644 --- a/playground/shadows/BoxShadowNode.h +++ b/playground/shadows/BoxShadowNode.h @@ -21,7 +21,7 @@ class BoxShadowNode : public QSGGeometryNode void updateGeometry(); -private: + private: Q_DECLARE_PRIVATE( BoxShadowNode ) }; diff --git a/playground/shadows/ShadowedBox.cpp b/playground/shadows/ShadowedBox.cpp index 07dce406..98b4e367 100644 --- a/playground/shadows/ShadowedBox.cpp +++ b/playground/shadows/ShadowedBox.cpp @@ -80,7 +80,7 @@ namespace QSK_SUBCONTROL( ShadowedBox, Panel ) -ShadowedBox::ShadowedBox(QQuickItem *parentItem) +ShadowedBox::ShadowedBox( QQuickItem* parentItem ) : QskControl( parentItem ) { setFlag( QQuickItem::ItemHasContents, true ); diff --git a/playground/shadows/ShadowedBox.h b/playground/shadows/ShadowedBox.h index 975732b5..3ca728b7 100644 --- a/playground/shadows/ShadowedBox.h +++ b/playground/shadows/ShadowedBox.h @@ -10,7 +10,7 @@ class ShadowedBox : public QskControl { Q_OBJECT -public: + public: QSK_SUBCONTROLS( Panel ) class Shadow @@ -21,7 +21,7 @@ public: qreal yOffset = 0.0; }; - ShadowedBox(QQuickItem *parent = nullptr); + ShadowedBox(QQuickItem* parent = nullptr); ~ShadowedBox() override; void setShadow( const Shadow& ); @@ -36,7 +36,7 @@ public: void setShape( const QskBoxShapeMetrics& ); const QskBoxShapeMetrics& shape() const; -private: + private: Shadow m_shadow; QColor m_shadowColor = Qt::black; QskGradient m_gradient; diff --git a/qmlexport/QskQml.cpp b/qmlexport/QskQml.cpp index ebeae355..13d775f6 100644 --- a/qmlexport/QskQml.cpp +++ b/qmlexport/QskQml.cpp @@ -91,7 +91,7 @@ namespace private: - static void filter( QLoggingCategory *category ) + static void filter( QLoggingCategory* category ) { if ( qstrcmp( category->categoryName(), "qt.qml.typeregistration" ) == 0 ) { diff --git a/skins/material/QskMaterialSkin.cpp b/skins/material/QskMaterialSkin.cpp index 358ffedb..d4ec4981 100644 --- a/skins/material/QskMaterialSkin.cpp +++ b/skins/material/QskMaterialSkin.cpp @@ -245,13 +245,13 @@ void QskMaterialSkin::initProgressBarHints() const auto& pal = m_data->palette; for ( auto subControl : { Q::Groove, Q::Bar } ) - { + { setMetric( subControl | Size, 5 ); setMargins( subControl | Padding, 0 ); - + setBoxShape( subControl, 0 ); setBoxBorderMetrics( subControl, 0 ); - } + } setGradient( Q::Groove, Grey ); setMetric( Q::Groove | Size, 5 ); diff --git a/src/common/QskAspect.h b/src/common/QskAspect.h index 73a3092d..1ad6f4e4 100644 --- a/src/common/QskAspect.h +++ b/src/common/QskAspect.h @@ -560,7 +560,7 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect::Aspect ); #define QSK_SYSTEM_STATE( type, name, value ) \ const QskAspect::State type::name = \ QskAspect::registerState( &type::staticMetaObject, value, #type "::" #name ); - + #if !defined( _MSC_VER ) #define QSK_SUBCONTROLS( ... ) static const QskAspect::Subcontrol __VA_ARGS__; diff --git a/src/common/QskBoxShapeMetrics.cpp b/src/common/QskBoxShapeMetrics.cpp index f80261c5..7e457c53 100644 --- a/src/common/QskBoxShapeMetrics.cpp +++ b/src/common/QskBoxShapeMetrics.cpp @@ -133,7 +133,7 @@ QVariant QskBoxShapeMetrics::interpolate( uint QskBoxShapeMetrics::hash( uint seed ) const noexcept { - uint hash = qHash( static_cast( m_sizeMode ), seed ); + uint hash = qHash( static_cast< int >( m_sizeMode ), seed ); return qHashBits( m_radii, sizeof( m_radii ), hash ); } diff --git a/src/common/QskGradient.cpp b/src/common/QskGradient.cpp index 21d12da6..f477430d 100644 --- a/src/common/QskGradient.cpp +++ b/src/common/QskGradient.cpp @@ -139,7 +139,7 @@ static inline QVector< QskGradientStop > qskExtractedStops( } else { - for ( i = 1 ; i < stops.count(); i++ ) + for ( i = 1; i < stops.count(); i++ ) { if ( stops[i].position() > from ) break; diff --git a/src/common/QskIntervalF.cpp b/src/common/QskIntervalF.cpp index 42fa5b21..4f129b66 100644 --- a/src/common/QskIntervalF.cpp +++ b/src/common/QskIntervalF.cpp @@ -25,12 +25,12 @@ QskIntervalF QskIntervalF::interpolated( const QskIntervalF& to, qreal progress ) const noexcept { return qskInterpolated( *this, to, progress ); -} - +} + QVariant QskIntervalF::interpolate( const QskIntervalF& intv1, const QskIntervalF& intv2, qreal progress ) noexcept -{ - return QVariant::fromValue( qskInterpolated( intv1, intv2, progress ) ); +{ + return QVariant::fromValue( qskInterpolated( intv1, intv2, progress ) ); } void QskIntervalF::unite( const QskIntervalF& other ) noexcept diff --git a/src/common/QskMetaFunction.cpp b/src/common/QskMetaFunction.cpp index aca17548..6cd5e817 100644 --- a/src/common/QskMetaFunction.cpp +++ b/src/common/QskMetaFunction.cpp @@ -273,7 +273,7 @@ void QskMetaFunction::invoke( QObject* object, types[ i ] = parameterTypes[ i - 1 ]; - arguments[ i ] = + arguments[ i ] = #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) QMetaType( types[ i ] ).create( argv[ i ] ); #else diff --git a/src/common/QskMetaFunction.hpp b/src/common/QskMetaFunction.hpp index a5ea735d..e8c0a455 100644 --- a/src/common/QskMetaFunction.hpp +++ b/src/common/QskMetaFunction.hpp @@ -11,7 +11,7 @@ class QskMetaFunction::FunctionCall : public QtPrivate::QSlotObjectBase { -public: + public: typedef void (* InvokeFunction)( int which, QtPrivate::QSlotObjectBase*, QObject*, void**, bool* ); @@ -33,7 +33,7 @@ public: m_parameterTypes = types; } -protected: + protected: explicit inline FunctionCall( InvokeFunction f, const int* m_parameterTypes = nullptr ): QSlotObjectBase( f ), @@ -41,7 +41,7 @@ protected: { } -private: + private: const int* m_parameterTypes; // static array, only needed for Qt::QueuedConnection }; @@ -55,7 +55,7 @@ namespace QskMetaFunctionCall { using MetaCall = StaticFunctionCall< Function, Args, R >; - public: + public: explicit inline StaticFunctionCall( Function function ): FunctionCall( &invoke ), m_function( function ) @@ -95,7 +95,7 @@ namespace QskMetaFunctionCall } } - private: + private: Function m_function; }; @@ -104,7 +104,7 @@ namespace QskMetaFunctionCall { using MetaCall = MemberFunctionCall< Function, Args, R >; - public: + public: explicit inline MemberFunctionCall( Function function ): FunctionCall( &invoke ), m_function( function ) @@ -139,7 +139,7 @@ namespace QskMetaFunctionCall } } - private: + private: Function m_function; }; @@ -148,7 +148,7 @@ namespace QskMetaFunctionCall { using MetaCall = FunctorFunctionCall< Function, N, Args, R >; - public: + public: explicit inline FunctorFunctionCall( Function function ): FunctionCall( &invoke ), m_function( function ) @@ -182,7 +182,7 @@ namespace QskMetaFunctionCall } } - private: + private: Function m_function; }; } diff --git a/src/common/QskMetaInvokable.cpp b/src/common/QskMetaInvokable.cpp index 8630bbdd..5dc746e2 100644 --- a/src/common/QskMetaInvokable.cpp +++ b/src/common/QskMetaInvokable.cpp @@ -20,10 +20,10 @@ static void qskRegisterMetaInvokable() { qRegisterMetaType< QskMetaInvokable >(); } - + Q_CONSTRUCTOR_FUNCTION( qskRegisterMetaInvokable ) -static inline void *qskMetaTypeCreate( int type, const void *copy ) +static inline void* qskMetaTypeCreate( int type, const void* copy ) { #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) return QMetaType( type ).create( copy ); diff --git a/src/common/QskRgbPalette.h b/src/common/QskRgbPalette.h index e5e25452..b5a800ba 100644 --- a/src/common/QskRgbPalette.h +++ b/src/common/QskRgbPalette.h @@ -66,7 +66,7 @@ class QSK_EXPORT QskRgbPalette { if ( weight < 0 || weight >= NumWeights ) return 0; - + return m_rgb[ weight ]; } diff --git a/src/common/QskRgbValue.cpp b/src/common/QskRgbValue.cpp index 9d34b705..49a87f96 100644 --- a/src/common/QskRgbValue.cpp +++ b/src/common/QskRgbValue.cpp @@ -164,8 +164,8 @@ QRgb QskRgb::lighter( QRgb rgb, int factor ) noexcept } QRgb QskRgb::darker( QRgb rgb, int factor ) noexcept -{ - if ( factor <= 0 ) +{ + if ( factor <= 0 ) return rgb; // guess we can find a faster implementation without using QColor TODO ... diff --git a/src/common/QskScaleEngine.cpp b/src/common/QskScaleEngine.cpp index 7a5d16bf..01d2f5f9 100644 --- a/src/common/QskScaleEngine.cpp +++ b/src/common/QskScaleEngine.cpp @@ -15,7 +15,7 @@ #include -namespace +namespace { // What about using qskFuzzyCompare and friends ??? @@ -101,7 +101,7 @@ namespace } } -namespace +namespace { double minorStepSize( double intervalSize, int maxSteps ) { @@ -113,7 +113,7 @@ namespace const int numTicks = qCeil( qAbs( intervalSize / minStep ) ) - 1; // Do the minor steps fit into the interval? - if ( fuzzyCompare( ( numTicks + 1 ) * qAbs( minStep ), + if ( fuzzyCompare( ( numTicks + 1 ) * qAbs( minStep ), qAbs( intervalSize ), intervalSize ) > 0 ) { // The minor steps doesn't fit into the interval @@ -163,7 +163,7 @@ QskScaleTickmarks QskScaleEngine::divideScale( const auto interval = QskIntervalF::normalized( x1, x2 ); - if ( interval.width() > std::numeric_limits::max() ) + if ( interval.width() > std::numeric_limits< qreal >::max() ) { qWarning() << "QskScaleEngine::divideScale: overflow"; return tickmarks; @@ -223,7 +223,7 @@ QskIntervalF QskScaleEngine::align( const QskIntervalF& interval, qreal stepSize // when there is no rounding beside some effect, when // calculating with doubles, we keep the original value - const auto max = std::numeric_limits::max(); + const auto max = std::numeric_limits< qreal >::max(); if ( -max + stepSize <= x1 ) { @@ -242,11 +242,11 @@ QskIntervalF QskScaleEngine::align( const QskIntervalF& interval, qreal stepSize return QskIntervalF( x1, x2 ); } -QVector QskScaleEngine::strip( - const QVector& ticks, const QskIntervalF& interval ) const +QVector< qreal > QskScaleEngine::strip( + const QVector< qreal >& ticks, const QskIntervalF& interval ) const { if ( !interval.isValid() || ticks.count() == 0 ) - return QVector(); + return QVector< qreal >(); if ( fuzzyContains( interval, ticks.first() ) && fuzzyContains( interval, ticks.last() ) ) @@ -254,7 +254,7 @@ QVector QskScaleEngine::strip( return ticks; } - QVector strippedTicks; + QVector< qreal > strippedTicks; for ( int i = 0; i < ticks.count(); i++ ) { if ( fuzzyContains( interval, ticks[i] ) ) @@ -265,13 +265,13 @@ QVector QskScaleEngine::strip( } QskScaleTickmarks QskScaleEngine::buildTicks( - const QskIntervalF &interval, qreal stepSize, int maxMinorSteps ) const + const QskIntervalF& interval, qreal stepSize, int maxMinorSteps ) const { using T = QskScaleTickmarks; const auto boundingInterval = align( interval, stepSize ); - QVector ticks[3]; + QVector< qreal > ticks[3]; ticks[T::MajorTick] = buildMajorTicks( boundingInterval, stepSize ); if ( maxMinorSteps > 0 ) @@ -302,14 +302,14 @@ QskScaleTickmarks QskScaleEngine::buildTicks( return tickmarks; } -QVector QskScaleEngine::buildMajorTicks( +QVector< qreal > QskScaleEngine::buildMajorTicks( const QskIntervalF& interval, qreal stepSize ) const { int numTicks = qRound( interval.width() / stepSize ) + 1; if ( numTicks > 10000 ) numTicks = 10000; - QVector ticks; + QVector< qreal > ticks; ticks.reserve( numTicks ); ticks += interval.lowerBound(); @@ -321,8 +321,8 @@ QVector QskScaleEngine::buildMajorTicks( } void QskScaleEngine::buildMinorTicks( - const QVector& majorTicks, int maxMinorSteps, qreal stepSize, - QVector &minorTicks, QVector &mediumTicks ) const + const QVector< qreal >& majorTicks, int maxMinorSteps, qreal stepSize, + QVector< qreal >& minorTicks, QVector< qreal >& mediumTicks ) const { auto minStep = minorStepSize( stepSize, maxMinorSteps ); if ( minStep == 0.0 ) diff --git a/src/common/QskScaleEngine.h b/src/common/QskScaleEngine.h index 1584bb78..2bc26f1d 100644 --- a/src/common/QskScaleEngine.h +++ b/src/common/QskScaleEngine.h @@ -38,21 +38,21 @@ class QSK_EXPORT QskScaleEngine QskScaleTickmarks divideScale(qreal x1, qreal x2, int maxMajorSteps, int maxMinorSteps, qreal stepSize = 0.0) const; - void autoScale( int maxNumSteps, qreal &x1, qreal &x2, qreal &stepSize ) const; + void autoScale( int maxNumSteps, qreal& x1, qreal& x2, qreal& stepSize ) const; private: QskIntervalF align( const QskIntervalF&, qreal stepSize ) const; - QVector strip( const QVector&, const QskIntervalF& ) const; + QVector< qreal > strip( const QVector< qreal >&, const QskIntervalF& ) const; QskScaleTickmarks buildTicks( const QskIntervalF&, qreal stepSize, int maxMinorSteps ) const; - QVector buildMajorTicks( const QskIntervalF&, qreal stepSize ) const; + QVector< qreal > buildMajorTicks( const QskIntervalF&, qreal stepSize ) const; - void buildMinorTicks( const QVector& majorTicks, - int maxMinorSteps, qreal stepSize, QVector& minorTicks, - QVector& mediumTicks ) const; + void buildMinorTicks( const QVector< qreal >& majorTicks, + int maxMinorSteps, qreal stepSize, QVector< qreal >& minorTicks, + QVector< qreal >& mediumTicks ) const; Attributes m_attributes; }; diff --git a/src/common/QskScaleTickmarks.cpp b/src/common/QskScaleTickmarks.cpp index eafa916b..89764980 100644 --- a/src/common/QskScaleTickmarks.cpp +++ b/src/common/QskScaleTickmarks.cpp @@ -26,12 +26,12 @@ int QskScaleTickmarks::tickCount( TickType type ) const noexcept return m_ticks[ type ].count(); } -QVector QskScaleTickmarks::ticks( TickType type ) const noexcept +QVector< qreal > QskScaleTickmarks::ticks( TickType type ) const noexcept { return m_ticks[ type ]; } -void QskScaleTickmarks::setTicks(TickType type, const QVector& ticks ) +void QskScaleTickmarks::setTicks(TickType type, const QVector< qreal >& ticks ) { m_ticks[ type ] = ticks; } @@ -44,7 +44,7 @@ void QskScaleTickmarks::reset() } void QskScaleTickmarks::invert() -{ +{ std::reverse( m_ticks[ 0 ].begin(), m_ticks[ 0 ].end() ); std::reverse( m_ticks[ 1 ].begin(), m_ticks[ 1 ].end() ); std::reverse( m_ticks[ 2 ].begin(), m_ticks[ 2 ].end() ); @@ -59,7 +59,7 @@ uint QskScaleTickmarks::hash( uint seed ) const return seed; } -bool QskScaleTickmarks::operator==( const QskScaleTickmarks &other ) const noexcept +bool QskScaleTickmarks::operator==( const QskScaleTickmarks& other ) const noexcept { return ( m_ticks[ 0 ] == other.m_ticks[ 0 ] ) && ( m_ticks[ 1 ] == other.m_ticks[ 1 ] ) diff --git a/src/common/QskScaleTickmarks.h b/src/common/QskScaleTickmarks.h index 871f1052..94075356 100644 --- a/src/common/QskScaleTickmarks.h +++ b/src/common/QskScaleTickmarks.h @@ -13,9 +13,9 @@ class QSK_EXPORT QskScaleTickmarks { Q_GADGET - Q_PROPERTY( QVector majorTicks READ majorTicks WRITE setMajorTicks ) - Q_PROPERTY( QVector mediumTicks READ mediumTicks WRITE setMediumTicks ) - Q_PROPERTY( QVector minorTicks READ minorTicks WRITE setMinorTicks ) + Q_PROPERTY( QVector< qreal > majorTicks READ majorTicks WRITE setMajorTicks ) + Q_PROPERTY( QVector< qreal > mediumTicks READ mediumTicks WRITE setMediumTicks ) + Q_PROPERTY( QVector< qreal > minorTicks READ minorTicks WRITE setMinorTicks ) public: enum TickType @@ -36,17 +36,17 @@ class QSK_EXPORT QskScaleTickmarks int tickCount() const noexcept; int tickCount( TickType ) const noexcept; - QVector ticks( TickType ) const noexcept; - void setTicks( TickType, const QVector & ); + QVector< qreal > ticks( TickType ) const noexcept; + void setTicks( TickType, const QVector< qreal >& ); - void setMinorTicks( const QVector& ); - QVector minorTicks() const noexcept; + void setMinorTicks( const QVector< qreal >& ); + QVector< qreal > minorTicks() const noexcept; - void setMediumTicks( const QVector& ); - QVector mediumTicks() const noexcept; + void setMediumTicks( const QVector< qreal >& ); + QVector< qreal > mediumTicks() const noexcept; - void setMajorTicks( const QVector& ); - QVector majorTicks() const noexcept; + void setMajorTicks( const QVector< qreal >& ); + QVector< qreal > majorTicks() const noexcept; void invert(); void reset(); @@ -57,32 +57,32 @@ class QSK_EXPORT QskScaleTickmarks QVector< qreal > m_ticks[ 3 ]; }; -inline void QskScaleTickmarks::setMinorTicks( const QVector& ticks ) +inline void QskScaleTickmarks::setMinorTicks( const QVector< qreal >& ticks ) { setTicks( MinorTick, ticks ); } -inline QVector QskScaleTickmarks::minorTicks() const noexcept +inline QVector< qreal > QskScaleTickmarks::minorTicks() const noexcept { return ticks( MinorTick ); } -inline void QskScaleTickmarks::setMediumTicks( const QVector& ticks ) +inline void QskScaleTickmarks::setMediumTicks( const QVector< qreal >& ticks ) { setTicks( MediumTick, ticks ); } -inline QVector QskScaleTickmarks::mediumTicks() const noexcept +inline QVector< qreal > QskScaleTickmarks::mediumTicks() const noexcept { return ticks( MediumTick ); } -inline void QskScaleTickmarks::setMajorTicks( const QVector& ticks ) +inline void QskScaleTickmarks::setMajorTicks( const QVector< qreal >& ticks ) { setTicks( MajorTick, ticks ); } -inline QVector QskScaleTickmarks::majorTicks() const noexcept +inline QVector< qreal > QskScaleTickmarks::majorTicks() const noexcept { return ticks( MajorTick ); } diff --git a/src/common/QskShadowMetrics.cpp b/src/common/QskShadowMetrics.cpp index 7b15cec7..560aae6b 100644 --- a/src/common/QskShadowMetrics.cpp +++ b/src/common/QskShadowMetrics.cpp @@ -41,7 +41,7 @@ QskShadowMetrics QskShadowMetrics::toAbsolute( const QSizeF& size ) const noexce const qreal blurRadius = qskToAbsolute( length, m_spreadRadius ); const qreal dx = qskToAbsolute( size.width(), m_offset.x() ); const qreal dy = qskToAbsolute( size.height(), m_offset.x() ); - + return QskShadowMetrics( spreadRadius, blurRadius, QPointF( dx, dy ) ); } @@ -55,7 +55,7 @@ QskShadowMetrics QskShadowMetrics::interpolated( qskInterpolated( m_offset.x(), to.m_offset.x(), ratio ), qskInterpolated( m_offset.y(), to.m_offset.y(), ratio ) ); - QskShadowMetrics metrics( + QskShadowMetrics metrics( qskInterpolated( m_spreadRadius, to.m_spreadRadius, ratio ), qskInterpolated( m_blurRadius, to.m_blurRadius, ratio ), offset ); diff --git a/src/common/QskShadowMetrics.h b/src/common/QskShadowMetrics.h index 934f5231..7e9815cb 100644 --- a/src/common/QskShadowMetrics.h +++ b/src/common/QskShadowMetrics.h @@ -99,7 +99,7 @@ inline constexpr qreal QskShadowMetrics::spreadRadius() const noexcept } inline void QskShadowMetrics::setBlurRadius( qreal radius ) noexcept -{ +{ m_blurRadius = radius; } diff --git a/src/common/QskSizePolicy.cpp b/src/common/QskSizePolicy.cpp index 5efe7625..4d4cbb92 100644 --- a/src/common/QskSizePolicy.cpp +++ b/src/common/QskSizePolicy.cpp @@ -28,9 +28,9 @@ QskSizePolicy::ConstraintType QskSizePolicy::constraintType() const noexcept if ( ( m_verticalPolicy & mask ) == ConstrainedFlag ) return QskSizePolicy::HeightForWidth; - + return QskSizePolicy::Unconstrained; -} +} Qt::SizeHint QskSizePolicy::effectiveSizeHintType( Qt::SizeHint which, Qt::Orientation orientation ) const noexcept diff --git a/src/controls/QskShortcutMap.cpp b/src/controls/QskShortcutMap.cpp index 53e14f69..538ebbfb 100644 --- a/src/controls/QskShortcutMap.cpp +++ b/src/controls/QskShortcutMap.cpp @@ -252,7 +252,7 @@ bool QskShortcutHandler::eventFilter( QObject* object, QEvent* event ) Q_ASSERT( data.item == nullptr || data.item == object ); - data.invoke( ); + data.invoke(); return true; } diff --git a/src/controls/QskWindow.cpp b/src/controls/QskWindow.cpp index cf51a2a2..bb39f819 100644 --- a/src/controls/QskWindow.cpp +++ b/src/controls/QskWindow.cpp @@ -151,7 +151,7 @@ static inline QByteArray qskVisualizationMode( const QQuickWindow* window ) { auto d = QQuickWindowPrivate::get( const_cast< QQuickWindow* >( window ) ); #if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 ) - return d->visualizationMode; + return d->visualizationMode; #else return d->customRenderMode; #endif diff --git a/src/dialogs/QskDialogSubWindow.cpp b/src/dialogs/QskDialogSubWindow.cpp index e602ab18..d3c15813 100644 --- a/src/dialogs/QskDialogSubWindow.cpp +++ b/src/dialogs/QskDialogSubWindow.cpp @@ -256,7 +256,7 @@ QskDialog::DialogCode QskDialogSubWindow::exec() { // when being called from QQuickWindow::mouseReleaseEvent // the mouse grabber has not yet been released. - + if( !qskIsAncestorOf( this, mouseGrabber ) ) mouseGrabber->ungrabMouse(); } diff --git a/src/graphic/QskGraphic.cpp b/src/graphic/QskGraphic.cpp index 30c62fcf..ebeffdac 100644 --- a/src/graphic/QskGraphic.cpp +++ b/src/graphic/QskGraphic.cpp @@ -676,7 +676,7 @@ void QskGraphic::render( QPainter* painter, const QRectF& rect, } const auto& pr = m_data->pointRect; - const auto rc = rect.center(); + const auto rc = rect.center(); QTransform tr; tr.translate( @@ -1025,7 +1025,7 @@ QDebug operator<<( QDebug debug, const QskGraphic& graphic ) debug << "\n Path(" << path.elementCount() << ")"; - const char *types[] = { "MoveTo", "LineTo", "CurveTo", "CurveToData" }; + const char* types[] = { "MoveTo", "LineTo", "CurveTo", "CurveToData" }; for ( int i = 0; i < path.elementCount(); i++ ) { @@ -1041,7 +1041,7 @@ QDebug operator<<( QDebug debug, const QskGraphic& graphic ) { const auto& pixmapData = *command.pixmapData(); - debug << "\n Pixmap:"; + debug << "\n Pixmap:"; debug << "\n " << pixmapData.pixmap; debug << "\n Rect:" << pixmapData.rect; debug << "\n SubRect:" << pixmapData.subRect; diff --git a/src/graphic/QskGraphicProvider.cpp b/src/graphic/QskGraphicProvider.cpp index 40afd672..8262b49e 100644 --- a/src/graphic/QskGraphicProvider.cpp +++ b/src/graphic/QskGraphicProvider.cpp @@ -68,7 +68,7 @@ const QskGraphic* QskGraphicProvider::requestGraphic( const QString& id ) const { qWarning() << "QskGraphicProvider: can't load" << id; return nullptr; - } + } { QMutexLocker locker( &m_data->mutex ); diff --git a/src/inputpanel/QskVirtualKeyboard.cpp b/src/inputpanel/QskVirtualKeyboard.cpp index 4828801e..0f6a0145 100644 --- a/src/inputpanel/QskVirtualKeyboard.cpp +++ b/src/inputpanel/QskVirtualKeyboard.cpp @@ -313,7 +313,7 @@ QSizeF QskVirtualKeyboard::layoutSizeHint( const auto dh = padding.top() + padding.bottom(); w = ( h - dh ) / ratio + dw; - } + } else { if ( w < 0 ) diff --git a/src/layouts/QskGridBox.cpp b/src/layouts/QskGridBox.cpp index d8b45dac..a3b75d2c 100644 --- a/src/layouts/QskGridBox.cpp +++ b/src/layouts/QskGridBox.cpp @@ -105,21 +105,21 @@ QskGridBox::~QskGridBox() for ( int i = 0; i < engine.count(); i++ ) { if ( auto item = engine.itemAt( i ) ) - setItemActive( item, false ); + setItemActive( item, false ); } } -int QskGridBox::addItem( QQuickItem* item, +int QskGridBox::addItem( QQuickItem* item, int row, int column, Qt::Alignment alignment ) -{ - if ( auto control = qskControlCast( item ) ) +{ + if ( auto control = qskControlCast( item ) ) control->setLayoutAlignmentHint( alignment ); return addItem( item, row, column ); -} - -int QskGridBox::addItem( QQuickItem* item, - int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment ) +} + +int QskGridBox::addItem( QQuickItem* item, + int row, int column, int rowSpan, int columnSpan, Qt::Alignment alignment ) { if ( auto control = qskControlCast( item ) ) control->setLayoutAlignmentHint( alignment ); @@ -459,7 +459,7 @@ void QskGridBox::itemChange( ItemChange change, const ItemChangeData& value ) bool QskGridBox::event( QEvent* event ) { - switch ( static_cast( event->type() ) ) + switch ( static_cast< int >( event->type() ) ) { case QEvent::LayoutRequest: { @@ -492,10 +492,10 @@ void QskGridBox::dump() QDebugStateSaver saver( debug ); debug.nospace(); - + const auto constraint = sizeConstraint(); - debug << "QskGridBox" + debug << "QskGridBox" << "[" << engine.columnCount() << "," << engine.rowCount() << "] w:" << constraint.width() << " h:" << constraint.height() << '\n'; diff --git a/src/layouts/QskGridLayoutEngine.cpp b/src/layouts/QskGridLayoutEngine.cpp index 1fa47bef..31b32381 100644 --- a/src/layouts/QskGridLayoutEngine.cpp +++ b/src/layouts/QskGridLayoutEngine.cpp @@ -259,12 +259,12 @@ QskLayoutChain::CellData Element::cell( Qt::Orientation orientation ) const { QskLayoutChain::CellData cell; cell.isValid = true; - + if ( m_isSpacer ) { const qreal value = ( orientation == Qt::Horizontal ) ? m_spacing.width() : m_spacing.height(); - + cell.hint.setMinimum( value ); cell.hint.setPreferred( value ); cell.hint.setMaximum( value ); @@ -434,7 +434,7 @@ bool QskGridLayoutEngine::setColumnSizeHint( if ( !m_data->columnSettings.setHintAt( column, which, width ) ) return false; - if ( column >= m_data->columnCount ) + if ( column >= m_data->columnCount ) m_data->columnCount = column + 1; invalidate(); @@ -635,7 +635,7 @@ void QskGridLayoutEngine::setupChain( Qt::Orientation orientation, auto cell = element.cell( orientation ); if ( element.item() ) cell.hint = layoutHint( element.item(), orientation, constraint ); - + chain.expandCell( grid.top(), cell ); } else diff --git a/src/layouts/QskLayoutChain.cpp b/src/layouts/QskLayoutChain.cpp index 8567a1f1..178c851a 100644 --- a/src/layouts/QskLayoutChain.cpp +++ b/src/layouts/QskLayoutChain.cpp @@ -156,7 +156,7 @@ void QskLayoutChain::expandCells( cell.isValid = true; m_validCells++; } - } + } } void QskLayoutChain::finish() diff --git a/src/layouts/QskLayoutEngine2D.cpp b/src/layouts/QskLayoutEngine2D.cpp index f324bc7c..72fa4c9e 100644 --- a/src/layouts/QskLayoutEngine2D.cpp +++ b/src/layouts/QskLayoutEngine2D.cpp @@ -400,7 +400,7 @@ QSizeF QskLayoutEngine2D::sizeHint( if ( constraint.width() <= 0 ) requestType = QskSizePolicy::Unconstrained; - + break; } case QskSizePolicy::WidthForHeight: @@ -430,7 +430,7 @@ QSizeF QskLayoutEngine2D::sizeHint( #endif } } - } + } auto& rowChain = m_data->rowChain; auto& columnChain = m_data->columnChain; diff --git a/src/layouts/QskLinearBox.cpp b/src/layouts/QskLinearBox.cpp index a64dd68a..94afff4b 100644 --- a/src/layouts/QskLinearBox.cpp +++ b/src/layouts/QskLinearBox.cpp @@ -237,7 +237,7 @@ void QskLinearBox::itemChange( ItemChange change, const ItemChangeData& value ) bool QskLinearBox::event( QEvent* event ) { - switch ( static_cast( event->type() ) ) + switch ( static_cast< int >( event->type() ) ) { case QEvent::LayoutRequest: { @@ -530,16 +530,16 @@ int QskLinearBox::stretchFactor( const QQuickItem* item ) const } void QskLinearBox::dump() -{ +{ const auto& engine = m_data->engine; - + auto debug = qDebug(); - + QDebugStateSaver saver( debug ); debug.nospace(); - + const auto constraint = sizeConstraint(); - + debug << "QskLinearBox" << engine.orientation() << " w:" << constraint.width() << " h:" << constraint.height() << '\n'; diff --git a/src/nodes/QskPlainTextRenderer.cpp b/src/nodes/QskPlainTextRenderer.cpp index dda88758..92b80bd1 100644 --- a/src/nodes/QskPlainTextRenderer.cpp +++ b/src/nodes/QskPlainTextRenderer.cpp @@ -81,7 +81,7 @@ static qreal qskLayoutText( QTextLayout* layout, with QTextOption::NoWrap - even if word wrapping for elided text does not make any sense. Needs some debugging of QTextLine::layout_helper, TODO ... - */ + */ auto option = layout->textOption(); option.setWrapMode( QTextOption::WrapAnywhere ); layout->setTextOption( option ); diff --git a/src/nodes/QskSGNode.cpp b/src/nodes/QskSGNode.cpp index c6d73439..b4afabae 100644 --- a/src/nodes/QskSGNode.cpp +++ b/src/nodes/QskSGNode.cpp @@ -11,7 +11,7 @@ static inline void qskRemoveChildNode( QSGNode* parent, QSGNode* child ) if ( child->flags() & QSGNode::OwnedByParent ) delete child; - + } static inline void qskRemoveAllChildNodesAfter( QSGNode* parent, QSGNode* child ) @@ -90,7 +90,7 @@ void QskSGNode::removeAllChildNodesAfter( QSGNode* parent, QSGNode* child ) } void QskSGNode::removeAllChildNodesFrom( QSGNode* parent, QSGNode* child ) -{ +{ if ( parent && child && child->parent() == parent ) { qskRemoveAllChildNodesAfter( parent, child ); diff --git a/src/nodes/QskScaleRenderer.cpp b/src/nodes/QskScaleRenderer.cpp index 3c17d1ae..91447802 100644 --- a/src/nodes/QskScaleRenderer.cpp +++ b/src/nodes/QskScaleRenderer.cpp @@ -30,14 +30,14 @@ static inline void qskInsertRemoveChild( QSGNode* parentNode, return; if ( oldNode ) - { + { parentNode->removeChildNode( oldNode ); if ( oldNode->flags() & QSGNode::OwnedByParent ) delete oldNode; } - + if ( newNode ) - { + { if ( append ) parentNode->appendChildNode( newNode ); else @@ -67,7 +67,7 @@ void QskScaleRenderer::setTickColor( const QColor& color ) void QskScaleRenderer::setTickWidth( qreal width ) { - m_tickWidth = width; + m_tickWidth = width; } void QskScaleRenderer::setFont( const QFont& font ) @@ -139,10 +139,10 @@ QSGNode* QskScaleRenderer::updateTicksNode( if( ticksNode == nullptr ) ticksNode = new QskTickmarksNode; - + ticksNode->update( m_tickColor, rect, m_boundaries, m_tickmarks, m_tickWidth, m_orientation ); - + return ticksNode; } @@ -180,7 +180,7 @@ QSGNode* QskScaleRenderer::updateLabelsNode( const qreal tickPos = ratio * ( tick - m_boundaries.lowerBound() ); - if ( label.canConvert< QString >() ) + if ( label.canConvert< QString >() ) { const auto text = label.toString(); if ( text.isEmpty() ) diff --git a/src/nodes/QskScaleRenderer.h b/src/nodes/QskScaleRenderer.h index 65fe40a1..8a6515cd 100644 --- a/src/nodes/QskScaleRenderer.h +++ b/src/nodes/QskScaleRenderer.h @@ -42,7 +42,7 @@ class QSK_EXPORT QskScaleRenderer const QRectF& tickmarksRect, const QRectF& labelsRect, QSGNode* ); virtual QVariant labelAt( qreal pos ) const; - qreal maxLabelWidth() const; + qreal maxLabelWidth() const; virtual QSGNode* updateTicksNode( const QskSkinnable*, const QRectF&, QSGNode* ) const; diff --git a/src/nodes/QskTextureNode.cpp b/src/nodes/QskTextureNode.cpp index d750fa41..3b8989ba 100644 --- a/src/nodes/QskTextureNode.cpp +++ b/src/nodes/QskTextureNode.cpp @@ -39,7 +39,7 @@ static void qskUpdateGLTextureId( QRhiTexture* rhiTexture, uint textureId ) auto funcs = QOpenGLContext::currentContext()->functions(); funcs->glDeleteTextures( 1, &id ); } - + auto glTexture = static_cast< Texture* >( rhiTexture ); glTexture->texture = textureId; diff --git a/src/nodes/QskTextureRenderer.h b/src/nodes/QskTextureRenderer.h index 04af439d..7366bd07 100644 --- a/src/nodes/QskTextureRenderer.h +++ b/src/nodes/QskTextureRenderer.h @@ -42,8 +42,7 @@ namespace QskTextureRenderer virtual void paint( QPainter*, const QSize& ) = 0; }; - QSK_EXPORT uint createTexture( - RenderMode, const QSize&, PaintHelper* helper ); + QSK_EXPORT uint createTexture( RenderMode, const QSize&, PaintHelper* ); QSK_EXPORT uint createTextureFromGraphic( RenderMode, const QSize&, const QskGraphic&, diff --git a/src/nodes/QskTickmarksNode.cpp b/src/nodes/QskTickmarksNode.cpp index 07e95c31..ab1d3f59 100644 --- a/src/nodes/QskTickmarksNode.cpp +++ b/src/nodes/QskTickmarksNode.cpp @@ -86,7 +86,7 @@ void QskTickmarksNode::update( for( int i = TM::MinorTick; i <= TM::MajorTick; i++ ) { - const auto tickType = static_cast< TM::TickType >(i); + const auto tickType = static_cast< TM::TickType >( i ); const auto ticks = tickmarks.ticks( tickType ); if ( orientation == Qt::Horizontal )