D12696: Use the new uds implementation
Jaime Torres Amate
noreply at phabricator.kde.org
Tue May 8 14:16:34 UTC 2018
jtamate added inline comments.
INLINE COMMENTS
> dfaure wrote in udsentry.cpp:454
> Hmm why can't this be the friend function directly?
>
> I don't like the added global functions in the public header...
> Hmm why can't this be the friend function directly?
Because the compiler (clang++ in this case) doesn't know which one to apply.
Unless both definitions are equivalent (in source and binary) and the later can be removed. That is something I don't known.
src/core/slavebase.cpp:728:14: error: use of overloaded operator '<<' is ambiguous (with operand types 'QDataStream' and 'const KIO::UDSEntry')
KIO_DATA << entry;
~~~~~~~~ ^ ~~~~~
src/core/udsentry.h:315:40: note: candidate function
friend QDataStream &operator<< (QDataStream &s, const KIO::UDSEntry &a);
^
src/core/udsentry.h:361:29: note: candidate function
KIOCORE_EXPORT QDataStream &operator<< (QDataStream &s, const KIO::UDSEntry &a);
^
> I don't like the added global functions in the public header...
Me neither, but otherwise clang++will not be able to find the function.
src/core/udsentry.h:314:19: error: no function named 'save' with type 'void (QDataStream &, const KIO::UDSEntry &)' was found in the specified scope
friend void ::save(QDataStream &, const KIO::UDSEntry &);
^
> dfaure wrote in udsentry.cpp:45
> 1ms is relative to a benchmark which isn't clear when reading this code in other contexts. As someone said in another review, do we still need this operator== anyway, given that you pass lambdas to find_if()?
ok, ok, bye bye ==
REPOSITORY
R241 KIO
REVISION DETAIL
https://phabricator.kde.org/D12696
To: jtamate, dfaure, #frameworks
Cc: bruns, michaelh, ngraham
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180508/9d932f57/attachment.html>
More information about the Kde-frameworks-devel
mailing list