minor adl fixes in kdevplatform

Nicolás Alvarez nicolas.alvarez at gmail.com
Fri Dec 31 01:00:10 UTC 2010


On 30/12/2010, Milian Wolff <mail at milianw.de> wrote:
> Nicolás Alvarez, 30.12.2010:
>> On 30/12/2010, floris <flo.ruijt at hotmail.com> wrote:
>> > here's two classe which have a qHash in the global namespace. that isn't
>> > correct. they should be in the same namespace as the class to make adl
>> > work. I think PovAddict has a similar patch, but he hasn't responded on
>> > irc to me.
>> >
>> > Floris
>>
>> I'll commit this now.
>
> you still didn't proof that this is what is required.
>
> I still find this very strange.

Just try compiling KDevelop 4.2 0c0f4332aa or later, against
KDevPlatform 1.2 687ae6b804 or older (just make sure 9fd32f1b18 isn't
there, which is the qHash ADL patch).


/usr/include/qt4/QtCore/qhash.h: In member function ‘QHashNode<Key,
T>** QHash<Key, T>::findNode(const Key&, uint*) const [with Key =
KDevelop::RangeInRevision, T = QHashDummyValue]’:
/usr/include/qt4/QtCore/qhash.h:752:   instantiated from ‘QHash<Key,
T>::iterator QHash<Key, T>::insert(const Key&, const T&) [with Key =
KDevelop::RangeInRevision, T = QHashDummyValue]’
/usr/include/qt4/QtCore/qset.h:176:   instantiated from
‘QSet<T>::const_iterator QSet<T>::insert(const T&) [with T =
KDevelop::RangeInRevision]’
./kdevelop42/projectmanagers/cmake/tests/cmakeduchaintest.cpp:280:
instantiated from here
/usr/include/qt4/QtCore/qhash.h:875: error: no matching function for
call to ‘qHash(const KDevelop::RangeInRevision&)’

I agree that it's strange, though.

-- 
Nicolas




More information about the KDevelop-devel mailing list