Review Request: Change ktp-presence-applet add contact button code

Mikhail Krishtop mikhailkrishtop at gmail.com
Tue Mar 27 22:52:23 UTC 2012



> On March 27, 2012, 10:11 p.m., David Edmundson wrote:
> > src/presenceapplet.cpp, line 213
> > <http://git.reviewboard.kde.org/r/104430/diff/1/?file=55056#file55056line213>
> >
> >     alternately rather than messing about with QWeakPointers for the accountModel we could do
> >     
> >     accountsModel->setParent(dialog) just after we create the dialog.
> >     
> >
> 
> Mikhail Krishtop wrote:
>     I could see what I can do with this.

If you mean something like this, it doesn't work. Dialog doesn't find account model (just an empty list).

AccountsModel* accountModel = new AccountsModel();
accountModel->setAccountManager(m_accountManager);
    
QWeakPointer<KTp::AddContactDialog> dialog = new KTp::AddContactDialog(0, 0);
accountModel->setParent(dialog.data());

if (dialog.data()->exec() == QDialog::Accepted) {
...
}
delete dialog.data();
delete accountModel; // without this, as I understand, it would be a memory leak. I've tried without this line, it doesn't work too.


- Mikhail


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/104430/#review11929
-----------------------------------------------------------


On March 27, 2012, 10:15 p.m., Mikhail Krishtop wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/104430/
> -----------------------------------------------------------
> 
> (Updated March 27, 2012, 10:15 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Change ktp-presence-applet add contact button code
> 
> 
> This addresses bug 292882.
>     http://bugs.kde.org/show_bug.cgi?id=292882
> 
> 
> Diffs
> -----
> 
>   CMakeLists.txt 48c679624e61548735c584e31f41f307a6327f3a 
>   src/presenceapplet.h 9c0533fcd6ff1a048ac49211370b23556d469a3d 
>   src/presenceapplet.cpp 53e23b171052acc3f5fa1e5b8d42b101d1d817b1 
> 
> Diff: http://git.reviewboard.kde.org/r/104430/diff/
> 
> 
> Testing
> -------
> 
> 
> Screenshots
> -----------
> 
> 
>   http://git.reviewboard.kde.org/r/104430/s/498/
> 
> 
> Thanks,
> 
> Mikhail Krishtop
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20120327/530d5efa/attachment.html>


More information about the KDE-Telepathy mailing list