uncrustified

This commit is contained in:
Uwe Rathmann 2019-01-04 13:42:16 +01:00
parent f03f8c1547
commit 4e54d1cb58
44 changed files with 87 additions and 82 deletions

View File

@ -25,8 +25,8 @@
#define QSK_NAMESPACE( name ) namespace name #define QSK_NAMESPACE( name ) namespace name
#define QSK_ENUM( name ) \ #define QSK_ENUM( name ) \
inline const QMetaObject *qt_getEnumMetaObject(name) noexcept { return &staticMetaObject; } \ inline const QMetaObject* qt_getEnumMetaObject(name) noexcept { return &staticMetaObject; } \
inline constexpr const char *qt_getEnumName(name) noexcept { return #name; } inline constexpr const char* qt_getEnumName(name) noexcept { return #name; }
#endif #endif
@ -543,7 +543,7 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect::Aspect );
const QskAspect::State type::name = \ const QskAspect::State type::name = \
QskAspect::registerState( &type::staticMetaObject, value, #type "::" #name ); QskAspect::registerState( &type::staticMetaObject, value, #type "::" #name );
#if !defined(_MSC_VER) #if !defined( _MSC_VER )
#define QSK_SUBCONTROLS( ... ) static const QskAspect::Subcontrol __VA_ARGS__; #define QSK_SUBCONTROLS( ... ) static const QskAspect::Subcontrol __VA_ARGS__;
#define QSK_STATES( ... ) static const QskAspect::State __VA_ARGS__; #define QSK_STATES( ... ) static const QskAspect::State __VA_ARGS__;
@ -581,7 +581,7 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect::Aspect );
#define _QSK_EVAL_ARG_N( _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, A, B, C, D, E, F, N, ... ) N #define _QSK_EVAL_ARG_N( _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, A, B, C, D, E, F, N, ... ) N
#define _QSK_EVAL_RSEQ_N() F, E, D, C, B, A, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0 #define _QSK_EVAL_RSEQ_N() F, E, D, C, B, A, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
#define _QSK_CAT(x,y) x##y #define _QSK_CAT(x,y) x ## y
#define _QSK_EVAL_( N, m, ... ) _QSK_EXPAND( _QSK_CAT( _QSK_EVAL_, N )( m, __VA_ARGS__ ) ) #define _QSK_EVAL_( N, m, ... ) _QSK_EXPAND( _QSK_CAT( _QSK_EVAL_, N )( m, __VA_ARGS__ ) )
#define _QSK_EVAL( m, ... ) _QSK_EVAL_( _QSK_EVAL_NARG( __VA_ARGS__ ), m, __VA_ARGS__ ) #define _QSK_EVAL( m, ... ) _QSK_EVAL_( _QSK_EVAL_NARG( __VA_ARGS__ ), m, __VA_ARGS__ )

View File

@ -10,7 +10,7 @@
#include <functional> #include <functional>
#define QSK_DECLARE_OPERATORS_FOR_FLAGS( Flags ) \ #define QSK_DECLARE_OPERATORS_FOR_FLAGS( Flags ) \
constexpr inline Flags operator|( const Flags &a, const Flags &b ) noexcept \ constexpr inline Flags operator|( const Flags& a, const Flags& b ) noexcept \
{ \ { \
using underlying = typename std::underlying_type< Flags >::type; \ using underlying = typename std::underlying_type< Flags >::type; \
return static_cast< Flags >( \ return static_cast< Flags >( \

View File

@ -45,10 +45,10 @@
#else #else
template < typename T > template< typename T >
struct QskAddConst { typedef const T Type; }; struct QskAddConst { typedef const T Type; };
template < typename T > template< typename T >
constexpr typename QskAddConst< T >::Type& qskAsConst( T& t ) noexcept { return t; } constexpr typename QskAddConst< T >::Type& qskAsConst( T& t ) noexcept { return t; }
template< typename T > template< typename T >

View File

@ -26,7 +26,7 @@ class QSK_EXPORT QskBoxSkinlet : public QskSkinlet
QRectF subControlRect( const QskSkinnable*, QRectF subControlRect( const QskSkinnable*,
QskAspect::Subcontrol ) const override; QskAspect::Subcontrol ) const override;
protected: protected:
QSGNode* updateSubNode( const QskSkinnable*, QSGNode* updateSubNode( const QskSkinnable*,
quint8 nodeRole, QSGNode* ) const override; quint8 nodeRole, QSGNode* ) const override;
}; };

View File

@ -22,7 +22,7 @@ class QskGeometryChangeEvent;
class QskWindowChangeEvent; class QskWindowChangeEvent;
class QskGestureEvent; class QskGestureEvent;
template <typename T> class QVector; template< typename T > class QVector;
class QSK_EXPORT QskControl : public QQuickItem, public QskSkinnable class QSK_EXPORT QskControl : public QQuickItem, public QskSkinnable
{ {

View File

@ -219,8 +219,8 @@ QVector< QMetaObject::Connection > QskFocusIndicator::connectItem( const QQuickI
{ {
if ( sender->metaObject()->indexOfSignal( "focusIndicatorRectChanged()" ) >= 0 ) if ( sender->metaObject()->indexOfSignal( "focusIndicatorRectChanged()" ) >= 0 )
{ {
c += QObject::connect( sender, SIGNAL( focusIndicatorRectChanged() ), c += QObject::connect( sender, SIGNAL(focusIndicatorRectChanged()),
this, SLOT( onFocusItemGeometryChanged() ) ); this, SLOT(onFocusItemGeometryChanged()) );
} }
} }

View File

@ -8,7 +8,7 @@
#include "QskControl.h" #include "QskControl.h"
template <typename T> class QVector; template< typename T > class QVector;
class QSK_EXPORT QskFocusIndicator : public QskControl class QSK_EXPORT QskFocusIndicator : public QskControl
{ {

View File

@ -68,11 +68,11 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
QRectF layoutRect() const override; QRectF layoutRect() const override;
public Q_SLOTS: public Q_SLOTS:
void setText( const QString& text ); void setText( const QString& );
void setGraphicSource( const QUrl& url ); void setGraphicSource( const QUrl& );
void setGraphicSource( const QString& source ); void setGraphicSource( const QString& );
void setGraphic( const QskGraphic& ); void setGraphic( const QskGraphic& );
void setGraphicSourceSize( const QSizeF & ); void setGraphicSourceSize( const QSizeF& );
Q_SIGNALS: Q_SIGNALS:
void cornerChanged(); void cornerChanged();

View File

@ -12,14 +12,14 @@
class QQuickItem; class QQuickItem;
class QSGNode; class QSGNode;
class QRectF; class QRectF;
template <typename T> class QList; template< typename T > class QList;
/* /*
Exporting methods from QQuickItemPrivate, that should be part Exporting methods from QQuickItemPrivate, that should be part
of QQuickItem. of QQuickItem.
*/ */
QSK_EXPORT bool qskIsItemComplete( const QQuickItem* item ); QSK_EXPORT bool qskIsItemComplete( const QQuickItem* );
QSK_EXPORT bool qskIsAncestorOf( const QQuickItem* item, const QQuickItem* child ); QSK_EXPORT bool qskIsAncestorOf( const QQuickItem* item, const QQuickItem* child );
QSK_EXPORT bool qskIsTransparentForPositioner( const QQuickItem* ); QSK_EXPORT bool qskIsTransparentForPositioner( const QQuickItem* );
QSK_EXPORT bool qskIsTabFence( const QQuickItem* ); QSK_EXPORT bool qskIsTabFence( const QQuickItem* );

View File

@ -130,7 +130,7 @@ class QSK_EXPORT QskSkin : public QObject
protected: protected:
QskSkinHintTable& skinHintTable(); QskSkinHintTable& skinHintTable();
private: private:
void declareSkinlet( const QMetaObject* controlMetaObject, void declareSkinlet( const QMetaObject* controlMetaObject,
const QMetaObject* skinMetaObject ); const QMetaObject* skinMetaObject );

View File

@ -169,7 +169,7 @@ namespace
void start() void start()
{ {
m_notifyConnection = m_notifyConnection =
QskAnimator::addAdvanceHandler( this, SLOT( notify( QQuickWindow* ) ) ); QskAnimator::addAdvanceHandler( this, SLOT(notify(QQuickWindow*)) );
for ( auto& it : m_hintAnimatorMap ) for ( auto& it : m_hintAnimatorMap )
it.second.start(); it.second.start();

View File

@ -116,7 +116,7 @@ namespace
class Validator final : public QValidator class Validator final : public QValidator
{ {
public: public:
State validate(QString &, int &) const override State validate( QString&, int& ) const override
{ {
return QValidator::Acceptable; return QValidator::Acceptable;
} }

View File

@ -99,7 +99,6 @@ class QSK_EXPORT QskDialog : public QObject
Reverse = 1 << 30 Reverse = 1 << 30
}; };
enum DialogCode enum DialogCode
{ {
Rejected = 0, Rejected = 0,

View File

@ -10,7 +10,7 @@
#include "QskDialog.h" #include "QskDialog.h"
class QskPushButton; class QskPushButton;
template <typename T> class QVector; template< typename T > class QVector;
class QSK_EXPORT QskDialogButtonBox : public QskBox class QSK_EXPORT QskDialogButtonBox : public QskBox
{ {

View File

@ -188,10 +188,13 @@ namespace
} }
} }
inline qreal dx1( int pos ) const { return m_inner[ pos] .dx; } inline qreal dx1( int pos ) const { return m_inner[ pos].dx; }
inline qreal dy1( int pos ) const { return m_inner[ pos ].dy; } inline qreal dy1( int pos ) const { return m_inner[ pos ].dy; }
inline qreal dx2( int pos ) const inline qreal dx2( int pos ) const
{ return m_uniform ? m_outer[ 0 ].dx : m_outer[ pos ].dx; } { return m_uniform ? m_outer[ 0 ].dx : m_outer[ pos ].dx; }
inline qreal dy2( int pos ) const inline qreal dy2( int pos ) const
{ return m_uniform ? m_outer[ 0 ].dy : m_outer[ pos ].dy; } { return m_uniform ? m_outer[ 0 ].dy : m_outer[ pos ].dy; }
@ -541,7 +544,7 @@ namespace
const int stepCount = c[ 0 ].stepCount; const int stepCount = c[ 0 ].stepCount;
#endif #endif
Line *linesBR, *linesTR, *linesTL, *linesBL; Line* linesBR, * linesTR, * linesTL, * linesBL;
linesBR = linesTR = linesTL = linesBL = nullptr; linesBR = linesTR = linesTL = linesBL = nullptr;
const int numCornerLines = stepCount + 1; const int numCornerLines = stepCount + 1;

View File

@ -18,6 +18,7 @@ QDebug operator<<( QDebug debug, Color color )
debug << "C" << '('; debug << "C" << '(';
debug << color.r << "," << color.g << "," << color.b << "," << color.a; debug << color.r << "," << color.g << "," << color.b << "," << color.a;
debug << ')'; debug << ')';
return debug; return debug;
} }
@ -26,6 +27,7 @@ QDebug operator<<( QDebug debug, ColoredLine line )
QDebugStateSaver saver( debug ); QDebugStateSaver saver( debug );
qDebug() << qRound( line.p1.x ) << qRound( line.p1.y ) qDebug() << qRound( line.p1.x ) << qRound( line.p1.y )
<< "->" << qRound( line.p2.x ) << qRound( line.p2.y ); << "->" << qRound( line.p2.x ) << qRound( line.p2.y );
return debug; return debug;
} }
@ -34,6 +36,7 @@ QDebug operator<<( QDebug debug, Line line )
QDebugStateSaver saver( debug ); QDebugStateSaver saver( debug );
qDebug() << qRound( line.p1.x ) << qRound( line.p1.y ) qDebug() << qRound( line.p1.x ) << qRound( line.p1.y )
<< "->" << qRound( line.p2.x ) << qRound( line.p2.y ); << "->" << qRound( line.p2.x ) << qRound( line.p2.y );
return debug; return debug;
} }