[Kde-bindings] Kde-bindings Digest, Vol 123, Issue 4

Dimitar Dobrev dpldobrev at yahoo.com
Thu Jul 11 10:41:04 UTC 2013



    Hello, Cvetoslav,

    Thank you for your offer. First of all, you should read at least some of the SWIG docs - mostly basics and C#-specifics. Second of all, I should tell you a little about the specific case of SWIG and Qt. As you know, Qt uses its own C++ dialect that their moc turns into (nasty) standard C++. Because the Qt extensions are not standard, SWIG cannot recognize them and reports errors. As you will see in the documentation, SWIG can, using the passed in config files, replace certain symbols with other content so that the result is standard C++. This is the approach to use. The other one would have been to generate the real C++ with moc and run SWIG on that. Well, I tried it but even without trying it was clear it would not work. The problem is that SWIG does not work well with cpp code (considering what a mess C++ as a language is, I don't blame them). There is a note in the docs about that. It works OK with header files but moc, on the other hand,
 generates only cpp. So you can see the only possible path is to change the Qt headersand run SWIG on the result.

    About a repository, I do not have oneyet. What I do have is an incomplete attemptto wrap qobject.h and a plan.
    1. The attempt is a SWIG configuration file (*.i) you can find attached; for now it contains #define-s of specific Qt-macros to nothing so that SWIG would not choke. Of course, not all macros should be thrown awaya like that, for example Q_SIGNAL would be better used to generate C#-events and not just ignored. But until we have a successful compilation we could do like that which leads me to:
    2. My plan:
        1. Successfully compile a wrapper for qobject.h the easiest possible way;

        2. Turn signals into events;
        3. Turn name/setNamepairs into properties (note - not just Qt-properties but all accessor functions);
        4. Create a program that would be passed the include directory of Qt and generate the corresponding SWIG config files for each Qt module and run SWIG on each file;

        5. Turn name functions that are just accessors into read-only properties (this 
is a bit tricky but I have a solution; so if you reach this point mail 
me and I'll help you);
        6. Generate the corresponding C#-comments to the classes and their members by using the Qt docs (again, I have a solution here so mail me if you get this far).

    Of course, at 4 we'd have more manualadjustments, after 6 we'd have testing, etc., but this is basically the way I see it.

    The problem part is, I really do not know when I would be able to get in. This is a whole new project to start from almost scratch, the only pieces that might be reused are those about the read-only properties and the code comments. This requires quite a lot of time. I'll be able to help with separate issues but for now I cannot give any guarantees when I'd be able to work on this myself.
    Nevertheless, I wish you luck and feel free to contact me should you have any questions.

    Best regards,
    Dimitar Dobrev

    


________________________________
 From: Cvetoslav Ludmiloff <ludmiloff at gmail.com>
To: kde-bindings at kde.org 
Sent: Thursday, July 11, 2013 12:19 PM
Subject: Re: [Kde-bindings] Kde-bindings Digest, Vol 123, Issue 4
 


I'd like to participate and help with SWIG wrapper and Qt5 bindings. Do you have any code repository to have a look and get your code.

Regards.
Cvetoslav Ludmiloff



2013/7/10 <kde-bindings-request at kde.org>

Send Kde-bindings mailing list submissions to
>        kde-bindings at kde.org
>
>To subscribe or unsubscribe via the World Wide Web, visit
>        https://mail.kde.org/mailman/listinfo/kde-bindings
>or, via email, send a message with subject or body 'help' to
>        kde-bindings-request at kde.org
>
>You can reach the person managing the list at
>        kde-bindings-owner at kde.org
>
>When replying, please edit your Subject line so it is more specific
>than "Re: Contents of Kde-bindings digest..."
>
>
>Today's Topics:
>
>   1. Re: Qyoto & F# (Gour)
>   2. Re: Qyoto & F# (Dimitar Dobrev)
>   3. Re: Qyoto & F# (Gour)
>   4. Re: Qyoto & F# (Dimitar Dobrev)
>
>
>----------------------------------------------------------------------
>
>Message: 1
>Date: Tue, 9 Jul 2013 14:27:05 +0200
>From: Gour <gour at atmarama.net>
>To: kde-bindings at kde.org
>Subject: Re: [Kde-bindings] Qyoto & F#
>Message-ID: <20130709142705.475e0262 at atmarama.noip.me>
>Content-Type: text/plain; charset=UTF-8
>
>On Tue, 9 Jul 2013 04:37:48 -0700 (PDT)
>Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>
>> ??? It actually doesn't matter if it'd be good enough because I don't
>> have a choice.
>
>I meant to ask what's wrong with SMOKE?
>
>
>Sincerely,
>Gour
>
>
>--
>The humble sages, by virtue of true knowledge, see with equal
>vision a learned and gentle br?hmana, a cow, an elephant, a dog
>and a dog-eater.
>
>http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>
>
>
>
>------------------------------
>
>Message: 2
>Date: Tue, 9 Jul 2013 05:40:36 -0700 (PDT)
>From: Dimitar Dobrev <dpldobrev at yahoo.com>
>To: KDE bindings for other programming languages
>        <kde-bindings at kde.org>
>Subject: Re: [Kde-bindings] Qyoto & F#
>Message-ID:
>        <1373373636.34666.YahooMailNeo at web122403.mail.ne1.yahoo.com>
>Content-Type: text/plain; charset="utf-8"
>
>
>
>??? Oh, sorry, I didn't get that. So, to answer you: take at look at the dates in SMOKE's repository log (git://anongit.kde.org/assemblygen, both master and the branch of v4 where the new version is developed). In particular, there are 4 or 5 bugs in SMOKE that prevent it from wrapping Qt 5, all of which I reported myself more than 3 and a half months ago. Again, as you can see from the dates in the repo, none of them were fixed. I think this answers your question.
>
>??? Regards,
>??? Dimitar Dobrev
>
>
>
>________________________________
> From: Gour <gour at atmarama.net>
>To: kde-bindings at kde.org
>Sent: Tuesday, July 9, 2013 3:27 PM
>Subject: Re: [Kde-bindings] Qyoto & F#
>
>
>On Tue, 9 Jul 2013 04:37:48 -0700 (PDT)
>Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>
>> ??? It actually doesn't matter if it'd be good enough because I don't
>> have a choice.
>
>I meant to ask what's wrong with SMOKE?
>
>
>Sincerely,
>Gour
>
>
>--
>The humble sages, by virtue of true knowledge, see with equal
>vision a learned and gentle br?hmana, a cow, an elephant, a dog
>and a dog-eater.
>
>http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>
>
>_______________________________________________
>Kde-bindings mailing list
>Kde-bindings at kde.org
>https://mail.kde.org/mailman/listinfo/kde-bindings
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130709/34440a96/attachment-0001.html>
>
>------------------------------
>
>Message: 3
>Date: Tue, 9 Jul 2013 14:45:50 +0200
>From: Gour <gour at atmarama.net>
>To: kde-bindings at kde.org
>Subject: Re: [Kde-bindings] Qyoto & F#
>Message-ID: <20130709144550.22802080 at atmarama.noip.me>
>Content-Type: text/plain; charset=UTF-8
>
>On Tue, 9 Jul 2013 05:40:36 -0700 (PDT)
>Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>
>> ??? Oh, sorry, I didn't get that. So, to answer you: take at look at
>> the dates in SMOKE's repository log
>> (git://anongit.kde.org/assemblygen, both master and the branch of v4
>> where the new version is developed).
>
>I see...
>
>> In particular, there are 4 or 5
>> bugs in SMOKE that prevent it from wrapping Qt 5, all of which I
>> reported myself more than 3 and a half months ago. Again, as you can
>> see from the dates in the repo, none of them were fixed. I think this
>> answers your question.
>
>Ahh, too bad. :-(
>
>Thank you for clarifying...and all the best with SWIG.
>
>As far as I'm concerned, still not sure what to use: Ada or F#... :-0
>
>
>Sincerely,
>Gour
>
>--
>Perform your prescribed duty, for doing so is better than not
>working. One cannot even maintain one's physical body without work.
>
>http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>
>
>
>
>------------------------------
>
>Message: 4
>Date: Wed, 10 Jul 2013 03:44:37 -0700 (PDT)
>From: Dimitar Dobrev <dpldobrev at yahoo.com>
>To: KDE bindings for other programming languages
>        <kde-bindings at kde.org>
>Subject: Re: [Kde-bindings] Qyoto & F#
>Message-ID:
>        <1373453077.42365.YahooMailNeo at web122402.mail.ne1.yahoo.com>
>Content-Type: text/plain; charset="iso-8859-1"
>
>???
>
>??? Gour,
>
>??? I am very sorry, yesterday I sent you the URL of the Qyoto repo (git://anongit.kde.org/assemblygen) while I was talking about the SMOKE repo (git://anongit.kde.org/smokegen).
>??? Please excuse me about this misunderstanding.
>
>??? Best regards,
>??? Dimitar Dobrev??
>???
>
>
>________________________________
> From: Gour <gour at atmarama.net>
>To: kde-bindings at kde.org
>Sent: Tuesday, July 9, 2013 3:45 PM
>Subject: Re: [Kde-bindings] Qyoto & F#
>
>
>On Tue, 9 Jul 2013 05:40:36 -0700 (PDT)
>Dimitar Dobrev <dpldobrev at yahoo.com> wrote:
>
>> ??? Oh, sorry, I didn't get that. So, to answer you: take at look at
>> the dates in SMOKE's repository log
>> (git://anongit.kde.org/assemblygen, both master and the branch of v4
>> where the new version is developed).
>
>I see...
>
>> In particular, there are 4 or 5
>> bugs in SMOKE that prevent it from wrapping Qt 5, all of which I
>> reported myself more than 3 and a half months ago. Again, as you can
>> see from the dates in the repo, none of them were fixed. I think this
>> answers your question.
>
>Ahh, too bad. :-(
>
>Thank you for clarifying...and all the best with SWIG.
>
>As far as I'm concerned, still not sure what to use: Ada or F#... :-0
>
>
>Sincerely,
>Gour
>
>--
>Perform your prescribed duty, for doing so is better than not
>working. One cannot even maintain one's physical body without work.
>
>http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810
>
>
>_______________________________________________
>Kde-bindings mailing list
>Kde-bindings at kde.org
>https://mail.kde.org/mailman/listinfo/kde-bindings
>-------------- next part --------------
>An HTML attachment was scrubbed...
>URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130710/5df6c825/attachment-0001.html>
>
>------------------------------
>
>_______________________________________________
>Kde-bindings mailing list
>Kde-bindings at kde.org
>https://mail.kde.org/mailman/listinfo/kde-bindings
>
>
>End of Kde-bindings Digest, Vol 123, Issue 4
>********************************************
>

_______________________________________________
Kde-bindings mailing list
Kde-bindings at kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130711/e5d91733/attachment-0001.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: qobject.i
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20130711/e5d91733/attachment-0001.ksh>


More information about the Kde-bindings mailing list