<div class="gmail_quote">I'll try to keep this quite straight-forward:<br><br>Please, take a look at where the openFileDialog( KUrlRequester * ) signal is emitted: <a href="http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/kurlrequester_8cpp-source.html#l00303" target="_blank">http://api.kde.org/4.x-api/kdelibs-apidocs/kio/html/kurlrequester_8cpp-source.html#l00303</a><br>
<br>Now, question #1:<br>Why does the signal emission occur before everything else in the "else" body? This can be quite frustrating if one wants to customise the KFileDialog selection:<br><br>Let's say the KUrlRequester has a /home/user/foo.txt url(). And you want the dialog to initially select a different file (let's say /home/user/bar.txt). One would think "nice, just connect the signal openFileDialog() somewhere, and there use setSelection() on the dialog to have the other file initially selected". But no, this is impossible because the file dialog's selection changes a few lines of code afterwards. Is this done on purpose to avoid customising the file dialog's selection?<br>
<br>[The example is really dumb and makes no sense but I didn't want to mess with the real case details. You get the idea..]<br><br>Question #2:<br>Just out of curiosity (and probably stupidity), why does the openFileDialog signal provide a KUrlRequester pointer? Extract from the documentation:<br>
<br>"If you use multiple KUrlRequesters, you can connect all of them to the same slot and use the given KUrlRequester pointer to know which one is going to open." <br><br>Can't we simply call QObject::sender() to find out the caller?<br>
<br>Question #3:<br>Is there any need to have the "myCompletion" variable? Can't we just use KLineEdit's/KComboBox's accessors?<br>
<br>Konstantinos Smanis<br>
</div><br>