Review Request 124674: Added a class template specialization type
Milian Wolff
mail at milianw.de
Sun Aug 9 21:18:46 UTC 2015
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/124674/#review83627
-----------------------------------------------------------
Ship it!
some small nitpicks, but otherwise looks again like excellent work - nice Sergey!
duchain/builder.cpp (line 609)
<https://git.reviewboard.kde.org/r/124674/#comment57865>
move this down just before you return cst. that way, you don't need to lock the duchain while doing the below, potentially expensive, operations.
duchain/navigationwidget.cpp (line 47)
<https://git.reviewboard.kde.org/r/124674/#comment57872>
why " <" and not "< "?
duchain/types.h (line 24)
<https://git.reviewboard.kde.org/r/124674/#comment57866>
rename this file to `classspecializationtype.h` and adapt the include guards accordingly
duchain/types.h (line 66)
<https://git.reviewboard.kde.org/r/124674/#comment57867>
QVector please
duchain/types.cpp (line 78)
<https://git.reviewboard.kde.org/r/124674/#comment57868>
rename: t -> param or parameter
duchain/types.cpp (line 88)
<https://git.reviewboard.kde.org/r/124674/#comment57869>
When you just concatenate the strings, use QLatin1String here please, also below.
Furthermore, think about using QTextStream, I quite like that for building strings.
duchain/types.cpp (line 106)
<https://git.reviewboard.kde.org/r/124674/#comment57870>
space before (
duchain/types.cpp (line 120)
<https://git.reviewboard.kde.org/r/124674/#comment57871>
QVector as I said, and then also do
const auto size = d_func()->parametersSize();
QVector<IndexedType> parameters(size);
for (uint i = 0; i < size; ++i) {
parameters[i] = d_func()->parameters()[i];
}
bonus points if you can use an algorithm instead. I think std::copy_n should do the trick:
const auto size = ...;
QVector<IndexedType> parameters(size);
std::copy_n(d_func()->parameters(), size, parameters.begin());
- Milian Wolff
On Aug. 9, 2015, 5:19 p.m., Sergey Kalinichev wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/124674/
> -----------------------------------------------------------
>
> (Updated Aug. 9, 2015, 5:19 p.m.)
>
>
> Review request for KDevelop.
>
>
> Repository: kdev-clang
>
>
> Description
> -------
>
> This solves two problems:
>
> 1. We didn't create type links for this type and it's parameters.
> 2. There were no look-ahead code competion for items with this type.
>
>
> Diffs
> -----
>
> duchain/CMakeLists.txt a183253
> duchain/builder.cpp f0b17f6
> duchain/duchainutils.cpp 38bd0c3
> duchain/navigationwidget.cpp ef74ce2
> duchain/types.h PRE-CREATION
> duchain/types.cpp PRE-CREATION
> tests/files/types.cpp 9ddf084
> tests/test_codecompletion.cpp c9624bb
>
> Diff: https://git.reviewboard.kde.org/r/124674/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Sergey Kalinichev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20150809/e29481e4/attachment-0001.html>
More information about the KDevelop-devel
mailing list