<br><br><div><span class="gmail_quote">On 10/22/07, <b class="gmail_sendername">Aaron J. Seigo</b> <<a href="mailto:aseigo@kde.org">aseigo@kde.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Monday 22 October 2007, Joris Guisson wrote:<br>> Nobody interested ? I guess my patch must be fine then, shall I commit ?<br><br>having a second QMap seems ugly and a bit wasteful. can you do something like:<br><br>
QMap<QWidget *, KConfigDialogManager *>::iterator it =<br>d->managerForPage.begin();<br><br>while (it != d->managerForPage.end()) {<br> if (it.value() == item->widget()) {<br> delete it.value();<br>
d->managerForPage.erase(it);<br> }<br> ++it;<br>}</blockquote><div><br>That was my first approach and it failed miserably, you see the widget you give to KConfigDialog, gets stuffed into a KVBox. <br></div>
<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">also, making removePage virtual isn't BC and seems a bit heavy handed. it uses<br>a model internally, which does have a rowsRemoved signal ... though that's
<br>buried a few levels deep.<br><br>perhaps KPageWidget should have a pageRemoved(KPageWidgetItem*) signal, which<br>reacts to the rowsRemoved signal, which can then be passed up via KPageDialog<br>as well ... that way one doesn't have to subclass to do special things on
<br>page removal (and remember to call the parent class' method along the way)<br>and it can be used externally as well ... </blockquote><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
thoughts?</blockquote><div><br>Maybe that is a better approach. I will try that, and see how it goes.<br><br>Btw, didn't know binary compatibility was important at this point in time. I can understand once 4.0 is out, but now ?
<br><br>Joris,<br> </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">--<br>Aaron J. Seigo<br>humru othro a kohnu se<br>GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
<br><br>KDE core developer sponsored by Trolltech<br><br></blockquote></div><br>