From e1ca897478aa5cc0c4aed074e20d781e23264986 Mon Sep 17 00:00:00 2001 From: Uwe Rathmann Date: Mon, 7 Jan 2019 09:13:53 +0100 Subject: [PATCH] uncrustified --- examples/automotive/SpeedometerSkinlet.cpp | 3 ++- examples/boxes/Box.cpp | 2 +- playground/invoker/main.cpp | 2 +- playground/webview/main.cpp | 2 +- qmlexport/QskQml.cpp | 2 +- skins/material/QskMaterialSkin.cpp | 2 +- skins/squiek/QskSquiekSkin.cpp | 2 +- src/controls/QskControl.cpp | 2 +- src/controls/QskScrollArea.cpp | 2 +- src/controls/QskTextInput.cpp | 2 +- src/nodes/QskBoxRenderer.h | 8 ++++---- support/SkinnyShapeProvider.h | 2 +- support/SkinnyShortcut.cpp | 2 +- support/SkinnyShortcut.h | 4 ++-- tools/metadoxfilter/DoxDumper.h | 4 ++-- tools/metadoxfilter/Interface.h | 8 ++++---- tools/metadoxfilter/ParserTree.h | 4 ++-- tools/svg2qvg/main.cpp | 2 +- 18 files changed, 28 insertions(+), 27 deletions(-) diff --git a/examples/automotive/SpeedometerSkinlet.cpp b/examples/automotive/SpeedometerSkinlet.cpp index 5e3afb9a..59536893 100644 --- a/examples/automotive/SpeedometerSkinlet.cpp +++ b/examples/automotive/SpeedometerSkinlet.cpp @@ -132,7 +132,8 @@ QSGNode* SpeedometerSkinlet::updateLabelsNode( const Speedometer* speedometer, Q Speedometer::Panel ).marginsRemoved( panelMargins ); QPointF center = QPointF( panelRect.x() + panelRect.width() / 2, - panelRect.y() + panelRect.height() / 2 ); + panelRect.y() + panelRect.height() / 2 ); + auto radius = static_cast< float >( panelRect.width() / 2 ); const QMarginsF numbersMargins = speedometer->marginsHint( Speedometer::Labels ); diff --git a/examples/boxes/Box.cpp b/examples/boxes/Box.cpp index fd2e895d..c63761d1 100644 --- a/examples/boxes/Box.cpp +++ b/examples/boxes/Box.cpp @@ -191,7 +191,7 @@ void Box::setGradient( } stops += QskGradientStop( 1.0, - pal.color( static_cast( Palette::NumWeights - 1 ) ) ); + pal.color( static_cast< Palette::Weight >( Palette::NumWeights - 1 ) ) ); setGradient( QskGradient( orientation, stops ) ); } diff --git a/playground/invoker/main.cpp b/playground/invoker/main.cpp index 8fe13ac4..9b1935fb 100644 --- a/playground/invoker/main.cpp +++ b/playground/invoker/main.cpp @@ -125,7 +125,7 @@ class Application : public QCoreApplication #if 1 m_invoker.addMethodCall( m_object, "print0(double,int)" ); m_invoker.addMethodCall( m_object, "print1(double,int)" ); - m_invoker.addMethodCall( m_object, SLOT( print2( int, double ) ) ); + m_invoker.addMethodCall( m_object, SLOT(print2(int,double)) ); m_invoker.addMethodCall( m_object, "print3(double)" ); m_invoker.addMethodCall( m_object, "print4(int)" ); m_invoker.addMethodCall( m_object, "print4(int)" ); diff --git a/playground/webview/main.cpp b/playground/webview/main.cpp index 2798ec11..6fb7865e 100644 --- a/playground/webview/main.cpp +++ b/playground/webview/main.cpp @@ -16,7 +16,7 @@ class WebView : public QQuickWebEngineView { -public: + public: WebView( const char* url, QQuickItem* parent = nullptr ) : WebView( parent ) { diff --git a/qmlexport/QskQml.cpp b/qmlexport/QskQml.cpp index 797f091f..952a85f6 100644 --- a/qmlexport/QskQml.cpp +++ b/qmlexport/QskQml.cpp @@ -340,7 +340,7 @@ void QskQml::registerTypes() QMetaType::registerConverter< qreal, QMarginsF >( []( qreal value ) { return QMarginsF( value, value, value, value ); } ); - qRegisterAnimationInterpolator( + qRegisterAnimationInterpolator< QMarginsF >( []( const QMarginsF& from, const QMarginsF& to, qreal progress ) { return QVariant::fromValue( QMarginsF( diff --git a/skins/material/QskMaterialSkin.cpp b/skins/material/QskMaterialSkin.cpp index 5c5c71bc..34eab296 100644 --- a/skins/material/QskMaterialSkin.cpp +++ b/skins/material/QskMaterialSkin.cpp @@ -677,7 +677,7 @@ void QskMaterialSkin::initSubWindowHints() setFontRole( Q::TitleBarText, QskSkin::SmallFont ); setSkinHint( Q::TitleBarText | Alignment, - static_cast( Qt::AlignLeft | Qt::AlignVCenter ) ); + static_cast< int >( Qt::AlignLeft | Qt::AlignVCenter ) ); for ( auto subControl : { Q::Panel, Q::TitleBar, Q::TitleBarText } ) setAnimation( subControl | Color, qskDuration ); diff --git a/skins/squiek/QskSquiekSkin.cpp b/skins/squiek/QskSquiekSkin.cpp index 777d3031..049e1592 100644 --- a/skins/squiek/QskSquiekSkin.cpp +++ b/skins/squiek/QskSquiekSkin.cpp @@ -769,7 +769,7 @@ void QskSquiekSkin::initSubWindowHints() setColor( Q::TitleBarText, pal.themeForeground ); setSkinHint( Q::TitleBarText | Alignment, - static_cast( Qt::AlignLeft | Qt::AlignVCenter ) ); + static_cast< int >( Qt::AlignLeft | Qt::AlignVCenter ) ); for ( auto subControl : { Q::Panel, Q::TitleBar, Q::TitleBarText } ) setAnimation( subControl | Color, qskDuration ); diff --git a/src/controls/QskControl.cpp b/src/controls/QskControl.cpp index 0264b2aa..c7e11999 100644 --- a/src/controls/QskControl.cpp +++ b/src/controls/QskControl.cpp @@ -820,7 +820,7 @@ void QskControl::updateControlFlag( uint flag, bool on ) Q_D( QskControl ); if ( ( flag > std::numeric_limits< controlFlags_t >::max() ) || - ( bool( d->controlFlags & flag ) == on ) ) + ( bool( d->controlFlags & flag ) == on ) ) { return; } diff --git a/src/controls/QskScrollArea.cpp b/src/controls/QskScrollArea.cpp index a4c8dc3e..9a9e4aae 100644 --- a/src/controls/QskScrollArea.cpp +++ b/src/controls/QskScrollArea.cpp @@ -204,7 +204,7 @@ void QskScrollAreaClipItem::updateNode( QSGNode* ) auto* d = QQuickItemPrivate::get( this ); if ( QQuickItemPrivate::get( scrollArea() )->dirtyAttributes & - QQuickItemPrivate::ContentUpdateMask ) + QQuickItemPrivate::ContentUpdateMask ) { /* The update order depends on who calls update first and we diff --git a/src/controls/QskTextInput.cpp b/src/controls/QskTextInput.cpp index 0e231510..40c147fc 100644 --- a/src/controls/QskTextInput.cpp +++ b/src/controls/QskTextInput.cpp @@ -775,10 +775,10 @@ QVariant QskTextInput::inputMethodQuery( { return locale(); } - case Qt::ImCursorRectangle: #if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 ) case Qt::ImInputItemClipRectangle: #endif + case Qt::ImCursorRectangle: { QVariant v = m_data->textInput->inputMethodQuery( query, argument ); #if 1 diff --git a/src/nodes/QskBoxRenderer.h b/src/nodes/QskBoxRenderer.h index 811f9722..a6dd0c7a 100644 --- a/src/nodes/QskBoxRenderer.h +++ b/src/nodes/QskBoxRenderer.h @@ -60,10 +60,10 @@ class QSK_EXPORT QskBoxRenderer inline bool operator==( const Quad& other ) const { return - ( left == other.left ) && - ( right == other.right ) && - ( top == other.top ) && - ( bottom == other.bottom ); + ( left == other.left ) && + ( right == other.right ) && + ( top == other.top ) && + ( bottom == other.bottom ); } inline bool operator!=( const Quad& other ) const diff --git a/support/SkinnyShapeProvider.h b/support/SkinnyShapeProvider.h index b7970f33..3b5f7962 100644 --- a/support/SkinnyShapeProvider.h +++ b/support/SkinnyShapeProvider.h @@ -11,7 +11,7 @@ class SKINNY_EXPORT SkinnyShapeProvider : public QskGraphicProvider { -protected: + protected: const QskGraphic* loadGraphic( const QString& id ) const override final; }; diff --git a/support/SkinnyShortcut.cpp b/support/SkinnyShortcut.cpp index 0244e514..9b13e787 100644 --- a/support/SkinnyShortcut.cpp +++ b/support/SkinnyShortcut.cpp @@ -150,7 +150,7 @@ void SkinnyShortcut::showBackground() void SkinnyShortcut::changeFonts( int increment ) { auto skin = qskSetup->skin(); - + const auto fonts = skin->fonts(); for ( auto it = fonts.begin(); it != fonts.end(); ++it ) diff --git a/support/SkinnyShortcut.h b/support/SkinnyShortcut.h index 7cee4aa6..52222f18 100644 --- a/support/SkinnyShortcut.h +++ b/support/SkinnyShortcut.h @@ -13,7 +13,7 @@ class SKINNY_EXPORT SkinnyShortcut : public QObject { Q_OBJECT -public: + public: enum Type { Quit = 1 << 0, @@ -31,7 +31,7 @@ public: static void enable( Types ); -private: + private: SkinnyShortcut( QObject* parent = nullptr ); void rotateSkin(); diff --git a/tools/metadoxfilter/DoxDumper.h b/tools/metadoxfilter/DoxDumper.h index f73ee3b7..cf9d512b 100644 --- a/tools/metadoxfilter/DoxDumper.h +++ b/tools/metadoxfilter/DoxDumper.h @@ -11,14 +11,14 @@ class DoxDumper { -public: + public: DoxDumper(); int dump( const Interface&, FILE* ); int dumpCpp( const Interface&, FILE* ); int dumpQml( const Interface&, FILE* ); -private: + private: void doxPrintf( const char* format, ... ); std::string expandedText( diff --git a/tools/metadoxfilter/Interface.h b/tools/metadoxfilter/Interface.h index 084b0de1..99608e68 100644 --- a/tools/metadoxfilter/Interface.h +++ b/tools/metadoxfilter/Interface.h @@ -11,7 +11,7 @@ class Property { -public: + public: std::string name; std::string type; @@ -24,7 +24,7 @@ public: class Enum { -public: + public: std::string className; std::string qmlClassName; std::string description; @@ -32,7 +32,7 @@ public: class Method { -public: + public: Method( int methodType = -1 ): type( methodType ) { @@ -45,7 +45,7 @@ public: class Interface { -public: + public: std::string className; std::string baseName; std::string qmlClassName; diff --git a/tools/metadoxfilter/ParserTree.h b/tools/metadoxfilter/ParserTree.h index febf9caf..3c26122b 100644 --- a/tools/metadoxfilter/ParserTree.h +++ b/tools/metadoxfilter/ParserTree.h @@ -10,7 +10,7 @@ class ParserTree { -public: + public: void beginScope( int token ); void addText( const char* ); void endScope(); @@ -20,7 +20,7 @@ public: return m_interfaces; } -private: + private: int scope() const; std::vector< Interface > m_interfaces; diff --git a/tools/svg2qvg/main.cpp b/tools/svg2qvg/main.cpp index df9f87db..a347d754 100644 --- a/tools/svg2qvg/main.cpp +++ b/tools/svg2qvg/main.cpp @@ -3,7 +3,7 @@ * This file may be used under the terms of the QSkinny License, Version 1.0 *****************************************************************************/ -#if defined(QSK_STANDALONE) +#if defined( QSK_STANDALONE ) #include #include #include