Commit graph

3 commits

Author SHA1 Message Date
Raphael Kubo da Costa e5cdd821c0 domtreeviewer: Fix build with clang.
DOM::Node does not originally have operator<(DOM::Node, DOM::Node)
implemented in khtml, so domtreecommands.cpp implemented it. However, it did
so in the `domtreeviewer' namespace.

When ManipulationCommand::addChangedNode() is called, it calls
ChangedNodeSet::insert(), which is actually QMap<DOM::Node, bool>::insert(),
which calls qMapLessThanKey(), which finally calls operator<().

Since QMap is not part of the `domtreeviewer' namespace, when
qMapLessThanKey() calls operator<(), it never looks for an implementation in
the `domtreeviewer' namespace. Argument-dependend name lookup makes the
compiler look for an implementation in the namespace of the function
arguments (DOM, in this case), so we need to move our implementation there.

For some reason, the code built fine with gcc.

Thanks to Nicolás Alvarez for the initial discussion, and [1] for the ugly
details.

[1] http://www.gotw.ca/publications/mill08.htm

(cherry picked from commit c3e23ca299)
2012-01-02 01:53:29 -02:00
Patrick von Reth 9859dedead fixed windows x64 compiling, see http://doc.trolltech.com/4.7/qtglobal.html#qptrdiff-typedef
svn path=/trunk/KDE/kdebase/apps/; revision=1216964
2011-01-25 09:39:03 +00:00
David Faure c9ab6afc71 Moved from extragear, to put the konq plugins together with konqueror, as discussed on k-c-d in September.
svn path=/trunk/KDE/kdebase/apps/; revision=1211211
2011-01-03 09:44:41 +00:00