Disable qt menu heuristics for openConfEditorAction (#3466)

Thanks to `TextHeuristicRole` set by default qt confuses `openConfEditorAction` with application settings and binds it as if we would set `PreferencesRole` to it. As a result it opens `dash.conf` when user clicks `Preferences...` and not application settings as one would expect. Explicitly setting `NoRole` fixes it.

Note: this issue only appears in some languages e.g. `de`.
This commit is contained in:
UdjinM6 2020-05-02 18:50:36 +03:00 committed by GitHub
parent 6e1c5480cd
commit 538fcf2f1b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -438,6 +438,8 @@ void BitcoinGUI::createActions()
openRepairAction->setStatusTip(tr("Show wallet repair options"));
openConfEditorAction = new QAction(QIcon(":/icons/edit"), tr("Open Wallet &Configuration File"), this);
openConfEditorAction->setStatusTip(tr("Open configuration file"));
// override TextHeuristicRole set by default which confuses this action with application settings
openConfEditorAction->setMenuRole(QAction::NoRole);
showBackupsAction = new QAction(QIcon(":/icons/browse"), tr("Show Automatic &Backups"), this);
showBackupsAction->setStatusTip(tr("Show automatically created wallet backups"));
// initially disable the debug window menu items