[Kde-java] selected( QAction) slot for QActionGroup
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Oct 7 13:15:57 CEST 2004
On Thursday 07 October 2004 11:57, David Goodenough wrote:
> <snip/>
>
> > > > > 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.
>
> Looking at JavaSlot.cpp (including the revised version) there are still
> some blanks around the place. I do not know of they matter, and some are
> obviously necessary (const<blank><type>, the blank is required). Of the
> rest there are:-
>
> {"(QListViewItem, int,String)", "(QListViewItem*, int, const QString&)"},
> {"(String,boolean)", "(const char*, bool)"},
>
> In the first of these there is one of the left and one on the right, in the
> second only one on the right.
No, they're fine. The is a Qt internal method called
'QObject::normalizeSignalSlot()', which removes all but the mininum of
spaces, and these C++ type signatures have to correspond to the format that
it produces. If you remove the space from 'const char*' for instance you end
up with an invalid C++ type.
-- Richard
More information about the Kde-java
mailing list