From 84ef36bfbda731645ebf9cf4027d4303413436b6 Mon Sep 17 00:00:00 2001 From: Edward Brown <edward.brown@stfc.ac.uk> Date: Thu, 15 Mar 2018 10:36:40 +0000 Subject: [PATCH] Re #22048: Applied fixes to qt. --- .../ISISReflectometry/MeasurementItem.h | 2 +- .../ReflMeasureTransferStrategy.cpp | 5 +- .../ISISReflectometry/ReflSearchModel.h | 2 +- .../ISISReflectometry/ReflTableSchema.h | 8 ++-- .../ISISReflectometry/ReflTransferStrategy.h | 2 +- .../ISISSANS/SANSRunWindow.cpp | 5 +- .../ISISSANS/SANSRunWindow.h | 5 +- .../Muon/IALCBaselineModellingModel.h | 2 +- .../Muon/IALCBaselineModellingView.h | 4 +- .../Muon/MuonAnalysisFitDataPresenter.cpp | 3 +- .../Muon/MuonAnalysisFitDataPresenter.h | 4 +- .../Muon/MuonAnalysisHelper.cpp | 2 +- .../Muon/MuonAnalysisResultTableCreator.h | 4 +- .../Muon/MuonAnalysisResultTableTab.h | 2 +- .../test/ALCDataLoadingPresenterTest.h | 2 +- .../Common/AlgorithmInputHistory.h | 3 +- .../Common/AlgorithmSelectorWidget.h | 2 +- .../Common/BatchAlgorithmRunner.h | 5 +- .../Common/FindFilesThreadPoolManager.h | 3 +- .../Common/FitOptionsBrowser.h | 4 +- .../MantidQtWidgets/Common/InterfaceFactory.h | 6 +-- .../inc/MantidQtWidgets/Common/Message.h | 2 +- .../MantidQtWidgets/Common/PythonThreading.h | 2 +- .../CompositeEditorFactory.h | 2 +- .../QtPropertyBrowser/qteditorfactory.h | 6 +-- .../QtPropertyBrowser/qtpropertymanager.h | 46 +++++++++---------- .../QtPropertyBrowser/qttreepropertybrowser.h | 4 +- .../QtPropertyBrowser/qtvariantproperty.h | 2 +- .../MantidQtWidgets/Common/SaveWorkspaces.h | 2 +- .../Common/SelectionNotificationService.h | 3 +- .../Common/SlicingAlgorithmDialog.h | 2 +- .../inc/MantidQtWidgets/Common/pqHelpWindow.h | 2 +- .../common/src/AlgorithmPropertiesWidget.cpp | 2 +- .../common/src/AlgorithmSelectorWidget.cpp | 2 +- .../QtPropertyBrowser/qtpropertybrowser.cpp | 8 +--- .../QtPropertyBrowser/qtpropertymanager.cpp | 22 ++++----- .../QtPropertyBrowser/qtvariantproperty.cpp | 2 +- .../common/src/SelectWorkspacesDialog.cpp | 2 +- qt/widgets/common/src/pqHelpWindow.cxx | 4 +- .../InstrumentView/ProjectionSurface.h | 2 +- .../src/StartLiveDataDialog.cpp | 7 +-- .../SliceViewer/CompositePeaksPresenter.h | 2 +- .../SliceViewer/ConcretePeaksPresenter.h | 2 +- .../SliceViewer/PeakBoundingBox.h | 14 +++--- .../SliceViewer/PeakOverlayView.h | 4 +- .../SliceViewer/PeakOverlayViewFactory.h | 2 +- .../MantidQtWidgets/SliceViewer/PeakPalette.h | 2 +- .../SliceViewer/PeakRepresentation.h | 6 +-- .../SliceViewer/PeaksPresenter.h | 7 ++- .../SliceViewer/QPeaksTableModel.h | 8 ++-- .../test/ConcretePeaksPresenterTest.h | 5 +- .../test/PeakRepresentationCrossTest.h | 6 +-- .../test/PeakRepresentationSphereTest.h | 6 +-- .../SpectrumViewer/ArrayDataSource.h | 4 +- .../SpectrumViewer/DataArray.h | 4 +- .../SpectrumViewer/MatrixWSDataSource.h | 5 +- .../SpectrumViewer/SpectrumDataSource.h | 5 +- 57 files changed, 127 insertions(+), 154 deletions(-) diff --git a/qt/scientific_interfaces/ISISReflectometry/MeasurementItem.h b/qt/scientific_interfaces/ISISReflectometry/MeasurementItem.h index d526bf200c3..a2c75848ce2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/MeasurementItem.h +++ b/qt/scientific_interfaces/ISISReflectometry/MeasurementItem.h @@ -33,7 +33,7 @@ namespace CustomInterfaces { class MANTIDQT_ISISREFLECTOMETRY_DLL MeasurementItem { public: - typedef std::string IDType; + using IDType = std::string; /// Constructor MeasurementItem(const IDType &measurementItemId, const IDType &subId, diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflMeasureTransferStrategy.cpp b/qt/scientific_interfaces/ISISReflectometry/ReflMeasureTransferStrategy.cpp index 30709e65744..334aef8c297 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflMeasureTransferStrategy.cpp +++ b/qt/scientific_interfaces/ISISReflectometry/ReflMeasureTransferStrategy.cpp @@ -43,9 +43,8 @@ TransferResults MantidQt::CustomInterfaces::ReflMeasureTransferStrategy::transferRuns( SearchResultMap &searchResults, Mantid::Kernel::ProgressBase &progress) { - typedef std::vector<MeasurementItem> VecSameMeasurement; - typedef std::map<MeasurementItem::IDType, VecSameMeasurement> - MapGroupedMeasurement; + using VecSameMeasurement = std::vector<MeasurementItem>; + using MapGroupedMeasurement = std::map<MeasurementItem::IDType, VecSameMeasurement>; // table-like output for successful runs std::vector<std::map<std::string, std::string>> runs; diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflSearchModel.h b/qt/scientific_interfaces/ISISReflectometry/ReflSearchModel.h index a9e687d12ee..62795fc59c5 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflSearchModel.h +++ b/qt/scientific_interfaces/ISISReflectometry/ReflSearchModel.h @@ -72,7 +72,7 @@ protected: }; /// Typedef for a shared pointer to \c ReflSearchModel -typedef boost::shared_ptr<ReflSearchModel> ReflSearchModel_sptr; +using ReflSearchModel_sptr = boost::shared_ptr<ReflSearchModel>; } // namespace CustomInterfaces } // namespace Mantid diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflTableSchema.h b/qt/scientific_interfaces/ISISReflectometry/ReflTableSchema.h index 7b439c644bb..73de805ca1e 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflTableSchema.h +++ b/qt/scientific_interfaces/ISISReflectometry/ReflTableSchema.h @@ -9,10 +9,10 @@ namespace MantidQt { namespace CustomInterfaces { namespace ReflTableSchema { -typedef std::string ColumnNameType; -typedef std::string ColumnValueType; -typedef std::map<int, ColumnNameType> ColumnIndexNameMap; -typedef std::map<ColumnNameType, int> ColumnNameIndexMap; +using ColumnNameType = std::string; +using ColumnValueType = std::string; +using ColumnIndexNameMap = std::map<int, ColumnNameType>; +using ColumnNameIndexMap = std::map<ColumnNameType, int>; /// Label for run number column static const std::string RUNS("Run(s)"); diff --git a/qt/scientific_interfaces/ISISReflectometry/ReflTransferStrategy.h b/qt/scientific_interfaces/ISISReflectometry/ReflTransferStrategy.h index dc6ba41cd2a..797138bc9f2 100644 --- a/qt/scientific_interfaces/ISISReflectometry/ReflTransferStrategy.h +++ b/qt/scientific_interfaces/ISISReflectometry/ReflTransferStrategy.h @@ -29,7 +29,7 @@ struct SearchResult { }; /// Helper typdef for map of SearchResults keyed by run -typedef std::map<std::string, SearchResult> SearchResultMap; +using SearchResultMap = std::map<std::string, SearchResult>; /** ReflTransferStrategy : Provides an stratgegy for transferring runs from search results to a format suitable for processing. diff --git a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp index b7d4cd41da7..ed12722f9fc 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp +++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.cpp @@ -61,7 +61,7 @@ Logger g_log("SANSRunWindow"); /// static logger for centre finding Logger g_centreFinderLog("CentreFinder"); -typedef boost::shared_ptr<Kernel::PropertyManager> ReductionSettings_sptr; +using ReductionSettings_sptr = boost::shared_ptr<Kernel::PropertyManager>; /** * Returns the PropertyManager object that is used to store the settings @@ -2145,8 +2145,7 @@ bool SANSRunWindow::handleLoadButtonClick() { m_uiForm.sample_geomid->setCurrentIndex(geomId - 1); using namespace boost; - typedef tuple<QLineEdit *, function<double(const Sample *)>, std::string> - GeomSampleInfo; + using GeomSampleInfo = tuple<QLineEdit *, function<double (const Sample *)>, std::string>; std::vector<GeomSampleInfo> sampleInfoList; sampleInfoList.push_back(make_tuple(m_uiForm.sample_thick, diff --git a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h index 1d39d0f9699..549e2b2a608 100644 --- a/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h +++ b/qt/scientific_interfaces/ISISSANS/SANSRunWindow.h @@ -330,7 +330,7 @@ private: enum TransSettings { M3, M4, RADIUS, ROI }; /// holds pointer to validators and their locations - typedef std::map<QWidget *const, std::pair<QWidget *, QWidget *>> ValMap; + using ValMap = std::map<QWidget *const, std::pair<QWidget *, QWidget *> >; /// The form generated by Qt Designer Ui::SANSRunWindow m_uiForm; /// this object holds the functionality in the Add Files tab @@ -383,8 +383,7 @@ private: /// Holds pointers to the check box for each supported save format with the /// name of its save algorithm QHash<const QCheckBox *const, QString> m_savFormats; - typedef QHash<const QCheckBox *const, QString>::const_iterator - SavFormatsConstIt; + using SavFormatsConstIt = QHash<const QCheckBox *const, QString>::const_iterator; /// Get notified when the system input directories have changed Poco::NObserver<SANSRunWindow, Mantid::Kernel::ConfigValChangeNotification> m_newInDir; diff --git a/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h b/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h index 82e0c41bd81..dc25f8dd5dc 100644 --- a/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h +++ b/qt/scientific_interfaces/Muon/IALCBaselineModellingModel.h @@ -40,7 +40,7 @@ class MANTIDQT_MUONINTERFACE_DLL IALCBaselineModellingModel : public QObject { Q_OBJECT public: - typedef std::pair<double, double> Section; + using Section = std::pair<double, double>; /** * @return Function produced by the last fit diff --git a/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h b/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h index 2a9eb8dbc04..e09dbd73ee6 100644 --- a/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h +++ b/qt/scientific_interfaces/Muon/IALCBaselineModellingView.h @@ -39,8 +39,8 @@ class MANTIDQT_MUONINTERFACE_DLL IALCBaselineModellingView : public QObject { Q_OBJECT public: - typedef std::pair<QString, QString> SectionRow; - typedef std::pair<double, double> SectionSelector; + using SectionRow = std::pair<QString, QString>; + using SectionSelector = std::pair<double, double>; /// Function chosen to fit the data to /// @return Function string, or empty string if nothing chosen diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp index 476db8ec008..95d636cc1fd 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.cpp @@ -23,8 +23,7 @@ using Mantid::API::ITableWorkspace; using Mantid::API::MatrixWorkspace; using Mantid::API::TableRow; using Mantid::API::WorkspaceGroup; -typedef MantidQt::CustomInterfaces::Muon::MuonAnalysisOptionTab::RebinType - RebinType; +using RebinType = MantidQt::CustomInterfaces::Muon::MuonAnalysisOptionTab::RebinType; namespace { /// static logger diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h index 22779970184..091b69d5d55 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisFitDataPresenter.h @@ -11,9 +11,7 @@ #include <boost/optional/optional.hpp> /// Save some typing -typedef std::pair< - MantidQt::CustomInterfaces::Muon::MuonAnalysisOptionTab::RebinType, - std::string> RebinOptions; +using RebinOptions = std::pair<MantidQt::CustomInterfaces::Muon::MuonAnalysisOptionTab::RebinType, std::string>; namespace Mantid { namespace API { diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp index 152f003d30f..9d7e86183ba 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp +++ b/qt/scientific_interfaces/Muon/MuonAnalysisHelper.cpp @@ -1102,7 +1102,7 @@ getWorkspaceColors(const std::vector<Workspace_sptr> &workspaces) { QMap<int, QColor> colors; // position, color // Vector of <number of runs in fit, parameters in fit> pairs - typedef std::pair<size_t, std::vector<std::string>> FitProp; + using FitProp = std::pair<size_t, std::vector<std::string> >; std::vector<FitProp> fitProperties; // Get fit properties for each input workspace diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h index e6f4892dc48..d4c4f8c58ee 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableCreator.h @@ -9,8 +9,8 @@ namespace MantidQt { namespace CustomInterfaces { -typedef QMap<QString, QMap<QString, double>> WSParameterList; -typedef QMap<QString, QMap<QString, QVariant>> LogValuesMap; +using WSParameterList = QMap<QString, QMap<QString, double> >; +using LogValuesMap = QMap<QString, QMap<QString, QVariant> >; /** MuonAnalysisResultTableCreator : Creates table of muon fit results Used in the "result table" tab of Muon Analysis interface diff --git a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h index 0bc9675b88a..6f4ae326f7a 100644 --- a/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h +++ b/qt/scientific_interfaces/Muon/MuonAnalysisResultTableTab.h @@ -16,7 +16,7 @@ class MuonAnalysis; namespace MantidQt { namespace CustomInterfaces { namespace Muon { -typedef QMap<QString, QMap<QString, double>> WSParameterList; +using WSParameterList = QMap<QString, QMap<QString, double> >; /** This is a Helper class for MuonAnalysis. In particular this helper class deals diff --git a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h index 2bc5d686928..198408673ed 100644 --- a/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h +++ b/qt/scientific_interfaces/test/ALCDataLoadingPresenterTest.h @@ -30,7 +30,7 @@ GCC_DIAG_OFF_SUGGEST_OVERRIDE class MockALCDataLoadingView : public IALCDataLoadingView { // XXX: A workaround, needed because of the way the comma is treated in a // macro - typedef std::pair<double, double> PAIR_OF_DOUBLES; + using PAIR_OF_DOUBLES = std::pair<double, double>; public: MOCK_CONST_METHOD0(firstRun, std::string()); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h index 206b584b4d3..53706682c1b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmInputHistory.h @@ -96,8 +96,7 @@ private: friend struct Mantid::Kernel::CreateUsingNew<AlgorithmInputHistoryImpl>; }; -typedef Mantid::Kernel::SingletonHolder<AlgorithmInputHistoryImpl> - AlgorithmInputHistory; +using AlgorithmInputHistory = Mantid::Kernel::SingletonHolder<AlgorithmInputHistoryImpl>; } } diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h index 53a6bb39d45..b315f69edf0 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/AlgorithmSelectorWidget.h @@ -136,7 +136,7 @@ protected: void keyPressEvent(QKeyEvent *e) override; private: - typedef std::vector<Mantid::API::AlgorithmDescriptor> AlgNamesType; + using AlgNamesType = std::vector<Mantid::API::AlgorithmDescriptor>; void addAliases(AlgNamesType &algNamesList); QString stripAlias(const QString &text) const; }; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h b/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h index 72a0a56c557..1e976435e30 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/BatchAlgorithmRunner.h @@ -59,9 +59,8 @@ class EXPORT_OPT_MANTIDQT_COMMON BatchAlgorithmRunner : public QObject { Q_OBJECT public: - typedef std::map<std::string, std::string> AlgorithmRuntimeProps; - typedef std::pair<Mantid::API::IAlgorithm_sptr, AlgorithmRuntimeProps> - ConfiguredAlgorithm; + using AlgorithmRuntimeProps = std::map<std::string, std::string>; + using ConfiguredAlgorithm = std::pair<Mantid::API::IAlgorithm_sptr, AlgorithmRuntimeProps>; explicit BatchAlgorithmRunner(QObject *parent = nullptr); ~BatchAlgorithmRunner() override; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h index 48432fe6d99..4e4d57dd03a 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FindFilesThreadPoolManager.h @@ -21,8 +21,7 @@ namespace API { */ class EXPORT_OPT_MANTIDQT_COMMON FindFilesThreadPoolManager : public QObject { Q_OBJECT - typedef std::function<FindFilesWorker *(const FindFilesSearchParameters &)> - ThreadAllocator; + using ThreadAllocator = std::function<FindFilesWorker *(const FindFilesSearchParameters &)>; public: /// Create a new thread pool manager for finding files diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h index 80cd05a4efd..e95c5d6f6f8 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/FitOptionsBrowser.h @@ -164,8 +164,8 @@ private: /// Precision of doubles in m_doubleManager int m_decimals; - typedef void (FitOptionsBrowser::*SetterType)(QtProperty *, const QString &); - typedef QString (FitOptionsBrowser::*GetterType)(QtProperty *) const; + using SetterType = void (FitOptionsBrowser::*)(QtProperty *, const QString &); + using GetterType = QString (FitOptionsBrowser::*)(QtProperty *) const; /// Maps algorithm property name to the QtProperty QMap<QString, QtProperty *> m_propertyNameMap; /// Store for the properties setter methods diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceFactory.h index 094ba14c25c..1141964429b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/InterfaceFactory.h @@ -70,8 +70,7 @@ private: }; /// The specific instantiation of the templated type -typedef Mantid::Kernel::SingletonHolder<AlgorithmDialogFactoryImpl> - AlgorithmDialogFactory; +using AlgorithmDialogFactory = Mantid::Kernel::SingletonHolder<AlgorithmDialogFactoryImpl>; /** The UserSubWindowFactory is responsible for creating concrete instances of @@ -180,8 +179,7 @@ void UserSubWindowFactoryImpl::saveAliasNames(const std::string &realName) { } /// The specific instantiation of the templated type -typedef Mantid::Kernel::SingletonHolder<UserSubWindowFactoryImpl> - UserSubWindowFactory; +using UserSubWindowFactory = Mantid::Kernel::SingletonHolder<UserSubWindowFactoryImpl>; } } diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h b/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h index 2b22c374a34..3c722c06c98 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/Message.h @@ -25,7 +25,7 @@ class EXPORT_OPT_MANTIDQT_COMMON Message : public QObject { public: /// Priority matches Mantid Logger priority - typedef Mantid::Kernel::Logger::Priority Priority; + using Priority = Mantid::Kernel::Logger::Priority; /// Default constuctor required by Qt meta-type system Message(); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/PythonThreading.h b/qt/widgets/common/inc/MantidQtWidgets/Common/PythonThreading.h index bc5f3ecddb3..44d070dba1b 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/PythonThreading.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/PythonThreading.h @@ -56,6 +56,6 @@ private: }; /// Typedef for scoped lock -typedef ScopedGIL<PythonGIL> ScopedPythonGIL; +using ScopedPythonGIL = ScopedGIL<PythonGIL>; #endif /* PYTHONTHREADING_H_ */ diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h index 4ec5eaf81f0..a508c7cd806 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/CompositeEditorFactory.h @@ -14,7 +14,7 @@ */ template <class ManagerType> class CompositeEditorFactory : public QtAbstractEditorFactory<ManagerType> { - typedef QtAbstractEditorFactory<ManagerType> FactoryBaseType; + using FactoryBaseType = QtAbstractEditorFactory<ManagerType>; public: CompositeEditorFactory(QObject *parent, FactoryBaseType *defaultFactory) diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qteditorfactory.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qteditorfactory.h index b6bb2a21e30..0c1ad5d5c90 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qteditorfactory.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qteditorfactory.h @@ -515,9 +515,9 @@ private: template <class Editor> class EditorFactoryPrivate { public: - typedef QList<Editor *> EditorList; - typedef QMap<QtProperty *, EditorList> PropertyToEditorListMap; - typedef QMap<Editor *, QtProperty *> EditorToPropertyMap; + using EditorList = QList<Editor *>; + using PropertyToEditorListMap = QMap<QtProperty *, EditorList>; + using EditorToPropertyMap = QMap<Editor *, QtProperty *>; Editor *createEditor(QtProperty *property, QWidget *parent); void initializeEditor(QtProperty *property, Editor *e); diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h index d1992e797a6..f2208d87826 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtpropertymanager.h @@ -942,8 +942,8 @@ template <class Value, class PrivateData> static Value getData(const QMap<const QtProperty *, PrivateData> &propertyMap, Value PrivateData::*data, const QtProperty *property, const Value &defaultValue = Value()) { - typedef QMap<const QtProperty *, PrivateData> PropertyToData; - typedef typename PropertyToData::const_iterator PropertyToDataConstIterator; + using PropertyToData = QMap<const QtProperty *, PrivateData>; + using PropertyToDataConstIterator = typename PropertyToData::const_iterator; const PropertyToDataConstIterator it = propertyMap.constFind(property); if (it == propertyMap.constEnd()) return defaultValue; @@ -980,8 +980,8 @@ static void setSimpleValue( void (PropertyManager::*valueChangedSignal)(QtProperty *, ValueChangeParameter), QtProperty *property, const Value &val) { - typedef QMap<const QtProperty *, Value> PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + using PropertyToData = QMap<const QtProperty *, Value>; + using PropertyToDataIterator = typename PropertyToData::iterator; const PropertyToDataIterator it = propertyMap.find(property); if (it == propertyMap.end()) return; @@ -1005,9 +1005,9 @@ static void setValueInRange( QtProperty *property, const Value &val, void (PropertyManagerPrivate::*setSubPropertyValue)(QtProperty *, ValueChangeParameter)) { - typedef typename PropertyManagerPrivate::Data PrivateData; - typedef QMap<const QtProperty *, PrivateData> PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + using PrivateData = typename PropertyManagerPrivate::Data; + using PropertyToData = QMap<const QtProperty *, PrivateData>; + using PropertyToDataIterator = typename PropertyToData::iterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -1046,9 +1046,9 @@ static void setBorderValues( ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { - typedef typename PropertyManagerPrivate::Data PrivateData; - typedef QMap<const QtProperty *, PrivateData> PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + using PrivateData = typename PropertyManagerPrivate::Data; + using PropertyToData = QMap<const QtProperty *, PrivateData>; + using PropertyToDataIterator = typename PropertyToData::iterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -1097,8 +1097,8 @@ static void setBorderValue( ValueChangeParameter, ValueChangeParameter, ValueChangeParameter)) { - typedef QMap<const QtProperty *, PrivateData> PropertyToData; - typedef typename PropertyToData::iterator PropertyToDataIterator; + using PropertyToData = QMap<const QtProperty *, PrivateData>; + using PropertyToDataIterator = typename PropertyToData::iterator; const PropertyToDataIterator it = managerPrivate->m_values.find(property); if (it == managerPrivate->m_values.end()) return; @@ -1184,7 +1184,7 @@ public: QStringList m_familyNames; - typedef QMap<const QtProperty *, QFont> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QFont>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; @@ -1224,7 +1224,7 @@ public: QStringList flagNames; }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtBoolPropertyManager *m_boolPropertyManager; @@ -1241,7 +1241,7 @@ public: void slotIntChanged(QtProperty *property, int value); void slotPropertyDestroyed(QtProperty *property); - typedef QMap<const QtProperty *, QColor> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QColor>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; @@ -1266,7 +1266,7 @@ public: void slotEnumChanged(QtProperty *property, int value); void slotPropertyDestroyed(QtProperty *property); - typedef QMap<const QtProperty *, QLocale> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QLocale>; PropertyValueMap m_values; QtEnumPropertyManager *m_enumPropertyManager; @@ -1285,7 +1285,7 @@ public: void slotIntChanged(QtProperty *property, int value); void slotPropertyDestroyed(QtProperty *property); - typedef QMap<const QtProperty *, QPoint> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QPoint>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; @@ -1310,7 +1310,7 @@ public: void slotDoubleChanged(QtProperty *property, double value); void slotPropertyDestroyed(QtProperty *property); - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtDoublePropertyManager *m_doublePropertyManager; @@ -1338,7 +1338,7 @@ public: int decimals; }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtDoublePropertyManager *m_doublePropertyManager; @@ -1369,7 +1369,7 @@ public: QRect constraint; }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; @@ -1413,7 +1413,7 @@ public: } }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtDoublePropertyManager *m_doublePropertyManager; @@ -1435,7 +1435,7 @@ public: void slotEnumChanged(QtProperty *property, int value); void slotPropertyDestroyed(QtProperty *property); - typedef QMap<const QtProperty *, QSizePolicy> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QSizePolicy>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; @@ -1479,7 +1479,7 @@ public: } }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; QtIntPropertyManager *m_intPropertyManager; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h index 23334c1e56d..1603eb634ea 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qttreepropertybrowser.h @@ -356,10 +356,10 @@ private slots: private: int indentation(const QModelIndex &index) const; - typedef QMap<QWidget *, QtProperty *> EditorToPropertyMap; + using EditorToPropertyMap = QMap<QWidget *, QtProperty *>; mutable EditorToPropertyMap m_editorToProperty; - typedef QMap<QtProperty *, QWidget *> PropertyToEditorMap; + using PropertyToEditorMap = QMap<QtProperty *, QWidget *>; mutable PropertyToEditorMap m_propertyToEditor; QtTreePropertyBrowserPrivate *m_editorPrivate; mutable QTreeWidgetItem *m_editedItem; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtvariantproperty.h b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtvariantproperty.h index 823cfa3c95a..761488c8ba7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtvariantproperty.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/QtPropertyBrowser/qtvariantproperty.h @@ -96,7 +96,7 @@ QT_BEGIN_NAMESPACE #endif -typedef QMap<int, QIcon> QtIconMap; +using QtIconMap = QMap<int, QIcon>; class QtVariantPropertyManager; class QtVariantPropertyPrivate; diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h index a03d8c57b0d..2d2b75b1028 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SaveWorkspaces.h @@ -76,7 +76,7 @@ private: QString m_sampleThickness; QHash<QCheckBox *const, QString> m_savFormats; - typedef QHash<QCheckBox *const, QString>::const_iterator SavFormatsConstIt; + using SavFormatsConstIt = QHash<QCheckBox *const, QString>::const_iterator; void setupLine1(QHBoxLayout *const lineOne); void setupLine2(QHBoxLayout *const lineTwo, diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h index cfedb31c177..c1b5adfc1f7 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SelectionNotificationService.h @@ -63,8 +63,7 @@ private: SelectionNotificationServiceImpl>; }; -typedef Mantid::Kernel::SingletonHolder<SelectionNotificationServiceImpl> - SelectionNotificationService; +using SelectionNotificationService = Mantid::Kernel::SingletonHolder<SelectionNotificationServiceImpl>; } } namespace Mantid { diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h b/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h index da2a3699630..df640d59287 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/SlicingAlgorithmDialog.h @@ -14,7 +14,7 @@ namespace MantidQt { namespace MantidWidgets { -typedef QMap<QString, QString> PropertyDimensionMap; +using PropertyDimensionMap = QMap<QString, QString>; /* Class SlicingAlgorithmDialog diff --git a/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h b/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h index 43914261b21..9fceb9b3b08 100644 --- a/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h +++ b/qt/widgets/common/inc/MantidQtWidgets/Common/pqHelpWindow.h @@ -72,7 +72,7 @@ signals: /// a QHelpEngine. class EXPORT_OPT_MANTIDQT_COMMON pqHelpWindow : public QMainWindow { Q_OBJECT - typedef QMainWindow Superclass; + using Superclass = QMainWindow; public: pqHelpWindow(QHelpEngine *engine, QWidget *parent = 0, diff --git a/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp b/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp index 625f584e735..7f6eed9a997 100644 --- a/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp +++ b/qt/widgets/common/src/AlgorithmPropertiesWidget.cpp @@ -295,7 +295,7 @@ bool isCalledInputWorkspace(PropertyWidget *const candidate) { */ void AlgorithmPropertiesWidget::replaceWSClicked(const QString &propName) { if (m_propWidgets.contains(propName)) { - typedef std::vector<PropertyWidget *> CollectionOfPropertyWidget; + using CollectionOfPropertyWidget = std::vector<PropertyWidget *>; CollectionOfPropertyWidget candidateReplacementSources; PropertyWidget *propWidget = m_propWidgets[propName]; if (propWidget) { diff --git a/qt/widgets/common/src/AlgorithmSelectorWidget.cpp b/qt/widgets/common/src/AlgorithmSelectorWidget.cpp index d94dfbe5290..465619911e4 100644 --- a/qt/widgets/common/src/AlgorithmSelectorWidget.cpp +++ b/qt/widgets/common/src/AlgorithmSelectorWidget.cpp @@ -269,7 +269,7 @@ void AlgorithmTreeWidget::mouseDoubleClickEvent(QMouseEvent *e) { void AlgorithmTreeWidget::update() { this->clear(); - typedef std::vector<AlgorithmDescriptor> AlgNamesType; + using AlgNamesType = std::vector<AlgorithmDescriptor>; AlgNamesType names = AlgorithmFactory::Instance().getDescriptors(); // sort by category/name/version to fill QTreeWidget diff --git a/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowser.cpp b/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowser.cpp index 9dc93ffc64f..18d98aa5fe6 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowser.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/qtpropertybrowser.cpp @@ -1172,12 +1172,8 @@ QtBrowserItem::~QtBrowserItem() { delete d_ptr; } //////////////////////////////////// -typedef QMap<QtAbstractPropertyBrowser *, - QMap<QtAbstractPropertyManager *, QtAbstractEditorFactoryBase *>> - Map1; -typedef QMap<QtAbstractPropertyManager *, - QMap<QtAbstractEditorFactoryBase *, - QList<QtAbstractPropertyBrowser *>>> Map2; +using Map1 = QMap<QtAbstractPropertyBrowser *, QMap<QtAbstractPropertyManager *, QtAbstractEditorFactoryBase *> >; +using Map2 = QMap<QtAbstractPropertyManager *, QMap<QtAbstractEditorFactoryBase *, QList<QtAbstractPropertyBrowser *> > >; Q_GLOBAL_STATIC(Map1, m_viewToManagerToFactory) Q_GLOBAL_STATIC(Map2, m_managerToFactoryToViews) diff --git a/qt/widgets/common/src/QtPropertyBrowser/qtpropertymanager.cpp b/qt/widgets/common/src/QtPropertyBrowser/qtpropertymanager.cpp index fc25dbddf2d..7a3c6999697 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/qtpropertymanager.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/qtpropertymanager.cpp @@ -361,7 +361,7 @@ public: } }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; }; @@ -638,7 +638,7 @@ public: } }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; }; @@ -969,7 +969,7 @@ public: QRegExp regExp; }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; QMap<const QtProperty *, Data> m_values; }; @@ -1320,7 +1320,7 @@ public: QString m_format; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; QMap<const QtProperty *, Data> m_values; }; @@ -1537,7 +1537,7 @@ class QtTimePropertyManagerPrivate { public: QString m_format; - typedef QMap<const QtProperty *, QTime> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QTime>; PropertyValueMap m_values; }; @@ -1646,7 +1646,7 @@ class QtDateTimePropertyManagerPrivate { public: QString m_format; - typedef QMap<const QtProperty *, QDateTime> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QDateTime>; PropertyValueMap m_values; }; @@ -1755,7 +1755,7 @@ class QtKeySequencePropertyManagerPrivate { public: QString m_format; - typedef QMap<const QtProperty *, QKeySequence> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QKeySequence>; PropertyValueMap m_values; }; @@ -1861,7 +1861,7 @@ class QtCharPropertyManagerPrivate { QtCharPropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtCharPropertyManager) public: - typedef QMap<const QtProperty *, QChar> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QChar>; PropertyValueMap m_values; }; @@ -4170,7 +4170,7 @@ public: QMap<int, QIcon> enumIcons; }; - typedef QMap<const QtProperty *, Data> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, Data>; PropertyValueMap m_values; }; @@ -5125,7 +5125,7 @@ void QtFontPropertyManagerPrivate::slotFontDatabaseChanged() { } void QtFontPropertyManagerPrivate::slotFontDatabaseDelayedChange() { - typedef QMap<const QtProperty *, QtProperty *> PropertyPropertyMap; + using PropertyPropertyMap = QMap<const QtProperty *, QtProperty *>; // rescan available font names const QStringList oldFamilies = m_familyNames; m_familyNames = fontDatabase()->families(); @@ -5732,7 +5732,7 @@ class QtCursorPropertyManagerPrivate { QtCursorPropertyManager *q_ptr; Q_DECLARE_PUBLIC(QtCursorPropertyManager) public: - typedef QMap<const QtProperty *, QCursor> PropertyValueMap; + using PropertyValueMap = QMap<const QtProperty *, QCursor>; PropertyValueMap m_values; }; diff --git a/qt/widgets/common/src/QtPropertyBrowser/qtvariantproperty.cpp b/qt/widgets/common/src/QtPropertyBrowser/qtvariantproperty.cpp index e732afdb2ee..afcd2044550 100644 --- a/qt/widgets/common/src/QtPropertyBrowser/qtvariantproperty.cpp +++ b/qt/widgets/common/src/QtPropertyBrowser/qtvariantproperty.cpp @@ -171,7 +171,7 @@ int QtVariantPropertyManager::iconMapTypeId() { return qMetaTypeId<QtIconMap>(); } -typedef QMap<const QtProperty *, QtProperty *> PropertyMap; +using PropertyMap = QMap<const QtProperty *, QtProperty *>; Q_GLOBAL_STATIC(PropertyMap, propertyToWrappedProperty) static QtProperty *wrappedProperty(QtProperty *property) { diff --git a/qt/widgets/common/src/SelectWorkspacesDialog.cpp b/qt/widgets/common/src/SelectWorkspacesDialog.cpp index 723c1fac9af..02988668ed2 100644 --- a/qt/widgets/common/src/SelectWorkspacesDialog.cpp +++ b/qt/widgets/common/src/SelectWorkspacesDialog.cpp @@ -56,7 +56,7 @@ SelectWorkspacesDialog::SelectWorkspacesDialog( Mantid::API::AnalysisDataServiceImpl &ADS = Mantid::API::AnalysisDataService::Instance(); - typedef std::vector<Mantid::API::Workspace_sptr> VecWorkspaces; + using VecWorkspaces = std::vector<Mantid::API::Workspace_sptr>; VecWorkspaces workspaces = ADS.getObjects(); WorkspaceIsNotOfType comparitor(typeFilter); workspaces.erase( diff --git a/qt/widgets/common/src/pqHelpWindow.cxx b/qt/widgets/common/src/pqHelpWindow.cxx index 07f81f424fd..e84364deec1 100644 --- a/qt/widgets/common/src/pqHelpWindow.cxx +++ b/qt/widgets/common/src/pqHelpWindow.cxx @@ -58,7 +58,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. /// Internal class used to add support to QWeb(Engine)View to load files from /// QHelpEngine. class pqHelpWindowNetworkReply : public QNetworkReply { - typedef QNetworkReply Superclass; + using Superclass = QNetworkReply; public: pqHelpWindowNetworkReply(const QUrl &url, QHelpEngineCore *helpEngine, @@ -139,7 +139,7 @@ qint64 pqHelpWindowNetworkReply::readData(char *data, qint64 maxSize) { // **************************************************************************** //----------------------------------------------------------------------------- class pqHelpWindow::pqNetworkAccessManager : public QNetworkAccessManager { - typedef QNetworkAccessManager Superclass; + using Superclass = QNetworkAccessManager; QPointer<QHelpEngineCore> Engine; public: diff --git a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ProjectionSurface.h b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ProjectionSurface.h index 2d38ea07465..50e4c840ab2 100644 --- a/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ProjectionSurface.h +++ b/qt/widgets/instrumentview/inc/MantidQtWidgets/InstrumentView/ProjectionSurface.h @@ -380,7 +380,7 @@ private: mutable bool m_redrawPicking; }; -typedef boost::shared_ptr<ProjectionSurface> ProjectionSurface_sptr; +using ProjectionSurface_sptr = boost::shared_ptr<ProjectionSurface>; } // MantidWidgets } // MantidQt diff --git a/qt/widgets/plugins/algorithm_dialogs/src/StartLiveDataDialog.cpp b/qt/widgets/plugins/algorithm_dialogs/src/StartLiveDataDialog.cpp index 596a517fadb..718bde630b7 100644 --- a/qt/widgets/plugins/algorithm_dialogs/src/StartLiveDataDialog.cpp +++ b/qt/widgets/plugins/algorithm_dialogs/src/StartLiveDataDialog.cpp @@ -40,8 +40,7 @@ private: template class Mantid::Kernel::SingletonHolder<LiveDataAlgInputHistoryImpl>; #endif /* _WIN32 */ /// The specific instantiation of the templated type -typedef Mantid::Kernel::SingletonHolder<LiveDataAlgInputHistoryImpl> - LiveDataAlgInputHistory; +using LiveDataAlgInputHistory = Mantid::Kernel::SingletonHolder<LiveDataAlgInputHistoryImpl>; class LiveDataPostProcessingAlgInputHistoryImpl : public AbstractAlgorithmInputHistory { @@ -61,9 +60,7 @@ template class Mantid::Kernel::SingletonHolder< LiveDataPostProcessingAlgInputHistoryImpl>; #endif /* _WIN32 */ /// The specific instantiation of the templated type -typedef Mantid::Kernel::SingletonHolder< - LiveDataPostProcessingAlgInputHistoryImpl> - LiveDataPostProcessingAlgInputHistory; +using LiveDataPostProcessingAlgInputHistory = Mantid::Kernel::SingletonHolder<LiveDataPostProcessingAlgInputHistoryImpl>; } // Add this class to the list of specialised dialogs in this namespace diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/CompositePeaksPresenter.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/CompositePeaksPresenter.h index 3d0db9f5f3b..27d4f118975 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/CompositePeaksPresenter.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/CompositePeaksPresenter.h @@ -166,7 +166,7 @@ private: boost::shared_ptr<const Mantid::API::IPeaksWorkspace> toWorkspace) override; /// Alias for container of subjects type. - typedef std::vector<PeaksPresenter_sptr> SubjectContainer; + using SubjectContainer = std::vector<PeaksPresenter_sptr>; /// Subject presenters. SubjectContainer m_subjects; /// Use default diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/ConcretePeaksPresenter.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/ConcretePeaksPresenter.h index 2f2fd9eaaca..273a122d19a 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/ConcretePeaksPresenter.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/ConcretePeaksPresenter.h @@ -14,7 +14,7 @@ namespace MantidQt { namespace SliceViewer { /// Alias for Vector of Peak Overlay Views -typedef std::vector<boost::shared_ptr<PeakOverlayView>> VecPeakOverlayView; +using VecPeakOverlayView = std::vector<boost::shared_ptr<PeakOverlayView> >; /// Coordinate System Enum to String. std::string DLLExport diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakBoundingBox.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakBoundingBox.h index 16d4323e9a5..b57cf4b2ff0 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakBoundingBox.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakBoundingBox.h @@ -29,13 +29,13 @@ private: enum { typeValue = I }; }; -typedef DoubleParam<0> Left; -typedef DoubleParam<1> Right; -typedef DoubleParam<2> Top; -typedef DoubleParam<3> Bottom; -typedef DoubleParam<4> SlicePoint; -typedef DoubleParam<5> Front; -typedef DoubleParam<6> Back; +using Left = DoubleParam<0>; +using Right = DoubleParam<1>; +using Top = DoubleParam<2>; +using Bottom = DoubleParam<3>; +using SlicePoint = DoubleParam<4>; +using Front = DoubleParam<5>; +using Back = DoubleParam<6>; /** A bounding box for a peak. Allows the SliceViewer to zoom to that region. diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayView.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayView.h index 848740645bc..c287fb7e5fb 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayView.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayView.h @@ -91,8 +91,8 @@ public: virtual ~PeakOverlayView() {} }; -typedef boost::shared_ptr<const PeakOverlayView> PeakOverlayView_const_sptr; -typedef boost::shared_ptr<PeakOverlayView> PeakOverlayView_sptr; +using PeakOverlayView_const_sptr = boost::shared_ptr<const PeakOverlayView>; +using PeakOverlayView_sptr = boost::shared_ptr<PeakOverlayView>; } } diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayViewFactory.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayViewFactory.h index 5b5eabd18d0..d6b45333918 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayViewFactory.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakOverlayViewFactory.h @@ -64,7 +64,7 @@ public: }; /// Factory Shared Pointer typedef. -typedef boost::shared_ptr<PeakOverlayViewFactory> PeakOverlayViewFactory_sptr; +using PeakOverlayViewFactory_sptr = boost::shared_ptr<PeakOverlayViewFactory>; } } diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakPalette.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakPalette.h index 5bbbbcfa111..d126155960e 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakPalette.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakPalette.h @@ -26,7 +26,7 @@ public: ~PeakPalette(); private: - typedef std::map<int, C> ColourMapType; + using ColourMapType = std::map<int, C>; ColourMapType m_backgroundMap; ColourMapType m_foregroundMap; typename ColourMapType::iterator safeFetchPair(ColourMapType &map, diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakRepresentation.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakRepresentation.h index ffc350bdb1b..91c44dce7d1 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakRepresentation.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeakRepresentation.h @@ -22,7 +22,7 @@ struct EXPORT_OPT_MANTIDQT_SLICEVIEWER PeakRepresentationViewInformation { class PeakBoundingBox; /// Alisas for a boost optional double. -typedef boost::optional<double> optional_double; +using optional_double = boost::optional<double>; /** PeakRepresentation : Allows the draw a general visual peak shape. @@ -82,8 +82,8 @@ protected: PeakRepresentationViewInformation viewInformation) = 0; }; -typedef std::shared_ptr<PeakRepresentation> PeakRepresentation_sptr; -typedef std::vector<PeakRepresentation_sptr> VecPeakRepresentation; +using PeakRepresentation_sptr = std::shared_ptr<PeakRepresentation>; +using VecPeakRepresentation = std::vector<PeakRepresentation_sptr>; } } diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeaksPresenter.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeaksPresenter.h index 182073415b3..ecb866c7734 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeaksPresenter.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/PeaksPresenter.h @@ -35,8 +35,7 @@ class PeakOverlayView; class UpdateableOnDemand; // Alias -typedef std::set<boost::shared_ptr<const Mantid::API::IPeaksWorkspace>> - SetPeaksWorkspaces; +using SetPeaksWorkspaces = std::set<boost::shared_ptr<const Mantid::API::IPeaksWorkspace> >; /*--------------------------------------------------------- Abstract PeaksPresenter. @@ -79,8 +78,8 @@ public: ~PeaksPresenter() override{}; }; -typedef boost::shared_ptr<PeaksPresenter> PeaksPresenter_sptr; -typedef boost::shared_ptr<const PeaksPresenter> PeaksPresenter_const_sptr; +using PeaksPresenter_sptr = boost::shared_ptr<PeaksPresenter>; +using PeaksPresenter_const_sptr = boost::shared_ptr<const PeaksPresenter>; } } diff --git a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/QPeaksTableModel.h b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/QPeaksTableModel.h index 246d2bf018b..d294d2cb368 100644 --- a/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/QPeaksTableModel.h +++ b/qt/widgets/sliceviewer/inc/MantidQtWidgets/SliceViewer/QPeaksTableModel.h @@ -70,10 +70,10 @@ signals: void peaksSorted(const std::string &, const bool); private: - typedef QString ColumnNameType; - typedef QString ColumnValueType; - typedef std::map<ColumnNameType, bool> ColumnNameSortableMap; - typedef std::map<int, ColumnNameType> ColumnIndexNameMap; + using ColumnNameType = QString; + using ColumnValueType = QString; + using ColumnNameSortableMap = std::map<ColumnNameType, bool>; + using ColumnIndexNameMap = std::map<int, ColumnNameType>; public: /// Label for run number column diff --git a/qt/widgets/sliceviewer/test/ConcretePeaksPresenterTest.h b/qt/widgets/sliceviewer/test/ConcretePeaksPresenterTest.h index 6988b6df943..3fee2f04884 100644 --- a/qt/widgets/sliceviewer/test/ConcretePeaksPresenterTest.h +++ b/qt/widgets/sliceviewer/test/ConcretePeaksPresenterTest.h @@ -26,12 +26,11 @@ using namespace testing; using boost::regex; // Alias. -typedef boost::shared_ptr<Mantid::API::MDGeometry> MDGeometry_sptr; +using MDGeometry_sptr = boost::shared_ptr<Mantid::API::MDGeometry>; class ConcretePeaksPresenterTest : public CxxTest::TestSuite { /// Alias. - typedef boost::shared_ptr<MantidQt::SliceViewer::ConcretePeaksPresenter> - ConcretePeaksPresenter_sptr; + using ConcretePeaksPresenter_sptr = boost::shared_ptr<MantidQt::SliceViewer::ConcretePeaksPresenter>; /// Helper method to create a good 'Integrated' peaks workspace Mantid::API::IPeaksWorkspace_sptr diff --git a/qt/widgets/sliceviewer/test/PeakRepresentationCrossTest.h b/qt/widgets/sliceviewer/test/PeakRepresentationCrossTest.h index 2859d9b7203..9bb481526a6 100644 --- a/qt/widgets/sliceviewer/test/PeakRepresentationCrossTest.h +++ b/qt/widgets/sliceviewer/test/PeakRepresentationCrossTest.h @@ -182,11 +182,9 @@ public: class PeakRepresentationCrossTestPerformance : public CxxTest::TestSuite { private: - typedef std::vector<boost::shared_ptr<PeakRepresentationCross>> - VecPeakRepCross; + using VecPeakRepCross = std::vector<boost::shared_ptr<PeakRepresentationCross> >; - typedef std::vector<boost::shared_ptr< - PeakRepresentationCrossExposeProtectedWrapper>> VecPeakRepCrossWrapped; + using VecPeakRepCrossWrapped = std::vector<boost::shared_ptr<PeakRepresentationCrossExposeProtectedWrapper> >; /// Collection to store a large number of PeakRepresentationCross. VecPeakRepCross m_peaks; diff --git a/qt/widgets/sliceviewer/test/PeakRepresentationSphereTest.h b/qt/widgets/sliceviewer/test/PeakRepresentationSphereTest.h index 487b3803133..ad8be837c9c 100644 --- a/qt/widgets/sliceviewer/test/PeakRepresentationSphereTest.h +++ b/qt/widgets/sliceviewer/test/PeakRepresentationSphereTest.h @@ -316,10 +316,8 @@ public: } private: - typedef boost::shared_ptr<PeakRepresentationSphereExposeProtectedWrapper> - PeaksRepresentationSphere_sptr; - typedef std::vector<PeaksRepresentationSphere_sptr> - VecPeaksRepresentationSphere; + using PeaksRepresentationSphere_sptr = boost::shared_ptr<PeakRepresentationSphereExposeProtectedWrapper>; + using VecPeaksRepresentationSphere = std::vector<PeaksRepresentationSphere_sptr>; /// Collection to store a large number of physicalPeaks. VecPeaksRepresentationSphere m_peaks; diff --git a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/ArrayDataSource.h b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/ArrayDataSource.h index 88cd8aad3ae..598c5a87447 100644 --- a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/ArrayDataSource.h +++ b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/ArrayDataSource.h @@ -67,8 +67,8 @@ private: std::vector<float> m_data; }; -typedef boost::shared_ptr<ArrayDataSource> ArrayDataSource_sptr; -typedef boost::shared_ptr<const ArrayDataSource> ArrayDataSource_const_sptr; +using ArrayDataSource_sptr = boost::shared_ptr<ArrayDataSource>; +using ArrayDataSource_const_sptr = boost::shared_ptr<const ArrayDataSource>; } // namespace SpectrumView } // namespace MantidQt diff --git a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/DataArray.h b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/DataArray.h index 16a65493683..0b8af1ded38 100644 --- a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/DataArray.h +++ b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/DataArray.h @@ -124,8 +124,8 @@ private: std::vector<float> m_data; }; -typedef boost::shared_ptr<DataArray> DataArray_sptr; -typedef boost::shared_ptr<const DataArray> DataArray_const_sptr; +using DataArray_sptr = boost::shared_ptr<DataArray>; +using DataArray_const_sptr = boost::shared_ptr<const DataArray>; } // namespace SpectrumView } // namespace MantidQt diff --git a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/MatrixWSDataSource.h b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/MatrixWSDataSource.h index fb3c7c88f7d..390f92a2041 100644 --- a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/MatrixWSDataSource.h +++ b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/MatrixWSDataSource.h @@ -103,9 +103,8 @@ private: const Mantid::API::SpectrumInfo &m_spectrumInfo; }; -typedef boost::shared_ptr<MatrixWSDataSource> MatrixWSDataSource_sptr; -typedef boost::shared_ptr<const MatrixWSDataSource> - MatrixWSDataSource_const_sptr; +using MatrixWSDataSource_sptr = boost::shared_ptr<MatrixWSDataSource>; +using MatrixWSDataSource_const_sptr = boost::shared_ptr<const MatrixWSDataSource>; } // namespace SpectrumView } // namespace MantidQt diff --git a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/SpectrumDataSource.h b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/SpectrumDataSource.h index 70cab21712a..d78b385e57d 100644 --- a/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/SpectrumDataSource.h +++ b/qt/widgets/spectrumviewer/inc/MantidQtWidgets/SpectrumViewer/SpectrumDataSource.h @@ -106,9 +106,8 @@ protected: size_t m_totalCols; }; -typedef boost::shared_ptr<SpectrumDataSource> SpectrumDataSource_sptr; -typedef boost::shared_ptr<const SpectrumDataSource> - SpectrumDataSource_const_sptr; +using SpectrumDataSource_sptr = boost::shared_ptr<SpectrumDataSource>; +using SpectrumDataSource_const_sptr = boost::shared_ptr<const SpectrumDataSource>; } // namespace SpectrumView } // namespace MantidQt -- GitLab