Why do I get this error?

Ingo Klöcker kloecker at kde.org
Sun Nov 10 16:50:09 GMT 2002


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 10 November 2002 15:25, Ian Reinhart Geiser wrote:
> Greetings
> 	I have seen this error before, but cannot remember how it was fixed.
>  This only happens on Solaris 8 with gcc 2.95.3 from what I can tell.
>  I think this is a config issue, could anyone give me any pointers? 
> Did the Qt get configured wrong?  Or did I say the incorrect thing at
> configure time of kdelibs?  Is this really a problem  with ldap on
> solaris?
> /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 *'

QCStrings can only be cast to const char * and maybe on Solaris the 
first parameter of ldap_init is char * instead of const char *.

QCString::data() should to be used for an explicite cast from QCString 
to char *.

In this case:
- -  mLdap = ldap_init( mHost.local8Bit(), mPort.toInt() );
+  mLdap = ldap_init( mHost.local8Bit().data(), mPort.toInt() );

Regards,
Ingo

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE9zo5JGnR+RTDgudgRAtEjAJsFFfdUqHZlrdiBykuu4AWjLNHHbgCeNnNs
N7uW4v3Eu3067ED4X0oiM/s=
=BfvB
-----END PGP SIGNATURE-----






More information about the kde-core-devel mailing list