[TD]remove Qt5 Svg handling code
This commit is contained in:
@@ -24,12 +24,7 @@
|
||||
#include "PreCompiled.h"
|
||||
|
||||
#ifndef _PreComp_
|
||||
# include <QDomDocument>
|
||||
#if 0 && QT_VERSION < QT_VERSION_CHECK(6,0,0)
|
||||
# include "QDomNodeModel.h"
|
||||
# include <QXmlQuery>
|
||||
# include <QXmlResultItems>
|
||||
#endif
|
||||
#include <QDomDocument>
|
||||
#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<bool(QDomElement&)>& 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<bool(QD
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user