[TD]CI clang warnings
This commit is contained in:
@@ -36,12 +36,8 @@
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/Control.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/View3DInventor.h>
|
||||
#include <Gui/View3DInventorViewer.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
|
||||
#include <Inventor/SbVec3f.h>
|
||||
|
||||
#include <Mod/Part/App/PartFeature.h>
|
||||
|
||||
#include <Mod/TechDraw/App/DrawPage.h>
|
||||
@@ -54,7 +50,6 @@
|
||||
#include "MDIViewPage.h"
|
||||
#include "ViewProviderPage.h"
|
||||
#include "ViewProviderProjGroup.h"
|
||||
#include "ViewProviderProjGroupItem.h"
|
||||
|
||||
#include "TaskProjGroup.h"
|
||||
#include <Mod/TechDraw/Gui/ui_TaskProjGroup.h>
|
||||
@@ -101,15 +96,15 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
|
||||
|
||||
// Rotation buttons
|
||||
// Note we don't do the custom one here, as it's handled by [a different function that's held up in customs]
|
||||
connect(ui->butTopRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butRightRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butDownRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butLeftRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butCCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked(void)));
|
||||
connect(ui->butTopRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butRightRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butDownRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butLeftRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
connect(ui->butCCWRotate, SIGNAL(clicked()), this, SLOT(rotateButtonClicked()));
|
||||
|
||||
// //Reset button
|
||||
// connect(ui->butReset, SIGNAL(clicked()), this, SLOT(onResetClicked(void)));
|
||||
// connect(ui->butReset, SIGNAL(clicked()), this, SLOT(onResetClicked()));
|
||||
|
||||
// Slot for Scale Type
|
||||
connect(ui->cmbScaleType, SIGNAL(currentIndexChanged(int)), this, SLOT(scaleTypeChanged(int)));
|
||||
@@ -117,13 +112,12 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
|
||||
connect(ui->sbScaleDen, SIGNAL(valueChanged(int)), this, SLOT(scaleManuallyChanged(int)));
|
||||
|
||||
// Slot for Projection Type (layout)
|
||||
// connect(ui->projection, SIGNAL(currentIndexChanged(int)), this, SLOT(projectionTypeChanged(int)));
|
||||
connect(ui->projection, SIGNAL(currentIndexChanged(QString)), this, SLOT(projectionTypeChanged(QString)));
|
||||
|
||||
// Spacing
|
||||
connect(ui->cbAutoDistribute, SIGNAL(clicked(bool)), this, SLOT(AutoDistributeClicked(bool)));
|
||||
connect(ui->sbXSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged(void)));
|
||||
connect(ui->sbYSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged(void)));
|
||||
connect(ui->sbXSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged()));
|
||||
connect(ui->sbYSpacing, SIGNAL(valueChanged(double)), this, SLOT(spacingChanged()));
|
||||
ui->sbXSpacing->setUnit(Base::Unit::Length);
|
||||
ui->sbYSpacing->setUnit(Base::Unit::Length);
|
||||
|
||||
@@ -137,10 +131,6 @@ TaskProjGroup::TaskProjGroup(TechDraw::DrawProjGroup* featView, bool mode) :
|
||||
saveGroupState();
|
||||
}
|
||||
|
||||
TaskProjGroup::~TaskProjGroup()
|
||||
{
|
||||
}
|
||||
|
||||
void TaskProjGroup::saveGroupState()
|
||||
{
|
||||
// Base::Console().Message("TPG::saveGroupState()\n");
|
||||
@@ -223,7 +213,7 @@ void TaskProjGroup::rotateButtonClicked()
|
||||
else if (clicked == ui->butRightRotate) multiView->rotate("Right");
|
||||
else if (clicked == ui->butLeftRotate) multiView->rotate("Left");
|
||||
else if (clicked == ui->butCWRotate ) multiView->spin("CW");
|
||||
else if (clicked == ui->butCCWRotate) multiView->spin("CCW");
|
||||
else if (clicked == ui->butCCWRotate) multiView->spin("CCW");
|
||||
|
||||
setUiPrimary();
|
||||
}
|
||||
@@ -281,17 +271,17 @@ void TaskProjGroup::scaleTypeChanged(int index)
|
||||
multiView->Scale.setValue(scale);
|
||||
//unblock recompute
|
||||
} else {
|
||||
Base::Console().Log("Error - TaskProjGroup::scaleTypeChanged - unknown scale type: %d\n",index);
|
||||
Base::Console().Log("Error - TaskProjGroup::scaleTypeChanged - unknown scale type: %d\n", index);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void TaskProjGroup::AutoDistributeClicked(bool b)
|
||||
void TaskProjGroup::AutoDistributeClicked(bool clicked)
|
||||
{
|
||||
if (blockUpdate) {
|
||||
return;
|
||||
}
|
||||
multiView->AutoDistribute.setValue(b);
|
||||
multiView->AutoDistribute.setValue(clicked);
|
||||
multiView->recomputeFeature();
|
||||
}
|
||||
|
||||
@@ -404,9 +394,9 @@ void TaskProjGroup::setFractionalScale(double newScale)
|
||||
blockUpdate = false;
|
||||
}
|
||||
|
||||
void TaskProjGroup::scaleManuallyChanged(int i)
|
||||
void TaskProjGroup::scaleManuallyChanged(int unused)
|
||||
{
|
||||
Q_UNUSED(i);
|
||||
Q_UNUSED(unused);
|
||||
if(blockUpdate)
|
||||
return;
|
||||
if (!multiView->ScaleType.isValue("Custom")) { //ignore if not custom!
|
||||
@@ -423,9 +413,9 @@ void TaskProjGroup::scaleManuallyChanged(int i)
|
||||
multiView->recomputeFeature();
|
||||
}
|
||||
|
||||
void TaskProjGroup::changeEvent(QEvent *e)
|
||||
void TaskProjGroup::changeEvent(QEvent *event)
|
||||
{
|
||||
if (e->type() == QEvent::LanguageChange) {
|
||||
if (event->type() == QEvent::LanguageChange) {
|
||||
ui->retranslateUi(this);
|
||||
}
|
||||
}
|
||||
@@ -495,12 +485,12 @@ void TaskProjGroup::setUiPrimary()
|
||||
ui->lePrimary->setText(formatVector(frontDir));
|
||||
}
|
||||
|
||||
QString TaskProjGroup::formatVector(Base::Vector3d v)
|
||||
QString TaskProjGroup::formatVector(Base::Vector3d vec)
|
||||
{
|
||||
QString data = QString::fromLatin1("[%1 %2 %3]")
|
||||
.arg(QLocale().toString(v.x, 'f', 2),
|
||||
QLocale().toString(v.y, 'f', 2),
|
||||
QLocale().toString(v.z, 'f', 2));
|
||||
.arg(QLocale().toString(vec.x, 'f', 2),
|
||||
QLocale().toString(vec.y, 'f', 2),
|
||||
QLocale().toString(vec.z, 'f', 2));
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -533,7 +523,7 @@ bool TaskProjGroup::accept()
|
||||
multiView->recomputeChildren();
|
||||
multiView->recomputeFeature();
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()");
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -549,12 +539,12 @@ bool TaskProjGroup::reject()
|
||||
std::string multiViewName = multiView->getNameInDocument();
|
||||
std::string PageName = multiView->findParentPage()->getNameInDocument();
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().%s.purgeProjections()",
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().%s.purgeProjections()",
|
||||
multiViewName.c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().%s.removeView(App.activeDocument().%s)",
|
||||
PageName.c_str(),multiViewName.c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"App.activeDocument().removeObject('%s')",multiViewName.c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().%s.removeView(App.activeDocument().%s)",
|
||||
PageName.c_str(), multiViewName.c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "App.activeDocument().removeObject('%s')", multiViewName.c_str());
|
||||
Gui::Command::doCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()");
|
||||
} else {
|
||||
//set the DPG and it's views back to entry state.
|
||||
if (Gui::Command::hasPendingCommand()) {
|
||||
@@ -567,7 +557,7 @@ bool TaskProjGroup::reject()
|
||||
Base::Console().Log("TaskProjGroup: Edit mode - NO command is active\n");
|
||||
}
|
||||
}
|
||||
Gui::Command::runCommand(Gui::Command::Gui,"Gui.ActiveDocument.resetEdit()");
|
||||
Gui::Command::runCommand(Gui::Command::Gui, "Gui.ActiveDocument.resetEdit()");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -579,7 +569,7 @@ TaskDlgProjGroup::TaskDlgProjGroup(TechDraw::DrawProjGroup* featView, bool mode)
|
||||
, multiView(featView)
|
||||
{
|
||||
//viewProvider = dynamic_cast<const ViewProviderProjGroup *>(featView);
|
||||
widget = new TaskProjGroup(featView,mode);
|
||||
widget = new TaskProjGroup(featView, mode);
|
||||
taskbox = new Gui::TaskView::TaskBox(Gui::BitmapFactory().pixmap("actions/TechDraw_ProjectionGroup"),
|
||||
widget->windowTitle(), true, nullptr);
|
||||
taskbox->groupLayout()->addWidget(widget);
|
||||
@@ -595,9 +585,9 @@ void TaskDlgProjGroup::update()
|
||||
widget->updateTask();
|
||||
}
|
||||
|
||||
void TaskDlgProjGroup::setCreateMode(bool b)
|
||||
void TaskDlgProjGroup::setCreateMode(bool mode)
|
||||
{
|
||||
widget->setCreateMode(b);
|
||||
widget->setCreateMode(mode);
|
||||
}
|
||||
|
||||
void TaskDlgProjGroup::modifyStandardButtons(QDialogButtonBox* box)
|
||||
@@ -619,7 +609,7 @@ void TaskDlgProjGroup::open()
|
||||
void TaskDlgProjGroup::clicked(int i)
|
||||
{
|
||||
// Q_UNUSED(i);
|
||||
// Base::Console().Message("TDPG::clicked(%X)\n",i);
|
||||
// Base::Console().Message("TDPG::clicked(%X)\n", i);
|
||||
if (i == QMessageBox::Apply) {
|
||||
widget->apply();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user