Check if map of custom shortcuts contains empty values before applying them#247
Check if map of custom shortcuts contains empty values before applying them#247MPohlVIC wants to merge 2 commits intocloose:developfrom
Conversation
|
Hi @MPohlVIC, Thank you for your contribution! I will take a look at it as fast as possible. My time is a little limited right now. Bye, Christian |
|
The reason for empty entries is fairly easy. In // shortcut settings
for (int i = 0; i < ui->shortcutsTable->rowCount(); ++i) {
QKeySequence customKeySeq(ui->shortcutsTable->item(i, 1)->text());
options->addCustomShortcut(actions[i]->objectName(), customKeySeq);
}Normally this should not be a problem, since initially all custom shortcuts are equal to the default shortcut of an action. So the custom shortcut can, AFAICS, only be empty if the default shortcut was empty. Only exception I can think of is an later added default shortcut for an already existing action. I would really like to understand the root cause of the problem. |
|
I tried to reproduce the error but I did not succeed. |
Default shortcut did not always work because map with custom shortcuts might contain entries with empty values. Not sure why there are entries without value at all. But this fixes the problem for me.