Review Request: Do not use the Tp::AbstractClientHandler to control when ft-handler should exit

Daniele Elmo Domenichelli daniele.domenichelli at gmail.com
Sat Sep 17 18:01:27 UTC 2011


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

(Updated Sept. 17, 2011, 6:01 p.m.)


Review request for Telepathy, George Kiagiadakis and David Edmundson.


Changes
-------

As discussed with David, instead of a controller class I created a class derived by KApplication that does some magic

Basically exits the application when there are no running jobs
    
Morover it does automatically another few things required by every handler:
     - It automatically register Telepathy-Qt Types
     - setQuitOnLastWindowClosed(false)
     - Adds the --persist option to inhibit automatic exit.
     - Adds the --debug option to enable telepathy-qt4 debug
     - Enables telepathy-qt4 warnings


Summary
-------

To handle metadata we will need another Tp::AbstactClientHandler for streamtubes, therefore it's not good to use the FileTransferHandler class to control the whole program

This patch adds a new class (FileTransferControl) that works almost like a singleton (without using K_GLOBAL_STATIC that doesn't work for QObjects) and moves control of the flow of the program into this class.


Diffs (updated)
-----

  src/CMakeLists.txt 9e84a8b9d427505a8babc79713ca41f1ec223a2a 
  src/filetransfer-handler.h 53b710a0bec0bf5dd10e70a53c59b90112c5e4e8 
  src/filetransfer-handler.cpp 0e4624e46b4a702afa962dc3efcff37d4dae54ff 
  src/main.cpp eca8e2f77da9348bbbea4b7f8179f7142d1d5337 
  src/telepathy-handler-application.h PRE-CREATION 
  src/telepathy-handler-application.cpp PRE-CREATION 

Diff: http://git.reviewboard.kde.org/r/102306/diff


Testing
-------

Tried file transfers (just on my laptop) still exits when it is supposed to exit.


Thanks,

Daniele Elmo

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-telepathy/attachments/20110917/360b7e3e/attachment.html>


More information about the KDE-Telepathy mailing list