<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 12 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.tab
        {mso-style-name:tab;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle20
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Version 2 then, with more properties, and fix for the Model issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’d be uncomfortable blacklisting methods. If List<QWidget> QWidget.Children() remains a method, nobody gets hurt, but if bool QMovie.JumpToNextFrame() becomes
 a property, chaos happens. There is one pattern that could be exploited: methods starting with nouns or adjectives like “Widget,” “Width,” “Window,” “File,” “Root,” “Physical,” and “Temp” are almost certainly properties, but so far only the “File” prefix has
 more than two entries in my list.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--Brian<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> kde-bindings-bounces@kde.org [mailto:kde-bindings-bounces@kde.org]
<b>On Behalf Of </b>Dimitar Dobrev<br>
<b>Sent:</b> Thursday, December 13, 2012 1:15 PM<br>
<b>To:</b> KDE bindings for other programming languages<br>
<b>Subject:</b> Re: [Kde-bindings] Qyoto: Patch v1: Translate obvious getters into properties or "Get" methods<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal" style="background:white"><span class="tab"><span style="color:black">   
</span></span><span style="color:black"><o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span class="tab"><span style="color:black">    Mr. Crowell,</span></span><span style="color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    </span></span><span style="color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    Thanks for the patch, it looks n</span></span><span style="color:black">ice. I'll discuss it in a while. First, I'd like to point out that there is no need for us here in open source communities
 to be that formal. :) If you agree with me, you may call me "Dimitar" and in turn I would call you "Brian". However, if you do prefer an official form of address, that's fine by me.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    About your patch: it looks very good, and I like how you reused the method for generating a property instead of writing your own. :) However, I have two remarks, a regression and a suggestion:</span></span><span style="color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    1. QComboBox.Model used to be a read-write property, now it's read only. Could you please change your code so that it remains read-write? Also, if possible, check for other such cases because
 this is simply one I found, it doesn't mean there aren't more;</span></span><span style="color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    2. </span></span><span style="color:black">I'm wondering if it would be better to have something like a list of commonly used in API-s verbs, and then if the method starts with has or is or
 is a single word (this can be checked by casing) and this single word is not a verb, the method should be generated as a property. The thing is that your way you have to look for properties all over the huge Qt API, and that with each Qt version (for example,
 Qt 5 is coming very soon). Of course, the verb approach may actually turn out to be worse because there may be way too many verbs to enumerate. So this is simply a suggestion for you to think about if you like.<br>
<span class="tab">    </span><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal"><span class="tab"><span style="color:black">    Dimitar</span></span><span style="color:black"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="color:black"><o:p> </o:p></span></p>
</div>
<div>
<div>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">
<hr size="1" width="100%" align="center">
</span></div>
<p class="MsoNormal" style="background:white"><b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black">From:</span></b><span style="font-size:10.0pt;font-family:"Arial","sans-serif";color:black"> "Crowell, Brian" <<a href="mailto:BCrowell@barbnet.com">BCrowell@barbnet.com</a>><br>
<b>To:</b> KDE bindings for other programming languages <<a href="mailto:kde-bindings@kde.org">kde-bindings@kde.org</a>>
<br>
<b>Sent:</b> Thursday, December 13, 2012 8:23 PM<br>
<b>Subject:</b> [Kde-bindings] Qyoto: Patch v1: Translate obvious getters into properties or "Get" methods</span><span style="color:black"><o:p></o:p></span></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="color:black"><br>
As discussed with Mr. Dobrev, this patch finds methods with certain names and signatures and translates them into properties. This covers "Is" and "Has" properties along with a specified list of noun phrases. Getter methods that take arguments are renamed "Get"
 (Sibling(int row, int column) becomes GetSibling(int row, int column)).<br>
<br>
The list of property names is incomplete. I'll add more as I find them.<br>
<br>
--Brian<br>
_______________________________________________<br>
Kde-bindings mailing list<br>
<a href="mailto:Kde-bindings@kde.org">Kde-bindings@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/kde-bindings" target="_blank">https://mail.kde.org/mailman/listinfo/kde-bindings</a><br>
<br>
<o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</body>
</html>