avoidable private includes removed

This commit is contained in:
Uwe Rathmann 2023-04-05 09:56:28 +02:00
parent 18c16c12fe
commit 1ac6334c0e
7 changed files with 18 additions and 19 deletions

View File

@ -7,11 +7,11 @@
#include <qdebug.h>
#include <qset.h>
#include <qobject.h>
#include <qcoreapplication.h>
QSK_QT_PRIVATE_BEGIN
#include <private/qhooks_p.h>
#include <private/qobject_p.h>
#include <private/qquickitem_p.h>
QSK_QT_PRIVATE_END
#define QSK_OBJECT_INFO 0
@ -20,10 +20,19 @@ QSK_QT_PRIVATE_END
#include <qset.h>
#endif
#if QT_VERSION < QT_VERSION_CHECK( 6, 4, 0 )
QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
QSK_QT_PRIVATE_END
#endif
static inline bool qskIsItem( const QObject* object )
{
QObjectPrivate* o_p = QObjectPrivate::get( const_cast< QObject* >( object ) );
#if QT_VERSION >= QT_VERSION_CHECK( 6, 4, 0 )
return object->isQuickItemType();
#else
/*
The addObject hook is called from the constructor of QObject,
where we don't have the derived class constructed yet.
@ -31,7 +40,9 @@ static inline bool qskIsItem( const QObject* object )
RTTI being enabled. TODO ...
*/
auto o_p = QObjectPrivate::get( const_cast< QObject* >( object ) );
return dynamic_cast< QQuickItemPrivate* >( o_p ) != nullptr;
#endif
}
namespace

View File

@ -26,7 +26,9 @@ QSK_QT_PRIVATE_BEGIN
#endif
#endif
#if defined( QT_DEBUG )
#include <private/qquickpositioners_p.h>
#endif
QSK_QT_PRIVATE_END

View File

@ -11,10 +11,8 @@
#include "QskSGNode.h"
QSK_QT_PRIVATE_BEGIN
#include <private/qquickclipnode_p.h>
#include <private/qquickitem_p.h>
#include <private/qquickitemchangelistener_p.h>
#include <private/qquickwindow_p.h>
QSK_QT_PRIVATE_END
static inline bool qskNeedsScrollBars(

View File

@ -32,13 +32,9 @@
#include <qquickwindow.h>
#include <qsgsimplerectnode.h>
QSK_QT_PRIVATE_BEGIN
#include <private/qquickitem_p.h>
QSK_QT_PRIVATE_END
static inline QRectF qskSceneAlignedRect( const QQuickItem* item, const QRectF& rect )
{
const auto transform = QQuickItemPrivate::get( item )->itemToWindowTransform();
const auto transform = item->itemTransform( nullptr, nullptr );
if ( transform.type() > QTransform::TxTranslate )
return rect;

View File

@ -19,7 +19,6 @@
QSK_QT_PRIVATE_BEGIN
#include <private/qpainter_p.h>
#include <private/qpaintengineex_p.h>
QSK_QT_PRIVATE_END
static inline qreal qskDevicePixelRatio()

View File

@ -11,11 +11,6 @@
#include <qsgtexture.h>
QSK_QT_PRIVATE_BEGIN
#include <private/qrhi_p.h>
#include <private/qdrawhelper_p.h>
QSK_QT_PRIVATE_END
#include <cmath>
// RHI shaders are supported by Qt 5.15 and Qt 6.x

View File

@ -12,8 +12,6 @@
#include <qsgnode.h>
QSK_QT_PRIVATE_BEGIN
#include <private/qsgadaptationlayer_p.h>
#include <private/qsgcontext_p.h>
#include <private/qquickitem_p.h>
QSK_QT_PRIVATE_END