uncrustified
This commit is contained in:
parent
f03f8c1547
commit
4e54d1cb58
@ -25,8 +25,8 @@
|
||||
|
||||
#define QSK_NAMESPACE( name ) namespace name
|
||||
#define QSK_ENUM( name ) \
|
||||
inline const QMetaObject *qt_getEnumMetaObject(name) noexcept { return &staticMetaObject; } \
|
||||
inline constexpr const char *qt_getEnumName(name) noexcept { return #name; }
|
||||
inline const QMetaObject* qt_getEnumMetaObject(name) noexcept { return &staticMetaObject; } \
|
||||
inline constexpr const char* qt_getEnumName(name) noexcept { return #name; }
|
||||
|
||||
#endif
|
||||
|
||||
@ -543,7 +543,7 @@ QSK_EXPORT void qskDebugAspect( QDebug, const QMetaObject*, QskAspect::Aspect );
|
||||
const QskAspect::State 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_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_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( m, ... ) _QSK_EVAL_( _QSK_EVAL_NARG( __VA_ARGS__ ), m, __VA_ARGS__ )
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include <functional>
|
||||
|
||||
#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; \
|
||||
return static_cast< Flags >( \
|
||||
|
@ -45,10 +45,10 @@
|
||||
|
||||
#else
|
||||
|
||||
template < typename T >
|
||||
template< typename T >
|
||||
struct QskAddConst { typedef const T Type; };
|
||||
|
||||
template < typename T >
|
||||
template< typename T >
|
||||
constexpr typename QskAddConst< T >::Type& qskAsConst( T& t ) noexcept { return t; }
|
||||
|
||||
template< typename T >
|
||||
|
@ -139,7 +139,7 @@ bool QskMetaFunction::operator==( const QskMetaFunction& other ) const
|
||||
if ( m_functionCall && other.m_functionCall )
|
||||
{
|
||||
if ( m_functionCall->typeInfo() == StaticFunction &&
|
||||
other.m_functionCall->typeInfo() == StaticFunction )
|
||||
other.m_functionCall->typeInfo() == StaticFunction )
|
||||
{
|
||||
// only static functions can be compared
|
||||
return m_functionCall->compare(
|
||||
|
@ -26,7 +26,7 @@ class QSK_EXPORT QskBoxSkinlet : public QskSkinlet
|
||||
QRectF subControlRect( const QskSkinnable*,
|
||||
QskAspect::Subcontrol ) const override;
|
||||
|
||||
protected:
|
||||
protected:
|
||||
QSGNode* updateSubNode( const QskSkinnable*,
|
||||
quint8 nodeRole, QSGNode* ) const override;
|
||||
};
|
||||
|
@ -1267,7 +1267,7 @@ void QskControl::setFixedWidth( qreal width )
|
||||
auto size = d->explicitSizeHint( Qt::PreferredSize );
|
||||
|
||||
if ( ( d->sizePolicy.horizontalPolicy() != QskSizePolicy::Fixed ) ||
|
||||
( size.width() != width ) )
|
||||
( size.width() != width ) )
|
||||
{
|
||||
size.setWidth( width );
|
||||
|
||||
@ -1288,7 +1288,7 @@ void QskControl::setFixedHeight( qreal height )
|
||||
auto size = d->explicitSizeHint( Qt::PreferredSize );
|
||||
|
||||
if ( ( d->sizePolicy.verticalPolicy() != QskSizePolicy::Fixed ) ||
|
||||
( size.height() != height ) )
|
||||
( size.height() != height ) )
|
||||
{
|
||||
size.setHeight( height );
|
||||
|
||||
|
@ -22,7 +22,7 @@ class QskGeometryChangeEvent;
|
||||
class QskWindowChangeEvent;
|
||||
class QskGestureEvent;
|
||||
|
||||
template <typename T> class QVector;
|
||||
template< typename T > class QVector;
|
||||
|
||||
class QSK_EXPORT QskControl : public QQuickItem, public QskSkinnable
|
||||
{
|
||||
|
@ -219,8 +219,8 @@ QVector< QMetaObject::Connection > QskFocusIndicator::connectItem( const QQuickI
|
||||
{
|
||||
if ( sender->metaObject()->indexOfSignal( "focusIndicatorRectChanged()" ) >= 0 )
|
||||
{
|
||||
c += QObject::connect( sender, SIGNAL( focusIndicatorRectChanged() ),
|
||||
this, SLOT( onFocusItemGeometryChanged() ) );
|
||||
c += QObject::connect( sender, SIGNAL(focusIndicatorRectChanged()),
|
||||
this, SLOT(onFocusItemGeometryChanged()) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
#include "QskControl.h"
|
||||
|
||||
template <typename T> class QVector;
|
||||
template< typename T > class QVector;
|
||||
|
||||
class QSK_EXPORT QskFocusIndicator : public QskControl
|
||||
{
|
||||
|
@ -66,7 +66,7 @@ QRectF QskPageIndicatorSkinlet::bulletRect(
|
||||
if ( indexDiff > ( indicator->count() - 1 ) )
|
||||
indexDiff = ( indicator->count() - indicator->currentIndex() ); // wrapping
|
||||
|
||||
const qreal sz = ( indexDiff < 1 ) ?
|
||||
const qreal sz = ( indexDiff < 1 ) ?
|
||||
( 1 - indexDiff ) * szHighlighted + indexDiff * szNormal : szNormal;
|
||||
|
||||
const qreal spacing = indicator->metric( QskPageIndicator::Panel | QskAspect::Spacing );
|
||||
|
@ -68,11 +68,11 @@ class QSK_EXPORT QskPushButton : public QskAbstractButton
|
||||
QRectF layoutRect() const override;
|
||||
|
||||
public Q_SLOTS:
|
||||
void setText( const QString& text );
|
||||
void setGraphicSource( const QUrl& url );
|
||||
void setGraphicSource( const QString& source );
|
||||
void setText( const QString& );
|
||||
void setGraphicSource( const QUrl& );
|
||||
void setGraphicSource( const QString& );
|
||||
void setGraphic( const QskGraphic& );
|
||||
void setGraphicSourceSize( const QSizeF & );
|
||||
void setGraphicSourceSize( const QSizeF& );
|
||||
|
||||
Q_SIGNALS:
|
||||
void cornerChanged();
|
||||
|
@ -12,14 +12,14 @@
|
||||
class QQuickItem;
|
||||
class QSGNode;
|
||||
class QRectF;
|
||||
template <typename T> class QList;
|
||||
template< typename T > class QList;
|
||||
|
||||
/*
|
||||
Exporting methods from QQuickItemPrivate, that should be part
|
||||
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 qskIsTransparentForPositioner( const QQuickItem* );
|
||||
QSK_EXPORT bool qskIsTabFence( const QQuickItem* );
|
||||
|
@ -130,7 +130,7 @@ class QSK_EXPORT QskSkin : public QObject
|
||||
protected:
|
||||
QskSkinHintTable& skinHintTable();
|
||||
|
||||
private:
|
||||
private:
|
||||
void declareSkinlet( const QMetaObject* controlMetaObject,
|
||||
const QMetaObject* skinMetaObject );
|
||||
|
||||
|
@ -169,7 +169,7 @@ namespace
|
||||
void start()
|
||||
{
|
||||
m_notifyConnection =
|
||||
QskAnimator::addAdvanceHandler( this, SLOT( notify( QQuickWindow* ) ) );
|
||||
QskAnimator::addAdvanceHandler( this, SLOT(notify(QQuickWindow*)) );
|
||||
|
||||
for ( auto& it : m_hintAnimatorMap )
|
||||
it.second.start();
|
||||
|
@ -115,8 +115,8 @@ namespace
|
||||
|
||||
class Validator final : public QValidator
|
||||
{
|
||||
public:
|
||||
State validate(QString &, int &) const override
|
||||
public:
|
||||
State validate( QString&, int& ) const override
|
||||
{
|
||||
return QValidator::Acceptable;
|
||||
}
|
||||
@ -153,7 +153,7 @@ namespace
|
||||
return this->event( event );
|
||||
}
|
||||
|
||||
protected:
|
||||
protected:
|
||||
void geometryChanged(
|
||||
const QRectF& newGeometry, const QRectF& oldGeometry ) override
|
||||
{
|
||||
|
@ -99,7 +99,6 @@ class QSK_EXPORT QskDialog : public QObject
|
||||
Reverse = 1 << 30
|
||||
};
|
||||
|
||||
|
||||
enum DialogCode
|
||||
{
|
||||
Rejected = 0,
|
||||
|
@ -10,7 +10,7 @@
|
||||
#include "QskDialog.h"
|
||||
|
||||
class QskPushButton;
|
||||
template <typename T> class QVector;
|
||||
template< typename T > class QVector;
|
||||
|
||||
class QSK_EXPORT QskDialogButtonBox : public QskBox
|
||||
{
|
||||
|
@ -394,7 +394,7 @@ void QskLinearBox::rearrange()
|
||||
QskLayoutItem* layoutItem = engine().layoutItemAt( i );
|
||||
|
||||
if ( layoutItem->firstRow( Qt::Horizontal ) != col ||
|
||||
layoutItem->firstRow( Qt::Vertical ) != row )
|
||||
layoutItem->firstRow( Qt::Vertical ) != row )
|
||||
{
|
||||
engine().removeItem( layoutItem );
|
||||
|
||||
@ -464,7 +464,7 @@ QRectF QskLinearBox::alignedLayoutRect( const QRectF& rect ) const
|
||||
}
|
||||
|
||||
if ( ( m_data->extraSpacingAt & Qt::TopEdge ) ||
|
||||
( m_data->extraSpacingAt & Qt::BottomEdge ) )
|
||||
( m_data->extraSpacingAt & Qt::BottomEdge ) )
|
||||
{
|
||||
bool isExpandable = false;
|
||||
|
||||
|
@ -467,7 +467,7 @@ namespace
|
||||
}
|
||||
|
||||
while ( !m_iterator[ 1 ].isDone() &&
|
||||
( m_iterator[ 0 ].value() > m_iterator[ 1 ].value() ) )
|
||||
( m_iterator[ 0 ].value() > m_iterator[ 1 ].value() ) )
|
||||
{
|
||||
m_iterator[ 1 ].advance( metrics, m_curve );
|
||||
}
|
||||
@ -498,7 +498,7 @@ namespace
|
||||
*/
|
||||
|
||||
while ( !m_iterator[ 1 ].isDone() &&
|
||||
( m_iterator[ 0 ].value() > m_iterator[ 1 ].value() ) )
|
||||
( m_iterator[ 0 ].value() > m_iterator[ 1 ].value() ) )
|
||||
{
|
||||
m_iterator[ 1 ].advance( m_metrics, m_curve );
|
||||
}
|
||||
|
@ -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 dx2( int pos ) const
|
||||
{ return m_uniform ? m_outer[ 0 ].dx : m_outer[ pos ].dx; }
|
||||
|
||||
inline qreal dy2( int pos ) const
|
||||
{ return m_uniform ? m_outer[ 0 ].dy : m_outer[ pos ].dy; }
|
||||
|
||||
@ -541,7 +544,7 @@ namespace
|
||||
const int stepCount = c[ 0 ].stepCount;
|
||||
#endif
|
||||
|
||||
Line *linesBR, *linesTR, *linesTL, *linesBL;
|
||||
Line* linesBR, * linesTR, * linesTL, * linesBL;
|
||||
linesBR = linesTR = linesTL = linesBL = nullptr;
|
||||
|
||||
const int numCornerLines = stepCount + 1;
|
||||
|
@ -55,7 +55,7 @@ void QskGraphicNode::setGraphic(
|
||||
{
|
||||
const auto oldRect = QskTextureNode::rect();
|
||||
isTextureDirty = ( rect.width() != static_cast< int >( oldRect.width() ) ) ||
|
||||
( rect.height() != static_cast< int >( oldRect.height() ) );
|
||||
( rect.height() != static_cast< int >( oldRect.height() ) );
|
||||
}
|
||||
|
||||
QskTextureNode::setRect( rect );
|
||||
|
@ -40,7 +40,7 @@ void QskPaintedNode::update(
|
||||
{
|
||||
const auto oldRect = QskTextureNode::rect();
|
||||
isTextureDirty = ( rect.width() != static_cast< int >( oldRect.width() ) ) ||
|
||||
( rect.height() != static_cast< int >( oldRect.height() ) );
|
||||
( rect.height() != static_cast< int >( oldRect.height() ) );
|
||||
}
|
||||
|
||||
QskTextureNode::setRect( rect );
|
||||
|
@ -111,7 +111,7 @@ namespace
|
||||
auto* materialNew = static_cast< Material* >( newMaterial );
|
||||
|
||||
if ( ( materialOld == nullptr ) ||
|
||||
( materialOld->textureId() != materialNew->textureId() ) )
|
||||
( materialOld->textureId() != materialNew->textureId() ) )
|
||||
{
|
||||
auto funcs = QOpenGLContext::currentContext()->functions();
|
||||
funcs->glBindTexture( GL_TEXTURE_2D, materialNew->textureId() );
|
||||
|
@ -18,6 +18,7 @@ QDebug operator<<( QDebug debug, Color color )
|
||||
debug << "C" << '(';
|
||||
debug << color.r << "," << color.g << "," << color.b << "," << color.a;
|
||||
debug << ')';
|
||||
|
||||
return debug;
|
||||
}
|
||||
|
||||
@ -25,7 +26,8 @@ QDebug operator<<( QDebug debug, ColoredLine line )
|
||||
{
|
||||
QDebugStateSaver saver( debug );
|
||||
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;
|
||||
}
|
||||
|
||||
@ -33,7 +35,8 @@ QDebug operator<<( QDebug debug, Line line )
|
||||
{
|
||||
QDebugStateSaver saver( debug );
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user