Qt 6.3 ( beta1 ) incompatibilities fixed

This commit is contained in:
Uwe Rathmann 2022-02-06 14:32:26 +01:00
parent 6295b137f3
commit 96e210ce3c
5 changed files with 28 additions and 19 deletions

View File

@ -14,6 +14,10 @@ QSK_QT_PRIVATE_BEGIN
#include <private/qquickwindow_p.h>
QSK_QT_PRIVATE_END
#if QT_VERSION >= QT_VERSION_CHECK( 6, 3, 0 )
#include <private/qeventpoint_p.h>
#endif
static QMouseEvent* qskClonedMouseEventAt(
const QMouseEvent* event, QPointF* localPos )
{
@ -25,13 +29,23 @@ static QMouseEvent* qskClonedMouseEventAt(
#else
auto clonedEvent = event->clone();
auto& point = QMutableEventPoint::from( clonedEvent->point( 0 ) );
point.detach();
point.setTimestamp( event->timestamp() );
if ( localPos )
{
#if QT_VERSION < QT_VERSION_CHECK( 6, 3, 0 )
auto& point = QMutableEventPoint::from( clonedEvent->point( 0 ) );
point.detach();
point.setPosition( *localPos );
#else
auto& point = clonedEvent->point( 0 );
QMutableEventPoint::detach( point );
QMutableEventPoint::setPosition( point, *localPos );
#endif
}
#endif
Q_ASSERT( event->timestamp() == clonedEvent->timestamp() );
return clonedEvent;
}

View File

@ -25,8 +25,6 @@ namespace
class Option
{
public:
Option() = default; // some compilers need this
Option( const QUrl& graphicSource, const QString& text )
: graphicSource( graphicSource )
, text( text )
@ -35,8 +33,8 @@ namespace
graphic = Qsk::loadGraphic( graphicSource );
}
const QUrl graphicSource;
const QString text;
QUrl graphicSource;
QString text;
QskGraphic graphic;
};

View File

@ -240,12 +240,11 @@ void QskQuickItemPrivate::cleanupNodes()
}
}
QSGTransformNode* QskQuickItemPrivate::createTransformNode()
{
return Inherited::createTransformNode();
}
/*
Can we do something useful with overloading:
void QskQuickItemPrivate::transformChanged()
{
Inherited::transformChanged();
}
- QQuickItemPrivate::createTransformNode
- QQuickItemPrivate::transformChanged
TODO ...
*/

View File

@ -29,8 +29,6 @@ class QskQuickItemPrivate : public QQuickItemPrivate
virtual void implicitSizeChanged();
private:
QSGTransformNode* createTransformNode() override;
void transformChanged() override;
void cleanupNodes();
void mirrorChange() override;

View File

@ -177,7 +177,7 @@ static inline void qskExecCommand(
if ( data->flags & QPaintEngine::DirtyHints )
{
#if 1
auto state = QPainterPrivate::get( painter )->state;
auto& state = QPainterPrivate::get( painter )->state;
state->renderHints = data->renderHints;
// to trigger internal updates we have to set at least one flag