bug-commoncpp
[Top][All Lists]
Advanced

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

Re: String class and Qt


From: Idar Tollefsen
Subject: Re: String class and Qt
Date: Mon, 04 Oct 2004 17:10:00 +0200
User-agent: Mozilla Thunderbird 0.8 (Macintosh/20040913)

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







reply via email to

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