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

David Goodenough david.goodenough at btconnect.com
Wed Oct 6 23:42:05 CEST 2004


On Wednesday 06 October 2004 12:54, Richard Dale wrote:
> On Wednesday 06 October 2004 11:04, David Goodenough wrote:
> > 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.
>
> Gosh! Not my idea of doing it the easy way, but I pleased to hear that
> fixes it.
>
> > 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.
>
> I still can't get my version to link, so I can't test it. Dominique the
> Debian packager has just resigned, so we 'in between packagers' at the
> moment I'm afraid. My attempt at fixing the QWidget.polish() loop might
> have made things worse I don't know until I can test. The TextEdit example
> was pretty broken when I tried to run that to look at the QAction problem.
>
> -- Richard
Well I just downloaded (from CVS HEAD) kdebindings, and set it building
(after getting incantation slightly wrong).  It compiles and links cleanly.
Does this mean that you have not checked in the lastest code that is 
causing you all the problems, or have you now fixed it?

David


More information about the Kde-java mailing list