From 48b9c62b1eb70c4ebcd83407b8c6c8978ced362a Mon Sep 17 00:00:00 2001 From: wandererfan Date: Sat, 29 Apr 2023 09:46:33 -0400 Subject: [PATCH] [TD]remove Qt5 Svg handling code --- src/Mod/TechDraw/App/CMakeLists.txt | 2 -- src/Mod/TechDraw/App/XMLQuery.cpp | 31 +---------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/Mod/TechDraw/App/CMakeLists.txt b/src/Mod/TechDraw/App/CMakeLists.txt index acccea5dcd..9595318544 100644 --- a/src/Mod/TechDraw/App/CMakeLists.txt +++ b/src/Mod/TechDraw/App/CMakeLists.txt @@ -136,8 +136,6 @@ SET(Draw_SRCS DrawLeaderLine.h DrawRichAnno.cpp DrawRichAnno.h - QDomNodeModel.cpp - QDomNodeModel.h DrawTile.cpp DrawTile.h DrawTileWeld.cpp diff --git a/src/Mod/TechDraw/App/XMLQuery.cpp b/src/Mod/TechDraw/App/XMLQuery.cpp index ea8c1b58f9..6a88c3b6a3 100644 --- a/src/Mod/TechDraw/App/XMLQuery.cpp +++ b/src/Mod/TechDraw/App/XMLQuery.cpp @@ -24,12 +24,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ -# include -#if 0 && QT_VERSION < QT_VERSION_CHECK(6,0,0) -# include "QDomNodeModel.h" -# include -# include -#endif +#include #endif #include "XMLQuery.h" @@ -43,29 +38,6 @@ XMLQuery::XMLQuery(QDomDocument& dom) } -#if 0 && QT_VERSION < QT_VERSION_CHECK(6,0,0) -bool XMLQuery::processItems(const QString& queryStr, const std::function& process) -{ - QXmlQuery query(QXmlQuery::XQuery10); - QDomNodeModel model(query.namePool(), domDocument); - QDomElement symbolDocElem = domDocument.documentElement(); - query.setFocus(QXmlItem(model.fromDomNode(symbolDocElem))); - - query.setQuery(queryStr); - QXmlResultItems queryResult; - query.evaluateTo(&queryResult); - - while (!queryResult.next().isNull()) { - QDomElement tspanElement = - model.toDomNode(queryResult.current().toNodeModelIndex()).toElement(); - if (!process(tspanElement)) { - return false; - } - } - - return true; -} -#else // A helper function that traverses all child elements recursively and check for // elements of name "text" with an attribute "freecad:editable" // If the query string contains "tspan" the first sub-element is used or the @@ -115,4 +87,3 @@ bool XMLQuery::processItems(const QString& queryStr, const std::function