Why do I get this error?
Waldo Bastian
bastian at kde.org
Sun Nov 10 16:38:32 GMT 2002
>> > /usr/local/src/kdelibs/kabc/plugins/ldap/resourceldap.cpp: In method
>> > `bool KABC::ResourceLDAP::open()':
>> > /usr/local/src/kdelibs/kabc/plugins/ldap/resourceldap.cpp:98: cannot
>> > convert `QCString()' from type `QCString' to type `char *'
>>
>> Does an explicit cast like
>> (char*)mHost.local8Bit()
>> or
>> (const char*)mHost.local8Bit()
>> help?
>
>This must be a gccism... the (char *) fails with the same error, but the
>(const char *) only gives a warning of discarded qualifiers...
QCString can be cast to const char* but not to char *. You probably need:
const_cast<char*>(mHost.local8Bit().data());
Cheers,
Waldo
More information about the kde-core-devel
mailing list