diff --git a/Core/Tools/inc/Bin.h b/Core/Tools/inc/Bin.h index c33c9a67f6ece21b060b1b275959bf5cfcca0609..c4d487501b92d066983f47485f51a7396ebde970 100644 --- a/Core/Tools/inc/Bin.h +++ b/Core/Tools/inc/Bin.h @@ -28,7 +28,7 @@ struct BA_CORE_API_ Bin1D { - Bin1D() {} + Bin1D() : m_lower(0), m_upper(0) {} Bin1D(double lower, double upper) : m_lower(lower), m_upper(upper) {} double m_lower; //!< lower bound of the bin double m_upper; //!< upper bound of the bin diff --git a/Core/Tools/src/FileSystem.cpp b/Core/Tools/src/FileSystem.cpp index ca286a8c1fb5dcc7824532ae43bbd363ea5861f4..0cccb380a5eee57d7197282cd44112fff536f43a 100644 --- a/Core/Tools/src/FileSystem.cpp +++ b/Core/Tools/src/FileSystem.cpp @@ -44,7 +44,6 @@ std::string Utils::FileSystem::GetWorkingPath() std::string Utils::FileSystem::GetHomePath() { throw NotImplementedException("Utils::FileSystem::GetHomePath()-> Not implemented anymore..."); - return std::string(); } std::string Utils::FileSystem::GetPathToExecutable(const std::string& argv0) diff --git a/Fit/FitKernel/src/FitSuitePrintObserver.cpp b/Fit/FitKernel/src/FitSuitePrintObserver.cpp index 9f10260c2ead4dc10ff55f882bcec8357afbd75d..a1df6a6f522d45131bc1c4a60a3361caec278dbd 100644 --- a/Fit/FitKernel/src/FitSuitePrintObserver.cpp +++ b/Fit/FitKernel/src/FitSuitePrintObserver.cpp @@ -19,6 +19,7 @@ FitSuitePrintObserver::FitSuitePrintObserver(int print_every_nth) : IFitObserver(print_every_nth) + , m_fit_suite(0) { m_last_call_time = boost::posix_time::second_clock::local_time(); } diff --git a/GUI/coregui/Models/GUIObjectBuilder.cpp b/GUI/coregui/Models/GUIObjectBuilder.cpp index 0482ea60a7def0d5149ff4c03468835d9d1056be..81f061d9a67aaed0755278dc277bd44305620d3f 100644 --- a/GUI/coregui/Models/GUIObjectBuilder.cpp +++ b/GUI/coregui/Models/GUIObjectBuilder.cpp @@ -694,6 +694,4 @@ MaterialProperty GUIObjectBuilder::createMaterialFromDomain( throw GUIHelpers::Error("GUIObjectBuilder::createMaterialFromDomain()" " -> Not implemented."); } - - return MaterialProperty(); } diff --git a/GUI/coregui/Models/PythonScriptSampleBuilder.cpp b/GUI/coregui/Models/PythonScriptSampleBuilder.cpp deleted file mode 100644 index 85f4e1e2e25d5288e935785aaea5491e40d49ca9..0000000000000000000000000000000000000000 --- a/GUI/coregui/Models/PythonScriptSampleBuilder.cpp +++ /dev/null @@ -1,74 +0,0 @@ -// ************************************************************************** // -// -// BornAgain: simulate and fit scattering at grazing incidence -// -//! @file coregui/Models/PythonScriptSampleBuilder.cpp -//! @brief Implements class PythonScriptSampleBuilder -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2015 -//! @authors Scientific Computing Group at MLZ Garching -//! @authors C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke -// -// ************************************************************************** // - -#include "PythonScriptSampleBuilder.h" - -#include <cstring> -#include <QByteArray> - -#include <Python.h> -#include <boost/python.hpp> - -namespace bp = boost::python; - -const char *PythonScriptSampleBuilder::m_class_name = "PythonSampleBuilder"; -const char *PythonScriptSampleBuilder::m_const_function_name = "buildSample"; - -PythonScriptSampleBuilder::PythonScriptSampleBuilder(QString script_path) - : m_script_path(script_path) -{ -} - -PythonScriptSampleBuilder::~PythonScriptSampleBuilder() -{ - // release python objects -} - -ISample *PythonScriptSampleBuilder::buildSample() const -{ - PyObject *pName, *pModule, *pDict, *pClass, *pInstance, *pValue; - Py_Initialize(); - // add path to script: - QString addPathPython("sys.path.append('"); - addPathPython.append(m_script_path.path()); - addPathPython.append("')"); - QByteArray path_command = addPathPython.toLocal8Bit(); - PyRun_SimpleString("import sys"); - PyRun_SimpleString(path_command.data()); - PyRun_SimpleString("sys.path.append('/Users/herck/Development/git/BornAgain/lib')"); - // use predefined function in python module to create a pyobject - // which is then 'extracted' to ISample* by boost::python - // build the name object - QByteArray script_name = m_script_path.completeBaseName().toLocal8Bit(); - pName = PyString_FromString(script_name.data()); - - // load the module object - pModule = PyImport_Import(pName); - - // pDict is a borrowed reference - pDict = PyModule_GetDict(pModule); - - // get class and instance - pClass = PyDict_GetItemString(pDict, m_class_name); - pInstance = PyObject_CallObject(pClass, 0); - - // get the ISample PyObject - char function_name[12]; - std::strcpy(function_name, m_const_function_name); - pValue = PyObject_CallMethod(pInstance, function_name, 0); - ISample *pResult = bp::extract<ISample *>(pValue); - - return pResult; -} diff --git a/GUI/coregui/Models/PythonScriptSampleBuilder.h b/GUI/coregui/Models/PythonScriptSampleBuilder.h deleted file mode 100644 index 94f5e0afd607ee952929cd71afae8e02d2c8d74f..0000000000000000000000000000000000000000 --- a/GUI/coregui/Models/PythonScriptSampleBuilder.h +++ /dev/null @@ -1,37 +0,0 @@ -// ************************************************************************** // -// -// BornAgain: simulate and fit scattering at grazing incidence -// -//! @file coregui/Models/PythonScriptSampleBuilder.h -//! @brief Defines class PythonScriptSampleBuilder -//! -//! @homepage http://www.bornagainproject.org -//! @license GNU General Public License v3 or higher (see COPYING) -//! @copyright Forschungszentrum Jülich GmbH 2015 -//! @authors Scientific Computing Group at MLZ Garching -//! @authors C. Durniak, M. Ganeva, G. Pospelov, W. Van Herck, J. Wuttke -// -// ************************************************************************** // - -#ifndef PYTHONSCRIPTSAMPLEBUILDER_H -#define PYTHONSCRIPTSAMPLEBUILDER_H - - -#include "ISampleBuilder.h" - -#include <QFileInfo> - -class BA_CORE_API_ PythonScriptSampleBuilder : public ISampleBuilder -{ -public: - PythonScriptSampleBuilder(QString script_path); - virtual ~PythonScriptSampleBuilder(); - - virtual ISample *buildSample() const; -private: - QFileInfo m_script_path; - static const char *m_class_name; - static const char *m_const_function_name; -}; - -#endif // PYTHONSCRIPTSAMPLEBUILDER_H diff --git a/GUI/coregui/Views/InfoWidgets/GroupBox.cpp b/GUI/coregui/Views/InfoWidgets/GroupBox.cpp index 9d382589eebd8189df1828596a8780fb801cddb4..99afcba72f6446f534d3c32b7903f0b8065a4bf2 100644 --- a/GUI/coregui/Views/InfoWidgets/GroupBox.cpp +++ b/GUI/coregui/Views/InfoWidgets/GroupBox.cpp @@ -33,7 +33,10 @@ namespace int offset_of_icon_position = 24; } -GroupBox::GroupBox( QWidget *parent ): QGroupBox( parent ) +GroupBox::GroupBox( QWidget *parent ) + : QGroupBox( parent ) + , m_xImage(0) + , m_yImage(0) { setMouseTracking(true); } diff --git a/GUI/coregui/Views/JobView.cpp b/GUI/coregui/Views/JobView.cpp index 08485afc971e07b0bc0f7c5fce7833684221bc69..008168d9719a9131be713f4850acba7cafa13154 100644 --- a/GUI/coregui/Views/JobView.cpp +++ b/GUI/coregui/Views/JobView.cpp @@ -45,6 +45,7 @@ JobViewPrivate::JobViewPrivate(JobModel *jobModel, ProjectManager *projectManage : m_jobModel(jobModel) , m_jobSelector(0) , m_jobOutputDataWidget(0) + , m_jobRealTimeWidget(0) , m_progressBar(0) , m_projectManager(projectManager) { diff --git a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp index 629aa045090e55e52c360431ab99cde20432c1c6..290553f88ac60c5e870b5a4fd27b6ba8f0b5bb6e 100644 --- a/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp +++ b/GUI/coregui/Views/JobWidgets/ModelTuningDelegate.cpp @@ -88,6 +88,10 @@ double ModelTuningDelegate::SliderData::slider_to_value(int slider) ModelTuningDelegate::ModelTuningDelegate(QObject *parent) : QItemDelegate(parent) , m_valueColumn(1) + , m_slider(0) + , m_valueBox(0) + , m_contentWidget(0) + , m_contentLayout(0) { } diff --git a/GUI/coregui/Views/MaskWidgets/MaskEditorPropertyPanel.cpp b/GUI/coregui/Views/MaskWidgets/MaskEditorPropertyPanel.cpp index db79e90173cf16e9464429f7aad1be42aaf04ae0..d38187247490e89c58655f60dfca1b4958e7d397 100644 --- a/GUI/coregui/Views/MaskWidgets/MaskEditorPropertyPanel.cpp +++ b/GUI/coregui/Views/MaskWidgets/MaskEditorPropertyPanel.cpp @@ -33,6 +33,7 @@ MaskEditorPropertyPanel::MaskEditorPropertyPanel(QWidget *parent) , m_listView(new QListView) , m_maskPropertyEditor(new AwesomePropertyEditor) , m_plotPropertyEditor(new AwesomePropertyEditor) + , m_maskModel(0) { setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Expanding); setObjectName(QLatin1String("MaskEditorToolPanel")); diff --git a/GUI/coregui/Views/MaskWidgets/MaskResultsPresenter.cpp b/GUI/coregui/Views/MaskWidgets/MaskResultsPresenter.cpp index d38bff19eb53efded47f9c30770067b45b4f08ca..da9dc0c50d8ed12e00fbd0c6ed8bd3d8bd4e5676 100644 --- a/GUI/coregui/Views/MaskWidgets/MaskResultsPresenter.cpp +++ b/GUI/coregui/Views/MaskWidgets/MaskResultsPresenter.cpp @@ -27,6 +27,7 @@ MaskResultsPresenter::MaskResultsPresenter(QWidget *parent) : QObject(parent) + , m_interpolation_flag_backup(false) { } diff --git a/GUI/coregui/Views/SampleDesigner/NodeEditor.cpp b/GUI/coregui/Views/SampleDesigner/NodeEditor.cpp index 69e149b63682d142b6a98df2d3f0ba2987ced862..20b038eba6ff1eb77855bbe17e6d1b06bd95d193 100644 --- a/GUI/coregui/Views/SampleDesigner/NodeEditor.cpp +++ b/GUI/coregui/Views/SampleDesigner/NodeEditor.cpp @@ -22,8 +22,10 @@ #include <QGraphicsSceneMouseEvent> -NodeEditor::NodeEditor(QObject *parent) : - QObject(parent) +NodeEditor::NodeEditor(QObject *parent) + : QObject(parent) + , scene(0) + , conn(0) { conn = 0; } @@ -74,6 +76,7 @@ bool NodeEditor::eventFilter(QObject *o, QEvent *e) } break; } + break; } } case QEvent::GraphicsSceneMouseMove: diff --git a/GUI/coregui/Views/SimulationWidgets/SimulationSetupWidget.cpp b/GUI/coregui/Views/SimulationWidgets/SimulationSetupWidget.cpp index 440e832b32ee1a0b355d78bc5d49dec7dbdb213e..808ba39aa2a8dc7c64bd78ce580b802a71511fa0 100644 --- a/GUI/coregui/Views/SimulationWidgets/SimulationSetupWidget.cpp +++ b/GUI/coregui/Views/SimulationWidgets/SimulationSetupWidget.cpp @@ -16,7 +16,6 @@ #include "SimulationSetupWidget.h" #include "GISASSimulation.h" #include "mainwindow.h" -#include "PythonScriptSampleBuilder.h" #include "JobModel.h" #include "MultiLayerItem.h" #include "InstrumentItem.h" diff --git a/GUI/coregui/mainwindow/projectdocument.cpp b/GUI/coregui/mainwindow/projectdocument.cpp index 854f86d184d5ce358873e345b4cb5b4f00ba41eb..e6f062693382d20cb75c40e5dea4d55ec9d7499b 100644 --- a/GUI/coregui/mainwindow/projectdocument.cpp +++ b/GUI/coregui/mainwindow/projectdocument.cpp @@ -373,8 +373,11 @@ void ProjectDocument::loadOutputData() QString filename = getProjectDir() + "/" + dataItem->itemName(); QFileInfo info(filename); if (info.exists()) { - jobItem->getIntensityDataItem()->setOutputData( - IntensityDataIOFactory::readOutputData(filename.toStdString())); + IntensityDataItem *intensityItem = jobItem->getIntensityDataItem(); + if(intensityItem) { + intensityItem->setOutputData( + IntensityDataIOFactory::readOutputData(filename.toStdString())); + } } else { jobItem->setStatus(Constants::STATUS_FAILED); QString warning("Error while loading job from file, intensity data file '"); diff --git a/GUI/externals/qt-manhattan-style/progressbar.cpp b/GUI/externals/qt-manhattan-style/progressbar.cpp index 7f135a30b88bc1442009be2f4c965c06e76dc2d8..cef9022fa5c51f9e3bac024b4a9ae37c55b1bcf2 100644 --- a/GUI/externals/qt-manhattan-style/progressbar.cpp +++ b/GUI/externals/qt-manhattan-style/progressbar.cpp @@ -44,7 +44,7 @@ using namespace Manhattan; #define CANCELBUTTON_SIZE 15 ProgressBar::ProgressBar(QWidget *parent) - : QWidget(parent), m_error(false), m_minimum(1), m_maximum(100), m_value(1), m_cancelButtonFader(0), m_finished(false) + : QWidget(parent), m_error(false), m_progressHeight(0), m_minimum(1), m_maximum(100), m_value(1), m_cancelButtonFader(0), m_finished(false) { setSizePolicy(QSizePolicy::Minimum, QSizePolicy::Fixed); setMouseTracking(true); diff --git a/ThirdParty/RootMinimizers/src/Math/GSLMinimizer1D.cxx b/ThirdParty/RootMinimizers/src/Math/GSLMinimizer1D.cxx index 0256a02514ca37ec89cc0e38d0c6947d50815ed8..27e388a173d87d8e51d5c201ab43e2cc89ef582a 100644 --- a/ThirdParty/RootMinimizers/src/Math/GSLMinimizer1D.cxx +++ b/ThirdParty/RootMinimizers/src/Math/GSLMinimizer1D.cxx @@ -83,7 +83,8 @@ GSLMinimizer1D::~GSLMinimizer1D() if (fFunction) delete fFunction; } -GSLMinimizer1D::GSLMinimizer1D(const GSLMinimizer1D &): IMinimizer1D() +GSLMinimizer1D::GSLMinimizer1D(const GSLMinimizer1D &) + : IMinimizer1D() { // dummy copy ctr }