From 23961706beed669a8362605ff5b105d9df328296 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 29 Aug 2022 14:09:18 +0200 Subject: [PATCH] Gui: modernize C++: replace 'typedef' with 'using' --- src/Gui/3Dconnexion/GuiRawInputEventFilter.h | 2 +- src/Gui/Application.cpp | 2 +- src/Gui/AutoSaver.h | 2 +- src/Gui/Command.cpp | 2 +- src/Gui/Command.h | 2 +- src/Gui/CommandView.cpp | 4 +- src/Gui/DAGView/DAGModel.h | 4 +- src/Gui/DAGView/DAGModelGraph.cpp | 14 +++---- src/Gui/DAGView/DAGModelGraph.h | 40 +++++++++---------- src/Gui/DAGView/DAGView.h | 12 +++--- src/Gui/DlgCommandsImp.cpp | 2 +- src/Gui/DlgCustomizeSpaceball.cpp | 2 +- src/Gui/DlgDisplayPropertiesImp.cpp | 2 +- src/Gui/DlgKeyboardImp.cpp | 2 +- src/Gui/DlgPreferencesImp.h | 2 +- src/Gui/DlgToolbarsImp.cpp | 2 +- src/Gui/Document.cpp | 4 +- src/Gui/DocumentModel.cpp | 2 +- src/Gui/DocumentObserver.cpp | 4 +- src/Gui/DocumentObserver.h | 2 +- src/Gui/DocumentRecovery.cpp | 2 +- src/Gui/FileDialog.h | 2 +- src/Gui/GestureNavigationStyle.cpp | 20 +++++----- src/Gui/GestureNavigationStyle.h | 2 +- src/Gui/GraphvizView.h | 2 +- src/Gui/Inventor/MarkerBitmaps.h | 2 +- src/Gui/Inventor/SmSwitchboard.h | 2 +- src/Gui/Inventor/SoAutoZoomTranslation.h | 2 +- src/Gui/Inventor/SoDrawingGrid.h | 2 +- src/Gui/Language/Translator.h | 4 +- src/Gui/MDIView.h | 2 +- src/Gui/ManualAlignment.h | 2 +- src/Gui/MergeDocuments.cpp | 2 +- src/Gui/MergeDocuments.h | 4 +- src/Gui/NavigationStyle.cpp | 2 +- src/Gui/NavigationStyle.h | 18 ++++----- src/Gui/Placement.h | 4 +- src/Gui/PropertyView.h | 2 +- src/Gui/Selection.h | 4 +- src/Gui/SelectionFilter.h | 2 +- src/Gui/SoAxisCrossKit.h | 6 +-- src/Gui/SoFCBackgroundGradient.h | 2 +- src/Gui/SoFCBoundingBox.h | 4 +- src/Gui/SoFCCSysDragger.h | 6 +-- src/Gui/SoFCColorBar.h | 4 +- src/Gui/SoFCColorGradient.h | 2 +- src/Gui/SoFCColorLegend.h | 2 +- src/Gui/SoFCInteractiveElement.h | 10 ++--- src/Gui/SoFCSelection.h | 6 +-- src/Gui/SoFCSelectionAction.h | 2 +- src/Gui/SoFCSelectionContext.h | 6 +-- src/Gui/SoFCUnifiedSelection.h | 14 +++---- src/Gui/SoFCVectorizeSVGAction.h | 2 +- src/Gui/SoFCVectorizeU3DAction.h | 2 +- src/Gui/SoTextLabel.h | 12 +++--- src/Gui/TaskElementColors.cpp | 2 +- src/Gui/TaskView/TaskAppearance.h | 2 +- src/Gui/TaskView/TaskView.h | 2 +- src/Gui/Transform.h | 2 +- src/Gui/Tree.cpp | 4 +- src/Gui/Tree.h | 12 +++--- src/Gui/Utilities.h | 20 +++++----- src/Gui/View3DInventorViewer.h | 2 +- src/Gui/View3DPy.h | 2 +- src/Gui/View3DViewerPy.h | 2 +- src/Gui/ViewProvider.cpp | 8 ++-- src/Gui/ViewProvider.h | 2 +- src/Gui/ViewProviderDocumentObjectGroup.h | 2 +- src/Gui/ViewProviderExtensionPython.h | 4 +- src/Gui/ViewProviderGeoFeatureGroup.h | 2 +- .../ViewProviderGeoFeatureGroupExtension.h | 2 +- src/Gui/ViewProviderGroupExtension.h | 2 +- src/Gui/ViewProviderLink.cpp | 8 ++-- src/Gui/ViewProviderLink.h | 6 +-- src/Gui/ViewProviderMaterialObject.h | 2 +- src/Gui/ViewProviderOriginGroupExtension.h | 2 +- src/Gui/ViewProviderPart.h | 2 +- src/Gui/ViewProviderPlacement.h | 2 +- src/Gui/ViewProviderPythonFeature.h | 6 +-- src/Gui/Widgets.h | 2 +- src/Gui/propertyeditor/PropertyModel.h | 2 +- 81 files changed, 188 insertions(+), 186 deletions(-) diff --git a/src/Gui/3Dconnexion/GuiRawInputEventFilter.h b/src/Gui/3Dconnexion/GuiRawInputEventFilter.h index 3c218f6db2..ce26116e89 100644 --- a/src/Gui/3Dconnexion/GuiRawInputEventFilter.h +++ b/src/Gui/3Dconnexion/GuiRawInputEventFilter.h @@ -30,7 +30,7 @@ namespace Gui class RawInputEventFilter : public QAbstractNativeEventFilter { public: - typedef bool (*EventFilter)(void *message, long *result); + using EventFilter = bool (*)(void *message, long *result); RawInputEventFilter(EventFilter filter) : eventFilter(filter) { } virtual ~RawInputEventFilter() { diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 2220dbbd2e..d6061f06cb 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -1662,7 +1662,7 @@ Gui::PreferencePackManager* Application::prefPackManager() //************************************************************************** // Init, Destruct and singleton -typedef void (*_qt_msg_handler_old)(QtMsgType, const QMessageLogContext &, const QString &); +using _qt_msg_handler_old = void (*)(QtMsgType, const QMessageLogContext &, const QString &); _qt_msg_handler_old old_qtmsg_handler = nullptr; void messageHandler(QtMsgType type, const QMessageLogContext &context, const QString &msg) diff --git a/src/Gui/AutoSaver.h b/src/Gui/AutoSaver.h index 2e851e71b9..de0da98a87 100644 --- a/src/Gui/AutoSaver.h +++ b/src/Gui/AutoSaver.h @@ -54,7 +54,7 @@ public: private: void slotNewObject(const App::DocumentObject&); void slotChangePropertyData(const App::Property&); - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection documentNew; Connection documentMod; }; diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index e04d1e3d14..b7481bc4f4 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -920,7 +920,7 @@ void Command::applyCommandData(const char* context, Action* action) const char* Command::keySequenceToAccel(int sk) const { /* Local class to ensure free()'ing the strings allocated below */ - typedef std::map StringMap; + using StringMap = std::map; static StringMap strings; StringMap::iterator i = strings.find(sk); diff --git a/src/Gui/Command.h b/src/Gui/Command.h index 7d7ba18409..e3812bea2a 100644 --- a/src/Gui/Command.h +++ b/src/Gui/Command.h @@ -193,7 +193,7 @@ class QWidget; class QByteArray; -typedef struct _object PyObject; +using PyObject = struct _object; namespace App { diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 6084e17e08..71510f406e 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -2389,7 +2389,7 @@ class SelectionCallbackHandler { private: static std::unique_ptr currentSelectionHandler; QCursor prevSelectionCursor; - typedef void (*FnCb)(void * userdata, SoEventCallback * node); + using FnCb = void (*)(void * userdata, SoEventCallback * node); FnCb fnCb; void* userData; bool prevSelectionEn; @@ -2608,7 +2608,7 @@ StdBoxSelection::StdBoxSelection() eType = AlterSelection; } -typedef enum { CENTER, INTERSECT } SelectionMode; +using SelectionMode = enum { CENTER, INTERSECT }; static std::vector getBoxSelection( ViewProviderDocumentObject *vp, SelectionMode mode, bool selectElement, diff --git a/src/Gui/DAGView/DAGModel.h b/src/Gui/DAGView/DAGModel.h index e29eb03e9e..fa8e2cff25 100644 --- a/src/Gui/DAGView/DAGModel.h +++ b/src/Gui/DAGView/DAGModel.h @@ -86,7 +86,7 @@ namespace Gui private: Model(){} //documentObject slots. - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectNewObject; Connection connectDelObject; Connection connectChgObject; @@ -162,7 +162,7 @@ namespace Gui //filters void setupFilters(); - typedef std::vector > FilterContainer; + using FilterContainer = std::vector >; FilterContainer filters; }; } diff --git a/src/Gui/DAGView/DAGModelGraph.cpp b/src/Gui/DAGView/DAGModelGraph.cpp index a491f7793a..bb98e97a23 100644 --- a/src/Gui/DAGView/DAGModelGraph.cpp +++ b/src/Gui/DAGView/DAGModelGraph.cpp @@ -58,7 +58,7 @@ EdgeProperty::EdgeProperty() : relation(BranchTag::None) bool Gui::DAG::hasRecord(const App::DocumentObject* dObjectIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(dObjectIn); return it != list.end(); @@ -66,7 +66,7 @@ bool Gui::DAG::hasRecord(const App::DocumentObject* dObjectIn, const GraphLinkCo const GraphLinkRecord& Gui::DAG::findRecord(Vertex vertexIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(vertexIn); assert(it != list.end()); @@ -75,7 +75,7 @@ const GraphLinkRecord& Gui::DAG::findRecord(Vertex vertexIn, const GraphLinkCont const GraphLinkRecord& Gui::DAG::findRecord(const App::DocumentObject* dObjectIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(dObjectIn); assert(it != list.end()); @@ -84,7 +84,7 @@ const GraphLinkRecord& Gui::DAG::findRecord(const App::DocumentObject* dObjectIn const GraphLinkRecord& Gui::DAG::findRecord(const ViewProviderDocumentObject* VPDObjectIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(VPDObjectIn); assert(it != list.end()); @@ -93,7 +93,7 @@ const GraphLinkRecord& Gui::DAG::findRecord(const ViewProviderDocumentObject* VP const GraphLinkRecord& Gui::DAG::findRecord(const RectItem* rectIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(rectIn); assert(it != list.end()); @@ -102,7 +102,7 @@ const GraphLinkRecord& Gui::DAG::findRecord(const RectItem* rectIn, const GraphL const GraphLinkRecord& Gui::DAG::findRecord(const std::string &stringIn, const GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::const_iterator it = list.find(stringIn); assert(it != list.end()); @@ -111,7 +111,7 @@ const GraphLinkRecord& Gui::DAG::findRecord(const std::string &stringIn, const G void Gui::DAG::eraseRecord(const ViewProviderDocumentObject* VPDObjectIn, GraphLinkContainer &containerIn) { - typedef GraphLinkContainer::index::type List; + using List = GraphLinkContainer::index::type; const List &list = containerIn.get(); List::iterator it = list.find(VPDObjectIn); assert(it != list.end()); diff --git a/src/Gui/DAGView/DAGModelGraph.h b/src/Gui/DAGView/DAGModelGraph.h index 166a797176..1283ca0370 100644 --- a/src/Gui/DAGView/DAGModelGraph.h +++ b/src/Gui/DAGView/DAGModelGraph.h @@ -66,7 +66,7 @@ namespace Gui //limit of column width? boost::dynamic_bitset? //did a trial run with this set at 4096, not much difference. //going to leave a big number by default and see how it goes. - typedef std::bitset<1024> ColumnMask; + using ColumnMask = std::bitset<1024>; /*! @brief Graph vertex information * @@ -93,11 +93,11 @@ namespace Gui * * needed to create an internal index for vertex. needed for listS. * color is needed by some algorithms */ - typedef boost::property + using vertex_prop = boost::property < boost::vertex_index_t, std::size_t, boost::property - > vertex_prop; + >; /*! @brief Graph edge information * @@ -118,18 +118,18 @@ namespace Gui std::shared_ptr connector; //!< line representing link between nodes. }; /*! @brief needed to create an internal index for graph edges. needed for setS.*/ - typedef boost::property edge_prop; + using edge_prop = boost::property; - typedef boost::adjacency_list Graph; - typedef boost::graph_traits::vertex_descriptor Vertex; - typedef boost::graph_traits::edge_descriptor Edge; - typedef boost::graph_traits::vertex_iterator VertexIterator; - typedef boost::graph_traits::edge_iterator EdgeIterator; - typedef boost::graph_traits::in_edge_iterator InEdgeIterator; - typedef boost::graph_traits::out_edge_iterator OutEdgeIterator; - typedef boost::graph_traits::adjacency_iterator VertexAdjacencyIterator; - typedef boost::reverse_graph GraphReversed; - typedef std::vector Path; //!< a path or any array of vertices + using Graph = boost::adjacency_list; + using Vertex = boost::graph_traits::vertex_descriptor; + using Edge = boost::graph_traits::edge_descriptor; + using VertexIterator = boost::graph_traits::vertex_iterator; + using EdgeIterator = boost::graph_traits::edge_iterator; + using InEdgeIterator = boost::graph_traits::in_edge_iterator; + using OutEdgeIterator = boost::graph_traits::out_edge_iterator; + using VertexAdjacencyIterator = boost::graph_traits::adjacency_iterator; + using GraphReversed = boost::reverse_graph; + using Path = std::vector; //!< a path or any array of vertices template class Edge_writer { @@ -173,8 +173,8 @@ namespace Gui template class RakeLeaves { - typedef boost::graph_traits::vertex_descriptor GraphInVertex; - typedef std::vector GraphInVertices; + using GraphInVertex = boost::graph_traits::vertex_descriptor; + using GraphInVertices = std::vector; public: explicit RakeLeaves(const GraphIn &graphIn) : graph(graphIn) {} GraphInVertices operator()() const @@ -195,8 +195,8 @@ namespace Gui template class DigRoots { - typedef boost::graph_traits::vertex_descriptor GraphInVertex; - typedef std::vector GraphInVertices; + using GraphInVertex = boost::graph_traits::vertex_descriptor; + using GraphInVertices = std::vector; public: explicit DigRoots(const GraphIn &graphIn) : graph(graphIn) {} GraphInVertices operator()() const @@ -250,7 +250,7 @@ namespace Gui }; namespace BMI = boost::multi_index; - typedef boost::multi_index_container + using GraphLinkContainer = boost::multi_index_container < GraphLinkRecord, BMI::indexed_by @@ -281,7 +281,7 @@ namespace Gui BMI::member > > - > GraphLinkContainer; + >; bool hasRecord(const App::DocumentObject* dObjectIn, const GraphLinkContainer &containerIn); const GraphLinkRecord& findRecord(Vertex vertexIn, const GraphLinkContainer &containerIn); diff --git a/src/Gui/DAGView/DAGView.h b/src/Gui/DAGView/DAGView.h index efd1d145be..1229bfe32b 100644 --- a/src/Gui/DAGView/DAGView.h +++ b/src/Gui/DAGView/DAGView.h @@ -45,22 +45,22 @@ namespace Gui public: explicit View(QWidget *parentIn = nullptr); ~View() override; - + public Q_SLOTS: void awakeSlot(); //!< hooked up to event dispatcher for update when idle. - + private: void onSelectionChanged(const SelectionChanges& msg) override; - + void slotActiveDocument(const Gui::Document &documentIn); void slotDeleteDocument(const Gui::Document &documentIn); - - typedef std::map > ModelMap; + + using ModelMap = std::map >; ModelMap modelMap; boost::signals2::scoped_connection conActive; boost::signals2::scoped_connection conDelete; }; - + //! @brief dock window for DAG viewer class DockWindow : public Gui::DockWindow { diff --git a/src/Gui/DlgCommandsImp.cpp b/src/Gui/DlgCommandsImp.cpp index ad3462b841..61d5f3e2c4 100644 --- a/src/Gui/DlgCommandsImp.cpp +++ b/src/Gui/DlgCommandsImp.cpp @@ -39,7 +39,7 @@ using namespace Gui::Dialog; namespace Gui { namespace Dialog { -typedef std::vector< std::pair > GroupMap; +using GroupMap = std::vector< std::pair >; struct GroupMap_find { const QLatin1String& item; diff --git a/src/Gui/DlgCustomizeSpaceball.cpp b/src/Gui/DlgCustomizeSpaceball.cpp index 28f797b885..bf184902b0 100644 --- a/src/Gui/DlgCustomizeSpaceball.cpp +++ b/src/Gui/DlgCustomizeSpaceball.cpp @@ -46,7 +46,7 @@ #include "SpaceballEvent.h" -typedef std::vector > GroupVector; +using GroupVector = std::vector >; using namespace Gui::Dialog; diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index e15aab0484..783aa91132 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -53,7 +53,7 @@ namespace bp = boost::placeholders; class DlgDisplayPropertiesImp::Private { - typedef boost::signals2::connection DlgDisplayPropertiesImp_Connection; + using DlgDisplayPropertiesImp_Connection = boost::signals2::connection; public: Ui::DlgDisplayProperties ui; bool floating; diff --git a/src/Gui/DlgKeyboardImp.cpp b/src/Gui/DlgKeyboardImp.cpp index ba3aa265a5..175449d364 100644 --- a/src/Gui/DlgKeyboardImp.cpp +++ b/src/Gui/DlgKeyboardImp.cpp @@ -42,7 +42,7 @@ using namespace Gui::Dialog; namespace Gui { namespace Dialog { -typedef std::vector< std::pair > GroupMap; +using GroupMap = std::vector< std::pair >; struct GroupMap_find { const QLatin1String& item; diff --git a/src/Gui/DlgPreferencesImp.h b/src/Gui/DlgPreferencesImp.h index 4e85d26a7b..6f72e4e53e 100644 --- a/src/Gui/DlgPreferencesImp.h +++ b/src/Gui/DlgPreferencesImp.h @@ -149,7 +149,7 @@ private: //@} private: - typedef std::pair> TGroupPages; + using TGroupPages = std::pair>; static std::list _pages; /**< Name of all registered preference pages */ struct Group { std::string iconName; diff --git a/src/Gui/DlgToolbarsImp.cpp b/src/Gui/DlgToolbarsImp.cpp index 99e2642bcb..fff8ea82c3 100644 --- a/src/Gui/DlgToolbarsImp.cpp +++ b/src/Gui/DlgToolbarsImp.cpp @@ -45,7 +45,7 @@ using namespace Gui::Dialog; namespace Gui { namespace Dialog { -typedef std::vector< std::pair > GroupMap; +using GroupMap = std::vector< std::pair >; struct GroupMap_find { const QLatin1String& item; diff --git a/src/Gui/Document.cpp b/src/Gui/Document.cpp index e666e66fa6..732348ae95 100644 --- a/src/Gui/Document.cpp +++ b/src/Gui/Document.cpp @@ -102,7 +102,7 @@ struct DocumentP std::map _ViewProviderMapAnnotation; std::list _redoViewProviders; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectNewObject; Connection connectDelObject; Connection connectCngObject; @@ -127,7 +127,7 @@ struct DocumentP Connection connectChangePropertyEditor; Connection connectChangeDocument; - typedef boost::signals2::shared_connection_block ConnectionBlock; + using ConnectionBlock = boost::signals2::shared_connection_block; ConnectionBlock connectActObjectBlocker; ConnectionBlock connectChangeDocumentBlocker; }; diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index a528388a06..5cc4c66c59 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -130,7 +130,7 @@ namespace Gui { friend class ViewProviderIndex; TYPESYSTEM_HEADER_WITH_OVERRIDE(); static QIcon* documentIcon; - typedef boost::unordered_set IndexSet; + using IndexSet = boost::unordered_set; std::map vp_nodes; void addToDocument(ViewProviderIndex*); void removeFromDocument(ViewProviderIndex*); diff --git a/src/Gui/DocumentObserver.cpp b/src/Gui/DocumentObserver.cpp index a5cb320fbb..e5a6b7936d 100644 --- a/src/Gui/DocumentObserver.cpp +++ b/src/Gui/DocumentObserver.cpp @@ -255,7 +255,7 @@ public: } Gui::Document* _document; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectApplicationDeletedDocument; }; @@ -345,7 +345,7 @@ public: Gui::ViewProviderDocumentObject* object; bool indocument; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectApplicationDeletedDocument; Connection connectDocumentCreatedObject; Connection connectDocumentDeletedObject; diff --git a/src/Gui/DocumentObserver.h b/src/Gui/DocumentObserver.h index ca9bf81f10..f1057c446a 100644 --- a/src/Gui/DocumentObserver.h +++ b/src/Gui/DocumentObserver.h @@ -355,7 +355,7 @@ private: virtual void slotDeleteDocument(const Document& Doc); private: - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectDocumentCreatedObject; Connection connectDocumentDeletedObject; Connection connectDocumentChangedObject; diff --git a/src/Gui/DocumentRecovery.cpp b/src/Gui/DocumentRecovery.cpp index 978b62abdd..6282259b4d 100644 --- a/src/Gui/DocumentRecovery.cpp +++ b/src/Gui/DocumentRecovery.cpp @@ -142,7 +142,7 @@ namespace Gui { namespace Dialog { class DocumentRecoveryPrivate { public: - typedef QMap XmlConfig; + using XmlConfig = QMap; enum Status { Unknown = 0, /*!< The file is not available */ diff --git a/src/Gui/FileDialog.h b/src/Gui/FileDialog.h index 871e3b8c68..c6bfa31ef8 100644 --- a/src/Gui/FileDialog.h +++ b/src/Gui/FileDialog.h @@ -244,7 +244,7 @@ class GuiExport SelectModule : public QDialog Q_OBJECT public: - typedef QMap Dict; + using Dict = QMap; SelectModule (const QString& type, const Dict&, QWidget* parent); ~SelectModule() override; diff --git a/src/Gui/GestureNavigationStyle.cpp b/src/Gui/GestureNavigationStyle.cpp index 7fa7c73675..0a5a275e7e 100644 --- a/src/Gui/GestureNavigationStyle.cpp +++ b/src/Gui/GestureNavigationStyle.cpp @@ -220,7 +220,7 @@ public: class NS::NaviMachine : public sc::state_machine { public: - typedef sc::state_machine superclass; + using superclass = sc::state_machine; explicit NaviMachine(NS& ns) : ns(ns) {} NS& ns; @@ -236,7 +236,7 @@ public: class NS::IdleState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; explicit IdleState(my_context ctx):my_base(ctx) { @@ -339,7 +339,7 @@ public: class NS::AwaitingMoveState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -480,7 +480,7 @@ public: class NS::RotateState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -522,7 +522,7 @@ public: class NS::PanState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -569,7 +569,7 @@ public: class NS::StickyPanState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -616,7 +616,7 @@ public: class NS::TiltState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -664,7 +664,7 @@ public: class NS::GestureState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; private: SbVec2s base_pos; @@ -750,7 +750,7 @@ public: class NS::AwaitingReleaseState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; public: explicit AwaitingReleaseState(my_context ctx):my_base(ctx) @@ -800,7 +800,7 @@ public: class NS::InteractState : public sc::state { public: - typedef sc::custom_reaction reactions; + using reactions = sc::custom_reaction; public: explicit InteractState(my_context ctx):my_base(ctx) diff --git a/src/Gui/GestureNavigationStyle.h b/src/Gui/GestureNavigationStyle.h index c2ec99a10e..4ced3048ad 100644 --- a/src/Gui/GestureNavigationStyle.h +++ b/src/Gui/GestureNavigationStyle.h @@ -33,7 +33,7 @@ namespace Gui { class GestureNavigationStyle: public UserNavigationStyle { - typedef UserNavigationStyle superclass; + using superclass = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); diff --git a/src/Gui/GraphvizView.h b/src/Gui/GraphvizView.h index cff5d9c171..642766e6c4 100644 --- a/src/Gui/GraphvizView.h +++ b/src/Gui/GraphvizView.h @@ -81,7 +81,7 @@ private: GraphvizWorker* thread; int nPending; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection recomputeConnection; Connection undoConnection; Connection redoConnection; diff --git a/src/Gui/Inventor/MarkerBitmaps.h b/src/Gui/Inventor/MarkerBitmaps.h index 8802694b6b..bfec66dab7 100644 --- a/src/Gui/Inventor/MarkerBitmaps.h +++ b/src/Gui/Inventor/MarkerBitmaps.h @@ -41,7 +41,7 @@ private: static void createBitmap(const std::string&, int px, int width, int height, const char* marker); private: - typedef std::pair Marker; + using Marker = std::pair; static std::map markerIndex; }; diff --git a/src/Gui/Inventor/SmSwitchboard.h b/src/Gui/Inventor/SmSwitchboard.h index 1c8f941b5d..b4eb17bbab 100644 --- a/src/Gui/Inventor/SmSwitchboard.h +++ b/src/Gui/Inventor/SmSwitchboard.h @@ -38,7 +38,7 @@ class GuiExport SmSwitchboard : public SoGroup { - typedef SoGroup inherited; + using inherited = SoGroup; SO_NODE_HEADER(SmSwitchboard); public: diff --git a/src/Gui/Inventor/SoAutoZoomTranslation.h b/src/Gui/Inventor/SoAutoZoomTranslation.h index e1854e9d3e..28ffaacd58 100644 --- a/src/Gui/Inventor/SoAutoZoomTranslation.h +++ b/src/Gui/Inventor/SoAutoZoomTranslation.h @@ -30,7 +30,7 @@ namespace Gui { class GuiExport SoAutoZoomTranslation : public SoTransformation { - typedef SoTransformation inherited; + using inherited = SoTransformation; SO_NODE_HEADER(SoAutoZoomTranslation); diff --git a/src/Gui/Inventor/SoDrawingGrid.h b/src/Gui/Inventor/SoDrawingGrid.h index 70fde0203f..af5d9ce2f4 100644 --- a/src/Gui/Inventor/SoDrawingGrid.h +++ b/src/Gui/Inventor/SoDrawingGrid.h @@ -28,7 +28,7 @@ namespace Gui { namespace Inventor { class GuiExport SoDrawingGrid : public SoShape { - typedef SoShape inherited; + using inherited = SoShape; SO_NODE_HEADER(SoDrawingGrid); diff --git a/src/Gui/Language/Translator.h b/src/Gui/Language/Translator.h index 0ec3f2e516..17aeb91cb2 100644 --- a/src/Gui/Language/Translator.h +++ b/src/Gui/Language/Translator.h @@ -33,8 +33,8 @@ class QDir; namespace Gui { -typedef std::list TStringList; -typedef std::map TStringMap; +using TStringList = std::list; +using TStringMap = std::map; /** * The Translator class uses Qt's QTranslator objects to change the language of the application diff --git a/src/Gui/MDIView.h b/src/Gui/MDIView.h index a37c93642d..86855a7242 100644 --- a/src/Gui/MDIView.h +++ b/src/Gui/MDIView.h @@ -181,7 +181,7 @@ private: Qt::WindowStates wstate; // list of active objects of this view ActiveObjectList ActiveObjects; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectDelObject; //remove active object upon delete. friend class MainWindow; diff --git a/src/Gui/ManualAlignment.h b/src/Gui/ManualAlignment.h index 4631c0e743..f31a96a855 100644 --- a/src/Gui/ManualAlignment.h +++ b/src/Gui/ManualAlignment.h @@ -249,7 +249,7 @@ private: static ManualAlignment* _instance; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectApplicationDeletedDocument; Connection connectDocumentDeletedObject; diff --git a/src/Gui/MergeDocuments.cpp b/src/Gui/MergeDocuments.cpp index 8af6c864d4..a376033f36 100644 --- a/src/Gui/MergeDocuments.cpp +++ b/src/Gui/MergeDocuments.cpp @@ -69,7 +69,7 @@ protected: private: std::map& nameMap; - typedef std::pair PropertyTag; + using PropertyTag = std::pair; std::stack propertyStack; }; } diff --git a/src/Gui/MergeDocuments.h b/src/Gui/MergeDocuments.h index 92612e7532..55eee8580b 100644 --- a/src/Gui/MergeDocuments.h +++ b/src/Gui/MergeDocuments.h @@ -25,6 +25,8 @@ #define GUI_MERGEDOCUMENTS_H #include +#include +#include namespace zipios { class ZipInputStream; @@ -56,7 +58,7 @@ private: Gui::Document* document; std::vector objects; std::map nameMap; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectExport; Connection connectImport; }; diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index d80bf0d2db..ffdc8a9122 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -80,7 +80,7 @@ struct NavigationStyleP { } class FCSphereSheetProjector : public SbSphereSheetProjector { - typedef SbSphereSheetProjector inherited; + using inherited = SbSphereSheetProjector; public: enum OrbitStyle { diff --git a/src/Gui/NavigationStyle.h b/src/Gui/NavigationStyle.h index a621cc1466..902f571c18 100644 --- a/src/Gui/NavigationStyle.h +++ b/src/Gui/NavigationStyle.h @@ -289,7 +289,7 @@ public: }; class GuiExport InventorNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -304,7 +304,7 @@ protected: }; class GuiExport CADNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -321,7 +321,7 @@ private: }; class GuiExport RevitNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -338,7 +338,7 @@ private: }; class GuiExport BlenderNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -355,7 +355,7 @@ private: }; class GuiExport MayaGestureNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -379,7 +379,7 @@ protected: }; class GuiExport TouchpadNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -393,7 +393,7 @@ protected: }; class GuiExport OpenCascadeNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -407,7 +407,7 @@ protected: }; class GuiExport OpenSCADNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -421,7 +421,7 @@ protected: }; class GuiExport TinkerCADNavigationStyle : public UserNavigationStyle { - typedef UserNavigationStyle inherited; + using inherited = UserNavigationStyle; TYPESYSTEM_HEADER_WITH_OVERRIDE(); diff --git a/src/Gui/Placement.h b/src/Gui/Placement.h index 50ffabf595..a259745f4e 100644 --- a/src/Gui/Placement.h +++ b/src/Gui/Placement.h @@ -87,8 +87,8 @@ Q_SIGNALS: void directionChanged(); private: - typedef Gui::LocationUi Ui_PlacementComp; - typedef boost::signals2::connection Connection; + using Ui_PlacementComp = Gui::LocationUi; + using Connection = boost::signals2::connection; Ui_PlacementComp* ui; QSignalMapper* signalMapper; Connection connectAct; diff --git a/src/Gui/PropertyView.h b/src/Gui/PropertyView.h index 9e400fba0e..7126700335 100644 --- a/src/Gui/PropertyView.h +++ b/src/Gui/PropertyView.h @@ -94,7 +94,7 @@ private: private: struct PropInfo; struct PropFind; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectPropData; Connection connectPropView; Connection connectPropAppend; diff --git a/src/Gui/Selection.h b/src/Gui/Selection.h index 0c2abdef16..c1245d7b8a 100644 --- a/src/Gui/Selection.h +++ b/src/Gui/Selection.h @@ -260,7 +260,7 @@ private: void _onSelectionChanged(const SelectionChanges& msg); private: - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectSelection; std::string filterDocName; std::string filterObjName; @@ -721,7 +721,7 @@ protected: mutable std::list<_SelObj> _PickedList; bool _needPickedList; - typedef std::set SelStackItem; + using SelStackItem = std::set; std::deque _SelStackBack; std::deque _SelStackForward; diff --git a/src/Gui/SelectionFilter.h b/src/Gui/SelectionFilter.h index 69b5208f27..7299c63d57 100644 --- a/src/Gui/SelectionFilter.h +++ b/src/Gui/SelectionFilter.h @@ -225,7 +225,7 @@ struct Node_Object Node_Slice *Slice; std::string SubName; }; -typedef std::shared_ptr Node_ObjectPtr; +using Node_ObjectPtr = std::shared_ptr; struct Node_Block { diff --git a/src/Gui/SoAxisCrossKit.h b/src/Gui/SoAxisCrossKit.h index 80631e00ce..d8c9b5c62b 100644 --- a/src/Gui/SoAxisCrossKit.h +++ b/src/Gui/SoAxisCrossKit.h @@ -38,7 +38,7 @@ class SbVec2s; namespace Gui { class GuiExport SoShapeScale : public SoBaseKit { - typedef SoBaseKit inherited; + using inherited = SoBaseKit; SO_KIT_HEADER(SoShapeScale); @@ -59,7 +59,7 @@ protected: }; class GuiExport SoAxisCrossKit : public SoBaseKit { - typedef SoBaseKit inherited; + using inherited = SoBaseKit; SO_KIT_HEADER(SoAxisCrossKit); @@ -88,7 +88,7 @@ private: }; class GuiExport SoRegPoint : public SoShape { - typedef SoShape inherited; + using inherited = SoShape; SO_NODE_HEADER(SoRegPoint); diff --git a/src/Gui/SoFCBackgroundGradient.h b/src/Gui/SoFCBackgroundGradient.h index 1a07c8bc7b..2ebd7de091 100644 --- a/src/Gui/SoFCBackgroundGradient.h +++ b/src/Gui/SoFCBackgroundGradient.h @@ -34,7 +34,7 @@ class SoGLRenderAction; namespace Gui { class GuiExport SoFCBackgroundGradient : public SoNode { - typedef SoNode inherited; + using inherited = SoNode; SO_NODE_HEADER(Gui::SoFCBackgroundGradient); diff --git a/src/Gui/SoFCBoundingBox.h b/src/Gui/SoFCBoundingBox.h index bdfcfeb96f..26667bb3b0 100644 --- a/src/Gui/SoFCBoundingBox.h +++ b/src/Gui/SoFCBoundingBox.h @@ -45,7 +45,7 @@ namespace Gui { * @author Josh Grant */ class GuiExport SoFCBoundingBox : public SoShape { - typedef SoShape inherited; + using inherited = SoShape; SO_NODE_HEADER(Gui::SoFCBoundingBox); @@ -78,7 +78,7 @@ private: * @author Werner Mayer */ class GuiExport SoSkipBoundingGroup : public SoGroup { - typedef SoGroup inherited; + using inherited = SoGroup; SO_NODE_HEADER(Gui::SoSkipBoundingGroup); diff --git a/src/Gui/SoFCCSysDragger.h b/src/Gui/SoFCCSysDragger.h index acdca57807..a0ac0f5934 100644 --- a/src/Gui/SoFCCSysDragger.h +++ b/src/Gui/SoFCCSysDragger.h @@ -82,7 +82,7 @@ private: void buildFirstInstance(); SbVec3f roundTranslation(const SbVec3f &vecIn, float incrementIn); SoGroup* buildGeometry(); - typedef SoDragger inherited; + using inherited = SoDragger; }; /*! @brief Rotation Dragger. @@ -128,7 +128,7 @@ private: void buildFirstInstance(); int roundIncrement(const float &radiansIn); SoGroup* buildGeometry(); - typedef SoDragger inherited; + using inherited = SoDragger; }; /*! @brief Coordinate System Dragger @@ -267,7 +267,7 @@ private: void updateAxisScale(); - typedef SoDragger inherited; + using inherited = SoDragger; }; } diff --git a/src/Gui/SoFCColorBar.h b/src/Gui/SoFCColorBar.h index afde2c6a90..6f597c7ec1 100644 --- a/src/Gui/SoFCColorBar.h +++ b/src/Gui/SoFCColorBar.h @@ -46,7 +46,7 @@ class SoFCColorGradient; * @author Werner Mayer */ class GuiExport SoFCColorBarBase : public SoSeparator, public App::ValueFloatToRGB { - typedef SoSeparator inherited; + using inherited = SoSeparator; SO_NODE_ABSTRACT_HEADER(Gui::SoFCColorBarBase); @@ -149,7 +149,7 @@ private: * @author Werner Mayer */ class GuiExport SoFCColorBar : public SoFCColorBarBase, public Base::Subject { - typedef SoFCColorBarBase inherited; + using inherited = SoFCColorBarBase; SO_NODE_HEADER(Gui::SoFCColorBar); diff --git a/src/Gui/SoFCColorGradient.h b/src/Gui/SoFCColorGradient.h index f45fddbea2..01bcd95e5e 100644 --- a/src/Gui/SoFCColorGradient.h +++ b/src/Gui/SoFCColorGradient.h @@ -37,7 +37,7 @@ class SbVec2s; namespace Gui { class GuiExport SoFCColorGradient : public SoFCColorBarBase { - typedef SoFCColorBarBase inherited; + using inherited = SoFCColorBarBase; SO_NODE_HEADER(Gui::SoFCColorGradient); diff --git a/src/Gui/SoFCColorLegend.h b/src/Gui/SoFCColorLegend.h index 49ebeee116..3c6c0bedbe 100644 --- a/src/Gui/SoFCColorLegend.h +++ b/src/Gui/SoFCColorLegend.h @@ -36,7 +36,7 @@ class SbVec2s; namespace Gui { class GuiExport SoFCColorLegend : public SoFCColorBarBase { - typedef SoFCColorBarBase inherited; + using inherited = SoFCColorBarBase; SO_NODE_HEADER(Gui::SoFCColorLegend); diff --git a/src/Gui/SoFCInteractiveElement.h b/src/Gui/SoFCInteractiveElement.h index d28f7e688d..c95016c60e 100644 --- a/src/Gui/SoFCInteractiveElement.h +++ b/src/Gui/SoFCInteractiveElement.h @@ -37,7 +37,7 @@ namespace Gui { * @author Werner Mayer */ class GuiExport SoFCInteractiveElement : public SoReplacedElement { - typedef SoReplacedElement inherited; + using inherited = SoReplacedElement; SO_ELEMENT_HEADER(SoFCInteractiveElement); @@ -58,7 +58,7 @@ private: }; class GuiExport SoGLWidgetElement : public SoElement { - typedef SoElement inherited; + using inherited = SoElement; SO_ELEMENT_HEADER(SoGLWidgetElement); @@ -83,7 +83,7 @@ protected: }; class GuiExport SoGLRenderActionElement : public SoElement { - typedef SoElement inherited; + using inherited = SoElement; SO_ELEMENT_HEADER(SoGLRenderActionElement); @@ -108,7 +108,7 @@ protected: }; class GuiExport SoGLWidgetNode : public SoNode { - typedef SoNode inherited; + using inherited = SoNode; SO_NODE_HEADER(SoGLWidgetNode); @@ -126,7 +126,7 @@ protected: }; class GuiExport SoGLVBOActivatedElement : public SoElement { - typedef SoElement inherited; + using inherited = SoElement; SO_ELEMENT_HEADER(SoGLVBOActivatedElement); diff --git a/src/Gui/SoFCSelection.h b/src/Gui/SoFCSelection.h index d694bc1ebe..2b4b0deb3c 100644 --- a/src/Gui/SoFCSelection.h +++ b/src/Gui/SoFCSelection.h @@ -57,7 +57,7 @@ namespace Gui { * \author Jürgen Riegel */ class GuiExport SoFCSelection : public SoGroup { - typedef SoGroup inherited; + using inherited = SoGroup; SO_NODE_HEADER(Gui::SoFCSelection); @@ -110,8 +110,8 @@ public: protected: ~SoFCSelection() override; - typedef SoFCSelectionContext SelContext; - typedef std::shared_ptr SelContextPtr; + using SelContext = SoFCSelectionContext; + using SelContextPtr = std::shared_ptr; SelContextPtr selContext; SelContextPtr selContext2; diff --git a/src/Gui/SoFCSelectionAction.h b/src/Gui/SoFCSelectionAction.h index d818b7f9a4..325a23507e 100644 --- a/src/Gui/SoFCSelectionAction.h +++ b/src/Gui/SoFCSelectionAction.h @@ -310,7 +310,7 @@ class SoBoxSelectionRenderActionP; * @author Werner Mayer */ class GuiExport SoBoxSelectionRenderAction : public SoGLRenderAction { - typedef SoGLRenderAction inherited; + using inherited = SoGLRenderAction; SO_ACTION_HEADER(SoBoxSelectionRenderAction); diff --git a/src/Gui/SoFCSelectionContext.h b/src/Gui/SoFCSelectionContext.h index 82e78bce33..293fc77196 100644 --- a/src/Gui/SoFCSelectionContext.h +++ b/src/Gui/SoFCSelectionContext.h @@ -37,7 +37,7 @@ namespace Gui { class SoFCSelectionRoot; struct SoFCSelectionContextBase; -typedef std::shared_ptr SoFCSelectionContextBasePtr; +using SoFCSelectionContextBasePtr = std::shared_ptr; struct GuiExport SoFCSelectionContextBase { virtual ~SoFCSelectionContextBase() {} @@ -46,7 +46,7 @@ struct GuiExport SoFCSelectionContextBase { }; struct SoFCSelectionContext; -typedef std::shared_ptr SoFCSelectionContextPtr; +using SoFCSelectionContextPtr = std::shared_ptr; struct GuiExport SoFCSelectionContext : SoFCSelectionContextBase { @@ -98,7 +98,7 @@ struct GuiExport SoFCSelectionContext : SoFCSelectionContextBase }; struct SoFCSelectionContextEx; -typedef std::shared_ptr SoFCSelectionContextExPtr; +using SoFCSelectionContextExPtr = std::shared_ptr; struct GuiExport SoFCSelectionContextEx : SoFCSelectionContext { diff --git a/src/Gui/SoFCUnifiedSelection.h b/src/Gui/SoFCUnifiedSelection.h index 0383665eb6..06c4daadc0 100644 --- a/src/Gui/SoFCUnifiedSelection.h +++ b/src/Gui/SoFCUnifiedSelection.h @@ -55,7 +55,7 @@ class ViewProviderDocumentObject; * \author Jürgen Riegel */ class GuiExport SoFCUnifiedSelection : public SoSeparator { - typedef SoSeparator inherited; + using inherited = SoSeparator; SO_NODE_HEADER(Gui::SoFCUnifiedSelection); @@ -131,7 +131,7 @@ private: }; class GuiExport SoFCPathAnnotation : public SoSeparator { - typedef SoSeparator inherited; + using inherited = SoSeparator; SO_NODE_HEADER(Gui::SoFCPathAnnotation); public: @@ -160,7 +160,7 @@ protected: }; class GuiExport SoFCSeparator : public SoSeparator { - typedef SoSeparator inherited; + using inherited = SoSeparator; SO_NODE_HEADER(Gui::SoFCSeparator); @@ -184,7 +184,7 @@ private: }; class GuiExport SoFCSelectionRoot : public SoFCSeparator { - typedef SoFCSeparator inherited; + using inherited = SoFCSeparator; SO_NODE_HEADER(Gui::SoFCSelectionRoot); @@ -350,7 +350,7 @@ protected: bool operator()(const Stack &a, const Stack &b) const; }; - typedef std::map ContextMap; + using ContextMap = std::map; ContextMap contextMap; ContextMap contextMap2;//holding secondary context @@ -363,8 +363,8 @@ protected: bool hideAll = false; static MergeFunc merge; }; - typedef std::shared_ptr SelContextPtr; - typedef std::vector ColorStack; + using SelContextPtr = std::shared_ptr; + using ColorStack = std::vector; static ColorStack SelColorStack; static ColorStack HlColorStack; static SoFCSelectionRoot *ShapeColorNode; diff --git a/src/Gui/SoFCVectorizeSVGAction.h b/src/Gui/SoFCVectorizeSVGAction.h index ed12f0dd88..f3f577717d 100644 --- a/src/Gui/SoFCVectorizeSVGAction.h +++ b/src/Gui/SoFCVectorizeSVGAction.h @@ -49,7 +49,7 @@ private: */ class SoFCVectorizeSVGActionP; class GuiExport SoFCVectorizeSVGAction : public SoVectorizeAction { - typedef SoReplacedElement inherited; + using inherited = SoReplacedElement; SO_ACTION_HEADER(SoFCVectorizeSVGAction); diff --git a/src/Gui/SoFCVectorizeU3DAction.h b/src/Gui/SoFCVectorizeU3DAction.h index 3142347726..e70f91d8ca 100644 --- a/src/Gui/SoFCVectorizeU3DAction.h +++ b/src/Gui/SoFCVectorizeU3DAction.h @@ -48,7 +48,7 @@ private: */ class SoFCVectorizeU3DActionP; class GuiExport SoFCVectorizeU3DAction : public SoVectorizeAction { - typedef SoVectorizeAction inherited; + using inherited = SoVectorizeAction; SO_ACTION_HEADER(SoFCVectorizeU3DAction); diff --git a/src/Gui/SoTextLabel.h b/src/Gui/SoTextLabel.h index afcfc6ad15..3764a4c244 100644 --- a/src/Gui/SoTextLabel.h +++ b/src/Gui/SoTextLabel.h @@ -42,7 +42,7 @@ namespace Gui { * @author Werner Mayer */ class GuiExport SoTextLabel : public SoText2 { - typedef SoText2 inherited; + using inherited = SoText2; SO_NODE_HEADER(SoTextLabel); @@ -64,7 +64,7 @@ protected: * @author Werner Mayer */ class GuiExport SoColorBarLabel : public SoText2 { - typedef SoText2 inherited; + using inherited = SoText2; SO_NODE_HEADER(SoColorBarLabel); @@ -77,7 +77,7 @@ protected: }; class GuiExport SoStringLabel : public SoNode { - typedef SoNode inherited; + using inherited = SoNode; SO_NODE_HEADER(SoStringLabel); @@ -91,12 +91,12 @@ public: SoSFInt32 size; protected: - ~SoStringLabel() override {}; + ~SoStringLabel() override {} void GLRender(SoGLRenderAction *action) override; }; class GuiExport SoFrameLabel : public SoImage { - typedef SoImage inherited; + using inherited = SoImage; SO_NODE_HEADER(SoFrameLabel); @@ -118,7 +118,7 @@ public: //SoSFImage image; protected: - ~SoFrameLabel() override {}; + ~SoFrameLabel() override {} void notify(SoNotList * list) override; void GLRender(SoGLRenderAction *action) override; diff --git a/src/Gui/TaskElementColors.cpp b/src/Gui/TaskElementColors.cpp index 1bdfea3a36..62120e54d7 100644 --- a/src/Gui/TaskElementColors.cpp +++ b/src/Gui/TaskElementColors.cpp @@ -52,7 +52,7 @@ namespace bp = boost::placeholders; class ElementColors::Private: public Gui::SelectionGate { public: - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; std::unique_ptr ui; ViewProviderDocumentObject *vp; ViewProviderDocumentObject *vpParent; diff --git a/src/Gui/TaskView/TaskAppearance.h b/src/Gui/TaskView/TaskAppearance.h index 81e6fdd634..52d79c215c 100644 --- a/src/Gui/TaskView/TaskAppearance.h +++ b/src/Gui/TaskView/TaskAppearance.h @@ -37,7 +37,7 @@ class ViewProvider; namespace TaskView { -typedef boost::signals2::connection TaskAppearance_Connection; +using TaskAppearance_Connection = boost::signals2::connection; class Ui_TaskAppearance; class TaskAppearance : public TaskBox, public Gui::SelectionSingleton::ObserverType diff --git a/src/Gui/TaskView/TaskView.h b/src/Gui/TaskView/TaskView.h index c30ba52e9c..f73a5485d7 100644 --- a/src/Gui/TaskView/TaskView.h +++ b/src/Gui/TaskView/TaskView.h @@ -43,7 +43,7 @@ class ComboView; } namespace TaskView { -typedef boost::signals2::connection Connection; +using Connection = boost::signals2::connection; class TaskEditControl; class TaskDialog; diff --git a/src/Gui/Transform.h b/src/Gui/Transform.h index 88ed66e417..0cf313ae2b 100644 --- a/src/Gui/Transform.h +++ b/src/Gui/Transform.h @@ -98,7 +98,7 @@ Q_SIGNALS: void directionChanged(); private: - typedef Gui::LocationUi Ui_TransformComp; + using Ui_TransformComp = Gui::LocationUi; Ui_TransformComp* ui; Base::Placement pm; std::set selection; diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index f9e5eff402..af35c1f617 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -242,7 +242,7 @@ struct TimingInfo { // --------------------------------------------------------------------------- -typedef std::set DocumentObjectItems; +using DocumentObjectItems = std::set; class Gui::DocumentObjectData { public: @@ -257,7 +257,7 @@ public: std::string label; std::string label2; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connectIcon; Connection connectTool; diff --git a/src/Gui/Tree.h b/src/Gui/Tree.h index 6b8fe56965..bcb8d1a1f9 100644 --- a/src/Gui/Tree.h +++ b/src/Gui/Tree.h @@ -44,7 +44,7 @@ namespace Gui { class ViewProviderDocumentObject; class DocumentObjectItem; class DocumentObjectData; -typedef std::shared_ptr DocumentObjectDataPtr; +using DocumentObjectDataPtr = std::shared_ptr; class DocumentItem; @@ -240,7 +240,7 @@ private: friend class DocumentItem; friend class DocumentObjectItem; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectNewDocument; Connection connectDelDocument; Connection connectRenDocument; @@ -297,7 +297,7 @@ public: void Restore(Base::XMLReader &) override; class ExpandInfo; - typedef std::shared_ptr ExpandInfoPtr; + using ExpandInfoPtr = std::shared_ptr; protected: /** Adds a view provider to the document item. @@ -332,7 +332,7 @@ protected: App::DocumentObject *getTopParent(App::DocumentObject *obj, std::string &subname); - typedef std::unordered_map > ViewParentMap; + using ViewParentMap = std::unordered_map >; void populateParents(const ViewProvider *vp, ViewParentMap &); private: @@ -345,7 +345,7 @@ private: ExpandInfoPtr _ExpandInfo; void restoreItemExpansion(const ExpandInfoPtr &, DocumentObjectItem *); - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; Connection connectNewObject; Connection connectDelObject; Connection connectChgObject; @@ -432,7 +432,7 @@ private: DocumentItem *myOwner; DocumentObjectDataPtr myData; std::vector mySubs; - typedef boost::signals2::connection Connection; + using Connection = boost::signals2::connection; int previousStatus; int selected; bool populated; diff --git a/src/Gui/Utilities.h b/src/Gui/Utilities.h index 0787a0bee7..7fd19fe8a9 100644 --- a/src/Gui/Utilities.h +++ b/src/Gui/Utilities.h @@ -41,8 +41,8 @@ namespace Base { // Specialization for SbVec3f template <> struct vec_traits { - typedef SbVec3f vec_type; - typedef float float_type; + using vec_type = SbVec3f; + using float_type = float; explicit vec_traits(const vec_type& v) : v(v){} inline std::tuple get() const { return std::make_tuple(v[0], v[1], v[2]); @@ -54,8 +54,8 @@ private: // Specialization for SbVec3d template <> struct vec_traits { - typedef SbVec3d vec_type; - typedef double float_type; + using vec_type = SbVec3d; + using float_type = double; explicit vec_traits(const vec_type& v) : v(v){} inline std::tuple get() const { return std::make_tuple(v[0], v[1], v[2]); @@ -67,8 +67,8 @@ private: // Specialization for SbRotation template <> struct vec_traits { - typedef SbRotation vec_type; - typedef float float_type; + using vec_type = SbRotation; + using float_type = float; explicit vec_traits(const vec_type& v) : v(v){} inline std::tuple get() const { float_type q1,q2,q3,q4; @@ -82,8 +82,8 @@ private: // Specialization for SbColor template <> struct vec_traits { - typedef SbColor vec_type; - typedef float float_type; + using vec_type = SbColor; + using float_type = float; explicit vec_traits(const vec_type& v) : v(v){} inline std::tuple get() const { return std::make_tuple(v[0], v[1], v[2]); @@ -95,8 +95,8 @@ private: // Specialization for Color template <> struct vec_traits { - typedef App::Color vec_type; - typedef float float_type; + using vec_type = App::Color; + using float_type = float; explicit vec_traits(const vec_type& v) : v(v){} inline std::tuple get() const { return std::make_tuple(v.r, v.g, v.b); diff --git a/src/Gui/View3DInventorViewer.h b/src/Gui/View3DInventorViewer.h index efa4ef281c..60410bfadb 100644 --- a/src/Gui/View3DInventorViewer.h +++ b/src/Gui/View3DInventorViewer.h @@ -79,7 +79,7 @@ class ViewerEventFilter; */ class GuiExport View3DInventorViewer : public Quarter::SoQTQuarterAdaptor, public SelectionObserver { - typedef Quarter::SoQTQuarterAdaptor inherited; + using inherited = Quarter::SoQTQuarterAdaptor; Q_OBJECT public: diff --git a/src/Gui/View3DPy.h b/src/Gui/View3DPy.h index 11ea92f5e7..76700d65f0 100644 --- a/src/Gui/View3DPy.h +++ b/src/Gui/View3DPy.h @@ -151,7 +151,7 @@ private: static void draggerCallback(void * ud, SoDragger* dragger); private: - typedef PyObject* (*method_varargs_handler)(PyObject *_self, PyObject *_args); + using method_varargs_handler = PyObject* (*)(PyObject *_self, PyObject *_args); static method_varargs_handler pycxx_handler; static PyObject *method_varargs_ext_handler(PyObject *_self, PyObject *_args); Py::Object getattribute(const char *); diff --git a/src/Gui/View3DViewerPy.h b/src/Gui/View3DViewerPy.h index 0f2e275c1a..b70d9243fd 100644 --- a/src/Gui/View3DViewerPy.h +++ b/src/Gui/View3DViewerPy.h @@ -78,7 +78,7 @@ public: private: - typedef PyObject* (*method_varargs_handler)(PyObject *_self, PyObject *_args); + using method_varargs_handler = PyObject* (*)(PyObject *_self, PyObject *_args); static method_varargs_handler pycxx_handler; static PyObject *method_varargs_ext_handler(PyObject *_self, PyObject *_args); diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index a2371108cc..fd78b5f799 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -572,7 +572,7 @@ PyObject* ViewProvider::getPyObject() #include namespace Gui { -typedef boost::adjacency_list < +using Graph = boost::adjacency_list < boost::vecS, // class OutEdgeListS : a Sequence or an AssociativeContainer boost::vecS, // class VertexListS : a Sequence or a RandomAccessContainer boost::directedS, // class DirectedS : This is a directed graph @@ -580,9 +580,9 @@ typedef boost::adjacency_list < boost::no_property, // class EdgeProperty: boost::no_property, // class GraphProperty: boost::listS // class EdgeListS: -> Graph; -typedef boost::graph_traits::vertex_descriptor Vertex; -typedef boost::graph_traits::edge_descriptor Edge; +>; +using Vertex = boost::graph_traits::vertex_descriptor; +using Edge = boost::graph_traits::edge_descriptor; void addNodes(Graph& graph, std::map& vertexNodeMap, SoNode* node) { diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index ba5284ed7f..1ec43105e8 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -93,7 +93,7 @@ class CoinPtr: public boost::intrusive_ptr { public: // Too bad, VC2013 does not support constructor inheritance //using boost::intrusive_ptr::intrusive_ptr; - typedef boost::intrusive_ptr inherited; + using inherited = boost::intrusive_ptr; CoinPtr() {} CoinPtr(T *p, bool add_ref=true):inherited(p,add_ref){} template CoinPtr(CoinPtr const &r):inherited(r){} diff --git a/src/Gui/ViewProviderDocumentObjectGroup.h b/src/Gui/ViewProviderDocumentObjectGroup.h index b61dad9232..acd066fed9 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.h +++ b/src/Gui/ViewProviderDocumentObjectGroup.h @@ -55,7 +55,7 @@ private: std::vector nodes; }; -typedef ViewProviderPythonFeatureT ViewProviderDocumentObjectGroupPython; +using ViewProviderDocumentObjectGroupPython = ViewProviderPythonFeatureT; } // namespace Gui diff --git a/src/Gui/ViewProviderExtensionPython.h b/src/Gui/ViewProviderExtensionPython.h index d2e5bc440f..442ada290d 100644 --- a/src/Gui/ViewProviderExtensionPython.h +++ b/src/Gui/ViewProviderExtensionPython.h @@ -39,7 +39,7 @@ class ViewProviderExtensionPythonT : public ExtensionT EXTENSION_PROPERTY_HEADER(Gui::ViewProviderExtensionPythonT); public: - typedef ExtensionT Inherited; + using Inherited = ExtensionT; ViewProviderExtensionPythonT() { ExtensionT::m_isPythonExtension = true; @@ -54,7 +54,7 @@ public: ViewProviderExtensionPythonT& operator= (ViewProviderExtensionPythonT&&) = delete; }; -typedef ViewProviderExtensionPythonT ViewProviderExtensionPython; +using ViewProviderExtensionPython = ViewProviderExtensionPythonT; } //Gui diff --git a/src/Gui/ViewProviderGeoFeatureGroup.h b/src/Gui/ViewProviderGeoFeatureGroup.h index 5b65739569..182cb2318a 100644 --- a/src/Gui/ViewProviderGeoFeatureGroup.h +++ b/src/Gui/ViewProviderGeoFeatureGroup.h @@ -44,7 +44,7 @@ public: ~ViewProviderGeoFeatureGroup() override; }; -typedef ViewProviderPythonFeatureT ViewProviderGeoFeatureGroupPython; +using ViewProviderGeoFeatureGroupPython = ViewProviderPythonFeatureT; } // namespace Gui diff --git a/src/Gui/ViewProviderGeoFeatureGroupExtension.h b/src/Gui/ViewProviderGeoFeatureGroupExtension.h index b0aa469ee4..9a4ba7f002 100644 --- a/src/Gui/ViewProviderGeoFeatureGroupExtension.h +++ b/src/Gui/ViewProviderGeoFeatureGroupExtension.h @@ -67,7 +67,7 @@ protected: SoGroup *pcGroupChildren; }; -typedef ViewProviderExtensionPythonT ViewProviderGeoFeatureGroupExtensionPython; +using ViewProviderGeoFeatureGroupExtensionPython = ViewProviderExtensionPythonT; } //namespace Gui diff --git a/src/Gui/ViewProviderGroupExtension.h b/src/Gui/ViewProviderGroupExtension.h index 1ae880a04a..11bbd531e6 100644 --- a/src/Gui/ViewProviderGroupExtension.h +++ b/src/Gui/ViewProviderGroupExtension.h @@ -56,7 +56,7 @@ private: std::vector nodes; }; -typedef ViewProviderExtensionPythonT ViewProviderGroupExtensionPython; +using ViewProviderGroupExtensionPython = ViewProviderExtensionPythonT; } //namespace Gui diff --git a/src/Gui/ViewProviderLink.cpp b/src/Gui/ViewProviderLink.cpp index 4c54226980..60f9700017 100644 --- a/src/Gui/ViewProviderLink.cpp +++ b/src/Gui/ViewProviderLink.cpp @@ -80,7 +80,7 @@ FC_LOG_LEVEL_INIT("App::Link", true, true) using namespace Gui; using namespace Base; -typedef boost::iterator_range CharRange; +using CharRange = boost::iterator_range; //////////////////////////////////////////////////////////////////////////// static inline bool appendPathSafe(SoPath *path, SoNode *node) { @@ -110,13 +110,13 @@ class Gui::LinkInfo { public: std::atomic ref; - typedef boost::signals2::scoped_connection Connection; + using Connection = boost::signals2::scoped_connection; Connection connChangeIcon; ViewProviderDocumentObject *pcLinked; std::unordered_set links; - typedef LinkInfoPtr Pointer; + using Pointer = LinkInfoPtr; SoNodeSensor sensor; SoNodeSensor switchSensor; @@ -129,7 +129,7 @@ public: // for group type view providers CoinPtr pcChildGroup; - typedef std::unordered_map NodeMap; + using NodeMap = std::unordered_map; NodeMap nodeMap; std::map iconMap; diff --git a/src/Gui/ViewProviderLink.h b/src/Gui/ViewProviderLink.h index 6ed6b97d11..a3277f708c 100644 --- a/src/Gui/ViewProviderLink.h +++ b/src/Gui/ViewProviderLink.h @@ -38,7 +38,7 @@ class SoMaterialBinding; namespace Gui { class LinkInfo; -typedef boost::intrusive_ptr LinkInfoPtr; +using LinkInfoPtr = boost::intrusive_ptr; class GuiExport ViewProviderLinkObserver: public ViewProviderExtension { EXTENSION_TYPESYSTEM_HEADER_WITH_OVERRIDE(); @@ -181,7 +181,7 @@ protected: class GuiExport ViewProviderLink : public ViewProviderDocumentObject { PROPERTY_HEADER_WITH_OVERRIDE(Gui::ViewProviderLink); - typedef ViewProviderDocumentObject inherited; + using inherited = ViewProviderDocumentObject; public: App::PropertyBool OverrideMaterial; @@ -333,7 +333,7 @@ protected: mutable qint64 overlayCacheKey; }; -typedef ViewProviderPythonFeatureT ViewProviderLinkPython; +using ViewProviderLinkPython = ViewProviderPythonFeatureT; } //namespace Gui diff --git a/src/Gui/ViewProviderMaterialObject.h b/src/Gui/ViewProviderMaterialObject.h index 7562727bb0..fa8714b031 100644 --- a/src/Gui/ViewProviderMaterialObject.h +++ b/src/Gui/ViewProviderMaterialObject.h @@ -49,7 +49,7 @@ public: }; -typedef ViewProviderPythonFeatureT ViewProviderMaterialObjectPython; +using ViewProviderMaterialObjectPython = ViewProviderPythonFeatureT; } // namespace Gui diff --git a/src/Gui/ViewProviderOriginGroupExtension.h b/src/Gui/ViewProviderOriginGroupExtension.h index 330df8a64c..00332627ff 100644 --- a/src/Gui/ViewProviderOriginGroupExtension.h +++ b/src/Gui/ViewProviderOriginGroupExtension.h @@ -59,7 +59,7 @@ private: boost::signals2::connection connectChangedObjectGui; }; -typedef ViewProviderExtensionPythonT ViewProviderOriginGroupExtensionPython; +using ViewProviderOriginGroupExtensionPython = ViewProviderExtensionPythonT; } //namespace Gui diff --git a/src/Gui/ViewProviderPart.h b/src/Gui/ViewProviderPart.h index dc546f01f4..85f322479f 100644 --- a/src/Gui/ViewProviderPart.h +++ b/src/Gui/ViewProviderPart.h @@ -56,7 +56,7 @@ protected: }; -typedef ViewProviderPythonFeatureT ViewProviderPartPython; +using ViewProviderPartPython = ViewProviderPythonFeatureT; } // namespace Gui diff --git a/src/Gui/ViewProviderPlacement.h b/src/Gui/ViewProviderPlacement.h index 72c4c21521..8852bdf170 100644 --- a/src/Gui/ViewProviderPlacement.h +++ b/src/Gui/ViewProviderPlacement.h @@ -67,7 +67,7 @@ protected: }; -typedef ViewProviderPythonFeatureT ViewProviderPlacementPython; +using ViewProviderPlacementPython = ViewProviderPythonFeatureT; } //namespace Gui diff --git a/src/Gui/ViewProviderPythonFeature.h b/src/Gui/ViewProviderPythonFeature.h index 405437d13a..1aad2b0c86 100644 --- a/src/Gui/ViewProviderPythonFeature.h +++ b/src/Gui/ViewProviderPythonFeature.h @@ -185,7 +185,7 @@ private: FC_PY_VIEW_OBJECT FlagMax, }; - typedef std::bitset Flags; + using Flags = std::bitset; mutable Flags _Flags; public: @@ -623,8 +623,8 @@ private: }; // Special Feature-Python classes -typedef ViewProviderPythonFeatureT ViewProviderPythonFeature; -typedef ViewProviderPythonFeatureT ViewProviderPythonGeometry; +using ViewProviderPythonFeature = ViewProviderPythonFeatureT; +using ViewProviderPythonGeometry = ViewProviderPythonFeatureT; } // namespace Gui diff --git a/src/Gui/Widgets.h b/src/Gui/Widgets.h index 0963952e42..09b69388d6 100644 --- a/src/Gui/Widgets.h +++ b/src/Gui/Widgets.h @@ -188,7 +188,7 @@ private: // ------------------------------------------------------------------------------ -typedef QPair CheckListItem; +using CheckListItem = QPair; class Ui_DlgTreeWidget; /** diff --git a/src/Gui/propertyeditor/PropertyModel.h b/src/Gui/propertyeditor/PropertyModel.h index f23ef9d57a..f7f9a8608b 100644 --- a/src/Gui/propertyeditor/PropertyModel.h +++ b/src/Gui/propertyeditor/PropertyModel.h @@ -43,7 +43,7 @@ class PropertyModel : public QAbstractItemModel Q_OBJECT public: - typedef std::vector< std::pair< std::string, std::vector > > PropertyList; + using PropertyList = std::vector< std::pair< std::string, std::vector > >; PropertyModel(QObject* parent); ~PropertyModel() override;