bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: String class and Qt


From: Gilles Degottex
Subject: Re: String class and Qt
Date: Mon, 4 Oct 2004 17:38:39 +0200
User-agent: KMail/1.6.2

I'm not sure I understood you perfectly, but yes has I said, "slots" is a 
keyword (reserved word). and Qt classes and architecture (and related 
pre-processor program like moc and uic) depends on it.
I can't explain the whole bug and underground mechanisms, but it seems to be 
linked and I solved it with a simple rename of the variable.

On Monday 04 October 2004 17:10, Idar Tollefsen wrote:
> What about namespaces? Or is "slots" a keyword of some sort for some of the
> Qt programs I understand it depends on (moc, etc.)?
>
> Gilles Degottex wrote:
> > Hi,
> >
> > I recently switch to CommonC++ 1.2 (from 1.0.13 to 1.2.4)
> > Some very interesting features appears in string.h,
> > but in the string.h file:
> >
> > "
> > class __EXPORT String
> > {
> > protected:
> >     static const unsigned minsize;
> >     static const unsigned slotsize;
> >     static const unsigned pagesize;
> >     static const unsigned slotlimit;
> >     static const unsigned slots;    [<== line 84]
> > "
> >
> > if you look at the last word "slots", it's a reserved word in Qt for the
> > signal/slot feature.
> > and so, when using this file in a Qt program, an error like the following
> > one appears:
> >
> > "
> > compiling CustomInstrumentTunerForm.cpp
> > In file included from libs/Music/Music.h:29,        [#include 
> > <cc++/string.h>]
> >                  from CustomInstrumentTunerForm.cpp:31:
> > /usr/include/cc++2/cc++/string.h:84: error: declaration does not declare
> > anything
> > make: *** [.yam_tmp/objects/CustomInstrumentTunerForm.o] Error 1
> > "
> > (I added the things in brackets)
> >
> > If I use Qt, I could use the QString class, yes, but if I want to do a
> > library usable in a console program like in a full graphical Qt program,
> > it's a problem.
> >
> > a simple rename of "slots" in "slots_ccpp" makes everything working fine.
> >
> > Best Regards,
> > Gilles
> >
> >
> > _______________________________________________
> > Bug-commoncpp mailing list
> > address@hidden
> > http://lists.gnu.org/mailman/listinfo/bug-commoncpp

-- 
Gilles Dégottex
Raffinerie 7
2000 Neuchâtel
nat: 079 650 43 81
fix: 032 710 02 67




reply via email to

[Prev in Thread] Current Thread [Next in Thread]