8 Commits

Author SHA1 Message Date
Nyall Dawson
ed43556c93 Don't show misleading null in variant warnings when converting objects
for Python

This isn't something we are doing wrong, it's how sip handles these
objects.
2024-02-23 05:41:22 +10:00
Nyall Dawson
fc3a60abf7 Fix PyQT6 null/None QVariant handling
Here we have to break with our previous approach of treating
null variants (NULL in Python) different to invalid qvariants (None in
Python)

There's simply NO way to construct null variants in PyQt6 -- they
are ALWAYS mapped across to Py_None.

This isn't as big a deal as it sounds, we already made the decision
in c++ code to move to invalid variants in favour of null variants.

Note that we STILL need the custom sip code here and can't rely
on base PyQt6 null variant conversion, as that relies on
QVariant::isNull when we must use QgsVariantUtils::isNull so
that the underlying type is correctly checked for null values
on Qt 6 builds.
2024-01-25 14:27:12 +01:00
Nyall Dawson
a672c63e6e
Add sip MappedType for QVariant::Type for Qt6
QVariant::Type does not exist in PyQt6 as its been deprecated
and replaced with QMetaType::Type.

In order to avoid breaking PyQGIS API, we don't want to change
all our functions to use QMetaType::Type instead of QVariant::Type
(that can wait till QGIS 4.0). So instead we leave the c++/Qt 5
signatures as QVariant::Type, but accept QMetaType::Type values
for these functions under Qt 6 builds.
2024-01-24 09:49:43 +10:00
Nyall Dawson
fcdf6aa76e Fix QList/QVector<QVariantMap> conversion 2024-01-23 08:32:38 +01:00
Julien Cabieces
1343d4e1ca [PyQt6] Remove failing null_from_qvariant_converter 2024-01-16 12:18:11 +10:00
Julien Cabieces
fa6ab5c9a9 [PyQt6] Fix conversions.sip 2024-01-11 04:52:01 +10:00
Julien Cabieces
062ce03b6d [PyQt6] remove QTextCodec and rename pyqt5_from_qvariant_by_type
QTextCodec is no longer existing in PyQt6 (only in QtCoreCompat in C++)
2024-01-11 04:52:01 +10:00
Julien Cabieces
bb3c36a69b Initialize sip bindings for PyQt6
use exactly the ones from PyQt5 so we can study the difference when
generating for PyQt6
2023-12-08 03:38:42 +10:00