not using QMetaObject::newInstance anymore, incompatibilities with Qt >=
12.4 fixed
This commit is contained in:
parent
0c87cb2a76
commit
c139bf2f99
@ -32,8 +32,6 @@ It might support all versions Qt >= 5.6, but you can rely on:
|
|||||||
- current long term supported ( LTS ) version of Qt
|
- current long term supported ( LTS ) version of Qt
|
||||||
- current version of Qt
|
- current version of Qt
|
||||||
|
|
||||||
( Unfortunately Qt 12.4 and Qt 13.0 are broken - see https://bugreports.qt.io/browse/QTBUG-76663. Until this has been fixed you have to stay with Qt 12.3 )
|
|
||||||
|
|
||||||
If you want to know more about QSkinny - or even like to give it a specific
|
If you want to know more about QSkinny - or even like to give it a specific
|
||||||
direction - please contact support@qskinny.org.
|
direction - please contact support@qskinny.org.
|
||||||
|
|
||||||
|
@ -74,6 +74,22 @@ QSK_QT_PRIVATE_END
|
|||||||
#include "QskStatusIndicator.h"
|
#include "QskStatusIndicator.h"
|
||||||
#include "QskStatusIndicatorSkinlet.h"
|
#include "QskStatusIndicatorSkinlet.h"
|
||||||
|
|
||||||
|
static inline QskSkinlet *qskNewSkinlet( const QMetaObject* metaObject, QskSkin* skin )
|
||||||
|
{
|
||||||
|
const QByteArray signature = metaObject->className() + QByteArrayLiteral( "(QskSkin*)" );
|
||||||
|
|
||||||
|
QskSkinlet *skinlet = nullptr;
|
||||||
|
|
||||||
|
const int index = metaObject->indexOfConstructor( signature.constData() );
|
||||||
|
if ( index >= 0 )
|
||||||
|
{
|
||||||
|
void *param[] = { &skinlet, &skin };
|
||||||
|
metaObject->static_metacall( QMetaObject::CreateInstance, index, param );
|
||||||
|
}
|
||||||
|
|
||||||
|
return skinlet;
|
||||||
|
}
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
class SkinletData
|
class SkinletData
|
||||||
@ -434,10 +450,7 @@ QskSkinlet* QskSkin::skinlet( const QskSkinnable* skinnable )
|
|||||||
auto& entry = it->second;
|
auto& entry = it->second;
|
||||||
|
|
||||||
if ( entry.skinlet == nullptr )
|
if ( entry.skinlet == nullptr )
|
||||||
{
|
entry.skinlet = qskNewSkinlet( entry.metaObject, this );
|
||||||
entry.skinlet = reinterpret_cast< QskSkinlet* >(
|
|
||||||
entry.metaObject->newInstance( Q_ARG( QskSkin*, this ) ) );
|
|
||||||
}
|
|
||||||
|
|
||||||
return entry.skinlet;
|
return entry.skinlet;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user