mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
Allow for ampersand characters in configuration names
Ampersand characters have special significance in action names, they indicate the following character is an accelerator. This change allows single ampersand characters but filters them out from the MultiSettings::configuration_name_changed signal. Double ampersands may be used to escape a single ampersand. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7338 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
869d62aae1
commit
c9fb8ab89f
@ -408,7 +408,7 @@ void MultiSettings::impl::create_menu_actions (QMainWindow * main_window, QMenu
|
||||
|
||||
if (name_change_emit_pending_)
|
||||
{
|
||||
Q_EMIT parent_->configurationNameChanged (current_);
|
||||
Q_EMIT parent_->configurationNameChanged (current_.replace (QRegularExpression {R"(&([^&]))"}, R"(\1)").replace ("&&", "&"));
|
||||
name_change_emit_pending_ = false;
|
||||
}
|
||||
}
|
||||
|
@ -91,7 +91,7 @@ public:
|
||||
bool exit ();
|
||||
|
||||
// emitted when the name of the current configuration changes
|
||||
Q_SIGNAL void configurationNameChanged (QString const& name) const;
|
||||
Q_SIGNAL void configurationNameChanged (QString name) const;
|
||||
|
||||
private:
|
||||
class impl;
|
||||
|
Loading…
Reference in New Issue
Block a user