Fix context help for template data types
ClosedPublic

Authored by antonanikin on Oct 30 2016, 1:06 PM.

Details

Summary

This patch fixes broken code-context help for template data types. Old version has buggy behavior:

  1. Place following code to some source file:
#include <cmath>
#include <math.h>
#include <vector>
#include <QList>

void test()
{
    QList<int> l;
    l.append(1);

    double x = std::sin(1);
    double y = sin(1);
    std::vector<int> v;
}
  1. Place cursor to any function or templated type and call "Show Documentation" from context menu. Help page is NOT shown.

This behavior caused by wrong usage of documentation Url - we pass full qualified type (with template information like QList<...>), but documentation has topics only for plain data type like QList.

Man-pages help plugin also fixed to work with new default parser (Clang-based). Previous version doesn't show help context page for any code element.

This fix based on revision D3205 (kdevplatform).

Test Plan

Tested on master branch.

Diff Detail

Repository
R32 KDevelop
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
antonanikin updated this revision to Diff 7757.Oct 30 2016, 1:06 PM
antonanikin retitled this revision from to Fix context help for template data types.
antonanikin updated this object.
antonanikin edited the test plan for this revision. (Show Details)
antonanikin added a reviewer: KDevelop.
antonanikin added a subscriber: kdevelop-devel.
antonanikin updated this object.Oct 30 2016, 1:59 PM
antonanikin updated this revision to Diff 7793.Nov 1 2016, 3:31 AM

Add an enum for the string formatting options

antonanikin updated this revision to Diff 7794.Nov 1 2016, 4:18 AM

Update to master

kfunk requested changes to this revision.Nov 16 2016, 11:20 PM
kfunk added a reviewer: kfunk.
kfunk added a subscriber: kfunk.

Rest LGTM to me

documentation/manpage/manpageplugin.cpp
108

While it compiles fine, I find nullptr to be really confusing in this context here. Can you use MyEnum::NoOptions here?

This revision now requires changes to proceed.Nov 16 2016, 11:20 PM
antonanikin updated this revision to Diff 8243.Nov 17 2016, 3:07 AM
antonanikin edited edge metadata.

update to new enum

antonanikin marked an inline comment as done.Nov 17 2016, 3:08 AM
kfunk accepted this revision.Nov 17 2016, 8:33 AM
kfunk edited edge metadata.

LGTM, great work!

This revision is now accepted and ready to land.Nov 17 2016, 8:33 AM
This revision was automatically updated to reflect the committed changes.