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

View File

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

View File

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

View File

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

View File

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