[skip ci] fix more -Wgnu-zero-variadic-macro-arguments

This commit is contained in:
wmayer
2019-11-17 15:14:18 +01:00
parent d4a1eb0cce
commit c6a5bbcf9e
6 changed files with 42 additions and 46 deletions

View File

@@ -49,7 +49,7 @@
#include <Gui/ViewProvider.h>
#include <Gui/WaitCursor.h>
#include <Gui/Selection.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Mod/Part/Gui/TaskAttacher.h>
#include <Mod/Part/Gui/AttacherTexts.h>
#include <Mod/Part/App/AttachExtension.h>
@@ -1041,21 +1041,19 @@ bool TaskDlgAttacher::accept()
Base::Placement plm = pcAttach->AttachmentOffset.getValue();
double yaw, pitch, roll;
plm.getRotation().getYawPitchRoll(yaw,pitch,roll);
FCMD_OBJ_CMD2("AttachmentOffset = App.Placement(App.Vector(%.10f, %.10f, %.10f), App.Rotation(%.10f, %.10f, %.10f))",
obj,
plm.getPosition().x, plm.getPosition().y, plm.getPosition().z,
yaw, pitch, roll);
Gui::cmdAppObjectArgs(obj, "AttachmentOffset = App.Placement(App.Vector(%.10f, %.10f, %.10f), App.Rotation(%.10f, %.10f, %.10f))",
plm.getPosition().x, plm.getPosition().y, plm.getPosition().z, yaw, pitch, roll);
}
FCMD_OBJ_CMD2("MapReversed = %s", obj, pcAttach->MapReversed.getValue() ? "True" : "False");
Gui::cmdAppObjectArgs(obj, "MapReversed = %s", pcAttach->MapReversed.getValue() ? "True" : "False");
FCMD_OBJ_CMD2("Support = %s", obj, pcAttach->Support.getPyReprString().c_str());
Gui::cmdAppObjectArgs(obj, "Support = %s", pcAttach->Support.getPyReprString().c_str());
FCMD_OBJ_CMD2("MapMode = '%s'", obj, AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
Gui::cmdAppObjectArgs(obj, "MapMode = '%s'", AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
FCMD_OBJ_DOC_CMD(obj, "recompute()");
Gui::cmdAppObject(obj, "recompute()");
FCMD_VOBJ_DOC_CMD(obj,"resetEdit()");
Gui::cmdGuiDocument(obj, "resetEdit()");
document->commitCommand();
}
catch (const Base::Exception& e) {

View File

@@ -33,7 +33,7 @@
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/Selection.h>
#include <Gui/SelectionFilter.h>
@@ -180,12 +180,12 @@ bool OffsetWidget::accept()
{
try {
double offsetValue = d->ui.spinOffset->value().getValue();
FCMD_OBJ_CMD2("Value = %f", d->offset,offsetValue);
Gui::cmdAppObjectArgs(d->offset, "Value = %f", offsetValue);
d->ui.spinOffset->apply();
FCMD_OBJ_CMD2("Mode = %i", d->offset,d->ui.modeType->currentIndex());
FCMD_OBJ_CMD2("Join = %i", d->offset,d->ui.joinType->currentIndex());
FCMD_OBJ_CMD2("Intersection = %s", d->offset,d->ui.intersection->isChecked() ? "True" : "False");
FCMD_OBJ_CMD2("SelfIntersection = %s", d->offset,d->ui.selfIntersection->isChecked() ? "True" : "False");
Gui::cmdAppObjectArgs(d->offset, "Mode = %i", d->ui.modeType->currentIndex());
Gui::cmdAppObjectArgs(d->offset, "Join = %i", d->ui.joinType->currentIndex());
Gui::cmdAppObjectArgs(d->offset, "Intersection = %s", d->ui.intersection->isChecked() ? "True" : "False");
Gui::cmdAppObjectArgs(d->offset, "SelfIntersection = %s", d->ui.selfIntersection->isChecked() ? "True" : "False");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
if (!d->offset->isValid())

View File

@@ -34,7 +34,7 @@
#include <Gui/Application.h>
#include <Gui/BitmapFactory.h>
#include <Gui/Command.h>
#include <Gui/CommandT.h>
#include <Gui/Document.h>
#include <Gui/Selection.h>
#include <Gui/SelectionFilter.h>
@@ -227,15 +227,15 @@ bool ThicknessWidget::accept()
try {
if (!d->selection.empty()) {
FCMD_OBJ_CMD2("Faces = %s", d->thickness,d->selection.c_str());
Gui::cmdAppObjectArgs(d->thickness, "Faces = %s", d->selection.c_str());
}
FCMD_OBJ_CMD2("Value = %f", d->thickness,d->ui.spinOffset->value().getValue());
FCMD_OBJ_CMD2("Mode = %i", d->thickness,d->ui.modeType->currentIndex());
FCMD_OBJ_CMD2("Join = %i", d->thickness,d->ui.joinType->currentIndex());
FCMD_OBJ_CMD2("Intersection = %s",
d->thickness,d->ui.intersection->isChecked() ? "True" : "False");
FCMD_OBJ_CMD2("SelfIntersection = %s",
d->thickness,d->ui.selfIntersection->isChecked() ? "True" : "False");
Gui::cmdAppObjectArgs(d->thickness, "Value = %f", d->ui.spinOffset->value().getValue());
Gui::cmdAppObjectArgs(d->thickness, "Mode = %i", d->ui.modeType->currentIndex());
Gui::cmdAppObjectArgs(d->thickness, "Join = %i", d->ui.joinType->currentIndex());
Gui::cmdAppObjectArgs(d->thickness, "Intersection = %s",
d->ui.intersection->isChecked() ? "True" : "False");
Gui::cmdAppObjectArgs(d->thickness, "SelfIntersection = %s",
d->ui.selfIntersection->isChecked() ? "True" : "False");
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
if (!d->thickness->isValid())