code specific for Qt < 5.15 removed

This commit is contained in:
Uwe Rathmann 2022-12-05 07:51:41 +01:00
parent f4275c5098
commit 35a0d63b5a
3 changed files with 1 additions and 22 deletions

View File

@ -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.
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
- current long term supported ( LTS ) version of Qt

View File

@ -7,11 +7,6 @@
#define QSK_QML_HPP
#include <qqml.h>
#if QT_VERSION < QT_VERSION_CHECK( 5, 14, 0 )
#include <qqmlengine.h>
#endif
#include <ctype.h>
#define QSK_MODULE_NAME "Skinny"
@ -273,20 +268,8 @@ namespace QskQml
{
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,
QSK_VERSION_MAJOR, QSK_VERSION_MINOR, name, singleton );
#endif
}
}

View File

@ -55,11 +55,7 @@ int QskMetaFunction::FunctionCall::typeInfo() const
int QskMetaFunction::FunctionCall::refCount() const
{
auto that = const_cast< FunctionCall* >( this );
#if QT_VERSION >= QT_VERSION_CHECK( 5, 14, 0 )
return reinterpret_cast< SlotObject* >( that )->ref.loadRelaxed();
#else
return reinterpret_cast< SlotObject* >( that )->ref.load();
#endif
}
QskMetaFunction::QskMetaFunction()