code specific for Qt < 5.15 removed
This commit is contained in:
parent
f4275c5098
commit
35a0d63b5a
@ -27,7 +27,7 @@ controls is limited to the needs of the driving projects.
|
|||||||
|
|
||||||
QSkinny is supposed to run on all platforms being supported by Qt/Quick.
|
QSkinny is supposed to run on all platforms being supported by Qt/Quick.
|
||||||
But so far only Linux is actively tested.
|
But so far only Linux is actively tested.
|
||||||
It might support all versions Qt >= 5.12, but you can rely on:
|
It might support all versions Qt >= 5.15, but you can rely on:
|
||||||
|
|
||||||
- Qt 5.15
|
- Qt 5.15
|
||||||
- current long term supported ( LTS ) version of Qt
|
- current long term supported ( LTS ) version of Qt
|
||||||
|
@ -7,11 +7,6 @@
|
|||||||
#define QSK_QML_HPP
|
#define QSK_QML_HPP
|
||||||
|
|
||||||
#include <qqml.h>
|
#include <qqml.h>
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 )
|
|
||||||
#include <qqmlengine.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
|
|
||||||
#define QSK_MODULE_NAME "Skinny"
|
#define QSK_MODULE_NAME "Skinny"
|
||||||
@ -273,20 +268,8 @@ namespace QskQml
|
|||||||
{
|
{
|
||||||
const auto name = classNameQml( T::staticMetaObject );
|
const auto name = classNameQml( T::staticMetaObject );
|
||||||
|
|
||||||
#if QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 )
|
|
||||||
auto callback =
|
|
||||||
[]( QQmlEngine*, QJSEngine* )
|
|
||||||
{
|
|
||||||
QQmlEngine::setObjectOwnership( singleton, QQmlEngine::CppOwnership );
|
|
||||||
return singleton;
|
|
||||||
};
|
|
||||||
|
|
||||||
return qmlRegisterSingletonType< T >( QSK_MODULE_NAME,
|
|
||||||
QSK_VERSION_MAJOR, QSK_VERSION_MINOR, name, callback );
|
|
||||||
#else
|
|
||||||
return qmlRegisterSingletonInstance( QSK_MODULE_NAME,
|
return qmlRegisterSingletonInstance( QSK_MODULE_NAME,
|
||||||
QSK_VERSION_MAJOR, QSK_VERSION_MINOR, name, singleton );
|
QSK_VERSION_MAJOR, QSK_VERSION_MINOR, name, singleton );
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,11 +55,7 @@ int QskMetaFunction::FunctionCall::typeInfo() const
|
|||||||
int QskMetaFunction::FunctionCall::refCount() const
|
int QskMetaFunction::FunctionCall::refCount() const
|
||||||
{
|
{
|
||||||
auto that = const_cast< FunctionCall* >( this );
|
auto that = const_cast< FunctionCall* >( this );
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
|
|
||||||
return reinterpret_cast< SlotObject* >( that )->ref.loadRelaxed();
|
return reinterpret_cast< SlotObject* >( that )->ref.loadRelaxed();
|
||||||
#else
|
|
||||||
return reinterpret_cast< SlotObject* >( that )->ref.load();
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QskMetaFunction::QskMetaFunction()
|
QskMetaFunction::QskMetaFunction()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user