Review Request: Add methods to set and get preferred handlers

David Edmundson david at davidedmundson.co.uk
Tue Nov 13 03:27:51 UTC 2012


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

Ship it!


I don't fully understand the point, there are no other handlers you would want to use.
However, as per usual, your code is really neat and tidy. so ship it.

Watch out for your "QString& foo" which should apparently be "QString &foo". There's a few cases in your cpp.

- David Edmundson


On Nov. 12, 2012, 4:20 p.m., Daniele Elmo Domenichelli wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107295/
> -----------------------------------------------------------
> 
> (Updated Nov. 12, 2012, 4:20 p.m.)
> 
> 
> Review request for Telepathy.
> 
> 
> Description
> -------
> 
> Together with https://git.reviewboard.kde.org/r/107169 , I would like to have methods to set and get preferred handlers, so here it is, documentation included.
> 
> In future, when we have the .desktop magic working, I would like to add methods to retrieve available handlers for one channel type in order to have some interface where we can configure them, for now I suggest we start using preferredHandlerForXXX everywhere.
> 
> 
> Diffs
> -----
> 
>   KTp/CMakeLists.txt 0fd12f084384c4df308707b8879e51d8b5908c69 
>   KTp/handlers.h PRE-CREATION 
>   KTp/handlers.cpp PRE-CREATION 
> 
> Diff: http://git.reviewboard.kde.org/r/107295/diff/
> 
> 
> Testing
> -------
> 
> Run this test, works as expected both reading and writing, but I'm too lazy to write proper unit tests, since we don't have them yet in ktp-common-internals (yes, we definitely should have them, but that's another patch)
> 
>     kDebug() << KTp::Handlers::defaultHandlerForTextChat();
>     kDebug() << KTp::Handlers::defaultHandlerForFileTransfer();
>     kDebug() << KTp::Handlers::defaultHandlerForAudioVideo();
>     kDebug() << KTp::Handlers::defaultHandlerForDesktopSharing();
> 
>     kDebug() << KTp::Handlers::preferredHandlerForTextChat();
>     kDebug() << KTp::Handlers::preferredHandlerForFileTransfer();
>     kDebug() << KTp::Handlers::preferredHandlerForAudioVideo();
>     kDebug() << KTp::Handlers::preferredHandlerForDesktopSharing();
> 
>     kDebug() << KTp::Handlers::preferredHandlerForTextChat(QLatin1String("A"));
>     kDebug() << KTp::Handlers::preferredHandlerForFileTransfer(QLatin1String("B"));
>     kDebug() << KTp::Handlers::preferredHandlerForAudioVideo(QLatin1String("C"));
>     kDebug() << KTp::Handlers::preferredHandlerForDesktopSharing(QLatin1String("D"));
> 
>     KTp::Handlers::setPreferredHandlerForTextChat(QLatin1String("E"));
>     KTp::Handlers::setPreferredHandlerForFileTransfer(QLatin1String("F"));
>     KTp::Handlers::setPreferredHandlerForAudioVideo(QLatin1String("G"));
>     KTp::Handlers::setPreferredHandlerForDesktopSharing(QLatin1String("H"));
> 
>     kDebug() << KTp::Handlers::preferredHandlerForTextChat(QLatin1String("I"));
>     kDebug() << KTp::Handlers::preferredHandlerForFileTransfer(QLatin1String("J"));
>     kDebug() << KTp::Handlers::preferredHandlerForAudioVideo(QLatin1String("K"));
>     kDebug() << KTp::Handlers::preferredHandlerForDesktopSharing(QLatin1String("L"));
> 
>     KTp::Handlers::unsetPreferredHandlerForTextChat();
>     KTp::Handlers::unsetPreferredHandlerForFileTransfer();
>     KTp::Handlers::unsetPreferredHandlerForAudioVideo();
>     KTp::Handlers::unsetPreferredHandlerForDesktopSharing();
> 
>     kDebug() << KTp::Handlers::preferredHandlerForTextChat();
>     kDebug() << KTp::Handlers::preferredHandlerForFileTransfer();
>     kDebug() << KTp::Handlers::preferredHandlerForAudioVideo();
>     kDebug() << KTp::Handlers::preferredHandlerForDesktopSharing();
> 
> 
> Thanks,
> 
> Daniele Elmo Domenichelli
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20121113/aa938932/attachment-0001.html>


More information about the KDE-Telepathy mailing list