[Delta] [Question] KeyStoreEntry == operator?

Diego Casella ([Po]lentino) polentino911 at gmail.com
Fri May 28 07:28:25 PDT 2010


Hi guys,
I have noticed that the QCA::KeyStoreEntry class ( and also others, like
QCA::PGPKey ), doesn't have an overloaded == operator.
I discovered it because I'm doing a foreach loop over a QList<
QCA::KeyStoreEntry > object retrieved by calling QCA::KeyStore::entryList()
and, depending on some conditions,
I need to remove the keys from that list. So, I wrote the following code

foreach( KeyStoreEntry key, keyStoreEntryList ) {
    /* some code here */
    if( condition )
        keyStoreEntryList.removeAt( keyStoreEntryList.indexOf( key ) );
}

but the compiler outputs an error, because indexOf() needs a _T object with
an overloaded == operator. I've fixed the problem by changing the loop, and
keeping track of the index, however the code isn't readable and good-looking
as the sample code I wrote above, so my question is if you plan to add an
overloaded == operator, in order to write better code ?
Thanks for your attention, best regards

Diego.

-- 
H: Who is Watson without Sherlock Holmes?
G: Watson was a genius in his own right.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.affinix.com/pipermail/delta-affinix.com/attachments/20100528/c101e602/attachment.htm>


More information about the Delta mailing list