[Kommander-devel] Re: Accessing a QAction in a Kommander Plugin

Eric Laffoon eric at kdewebdev.org
Wed Feb 27 23:47:47 EST 2008


On Wednesday 27 February 2008 3:56:56 am Kevin Krammer wrote:
> On Monday 25 February 2008, Eric Laffoon wrote:
> > On Monday 25 February 2008 11:50:47 am Kevin Krammer wrote:
> > > Can you attach the file in its current state?
> >
> > Sure, and as I mentioned it is in SVN too.
>
> Right, but at the time I checked it was still the original version.

Odd it appears up to date with what I have.
>
> > compile results:
> >
> > eric at localhost:~/kdesvn/qtactionproxy/build$ make
> > make  all-recursive
> > make[1]: Entering directory `/home/eric/kdesvn/qtactionproxy/build'
> > Making all in src
> > make[2]: Entering directory `/home/eric/kdesvn/qtactionproxy/build/src'
> > if /bin/sh ../libtool --silent --tag=CXX --mode=compile
> > g++ -DHAVE_CONFIG_H -I. -I../../src -I..  -I/usr/kde/3.5/include
> > -I/usr/qt/3/include -I.  -DQT_THREAD_SUPPORT  -D_REENTRANT -DHAVE_SSTREAM
> > -Wno-long-long -Wundef -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE
> > -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -O2
> > -Wformat-security -Wmissing-format-attribute -Wno-non-virtual-dtor
> > -fno-exceptions -fno-check-new -fno-common  -MT qtactionproxy.lo -MD -MP
> > -MF
> > ".deps/qtactionproxy.Tpo" -c -o
> > qtactionproxy.lo ../../src/qtactionproxy.cpp; \
> >         then mv -f ".deps/qtactionproxy.Tpo" ".deps/qtactionproxy.Plo";
> > else rm -f ".deps/qtactionproxy.Tpo"; exit 1; fi
> > ../../src/qtactionproxy.cpp: In member function 'bool
> > QtActionProxy::actionIsOn(const QString&)':
> > ../../src/qtactionproxy.cpp:160: error: expected unqualified-id before
> > numeric constant
> > ../../src/qtactionproxy.cpp:160: error: expected ';' before numeric
> > constant ../../src/qtactionproxy.cpp:160: error: '1' cannot be used as a
> > function
>
> I cannot see anything obviously wrong, the only thing which looks weird is
> the newline between utf8 and its parenthese.

Yes it does, but after fixing it there is of course no difference in errors.
>
> The next method, however, is not compilable and should look pretty much the
> actionIsOn()

Maybe I have a foolish approach, but I was thinking there wasn't much point in 
changing two functions until I could get a compile to make it through the 
first. Along with these I was going to try to do a few other functions, like 
setting properties, talking with the toolbar, and maybe try something more 
interesting like creating an action.
>
> If time permits I will try to build the plugin on the weekend and see if I
> can fix it.
>
> Cheers,
> Kevin

I appreciate it. On the bright side it is less bothersome as i went back and 
tried DCOP again using your Qt specific suggestions and while some of the 
DCOP doesn't work (for obvious reasons) most of what I tried did. I am now 
able to toggle an action or check it's state with DCOP. This gives me most of 
what I wanted this plugin for, though I'm still curious why I couldn't get it 
to compile. 

If you figure it out why it didn't work I can try to add some functionality 
with the plugin. There are still some issues DCOP doesn't solve that this 
plugin could. Otherwise I'm probably going to put it aside until I'm not so 
busy. However my improved programming skills and time ought to coincide with 
when I solve this issue in KDE4. ;-) Thanks again for all your help.

-- 
Eric Laffoon
Project Lead - kdewebdev module


More information about the Kommander-devel mailing list