KVS Class Function Editor Reminder Text creates class build failure if ( ) are used in reminder text
Expected behavior
Enter a reminder text using ( ) such as: "$0 - string to parse in some particular format (stringFormat)" to remind dev later on to pass correctly formatted strings to the function.
Actual behavior
On attempting class build, throws compilation errors: [KVS] Compilation error: Found character '$' (Unicode 0x24) where '{' was expected ... [KVS] 22 function epChange($0 = season/episode string (sXXeXX) $1 = change type ...
KVS is expecting a { after the (sXXeXX) - but why? The class fails to build.
//: # (Besides the text description, include any screenshot(s) that help us visualize the issue you're facing)
Steps to reproduce the issue
- Create a class
- Create a member function in the class
- Use ( ) in the reminder text for the function
- Try to build the class
System information
//: # (Type "/about.kvirc" (or click "Help → About KVIrc") and copy&paste the details from the "Executable Information" tab below between ``` marks) //: # (Also Enter any OS information the "Executable Information" tab doesn't contain, e.g. KDE, Gentoo, Linux Mint, etc.)
KVIrc 4.9.2 'Aria'
Runtime Info:
System name: Windows Release : 10.0.14393
System version: Windows 10 (x64) (Build 14393)
Architecture: Intel64 Family 6 Model 42 Stepping 7
Qt version: 5.5.1
Qt theme: windowsvista
Build Info:
Build date: 2016-12-12 22:31:43 UTC
Sources date: 20161212
Revision number: git-7042-g90a846a
System name: Windows-6.3.9600
CPU name: AMD64
Build command: C:/Program Files (x86)/CMake/bin/cmake.exe
Build flags:
MANDIR=share/man
CMAKE_INSTALL_PREFIX=C:/projects/kvirc/build/release
Threads=Win32
Compiler name: C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/cl.exe
Compiler flags: /DWIN32 /D_WINDOWS /W3 /GR /EHsc
Qt version: 5.5.1
Features: IRC, IPv6, Crypt, SSL, IPC, Transparency, Webkit, Perl, Python, Enchant, Qt5, KVS
I also found that if you use < > in the reminder text it disappears in the code editor window.
That is to say, where it says "Reminder text.: " under the 'Rename' button on the code editor, anything you place between < > will not be shown in the reminder text. So if you have parameters you want to signify as being mandatory by using < > you can't see them.
And if you write <i>something</i>... well...
Hi. I wanted to make a comment here because the fix for this issue caused #2281 bug.and the revert https://github.com/kvirc/KVIrc/commit/e7e2f4048920ca2da10ccb5c1b00781fcd895d39 fixed it.
After the revert, I tried adding via class editor a reminder that had some text and that worked just fine.
Our usecase has not triggered this bug, we have simple reminders like $0 = flag $0 = nick.