[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] Qyoto: read-only properties, with Brian Crowell's help
From:       Dimitar Dobrev <dpldobrev () yahoo ! com>
Date:       2012-12-16 22:20:27
Message-ID: 1355696427.38020.YahooMailNeo () web122404 ! mail ! ne1 ! yahoo ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


    
    Hi all,

    Qyoto now uses read-only properties instead of methods where methods have no \
parameters and are only assumed to return a value. It is Brian Crowell's idea and \
initial work. Binaries are not uploaded yet.

    Brian, I've used parts of your code but there are 2 major changes you should know \
about:  1. I've decided to change the approach from enumerating properties to \
enumerating verbs, as I mentioned earlier - the reasoning is that now there's no need \
to manually scan the huge Qt API for property-like methods; also, it turned out \
pretty easy to do. There are categorised dictionaries only so I only had to get one, \
leave only the single-worded verbs that are not also nouns using a few regular \
expressions, and the result was a text file of only 108 K/11 500 lines which doesn't \
slow the build significantly. I'd like to hear in more detail your opinion so that \
the disadvantages this approach may have are noted and fixed;  2. I haven't committed \
the "Get" prefix on methods yet. I've found an unpleasant bug with property \
generation which I'd like to fix beforehand. It is old, it's just that I noticed it \
while merging and changing your code. The problem is that in some cases methods \
shadow properties. The case I've found is that QObject has a Parent property, and the \
QAbstractItemModel, which inherits from QObject, generates a Parent() method which \
shadows the property. Once I fix this I'll work on integrating your "Get" part as \
well.  

    Regards,
    Dimitar


[Attachment #5 (text/html)]

<html><body><div style="color:#000; background-color:#fff; font-family:times new \
roman, new york, times, serif;font-size:12pt"><div><span \
class="tab">&nbsp;&nbsp;&nbsp; </span><br><span class="tab">&nbsp;&nbsp;&nbsp; Hi \
all,</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times \
new roman,new york,times,serif; background-color: transparent; font-style: \
normal;"><br><span class="tab">&nbsp;&nbsp;&nbsp; Qyoto now uses read-only properties \
instead of methods where methods have no parameters and are only assumed to return a \
value. It is Brian Crowell's idea and initial work. Binaries are not uploaded \
yet.<br></span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: \
times new roman,new york,times,serif; background-color: transparent; font-style: \
normal;"><span class="tab">&nbsp;&nbsp;&nbsp; Brian, I've used parts of your code but \
there are 2 major changes you should know about:</span></div><div style="color: \
rgb(0,  0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; \
background-color: transparent; font-style: normal;"><span \
class="tab">&nbsp;&nbsp;&nbsp; </span>1. I've decided to change the approach from \
enumerating properties to enumerating verbs, as I mentioned earlier - the reasoning \
is that now there's no need to manually scan the huge Qt API for property-like \
methods; also, it turned out pretty easy to do. There are categorised dictionaries \
only so I only had to get one, leave only the single-worded verbs that are not also \
nouns using a few regular expressions, and the result was a text file of only 108 \
K/11 500 lines which doesn't slow the build significantly. I'd like to hear in more \
detail your opinion so that the disadvantages this approach may have are noted and \
fixed;</div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: times new \
roman,new york,times,serif; background-color: transparent; font-style: normal;"><span \
class="tab">&nbsp;&nbsp;&nbsp; 2. I haven't committed the "Get" prefix on methods \
yet. I've found an unpleasant bug with property generation which I'd like to fix \
beforehand. It is old, it's just that I noticed it while merging and changing your \
code. The problem is that in some cases methods shadow properties. The case I've \
found is </span><span class="tab">that QObject has a Parent property, and the \
QAbstractItemModel, which inherits from QObject, generates a Parent() method which \
shadows the property. Once I fix this I'll work on integrating your "Get" part as \
well.</span></div><div style="color: rgb(0, 0, 0); font-size: 16px; font-family: \
times new roman,new york,times,serif; background-color: transparent; font-style: \
normal;"><span class="tab">&nbsp;&nbsp;&nbsp; <br></span></div><div style="color: \
rgb(0, 0, 0); font-size: 16px; font-family: times new roman,new york,times,serif; \
background-color: transparent; font-style: normal;"><span  \
class="tab">&nbsp;&nbsp;&nbsp; </span>Regards,</div><div style="color: rgb(0, 0, 0); \
font-size: 16px; font-family: times new roman,new york,times,serif; background-color: \
transparent; font-style: normal;"><span class="tab">&nbsp;&nbsp;&nbsp; \
Dimitar</span><br><span class="tab"></span></div></div></body></html>



_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic