Bug 454582

Summary: Show/hide parameters in Symbols Viewer for Python code doesn't work
Product: [Applications] kate Reporter: Alain Laporte <alain>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version First Reported In: 21.12.3   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Alain Laporte 2022-05-29 19:48:37 UTC
SUMMARY

Show/hide parameters in Symbols Viewer for Python code doesn't work.

STEPS TO REPRODUCE
1. Create a Python file like:

def foo(param1, param2):
    pass

2. Go in Symbols Viewer
3. Check in the contextual menu the value of "Show Parameters"

OBSERVED RESULT

Parameters of the function foo are not displayed when "Show Parameters" is on. And modify the value do nothing.

EXPECTED RESULT

Parameters must be displayed when "Show Parameters" is on and not displayed when off.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.92.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Comment 1 Christoph Cullmann 2022-06-11 15:36:14 UTC
Git commit 8e50a93f8f5111439d6dcf7a86194d284fe19f0b by Christoph Cullmann, on behalf of Alain Laporte.
Committed on 11/06/2022 at 15:29.
Pushed by cullmann into branch 'master'.

Add ability to show/hide parameters

Use only regexp to:
* extract name and parameters
* detect if function is a method or not

M  +29   -45   addons/symbolviewer/python_parser.cpp

https://invent.kde.org/utilities/kate/commit/8e50a93f8f5111439d6dcf7a86194d284fe19f0b