diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-28 16:44:42 -0500 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2013-04-28 16:44:42 -0500 |
commit | 7bd54f5a796f6f1276bbd310deaf1f2ac673954d (patch) | |
tree | 734f820f207e48208ae734b36ca12a8b90b9790b /libtdenetwork/qgpgme | |
parent | 8e5a6176843c174bd8dc1bc740518692bd0ab61d (diff) | |
download | tdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.tar.gz tdepim-7bd54f5a796f6f1276bbd310deaf1f2ac673954d.zip |
Fix retriggering of GPGMe socket notifiers in nested event loops
This resolves Bug 825
Add missing GPGMe feature checks to CMake
Diffstat (limited to 'libtdenetwork/qgpgme')
-rw-r--r-- | libtdenetwork/qgpgme/eventloopinteractor.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libtdenetwork/qgpgme/eventloopinteractor.cpp b/libtdenetwork/qgpgme/eventloopinteractor.cpp index 3b07189d7..b6d9830d6 100644 --- a/libtdenetwork/qgpgme/eventloopinteractor.cpp +++ b/libtdenetwork/qgpgme/eventloopinteractor.cpp @@ -30,6 +30,11 @@ #include <tqsocketnotifier.h> #include <tqapplication.h> +#include <tqvaluelist.h> + +TQValueList<int> writeActivity; +TQValueList<int> readActivity; + using namespace GpgME; QGpgME::EventLoopInteractor::EventLoopInteractor( TQObject * parent, const char * name ) @@ -77,11 +82,21 @@ void QGpgME::EventLoopInteractor::unregisterWatcher( void * tag ) { } void QGpgME::EventLoopInteractor::slotWriteActivity( int socket ) { + if (writeActivity.contains(socket)) { + return; + } + writeActivity.append(socket); actOn( socket , Write ); + writeActivity.remove(socket); } void QGpgME::EventLoopInteractor::slotReadActivity( int socket ) { + if (readActivity.contains(socket)) { + return; + } + readActivity.append(socket); actOn( socket , Read ); + readActivity.remove(socket); } void QGpgME::EventLoopInteractor::nextTrustItemEvent( GpgME::Context * context, const GpgME::TrustItem & item ) { |