upport for Qt < Qt 5.12 dropped

This commit is contained in:
Uwe Rathmann 2022-03-08 11:53:46 +01:00
parent 2bfb68c7de
commit ae2c6d87a8
29 changed files with 32 additions and 316 deletions

View File

@ -25,9 +25,9 @@ controls is limited to the needs of the driving projects.
QSkinny is supposed to run on all platforms being supported by Qt/Quick.
But so far only Linux is actively tested.
It might support all versions Qt >= 5.6, but you can rely on:
It might support all versions Qt >= 5.12, but you can rely on:
- Qt 5.6
- Qt 5.15
- current long term supported ( LTS ) version of Qt
- current version of Qt

View File

@ -28,11 +28,7 @@ namespace
LinesNode( int lineCount = 0 )
: m_geometry( QSGGeometry::defaultAttributes_Point2D(), 2 * lineCount )
{
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
m_geometry.setDrawingMode( QSGGeometry::DrawLines );
#else
m_geometry.setDrawingMode( GL_LINES );
#endif
m_geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
setGeometry( &m_geometry );

View File

@ -46,7 +46,7 @@ MenuBar::MenuBar( QQuickItem* parent )
m_entryStrings = { "Dashboard", "Rooms", "Devices", "Statistics", "Storage", "Members" };
for( const auto& entryString : qskAsConst( m_entryStrings ) )
for( const auto& entryString : qAsConst( m_entryStrings ) )
{
auto* entry = new MenuItem( entryString, this );
m_entries.append( entry );

View File

@ -31,40 +31,16 @@ qvgrcc.CONFIG += add_inputs_as_makefile_deps
QRC_SHADOW_CLONE = $$shell_path( $${OUT_PWD}/${QMAKE_FILE_BASE}_shadow.qrc )
qtPrepareTool(QMAKE_RCC, rcc, _DEP)
lessThan(QT_MAJOR_VERSION, 6): lessThan(QT_MINOR_VERSION, 12) {
equals( OUT_PWD, $${_PRO_FILE_PWD_} ) {
# Since Qt 5.12 "rcc --list" works for qvg files, that do not yet exist
# To get these rules working for earlier versions we derive the qvg
# files from the SVGSOURCES
defineReplace(qvgfiles) {
svgfiles = $$1
files =
for( svgfile, svgfiles) {
filename = $$basename( svgfile )
files += $$shell_path( $${QVG_DIR}/$$replace( filename, svg, qvg ) )
}
return( $$files )
}
qvgrcc.depends += $$qvgfiles( $${SVGSOURCES} )
qvgrcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
} else {
equals( OUT_PWD, $${_PRO_FILE_PWD_} ) {
qvgrcc.depend_command = $$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS ${QMAKE_FILE_IN}
} else {
qvgrcc.depend_command = \
$${QMAKE_COPY} ${QMAKE_FILE_IN} $${QRC_SHADOW_CLONE} && \
$$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS $${QRC_SHADOW_CLONE} && \
$${QMAKE_DEL_FILE} $${QRC_SHADOW_CLONE}
}
qvgrcc.depend_command = \
$${QMAKE_COPY} ${QMAKE_FILE_IN} $${QRC_SHADOW_CLONE} && \
$$QMAKE_RCC_DEP -list $$QMAKE_RESOURCE_FLAGS $${QRC_SHADOW_CLONE} && \
$${QMAKE_DEL_FILE} $${QRC_SHADOW_CLONE}
}
equals( OUT_PWD, $${_PRO_FILE_PWD_} ) {

View File

@ -39,23 +39,6 @@
#define QSK_QT_PRIVATE_END \
QT_WARNING_POP
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
#define qskAsConst qAsConst
#else
template< typename T >
struct QskAddConst { typedef const T Type; };
template< typename T >
constexpr typename QskAddConst< T >::Type& qskAsConst( T& t ) noexcept { return t; }
template< typename T >
void qskAsConst( const T&& ) = delete;
#endif
#ifdef Q_FALLTHROUGH
#define QSK_FALLTHROUGH Q_FALLTHROUGH
#else

View File

@ -9,36 +9,9 @@
#include "QskGlobal.h"
#include <qmetaobject.h>
#if QT_VERSION < QT_VERSION_CHECK( 5, 8, 0 )
// hack to run moc over a namespace
#ifdef Q_MOC_RUN
#define QSK_NAMESPACE( name ) struct name
#define QSK_ENUM( name ) Q_GADGET Q_ENUM( name )
#else
#define QSK_NAMESPACE( name ) namespace name
#define QSK_ENUM( name ) \
inline constexpr const QMetaObject* qt_getEnumMetaObject(name) noexcept { return &staticMetaObject; } \
inline constexpr const char* qt_getEnumName(name) noexcept { return #name; }
#endif
#define QSK_Q_NAMESPACE extern const QMetaObject staticMetaObject;
#else
#define QSK_NAMESPACE( name ) namespace name
#define QSK_ENUM Q_ENUM_NS
#define QSK_Q_NAMESPACE Q_NAMESPACE
#endif
QSK_NAMESPACE( Qsk )
namespace Qsk
{
QSK_EXPORT QSK_Q_NAMESPACE
QSK_EXPORT Q_NAMESPACE
enum Direction
{
@ -47,7 +20,7 @@ QSK_NAMESPACE( Qsk )
TopToBottom,
BottomToTop
};
QSK_ENUM( Direction )
Q_ENUM_NS( Direction )
enum Position
{
@ -56,7 +29,7 @@ QSK_NAMESPACE( Qsk )
Right,
Bottom
};
QSK_ENUM( Position )
Q_ENUM_NS( Position )
enum TextStyle
{
@ -65,11 +38,7 @@ QSK_NAMESPACE( Qsk )
Raised,
Sunken
};
QSK_ENUM( TextStyle )
Q_ENUM_NS( TextStyle )
}
#undef QSK_NAMESPACE
#undef QSK_ENUM
#undef QSK_Q_NAMESPACE
#endif

View File

@ -162,7 +162,7 @@ void CounterHook::addObject( QObject* object )
{
const bool isItem = qskIsItem( object );
for ( auto counterData : qskAsConst( m_counterDataSet ) )
for ( auto counterData : qAsConst( m_counterDataSet ) )
{
counterData->counter[ QskObjectCounter::Objects ].increment();
@ -182,7 +182,7 @@ void CounterHook::removeObject( QObject* object )
{
const bool isItem = qskIsItem( object );
for ( auto counterData : qskAsConst( m_counterDataSet ) )
for ( auto counterData : qAsConst( m_counterDataSet ) )
{
counterData->counter[ QskObjectCounter::Objects ].decrement();

View File

@ -5,14 +5,6 @@
QSK_QT_PRIVATE_BEGIN
#include <private/qguiapplication_p.h>
#if QT_VERSION < QT_VERSION_CHECK( 5, 8, 0 )
#ifndef foreach
// qhighdpiscaling_p.h needs it
#define foreach Q_FOREACH
#endif
#endif
#include <private/qhighdpiscaling_p.h>
QSK_QT_PRIVATE_END

View File

@ -758,55 +758,6 @@ bool QskControl::event( QEvent* event )
bool QskControl::childMouseEventFilter( QQuickItem* item, QEvent* event )
{
#if QT_VERSION < QT_VERSION_CHECK( 5, 10, 0 )
if ( event->type() == QEvent::MouseButtonPress )
{
auto me = static_cast< QMouseEvent* >( event );
if ( me->source() == Qt::MouseEventSynthesizedByQt )
{
/*
Unhandled touch events result in creating synthetic
mouse events. For all versions < 5.10 those events are
passed through childMouseEventFilter without doing the
extra checks, that are done for real mouse events.
Furthermore the coordinates are relative
to this - not to item.
To avoid having a different behavior between using
mouse and touch, we do those checks here.
*/
auto itm = item;
auto pos = item->mapFromScene( me->windowPos() );
for ( itm = item; itm != this; itm = itm->parentItem() )
{
if ( itm->acceptedMouseButtons() & me->button() )
{
if ( itm->contains( pos ) )
break;
}
pos += QPointF( itm->x(), itm->y() );
}
if ( itm != item )
{
if ( itm == this )
return false;
QScopedPointer< QMouseEvent > clonedEvent(
QQuickWindowPrivate::cloneMouseEvent( me, &pos ) );
return d_func()->maybeGesture( itm, clonedEvent.data() );
}
}
}
#endif
return d_func()->maybeGesture( item, event );
}

View File

@ -105,10 +105,8 @@ qreal qskWheelIncrement( const QWheelEvent* event )
auto angleDelta = event->angleDelta();
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
if ( event->inverted() )
angleDelta.setY( -angleDelta.y() );
#endif
const qreal delta = angleDelta.y() ? angleDelta.y() : angleDelta.x();
return delta / QWheelEvent::DefaultDeltasPerStep;

View File

@ -49,7 +49,7 @@ class QskFocusIndicator::PrivateData
public:
void resetConnections()
{
for ( const auto& connection : qskAsConst( connections ) )
for ( const auto& connection : qAsConst( connections ) )
QObject::disconnect( connection );
connections.clear();

View File

@ -130,7 +130,7 @@ namespace
{
Timer* timer = nullptr;
for ( auto t : qskAsConst( m_table ) )
for ( auto t : qAsConst( m_table ) )
{
if ( t->recognizer() == nullptr ||
t->recognizer() == recognizer )
@ -151,7 +151,7 @@ namespace
void stopTimer( const QskGestureRecognizer* recognizer )
{
for ( auto timer : qskAsConst( m_table ) )
for ( auto timer : qAsConst( m_table ) )
{
if ( timer->recognizer() == recognizer )
{

View File

@ -74,7 +74,6 @@ class QskInputGrabber::PrivateData final : public QQuickItemChangeListener
}
private:
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
void itemGeometryChanged( QQuickItem* item,
QQuickGeometryChange change, const QRectF& ) override
{
@ -88,21 +87,6 @@ class QskInputGrabber::PrivateData final : public QQuickItemChangeListener
if ( doUpdate )
m_grabber->updateGeometry();
}
#else
void itemGeometryChanged(
QQuickItem* item, const QRectF& newRect, const QRectF& oldRect ) override
{
bool doUpdate = false;
if ( item == itemAbove )
doUpdate = newRect.topLeft() != oldRect.topLeft();
else
doUpdate = newRect.size() != oldRect.size();
if ( doUpdate )
m_grabber->updateGeometry();
}
#endif
void itemParentChanged( QQuickItem* item, QQuickItem* parentItem ) override
{
@ -125,9 +109,7 @@ QskInputGrabber::QskInputGrabber( QQuickItem* parent )
, m_data( new PrivateData( this ) )
{
setAcceptedMouseButtons( Qt::AllButtons );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
setAcceptTouchEvents( true );
#endif
setAcceptHoverEvents( true );
setTransparentForPositioner( true );

View File

@ -323,10 +323,7 @@ QPointF QskListView::scrollOffset( const QWheelEvent* event ) const
const auto viewHeight = viewContentsRect().height();
const qreal rowHeight = this->rowHeight();
int numLines = 3;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
numLines = QGuiApplication::styleHints()->wheelScrollLines();
#endif
const int numLines = QGuiApplication::styleHints()->wheelScrollLines();
qreal dy = numLines * rowHeight;
if ( event->modifiers() & ( Qt::ControlModifier | Qt::ShiftModifier ) )

View File

@ -58,19 +58,7 @@ bool qskIsAncestorOf( const QQuickItem* item, const QQuickItem* child )
if ( item == nullptr || child == nullptr )
return false;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
return item->isAncestorOf( child );
#else
while ( child )
{
if ( child == item )
return true;
child = child->parentItem();
}
return false;
#endif
}
bool qskIsVisibleToParent( const QQuickItem* item )
@ -645,7 +633,7 @@ void qskItemUpdateRecursive( QQuickItem* item )
qskItemUpdateRecursive( child );
}
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) && QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
static const QQuickPointerTouchEvent* qskPointerPressEvent( const QQuickWindowPrivate* wd )
{
@ -682,7 +670,7 @@ bool qskGrabMouse( QQuickItem* item )
item->setKeepMouseGrab( true );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 ) && QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
auto wd = QQuickWindowPrivate::get( item->window() );
if ( wd->touchMouseDevice == nullptr )

View File

@ -157,12 +157,6 @@ QskQuickItem::QskQuickItem( QskQuickItemPrivate& dd, QQuickItem* parent )
{
setFlag( QQuickItem::ItemHasContents, true );
#if QT_VERSION < QT_VERSION_CHECK( 5, 10, 0 )
// since Qt 5.10 we have QQuickItem::ItemEnabledHasChanged
connect( this, &QQuickItem::enabledChanged,
this, &QskQuickItem::sendEnabledChangeEvent );
#endif
if ( dd.updateFlags & QskQuickItem::DeferredUpdate )
qskFilterWindow( window() );
@ -180,11 +174,6 @@ QskQuickItem::~QskQuickItem()
if ( qskRegistry )
qskRegistry->remove( this );
#if QT_VERSION < QT_VERSION_CHECK( 5, 10, 0 )
disconnect( this, &QQuickItem::enabledChanged,
this, &QskQuickItem::sendEnabledChangeEvent );
#endif
}
const char* QskQuickItem::className() const
@ -597,11 +586,6 @@ void QskQuickItem::resetImplicitSize()
}
}
void QskQuickItem::sendEnabledChangeEvent()
{
qskSendEventTo( this, QEvent::EnabledChange );
}
bool QskQuickItem::event( QEvent* event )
{
const int eventType = event->type();
@ -796,7 +780,7 @@ void QskQuickItem::itemChange( QQuickItem::ItemChange change,
#if QT_VERSION >= QT_VERSION_CHECK( 5, 10, 0 )
case QQuickItem::ItemEnabledHasChanged:
{
sendEnabledChangeEvent();
qskSendEventTo( this, QEvent::EnabledChange );
break;
}
#endif

View File

@ -63,9 +63,6 @@ class QSK_EXPORT QskQuickItem : public QQuickItem
bool hasChildItems() const;
QRectF rect() const;
#if QT_VERSION < QT_VERSION_CHECK( 5, 10, 0 )
QSizeF size() const;
#endif
QSizeF implicitSize() const;
void setGeometry( qreal x, qreal y, qreal width, qreal height );
@ -168,7 +165,6 @@ class QSK_EXPORT QskQuickItem : public QQuickItem
void childrenRect() = delete;
void applyUpdateFlag( UpdateFlag, bool on );
void sendEnabledChangeEvent();
QSGNode* updatePaintNode( QSGNode*, UpdatePaintNodeData* ) override final;
virtual QSGNode* updateItemPaintNode( QSGNode* );
@ -204,15 +200,6 @@ inline void QskQuickItem::setSize( qreal width, qreal height )
QQuickItem::setSize( QSizeF( width, height ) );
}
#if QT_VERSION < QT_VERSION_CHECK( 5, 10, 0 )
inline QSizeF QskQuickItem::size() const
{
return QSizeF( width(), height() );
}
#endif
inline QSizeF QskQuickItem::implicitSize() const
{
return QSizeF( implicitWidth(), implicitHeight() );

View File

@ -241,7 +241,6 @@ namespace
void itemChange( ItemChange, const ItemChangeData& ) override;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
void itemGeometryChanged( QQuickItem*,
QQuickGeometryChange change, const QRectF& ) override
{
@ -249,15 +248,6 @@ namespace
scrolledItemGeometryChange();
}
#else
void itemGeometryChanged( QQuickItem*,
const QRectF& newRect, const QRectF& oldRect ) override
{
if ( oldRect.size() != newRect.size() )
scrolledItemGeometryChange();
}
#endif
void updateNode( QSGNode* ) override;
private:

View File

@ -173,7 +173,7 @@ void QskShortcutHandler::remove( int id )
Finally let's check if we can disconnect
from the destroyed signals
*/
for ( const auto& entry : qskAsConst( m_invokeDataMap ) )
for ( const auto& entry : qAsConst( m_invokeDataMap ) )
{
if ( item == nullptr && receiver == nullptr )
break;
@ -276,7 +276,7 @@ bool QskShortcutHandler::invoke( QQuickItem* item, const QKeySequence& sequence
{
bool found = false;
for ( const auto& entry : qskAsConst( m_invokeDataMap ) )
for ( const auto& entry : qAsConst( m_invokeDataMap ) )
{
auto& data = entry.second;

View File

@ -341,7 +341,7 @@ class QskSkinManager::PrivateData
{
if ( !pluginsRegistered )
{
for ( const auto& path : qskAsConst( pluginPaths ) )
for ( const auto& path : qAsConst( pluginPaths ) )
registerPlugins( path + QStringLiteral( "/skins" ) );
pluginsRegistered = true;

View File

@ -35,18 +35,7 @@
static inline bool qskIsControl( const QskSkinnable* skinnable )
{
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
return skinnable->metaObject()->inherits( &QskControl::staticMetaObject );
#else
for ( auto mo = skinnable->metaObject();
mo != nullptr; mo = mo->superClass() )
{
if ( mo == &QskControl::staticMetaObject )
return true;
}
return false;
#endif
}
static inline QVariant qskTypedNullValue( const QVariant& value )

View File

@ -36,10 +36,8 @@ static inline void qskBindSignals(
QObject::connect( wrappedInput, &QQuickTextInput::displayTextChanged,
input, [ input ] { Q_EMIT input->displayTextChanged( input->displayText() ); } );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
QObject::connect( wrappedInput, &QQuickTextInput::textEdited,
input, [ input ] { Q_EMIT input->textEdited( input->text() ); } );
#endif
QObject::connect( wrappedInput, &QQuickTextInput::validatorChanged,
input, &QskTextInput::validatorChanged );
@ -50,10 +48,8 @@ static inline void qskBindSignals(
QObject::connect( wrappedInput, &QQuickTextInput::readOnlyChanged,
input, [ input ] { qskPropagateReadOnly( input ); } );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
QObject::connect( wrappedInput, &QQuickTextInput::overwriteModeChanged,
input, &QskTextInput::overwriteModeChanged );
#endif
QObject::connect( wrappedInput, &QQuickTextInput::maximumLengthChanged,
input, &QskTextInput::maximumLengthChanged );
@ -219,9 +215,7 @@ namespace
return;
setCursorVisible( on );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
d->setBlinkingCursorEnabled( on );
#endif
if ( !on )
{
@ -561,11 +555,7 @@ void QskTextInput::setActivationModes( ActivationModes modes )
static inline void qskUpdateInputMethodFont( const QskTextInput* input )
{
auto queries = Qt::ImCursorRectangle | Qt::ImFont;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
queries |= Qt::ImAnchorRectangle;
#endif
const auto queries = Qt::ImCursorRectangle | Qt::ImFont | Qt::ImAnchorRectangle;
qskUpdateInputMethod( input, queries );
}
@ -785,8 +775,6 @@ QString QskTextInput::preeditText() const
return d->m_textLayout.preeditAreaText();
}
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
bool QskTextInput::overwriteMode() const
{
return m_data->textInput->overwriteMode();
@ -797,8 +785,6 @@ void QskTextInput::setOverwriteMode( bool overwrite )
m_data->textInput->setOverwriteMode( overwrite );
}
#endif
bool QskTextInput::hasAcceptableInput() const
{
return m_data->textInput->hasAcceptableInput();
@ -832,9 +818,7 @@ QVariant QskTextInput::inputMethodQuery(
{
return locale();
}
#if QT_VERSION >= QT_VERSION_CHECK( 5, 7, 0 )
case Qt::ImInputItemClipRectangle:
#endif
case Qt::ImCursorRectangle:
{
QVariant v = m_data->textInput->inputMethodQuery( query, argument );

View File

@ -137,10 +137,8 @@ class QSK_EXPORT QskTextInput : public QskControl
QString displayText() const;
QString preeditText() const;
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
bool overwriteMode() const;
void setOverwriteMode( bool );
#endif
bool hasAcceptableInput() const;
bool fixup();
@ -170,20 +168,14 @@ class QSK_EXPORT QskTextInput : public QskControl
void textChanged( const QString& );
void displayTextChanged( const QString& );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 9, 0 )
void textEdited( const QString& );
#endif
void descriptionChanged( const QString& );
void textOptionsChanged();
void fontRoleChanged();
void alignmentChanged();
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
void overwriteModeChanged( bool );
#endif
void maximumLengthChanged( int );
void echoModeChanged( EchoMode );

View File

@ -201,37 +201,8 @@ QskWindow::QskWindow( QQuickRenderControl* renderControl, QWindow* parent )
QskWindow::~QskWindow()
{
#if QT_VERSION < QT_VERSION_CHECK( 5, 12, 0 )
// When being used from Qml the item destruction would run in the most
// unefficient way, leading to lots of QQuickItem::ItemChildRemovedChange
// depending operations.
QVector< QPointer< QQuickItem > > items;
const auto children = contentItem()->childItems();
for ( auto child : children )
{
if ( child->parent() == contentItem() )
items += child;
}
for ( auto& item : qskAsConst( items ) )
delete item;
#endif
}
#if QT_VERSION < QT_VERSION_CHECK( 5, 9, 0 )
void QskWindow::setFlag(Qt::WindowType flag, bool on)
{
if( on )
setFlags( flags() | flag );
else
setFlags( flags() & ~flag );
}
#endif
void QskWindow::setScreen( const QString& name )
{
if ( !name.isEmpty() )

View File

@ -43,10 +43,6 @@ class QSK_EXPORT QskWindow : public QQuickWindow
using Inherited::setScreen;
void setScreen( const QString& );
#if QT_VERSION < QT_VERSION_CHECK( 5, 9, 0 )
void setFlag( Qt::WindowType, bool on = true );
#endif
bool deleteOnClose() const;
void setDeleteOnClose( bool );

View File

@ -131,7 +131,7 @@ QskDialogButtonBox::~QskDialogButtonBox()
{
for ( int i = 0; i < QskDialog::NActionRoles; i++ )
{
for ( auto button : qskAsConst( m_data->buttons[ i ] ) )
for ( auto button : qAsConst( m_data->buttons[ i ] ) )
{
/*
The destructor of QQuickItem sets the parentItem of
@ -595,14 +595,9 @@ QString QskDialogButtonBox::buttonText( QskDialog::Action action )
{
// should be redirected through the skin !
const QPlatformTheme* theme = QGuiApplicationPrivate::platformTheme();
const auto theme = QGuiApplicationPrivate::platformTheme();
QString text = theme->standardButtonText( action );
#if QT_VERSION < QT_VERSION_CHECK( 5, 7, 0 )
text.remove( '&' );
#else
text = QPlatformTheme::removeMnemonics( text );
#endif
return text;
}

View File

@ -565,7 +565,7 @@ QRectF QskGraphic::scaledBoundingRect( qreal sx, qreal sy ) const
QRectF rect = transform.mapRect( m_data->pointRect );
for ( const auto& info : qskAsConst( m_data->pathInfos ) )
for ( const auto& info : qAsConst( m_data->pathInfos ) )
rect |= info.scaledBoundingRect( sx, sy, scalePens );
return rect;
@ -678,7 +678,7 @@ void QskGraphic::render( QPainter* painter, const QRectF& rect,
const bool scalePens = !( m_data->renderHints & RenderPensUnscaled );
for ( const auto& info : qskAsConst( m_data->pathInfos ) )
for ( const auto& info : qAsConst( m_data->pathInfos ) )
{
const qreal ssx = info.scaleFactorX(
m_data->pointRect, rect, scalePens );

View File

@ -316,7 +316,7 @@ void QskStackBox::autoRemoveItem( QQuickItem* item )
void QskStackBox::clear( bool autoDelete )
{
for ( const auto item : qskAsConst( m_data->items ) )
for ( const auto item : qAsConst( m_data->items ) )
{
if( autoDelete && ( item->parent() == this ) )
delete item;

View File

@ -21,11 +21,7 @@ class QskTickmarksNodePrivate final : public QSGGeometryNodePrivate
QskTickmarksNodePrivate()
: geometry( QSGGeometry::defaultAttributes_Point2D(), 0 )
{
#if QT_VERSION >= QT_VERSION_CHECK( 5, 8, 0 )
geometry.setDrawingMode( QSGGeometry::DrawLines );
#else
geometry.setDrawingMode( GL_LINES );
#endif
geometry.setVertexDataPattern( QSGGeometry::StaticPattern );
}