[TD]CI clang warnings
This commit is contained in:
@@ -56,12 +56,9 @@
|
||||
|
||||
#include "QGSPage.h"
|
||||
#include "QGIView.h"
|
||||
#include "QGIPrimPath.h"
|
||||
#include "QGIGhostHighlight.h"
|
||||
#include "MDIViewPage.h"
|
||||
#include "ViewProviderPage.h"
|
||||
#include "Rez.h"
|
||||
#include "QGIViewPart.h"
|
||||
|
||||
#include "TaskDetail.h"
|
||||
|
||||
@@ -69,8 +66,8 @@ using namespace TechDrawGui;
|
||||
using namespace TechDraw;
|
||||
using namespace Gui;
|
||||
|
||||
#define CREATEMODE 0
|
||||
#define EDITMODE 1
|
||||
static constexpr int CREATEMODE(0);
|
||||
static constexpr int EDITMODE(1);
|
||||
|
||||
//creation constructor
|
||||
TaskDetail::TaskDetail(TechDraw::DrawViewPart* baseFeat):
|
||||
@@ -222,10 +219,6 @@ TaskDetail::TaskDetail(TechDraw::DrawViewDetail* detailFeat):
|
||||
this, SLOT(onHighlightMoved(QPointF)));
|
||||
}
|
||||
|
||||
TaskDetail::~TaskDetail()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskDetail::updateTask()
|
||||
{
|
||||
// blockUpdate = true;
|
||||
@@ -304,20 +297,20 @@ void TaskDetail::setUiFromFeat()
|
||||
}
|
||||
|
||||
//update ui point fields after tracker finishes
|
||||
void TaskDetail::updateUi(QPointF p)
|
||||
void TaskDetail::updateUi(QPointF pos)
|
||||
{
|
||||
ui->qsbX->setValue(p.x());
|
||||
ui->qsbY->setValue(- p.y());
|
||||
ui->qsbX->setValue(pos.x());
|
||||
ui->qsbY->setValue(- pos.y());
|
||||
}
|
||||
|
||||
void TaskDetail::enableInputFields(bool b)
|
||||
void TaskDetail::enableInputFields(bool isEnabled)
|
||||
{
|
||||
ui->qsbX->setEnabled(b);
|
||||
ui->qsbY->setEnabled(b);
|
||||
ui->qsbX->setEnabled(isEnabled);
|
||||
ui->qsbY->setEnabled(isEnabled);
|
||||
if (ui->cbScaleType->currentIndex() == 2) // only if custom scale
|
||||
ui->qsbScale->setEnabled(b);
|
||||
ui->qsbRadius->setEnabled(b);
|
||||
ui->leReference->setEnabled(b);
|
||||
ui->qsbScale->setEnabled(isEnabled);
|
||||
ui->qsbRadius->setEnabled(isEnabled);
|
||||
ui->leReference->setEnabled(isEnabled);
|
||||
}
|
||||
|
||||
void TaskDetail::onXEdit()
|
||||
@@ -377,9 +370,9 @@ void TaskDetail::onReferenceEdit()
|
||||
updateDetail();
|
||||
}
|
||||
|
||||
void TaskDetail::onDraggerClicked(bool b)
|
||||
void TaskDetail::onDraggerClicked(bool clicked)
|
||||
{
|
||||
Q_UNUSED(b);
|
||||
Q_UNUSED(clicked);
|
||||
ui->pbDragger->setEnabled(false);
|
||||
enableInputFields(false);
|
||||
editByHighlight();
|
||||
@@ -445,10 +438,10 @@ void TaskDetail::saveButtons(QPushButton* btnOK,
|
||||
m_btnCancel = btnCancel;
|
||||
}
|
||||
|
||||
void TaskDetail::enableTaskButtons(bool b)
|
||||
void TaskDetail::enableTaskButtons(bool button)
|
||||
{
|
||||
m_btnOK->setEnabled(b);
|
||||
m_btnCancel->setEnabled(b);
|
||||
m_btnOK->setEnabled(button);
|
||||
m_btnCancel->setEnabled(button);
|
||||
}
|
||||
|
||||
//***** Feature create & edit stuff *******************************************
|
||||
@@ -459,7 +452,7 @@ void TaskDetail::createDetail()
|
||||
|
||||
m_detailName = m_doc->getUniqueObjectName("Detail");
|
||||
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().addObject('TechDraw::DrawViewDetail','%s')",
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().addObject('TechDraw::DrawViewDetail', '%s')",
|
||||
m_detailName.c_str());
|
||||
App::DocumentObject *docObj = m_doc->getObject(m_detailName.c_str());
|
||||
TechDraw::DrawViewDetail* dvd = dynamic_cast<TechDraw::DrawViewDetail *>(docObj);
|
||||
@@ -470,15 +463,15 @@ void TaskDetail::createDetail()
|
||||
|
||||
dvd->Source.setValues(getBaseFeat()->Source.getValues());
|
||||
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().%s.BaseView = App.activeDocument().%s",
|
||||
m_detailName.c_str(),m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().%s.Direction = App.activeDocument().%s.Direction",
|
||||
m_detailName.c_str(),m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().%s.XDirection = App.activeDocument().%s.XDirection",
|
||||
m_detailName.c_str(),m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().%s.Scale = App.activeDocument().%s.Scale",
|
||||
m_detailName.c_str(),m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc,"App.activeDocument().%s.addView(App.activeDocument().%s)",
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().%s.BaseView = App.activeDocument().%s",
|
||||
m_detailName.c_str(), m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().%s.Direction = App.activeDocument().%s.Direction",
|
||||
m_detailName.c_str(), m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().%s.XDirection = App.activeDocument().%s.XDirection",
|
||||
m_detailName.c_str(), m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().%s.Scale = App.activeDocument().%s.Scale",
|
||||
m_detailName.c_str(), m_baseName.c_str());
|
||||
Gui::Command::doCommand(Command::Doc, "App.activeDocument().%s.addView(App.activeDocument().%s)",
|
||||
m_pageName.c_str(), m_detailName.c_str());
|
||||
|
||||
Gui::Command::updateActive();
|
||||
@@ -588,7 +581,7 @@ DrawViewDetail* TaskDetail::getDetailFeat()
|
||||
return static_cast<DrawViewDetail*>(detailObj);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
std::string msg = "TaskDetail - detail feature " +
|
||||
m_detailName +
|
||||
" not found \n";
|
||||
@@ -610,7 +603,7 @@ bool TaskDetail::accept()
|
||||
m_ghost->hide();
|
||||
getDetailFeat()->requestPaint();
|
||||
getBaseFeat()->requestPaint();
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()");
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -625,7 +618,7 @@ bool TaskDetail::reject()
|
||||
m_ghost->hide();
|
||||
if (m_mode == CREATEMODE) {
|
||||
if (m_created) {
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().removeObject('%s')",
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().removeObject('%s')",
|
||||
m_detailName.c_str());
|
||||
}
|
||||
} else {
|
||||
@@ -634,8 +627,8 @@ bool TaskDetail::reject()
|
||||
getBaseFeat()->requestPaint();
|
||||
}
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().recompute()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().recompute()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()");
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user