KDElibs/win32 merge: How to resolve followin issue..
Jarosław Staniek
js at iidea.pl
Sat Aug 28 15:37:40 BST 2004
KDE hackers,
I am still updating my native KDElibs/win32 to HEAD, file by file.
In kdecore, we have:
virtual KSycocaEntry *KSycocaFactory::createEntry(int offset)=0;
Changing return type for subclasses, e.g. in kio/kio
(KServiceFactory : public KServiceFactory):
virtual KService * KServiceFactory::createEntry(int offset);
...is not portable outside gcc world. There are more places like this.
Originally I have just changed KService* return type back to KSycocaEntry*
and added static_cast<KService*> when needed (not really often). This is
_portable_ and relatively clean (because it's a protected method, so no public
API is affected), and binary compatible. Not ifdefs, and doxygen docs will
remain clean.
We can _optionally_ add convenience methods, eg.
inline KService * KServiceFactory::createServiceEntry(int offset)
{ return static_cast<KService*>(createEntry(offset)); }
Is all of this reasonable for you?
--
regards / pozdrawiam,
Jaroslaw Staniek / OpenOffice Polska
Kexi project: http://koffice.org/kexi/ http://www.kexi-project.org/
Qt-KDE Wrapper project: http://iidea.pl/~js/qkw/
More information about the kde-core-devel
mailing list