[licq-im/licq] 676a8d: Support casting plugin to internal interface

GitHub <[email protected]> Tue, 29 Jan 2013 12:16:17 -0800
Newsgroups gmane.network.licq.cvs
Message-ID <[email protected]>
  Branch: refs/heads/refactor-plugin-api
  Home:   https://github.com/licq-im/licq
  Commit: 676a8d3f03932a8b5f8d6ec304192430fbc358e9
      https://github.com/licq-im/licq/commit/676a8d3f03932a8b5f8d6ec304192430fbc358e9
  Author: Erik Johansson <[email protected]>
  Date:   2013-01-29 (Tue, 29 Jan 2013)

  Changed paths:
    M licq/include/licq/icq/icq.h
    M licq/include/licq/plugin/generalplugin.h
    M licq/include/licq/plugin/plugin.h
    M licq/include/licq/plugin/protocolplugin.h
    M licq/src/fifo.cpp
    M licq/src/plugin/plugin.cpp
    M licq/src/plugin/plugin.h
    M licq/src/plugin/tests/plugintest.cpp
    M qt4-gui/src/core/systemmenu.cpp
    M qt4-gui/src/core/usermenu.cpp
    M qt4-gui/src/dialogs/adduserdlg.cpp
    M qt4-gui/src/dialogs/chatdlg.cpp
    M qt4-gui/src/dialogs/editcategorydlg.cpp
    M qt4-gui/src/dialogs/filedlg.cpp
    M qt4-gui/src/dialogs/mmsenddlg.cpp
    M qt4-gui/src/dialogs/phonedlg.cpp
    M qt4-gui/src/dialogs/randomchatdlg.cpp
    M qt4-gui/src/dialogs/searchuserdlg.cpp
    M qt4-gui/src/dialogs/showawaymsgdlg.cpp
    M qt4-gui/src/userdlg/info.cpp
    M qt4-gui/src/userdlg/owner.cpp
    M qt4-gui/src/userevents/usersendevent.cpp
    M qt4-gui/src/userevents/userviewevent.cpp
    M rms/src/rms.cpp

  Log Message:
  -----------
  Support casting plugin to internal interface

To get access to the internal ICQ interface, one can now write:

Licq::IcqProtocol::Ptr icq = plugin_internal_cast<Licq::IcqProtocol>(
    Licq::gPluginManager.getProtocolPlugin(LICQ_PPID));

Instead of the old way:

Licq::ProtocolPlugin::Ptr icqProtocol(Licq::gPluginManager.getProtocolPlugin(LICQ_PPID));
Licq::IcqProtocol* icq = dynamic_cast<Licq::IcqProtocol*>(icqProtocol.get());

It was neccessary to keep hold of icqProtocol until one was done with icq to be
guaranteed that the protocol hadn't been unloaded. This is now handled
automatically.


  Commit: 339a7b9164593e9aa36257c5ac5333514ad8b4da
      https://github.com/licq-im/licq/commit/339a7b9164593e9aa36257c5ac5333514ad8b4da
  Author: Erik Johansson <[email protected]>
  Date:   2013-01-29 (Tue, 29 Jan 2013)

  Changed paths:
    M qt4-gui/src/core/CMakeLists.txt
    M qt4-gui/src/core/plugin.cpp
    M qt4-gui/src/core/plugin.h
    M qt4-gui/src/core/signalmanager.cpp
    M qt4-gui/src/core/signalmanager.h

  Log Message:
  -----------
  qt4-gui: use Qt signals instead of plugin helper to handle signals/events

If a Qt signal is sent to a object that lives in another thread, the signal is
queued in that object's event loop and delivered in that thread.

Since this was what the helper class did, but using a std::queue and a pipe, it
could be removed in favour of the native solution.


Compare: https://github.com/licq-im/licq/compare/55e6d91be35c...339a7b916459

-- 

--- 
You received this message because you are subscribed to the Google Groups "Licq Commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.