[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: [Patch] fix compile kdecore with msvc
From:       Thiago Macieira <thiago () kde ! org>
Date:       2005-10-30 16:49:50
Message-ID: 200510301450.01644.thiago () kde ! org
[Download RAW message or body]


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;
>and
>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.

[Attachment #3 (application/pgp-signature)]

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic