[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
String class and Qt
From: |
Gilles Degottex |
Subject: |
String class and Qt |
Date: |
Mon, 4 Oct 2004 16:52:03 +0200 |
User-agent: |
KMail/1.6.2 |
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
- String class and Qt,
Gilles Degottex <=