[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] Syntax error with SIP 4.19.13 and struct
From: Alessandro Pasotti <apasotti () gmail ! com>
Date: 2019-03-21 10:27:32
Message-ID: CAL5Q672rKui+oiox25q=7ggSxFnor_ujcgNmkbbMQgrqACdhUA () mail ! gmail ! com
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
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@riverbankcomputing.com>
wrote:
> On 21 Mar 2019, at 10:05 am, Alessandro Pasotti <apasotti@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
[Attachment #5 (text/html)]
<div dir="ltr"><div><br></div><div>Thanks! <br></div><div><br></div><div>We are using \
an automatic SIP file generator, unfortunately it's quite picky about inline \
initializers.</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" \
class="gmail_attr">On Thu, Mar 21, 2019 at 11:11 AM Phil Thompson <<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>> \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 21 Mar 2019, at \
10:05 am, Alessandro Pasotti <<a href="mailto:apasotti@gmail.com" \
target="_blank">apasotti@gmail.com</a>> wrote:<br> > <br>
> Hi,<br>
> <br>
> I'm building the bindings for a class that looks like this (snippet):<br>
> <br>
> class CORE_EXPORT QgsDataProvider : public QObject<br>
> {<br>
> Q_OBJECT<br>
> public:<br>
> struct ProviderOptions<br>
> {<br>
> QgsCoordinateTransformContext coordinateTransformContext;<br>
> };<br>
> QgsDataProvider( const QString &uri = QString(), const \
QgsDataProvider::ProviderOptions &options = QgsDataProvider::ProviderOptions() \
):<br> > mDataSourceURI( uri ),<br>
> mOptions( options )<br>
> {<br>
> }<br>
> }<br>
> <br>
> SIP code is (snippe)t:<br>
> <br>
> class QgsDataProvider : QObject<br>
> {<br>
> %TypeHeaderCode<br>
> #include "qgsdataprovider.h"<br>
> %End<br>
> public:<br>
> struct ProviderOptions<br>
> {<br>
> QgsCoordinateTransformContext coordinateTransformContext;<br>
> };<br>
> <br>
> QgsDataProvider( const QString &uri = QString(), const \
QgsDataProvider::ProviderOptions &options = QgsDataProvider::ProviderOptions() \
):<br> > ...<br>
> <br>
> <br>
> The error message is <br>
> qgsdataprovider.sip:76: syntax error<br>
> line 76 is the last line of the above snippet.<br>
> <br>
> <br>
> Any idea what's going on here?<br>
<br>
You have a syntax error. There seems to be a colon when a semi-colon is expected.<br>
<br>
Phil</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" \
class="gmail_signature">Alessandro Pasotti<br>w3: <a href="http://www.itopen.it" \
target="_blank">www.itopen.it</a></div>
[Attachment #6 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic