My name Simon, I'm new here. I'm an architecture student interrested in coding and I would like to help.
English is not my mother thong, feel free to correct myself on gramar and spelling I'm here to learn.
I would like to report a bug and may be work on it.
When you try to customize shortcuts with several keys in it, the second key erase the first.
It might be a bug because, wall in Arch's workbench has the "wa" shortcut.
I have looked in the code, and the function responsible of this is:
AccelLineEdit::keyPressEvent() in ./src/Gui/Widgets.cpp
Presently, I have fixed some aspect of the bug but it's not perfect.
I can customize the shortcut I want, adding "," before the key, but there isn't any validation on the string passed. For exemple the number of keys that can be used. (4 for Qtshortcut)
I have never used Qt and my nivel in c++ is quit low, I use to code in python.
For exemple, line 390-391, I dont understand why there are parenthesis around QString, nor what is ks(). is ks() a function?:
Code: Select all
QKeySequence ks(Qt::SHIFT+key);
txt += (QString)(ks)
I began to work on this bug to learn. So I report it if someone with better ability want to fix it, otherwise I can sumit what I've done when finished but it might be dirty.
the bug on Mantis
http://www.freecadweb.org/tracker/view.php?id=1694
OS: Ubuntu 14.04.1 LTS
Word size: 64-bit
Version: 0.15.3881 (Git)
Branch: master
Hash: 7665e34a3a844dc0e21aa86375ff9de1e632ec36
Python version: 2.7.6
Qt version: 4.8.6
Coin version: 4.0.0a
SoQt version: 1.6.0a
OCC version: 6.7.0