mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-22 00:06:12 -05:00
Fix OAuth2 configuration <--> JSON serialization/deserialization on QT6
This commit is contained in:
parent
5665665712
commit
d42bb6101e
@ -36,6 +36,7 @@ PyQgsStyleStorageMssql
|
||||
# To be fixed
|
||||
PyQgsAnnotation
|
||||
PyQgsAuthenticationSystem
|
||||
PyQgsAuthManagerOAuth2OWSTest
|
||||
PyQgsBlockingProcess
|
||||
PyQgsCodeEditor
|
||||
PyQgsDelimitedTextProvider
|
||||
|
@ -114,7 +114,6 @@ cmake \
|
||||
-DWITH_QTSERIALPORT=ON \
|
||||
-DWITH_QTWEBKIT=${WITH_QT5} \
|
||||
-DWITH_QTWEBENGINE=${WITH_QTWEBENGINE} \
|
||||
-DWITH_OAUTH2_PLUGIN=${WITH_QT5} \
|
||||
-DWITH_PDF4QT=${WITH_PDF4QT} \
|
||||
-DORACLE_INCLUDEDIR=/instantclient_19_9/sdk/include/ \
|
||||
-DORACLE_LIBDIR=/instantclient_19_9/ \
|
||||
|
18
external/qjsonwrapper/Json.cpp
vendored
18
external/qjsonwrapper/Json.cpp
vendored
@ -43,7 +43,14 @@ namespace QJsonWrapper
|
||||
QMetaProperty metaproperty = metaObject->property( i );
|
||||
if ( metaproperty.isReadable() )
|
||||
{
|
||||
map[ QLatin1String( metaproperty.name() ) ] = object->property( metaproperty.name() );
|
||||
QVariant val = object->property( metaproperty.name() );
|
||||
#if QT_VERSION >= QT_VERSION_CHECK( 6, 0, 0 )
|
||||
if ( ( val.metaType().flags() & QMetaType::IsEnumeration ) )
|
||||
{
|
||||
val.convert( QMetaType::Int );
|
||||
}
|
||||
#endif
|
||||
map[ QLatin1String( metaproperty.name() ) ] = val;
|
||||
}
|
||||
}
|
||||
return map;
|
||||
@ -60,9 +67,14 @@ namespace QJsonWrapper
|
||||
if ( property.isValid() )
|
||||
{
|
||||
QVariant value = iter.value();
|
||||
if ( value.canConvert( property.type() ) )
|
||||
#if QT_VERSION < QT_VERSION_CHECK( 6, 0, 0 )
|
||||
const QVariant::Type propertyType = property.type();
|
||||
#else
|
||||
const QMetaType propertyType = property.metaType();
|
||||
#endif
|
||||
if ( value.canConvert( propertyType ) )
|
||||
{
|
||||
value.convert( property.type() );
|
||||
value.convert( propertyType );
|
||||
object->setProperty( iter.key().toLatin1(), value );
|
||||
}
|
||||
else if ( QString( QLatin1String( "QVariant" ) ).compare( QLatin1String( property.typeName() ) ) == 0 )
|
||||
|
Loading…
x
Reference in New Issue
Block a user