Skip to content
Snippets Groups Projects
Unverified Commit 5953aaf2 authored by Hahn, Steven's avatar Hahn, Steven Committed by GitHub
Browse files

Merge pull request #22136 from mantidproject/modernize-use-using-qt

Applied clang-tidy modernize-use-using fixes for qt.
parents f60045bd 9d404cee
No related branches found
No related tags found
No related merge requests found
Showing
with 47 additions and 50 deletions
...@@ -14,16 +14,16 @@ class IMDDimension; ...@@ -14,16 +14,16 @@ class IMDDimension;
namespace VATES { namespace VATES {
/// Vector of IMDDimension shared pointers. /// Vector of IMDDimension shared pointers.
typedef std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension>> using DimensionVec =
DimensionVec; std::vector<boost::shared_ptr<Mantid::Geometry::IMDDimension>>;
/// IMDDimension as shared pointer. /// IMDDimension as shared pointer.
typedef boost::shared_ptr<Mantid::Geometry::IMDDimension> Dimension_sptr; using Dimension_sptr = boost::shared_ptr<Mantid::Geometry::IMDDimension>;
/// IMDDimension as const shared pointer. Note that IMDDimension is pure /// IMDDimension as const shared pointer. Note that IMDDimension is pure
/// virtual. /// virtual.
typedef boost::shared_ptr<const Mantid::Geometry::IMDDimension> using Dimension_const_sptr =
Dimension_const_sptr; boost::shared_ptr<const Mantid::Geometry::IMDDimension>;
std::string makeAxisTitle(const Mantid::Geometry::IMDDimension &dim); std::string makeAxisTitle(const Mantid::Geometry::IMDDimension &dim);
......
...@@ -37,7 +37,7 @@ enum VisualNormalization { ...@@ -37,7 +37,7 @@ enum VisualNormalization {
}; };
// Helper typedef // Helper typedef
typedef Mantid::signal_t (Mantid::API::IMDNode::*NormFuncIMDNodePtr)() const; using NormFuncIMDNodePtr = Mantid::signal_t (Mantid::API::IMDNode::*)() const;
/** /**
Determine which normalization function will be called on an IMDNode Determine which normalization function will be called on an IMDNode
...@@ -56,4 +56,4 @@ createIteratorWithNormalization(const VisualNormalization normalizationOption, ...@@ -56,4 +56,4 @@ createIteratorWithNormalization(const VisualNormalization normalizationOption,
} }
} }
#endif /*MANTID_VATES_NORMALIZATION_H_*/ #endif /*MANTID_VATES_NORMALIZATION_H_*/
\ No newline at end of file
...@@ -29,8 +29,8 @@ public: ...@@ -29,8 +29,8 @@ public:
const bool ascending) = 0; const bool ascending) = 0;
}; };
typedef boost::shared_ptr<PeaksPresenterVsi> PeaksPresenterVsi_sptr; using PeaksPresenterVsi_sptr = boost::shared_ptr<PeaksPresenterVsi>;
typedef boost::shared_ptr<const PeaksPresenterVsi> PeaksPresenterVsi_const_sptr; using PeaksPresenterVsi_const_sptr = boost::shared_ptr<const PeaksPresenterVsi>;
} }
} }
#endif #endif
\ No newline at end of file
...@@ -47,12 +47,12 @@ private: ...@@ -47,12 +47,12 @@ private:
enum { m_location = I }; enum { m_location = I };
}; };
typedef FrustumPlane<LEFTPLANE, double> LeftPlane; using LeftPlane = FrustumPlane<LEFTPLANE, double>;
typedef FrustumPlane<RIGHTPLANE, double> RightPlane; using RightPlane = FrustumPlane<RIGHTPLANE, double>;
typedef FrustumPlane<BOTTOMPLANE, double> BottomPlane; using BottomPlane = FrustumPlane<BOTTOMPLANE, double>;
typedef FrustumPlane<TOPPLANE, double> TopPlane; using TopPlane = FrustumPlane<TOPPLANE, double>;
typedef FrustumPlane<FARPLANE, double> FarPlane; using FarPlane = FrustumPlane<FARPLANE, double>;
typedef FrustumPlane<NEARPLANE, double> NearPlane; using NearPlane = FrustumPlane<NEARPLANE, double>;
class DLLExport ViewFrustum { class DLLExport ViewFrustum {
public: public:
...@@ -156,9 +156,9 @@ void ViewFrustum::initializeMatrix(Mantid::Kernel::Matrix<T> &matrix, ...@@ -156,9 +156,9 @@ void ViewFrustum::initializeMatrix(Mantid::Kernel::Matrix<T> &matrix,
} }
/// shared pointer to the view frustum /// shared pointer to the view frustum
typedef boost::shared_ptr<Mantid::VATES::ViewFrustum> ViewFrustum_sptr; using ViewFrustum_sptr = boost::shared_ptr<Mantid::VATES::ViewFrustum>;
typedef boost::shared_ptr<const Mantid::VATES::ViewFrustum> using ViewFrustum_const_sptr =
ViewFrustum_const_sptr; boost::shared_ptr<const Mantid::VATES::ViewFrustum>;
} }
} }
#endif #endif
\ No newline at end of file
...@@ -247,8 +247,8 @@ private: ...@@ -247,8 +247,8 @@ private:
bool m_bCheckDimensionality; bool m_bCheckDimensionality;
}; };
typedef boost::shared_ptr<vtkDataSetFactory> vtkDataSetFactory_sptr; using vtkDataSetFactory_sptr = boost::shared_ptr<vtkDataSetFactory>;
typedef std::unique_ptr<vtkDataSetFactory> vtkDataSetFactory_uptr; using vtkDataSetFactory_uptr = std::unique_ptr<vtkDataSetFactory>;
} }
} }
......
...@@ -74,11 +74,9 @@ protected: ...@@ -74,11 +74,9 @@ protected:
void validate() const override; void validate() const override;
private: private:
typedef std::vector<std::vector<std::vector<UnstructuredPoint>>> PointMap; using PointMap = std::vector<std::vector<std::vector<UnstructuredPoint>>>;
using Plane = std::vector<std::vector<UnstructuredPoint>>;
typedef std::vector<std::vector<UnstructuredPoint>> Plane; using Column = std::vector<UnstructuredPoint>;
typedef std::vector<UnstructuredPoint> Column;
/// timestep obtained from framework. /// timestep obtained from framework.
double m_timestep; double m_timestep;
......
...@@ -59,7 +59,7 @@ public: ...@@ -59,7 +59,7 @@ public:
void initialize(const Mantid::API::Workspace_sptr &workspace) override; void initialize(const Mantid::API::Workspace_sptr &workspace) override;
typedef std::vector<UnstructuredPoint> Column; using Column = std::vector<UnstructuredPoint>;
std::string getFactoryTypeName() const override { std::string getFactoryTypeName() const override {
return "vtkMDHistoLineFactory"; return "vtkMDHistoLineFactory";
......
...@@ -62,9 +62,9 @@ public: ...@@ -62,9 +62,9 @@ public:
void initialize(const Mantid::API::Workspace_sptr &workspace) override; void initialize(const Mantid::API::Workspace_sptr &workspace) override;
typedef std::vector<std::vector<UnstructuredPoint>> Plane; using Plane = std::vector<std::vector<UnstructuredPoint>>;
typedef std::vector<UnstructuredPoint> Column; using Column = std::vector<UnstructuredPoint>;
std::string getFactoryTypeName() const override { std::string getFactoryTypeName() const override {
return "vtkMDHistoQuadFactory"; return "vtkMDHistoQuadFactory";
......
...@@ -18,8 +18,7 @@ ...@@ -18,8 +18,7 @@
namespace Mantid { namespace Mantid {
namespace VATES { namespace VATES {
// Helper typedef using SigFuncIMDNodePtr = Mantid::signal_t (Mantid::API::IMDNode::*)() const;
typedef Mantid::signal_t (Mantid::API::IMDNode::*SigFuncIMDNodePtr)() const;
/** /**
* Factory that creates a simple "splatter plot" data set composed of points * Factory that creates a simple "splatter plot" data set composed of points
......
...@@ -18,8 +18,8 @@ private: ...@@ -18,8 +18,8 @@ private:
} }
}; };
typedef Mantid::VATES::FilterUpdateProgressAction<MockFilter> using ProgressActionType =
ProgressActionType; Mantid::VATES::FilterUpdateProgressAction<MockFilter>;
public: public:
void testCallsView() { void testCallsView() {
...@@ -49,4 +49,4 @@ public: ...@@ -49,4 +49,4 @@ public:
"message", view.Message); "message", view.Message);
} }
}; };
#endif #endif
\ No newline at end of file
...@@ -33,7 +33,7 @@ private: ...@@ -33,7 +33,7 @@ private:
*/ */
class ConcreteMDEWLoadingPresenter : public MDEWLoadingPresenter { class ConcreteMDEWLoadingPresenter : public MDEWLoadingPresenter {
private: private:
typedef MDEWLoadingPresenter BaseClass; using BaseClass = MDEWLoadingPresenter;
public: public:
void void
......
...@@ -31,7 +31,7 @@ private: ...@@ -31,7 +31,7 @@ private:
*/ */
class ConcreteMDHWLoadingPresenter : public MDHWLoadingPresenter { class ConcreteMDHWLoadingPresenter : public MDHWLoadingPresenter {
private: private:
typedef MDHWLoadingPresenter BaseClass; using BaseClass = MDHWLoadingPresenter;
public: public:
ConcreteMDHWLoadingPresenter(std::unique_ptr<MDLoadingView> view) ConcreteMDHWLoadingPresenter(std::unique_ptr<MDLoadingView> view)
......
...@@ -13,7 +13,7 @@ namespace SimpleGui { ...@@ -13,7 +13,7 @@ namespace SimpleGui {
class VsiApplyBehaviour : public pqApplyBehavior { class VsiApplyBehaviour : public pqApplyBehavior {
public: public:
Q_OBJECT Q_OBJECT
typedef QObject Superclass; using Superclass = QObject;
public: public:
VsiApplyBehaviour(Mantid::VATES::ColorScaleLock *lock, VsiApplyBehaviour(Mantid::VATES::ColorScaleLock *lock,
......
...@@ -71,7 +71,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -71,7 +71,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class EXPORT_OPT_MANTIDVATES_SIMPLEGUI_VIEWWIDGETS class EXPORT_OPT_MANTIDVATES_SIMPLEGUI_VIEWWIDGETS
pqCameraReactionNonOrthogonalAxes : public pqReaction { pqCameraReactionNonOrthogonalAxes : public pqReaction {
Q_OBJECT Q_OBJECT
typedef pqReaction Superclass; using Superclass = pqReaction;
public: public:
enum Mode { enum Mode {
......
...@@ -72,7 +72,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ...@@ -72,7 +72,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
class EXPORT_OPT_MANTIDVATES_SIMPLEGUI_VIEWWIDGETS class EXPORT_OPT_MANTIDVATES_SIMPLEGUI_VIEWWIDGETS
pqCameraToolbarNonOrthogonalAxes : public QToolBar { pqCameraToolbarNonOrthogonalAxes : public QToolBar {
Q_OBJECT Q_OBJECT
typedef QToolBar Superclass; using Superclass = QToolBar;
public: public:
pqCameraToolbarNonOrthogonalAxes(const QString &title, pqCameraToolbarNonOrthogonalAxes(const QString &title,
......
...@@ -33,7 +33,7 @@ namespace CustomInterfaces { ...@@ -33,7 +33,7 @@ namespace CustomInterfaces {
class MANTIDQT_ISISREFLECTOMETRY_DLL MeasurementItem { class MANTIDQT_ISISREFLECTOMETRY_DLL MeasurementItem {
public: public:
typedef std::string IDType; using IDType = std::string;
/// Constructor /// Constructor
MeasurementItem(const IDType &measurementItemId, const IDType &subId, MeasurementItem(const IDType &measurementItemId, const IDType &subId,
......
...@@ -43,9 +43,9 @@ TransferResults ...@@ -43,9 +43,9 @@ TransferResults
MantidQt::CustomInterfaces::ReflMeasureTransferStrategy::transferRuns( MantidQt::CustomInterfaces::ReflMeasureTransferStrategy::transferRuns(
SearchResultMap &searchResults, Mantid::Kernel::ProgressBase &progress) { SearchResultMap &searchResults, Mantid::Kernel::ProgressBase &progress) {
typedef std::vector<MeasurementItem> VecSameMeasurement; using VecSameMeasurement = std::vector<MeasurementItem>;
typedef std::map<MeasurementItem::IDType, VecSameMeasurement> using MapGroupedMeasurement =
MapGroupedMeasurement; std::map<MeasurementItem::IDType, VecSameMeasurement>;
// table-like output for successful runs // table-like output for successful runs
std::vector<std::map<std::string, std::string>> runs; std::vector<std::map<std::string, std::string>> runs;
......
...@@ -72,7 +72,7 @@ protected: ...@@ -72,7 +72,7 @@ protected:
}; };
/// Typedef for a shared pointer to \c ReflSearchModel /// 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 CustomInterfaces
} // namespace Mantid } // namespace Mantid
......
...@@ -9,10 +9,10 @@ namespace MantidQt { ...@@ -9,10 +9,10 @@ namespace MantidQt {
namespace CustomInterfaces { namespace CustomInterfaces {
namespace ReflTableSchema { namespace ReflTableSchema {
typedef std::string ColumnNameType; using ColumnNameType = std::string;
typedef std::string ColumnValueType; using ColumnValueType = std::string;
typedef std::map<int, ColumnNameType> ColumnIndexNameMap; using ColumnIndexNameMap = std::map<int, ColumnNameType>;
typedef std::map<ColumnNameType, int> ColumnNameIndexMap; using ColumnNameIndexMap = std::map<ColumnNameType, int>;
/// Label for run number column /// Label for run number column
static const std::string RUNS("Run(s)"); static const std::string RUNS("Run(s)");
......
...@@ -29,7 +29,7 @@ struct SearchResult { ...@@ -29,7 +29,7 @@ struct SearchResult {
}; };
/// Helper typdef for map of SearchResults keyed by run /// 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 /** ReflTransferStrategy : Provides an stratgegy for transferring runs from
search results to a format suitable for processing. search results to a format suitable for processing.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment