mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-22 08:27:24 -06:00
Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user