mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-02-03 09:56:38 -05:00
qt: Use parent-child relation to manage lifetime of OptionsModel object
Both BitcoinApplication and OptionsModel classes are derived from the QObject class, therefore a parent-child relation could be established to manage the lifetime of an OptionsModel object. This commit does not change behavior.
This commit is contained in:
parent
5236b2e267
commit
8e08d00598
1 changed files with 1 additions and 3 deletions
|
@ -210,8 +210,6 @@ BitcoinApplication::~BitcoinApplication()
|
|||
|
||||
delete window;
|
||||
window = nullptr;
|
||||
delete optionsModel;
|
||||
optionsModel = nullptr;
|
||||
delete platformStyle;
|
||||
platformStyle = nullptr;
|
||||
}
|
||||
|
@ -225,7 +223,7 @@ void BitcoinApplication::createPaymentServer()
|
|||
|
||||
void BitcoinApplication::createOptionsModel(bool resetSettings)
|
||||
{
|
||||
optionsModel = new OptionsModel(m_node, nullptr, resetSettings);
|
||||
optionsModel = new OptionsModel(m_node, this, resetSettings);
|
||||
}
|
||||
|
||||
void BitcoinApplication::createWindow(const NetworkStyle *networkStyle)
|
||||
|
|
Loading…
Add table
Reference in a new issue