Fix a couple of minor leaked ui::Messages

This commit is contained in:
David Capello 2021-06-07 15:20:45 -03:00
parent b02fc43506
commit eec9ed0bcc
2 changed files with 6 additions and 6 deletions

View File

@ -942,9 +942,9 @@ void KeyboardShortcutsCommand::onExecute(Context* context)
// Save preferences in widgets that are bound to options automatically // Save preferences in widgets that are bound to options automatically
{ {
Message* msg = new Message(kSavePreferencesMessage); Message msg(kSavePreferencesMessage);
msg->setPropagateToChildren(msg); msg.setPropagateToChildren(&msg);
window.sendMessage(msg); window.sendMessage(&msg);
} }
// Save keyboard shortcuts in configuration file // Save keyboard shortcuts in configuration file

View File

@ -589,9 +589,9 @@ public:
void saveConfig() { void saveConfig() {
// Save preferences in widgets that are bound to options automatically // Save preferences in widgets that are bound to options automatically
{ {
Message* msg = new Message(kSavePreferencesMessage); Message msg(kSavePreferencesMessage);
msg->setPropagateToChildren(msg); msg.setPropagateToChildren(&msg);
sendMessage(msg); sendMessage(&msg);
} }
// Update language // Update language