Qt 6.7 incompatibilities fixed
This commit is contained in:
parent
69090a6079
commit
67f0df44af
@ -47,11 +47,8 @@ class QskMetaFunction::FunctionCall : public QtPrivate::QSlotObjectBase
|
|||||||
|
|
||||||
namespace QskMetaFunctionCall
|
namespace QskMetaFunctionCall
|
||||||
{
|
{
|
||||||
using FunctionCall = QskMetaFunction::FunctionCall;
|
|
||||||
using namespace QtPrivate;
|
|
||||||
|
|
||||||
template< typename Function, typename Args, typename R >
|
template< typename Function, typename Args, typename R >
|
||||||
class StaticFunctionCall : public FunctionCall
|
class StaticFunctionCall : public QskMetaFunction::FunctionCall
|
||||||
{
|
{
|
||||||
using MetaCall = StaticFunctionCall< Function, Args, R >;
|
using MetaCall = StaticFunctionCall< Function, Args, R >;
|
||||||
|
|
||||||
@ -74,7 +71,7 @@ namespace QskMetaFunctionCall
|
|||||||
}
|
}
|
||||||
case Call:
|
case Call:
|
||||||
{
|
{
|
||||||
typedef FunctionPointer< Function > FuncType;
|
using FuncType = QtPrivate::FunctionPointer< Function >;
|
||||||
|
|
||||||
FuncType::template call< Args, R >(
|
FuncType::template call< Args, R >(
|
||||||
static_cast< MetaCall* >( functionCall )->m_function, object, args );
|
static_cast< MetaCall* >( functionCall )->m_function, object, args );
|
||||||
@ -100,7 +97,7 @@ namespace QskMetaFunctionCall
|
|||||||
};
|
};
|
||||||
|
|
||||||
template< typename Function, typename Args, typename R >
|
template< typename Function, typename Args, typename R >
|
||||||
class MemberFunctionCall : public FunctionCall
|
class MemberFunctionCall : public QskMetaFunction::FunctionCall
|
||||||
{
|
{
|
||||||
using MetaCall = MemberFunctionCall< Function, Args, R >;
|
using MetaCall = MemberFunctionCall< Function, Args, R >;
|
||||||
|
|
||||||
@ -123,7 +120,7 @@ namespace QskMetaFunctionCall
|
|||||||
}
|
}
|
||||||
case Call:
|
case Call:
|
||||||
{
|
{
|
||||||
typedef FunctionPointer< Function > FuncType;
|
using FuncType = QtPrivate::FunctionPointer< Function >;
|
||||||
|
|
||||||
FuncType::template call< Args, R >(
|
FuncType::template call< Args, R >(
|
||||||
static_cast< MetaCall* >( functionCall )->m_function,
|
static_cast< MetaCall* >( functionCall )->m_function,
|
||||||
@ -144,7 +141,7 @@ namespace QskMetaFunctionCall
|
|||||||
};
|
};
|
||||||
|
|
||||||
template< typename Function, int N, typename Args, typename R >
|
template< typename Function, int N, typename Args, typename R >
|
||||||
class FunctorFunctionCall : public FunctionCall
|
class FunctorFunctionCall : public QskMetaFunction::FunctionCall
|
||||||
{
|
{
|
||||||
using MetaCall = FunctorFunctionCall< Function, N, Args, R >;
|
using MetaCall = FunctorFunctionCall< Function, N, Args, R >;
|
||||||
|
|
||||||
@ -167,7 +164,11 @@ namespace QskMetaFunctionCall
|
|||||||
}
|
}
|
||||||
case Call:
|
case Call:
|
||||||
{
|
{
|
||||||
typedef Functor< Function, N > FuncType;
|
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||||
|
using FuncType = QtPrivate::Functor< Function, N >;
|
||||||
|
#else
|
||||||
|
using FuncType = QtPrivate::Callable< Function, Args >;
|
||||||
|
#endif
|
||||||
|
|
||||||
FuncType::template call< Args, R >(
|
FuncType::template call< Args, R >(
|
||||||
static_cast< MetaCall* >( functionCall )->m_function, object, args );
|
static_cast< MetaCall* >( functionCall )->m_function, object, args );
|
||||||
|
@ -127,16 +127,26 @@ static void qskRenderText(
|
|||||||
if ( glyphNode == nullptr )
|
if ( glyphNode == nullptr )
|
||||||
{
|
{
|
||||||
const bool preferNativeGlyphNode = false; // QskTextOptions?
|
const bool preferNativeGlyphNode = false; // QskTextOptions?
|
||||||
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
|
||||||
constexpr int renderQuality = -1; // QQuickText::DefaultRenderTypeQuality
|
constexpr int renderQuality = -1; // QQuickText::DefaultRenderTypeQuality
|
||||||
|
|
||||||
|
#if QT_VERSION >= QT_VERSION_CHECK( 6, 7, 0 )
|
||||||
|
const auto renderType = preferNativeGlyphNode
|
||||||
|
? QSGTextNode::QtRendering : QSGTextNode::NativeRendering;
|
||||||
|
glyphNode = sgContext->createGlyphNode(
|
||||||
|
renderContext, renderType, renderQuality );
|
||||||
|
#elif QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
||||||
glyphNode = sgContext->createGlyphNode(
|
glyphNode = sgContext->createGlyphNode(
|
||||||
renderContext, preferNativeGlyphNode, renderQuality );
|
renderContext, preferNativeGlyphNode, renderQuality );
|
||||||
#else
|
#else
|
||||||
|
Q_UNUSED( renderQuality );
|
||||||
glyphNode = sgContext->createGlyphNode(
|
glyphNode = sgContext->createGlyphNode(
|
||||||
renderContext, preferNativeGlyphNode );
|
renderContext, preferNativeGlyphNode );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if QT_VERSION < QT_VERSION_CHECK( 6, 7, 0 )
|
||||||
glyphNode->setOwnerElement( item );
|
glyphNode->setOwnerElement( item );
|
||||||
|
#endif
|
||||||
|
|
||||||
glyphNode->setFlags( QSGNode::OwnedByParent | GlyphFlag );
|
glyphNode->setFlags( QSGNode::OwnedByParent | GlyphFlag );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user