the issue was that widget wrapper was using parent QDateTimeEdit::dateTimeChanged signal. It was connected both internally to QgsDateTimeEdit::changed and in the form to detect changes. When QgsAttributeForm was recreating the updated feature it was calling QgsDateTimeEdit::value() before changed() could update the value (i.e. setting mIsNull to false).
fix#17790
Before we had two checks - equals() and isGeosEqual() which
performed the exact same check (since equals() called the geos
equality test)
Since the geos equality test is a slow, topological test, which
considers two geometries equal if their component edges overlap,
but disregards ordering of vertices this is not always what we
want. There's also the issue that geos cannot consider m values
when testing the geometries, so two geometries with different
m values would be reported equal.
So, now calling QgsGeometry::equals performs a very fast, strict
equality test where geometries are only equal if the have exactly
the same vertices, type, and order.
And swap most code which was calling the slow geos test to instead
use the fast strict native test.
Because having it as a compiler flag means that when compiling a dependant application we need to have extra knowledge of this setting at compile time of the dependant application.
If this is not guaranteed (and the dependant application is compiled without QGISDEBUG while libqgis_core.so is compiled with QGISDEBUG) will result in different class definitions being found in header and library. For example for the optional QgsCoordinateTransform::mHasContext member. This in turn leads to crashes with funky traces and no chance to find out what's going on.
also fixes the fact that the display format of QDateTimeEdit only accepts string formats, so in case of Qt::ISODate use a default date/time with zmne zone
this adds a new format of date/time to use Qt::ISODate format
the issue is that QDate::fromString does not recognize the t letter for the timezone in format
this a hack since any field_format needs to be tested if it corresponds to QgsDateTimeFieldFormatter::DEFAULT_ISO_FORMAT and in such case replace by Qt::ISODate instead of a format string
the widget now uses a special value text to display NULL rather than painting a QLineEdit on top
a press on the spinbox buttons (non-calendar mode) is catch to set to current date to avoid starting at the minimum date