Compiler warning cleanup (#22997)
* Part: Remove unused arguments from isLinearEdge * Gui: For Qt 6.5 and later, use ParseOptions in xml * Gui: Remove unused variable from fuzzyMatch() * Sketcher: Remove unused parameter from *ReferenceSelection * PD: Remove unused parameter from *ReferenceSelection * Part: Rename layout to avoid conflict * FEM: remove unused variable from handlePropertyChange * CAM: Eliminate C++11 compiler warning by explicitly defaulting copy
This commit is contained in:
@@ -478,6 +478,15 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
}
|
||||
|
||||
QDomDocument xmlDocument;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,5,0)
|
||||
if (const auto result = xmlDocument.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing); !result) {
|
||||
std::cerr << "Parse error in XML content at line " << result.errorLine
|
||||
<< ", column " << result.errorColumn << ": "
|
||||
<< qPrintable(result.errorMessage) << std::endl;
|
||||
return;
|
||||
}
|
||||
#else
|
||||
QString errorStr;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
@@ -489,6 +498,7 @@ void StdCmdFreezeViews::onRestoreViews()
|
||||
<< (const char*)errorStr.toLatin1() << std::endl;
|
||||
return;
|
||||
}
|
||||
#endif
|
||||
|
||||
// get the root element
|
||||
QDomElement root = xmlDocument.documentElement();
|
||||
|
||||
@@ -1719,7 +1719,6 @@ bool PreferencesSearchController::fuzzyMatch(const QString& searchText, const QS
|
||||
int targetIndex = 0;
|
||||
int consecutiveMatches = 0;
|
||||
int maxConsecutive = 0;
|
||||
int totalMatches = 0;
|
||||
int firstMatchIndex = -1;
|
||||
int lastMatchIndex = -1;
|
||||
|
||||
@@ -1730,7 +1729,6 @@ bool PreferencesSearchController::fuzzyMatch(const QString& searchText, const QS
|
||||
}
|
||||
lastMatchIndex = targetIndex;
|
||||
searchIndex++;
|
||||
totalMatches++;
|
||||
consecutiveMatches++;
|
||||
maxConsecutive = qMax(maxConsecutive, consecutiveMatches);
|
||||
} else {
|
||||
|
||||
@@ -566,6 +566,11 @@ DocumentRecoveryPrivate::XmlConfig DocumentRecoveryPrivate::readXmlFile(const QS
|
||||
if (!file.open(QFile::ReadOnly))
|
||||
return cfg;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(6,5,0)
|
||||
if (!domDocument.setContent(&file, QDomDocument::ParseOption::UseNamespaceProcessing)) {
|
||||
return cfg;
|
||||
}
|
||||
#else
|
||||
QString errorStr;
|
||||
int errorLine;
|
||||
int errorColumn;
|
||||
@@ -574,6 +579,7 @@ DocumentRecoveryPrivate::XmlConfig DocumentRecoveryPrivate::readXmlFile(const QS
|
||||
&errorColumn)) {
|
||||
return cfg;
|
||||
}
|
||||
#endif
|
||||
|
||||
QDomElement root = domDocument.documentElement();
|
||||
if (root.tagName() != QLatin1String("AutoRecovery")) {
|
||||
|
||||
@@ -302,6 +302,8 @@ public:
|
||||
, hi(_hi)
|
||||
{}
|
||||
|
||||
Int128& operator=(const Int128&) = default;
|
||||
|
||||
Int128& operator=(const long64& val)
|
||||
{
|
||||
lo = (ulong64)val;
|
||||
|
||||
@@ -259,7 +259,7 @@ void TaskPostWidget::updateEnumerationList(App::PropertyEnumeration& prop, QComb
|
||||
box->setCurrentIndex(index);
|
||||
}
|
||||
|
||||
void TaskPostWidget::handlePropertyChange(const App::DocumentObject& obj, const App::Property& prop)
|
||||
void TaskPostWidget::handlePropertyChange(const App::DocumentObject&, const App::Property& prop)
|
||||
{
|
||||
if (auto postobj = m_object.get<Fem::FemPostObject>()) {
|
||||
if (&prop == &postobj->Data) {
|
||||
|
||||
@@ -497,7 +497,7 @@ public:
|
||||
/// Checks whether the shape is a planar face
|
||||
bool isPlanar(double tol = 1.0e-7) const; // NOLINT
|
||||
/// Check if this shape is a single linear edge, works on BSplineCurve and BezierCurve
|
||||
bool isLinearEdge(Base::Vector3d *dir = nullptr, Base::Vector3d *base = nullptr) const;
|
||||
bool isLinearEdge() const;
|
||||
/// Check if this shape is a single planar face, works on BSplineSurface and BezierSurface
|
||||
bool isPlanarFace(double tol=1e-7) const; // NOLINT
|
||||
//@}
|
||||
|
||||
@@ -5322,7 +5322,7 @@ TopoShape TopoShape::splitWires(std::vector<TopoShape>* inner, SplitWireReorient
|
||||
return TopoShape {};
|
||||
}
|
||||
|
||||
bool TopoShape::isLinearEdge(Base::Vector3d* dir, Base::Vector3d* base) const
|
||||
bool TopoShape::isLinearEdge() const
|
||||
{
|
||||
if (isNull() || getShape().ShapeType() != TopAbs_EDGE) {
|
||||
return false;
|
||||
|
||||
@@ -199,7 +199,7 @@
|
||||
<property name="flat">
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<layout class="QVBoxLayout" name="verticalLayout_31">
|
||||
<item>
|
||||
<widget class="Gui::PrefCheckBox" name="checkShowFinalPreview">
|
||||
<property name="text">
|
||||
|
||||
@@ -85,7 +85,7 @@ const QString TaskSketchBasedParameters::onAddSelection(const Gui::SelectionChan
|
||||
return refStr;
|
||||
}
|
||||
|
||||
void TaskSketchBasedParameters::startReferenceSelection(App::DocumentObject* profile,
|
||||
void TaskSketchBasedParameters::startReferenceSelection(App::DocumentObject*,
|
||||
App::DocumentObject* base)
|
||||
{
|
||||
const auto* bodyViewProvider = getViewObject<ViewProvider>()->getBodyViewProvider();
|
||||
@@ -105,7 +105,7 @@ void TaskSketchBasedParameters::startReferenceSelection(App::DocumentObject* pro
|
||||
}
|
||||
}
|
||||
|
||||
void TaskSketchBasedParameters::finishReferenceSelection(App::DocumentObject* profile,
|
||||
void TaskSketchBasedParameters::finishReferenceSelection(App::DocumentObject*,
|
||||
App::DocumentObject* base)
|
||||
{
|
||||
if (!previouslyVisibleViewProvider) {
|
||||
|
||||
@@ -195,7 +195,6 @@ private:
|
||||
|
||||
private:
|
||||
std::vector<Base::Vector2d> EditMarkers;
|
||||
bool mousePressed = false;
|
||||
|
||||
public:
|
||||
std::list<Gui::InputHint> getToolHints() const override
|
||||
|
||||
Reference in New Issue
Block a user