[Kommander-devel] Re: Accessing a QAction in a Kommander Plugin
Eric Laffoon
eric at kdewebdev.org
Mon Feb 25 17:31:04 EST 2008
On Monday 25 February 2008 11:50:47 am Kevin Krammer wrote:
> On Sunday 24 February 2008, Eric Laffoon wrote:
> > I had to add #include <kapplication.h> after which I get ironically
> > exactly the same compile error I have in the past...
> >
> > ../../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
>
> Hmm, strange.
>
> Can you attach the file in its current state?
Sure, and as I mentioned it is in SVN too.
>
> And probably the full error log, also as attachment, just in case this is a
> follow up error of something happing earlier.
Below. There is an error after as I had another function which I know doesn't
work, but no error before. I managed to debug those.
>
> > This is what I just don't understand. childAction should be a QAction* so
> > what does the expected unqualified-id mean? Where does the '1' come from
> > and how is it being used as a function?
> >
> > I can read and understand your code. Am I missing an include? Am I
> > creating conflicts with my includes?
>
> Not very likely this would trigger different compiler warnings (conflicting
> declarations, double declarations, etc)
>
> Cheers,
> Kevin
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
--
Eric Laffoon
Project Lead - kdewebdev module
-------------- next part --------------
A non-text attachment was scrubbed...
Name: qtactionproxy.cpp
Type: text/x-c++src
Size: 6006 bytes
Desc: not available
Url : http://mail01.fortunecookiestudios.com/pipermail/kommander-devel/attachments/20080225/368516cd/qtactionproxy.cpp
More information about the Kommander-devel
mailing list