D10277: Fix Template (Class/Function) Signatures in Clang Code Completion

Milian Wolff noreply at phabricator.kde.org
Wed Mar 14 14:33:26 UTC 2018


mwolff added a comment.


  cool stuff, some minor nitpicks otherwise lgtm! great work

INLINE COMMENTS

> completionhelper.cpp:66
> +        auto param = QStringLiteral("typename");
> +        if(!paramName.isEmpty()) {
> +            param += QStringLiteral(" ") + paramName;

here and below: space after `if`

> completionhelper.cpp:67
> +        if(!paramName.isEmpty()) {
> +            param += QStringLiteral(" ") + paramName;
> +        }

`QLatin1Char(' ')`

> completionhelper.cpp:69
> +        }
> +        (*static_cast<QStringList*>(data)).append(param);
> +    }

move the static cast to top and then use it down here and below

  auto& params = *static_cast<QStringList*>(data);

> completionhelper.cpp:75
> +        if(!paramName.isEmpty()) {
> +            param += QStringLiteral(" ") + paramName;
> +        }

dito QLatin1Char

> completionhelper.cpp:80
> +    else if (kind == CXCursor_TemplateTemplateParameter) {
> +        QString paramName = ClangString(clang_getCursorSpelling(cursor)).toString();
> +        auto templateTypes = templateParams(cursor);

auto

REPOSITORY
  R782 KDevelop Clang Integration

REVISION DETAIL
  https://phabricator.kde.org/D10277

To: shashwatdixit, #kdevelop, aspotashev, mwolff
Cc: #kdevelop, kdevelop-devel, antismap, iodelay, vbspam, njensen, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20180314/6a85881a/attachment.html>


More information about the KDevelop-devel mailing list