c523464d1466 — Chris Cannam 6 months ago
Avoid compiler warning for deprecated API we can't readily replace
2 files changed, 11 insertions(+), 0 deletions(-)

M src/objectmapper/ObjectLoader.cpp
M src/objectmapper/ObjectStorer.cpp
M src/objectmapper/ObjectLoader.cpp +6 -0
@@ 438,6 438,12 @@ private:
         // actually be ordered
         Nodes children = childrenOf(node);
         if (children.empty()) return children;
+        
+        // Qt 5.14 deprecates QSet::fromList, but its suggested
+        // replacement (a constructor taking begin and end iterators)
+        // was only added the same 5.14 release!
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+
         NodeSet remaining = NodeSet::fromList(children);
         Nodes ordered = orderedSiblingsOf(children[0]);
         remaining.subtract(NodeSet::fromList(ordered));

          
M src/objectmapper/ObjectStorer.cpp +5 -0
@@ 190,6 190,11 @@ private:
     Uri m_followProp;
 
     void collect(StoreState &state) {
+        
+        // Qt 5.14 deprecates QSet::fromList, but its suggested
+        // replacement (a constructor taking begin and end iterators)
+        // was only added the same 5.14 release!
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
 
         QObjectList candidates = state.requested;
         state.noBlanks = ObjectSet::fromList(candidates);