From 070cb5e09d2c17051773cd2fa508c0d79c6b705d Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Mon, 23 Aug 2021 09:31:01 +0200 Subject: [PATCH] Projects: Fix deprecated iterator std::iterator is deprecated in C++ 17. The aliases should be set directly. The aliases are public too. Change-Id: Ib4dc259b03bd9386ba9d177340b89cc7208c8643 Reviewed-by: Qt CI Bot Reviewed-by: Christian Stenger Reviewed-by: hjk --- src/plugins/projectexplorer/projectmodels.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index f4471d99a12..b34fd3e4617 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -73,9 +73,15 @@ namespace Internal { /// An output iterator whose assignment operator appends a clone of the operand to the list of /// children of the WrapperNode passed to the constructor. -class Appender : public std::iterator +class Appender { public: + using iterator_category = std::output_iterator_tag; + using value_type = void; + using difference_type = void; + using pointer = void; + using reference = void; + explicit Appender(WrapperNode *parent) : m_parent(parent) {} Appender &operator=(const WrapperNode *node)