From 39c170599934df20c1b53ffb3863fa7138d43d80 Mon Sep 17 00:00:00 2001 From: nds Date: Fri, 10 Oct 2008 08:16:24 +0000 Subject: [PATCH] Correction for using Qt4.4.3 instead of Qt4.2.2. The signal can't be posted because of empty menu for QtxActionSet class. In Qt4.4.3 method isEmpty() for Menu() checks visibility of the actions, in Qt4.2.2 it only checks existing the actions. --- src/Qtx/QtxAction.cxx | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/Qtx/QtxAction.cxx b/src/Qtx/QtxAction.cxx index e4da75af7..e6508893c 100755 --- a/src/Qtx/QtxAction.cxx +++ b/src/Qtx/QtxAction.cxx @@ -150,9 +150,17 @@ bool QtxAction::eventFilter( QObject* o, QEvent* e ) if ( o && o->isWidgetType() ) { if ( e->type() == QEvent::ActionAdded && ((QActionEvent*)e)->action() == this ) - QApplication::postEvent( this, new ActionNotify( true, (QWidget*)o ) ); + { + addedTo( (QWidget*)o ); + //ActionNotify a( true, (QWidget*)o ); + //QApplication::sendEvent( this, &a ); + } if ( e->type() == QEvent::ActionRemoved && ((QActionEvent*)e)->action() == this ) - QApplication::postEvent( this, new ActionNotify( false, (QWidget*)o ) ); + { + removedFrom( (QWidget*)o ); + //ActionNotify a( false, (QWidget*)o ); + //QApplication::sendEvent( this, &a ); + } } return QWidgetAction::eventFilter( o, e ); } -- 2.39.2