[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&#39;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 &lt;<a \
href="mailto:phil@riverbankcomputing.com">phil@riverbankcomputing.com</a>&gt; \
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 &lt;<a href="mailto:apasotti@gmail.com" \
target="_blank">apasotti@gmail.com</a>&gt; wrote:<br> &gt; <br>
&gt; Hi,<br>
&gt; <br>
&gt; I&#39;m building the bindings for a class that looks like this (snippet):<br>
&gt; <br>
&gt; class CORE_EXPORT QgsDataProvider : public QObject<br>
&gt; {<br>
&gt;        Q_OBJECT<br>
&gt;     public:<br>
&gt;        struct ProviderOptions<br>
&gt;        {<br>
&gt;           QgsCoordinateTransformContext coordinateTransformContext;<br>
&gt;        };<br>
&gt;        QgsDataProvider( const QString &amp;uri = QString(), const \
QgsDataProvider::ProviderOptions &amp;options = QgsDataProvider::ProviderOptions() \
):<br> &gt;           mDataSourceURI( uri ),<br>
&gt;           mOptions( options )<br>
&gt;        {<br>
&gt;        }<br>
&gt; }<br>
&gt; <br>
&gt; SIP code is (snippe)t:<br>
&gt; <br>
&gt; class QgsDataProvider : QObject<br>
&gt; {<br>
&gt; %TypeHeaderCode<br>
&gt; #include &quot;qgsdataprovider.h&quot;<br>
&gt; %End<br>
&gt;     public:<br>
&gt;      struct ProviderOptions<br>
&gt;        {<br>
&gt;           QgsCoordinateTransformContext coordinateTransformContext;<br>
&gt;        };<br>
&gt; <br>
&gt;        QgsDataProvider( const QString &amp;uri = QString(), const \
QgsDataProvider::ProviderOptions &amp;options = QgsDataProvider::ProviderOptions() \
):<br> &gt; ...<br>
&gt; <br>
&gt; <br>
&gt; The error message is <br>
&gt; qgsdataprovider.sip:76: syntax error<br>
&gt; line 76 is the last line of the above snippet.<br>
&gt; <br>
&gt; <br>
&gt; Any idea what&#39;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