Skip to content

Commit

Permalink
QskSceneTexture disabled for Qt5 ( not done yet )
Browse files Browse the repository at this point in the history
  • Loading branch information
uwerat committed Dec 17, 2023
1 parent fb3d094 commit cbd4fa9
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ list(APPEND HEADERS
nodes/QskPaintedNode.h
nodes/QskPlainTextRenderer.h
nodes/QskRichTextRenderer.h
nodes/QskSceneTexture.h
nodes/QskSGNode.h
nodes/QskStrokeNode.h
nodes/QskStippledLineRenderer.h
Expand Down Expand Up @@ -158,7 +157,6 @@ list(APPEND SOURCES
nodes/QskPlainTextRenderer.cpp
nodes/QskRectangleNode.cpp
nodes/QskRichTextRenderer.cpp
nodes/QskSceneTexture.cpp
nodes/QskSGNode.cpp
nodes/QskStrokeNode.cpp
nodes/QskStippledLineRenderer.cpp
Expand All @@ -171,6 +169,11 @@ list(APPEND SOURCES
nodes/QskVertex.cpp
)

if (QT_VERSION_MAJOR VERSION_GREATER 5)
list(APPEND HEADERS nodes/QskSceneTexture.h)
list(APPEND SOURCES nodes/QskSceneTexture.cpp)
endif()

qt_add_resources(SOURCES nodes/shaders.qrc)

list(APPEND HEADERS
Expand Down
4 changes: 2 additions & 2 deletions src/controls/QskQuick.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -399,9 +399,9 @@ const QSGRootNode* qskScenegraphAnchorNode( const QQuickItem* item )

const QSGRootNode* qskScenegraphAnchorNode( const QQuickWindow* window )
{
if ( window )
if ( auto w = const_cast< QQuickWindow* >( window ) )
{
if ( auto renderer = QQuickWindowPrivate::get( window )->renderer )
if ( auto renderer = QQuickWindowPrivate::get( w )->renderer )
return renderer->rootNode();
}

Expand Down
2 changes: 2 additions & 0 deletions src/nodes/QskSceneTexture.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#include "QskSceneTexture.h"
#include "QskTreeNode.h"

#include <qmath.h>

QSK_QT_PRIVATE_BEGIN
#include <private/qquickwindow_p.h>
#include <private/qsgbatchrenderer_p.h>
Expand Down

0 comments on commit cbd4fa9

Please sign in to comment.