Merge branch 'master' into features/effectnode

This commit is contained in:
Uwe Rathmann 2023-12-27 09:02:01 +01:00
commit a79650a76e
3 changed files with 24 additions and 12 deletions

View File

@ -104,7 +104,8 @@ jobs:
cc: "gcc", cc: "gcc",
cxx: "g++", cxx: "g++",
archiver: "7z a", archiver: "7z a",
generators: "Ninja Multi-Config", # generators: "Ninja Multi-Config",
generators: "Ninja",
env: { DISPLAY: ":1" }, env: { DISPLAY: ":1" },
cmake: cmake:
{ {

View File

@ -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 );

View File

@ -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 );
} }