opengisch / qgis-swiss-locator

Swiss Geoadmin layer and feature search for QGIS 3
https://www.opengis.ch/2024/06/25/swiss-locator-plugin-3-0-is-here-with-exciting-features/
GNU General Public License v3.0
12 stars 4 forks source link

Python >= 3.8 #9

Closed m-kuhn closed 3 years ago

m-kuhn commented 3 years ago

Since Python 3.8 I get

dictobject bad argument to internal function

When triggering a result. Assumption is a QVariant, sip, pyqt, python 3.8 compatibility problem.

m-kuhn commented 3 years ago

Assumption verified, modifying the locator result with a getter fixes the issue:

class CORE_EXPORT QgsLocatorResult
{
  public:
  [ ...]
    QVariant getUserData() { return userData; }
}
m-kuhn commented 3 years ago

Note: strange effects also happened with Python 3.6 (not exactly sure about the exception there, but it's also not functional)