Commit 82605af1 authored by Robert Applin's avatar Robert Applin
Browse files

Refs #30362. Unset factory manager in destructors.

parent c0a2b210
......@@ -51,7 +51,12 @@ FourierTransform::FourierTransform(QWidget *parent)
/**
* @brief Destructor
*/
FourierTransform::~FourierTransform() { delete m_propertyTree; }
FourierTransform::~FourierTransform() {
m_propertyTree->unsetFactoryForManager(m_doubleManager);
m_propertyTree->unsetFactoryForManager(m_boolManager);
m_propertyTree->unsetFactoryForManager(m_enumManager);
delete m_propertyTree;
}
/* *********************
* ** Private Slots **
......
......@@ -198,7 +198,10 @@ ISISCalibration::ISISCalibration(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ISISCalibration::~ISISCalibration() {}
ISISCalibration::~ISISCalibration() {
m_propTrees["CalPropTree"]->unsetFactoryForManager(m_dblManager);
m_propTrees["ResPropTree"]->unsetFactoryForManager(m_dblManager);
}
std::pair<double, double> ISISCalibration::peakRange() const {
return std::make_pair(m_dblManager->value(m_properties["CalPeakMin"]),
......
......@@ -149,7 +149,10 @@ ISISDiagnostics::ISISDiagnostics(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ISISDiagnostics::~ISISDiagnostics() {}
ISISDiagnostics::~ISISDiagnostics() {
m_propTrees["SlicePropTree"]->unsetFactoryForManager(m_dblManager);
m_propTrees["SlicePropTree"]->unsetFactoryForManager(m_blnManager);
}
void ISISDiagnostics::setup() {}
......
......@@ -18,7 +18,9 @@ IndirectBayesTab::IndirectBayesTab(QWidget *parent)
SLOT(updateProperties(QtProperty *, double)));
}
IndirectBayesTab::~IndirectBayesTab() {}
IndirectBayesTab::~IndirectBayesTab() {
m_propTree->unsetFactoryForManager(m_dblManager);
}
/**
* Prevents the loading of data with incorrect naming if passed true
......
......@@ -105,6 +105,11 @@ IndirectDataAnalysisElwinTab::IndirectDataAnalysisElwinTab(QWidget *parent)
m_uiForm.ipoPlotOptions, this, PlotWidget::Spectra));
}
IndirectDataAnalysisElwinTab::~IndirectDataAnalysisElwinTab() {
m_elwTree->unsetFactoryForManager(m_dblManager);
m_elwTree->unsetFactoryForManager(m_blnManager);
}
void IndirectDataAnalysisElwinTab::setup() {
// Create QtTreePropertyBrowser object
m_elwTree = new QtTreePropertyBrowser();
......
......@@ -18,6 +18,7 @@ class DLLExport IndirectDataAnalysisElwinTab : public IndirectDataAnalysisTab {
public:
IndirectDataAnalysisElwinTab(QWidget *parent = nullptr);
~IndirectDataAnalysisElwinTab();
private:
void run() override;
......
......@@ -155,6 +155,10 @@ IndirectDataAnalysisIqtTab::IndirectDataAnalysisIqtTab(QWidget *parent)
m_uiForm.ipoPlotOptions, this, PlotWidget::SpectraTiled));
}
IndirectDataAnalysisIqtTab::~IndirectDataAnalysisIqtTab() {
m_iqtTree->unsetFactoryForManager(m_dblManager);
}
void IndirectDataAnalysisIqtTab::setup() {
m_iqtTree = new QtTreePropertyBrowser();
m_uiForm.properties->addWidget(m_iqtTree);
......
......@@ -17,6 +17,7 @@ class DLLExport IndirectDataAnalysisIqtTab : public IndirectDataAnalysisTab {
public:
IndirectDataAnalysisIqtTab(QWidget *parent = nullptr);
~IndirectDataAnalysisIqtTab();
private:
void run() override;
......
......@@ -84,7 +84,9 @@ IndirectMoments::IndirectMoments(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
IndirectMoments::~IndirectMoments() {}
IndirectMoments::~IndirectMoments() {
m_propTrees["MomentsPropTree"]->unsetFactoryForManager(m_dblManager);
}
void IndirectMoments::setup() {}
......
......@@ -165,7 +165,9 @@ IndirectSymmetrise::IndirectSymmetrise(IndirectDataReduction *idrUI,
//----------------------------------------------------------------------------------------------
/** Destructor
*/
IndirectSymmetrise::~IndirectSymmetrise() {}
IndirectSymmetrise::~IndirectSymmetrise() {
m_propTrees["SymmPropTree"]->unsetFactoryForManager(m_dblManager);
}
void IndirectSymmetrise::setup() {}
......
......@@ -73,6 +73,7 @@ public:
};
explicit InstrumentWidgetMaskTab(InstrumentWidget *instrWidget);
~InstrumentWidgetMaskTab();
void initSurface() override;
void setMode(Mode mode);
void selectTool(Activity tool);
......
......@@ -370,6 +370,10 @@ InstrumentWidgetMaskTab::InstrumentWidgetMaskTab(InstrumentWidget *instrWidget)
SLOT(enableApplyButtons()));
}
InstrumentWidgetMaskTab::~InstrumentWidgetMaskTab() {
m_browser->unsetFactoryForManager(m_doubleManager);
}
/**
* Initialize the tab when new projection surface is created.
*/
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment