[Kde-java] selected( QAction) slot for QActionGroup

David Goodenough david.goodenough at btconnect.com
Wed Oct 6 12:04:13 CEST 2004


On Wednesday 06 October 2004 10:47, David Goodenough wrote:
> On Tuesday 05 October 2004 21:59, Richard Dale wrote:
> > On Tuesday 05 October 2004 15:44, David Goodenough wrote:
> > > I am working my way through the examples in the Qt Designer manual and
> > > in the second one they define an ActionGroup and then gets its events
> > > throught selected( QAction).  This does not appear to work, I put a
> > > System.out.println in the method that I connected the slot to, and it
> > > never appears to be called.
> > >
> > > So I looked around in the examples that come with the java kdebindings
> > > and the only one what seems to try to use this slot is TextEdit.  I
> > > looked at the source and it does exactly what I did, so I tried running
> > > it, and the four alignment toolbar icons have NO effect.  I conclude
> > > that this slot is not working.
> > >
> > > So I tried looking in the kdebindings source, and my head started to
> > > hurt as I do not know where to start looking.
> > >
> > > Any ideas?
> >
> > Hi David
> >
> > As I've just explained to Maik, I couldn't test the QAction signals/slots
> > problem because the TextEdit app looped and seg faulted with the KDE
> > 3.3.1 java bindings. The code is in JavaSlot.cpp, there is a table that
> > looks up the C++ type signature given the java one. So there is an entry
> > for QAction in there:
> >
> >  {"(QAction)",            "(QAction*)"},
> >
> > There should be no space before the asterisk. I attached a JavaSlot.cpp
> > that might work if you want to try it out.
> >
> > -- Richard
>
> Where does JavaSlot.cpp, or rather the binary from it, end up.  I ask
> because I want to replace only the bits that I know I have changed rather
> than all of kdebindings, and I get lost in Makefiles etc.
>
> David
Its OK, I found it.  Its in /usr/lib/libqtjavasupport.so, and I cheated (shows
my mainframe background I am afraid), I used KHexEdit to patch it and
my code now works.  So the fix is good!  Thanks Richard.

Whats the plan when it comes to sorting the 3.3.1 java bindings?  I ask so
that I have an excuse to badger the Debian packager to release a 3.3
version at all, and in particular to get this fix (and the other bits that
have been fixed in juic) into the shipped version.

David


More information about the Kde-java mailing list