[Patch] fix compile kdecore with msvc

Thiago Macieira thiago at kde.org
Sun Oct 30 16:49:50 GMT 2005

Christian Ehrlicher wrote:
>> You cannot compare two structs unless they provide operator==.
>> Since KResolverEntry doesn't, you cannot compare two KResolverResults.
>> You're not supposed to, either, nor transform it into a set or vector.
>But when you export the class, you have to provide a complete class
>interface with all functions implemented...

No, I don't agree. Why should I provide functions that are not meant to be 
called, ever?

>Also I don't know why you won't remove the export macro, 

Because, if you do, the class becomes unusable outside libkdecore. Since 
it's meant to be used, removing is out of the question.

>bool KResolverEntry::operator ==(const KResolverEntry &) const;
>inline uint qHash(KResolverEntry key);

Ok, so operator== will return false always and qHash will return 0? What's 
the use?

They are not comparable and they are not meant to be used in a set. I 
still fail to see why we should create functions that are not meant to  
be used by anyone, ever.

>With this the compiler can generate a complete class (imo including
>QSet<KResolverEntry >).

How about not generating QSet<KResolverEntry>? It's not supposed to, since 
the set isn't supposed to exist.

  Thiago Macieira  -  thiago (AT) macieira.info - thiago (AT) kde.org
    PGP/GPG: 0x6EF45358; fingerprint:
    E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

5. Swa he géanhwearf tó timbran, and hwonne he cóm, lá! Unix cwæð "Hello, 
World". Ǽfre ǽghwilc wæs glæd and seo woruld wæs fréo.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20051030/1c82d3f7/attachment.sig>

More information about the kde-core-devel mailing list