Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
ea53e58f
Commit
ea53e58f
authored
Jan 19, 2021
by
Robert Applin
Browse files
Refs #30362. Remove changes to indirect for safety.
parent
82605af1
Changes
16
Hide whitespace changes
Inline
Side-by-side
qt/scientific_interfaces/DynamicPDF/DPDFFourierTransform.cpp
View file @
ea53e58f
...
...
@@ -51,12 +51,7 @@ FourierTransform::FourierTransform(QWidget *parent)
/**
* @brief Destructor
*/
FourierTransform
::~
FourierTransform
()
{
m_propertyTree
->
unsetFactoryForManager
(
m_doubleManager
);
m_propertyTree
->
unsetFactoryForManager
(
m_boolManager
);
m_propertyTree
->
unsetFactoryForManager
(
m_enumManager
);
delete
m_propertyTree
;
}
FourierTransform
::~
FourierTransform
()
{
delete
m_propertyTree
;
}
/* *********************
* ** Private Slots **
...
...
qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.cpp
View file @
ea53e58f
...
...
@@ -37,15 +37,6 @@ namespace IDA {
FunctionTemplateBrowser
::
FunctionTemplateBrowser
(
QWidget
*
parent
)
:
QWidget
(
parent
),
m_decimals
(
6
)
{}
FunctionTemplateBrowser
::~
FunctionTemplateBrowser
()
{
m_browser
->
unsetFactoryForManager
(
m_stringManager
);
m_browser
->
unsetFactoryForManager
(
m_doubleManager
);
m_browser
->
unsetFactoryForManager
(
m_intManager
);
m_browser
->
unsetFactoryForManager
(
m_boolManager
);
m_browser
->
unsetFactoryForManager
(
m_enumManager
);
m_browser
->
unsetFactoryForManager
(
m_parameterManager
);
}
void
FunctionTemplateBrowser
::
createBrowser
()
{
m_stringManager
=
new
QtStringPropertyManager
(
this
);
m_doubleManager
=
new
QtDoublePropertyManager
(
this
);
...
...
qt/scientific_interfaces/Indirect/FunctionTemplateBrowser.h
View file @
ea53e58f
...
...
@@ -44,7 +44,7 @@ class MANTIDQT_INDIRECT_DLL FunctionTemplateBrowser : public QWidget {
Q_OBJECT
public:
FunctionTemplateBrowser
(
QWidget
*
parent
);
virtual
~
FunctionTemplateBrowser
();
virtual
~
FunctionTemplateBrowser
()
=
default
;
void
init
();
virtual
void
setFunction
(
const
QString
&
funStr
)
=
0
;
...
...
qt/scientific_interfaces/Indirect/ISISCalibration.cpp
View file @
ea53e58f
...
...
@@ -198,10 +198,7 @@ ISISCalibration::ISISCalibration(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ISISCalibration
::~
ISISCalibration
()
{
m_propTrees
[
"CalPropTree"
]
->
unsetFactoryForManager
(
m_dblManager
);
m_propTrees
[
"ResPropTree"
]
->
unsetFactoryForManager
(
m_dblManager
);
}
ISISCalibration
::~
ISISCalibration
()
{}
std
::
pair
<
double
,
double
>
ISISCalibration
::
peakRange
()
const
{
return
std
::
make_pair
(
m_dblManager
->
value
(
m_properties
[
"CalPeakMin"
]),
...
...
qt/scientific_interfaces/Indirect/ISISDiagnostics.cpp
View file @
ea53e58f
...
...
@@ -149,10 +149,7 @@ ISISDiagnostics::ISISDiagnostics(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
ISISDiagnostics
::~
ISISDiagnostics
()
{
m_propTrees
[
"SlicePropTree"
]
->
unsetFactoryForManager
(
m_dblManager
);
m_propTrees
[
"SlicePropTree"
]
->
unsetFactoryForManager
(
m_blnManager
);
}
ISISDiagnostics
::~
ISISDiagnostics
()
{}
void
ISISDiagnostics
::
setup
()
{}
...
...
qt/scientific_interfaces/Indirect/IndirectBayesTab.cpp
View file @
ea53e58f
...
...
@@ -18,9 +18,7 @@ IndirectBayesTab::IndirectBayesTab(QWidget *parent)
SLOT
(
updateProperties
(
QtProperty
*
,
double
)));
}
IndirectBayesTab
::~
IndirectBayesTab
()
{
m_propTree
->
unsetFactoryForManager
(
m_dblManager
);
}
IndirectBayesTab
::~
IndirectBayesTab
()
{}
/**
* Prevents the loading of data with incorrect naming if passed true
...
...
qt/scientific_interfaces/Indirect/IndirectDataAnalysisElwinTab.cpp
View file @
ea53e58f
...
...
@@ -105,11 +105,6 @@ 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
();
...
...
qt/scientific_interfaces/Indirect/IndirectDataAnalysisElwinTab.h
View file @
ea53e58f
...
...
@@ -18,7 +18,6 @@ class DLLExport IndirectDataAnalysisElwinTab : public IndirectDataAnalysisTab {
public:
IndirectDataAnalysisElwinTab
(
QWidget
*
parent
=
nullptr
);
~
IndirectDataAnalysisElwinTab
();
private:
void
run
()
override
;
...
...
qt/scientific_interfaces/Indirect/IndirectDataAnalysisIqtTab.cpp
View file @
ea53e58f
...
...
@@ -155,10 +155,6 @@ 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
);
...
...
qt/scientific_interfaces/Indirect/IndirectDataAnalysisIqtTab.h
View file @
ea53e58f
...
...
@@ -17,7 +17,6 @@ class DLLExport IndirectDataAnalysisIqtTab : public IndirectDataAnalysisTab {
public:
IndirectDataAnalysisIqtTab
(
QWidget
*
parent
=
nullptr
);
~
IndirectDataAnalysisIqtTab
();
private:
void
run
()
override
;
...
...
qt/scientific_interfaces/Indirect/IndirectMoments.cpp
View file @
ea53e58f
...
...
@@ -84,9 +84,7 @@ IndirectMoments::IndirectMoments(IndirectDataReduction *idrUI, QWidget *parent)
//----------------------------------------------------------------------------------------------
/** Destructor
*/
IndirectMoments
::~
IndirectMoments
()
{
m_propTrees
[
"MomentsPropTree"
]
->
unsetFactoryForManager
(
m_dblManager
);
}
IndirectMoments
::~
IndirectMoments
()
{}
void
IndirectMoments
::
setup
()
{}
...
...
qt/scientific_interfaces/Indirect/IndirectSymmetrise.cpp
View file @
ea53e58f
...
...
@@ -165,9 +165,7 @@ IndirectSymmetrise::IndirectSymmetrise(IndirectDataReduction *idrUI,
//----------------------------------------------------------------------------------------------
/** Destructor
*/
IndirectSymmetrise
::~
IndirectSymmetrise
()
{
m_propTrees
[
"SymmPropTree"
]
->
unsetFactoryForManager
(
m_dblManager
);
}
IndirectSymmetrise
::~
IndirectSymmetrise
()
{}
void
IndirectSymmetrise
::
setup
()
{}
...
...
qt/scientific_interfaces/Indirect/test/CMakeLists.txt
View file @
ea53e58f
...
...
@@ -4,7 +4,6 @@ set(
ConvFitDataPresenterTest.h
ConvFitModelTest.h
ConvFunctionModelTest.h
FunctionTemplateBrowserTest.h
IndirectDataValidationHelperTest.h
IndirectDataTablePresenterTest.h
IndirectFitAnalysisTabTest.h
...
...
qt/scientific_interfaces/Indirect/test/FunctionTemplateBrowserTest.h
deleted
100644 → 0
View file @
82605af1
// Mantid Repository : https://github.com/mantidproject/mantid
//
// Copyright © 2020 ISIS Rutherford Appleton Laboratory UKRI,
// NScD Oak Ridge National Laboratory, European Spallation Source,
// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
// SPDX - License - Identifier: GPL - 3.0 +
#pragma once
#include
"FunctionTemplateBrowser.h"
#include
<cxxtest/TestSuite.h>
#include
<memory>
using
namespace
MantidQt
::
CustomInterfaces
::
IDA
;
/*
* This test was created in response to finding an unreliable Read Access
* Violation when creating the FunctionTemplateBrowser. This failure would
* happen once every 100-200 attempts to instantiate this class.
*
* Its cause was a dangling pointer to a manager object being left behind when
* destructing a FunctionTemplateBrowser. This dangling point was still existing
* in a global static variable (m_managerToFactoryToViews or
* m_viewToManagerToFactory) in qtpropertybrowser.cpp. When creating a new
* instance of FunctionTemplateBrowser, the memory location would sometimes be
* reused, causing problems.
* The solution used to fix this was to do:
* m_browser->unsetFactoryForManager(m_manager)
* in the destructor of FunctionTemplateBrowser.
*/
class
FunctionTemplateBrowserTest
:
public
CxxTest
::
TestSuite
{
public:
static
FunctionTemplateBrowserTest
*
createSuite
()
{
return
new
FunctionTemplateBrowserTest
;
}
static
void
destroySuite
(
FunctionTemplateBrowserTest
*
suite
)
{
delete
suite
;
}
void
setUp
()
override
{
m_numberOfTries
=
100u
;
}
void
tearDown
()
override
{
m_functionTreeView
.
reset
();
}
void
test_that_the_FunctionTemplateBrowserTest_can_be_instantiated_many_times_without_instability
()
{
for
(
auto
i
=
0u
;
i
<
m_numberOfTries
;
++
i
)
m_functionTreeView
=
std
::
make_unique
<
FunctionTemplateBrowser
>
(
nullptr
);
}
private:
std
::
size_t
m_numberOfTries
;
std
::
unique_ptr
<
FunctionTemplateBrowser
>
m_functionTreeView
;
};
qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/InstrumentWidgetMaskTab.h
View file @
ea53e58f
...
...
@@ -73,7 +73,6 @@ public:
};
explicit
InstrumentWidgetMaskTab
(
InstrumentWidget
*
instrWidget
);
~
InstrumentWidgetMaskTab
();
void
initSurface
()
override
;
void
setMode
(
Mode
mode
);
void
selectTool
(
Activity
tool
);
...
...
qt/widgets/instrumentview/src/InstrumentWidgetMaskTab.cpp
View file @
ea53e58f
...
...
@@ -370,10 +370,6 @@ InstrumentWidgetMaskTab::InstrumentWidgetMaskTab(InstrumentWidget *instrWidget)
SLOT
(
enableApplyButtons
()));
}
InstrumentWidgetMaskTab
::~
InstrumentWidgetMaskTab
()
{
m_browser
->
unsetFactoryForManager
(
m_doubleManager
);
}
/**
* Initialize the tab when new projection surface is created.
*/
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment