[PyQt] Syntax error with SIP 4.19.13 and struct
Alessandro Pasotti
apasotti at gmail.com
Thu Mar 21 10:27:32 GMT 2019
Thanks!
We are using an automatic SIP file generator, unfortunately it's quite
picky about inline initializers.
On Thu, Mar 21, 2019 at 11:11 AM Phil Thompson <phil at riverbankcomputing.com>
wrote:
> On 21 Mar 2019, at 10:05 am, Alessandro Pasotti <apasotti at gmail.com>
> wrote:
> >
> > 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?
>
> You have a syntax error. There seems to be a colon when a semi-colon is
> expected.
>
> Phil
--
Alessandro Pasotti
w3: www.itopen.it
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20190321/4f555234/attachment.html>
More information about the PyQt
mailing list