mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-14 01:03:08 -07:00
Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
This commit is contained in:
parent
fa43dab3a2
commit
a6cdba17f0
3 changed files with 5 additions and 9 deletions
|
@ -57,14 +57,10 @@ struct ScanFoldersModel::PathData
|
|||
|
||||
ScanFoldersModel *ScanFoldersModel::m_instance = nullptr;
|
||||
|
||||
bool ScanFoldersModel::initInstance(QObject *parent)
|
||||
void ScanFoldersModel::initInstance()
|
||||
{
|
||||
if (!m_instance) {
|
||||
m_instance = new ScanFoldersModel(parent);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
if (!m_instance)
|
||||
m_instance = new ScanFoldersModel;
|
||||
}
|
||||
|
||||
void ScanFoldersModel::freeInstance()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue