I am a fan of the principle "be strict in what you emit and relaxed in what you accept", and in this case if the string length is larger than 1 character, why don't you just pick the first character and emit a warning.
Or if you prefer just emit a warning and set no shortcut. But don't just silently do nothing.
134 + if (value.size() == 1) { ).toAscii( ) - 'a')); setShortcutKey( key);
135 + QChar c = value.at(0);
136 + if (c.isLetter()) {
137 + Qt::Key key = (Qt::Key) (Qt::Key_A + (c.toLower(
138 + entry->
139 + }
140 + }
I am a fan of the principle "be strict in what you emit and relaxed in what you accept", and in this case if the string length is larger than 1 character, why don't you just pick the first character and emit a warning.
Or if you prefer just emit a warning and set no shortcut. But don't just silently do nothing.