[PyQt] Syntax error with SIP 4.19.13 and struct

Alessandro Pasotti apasotti at gmail.com
Thu Mar 21 10:05:43 GMT 2019


Hi,

I'm building the bindings for a class that looks like this (snippet):

class CORE_EXPORT QgsDataProvider : public QObject
{
    Q_OBJECT
  public:
    struct ProviderOptions
    {
      QgsCoordinateTransformContext coordinateTransformContext;
    };
    QgsDataProvider( const QString &uri = QString(), const
QgsDataProvider::ProviderOptions &options =
QgsDataProvider::ProviderOptions() ):
      mDataSourceURI( uri ),
      mOptions( options )
    {
    }
}

SIP code is (snippe)t:

class QgsDataProvider : QObject
{
%TypeHeaderCode
#include "qgsdataprovider.h"
%End
  public:
   struct ProviderOptions
    {
      QgsCoordinateTransformContext coordinateTransformContext;
    };

    QgsDataProvider( const QString &uri = QString(), const
QgsDataProvider::ProviderOptions &options =
QgsDataProvider::ProviderOptions() ):
...


The error message is
qgsdataprovider.sip:76: syntax error
line 76 is the last line of the above snippet.


Any idea what's going on here?

Thanks!

-- 
Alessandro Pasotti
w3:   www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190321/786cc915/attachment.html>


More information about the PyQt mailing list