From f19d424d8bd2903d0655cce88a5625965a9f52f7 Mon Sep 17 00:00:00 2001 From: wmayer Date: Wed, 21 Sep 2016 20:54:52 +0200 Subject: [PATCH] fix -Wextra in FreeCADGui --- src/Base/Observer.h | 4 +- src/Gui/Application.cpp | 4 +- src/Gui/ApplicationPy.cpp | 7 +- src/Gui/CMakeLists.txt | 4 +- src/Gui/Clipping.cpp | 1 + src/Gui/Command.cpp | 3 +- src/Gui/CommandDoc.cpp | 43 +- src/Gui/CommandFeat.cpp | 3 + src/Gui/CommandMacro.cpp | 9 + src/Gui/CommandStd.cpp | 25 +- src/Gui/CommandTest.cpp | 20 +- src/Gui/CommandView.cpp | 461 +++++++++++--------- src/Gui/CommandWindow.cpp | 11 + src/Gui/DAGView/DAGFilter.cpp | 1 + src/Gui/DAGView/DAGModelGraph.h | 1 + src/Gui/DAGView/DAGRectItem.cpp | 2 + src/Gui/DemoMode.cpp | 3 +- src/Gui/DlgCustomizeSpNavSettings.cpp | 3 + src/Gui/DlgCustomizeSpaceball.cpp | 6 + src/Gui/DlgDisplayPropertiesImp.cpp | 1 + src/Gui/DlgKeyboardImp.cpp | 1 + src/Gui/DlgRunExternal.cpp | 2 + src/Gui/DlgWorkbenchesImp.cpp | 4 + src/Gui/DockWindow.h | 4 +- src/Gui/DocumentModel.cpp | 12 +- src/Gui/DocumentPyImp.cpp | 4 +- src/Gui/EditorView.cpp | 6 +- src/Gui/ExpressionBinding.cpp | 1 + src/Gui/FileDialog.cpp | 70 +-- src/Gui/Flag.cpp | 4 +- src/Gui/GraphvizView.cpp | 2 +- src/Gui/GuiApplicationNativeEventAware.cpp | 1 + src/Gui/InputField.cpp | 1 + src/Gui/Inventor/SoDrawingGrid.cpp | 5 + src/Gui/MDIView.cpp | 5 + src/Gui/Macro.cpp | 8 +- src/Gui/MainWindow.cpp | 1 + src/Gui/ManualAlignment.cpp | 4 + src/Gui/MouseSelection.cpp | 8 +- src/Gui/MouseSelection.h | 6 +- src/Gui/NavigationStyle.cpp | 2 + src/Gui/NetworkRetriever.cpp | 3 + src/Gui/OnlineDocumentation.cpp | 1 + src/Gui/PrefWidgets.cpp | 1 + src/Gui/PythonConsole.cpp | 3 + src/Gui/PythonConsolePy.cpp | 2 +- src/Gui/PythonDebugger.cpp | 10 +- src/Gui/PythonWorkbenchPyImp.cpp | 13 +- src/Gui/QSint/actionpanel/actiongroup.cpp | 1 + src/Gui/QSint/actionpanel/actionpanel.cpp | 1 + src/Gui/Quarter/EventFilter.cpp | 1 + src/Gui/Quarter/InteractionMode.cpp | 1 + src/Gui/Quarter/QuarterWidget.cpp | 3 + src/Gui/Quarter/QuarterWidgetP.cpp | 6 + src/Gui/Quarter/SpaceNavigatorDevice.cpp | 1 + src/Gui/SceneInspector.cpp | 1 + src/Gui/SelectionFilter.cpp | 4 +- src/Gui/SelectionView.cpp | 3 +- src/Gui/SoAxisCrossKit.cpp | 4 +- src/Gui/SoFCBackgroundGradient.cpp | 2 +- src/Gui/SoFCBoundingBox.cpp | 4 +- src/Gui/SoFCColorBar.cpp | 2 +- src/Gui/SoFCColorLegend.h | 2 +- src/Gui/SoFCInteractiveElement.cpp | 152 +++---- src/Gui/SoFCOffscreenRenderer.cpp | 2 +- src/Gui/SoFCSelection.cpp | 2 + src/Gui/SoFCVectorizeSVGAction.cpp | 9 + src/Gui/SoFCVectorizeU3DAction.cpp | 14 + src/Gui/SoTouchEvents.cpp | 2 + src/Gui/Splashscreen.cpp | 4 +- src/Gui/SplitView3DInventor.cpp | 3 +- src/Gui/SyntaxHighlighter.cpp | 2 + src/Gui/TaskView/TaskAppearance.cpp | 107 ++--- src/Gui/TaskView/TaskDialogPython.cpp | 2 +- src/Gui/TaskView/TaskSelectLinkProperty.cpp | 1 + src/Gui/TaskView/TaskView.cpp | 2 + src/Gui/TextEdit.cpp | 5 + src/Gui/Thumbnail.cpp | 2 + src/Gui/TransactionObject.cpp | 2 + src/Gui/Tree.cpp | 3 + src/Gui/View3DInventor.cpp | 4 +- src/Gui/View3DInventorExamples.cpp | 2 +- src/Gui/View3DInventorViewer.cpp | 13 +- src/Gui/ViewProvider.cpp | 6 +- src/Gui/ViewProvider.h | 34 +- src/Gui/ViewProviderAnnotation.cpp | 6 +- src/Gui/ViewProviderDocumentObject.cpp | 19 +- src/Gui/ViewProviderDocumentObject.h | 10 +- src/Gui/ViewProviderDocumentObjectGroup.cpp | 70 +-- src/Gui/ViewProviderDocumentObjectGroup.h | 10 +- src/Gui/ViewProviderGeometryObject.cpp | 8 +- src/Gui/ViewProviderMeasureDistance.cpp | 2 +- src/Gui/ViewProviderPyImp.cpp | 8 +- src/Gui/ViewProviderPythonFeature.cpp | 2 +- src/Gui/WhatsThis.cpp | 1 + src/Gui/WidgetFactory.cpp | 4 +- src/Gui/Widgets.cpp | 4 +- src/Gui/Window.cpp | 3 + src/Gui/Workbench.cpp | 7 + src/Gui/WorkbenchPyImp.cpp | 10 +- src/Gui/iisTaskPanel/src/iisiconlabel.cpp | 1 + src/Gui/iisTaskPanel/src/iistaskbox.cpp | 1 + src/Gui/iisTaskPanel/src/iistaskgroup.cpp | 1 + src/Gui/iisTaskPanel/src/iistaskheader.cpp | 1 + src/Gui/iisTaskPanel/src/iistaskpanel.cpp | 2 + src/Gui/propertyeditor/PropertyItem.cpp | 3 + 106 files changed, 882 insertions(+), 496 deletions(-) diff --git a/src/Base/Observer.h b/src/Base/Observer.h index 1797267c53..ac0b8c667c 100644 --- a/src/Base/Observer.h +++ b/src/Base/Observer.h @@ -78,7 +78,9 @@ public: * and get called by the observed class * @param rCaller a reference to the calling object */ - virtual void OnDestroy(Subject<_MessageType> & rCaller){} + virtual void OnDestroy(Subject<_MessageType> & rCaller) { + (void)rCaller; + } /** * This method can be reimplemented from the concrete Observer diff --git a/src/Gui/Application.cpp b/src/Gui/Application.cpp index 873b0278f4..c7d84ac2e3 100644 --- a/src/Gui/Application.cpp +++ b/src/Gui/Application.cpp @@ -323,7 +323,7 @@ struct PyMethodDef FreeCADGui_methods[] = { "getSoDBVersion() -> String\n\n" "Return a text string containing the name\n" "of the Coin library and version information"}, - {NULL, NULL} /* sentinel */ + {NULL, NULL, 0, NULL} /* sentinel */ }; @@ -1397,7 +1397,7 @@ void messageHandler(QtMsgType type, const char *msg) } #ifdef FC_DEBUG // redirect Coin messages to FreeCAD -void messageHandlerCoin(const SoError * error, void * userdata) +void messageHandlerCoin(const SoError * error, void * /*userdata*/) { if (error && error->getTypeId() == SoDebugError::getClassTypeId()) { const SoDebugError* dbg = static_cast(error); diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index b12cb9e45b..56f2491542 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -174,7 +174,7 @@ PyMethodDef Application::Methods[] = { "createViewer([int]) -> View3DInventor/SplitView3DInventor\n\n" "shows and returns a viewer. If the integer argument is given and > 1: -> splitViewer"}, - {NULL, NULL} /* Sentinel */ + {NULL, NULL, 0, NULL} /* Sentinel */ }; PyObject* Gui::Application::sActiveDocument(PyObject * /*self*/, PyObject *args, PyObject * /*kwd*/) @@ -803,8 +803,11 @@ PyObject* Application::sGetWorkbenchHandler(PyObject * /*self*/, PyObject *args, return pcWorkbench; } -PyObject* Application::sListWorkbenchHandlers(PyObject * /*self*/, PyObject *args,PyObject * /*kwd*/) +PyObject* Application::sListWorkbenchHandlers(PyObject * /*self*/, PyObject *args, PyObject * /*kwd*/) { + if (!PyArg_ParseTuple(args, "")) // convert args: Python->C + return NULL; // NULL triggers exception + Py_INCREF(Instance->_pcWorkbenchDictionary); return Instance->_pcWorkbenchDictionary; } diff --git a/src/Gui/CMakeLists.txt b/src/Gui/CMakeLists.txt index f81b10891b..eb0b7b2815 100644 --- a/src/Gui/CMakeLists.txt +++ b/src/Gui/CMakeLists.txt @@ -959,12 +959,12 @@ SOURCE_GROUP("Widget" FILES ${Widget_SRCS}) SET(View_CPP_SRCS MDIView.cpp GraphvizView.cpp - ActiveObjectList.cpp + ActiveObjectList.cpp ) SET(View_HPP_SRCS MDIView.h GraphvizView.h - ActiveObjectList.h + ActiveObjectList.h ) SET(View_SRCS ${View_CPP_SRCS} diff --git a/src/Gui/Clipping.cpp b/src/Gui/Clipping.cpp index ceeb66374e..11f9c9708b 100644 --- a/src/Gui/Clipping.cpp +++ b/src/Gui/Clipping.cpp @@ -86,6 +86,7 @@ public: } static void moveCallback(void * data, SoSensor * sensor) { + Q_UNUSED(sensor); Private* self = reinterpret_cast(data); if (self->view) { Gui::View3DInventorViewer* view = self->view->getViewer(); diff --git a/src/Gui/Command.cpp b/src/Gui/Command.cpp index 08c0bd86b3..dedcc34a54 100644 --- a/src/Gui/Command.cpp +++ b/src/Gui/Command.cpp @@ -739,8 +739,9 @@ MacroCommand::~MacroCommand() void MacroCommand::activated(int iMsg) { + Q_UNUSED(iMsg); + QDir d; - if(!systemMacro) { std::string cMacroPath; diff --git a/src/Gui/CommandDoc.cpp b/src/Gui/CommandDoc.cpp index 008789648a..422fc50e46 100644 --- a/src/Gui/CommandDoc.cpp +++ b/src/Gui/CommandDoc.cpp @@ -93,6 +93,8 @@ StdCmdOpen::StdCmdOpen() void StdCmdOpen::activated(int iMsg) { + Q_UNUSED(iMsg); + // fill the list of registered endings QString formatList; const char* supported = QT_TR_NOOP("Supported formats"); @@ -173,6 +175,8 @@ StdCmdImport::StdCmdImport() void StdCmdImport::activated(int iMsg) { + Q_UNUSED(iMsg); + // fill the list of registered endings QString formatList; const char* supported = QT_TR_NOOP("Supported formats"); @@ -258,6 +262,8 @@ StdCmdExport::StdCmdExport() void StdCmdExport::activated(int iMsg) { + Q_UNUSED(iMsg); + if (Gui::Selection().countObjectsOfType(App::DocumentObject::getClassTypeId()) == 0) { QMessageBox::warning(Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("No selection")), @@ -319,6 +325,8 @@ StdCmdMergeProjects::StdCmdMergeProjects() void StdCmdMergeProjects::activated(int iMsg) { + Q_UNUSED(iMsg); + QString exe = qApp->applicationName(); QString project = QFileDialog::getOpenFileName(Gui::getMainWindow(), QString::fromUtf8(QT_TR_NOOP("Merge project")), FileDialog::getWorkingDirectory(), @@ -370,6 +378,7 @@ StdCmdExportGraphviz::StdCmdExportGraphviz() void StdCmdExportGraphviz::activated(int iMsg) { + Q_UNUSED(iMsg); App::Document* doc = App::GetApplication().getActiveDocument(); Gui::GraphvizView* view = new Gui::GraphvizView(*doc); view->setWindowTitle(qApp->translate("Std_ExportGraphviz","Dependency graph")); @@ -401,6 +410,7 @@ StdCmdNew::StdCmdNew() void StdCmdNew::activated(int iMsg) { + Q_UNUSED(iMsg); QString cmd; cmd = QString::fromLatin1("App.newDocument(\"%1\")") .arg(qApp->translate("StdCmdNew","Unnamed")); @@ -427,6 +437,7 @@ StdCmdSave::StdCmdSave() void StdCmdSave::activated(int iMsg) { + Q_UNUSED(iMsg); #if 0 Gui::Document* pActiveDoc = getActiveGuiDocument(); if ( pActiveDoc ) @@ -468,6 +479,7 @@ StdCmdSaveAs::StdCmdSaveAs() void StdCmdSaveAs::activated(int iMsg) { + Q_UNUSED(iMsg); #if 0 Gui::Document* pActiveDoc = getActiveGuiDocument(); if ( pActiveDoc ) @@ -505,6 +517,7 @@ StdCmdSaveCopy::StdCmdSaveCopy() void StdCmdSaveCopy::activated(int iMsg) { + Q_UNUSED(iMsg); #if 0 Gui::Document* pActiveDoc = getActiveGuiDocument(); if ( pActiveDoc ) @@ -537,6 +550,7 @@ StdCmdRevert::StdCmdRevert() void StdCmdRevert::activated(int iMsg) { + Q_UNUSED(iMsg); QMessageBox msgBox(Gui::getMainWindow()); msgBox.setIcon(QMessageBox::Question); msgBox.setWindowTitle(qApp->translate("Std_Revert","Revert document")); @@ -576,8 +590,9 @@ StdCmdProjectInfo::StdCmdProjectInfo() void StdCmdProjectInfo::activated(int iMsg) { - Gui::Dialog::DlgProjectInformationImp dlg(getActiveGuiDocument()->getDocument(), getMainWindow()); - dlg.exec(); + Q_UNUSED(iMsg); + Gui::Dialog::DlgProjectInformationImp dlg(getActiveGuiDocument()->getDocument(), getMainWindow()); + dlg.exec(); } bool StdCmdProjectInfo::isActive(void) @@ -604,6 +619,7 @@ StdCmdProjectUtil::StdCmdProjectUtil() void StdCmdProjectUtil::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgProjectUtility dlg(getMainWindow()); dlg.exec(); } @@ -632,6 +648,7 @@ StdCmdPrint::StdCmdPrint() void StdCmdPrint::activated(int iMsg) { + Q_UNUSED(iMsg); if (getMainWindow()->activeWindow()) { getMainWindow()->showMessage(QObject::tr("Printing...")); getMainWindow()->activeWindow()->print(); @@ -661,6 +678,7 @@ StdCmdPrintPreview::StdCmdPrintPreview() void StdCmdPrintPreview::activated(int iMsg) { + Q_UNUSED(iMsg); if (getMainWindow()->activeWindow()) { getMainWindow()->activeWindow()->printPreview(); } @@ -688,6 +706,7 @@ StdCmdPrintPdf::StdCmdPrintPdf() void StdCmdPrintPdf::activated(int iMsg) { + Q_UNUSED(iMsg); if (getMainWindow()->activeWindow()) { getMainWindow()->showMessage(QObject::tr("Exporting PDF...")); getMainWindow()->activeWindow()->printPdf(); @@ -721,6 +740,7 @@ StdCmdQuit::StdCmdQuit() void StdCmdQuit::activated(int iMsg) { + Q_UNUSED(iMsg); // close the main window and exit the event loop getMainWindow()->close(); } @@ -746,8 +766,9 @@ StdCmdUndo::StdCmdUndo() void StdCmdUndo::activated(int iMsg) { + Q_UNUSED(iMsg); // Application::Instance->slotUndo(); - getGuiApplication()->sendMsgToActiveView("Undo"); + getGuiApplication()->sendMsgToActiveView("Undo"); } bool StdCmdUndo::isActive(void) @@ -789,8 +810,9 @@ StdCmdRedo::StdCmdRedo() void StdCmdRedo::activated(int iMsg) { + Q_UNUSED(iMsg); // Application::Instance->slotRedo(); - getGuiApplication()->sendMsgToActiveView("Redo"); + getGuiApplication()->sendMsgToActiveView("Redo"); } bool StdCmdRedo::isActive(void) @@ -830,6 +852,7 @@ StdCmdCut::StdCmdCut() void StdCmdCut::activated(int iMsg) { + Q_UNUSED(iMsg); getGuiApplication()->sendMsgToActiveView("Cut"); } @@ -857,6 +880,7 @@ StdCmdCopy::StdCmdCopy() void StdCmdCopy::activated(int iMsg) { + Q_UNUSED(iMsg); bool done = getGuiApplication()->sendMsgToActiveView("Copy"); if (!done) { QMimeData * mimeData = getMainWindow()->createMimeDataFromSelection(); @@ -891,6 +915,7 @@ StdCmdPaste::StdCmdPaste() void StdCmdPaste::activated(int iMsg) { + Q_UNUSED(iMsg); bool done = getGuiApplication()->sendMsgToActiveView("Paste"); if (!done) { QClipboard* cb = QApplication::clipboard(); @@ -927,6 +952,7 @@ StdCmdDuplicateSelection::StdCmdDuplicateSelection() void StdCmdDuplicateSelection::activated(int iMsg) { + Q_UNUSED(iMsg); std::vector sel = Selection().getCompleteSelection(); std::set unique_objs; std::map< App::Document*, std::vector > objs; @@ -1008,6 +1034,7 @@ StdCmdSelectAll::StdCmdSelectAll() void StdCmdSelectAll::activated(int iMsg) { + Q_UNUSED(iMsg); SelectionSingleton& rSel = Selection(); App::Document* doc = App::GetApplication().getActiveDocument(); std::vector objs = doc->getObjectsOfType(App::DocumentObject::getClassTypeId()); @@ -1041,6 +1068,8 @@ StdCmdDelete::StdCmdDelete() void StdCmdDelete::activated(int iMsg) { + Q_UNUSED(iMsg); + // go through all documents const SelectionSingleton& rSel = Selection(); const std::vector docs = App::GetApplication().getDocuments(); @@ -1161,6 +1190,7 @@ StdCmdRefresh::StdCmdRefresh() void StdCmdRefresh::activated(int iMsg) { + Q_UNUSED(iMsg); if (getActiveGuiDocument()) { //Note: Don't add the recompute to undo/redo because it complicates //testing the changes of properties. @@ -1192,6 +1222,7 @@ StdCmdTransform::StdCmdTransform() void StdCmdTransform::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Control().showDialog(new Gui::Dialog::TaskTransform()); } @@ -1217,6 +1248,7 @@ StdCmdPlacement::StdCmdPlacement() void StdCmdPlacement::activated(int iMsg) { + Q_UNUSED(iMsg); std::vector sel = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); Gui::Dialog::TaskPlacement* plm = new Gui::Dialog::TaskPlacement(); if (!sel.empty()) { @@ -1249,6 +1281,7 @@ StdCmdTransformManip::StdCmdTransformManip() void StdCmdTransformManip::activated(int iMsg) { + Q_UNUSED(iMsg); if (getActiveGuiDocument()->getInEdit()) getActiveGuiDocument()->resetEdit(); std::vector sel = Gui::Selection().getObjectsOfType(App::GeoFeature::getClassTypeId()); @@ -1281,6 +1314,7 @@ StdCmdAlignment::StdCmdAlignment() void StdCmdAlignment::activated(int iMsg) { + Q_UNUSED(iMsg); std::vector sel = Gui::Selection().getObjectsOfType (App::GeoFeature::getClassTypeId()); ManualAlignment* align = ManualAlignment::instance(); @@ -1353,6 +1387,7 @@ StdCmdEdit::StdCmdEdit() void StdCmdEdit::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { Gui::View3DInventorViewer* viewer = static_cast(view)->getViewer(); diff --git a/src/Gui/CommandFeat.cpp b/src/Gui/CommandFeat.cpp index d3e37ec540..e2c401c2d2 100644 --- a/src/Gui/CommandFeat.cpp +++ b/src/Gui/CommandFeat.cpp @@ -57,6 +57,7 @@ StdCmdFeatRecompute::StdCmdFeatRecompute() void StdCmdFeatRecompute::activated(int iMsg) { + Q_UNUSED(iMsg); } //=========================================================================== @@ -77,6 +78,8 @@ StdCmdRandomColor::StdCmdRandomColor() void StdCmdRandomColor::activated(int iMsg) { + Q_UNUSED(iMsg); + // get the complete selection std::vector sel = Selection().getCompleteSelection(); for (std::vector::iterator it = sel.begin(); it != sel.end(); ++it) { diff --git a/src/Gui/CommandMacro.cpp b/src/Gui/CommandMacro.cpp index c9995c46cd..95de385957 100644 --- a/src/Gui/CommandMacro.cpp +++ b/src/Gui/CommandMacro.cpp @@ -55,6 +55,7 @@ StdCmdDlgMacroRecord::StdCmdDlgMacroRecord() void StdCmdDlgMacroRecord::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgMacroRecordImp cDlg(getMainWindow()); cDlg.exec(); } @@ -83,6 +84,7 @@ StdCmdMacroStopRecord::StdCmdMacroStopRecord() void StdCmdMacroStopRecord::activated(int iMsg) { + Q_UNUSED(iMsg); getGuiApplication()->macroManager()->commit(); } @@ -110,6 +112,7 @@ StdCmdDlgMacroExecute::StdCmdDlgMacroExecute() void StdCmdDlgMacroExecute::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgMacroExecuteImp cDlg(getMainWindow()); cDlg.exec(); } @@ -139,6 +142,7 @@ StdCmdDlgMacroExecuteDirect::StdCmdDlgMacroExecuteDirect() void StdCmdDlgMacroExecuteDirect::activated(int iMsg) { + Q_UNUSED(iMsg); doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Run\")"); } @@ -164,6 +168,7 @@ StdCmdMacroStartDebug::StdCmdMacroStartDebug() void StdCmdMacroStartDebug::activated(int iMsg) { + Q_UNUSED(iMsg); PythonDebugger* dbg = Application::Instance->macroManager()->debugger(); if (!dbg->isRunning()) doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"StartDebug\")"); @@ -193,6 +198,7 @@ StdCmdMacroStopDebug::StdCmdMacroStopDebug() void StdCmdMacroStopDebug::activated(int iMsg) { + Q_UNUSED(iMsg); Application::Instance->macroManager()->debugger()->tryStop(); } @@ -219,6 +225,7 @@ StdCmdMacroStepOver::StdCmdMacroStepOver() void StdCmdMacroStepOver::activated(int iMsg) { + Q_UNUSED(iMsg); Application::Instance->macroManager()->debugger()->stepOver(); } @@ -245,6 +252,7 @@ StdCmdMacroStepInto::StdCmdMacroStepInto() void StdCmdMacroStepInto::activated(int iMsg) { + Q_UNUSED(iMsg); Application::Instance->macroManager()->debugger()->stepInto(); } @@ -271,6 +279,7 @@ StdCmdToggleBreakpoint::StdCmdToggleBreakpoint() void StdCmdToggleBreakpoint::activated(int iMsg) { + Q_UNUSED(iMsg); doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ToggleBreakpoint\")"); } diff --git a/src/Gui/CommandStd.cpp b/src/Gui/CommandStd.cpp index 8614c4ef65..08e76fd5d8 100644 --- a/src/Gui/CommandStd.cpp +++ b/src/Gui/CommandStd.cpp @@ -223,6 +223,7 @@ bool StdCmdAbout::isActive() */ void StdCmdAbout::activated(int iMsg) { + Q_UNUSED(iMsg); const Gui::Dialog::AboutDialogFactory* f = Gui::Dialog::AboutDialogFactory::defaultFactory(); boost::scoped_ptr dlg(f->create(getMainWindow())); dlg->exec(); @@ -263,7 +264,8 @@ StdCmdAboutQt::StdCmdAboutQt() void StdCmdAboutQt::activated(int iMsg) { - qApp->aboutQt(); + Q_UNUSED(iMsg); + qApp->aboutQt(); } //=========================================================================== @@ -286,6 +288,7 @@ StdCmdWhatsThis::StdCmdWhatsThis() void StdCmdWhatsThis::activated(int iMsg) { + Q_UNUSED(iMsg); QWhatsThis::enterWhatsThisMode(); } @@ -308,9 +311,10 @@ StdCmdDlgParameter::StdCmdDlgParameter() void StdCmdDlgParameter::activated(int iMsg) { - Gui::Dialog::DlgParameterImp cDlg(getMainWindow()); - cDlg.resize(QSize(800, 600)); - cDlg.exec(); + Q_UNUSED(iMsg); + Gui::Dialog::DlgParameterImp cDlg(getMainWindow()); + cDlg.resize(QSize(800, 600)); + cDlg.exec(); } //=========================================================================== @@ -339,6 +343,7 @@ Action * StdCmdDlgPreferences::createAction(void) void StdCmdDlgPreferences::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgPreferencesImp cDlg(getMainWindow()); cDlg.exec(); } @@ -362,6 +367,7 @@ StdCmdDlgCustomize::StdCmdDlgCustomize() void StdCmdDlgCustomize::activated(int iMsg) { + Q_UNUSED(iMsg); static QPointer dlg = 0; if (!dlg) dlg = new Gui::Dialog::DlgCustomizeImp(getMainWindow()); @@ -388,6 +394,7 @@ StdCmdCommandLine::StdCmdCommandLine() void StdCmdCommandLine::activated(int iMsg) { + Q_UNUSED(iMsg); bool show = getMainWindow()->isMaximized (); // pop up the Gui command window @@ -436,6 +443,7 @@ StdCmdOnlineHelp::StdCmdOnlineHelp() void StdCmdOnlineHelp::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::getMainWindow()->showDocumentation(QString::fromLatin1("Online_Help_Startpage")); } @@ -458,6 +466,7 @@ StdCmdOnlineHelpWebsite::StdCmdOnlineHelpWebsite() void StdCmdOnlineHelpWebsite::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=Online_Help_Toc").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("OnlineHelp", defaulturl.c_str()); @@ -485,6 +494,7 @@ StdCmdFreeCADWebsite::StdCmdFreeCADWebsite() void StdCmdFreeCADWebsite::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("WebPage", defaulturl.c_str()); @@ -512,6 +522,7 @@ StdCmdFreeCADUserHub::StdCmdFreeCADUserHub() void StdCmdFreeCADUserHub::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=User_hub").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("Documentation", defaulturl.c_str()); @@ -539,6 +550,7 @@ StdCmdFreeCADPowerUserHub::StdCmdFreeCADPowerUserHub() void StdCmdFreeCADPowerUserHub::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=Power_users_hub").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("PowerUsers", defaulturl.c_str()); @@ -566,6 +578,7 @@ StdCmdFreeCADForum::StdCmdFreeCADForum() void StdCmdFreeCADForum::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://forum.freecadweb.org").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("UserForum", defaulturl.c_str()); @@ -593,6 +606,7 @@ StdCmdFreeCADFAQ::StdCmdFreeCADFAQ() void StdCmdFreeCADFAQ::activated(int iMsg) { + Q_UNUSED(iMsg); std::string defaulturl = QCoreApplication::translate(this->className(),"http://www.freecadweb.org/wiki/index.php?title=FAQ").toStdString(); ParameterGrp::handle hURLGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Websites"); std::string url = hURLGrp->GetASCII("FAQ", defaulturl.c_str()); @@ -620,6 +634,7 @@ StdCmdPythonWebsite::StdCmdPythonWebsite() void StdCmdPythonWebsite::activated(int iMsg) { + Q_UNUSED(iMsg); OpenURLInBrowser("http://python.org"); } @@ -643,6 +658,7 @@ StdCmdMeasurementSimple::StdCmdMeasurementSimple() void StdCmdMeasurementSimple::activated(int iMsg) { + Q_UNUSED(iMsg); unsigned int n = getSelection().countObjectsOfType(App::DocumentObject::getClassTypeId()); if (n == 1) { @@ -697,6 +713,7 @@ StdCmdUnitsCalculator::StdCmdUnitsCalculator() void StdCmdUnitsCalculator::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgUnitsCalculator *dlg = new Gui::Dialog::DlgUnitsCalculator( getMainWindow() ); dlg->show(); } diff --git a/src/Gui/CommandTest.cpp b/src/Gui/CommandTest.cpp index 243eac15eb..ee26217625 100644 --- a/src/Gui/CommandTest.cpp +++ b/src/Gui/CommandTest.cpp @@ -69,6 +69,7 @@ Std_TestQM::Std_TestQM() void Std_TestQM::activated(int iMsg) { + Q_UNUSED(iMsg); QStringList files = QFileDialog::getOpenFileNames(getMainWindow(), QString::fromLatin1("Test translation"), QString(), QString::fromLatin1("Translation (*.qm)")); @@ -106,6 +107,7 @@ Std_TestReloadQM::Std_TestReloadQM() void Std_TestReloadQM::activated(int iMsg) { + Q_UNUSED(iMsg); Translator::instance()->activateLanguage(Translator::instance()->activeLanguage().c_str()); } @@ -128,7 +130,7 @@ FCCmdTest1::FCCmdTest1() void FCCmdTest1::activated(int iMsg) { - + Q_UNUSED(iMsg); } bool FCCmdTest1::isActive(void) @@ -156,8 +158,7 @@ FCCmdTest2::FCCmdTest2() void FCCmdTest2::activated(int iMsg) { - - + Q_UNUSED(iMsg); } bool FCCmdTest2::isActive(void) @@ -183,6 +184,7 @@ FCCmdTest3::FCCmdTest3() void FCCmdTest3::activated(int iMsg) { + Q_UNUSED(iMsg); App::Document *pcDoc = getDocument(); if (!pcDoc) return; } @@ -212,6 +214,7 @@ FCCmdTest4::FCCmdTest4() void FCCmdTest4::activated(int iMsg) { + Q_UNUSED(iMsg); App::Document *pcDoc = getDocument(); if(!pcDoc) return; } @@ -240,6 +243,7 @@ FCCmdTest5::FCCmdTest5() void FCCmdTest5::activated(int iMsg) { + Q_UNUSED(iMsg); App::Document *pcDoc = getDocument(); if(!pcDoc) return; } @@ -268,6 +272,7 @@ FCCmdTest6::FCCmdTest6() void FCCmdTest6::activated(int iMsg) { + Q_UNUSED(iMsg); App::Document *pcDoc = getDocument(); if(!pcDoc) return; } @@ -295,6 +300,7 @@ CmdTestProgress1::CmdTestProgress1() void CmdTestProgress1::activated(int iMsg) { + Q_UNUSED(iMsg); QMutex mutex; QMutexLocker ml(&mutex); try @@ -336,6 +342,7 @@ CmdTestProgress2::CmdTestProgress2() void CmdTestProgress2::activated(int iMsg) { + Q_UNUSED(iMsg); QMutex mutex; QMutexLocker ml(&mutex); @@ -378,6 +385,7 @@ CmdTestProgress3::CmdTestProgress3() void CmdTestProgress3::activated(int iMsg) { + Q_UNUSED(iMsg); QMutex mutex; QMutexLocker ml(&mutex); @@ -447,6 +455,7 @@ CmdTestProgress4::CmdTestProgress4() void CmdTestProgress4::activated(int iMsg) { + Q_UNUSED(iMsg); QMutex mutex; QMutexLocker ml(&mutex); @@ -537,6 +546,7 @@ private: void CmdTestProgress5::activated(int iMsg) { + Q_UNUSED(iMsg); QEventLoop loop; BarThread* thr1 = new BarThread(2000); @@ -579,6 +589,7 @@ CmdTestMDI1::CmdTestMDI1() void CmdTestMDI1::activated(int iMsg) { + Q_UNUSED(iMsg); MDIView* mdi = getMainWindow()->activeWindow(); getMainWindow()->removeWindow(mdi); } @@ -602,6 +613,7 @@ CmdTestMDI2::CmdTestMDI2() void CmdTestMDI2::activated(int iMsg) { + Q_UNUSED(iMsg); QMdiArea* area = getMainWindow()->findChild(); if (area) { MDIView* mdi = getMainWindow()->activeWindow(); @@ -629,6 +641,7 @@ CmdTestMDI3::CmdTestMDI3() void CmdTestMDI3::activated(int iMsg) { + Q_UNUSED(iMsg); MDIView* mdi = getMainWindow()->activeWindow(); getMainWindow()->removeWindow(mdi); mdi->setParent(0, Qt::Window | Qt::WindowTitleHint | @@ -728,6 +741,7 @@ public: void CmdTestConsoleOutput::activated(int iMsg) { + Q_UNUSED(iMsg); TestConsoleObserver obs; Base::Console().AttachObserver(&obs); QThreadPool::globalInstance()->start(new ConsoleMessageTask); diff --git a/src/Gui/CommandView.cpp b/src/Gui/CommandView.cpp index 113b4377d5..e73924faf4 100644 --- a/src/Gui/CommandView.cpp +++ b/src/Gui/CommandView.cpp @@ -501,6 +501,7 @@ Action * StdCmdToggleClipPlane::createAction(void) void StdCmdToggleClipPlane::activated(int iMsg) { + Q_UNUSED(iMsg); #if 0 View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if (view) { @@ -743,6 +744,7 @@ StdCmdToggleVisibility::StdCmdToggleVisibility() void StdCmdToggleVisibility::activated(int iMsg) { + Q_UNUSED(iMsg); // go through all documents const std::vector docs = App::GetApplication().getDocuments(); for (std::vector::const_iterator it = docs.begin(); it != docs.end(); ++it) { @@ -809,6 +811,7 @@ StdCmdToggleSelectability::StdCmdToggleSelectability() void StdCmdToggleSelectability::activated(int iMsg) { + Q_UNUSED(iMsg); // go through all documents const std::vector docs = App::GetApplication().getDocuments(); for (std::vector::const_iterator it = docs.begin(); it != docs.end(); ++it) { @@ -854,6 +857,7 @@ StdCmdShowSelection::StdCmdShowSelection() void StdCmdShowSelection::activated(int iMsg) { + Q_UNUSED(iMsg); // go through all documents const std::vector docs = App::GetApplication().getDocuments(); for (std::vector::const_iterator it = docs.begin(); it != docs.end(); ++it) { @@ -889,6 +893,7 @@ StdCmdHideSelection::StdCmdHideSelection() void StdCmdHideSelection::activated(int iMsg) { + Q_UNUSED(iMsg); // go through all documents const std::vector docs = App::GetApplication().getDocuments(); for (std::vector::const_iterator it = docs.begin(); it != docs.end(); ++it) { @@ -924,6 +929,7 @@ StdCmdToggleObjects::StdCmdToggleObjects() void StdCmdToggleObjects::activated(int iMsg) { + Q_UNUSED(iMsg); // go through active document Gui::Document* doc = Application::Instance->activeDocument(); App::Document* app = doc->getDocument(); @@ -963,6 +969,7 @@ StdCmdShowObjects::StdCmdShowObjects() void StdCmdShowObjects::activated(int iMsg) { + Q_UNUSED(iMsg); // go through active document Gui::Document* doc = Application::Instance->activeDocument(); App::Document* app = doc->getDocument(); @@ -998,6 +1005,7 @@ StdCmdHideObjects::StdCmdHideObjects() void StdCmdHideObjects::activated(int iMsg) { + Q_UNUSED(iMsg); // go through active document Gui::Document* doc = Application::Instance->activeDocument(); App::Document* app = doc->getDocument(); @@ -1035,6 +1043,7 @@ StdCmdSetAppearance::StdCmdSetAppearance() void StdCmdSetAppearance::activated(int iMsg) { + Q_UNUSED(iMsg); static QPointer dlg = 0; if (!dlg) dlg = new Gui::Dialog::DlgDisplayPropertiesImp(getMainWindow()); @@ -1056,19 +1065,20 @@ DEF_3DV_CMD(StdCmdViewBottom) StdCmdViewBottom::StdCmdViewBottom() : Command("Std_ViewBottom") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Bottom"); - sToolTipText = QT_TR_NOOP("Set to bottom view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to bottom view"); - sPixmap = "view-bottom"; - sAccel = "5"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Bottom"); + sToolTipText = QT_TR_NOOP("Set to bottom view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to bottom view"); + sPixmap = "view-bottom"; + sAccel = "5"; + eType = Alter3DView; } void StdCmdViewBottom::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewBottom()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewBottom()"); } //=========================================================================== @@ -1079,19 +1089,20 @@ DEF_3DV_CMD(StdCmdViewFront); StdCmdViewFront::StdCmdViewFront() : Command("Std_ViewFront") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Front"); - sToolTipText = QT_TR_NOOP("Set to front view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to front view"); - sPixmap = "view-front"; - sAccel = "1"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Front"); + sToolTipText = QT_TR_NOOP("Set to front view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to front view"); + sPixmap = "view-front"; + sAccel = "1"; + eType = Alter3DView; } void StdCmdViewFront::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewFront()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewFront()"); } //=========================================================================== @@ -1102,19 +1113,20 @@ DEF_3DV_CMD(StdCmdViewLeft); StdCmdViewLeft::StdCmdViewLeft() : Command("Std_ViewLeft") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Left"); - sToolTipText = QT_TR_NOOP("Set to left view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to left view"); - sPixmap = "view-left"; - sAccel = "6"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Left"); + sToolTipText = QT_TR_NOOP("Set to left view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to left view"); + sPixmap = "view-left"; + sAccel = "6"; + eType = Alter3DView; } void StdCmdViewLeft::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewLeft()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewLeft()"); } //=========================================================================== @@ -1125,19 +1137,20 @@ DEF_3DV_CMD(StdCmdViewRear); StdCmdViewRear::StdCmdViewRear() : Command("Std_ViewRear") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Rear"); - sToolTipText = QT_TR_NOOP("Set to rear view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to rear view"); - sPixmap = "view-rear"; - sAccel = "4"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Rear"); + sToolTipText = QT_TR_NOOP("Set to rear view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to rear view"); + sPixmap = "view-rear"; + sAccel = "4"; + eType = Alter3DView; } void StdCmdViewRear::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRear()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRear()"); } //=========================================================================== @@ -1148,19 +1161,20 @@ DEF_3DV_CMD(StdCmdViewRight); StdCmdViewRight::StdCmdViewRight() : Command("Std_ViewRight") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Right"); - sToolTipText = QT_TR_NOOP("Set to right view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to right view"); - sPixmap = "view-right"; - sAccel = "3"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Right"); + sToolTipText = QT_TR_NOOP("Set to right view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to right view"); + sPixmap = "view-right"; + sAccel = "3"; + eType = Alter3DView; } void StdCmdViewRight::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRight()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRight()"); } //=========================================================================== @@ -1171,19 +1185,20 @@ DEF_3DV_CMD(StdCmdViewTop); StdCmdViewTop::StdCmdViewTop() : Command("Std_ViewTop") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Top"); - sToolTipText = QT_TR_NOOP("Set to top view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to top view"); - sPixmap = "view-top"; - sAccel = "2"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Top"); + sToolTipText = QT_TR_NOOP("Set to top view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to top view"); + sPixmap = "view-top"; + sAccel = "2"; + eType = Alter3DView; } void StdCmdViewTop::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewTop()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewTop()"); } //=========================================================================== @@ -1194,19 +1209,20 @@ DEF_3DV_CMD(StdCmdViewAxo); StdCmdViewAxo::StdCmdViewAxo() : Command("Std_ViewAxo") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Axonometric"); - sToolTipText= QT_TR_NOOP("Set to axonometric view"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Set to axonometric view"); - sPixmap = "view-axonometric"; - sAccel = "0"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Axonometric"); + sToolTipText= QT_TR_NOOP("Set to axonometric view"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Set to axonometric view"); + sPixmap = "view-axonometric"; + sAccel = "0"; + eType = Alter3DView; } void StdCmdViewAxo::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewAxonometric()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewAxonometric()"); } //=========================================================================== @@ -1217,19 +1233,20 @@ DEF_3DV_CMD(StdCmdViewRotateLeft); StdCmdViewRotateLeft::StdCmdViewRotateLeft() : Command("Std_ViewRotateLeft") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Rotate Left"); - sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise"); - sPixmap = "view-rotate-left"; - //sAccel = "Shift Left"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Rotate Left"); + sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 counter-clockwise"); + sPixmap = "view-rotate-left"; + //sAccel = "Shift Left"; + eType = Alter3DView; } void StdCmdViewRotateLeft::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateLeft()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateLeft()"); } @@ -1241,19 +1258,20 @@ DEF_3DV_CMD(StdCmdViewRotateRight); StdCmdViewRotateRight::StdCmdViewRotateRight() : Command("Std_ViewRotateRight") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Rotate Right"); - sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise"); - sWhatsThis = "Std_ViewXX"; - sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise"); - sPixmap = "view-rotate-right"; - //sAccel = "Shift Right"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Rotate Right"); + sToolTipText = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise"); + sWhatsThis = "Std_ViewXX"; + sStatusTip = QT_TR_NOOP("Rotate the view by 90\xc2\xb0 clockwise"); + sPixmap = "view-rotate-right"; + //sAccel = "Shift Right"; + eType = Alter3DView; } void StdCmdViewRotateRight::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().viewRotateRight()"); } @@ -1276,6 +1294,7 @@ StdCmdViewFitAll::StdCmdViewFitAll() void StdCmdViewFitAll::activated(int iMsg) { + Q_UNUSED(iMsg); //doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()"); doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewFit\")"); } @@ -1307,6 +1326,7 @@ StdCmdViewFitSelection::StdCmdViewFitSelection() void StdCmdViewFitSelection::activated(int iMsg) { + Q_UNUSED(iMsg); //doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()"); doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewSelection\")"); } @@ -1336,6 +1356,7 @@ StdViewDock::StdViewDock() void StdViewDock::activated(int iMsg) { + Q_UNUSED(iMsg); } bool StdViewDock::isActive(void) @@ -1363,6 +1384,7 @@ StdViewUndock::StdViewUndock() void StdViewUndock::activated(int iMsg) { + Q_UNUSED(iMsg); } bool StdViewUndock::isActive(void) @@ -1391,6 +1413,7 @@ StdViewFullscreen::StdViewFullscreen() void StdViewFullscreen::activated(int iMsg) { + Q_UNUSED(iMsg); } bool StdViewFullscreen::isActive(void) @@ -1497,6 +1520,7 @@ StdCmdViewVR::StdCmdViewVR() void StdCmdViewVR::activated(int iMsg) { + Q_UNUSED(iMsg); //doCommand(Command::Gui,"Gui.activeDocument().activeView().fitAll()"); doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"ViewVR\")"); } @@ -1527,6 +1551,7 @@ StdViewScreenShot::StdViewScreenShot() void StdViewScreenShot::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if (view) { QStringList formats; @@ -1645,6 +1670,7 @@ StdCmdViewCreate::StdCmdViewCreate() void StdCmdViewCreate::activated(int iMsg) { + Q_UNUSED(iMsg); getActiveGuiDocument()->createView(View3DInventor::getClassTypeId()); getActiveGuiDocument()->getActiveView()->viewAll(); } @@ -1674,6 +1700,7 @@ StdCmdToggleNavigation::StdCmdToggleNavigation() void StdCmdToggleNavigation::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::MDIView* view = Gui::getMainWindow()->activeWindow(); if (view && view->isDerivedFrom(Gui::View3DInventor::getClassTypeId())) { Gui::View3DInventorViewer* viewer = static_cast(view)->getViewer(); @@ -1800,13 +1827,14 @@ StdCmdAxisCross::StdCmdAxisCross() void StdCmdAxisCross::activated(int iMsg) { - Gui::View3DInventor* view = qobject_cast(Gui::getMainWindow()->activeWindow()); - if (view ){ - if(view->getViewer()->hasAxisCross()== false) - doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(True)"); - else - doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(False)"); - } + Q_UNUSED(iMsg); + Gui::View3DInventor* view = qobject_cast(Gui::getMainWindow()->activeWindow()); + if (view) { + if(view->getViewer()->hasAxisCross()== false) + doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(True)"); + else + doCommand(Command::Gui,"Gui.ActiveDocument.ActiveView.setAxisCross(False)"); + } } bool StdCmdAxisCross::isActive(void) @@ -1835,24 +1863,26 @@ DEF_STD_CMD_A(StdCmdViewExample1); StdCmdViewExample1::StdCmdViewExample1() : Command("Std_ViewExample1") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Inventor example #1"); - sToolTipText = QT_TR_NOOP("Shows a 3D texture with manipulator"); - sWhatsThis = "Std_ViewExamples"; - sStatusTip = QT_TR_NOOP("Shows a 3D texture with manipulator"); - sPixmap = "Std_Tool1"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Inventor example #1"); + sToolTipText = QT_TR_NOOP("Shows a 3D texture with manipulator"); + sWhatsThis = "Std_ViewExamples"; + sStatusTip = QT_TR_NOOP("Shows a 3D texture with manipulator"); + sPixmap = "Std_Tool1"; + eType = Alter3DView; } void StdCmdViewExample1::activated(int iMsg) { - doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example1\")"); } bool StdCmdViewExample1::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("Example1"); + return getGuiApplication()->sendHasMsgToActiveView("Example1"); } + //=========================================================================== // Std_ViewExample2 //=========================================================================== @@ -1861,23 +1891,24 @@ DEF_STD_CMD_A(StdCmdViewExample2); StdCmdViewExample2::StdCmdViewExample2() : Command("Std_ViewExample2") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Inventor example #2"); - sToolTipText = QT_TR_NOOP("Shows spheres and drag-lights"); - sWhatsThis = "Std_ViewExamples"; - sStatusTip = QT_TR_NOOP("Shows spheres and drag-lights"); - sPixmap = "Std_Tool2"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Inventor example #2"); + sToolTipText = QT_TR_NOOP("Shows spheres and drag-lights"); + sWhatsThis = "Std_ViewExamples"; + sStatusTip = QT_TR_NOOP("Shows spheres and drag-lights"); + sPixmap = "Std_Tool2"; + eType = Alter3DView; } void StdCmdViewExample2::activated(int iMsg) { - doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example2\")"); } bool StdCmdViewExample2::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("Example2"); + return getGuiApplication()->sendHasMsgToActiveView("Example2"); } //=========================================================================== @@ -1888,23 +1919,24 @@ DEF_STD_CMD_A(StdCmdViewExample3); StdCmdViewExample3::StdCmdViewExample3() : Command("Std_ViewExample3") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Inventor example #3"); - sToolTipText = QT_TR_NOOP("Shows a animated texture"); - sWhatsThis = "Std_ViewExamples"; - sStatusTip = QT_TR_NOOP("Shows a animated texture"); - sPixmap = "Std_Tool3"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Inventor example #3"); + sToolTipText = QT_TR_NOOP("Shows a animated texture"); + sWhatsThis = "Std_ViewExamples"; + sStatusTip = QT_TR_NOOP("Shows a animated texture"); + sPixmap = "Std_Tool3"; + eType = Alter3DView; } void StdCmdViewExample3::activated(int iMsg) { - doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.SendMsgToActiveView(\"Example3\")"); } bool StdCmdViewExample3::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("Example3"); + return getGuiApplication()->sendHasMsgToActiveView("Example3"); } @@ -1916,23 +1948,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoOff); StdCmdViewIvStereoOff::StdCmdViewIvStereoOff() : Command("Std_ViewIvStereoOff") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Stereo Off"); - sToolTipText = QT_TR_NOOP("Switch stereo viewing off"); - sWhatsThis = "Std_ViewIvStereo"; - sStatusTip = QT_TR_NOOP("Switch stereo viewing off"); - sPixmap = "Std_Tool6"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Stereo Off"); + sToolTipText = QT_TR_NOOP("Switch stereo viewing off"); + sWhatsThis = "Std_ViewIvStereo"; + sStatusTip = QT_TR_NOOP("Switch stereo viewing off"); + sPixmap = "Std_Tool6"; + eType = Alter3DView; } void StdCmdViewIvStereoOff::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"None\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"None\")"); } bool StdCmdViewIvStereoOff::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff"); + return getGuiApplication()->sendHasMsgToActiveView("SetStereoOff"); } @@ -1944,23 +1977,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoRedGreen); StdCmdViewIvStereoRedGreen::StdCmdViewIvStereoRedGreen() : Command("Std_ViewIvStereoRedGreen") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Stereo red/cyan"); - sToolTipText = QT_TR_NOOP("Switch stereo viewing to red/cyan"); - sWhatsThis = "Std_ViewIvStereo"; - sStatusTip = QT_TR_NOOP("Switch stereo viewing to red/cyan"); - sPixmap = "Std_Tool7"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Stereo red/cyan"); + sToolTipText = QT_TR_NOOP("Switch stereo viewing to red/cyan"); + sWhatsThis = "Std_ViewIvStereo"; + sStatusTip = QT_TR_NOOP("Switch stereo viewing to red/cyan"); + sPixmap = "Std_Tool7"; + eType = Alter3DView; } void StdCmdViewIvStereoRedGreen::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"Anaglyph\")"); } bool StdCmdViewIvStereoRedGreen::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen"); + return getGuiApplication()->sendHasMsgToActiveView("SetStereoRedGreen"); } //=========================================================================== @@ -1971,23 +2005,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoQuadBuff); StdCmdViewIvStereoQuadBuff::StdCmdViewIvStereoQuadBuff() : Command("Std_ViewIvStereoQuadBuff") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Stereo quad buffer"); - sToolTipText = QT_TR_NOOP("Switch stereo viewing to quad buffer"); - sWhatsThis = "Std_ViewIvStereo"; - sStatusTip = QT_TR_NOOP("Switch stereo viewing to quad buffer"); - sPixmap = "Std_Tool7"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Stereo quad buffer"); + sToolTipText = QT_TR_NOOP("Switch stereo viewing to quad buffer"); + sWhatsThis = "Std_ViewIvStereo"; + sStatusTip = QT_TR_NOOP("Switch stereo viewing to quad buffer"); + sPixmap = "Std_Tool7"; + eType = Alter3DView; } void StdCmdViewIvStereoQuadBuff::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"QuadBuffer\")"); } bool StdCmdViewIvStereoQuadBuff::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff"); + return getGuiApplication()->sendHasMsgToActiveView("SetStereoQuadBuff"); } //=========================================================================== @@ -1998,23 +2033,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoInterleavedRows); StdCmdViewIvStereoInterleavedRows::StdCmdViewIvStereoInterleavedRows() : Command("Std_ViewIvStereoInterleavedRows") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Stereo Interleaved Rows"); - sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows"); - sWhatsThis = "Std_ViewIvStereo"; - sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows"); - sPixmap = "Std_Tool7"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Stereo Interleaved Rows"); + sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows"); + sWhatsThis = "Std_ViewIvStereo"; + sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Rows"); + sPixmap = "Std_Tool7"; + eType = Alter3DView; } void StdCmdViewIvStereoInterleavedRows::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedRows\")"); } bool StdCmdViewIvStereoInterleavedRows::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows"); + return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedRows"); } //=========================================================================== @@ -2025,23 +2061,24 @@ DEF_STD_CMD_A(StdCmdViewIvStereoInterleavedColumns); StdCmdViewIvStereoInterleavedColumns::StdCmdViewIvStereoInterleavedColumns() : Command("Std_ViewIvStereoInterleavedColumns") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Stereo Interleaved Columns"); - sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns"); - sWhatsThis = "Std_ViewIvStereo"; - sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns"); - sPixmap = "Std_Tool7"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Stereo Interleaved Columns"); + sToolTipText = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns"); + sWhatsThis = "Std_ViewIvStereo"; + sStatusTip = QT_TR_NOOP("Switch stereo viewing to Interleaved Columns"); + sPixmap = "Std_Tool7"; + eType = Alter3DView; } void StdCmdViewIvStereoInterleavedColumns::activated(int iMsg) { - doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")"); + Q_UNUSED(iMsg); + doCommand(Command::Gui,"Gui.activeDocument().activeView().setStereoType(\"InterleavedColumns\")"); } bool StdCmdViewIvStereoInterleavedColumns::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns"); + return getGuiApplication()->sendHasMsgToActiveView("SetStereoInterleavedColumns"); } @@ -2053,44 +2090,45 @@ DEF_STD_CMD_A(StdCmdViewIvIssueCamPos); StdCmdViewIvIssueCamPos::StdCmdViewIvIssueCamPos() : Command("Std_ViewIvIssueCamPos") { - sGroup = QT_TR_NOOP("Standard-View"); - sMenuText = QT_TR_NOOP("Issue camera position"); - sToolTipText = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position"); - sWhatsThis = "Std_ViewIvIssueCamPos"; - sStatusTip = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position"); - sPixmap = "Std_Tool8"; - eType = Alter3DView; + sGroup = QT_TR_NOOP("Standard-View"); + sMenuText = QT_TR_NOOP("Issue camera position"); + sToolTipText = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position"); + sWhatsThis = "Std_ViewIvIssueCamPos"; + sStatusTip = QT_TR_NOOP("Issue the camera position to the console and to a macro, to easily recall this position"); + sPixmap = "Std_Tool8"; + eType = Alter3DView; } void StdCmdViewIvIssueCamPos::activated(int iMsg) { - std::string Temp,Temp2; - std::string::size_type pos; + Q_UNUSED(iMsg); + std::string Temp,Temp2; + std::string::size_type pos; - const char* ppReturn=0; - getGuiApplication()->sendMsgToActiveView("GetCamera",&ppReturn); + const char* ppReturn=0; + getGuiApplication()->sendMsgToActiveView("GetCamera",&ppReturn); - // remove the #inventor line... - Temp2 = ppReturn; - pos = Temp2.find_first_of("\n"); - Temp2.erase(0,pos); + // remove the #inventor line... + Temp2 = ppReturn; + pos = Temp2.find_first_of("\n"); + Temp2.erase(0,pos); - // remove all returns - while((pos=Temp2.find('\n')) != std::string::npos) - Temp2.replace(pos,1," "); + // remove all returns + while((pos=Temp2.find('\n')) != std::string::npos) + Temp2.replace(pos,1," "); - // build up the command string - Temp += "Gui.SendMsgToActiveView(\"SetCamera "; - Temp += Temp2; - Temp += "\")"; + // build up the command string + Temp += "Gui.SendMsgToActiveView(\"SetCamera "; + Temp += Temp2; + Temp += "\")"; - Base::Console().Message("%s\n",Temp2.c_str()); - getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str()); + Base::Console().Message("%s\n",Temp2.c_str()); + getGuiApplication()->macroManager()->addLine(MacroManager::Gui,Temp.c_str()); } bool StdCmdViewIvIssueCamPos::isActive(void) { - return getGuiApplication()->sendHasMsgToActiveView("GetCamera"); + return getGuiApplication()->sendHasMsgToActiveView("GetCamera"); } @@ -2116,6 +2154,7 @@ StdViewZoomIn::StdViewZoomIn() void StdViewZoomIn::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if ( view ) { View3DInventorViewer* viewer = view->getViewer(); @@ -2150,6 +2189,7 @@ StdViewZoomOut::StdViewZoomOut() void StdViewZoomOut::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if (view) { View3DInventorViewer* viewer = view->getViewer(); @@ -2184,6 +2224,7 @@ StdViewBoxZoom::StdViewBoxZoom() void StdViewBoxZoom::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if ( view ) { View3DInventorViewer* viewer = view->getViewer(); @@ -2265,6 +2306,7 @@ static void selectionCallback(void * ud, SoEventCallback * cb) void StdBoxSelection::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* view = qobject_cast(getMainWindow()->activeWindow()); if (view) { View3DInventorViewer* viewer = view->getViewer(); @@ -2296,6 +2338,7 @@ StdCmdTreeSelection::StdCmdTreeSelection() void StdCmdTreeSelection::activated(int iMsg) { + Q_UNUSED(iMsg); QList tree = Gui::getMainWindow()->findChildren(); for (QList::iterator it = tree.begin(); it != tree.end(); ++it) { Gui::Document* doc = Gui::Application::Instance->activeDocument(); @@ -2362,6 +2405,7 @@ static const char * cursor_ruler[] = { " + "}; void StdCmdMeasureDistance::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Document* doc = Gui::Application::Instance->activeDocument(); Gui::View3DInventor* view = static_cast(doc->getActiveView()); if (view) { @@ -2412,6 +2456,7 @@ StdCmdSceneInspector::StdCmdSceneInspector() void StdCmdSceneInspector::activated(int iMsg) { + Q_UNUSED(iMsg); View3DInventor* child = qobject_cast(getMainWindow()->activeWindow()); if (child) { View3DInventorViewer* viewer = child->getViewer(); @@ -2444,6 +2489,7 @@ StdCmdTextureMapping::StdCmdTextureMapping() void StdCmdTextureMapping::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Control().showDialog(new Gui::Dialog::TaskTextureMapping); } @@ -2469,6 +2515,7 @@ StdCmdDemoMode::StdCmdDemoMode() void StdCmdDemoMode::activated(int iMsg) { + Q_UNUSED(iMsg); static QPointer dlg = 0; if (!dlg) dlg = new Gui::Dialog::DemoMode(getMainWindow()); @@ -2495,14 +2542,15 @@ CmdViewMeasureClearAll::CmdViewMeasureClearAll() void CmdViewMeasureClearAll::activated(int iMsg) { - Gui::View3DInventor *view = dynamic_cast(Gui::Application::Instance-> - activeDocument()->getActiveView()); - if (!view) - return; - Gui::View3DInventorViewer *viewer = view->getViewer(); - if (!viewer) - return; - viewer->eraseAllDimensions(); + Q_UNUSED(iMsg); + Gui::View3DInventor *view = dynamic_cast(Gui::Application::Instance-> + activeDocument()->getActiveView()); + if (!view) + return; + Gui::View3DInventorViewer *viewer = view->getViewer(); + if (!viewer) + return; + viewer->eraseAllDimensions(); } //=========================================================================== @@ -2514,23 +2562,24 @@ DEF_STD_CMD(CmdViewMeasureToggleAll); CmdViewMeasureToggleAll::CmdViewMeasureToggleAll() : Command("View_Measure_Toggle_All") { - sGroup = QT_TR_NOOP("Measure"); - sMenuText = QT_TR_NOOP("Toggle measurement"); - sToolTipText = QT_TR_NOOP("Toggle measurement"); - sWhatsThis = "View_Measure_Toggle_All"; - sStatusTip = sToolTipText; - sPixmap = "Part_Measure_Toggle_All"; + sGroup = QT_TR_NOOP("Measure"); + sMenuText = QT_TR_NOOP("Toggle measurement"); + sToolTipText = QT_TR_NOOP("Toggle measurement"); + sWhatsThis = "View_Measure_Toggle_All"; + sStatusTip = sToolTipText; + sPixmap = "Part_Measure_Toggle_All"; } void CmdViewMeasureToggleAll::activated(int iMsg) { - ParameterGrp::handle group = App::GetApplication().GetUserParameter(). - GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View"); - bool visibility = group->GetBool("DimensionsVisible", true); - if (visibility) - group->SetBool("DimensionsVisible", false); - else - group->SetBool("DimensionsVisible", true); + Q_UNUSED(iMsg); + ParameterGrp::handle group = App::GetApplication().GetUserParameter(). + GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("View"); + bool visibility = group->GetBool("DimensionsVisible", true); + if (visibility) + group->SetBool("DimensionsVisible", false); + else + group->SetBool("DimensionsVisible", true); } //=========================================================================== diff --git a/src/Gui/CommandWindow.cpp b/src/Gui/CommandWindow.cpp index 2d7738c578..74e0758757 100644 --- a/src/Gui/CommandWindow.cpp +++ b/src/Gui/CommandWindow.cpp @@ -60,6 +60,7 @@ StdCmdArrangeIcons::StdCmdArrangeIcons() void StdCmdArrangeIcons::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->arrangeIcons (); } @@ -87,6 +88,7 @@ StdCmdTileWindows::StdCmdTileWindows() void StdCmdTileWindows::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->tile(); } @@ -114,6 +116,7 @@ StdCmdCascadeWindows::StdCmdCascadeWindows() void StdCmdCascadeWindows::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->cascade(); } @@ -143,6 +146,7 @@ StdCmdCloseActiveWindow::StdCmdCloseActiveWindow() void StdCmdCloseActiveWindow::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->closeActiveWindow(); } @@ -169,6 +173,7 @@ StdCmdCloseAllWindows::StdCmdCloseAllWindows() void StdCmdCloseAllWindows::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->closeAllWindows(); } @@ -197,6 +202,7 @@ StdCmdActivateNextWindow::StdCmdActivateNextWindow() void StdCmdActivateNextWindow::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->activateNextWindow(); } @@ -225,6 +231,7 @@ StdCmdActivatePrevWindow::StdCmdActivatePrevWindow() void StdCmdActivatePrevWindow::activated(int iMsg) { + Q_UNUSED(iMsg); getMainWindow()->activatePreviousWindow(); } @@ -252,6 +259,7 @@ StdCmdWindows::StdCmdWindows() void StdCmdWindows::activated(int iMsg) { + Q_UNUSED(iMsg); Gui::Dialog::DlgActivateWindowImp dlg( getMainWindow() ); dlg.exec(); } @@ -297,6 +305,7 @@ StdCmdDockViewMenu::StdCmdDockViewMenu() void StdCmdDockViewMenu::activated(int iMsg) { // Handled by the related QAction objects + Q_UNUSED(iMsg); } bool StdCmdDockViewMenu::isActive(void) @@ -332,6 +341,7 @@ StdCmdToolBarMenu::StdCmdToolBarMenu() void StdCmdToolBarMenu::activated(int iMsg) { // Handled by the related QAction objects + Q_UNUSED(iMsg); } bool StdCmdToolBarMenu::isActive(void) @@ -411,6 +421,7 @@ StdCmdWindowsMenu::StdCmdWindowsMenu() void StdCmdWindowsMenu::activated(int iMsg) { // already handled by the main window + Q_UNUSED(iMsg); } bool StdCmdWindowsMenu::isActive(void) diff --git a/src/Gui/DAGView/DAGFilter.cpp b/src/Gui/DAGView/DAGFilter.cpp index e85c234f1f..ae1ae2bd36 100644 --- a/src/Gui/DAGView/DAGFilter.cpp +++ b/src/Gui/DAGView/DAGFilter.cpp @@ -70,6 +70,7 @@ FilterTyped::FilterTyped(const std::string &typeIn) : FilterBase(), type(typeIn) bool FilterTyped::goFilter(const Gui::DAG::Vertex& vertexIn, const Graph& graphIn, const GraphLinkContainer& linkIn) const { + Q_UNUSED(graphIn); if (type.empty()) return false; Base::Type theType = Base::Type::fromName(type.c_str()); diff --git a/src/Gui/DAGView/DAGModelGraph.h b/src/Gui/DAGView/DAGModelGraph.h index e072cb71f4..ec71177a42 100644 --- a/src/Gui/DAGView/DAGModelGraph.h +++ b/src/Gui/DAGView/DAGModelGraph.h @@ -220,6 +220,7 @@ namespace Gui template void discover_vertex(TVertex vertex, TGraph &graph) { + Q_UNUSED(graph); vertices.push_back(vertex); } private: diff --git a/src/Gui/DAGView/DAGRectItem.cpp b/src/Gui/DAGView/DAGRectItem.cpp index ba3dc65bf8..1558d5a49c 100644 --- a/src/Gui/DAGView/DAGRectItem.cpp +++ b/src/Gui/DAGView/DAGRectItem.cpp @@ -42,6 +42,8 @@ RectItem::RectItem(QGraphicsItem* parent) : QGraphicsRectItem(parent) void RectItem::paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget) { + Q_UNUSED(option); + Q_UNUSED(widget); painter->save(); QStyleOptionViewItemV4 styleOption; diff --git a/src/Gui/DemoMode.cpp b/src/Gui/DemoMode.cpp index 393a04d115..a9250ebf2b 100644 --- a/src/Gui/DemoMode.cpp +++ b/src/Gui/DemoMode.cpp @@ -45,7 +45,7 @@ using namespace Gui::Dialog; /* TRANSLATOR Gui::Dialog::DemoMode */ -DemoMode::DemoMode(QWidget* parent, Qt::WindowFlags fl) +DemoMode::DemoMode(QWidget* /*parent*/, Qt::WindowFlags fl) : QDialog(0, fl|Qt::WindowStaysOnTopHint), viewAxis(0,0,-1), ui(new Ui_DemoMode) { // create widgets @@ -184,6 +184,7 @@ void DemoMode::reorientCamera(SoCamera * cam, const SbRotation & rot) void DemoMode::on_speedSlider_valueChanged(int v) { + Q_UNUSED(v); Gui::View3DInventor* view = activeView(); if (view && view->getViewer()->isAnimating()) { startAnimation(view); diff --git a/src/Gui/DlgCustomizeSpNavSettings.cpp b/src/Gui/DlgCustomizeSpNavSettings.cpp index 9270a3c5ab..fe8d974cca 100644 --- a/src/Gui/DlgCustomizeSpNavSettings.cpp +++ b/src/Gui/DlgCustomizeSpNavSettings.cpp @@ -304,16 +304,19 @@ void DlgCustomizeSpNavSettings::on_SliderSpin_sliderReleased() void DlgCustomizeSpNavSettings::onAddMacroAction(const QByteArray ¯oName) { //don't need to do anything here. + Q_UNUSED(macroName); } void DlgCustomizeSpNavSettings::onRemoveMacroAction(const QByteArray ¯oName) { //don't need to do anything here. + Q_UNUSED(macroName); } void DlgCustomizeSpNavSettings::onModifyMacroAction(const QByteArray ¯oName) { //don't need to do anything here. + Q_UNUSED(macroName); } #include "moc_DlgCustomizeSpNavSettings.cpp" diff --git a/src/Gui/DlgCustomizeSpaceball.cpp b/src/Gui/DlgCustomizeSpaceball.cpp index d649ef559b..46802d41d6 100644 --- a/src/Gui/DlgCustomizeSpaceball.cpp +++ b/src/Gui/DlgCustomizeSpaceball.cpp @@ -59,6 +59,7 @@ void ButtonView::selectButton(int number) void ButtonView::goSelectionChanged(const QItemSelection &selected, const QItemSelection &deselected) { + Q_UNUSED(deselected); if (selected.indexes().isEmpty()) return; QModelIndex select(selected.indexes().at(0)); @@ -82,6 +83,7 @@ ButtonModel::ButtonModel(QObject *parent) : QAbstractListModel(parent) int ButtonModel::rowCount (const QModelIndex &parent) const { + Q_UNUSED(parent); return spaceballButtonGroup()->GetGroups().size(); } @@ -278,6 +280,7 @@ int CommandModel::rowCount(const QModelIndex &parent) const int CommandModel::columnCount(const QModelIndex &parent) const { + Q_UNUSED(parent); return 1; } @@ -474,11 +477,13 @@ PrintModel::PrintModel(QObject *parent, ButtonModel *buttonModelIn, CommandModel int PrintModel::rowCount(const QModelIndex &parent) const { + Q_UNUSED(parent); return buttonModel->rowCount(); } int PrintModel::columnCount(const QModelIndex &parent) const { + Q_UNUSED(parent); return 2; } @@ -712,6 +717,7 @@ void DlgCustomizeSpaceball::onRemoveMacroAction(const QByteArray ¯oName) void DlgCustomizeSpaceball::onModifyMacroAction(const QByteArray ¯oName) { //don't think I need to do anything here. + Q_UNUSED(macroName); } #include "moc_DlgCustomizeSpaceball.cpp" diff --git a/src/Gui/DlgDisplayPropertiesImp.cpp b/src/Gui/DlgDisplayPropertiesImp.cpp index fdbcbc559d..832a8d7b95 100644 --- a/src/Gui/DlgDisplayPropertiesImp.cpp +++ b/src/Gui/DlgDisplayPropertiesImp.cpp @@ -122,6 +122,7 @@ void DlgDisplayPropertiesImp::changeEvent(QEvent *e) void DlgDisplayPropertiesImp::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); if (Reason.Type == SelectionChanges::AddSelection || Reason.Type == SelectionChanges::RmvSelection || Reason.Type == SelectionChanges::SetSelection || diff --git a/src/Gui/DlgKeyboardImp.cpp b/src/Gui/DlgKeyboardImp.cpp index 9ca756ff26..c3f4f34e44 100644 --- a/src/Gui/DlgKeyboardImp.cpp +++ b/src/Gui/DlgKeyboardImp.cpp @@ -119,6 +119,7 @@ DlgCustomKeyboardImp::~DlgCustomKeyboardImp() void DlgCustomKeyboardImp::showEvent(QShowEvent* e) { + Q_UNUSED(e); // If we did this already in the constructor we wouldn't get the vertical scrollbar if needed. // The problem was noticed with Qt 4.1.4 but may arise with any later version. if (firstShow) { diff --git a/src/Gui/DlgRunExternal.cpp b/src/Gui/DlgRunExternal.cpp index 948051c177..91ea200fd3 100644 --- a/src/Gui/DlgRunExternal.cpp +++ b/src/Gui/DlgRunExternal.cpp @@ -114,6 +114,8 @@ void DlgRunExternal::advanced (void) void DlgRunExternal::finished (int exitCode, QProcess::ExitStatus exitStatus) { + Q_UNUSED(exitCode); + Q_UNUSED(exitStatus); ui->buttonAccept->setEnabled(true); ui->buttonDiscard->setEnabled(true); ui->buttonAbort->setEnabled(false); diff --git a/src/Gui/DlgWorkbenchesImp.cpp b/src/Gui/DlgWorkbenchesImp.cpp index a20a57d6ad..6ddbedf3f7 100644 --- a/src/Gui/DlgWorkbenchesImp.cpp +++ b/src/Gui/DlgWorkbenchesImp.cpp @@ -118,19 +118,23 @@ void DlgWorkbenchesImp::changeEvent(QEvent *e) void DlgWorkbenchesImp::hideEvent(QHideEvent * event) { + Q_UNUSED(event); save_workbenches(); } void DlgWorkbenchesImp::onAddMacroAction(const QByteArray& macro) { + Q_UNUSED(macro); } void DlgWorkbenchesImp::onRemoveMacroAction(const QByteArray& macro) { + Q_UNUSED(macro); } void DlgWorkbenchesImp::onModifyMacroAction(const QByteArray& macro) { + Q_UNUSED(macro); } void DlgWorkbenchesImp::move_workbench(QListWidgetCustom *lwc_dest, diff --git a/src/Gui/DockWindow.h b/src/Gui/DockWindow.h index 6cd9d2a286..aaf3c1f763 100644 --- a/src/Gui/DockWindow.h +++ b/src/Gui/DockWindow.h @@ -68,9 +68,9 @@ public: /// returns the name of the view (important for messages) virtual const char *getName(void) const { return "DockWindow"; } /// Message handler - virtual bool onMsg(const char* pMsg,const char** ppReturn){ return false; } + virtual bool onMsg(const char* ,const char** ){ return false; } /// Message handler test - virtual bool onHasMsg(const char* pMsg) const { return false; } + virtual bool onHasMsg(const char*) const { return false; } /// overwrite when checking on close state virtual bool canClose(void){return true;} //@} diff --git a/src/Gui/DocumentModel.cpp b/src/Gui/DocumentModel.cpp index 9cad5f72aa..48cc92c8a3 100644 --- a/src/Gui/DocumentModel.cpp +++ b/src/Gui/DocumentModel.cpp @@ -82,9 +82,13 @@ namespace Gui { int childCount() const { return childItems.count(); } virtual QVariant data(int role) const - { return QVariant(); } + { + Q_UNUSED(role); + return QVariant(); + } virtual bool setData (const QVariant & value, int role) { + Q_UNUSED(value); if (role == Qt::EditRole) { return true; } @@ -404,6 +408,7 @@ void DocumentModel::slotDeleteDocument(const Gui::Document& Doc) void DocumentModel::slotRenameDocument(const Gui::Document& Doc) { + Q_UNUSED(Doc); // do nothing here } @@ -428,10 +433,12 @@ void DocumentModel::slotActiveDocument(const Gui::Document& /*Doc*/) void DocumentModel::slotInEdit(const Gui::ViewProviderDocumentObject& v) { + Q_UNUSED(v); } void DocumentModel::slotResetEdit(const Gui::ViewProviderDocumentObject& v) { + Q_UNUSED(v); } void DocumentModel::slotNewObject(const Gui::ViewProviderDocumentObject& obj) @@ -540,11 +547,13 @@ void DocumentModel::slotChangeObject(const Gui::ViewProviderDocumentObject& obj, void DocumentModel::slotRenameObject(const Gui::ViewProviderDocumentObject& obj) { + Q_UNUSED(obj); // renaming of objects not supported at the moment } void DocumentModel::slotActiveObject(const Gui::ViewProviderDocumentObject& obj) { + Q_UNUSED(obj); // do nothing here because this is automatically done by calling // ViewProviderIndex::data() } @@ -652,6 +661,7 @@ int DocumentModel::rowCount (const QModelIndex & parent) const QVariant DocumentModel::headerData (int section, Qt::Orientation orientation, int role) const { + Q_UNUSED(section); if (orientation == Qt::Horizontal) { if (role != Qt::DisplayRole) return QVariant(); diff --git a/src/Gui/DocumentPyImp.cpp b/src/Gui/DocumentPyImp.cpp index 1b8fb930ce..0b7da59358 100644 --- a/src/Gui/DocumentPyImp.cpp +++ b/src/Gui/DocumentPyImp.cpp @@ -319,7 +319,7 @@ Py::Object DocumentPy::getActiveObject(void) const } } -void DocumentPy::setActiveObject(Py::Object arg) +void DocumentPy::setActiveObject(Py::Object /*arg*/) { throw Py::AttributeError("'Document' object attribute 'ActiveObject' is read-only"); } @@ -335,7 +335,7 @@ Py::Object DocumentPy::getActiveView(void) const } } -void DocumentPy::setActiveView(Py::Object arg) +void DocumentPy::setActiveView(Py::Object /*arg*/) { throw Py::AttributeError("'Document' object attribute 'ActiveView' is read-only"); } diff --git a/src/Gui/EditorView.cpp b/src/Gui/EditorView.cpp index d1737a3131..8df586010b 100644 --- a/src/Gui/EditorView.cpp +++ b/src/Gui/EditorView.cpp @@ -135,6 +135,7 @@ QPlainTextEdit* EditorView::getEditor() const void EditorView::OnChange(Base::Subject &rCaller,const char* rcReason) { + Q_UNUSED(rCaller); ParameterGrp::handle hPrefGrp = getWindowParameter(); if (strcmp(rcReason, "EnableLineNumber") == 0) { //bool show = hPrefGrp->GetBool( "EnableLineNumber", true ); @@ -167,7 +168,7 @@ void EditorView::checkTimestamp() /** * Runs the action specified by \a pMsg. */ -bool EditorView::onMsg(const char* pMsg,const char** ppReturn) +bool EditorView::onMsg(const char* pMsg,const char** /*ppReturn*/) { if (strcmp(pMsg,"Save")==0){ saveFile(); @@ -473,6 +474,7 @@ void EditorView::redoAvailable(bool redo) void EditorView::contentsChange(int position, int charsRemoved, int charsAdded) { + Q_UNUSED(position); if (d->lock) return; if (charsRemoved > 0 && charsAdded > 0) @@ -502,7 +504,7 @@ QStringList EditorView::redoActions() const return d->redos;; } -void EditorView::focusInEvent (QFocusEvent * e) +void EditorView::focusInEvent (QFocusEvent *) { d->textEdit->setFocus(); } diff --git a/src/Gui/ExpressionBinding.cpp b/src/Gui/ExpressionBinding.cpp index fded5e08d3..04990614ed 100644 --- a/src/Gui/ExpressionBinding.cpp +++ b/src/Gui/ExpressionBinding.cpp @@ -136,6 +136,7 @@ QPixmap ExpressionBinding::getIcon(const char* name, const QSize& size) const bool ExpressionBinding::apply(const std::string & propName) { + Q_UNUSED(propName); if (hasExpression()) { DocumentObject * docObj = path.getDocumentObject(); diff --git a/src/Gui/FileDialog.cpp b/src/Gui/FileDialog.cpp index f3d655bb6f..9f74268249 100644 --- a/src/Gui/FileDialog.cpp +++ b/src/Gui/FileDialog.cpp @@ -25,7 +25,7 @@ #ifndef _PreComp_ # include # include -# include +# include # include # include # include @@ -61,7 +61,7 @@ FileDialog::~FileDialog() { } -void FileDialog::onSelectedFilter(const QString& filter) +void FileDialog::onSelectedFilter(const QString& /*filter*/) { QRegExp rx(QLatin1String("\\(\\*.(\\w+)")); QString suf = selectedNameFilter(); @@ -91,21 +91,21 @@ void FileDialog::accept() // When saving to a file make sure that the entered filename ends with the selected // file filter if (acceptMode() == QFileDialog::AcceptSave) { - QStringList files = selectedFiles(); - if (!files.isEmpty()) { - QString ext = this->defaultSuffix(); - QString file = files.front(); - QString suffix = QFileInfo(file).suffix(); - // #0001928: do not add a suffix if a file with suffix is entered - // #0002209: make sure that the entered suffix is part of one of the filters - if (!ext.isEmpty() && (suffix.isEmpty() || !hasSuffix(suffix))) { - file = QString::fromLatin1("%1.%2").arg(file).arg(ext); - // That's the built-in line edit - QLineEdit* fileNameEdit = this->findChild(QString::fromLatin1("fileNameEdit")); - if (fileNameEdit) - fileNameEdit->setText(file); - } - } + QStringList files = selectedFiles(); + if (!files.isEmpty()) { + QString ext = this->defaultSuffix(); + QString file = files.front(); + QString suffix = QFileInfo(file).suffix(); + // #0001928: do not add a suffix if a file with suffix is entered + // #0002209: make sure that the entered suffix is part of one of the filters + if (!ext.isEmpty() && (suffix.isEmpty() || !hasSuffix(suffix))) { + file = QString::fromLatin1("%1.%2").arg(file).arg(ext); + // That's the built-in line edit + QLineEdit* fileNameEdit = this->findChild(QString::fromLatin1("fileNameEdit")); + if (fileNameEdit) + fileNameEdit->setText(file); + } + } } QFileDialog::accept(); } @@ -435,10 +435,10 @@ void FileOptionsDialog::accept() else if (ext.toLower() != suf.toLower()) { fn = QString::fromLatin1("%1.%2").arg(fn).arg(suf); selectFile(fn); - // That's the built-in line edit (fixes Debian bug #811200) - QLineEdit* fileNameEdit = this->findChild(QString::fromLatin1("fileNameEdit")); - if (fileNameEdit) - fileNameEdit->setText(fn); + // That's the built-in line edit (fixes Debian bug #811200) + QLineEdit* fileNameEdit = this->findChild(QString::fromLatin1("fileNameEdit")); + if (fileNameEdit) + fileNameEdit->setText(fn); } } @@ -527,19 +527,19 @@ FileChooser::FileChooser ( QWidget * parent ) layout->setMargin( 0 ); layout->setSpacing( 6 ); - lineEdit = new QLineEdit ( this ); - completer = new QCompleter ( this ); - completer->setMaxVisibleItems( 12 ); - fs_model = new QFileSystemModel( completer ); - fs_model->setRootPath(QString::fromUtf8("")); - completer->setModel( fs_model ); - lineEdit->setCompleter( completer ); - + lineEdit = new QLineEdit ( this ); + completer = new QCompleter ( this ); + completer->setMaxVisibleItems( 12 ); + fs_model = new QFileSystemModel( completer ); + fs_model->setRootPath(QString::fromUtf8("")); + completer->setModel( fs_model ); + lineEdit->setCompleter( completer ); + layout->addWidget( lineEdit ); connect(lineEdit, SIGNAL(textChanged(const QString &)), this, SIGNAL(fileNameChanged(const QString &))); - + connect(lineEdit, SIGNAL(editingFinished()), this, SLOT(editingFinished())); button = new QPushButton(QLatin1String("..."), this); @@ -569,13 +569,13 @@ QString FileChooser::fileName() const } void FileChooser::editingFinished() -{ - QString le_converted = QDir::fromNativeSeparators(lineEdit->text()); - lineEdit->setText(le_converted); +{ + QString le_converted = QDir::fromNativeSeparators(lineEdit->text()); + lineEdit->setText(le_converted); FileDialog::setWorkingDirectory(le_converted); fileNameSelected(le_converted); -} - +} + /** * Sets the file name \a s. */ diff --git a/src/Gui/Flag.cpp b/src/Gui/Flag.cpp index 8aa583bdfe..f62cfbf139 100644 --- a/src/Gui/Flag.cpp +++ b/src/Gui/Flag.cpp @@ -159,6 +159,8 @@ void Flag::paintGL() void Flag::resizeGL(int width, int height) { + Q_UNUSED(width); + Q_UNUSED(height); return; //int side = qMin(width, height); //glViewport((width - side) / 2, (height - side) / 2, side, side); @@ -224,7 +226,7 @@ void Flag::setText(const QString& t) this->text = t; } -void Flag::resizeEvent(QResizeEvent * e) +void Flag::resizeEvent(QResizeEvent * ) { #if 0 image = QImage(this->size(), QImage::Format_ARGB32); diff --git a/src/Gui/GraphvizView.cpp b/src/Gui/GraphvizView.cpp index a0d5e8ea33..65b3f432dd 100644 --- a/src/Gui/GraphvizView.cpp +++ b/src/Gui/GraphvizView.cpp @@ -284,7 +284,7 @@ QByteArray GraphvizView::exportGraph(const QString& format) return proc.readAll(); } -bool GraphvizView::onMsg(const char* pMsg,const char** ppReturn) +bool GraphvizView::onMsg(const char* pMsg,const char**) { if (strcmp("Save",pMsg) == 0 || strcmp("SaveAs",pMsg) == 0) { QList< QPair > formatMap; diff --git a/src/Gui/GuiApplicationNativeEventAware.cpp b/src/Gui/GuiApplicationNativeEventAware.cpp index 35cbdc783e..fb934d593a 100644 --- a/src/Gui/GuiApplicationNativeEventAware.cpp +++ b/src/Gui/GuiApplicationNativeEventAware.cpp @@ -502,6 +502,7 @@ bool Gui::GUIApplicationNativeEventAware::x11EventFilter(XEvent *event) Base::Console().Log("Unknown spaceball event\n"); return true; #else + Q_UNUSED(event); return false; #endif // SPNAV_FOUND } diff --git a/src/Gui/InputField.cpp b/src/Gui/InputField.cpp index 2452183827..388acdc840 100644 --- a/src/Gui/InputField.cpp +++ b/src/Gui/InputField.cpp @@ -621,6 +621,7 @@ void InputField::fixup(QString& input) const QValidator::State InputField::validate(QString& input, int& pos) const { + Q_UNUSED(pos); try { Quantity res; QString text = input; diff --git a/src/Gui/Inventor/SoDrawingGrid.cpp b/src/Gui/Inventor/SoDrawingGrid.cpp index f666ca308f..a687f4b545 100644 --- a/src/Gui/Inventor/SoDrawingGrid.cpp +++ b/src/Gui/Inventor/SoDrawingGrid.cpp @@ -36,6 +36,7 @@ #include #include "SoDrawingGrid.h" +#include using namespace Gui::Inventor; @@ -174,10 +175,14 @@ SoDrawingGrid::GLRenderOffPath(SoGLRenderAction *) void SoDrawingGrid::generatePrimitives(SoAction* action) { + Q_UNUSED(action); } void SoDrawingGrid::computeBBox(SoAction *action, SbBox3f &box, SbVec3f ¢er) { + Q_UNUSED(action); + Q_UNUSED(box); + Q_UNUSED(center); //SoState* state = action->getState(); } diff --git a/src/Gui/MDIView.cpp b/src/Gui/MDIView.cpp index 5ea1ecafee..9567cf96a4 100644 --- a/src/Gui/MDIView.cpp +++ b/src/Gui/MDIView.cpp @@ -105,6 +105,7 @@ void MDIView::deleteSelf() void MDIView::setOverrideCursor(const QCursor& c) { + Q_UNUSED(c); } void MDIView::restoreOverrideCursor() @@ -144,11 +145,14 @@ void MDIView::viewAll() /// receive a message bool MDIView::onMsg(const char* pMsg,const char** ppReturn) { + Q_UNUSED(pMsg); + Q_UNUSED(ppReturn); return false; } bool MDIView::onHasMsg(const char* pMsg) const { + Q_UNUSED(pMsg); return false; } @@ -193,6 +197,7 @@ void MDIView::windowStateChanged( MDIView* ) void MDIView::print(QPrinter* printer) { + Q_UNUSED(printer); std::cerr << "Printing not implemented for " << this->metaObject()->className() << std::endl; } diff --git a/src/Gui/Macro.cpp b/src/Gui/Macro.cpp index f1439ca471..b22e24da08 100644 --- a/src/Gui/Macro.cpp +++ b/src/Gui/Macro.cpp @@ -70,13 +70,15 @@ MacroManager::~MacroManager() void MacroManager::OnChange(Base::Subject &rCaller, const char * sReason) { + (void)rCaller; + (void)sReason; this->recordGui = this->params->GetBool("RecordGui", true); this->guiAsComment = this->params->GetBool("GuiAsComment", true); this->scriptToPyConsole = this->params->GetBool("ScriptToPyConsole", true); this->localEnv = this->params->GetBool("LocalEnvironment", true); } -void MacroManager::open(MacroType eType,const char *sName) +void MacroManager::open(MacroType eType, const char *sName) { // check assert(!this->openMacro); @@ -227,8 +229,10 @@ namespace Gui { }; } -void MacroManager::run(MacroType eType,const char *sName) +void MacroManager::run(MacroType eType, const char *sName) { + Q_UNUSED(eType); + try { ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter() .GetGroup("BaseApp")->GetGroup("Preferences")->GetGroup("OutputWindow"); diff --git a/src/Gui/MainWindow.cpp b/src/Gui/MainWindow.cpp index f73a88444e..d046b23951 100644 --- a/src/Gui/MainWindow.cpp +++ b/src/Gui/MainWindow.cpp @@ -782,6 +782,7 @@ void MainWindow::removeWindow(Gui::MDIView* view) void MainWindow::tabChanged(MDIView* view) { + Q_UNUSED(view); } void MainWindow::tabCloseRequested(int index) diff --git a/src/Gui/ManualAlignment.cpp b/src/Gui/ManualAlignment.cpp index 5e2a5dc727..7e88741b13 100644 --- a/src/Gui/ManualAlignment.cpp +++ b/src/Gui/ManualAlignment.cpp @@ -488,6 +488,8 @@ public: void copyCameraSettings(SoCamera* cam1, SbRotation& rot_cam1, SbVec3f& pos_cam1, SoCamera* cam2, SbRotation& rot_cam2, SbVec3f& pos_cam2) { + Q_UNUSED(pos_cam2); + // recompute the diff we have applied to the camera's orientation SbRotation rot = cam1->orientation.getValue(); SbRotation dif = rot * rot_cam1.inverse(); @@ -1167,6 +1169,8 @@ void ManualAlignment::onCancel() void ManualAlignment::probePickedCallback(void * ud, SoEventCallback * n) { + Q_UNUSED(ud); + Gui::View3DInventorViewer* view = reinterpret_cast(n->getUserData()); const SoEvent* ev = n->getEvent(); if (ev->getTypeId() == SoMouseButtonEvent::getClassTypeId()) { diff --git a/src/Gui/MouseSelection.cpp b/src/Gui/MouseSelection.cpp index 71d893aab5..7815feb8de 100644 --- a/src/Gui/MouseSelection.cpp +++ b/src/Gui/MouseSelection.cpp @@ -383,7 +383,7 @@ int PolyPickerSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, con return Continue; } -int PolyPickerSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos) +int PolyPickerSelection::locationEvent(const SoLocation2Event* const, const QPoint& pos) { // do all the drawing stuff for us QPoint clPoint = pos; @@ -425,7 +425,7 @@ int PolyPickerSelection::locationEvent(const SoLocation2Event* const e, const QP return Continue; } -int PolyPickerSelection::keyboardEvent(const SoKeyboardEvent* const e) +int PolyPickerSelection::keyboardEvent(const SoKeyboardEvent* const) { return Continue; } @@ -703,7 +703,7 @@ int RubberbandSelection::mouseButtonEvent(const SoMouseButtonEvent* const e, con return ret; } -int RubberbandSelection::locationEvent(const SoLocation2Event* const e, const QPoint& pos) +int RubberbandSelection::locationEvent(const SoLocation2Event* const, const QPoint& pos) { m_iXnew = pos.x(); m_iYnew = pos.y(); @@ -712,7 +712,7 @@ int RubberbandSelection::locationEvent(const SoLocation2Event* const e, const QP return Continue; } -int RubberbandSelection::keyboardEvent(const SoKeyboardEvent* const e) +int RubberbandSelection::keyboardEvent(const SoKeyboardEvent* const) { return Continue; } diff --git a/src/Gui/MouseSelection.h b/src/Gui/MouseSelection.h index 03d57a7b12..a77bf32e0c 100644 --- a/src/Gui/MouseSelection.h +++ b/src/Gui/MouseSelection.h @@ -80,13 +80,13 @@ public: //@} protected: - virtual int mouseButtonEvent(const SoMouseButtonEvent* const e, const QPoint& pos) { + virtual int mouseButtonEvent(const SoMouseButtonEvent* const, const QPoint&) { return 0; }; - virtual int locationEvent(const SoLocation2Event* const e, const QPoint& pos) { + virtual int locationEvent(const SoLocation2Event* const, const QPoint&) { return 0; }; - virtual int keyboardEvent(const SoKeyboardEvent* const e) { + virtual int keyboardEvent(const SoKeyboardEvent* const) { return 0; }; diff --git a/src/Gui/NavigationStyle.cpp b/src/Gui/NavigationStyle.cpp index fee7e4a06e..8642e59fed 100644 --- a/src/Gui/NavigationStyle.cpp +++ b/src/Gui/NavigationStyle.cpp @@ -455,6 +455,7 @@ void NavigationStyle::setCameraOrientation(const SbRotation& rot, SbBool moveToC void NavigationStyleP::viewAnimationCB(void * data, SoSensor * sensor) { + Q_UNUSED(sensor); NavigationStyle* that = reinterpret_cast(data); if (PRIVATE(that)->animationsteps > 0) { // here the camera rotates from the current rotation to a given @@ -1494,6 +1495,7 @@ SbBool NavigationStyle::isPopupMenuEnabled(void) const void NavigationStyle::openPopupMenu(const SbVec2s& position) { + Q_UNUSED(position); // ask workbenches and view provider, ... MenuItem* view = new MenuItem; Gui::Application::Instance->setupContextMenu("View", view); diff --git a/src/Gui/NetworkRetriever.cpp b/src/Gui/NetworkRetriever.cpp index 68749e7a58..2063001777 100644 --- a/src/Gui/NetworkRetriever.cpp +++ b/src/Gui/NetworkRetriever.cpp @@ -356,6 +356,8 @@ void NetworkRetriever::abort() void NetworkRetriever::wgetFinished(int exitCode, QProcess::ExitStatus status) { + Q_UNUSED(exitCode); + Q_UNUSED(status); wget->setReadChannel(QProcess::StandardError); if (wget->canReadLine()) { QByteArray data = wget->readAll(); @@ -455,6 +457,7 @@ void StdCmdDownloadOnlineHelp::languageChange() void StdCmdDownloadOnlineHelp::activated(int iMsg) { + Q_UNUSED(iMsg); if (!wget->isDownloading()) { ParameterGrp::handle hGrp = App::GetApplication().GetUserParameter().GetGroup("BaseApp"); hGrp = hGrp->GetGroup("Preferences")->GetGroup("OnlineHelp"); diff --git a/src/Gui/OnlineDocumentation.cpp b/src/Gui/OnlineDocumentation.cpp index d43f074f0e..a797fcbd9b 100644 --- a/src/Gui/OnlineDocumentation.cpp +++ b/src/Gui/OnlineDocumentation.cpp @@ -424,6 +424,7 @@ StdCmdPythonHelp::~StdCmdPythonHelp() void StdCmdPythonHelp::activated(int iMsg) { + Q_UNUSED(iMsg); // try to open a connection over this port qint16 port = 7465; if (!this->server) diff --git a/src/Gui/PrefWidgets.cpp b/src/Gui/PrefWidgets.cpp index 68da915d5b..da21213311 100644 --- a/src/Gui/PrefWidgets.cpp +++ b/src/Gui/PrefWidgets.cpp @@ -102,6 +102,7 @@ QByteArray PrefWidget::paramGrpPath() const */ void PrefWidget::OnChange(Base::Subject &rCaller, const char * sReason) { + Q_UNUSED(rCaller); if (std::strcmp(sReason,m_sPrefName) == 0) restorePreferences(); } diff --git a/src/Gui/PythonConsole.cpp b/src/Gui/PythonConsole.cpp index 8c93d3eb8d..b5137b85b6 100644 --- a/src/Gui/PythonConsole.cpp +++ b/src/Gui/PythonConsole.cpp @@ -440,6 +440,7 @@ PythonConsole::~PythonConsole() /** Set new font and colors according to the paramerts. */ void PythonConsole::OnChange( Base::Subject &rCaller,const char* sReason ) { + Q_UNUSED(rCaller); ParameterGrp::handle hPrefGrp = getWindowParameter(); if (strcmp(sReason, "FontSize") == 0 || strcmp(sReason, "Font") == 0) { @@ -1312,6 +1313,8 @@ void PythonConsoleHighlighter::highlightBlock(const QString& text) void PythonConsoleHighlighter::colorChanged(const QString& type, const QColor& col) { + Q_UNUSED(type); + Q_UNUSED(col); } // --------------------------------------------------------------------- diff --git a/src/Gui/PythonConsolePy.cpp b/src/Gui/PythonConsolePy.cpp index 67496549fe..8e08a37961 100644 --- a/src/Gui/PythonConsolePy.cpp +++ b/src/Gui/PythonConsolePy.cpp @@ -342,7 +342,7 @@ Py::Object PythonStdin::repr() return Py::String(s_out.str()); } -Py::Object PythonStdin::readline(const Py::Tuple& args) +Py::Object PythonStdin::readline(const Py::Tuple& /*args*/) { return Py::String( (const char *)pyConsole->readline().toLatin1() ); } diff --git a/src/Gui/PythonDebugger.cpp b/src/Gui/PythonDebugger.cpp index 1623b615e0..703d0a6cee 100644 --- a/src/Gui/PythonDebugger.cpp +++ b/src/Gui/PythonDebugger.cpp @@ -133,22 +133,22 @@ PythonDebugModule::~PythonDebugModule() { } -Py::Object PythonDebugModule::getFunctionCallCount(const Py::Tuple &a) +Py::Object PythonDebugModule::getFunctionCallCount(const Py::Tuple &) { return Py::None(); } -Py::Object PythonDebugModule::getExceptionCount(const Py::Tuple &a) +Py::Object PythonDebugModule::getExceptionCount(const Py::Tuple &) { return Py::None(); } -Py::Object PythonDebugModule::getLineCount(const Py::Tuple &a) +Py::Object PythonDebugModule::getLineCount(const Py::Tuple &) { return Py::None(); } -Py::Object PythonDebugModule::getFunctionReturnCount(const Py::Tuple &a) +Py::Object PythonDebugModule::getFunctionReturnCount(const Py::Tuple &) { return Py::None(); } @@ -565,7 +565,7 @@ void PythonDebugger::hideDebugMarker(const QString& fn) // http://code.google.com/p/idapython/source/browse/trunk/python.cpp // http://www.koders.com/cpp/fid191F7B13CF73133935A7A2E18B7BF43ACC6D1784.aspx?s=PyEval_SetTrace // http://stuff.mit.edu/afs/sipb/project/python/src/python2.2-2.2.2/Modules/_hotshot.c -int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject *arg) +int PythonDebugger::tracer_callback(PyObject *obj, PyFrameObject *frame, int what, PyObject * /*arg*/) { PythonDebuggerPy* self = static_cast(obj); PythonDebugger* dbg = self->dbg; diff --git a/src/Gui/PythonWorkbenchPyImp.cpp b/src/Gui/PythonWorkbenchPyImp.cpp index 3a3bfe4964..bb1b954f9e 100644 --- a/src/Gui/PythonWorkbenchPyImp.cpp +++ b/src/Gui/PythonWorkbenchPyImp.cpp @@ -119,6 +119,9 @@ PyObject* PythonWorkbenchPy::removeMenu(PyObject *args) PyObject* PythonWorkbenchPy::listMenus(PyObject *args) { PY_TRY { + if (!PyArg_ParseTuple(args, "")) + return NULL; + std::list menus = getPythonBaseWorkbenchPtr()->listMenus(); PyObject* pyList = PyList_New(menus.size()); @@ -245,6 +248,9 @@ PyObject* PythonWorkbenchPy::removeToolbar(PyObject *args) PyObject* PythonWorkbenchPy::listToolbars(PyObject *args) { PY_TRY { + if (!PyArg_ParseTuple(args, "")) + return NULL; + std::list bars = getPythonBaseWorkbenchPtr()->listToolbars(); PyObject* pyList = PyList_New(bars.size()); @@ -303,6 +309,9 @@ PyObject* PythonWorkbenchPy::removeCommandbar(PyObject *args) PyObject* PythonWorkbenchPy::listCommandbars(PyObject *args) { PY_TRY { + if (!PyArg_ParseTuple(args, "")) + return NULL; + std::list bars = getPythonBaseWorkbenchPtr()->listCommandbars(); PyObject* pyList = PyList_New(bars.size()); @@ -315,12 +324,12 @@ PyObject* PythonWorkbenchPy::listCommandbars(PyObject *args) } PY_CATCH; } -PyObject *PythonWorkbenchPy::getCustomAttributes(const char* attr) const +PyObject *PythonWorkbenchPy::getCustomAttributes(const char* ) const { return 0; } -int PythonWorkbenchPy::setCustomAttributes(const char* attr, PyObject *obj) +int PythonWorkbenchPy::setCustomAttributes(const char* , PyObject *) { return 0; } diff --git a/src/Gui/QSint/actionpanel/actiongroup.cpp b/src/Gui/QSint/actionpanel/actiongroup.cpp index d09647ff92..7864f224a9 100644 --- a/src/Gui/QSint/actionpanel/actiongroup.cpp +++ b/src/Gui/QSint/actionpanel/actiongroup.cpp @@ -187,6 +187,7 @@ void ActionGroup::processShow() void ActionGroup::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); if (myDummy->isVisible()) { diff --git a/src/Gui/QSint/actionpanel/actionpanel.cpp b/src/Gui/QSint/actionpanel/actionpanel.cpp index c34cae066d..76a3dd8083 100644 --- a/src/Gui/QSint/actionpanel/actionpanel.cpp +++ b/src/Gui/QSint/actionpanel/actionpanel.cpp @@ -72,6 +72,7 @@ void ActionPanel::removeWidget(QWidget *w) void ActionPanel::addStretch(int s) { + Q_UNUSED(s); //((QVBoxLayout*)layout())->addStretch(s); if (!mySpacer) { mySpacer = new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Expanding); diff --git a/src/Gui/Quarter/EventFilter.cpp b/src/Gui/Quarter/EventFilter.cpp index 6bd9bf94d9..1bf82a9ce9 100644 --- a/src/Gui/Quarter/EventFilter.cpp +++ b/src/Gui/Quarter/EventFilter.cpp @@ -141,6 +141,7 @@ EventFilter::unregisterInputDevice(InputDevice * device) bool EventFilter::eventFilter(QObject * obj, QEvent * qevent) { + Q_UNUSED(obj); // make sure every device has updated screen size and mouse position // before translating events switch (qevent->type()) { diff --git a/src/Gui/Quarter/InteractionMode.cpp b/src/Gui/Quarter/InteractionMode.cpp index 6f9a3be69f..d9a0375bcd 100644 --- a/src/Gui/Quarter/InteractionMode.cpp +++ b/src/Gui/Quarter/InteractionMode.cpp @@ -122,6 +122,7 @@ InteractionMode::keyReleaseEvent(QKeyEvent * event) bool InteractionMode::focusOutEvent(QFocusEvent * event) { + Q_UNUSED(event); if (this->altkeydown) { QKeyEvent keyevent(QEvent::KeyRelease, Qt::Key_Alt, Qt::NoModifier); return QCoreApplication::sendEvent(this->quarterwidget, &keyevent); diff --git a/src/Gui/Quarter/QuarterWidget.cpp b/src/Gui/Quarter/QuarterWidget.cpp index 626b6b97d1..6e7a367134 100644 --- a/src/Gui/Quarter/QuarterWidget.cpp +++ b/src/Gui/Quarter/QuarterWidget.cpp @@ -145,6 +145,7 @@ public: QuarterWidget::QuarterWidget(const QGLFormat & format, QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f) : inherited(parent) { + Q_UNUSED(f); this->constructor(format, sharewidget); } @@ -152,6 +153,7 @@ QuarterWidget::QuarterWidget(const QGLFormat & format, QWidget * parent, const Q QuarterWidget::QuarterWidget(QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f) : inherited(parent) { + Q_UNUSED(f); this->constructor(QGLFormat(), sharewidget); } @@ -159,6 +161,7 @@ QuarterWidget::QuarterWidget(QWidget * parent, const QGLWidget * sharewidget, Qt QuarterWidget::QuarterWidget(QGLContext * context, QWidget * parent, const QGLWidget * sharewidget, Qt::WindowFlags f) : inherited(parent) { + Q_UNUSED(f); this->constructor(context->format(), sharewidget); } diff --git a/src/Gui/Quarter/QuarterWidgetP.cpp b/src/Gui/Quarter/QuarterWidgetP.cpp index af05bdac03..9d0d5d5b93 100644 --- a/src/Gui/Quarter/QuarterWidgetP.cpp +++ b/src/Gui/Quarter/QuarterWidgetP.cpp @@ -194,6 +194,7 @@ QuarterWidgetP::rendercb(void * userdata, SoRenderManager *) void QuarterWidgetP::prerendercb(void * userdata, SoRenderManager * manager) { + Q_UNUSED(manager); QuarterWidgetP * thisp = static_cast(userdata); SoEventManager * evman = thisp->soeventmanager; assert(evman); @@ -206,6 +207,7 @@ QuarterWidgetP::prerendercb(void * userdata, SoRenderManager * manager) void QuarterWidgetP::postrendercb(void * userdata, SoRenderManager * manager) { + Q_UNUSED(manager); QuarterWidgetP * thisp = static_cast(userdata); SoEventManager * evman = thisp->soeventmanager; assert(evman); @@ -218,6 +220,7 @@ QuarterWidgetP::postrendercb(void * userdata, SoRenderManager * manager) void QuarterWidgetP::statechangecb(void * userdata, ScXMLStateMachine * statemachine, const char * stateid, SbBool enter, SbBool) { + Q_UNUSED(statemachine); static const SbName contextmenurequest("contextmenurequest"); QuarterWidgetP * thisp = static_cast(userdata); assert(thisp && thisp->master); @@ -325,6 +328,9 @@ QuarterWidgetP::nativeEventFilter(void * message, long * result) qApp->postEvent(QApplication::focusWidget(), ne); return true; } +#else + Q_UNUSED(message); + Q_UNUSED(result); #endif // HAVE_SPACENAV_LIB return false; diff --git a/src/Gui/Quarter/SpaceNavigatorDevice.cpp b/src/Gui/Quarter/SpaceNavigatorDevice.cpp index 42292df5ef..cf49e80e85 100644 --- a/src/Gui/Quarter/SpaceNavigatorDevice.cpp +++ b/src/Gui/Quarter/SpaceNavigatorDevice.cpp @@ -111,6 +111,7 @@ SpaceNavigatorDevice::~SpaceNavigatorDevice() const SoEvent * SpaceNavigatorDevice::translateEvent(QEvent * event) { + Q_UNUSED(event); SoEvent * ret = NULL; #ifdef HAVE_SPACENAV_LIB diff --git a/src/Gui/SceneInspector.cpp b/src/Gui/SceneInspector.cpp index e36a91f736..64ae97a8ca 100644 --- a/src/Gui/SceneInspector.cpp +++ b/src/Gui/SceneInspector.cpp @@ -48,6 +48,7 @@ SceneModel::~SceneModel() int SceneModel::columnCount (const QModelIndex & parent) const { + Q_UNUSED(parent); return 2; } diff --git a/src/Gui/SelectionFilter.cpp b/src/Gui/SelectionFilter.cpp index 36138bd22e..ed68c193af 100644 --- a/src/Gui/SelectionFilter.cpp +++ b/src/Gui/SelectionFilter.cpp @@ -67,7 +67,7 @@ SelectionFilterGate::~SelectionFilterGate() delete Filter; } -bool SelectionFilterGate::allow(App::Document*pDoc,App::DocumentObject*pObj, const char*sSubName) +bool SelectionFilterGate::allow(App::Document* /*pDoc*/, App::DocumentObject*pObj, const char*sSubName) { return Filter->test(pObj,sSubName); } @@ -276,6 +276,8 @@ Py::Object SelectionFilterPy::repr() Py::Object SelectionFilterPy::match(const Py::Tuple& args) { + if (!PyArg_ParseTuple(args.ptr(), "")) + throw Py::Exception(); return Py::Boolean(filter.match()); } diff --git a/src/Gui/SelectionView.cpp b/src/Gui/SelectionView.cpp index a9c3b59035..976ee4c80b 100644 --- a/src/Gui/SelectionView.cpp +++ b/src/Gui/SelectionView.cpp @@ -96,6 +96,7 @@ SelectionView::~SelectionView() void SelectionView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); QString selObject; QTextStream str(&selObject); if (Reason.Type == SelectionChanges::AddSelection) { @@ -289,7 +290,7 @@ void SelectionView::onUpdate(void) { } -bool SelectionView::onMsg(const char* pMsg,const char** ppReturn) +bool SelectionView::onMsg(const char* /*pMsg*/,const char** /*ppReturn*/) { return false; } diff --git a/src/Gui/SoAxisCrossKit.cpp b/src/Gui/SoAxisCrossKit.cpp index 2c493e5dcc..0506214d87 100644 --- a/src/Gui/SoAxisCrossKit.cpp +++ b/src/Gui/SoAxisCrossKit.cpp @@ -159,7 +159,7 @@ SoAxisCrossKit::affectsState() const return false; } -void SoAxisCrossKit::addWriteReference(SoOutput * out, SbBool isfromfield) +void SoAxisCrossKit::addWriteReference(SoOutput * /*out*/, SbBool /*isfromfield*/) { // this node should not be written out to a file } @@ -321,7 +321,7 @@ void SoRegPoint::GLRender(SoGLRenderAction *action) } } -void SoRegPoint::generatePrimitives(SoAction* action) +void SoRegPoint::generatePrimitives(SoAction* /*action*/) { } diff --git a/src/Gui/SoFCBackgroundGradient.cpp b/src/Gui/SoFCBackgroundGradient.cpp index da1080daee..d4e7beec21 100644 --- a/src/Gui/SoFCBackgroundGradient.cpp +++ b/src/Gui/SoFCBackgroundGradient.cpp @@ -58,7 +58,7 @@ void SoFCBackgroundGradient::initClass(void) SO_NODE_INIT_CLASS(SoFCBackgroundGradient,SoNode,"Node"); } -void SoFCBackgroundGradient::GLRender (SoGLRenderAction *action) +void SoFCBackgroundGradient::GLRender (SoGLRenderAction * /*action*/) { glMatrixMode(GL_PROJECTION); glPushMatrix(); diff --git a/src/Gui/SoFCBoundingBox.cpp b/src/Gui/SoFCBoundingBox.cpp index c67b96d8e6..728ff9b46f 100644 --- a/src/Gui/SoFCBoundingBox.cpp +++ b/src/Gui/SoFCBoundingBox.cpp @@ -218,11 +218,11 @@ void SoFCBoundingBox::GLRender (SoGLRenderAction *action) state->pop(); } -void SoFCBoundingBox::generatePrimitives (SoAction *action) +void SoFCBoundingBox::generatePrimitives (SoAction */*action*/) { } -void SoFCBoundingBox::computeBBox (SoAction *action, SbBox3f &box, SbVec3f ¢er) +void SoFCBoundingBox::computeBBox (SoAction */*action*/, SbBox3f &box, SbVec3f ¢er) { center = (minBounds.getValue() + maxBounds.getValue()) / 2.0f; box.setBounds(minBounds.getValue(), maxBounds.getValue()); diff --git a/src/Gui/SoFCColorBar.cpp b/src/Gui/SoFCColorBar.cpp index 6a02927bf9..82c4f55e37 100644 --- a/src/Gui/SoFCColorBar.cpp +++ b/src/Gui/SoFCColorBar.cpp @@ -206,7 +206,7 @@ App::Color SoFCColorBar::getColor( float fVal ) const return this->getActiveBar()->getColor( fVal ); } -void SoFCColorBar::eventCallback(void * userdata, SoEventCallback * node) +void SoFCColorBar::eventCallback(void * /*userdata*/, SoEventCallback * node) { const SoEvent * event = node->getEvent(); if (event->getTypeId().isDerivedFrom(SoMouseButtonEvent::getClassTypeId())) { diff --git a/src/Gui/SoFCColorLegend.h b/src/Gui/SoFCColorLegend.h index 45070f7c25..cfcb2db5dd 100644 --- a/src/Gui/SoFCColorLegend.h +++ b/src/Gui/SoFCColorLegend.h @@ -60,7 +60,7 @@ public: unsigned short getColorIndex (float fVal) const { return _cColRamp.getColorIndex(fVal); } App::Color getColor (float fVal) const { return _cColRamp.getColor(fVal); } void setOutsideGrayed (bool bVal) { _cColRamp.setOutsideGrayed(bVal); } - bool isVisible (float fVal) const { return false; } + bool isVisible (float) const { return false; } float getMinValue (void) const { return _cColRamp.getMinValue(); } float getMaxValue (void) const { return _cColRamp.getMaxValue(); } unsigned long countColors (void) const { return _cColRamp.getCountColors(); } diff --git a/src/Gui/SoFCInteractiveElement.cpp b/src/Gui/SoFCInteractiveElement.cpp index 5e414fb577..3777eec160 100644 --- a/src/Gui/SoFCInteractiveElement.cpp +++ b/src/Gui/SoFCInteractiveElement.cpp @@ -35,7 +35,7 @@ void SoFCInteractiveElement::initClass(void) SO_ENABLE(SoGLRenderAction, SoFCInteractiveElement); } -void SoFCInteractiveElement::init(SoState * state) +void SoFCInteractiveElement::init(SoState * /*state*/) { this->interactiveMode = false; } @@ -100,26 +100,26 @@ void SoGLWidgetElement::get(SoState * state, QGLWidget *& window) (SoElement::getConstElement(state, classStackIndex)); window = that->window; } - -void SoGLWidgetElement::push(SoState * state) -{ - inherited::push(state); -} - -void SoGLWidgetElement::pop(SoState * state, const SoElement * prevTopElement) -{ - inherited::pop(state, prevTopElement); -} - -SbBool SoGLWidgetElement::matches(const SoElement * element) const -{ + +void SoGLWidgetElement::push(SoState * state) +{ + inherited::push(state); +} + +void SoGLWidgetElement::pop(SoState * state, const SoElement * prevTopElement) +{ + inherited::pop(state, prevTopElement); +} + +SbBool SoGLWidgetElement::matches(const SoElement * /*element*/) const +{ return true; -} - -SoElement * SoGLWidgetElement::copyMatchInfo(void) const -{ - return 0; -} +} + +SoElement * SoGLWidgetElement::copyMatchInfo(void) const +{ + return 0; +} // --------------------------------- @@ -155,62 +155,62 @@ void SoGLRenderActionElement::get(SoState * state, SoGLRenderAction * & action) (SoElement::getConstElement(state, classStackIndex)); action = that->glRenderAction; } - -void SoGLRenderActionElement::push(SoState * state) -{ - inherited::push(state); -} - -void SoGLRenderActionElement::pop(SoState * state, const SoElement * prevTopElement) -{ - inherited::pop(state, prevTopElement); -} - -SbBool SoGLRenderActionElement::matches(const SoElement * element) const -{ + +void SoGLRenderActionElement::push(SoState * state) +{ + inherited::push(state); +} + +void SoGLRenderActionElement::pop(SoState * state, const SoElement * prevTopElement) +{ + inherited::pop(state, prevTopElement); +} + +SbBool SoGLRenderActionElement::matches(const SoElement * /*element*/) const +{ return true; -} - -SoElement * SoGLRenderActionElement::copyMatchInfo(void) const -{ - return 0; -} +} + +SoElement * SoGLRenderActionElement::copyMatchInfo(void) const +{ + return 0; +} // --------------------------------- - -SO_NODE_SOURCE(SoGLWidgetNode); - -/*! - Constructor. -*/ -SoGLWidgetNode::SoGLWidgetNode(void) : window(0) -{ - SO_NODE_CONSTRUCTOR(SoGLWidgetNode); -} - -/*! - Destructor. -*/ -SoGLWidgetNode::~SoGLWidgetNode() -{ -} - -// Doc from superclass. -void SoGLWidgetNode::initClass(void) -{ - SO_NODE_INIT_CLASS(SoGLWidgetNode, SoNode, "Node"); - - SO_ENABLE(SoGLRenderAction, SoGLWidgetElement); -} - -// Doc from superclass. -void SoGLWidgetNode::doAction(SoAction * action) -{ - SoGLWidgetElement::set(action->getState(), this->window); -} - -// Doc from superclass. -void SoGLWidgetNode::GLRender(SoGLRenderAction * action) -{ - SoGLWidgetNode::doAction(action); -} + +SO_NODE_SOURCE(SoGLWidgetNode); + +/*! + Constructor. +*/ +SoGLWidgetNode::SoGLWidgetNode(void) : window(0) +{ + SO_NODE_CONSTRUCTOR(SoGLWidgetNode); +} + +/*! + Destructor. +*/ +SoGLWidgetNode::~SoGLWidgetNode() +{ +} + +// Doc from superclass. +void SoGLWidgetNode::initClass(void) +{ + SO_NODE_INIT_CLASS(SoGLWidgetNode, SoNode, "Node"); + + SO_ENABLE(SoGLRenderAction, SoGLWidgetElement); +} + +// Doc from superclass. +void SoGLWidgetNode::doAction(SoAction * action) +{ + SoGLWidgetElement::set(action->getState(), this->window); +} + +// Doc from superclass. +void SoGLWidgetNode::GLRender(SoGLRenderAction * action) +{ + SoGLWidgetNode::doAction(action); +} diff --git a/src/Gui/SoFCOffscreenRenderer.cpp b/src/Gui/SoFCOffscreenRenderer.cpp index 687e496b9f..14aaeb9abe 100644 --- a/src/Gui/SoFCOffscreenRenderer.cpp +++ b/src/Gui/SoFCOffscreenRenderer.cpp @@ -532,7 +532,7 @@ SoQtOffscreenRenderer::getPbufferEnable(void) const // ************************************************************************* void -SoQtOffscreenRenderer::pre_render_cb(void * userdata, SoGLRenderAction * action) +SoQtOffscreenRenderer::pre_render_cb(void * /*userdata*/, SoGLRenderAction * action) { glClear(GL_DEPTH_BUFFER_BIT|GL_COLOR_BUFFER_BIT); action->setRenderingIsRemote(false); diff --git a/src/Gui/SoFCSelection.cpp b/src/Gui/SoFCSelection.cpp index 6c83b1ae36..c47ac9b8ee 100644 --- a/src/Gui/SoFCSelection.cpp +++ b/src/Gui/SoFCSelection.cpp @@ -748,6 +748,8 @@ SoFCSelection::preRender(SoGLRenderAction *action, GLint &oldDepthFunc) void SoFCSelection::redrawHighlighted(SoAction * action , SbBool doHighlight ) { + Q_UNUSED(action); + Q_UNUSED(doHighlight); //Base::Console().Log("SoFCSelection::redrawHighlighted() (%p) doHigh=%d \n",this,doHighlight?1:0); #ifdef NO_FRONTBUFFER diff --git a/src/Gui/SoFCVectorizeSVGAction.cpp b/src/Gui/SoFCVectorizeSVGAction.cpp index 98f31ffe88..7ba0551da2 100644 --- a/src/Gui/SoFCVectorizeSVGAction.cpp +++ b/src/Gui/SoFCVectorizeSVGAction.cpp @@ -29,6 +29,7 @@ #include #include +#include #include #include "SoFCVectorizeSVGAction.h" @@ -306,11 +307,17 @@ void SoFCVectorizeSVGActionP::printTriangle(const SbVec3f * v, const SbColor * c void SoFCVectorizeSVGActionP::printCircle(const SbVec3f & v, const SbColor & c, const float radius) const { // todo + Q_UNUSED(v); + Q_UNUSED(c); + Q_UNUSED(radius); } void SoFCVectorizeSVGActionP::printSquare(const SbVec3f & v, const SbColor & c, const float size) const { // todo + Q_UNUSED(v); + Q_UNUSED(c); + Q_UNUSED(size); } void SoFCVectorizeSVGActionP::printLine(const SoVectorizeLine * item) const @@ -344,11 +351,13 @@ void SoFCVectorizeSVGActionP::printLine(const SoVectorizeLine * item) const void SoFCVectorizeSVGActionP::printPoint(const SoVectorizePoint * item) const { // todo + Q_UNUSED(item); } void SoFCVectorizeSVGActionP::printImage(const SoVectorizeImage * item) const { // todo + Q_UNUSED(item); } // ------------------------------------------------------- diff --git a/src/Gui/SoFCVectorizeU3DAction.cpp b/src/Gui/SoFCVectorizeU3DAction.cpp index bd6ed08ce7..c46050f909 100644 --- a/src/Gui/SoFCVectorizeU3DAction.cpp +++ b/src/Gui/SoFCVectorizeU3DAction.cpp @@ -23,6 +23,7 @@ #include "PreCompiled.h" #ifndef _PreComp_ +# include # include # include #endif @@ -195,6 +196,7 @@ void SoFCVectorizeU3DActionP::printText(const SoVectorizeText * item) const //std::ostream& str = publ->getU3DOutput()->getFileStream(); // todo + Q_UNUSED(item); } void SoFCVectorizeU3DActionP::printTriangle(const SoVectorizeTriangle * item) const @@ -224,16 +226,23 @@ void SoFCVectorizeU3DActionP::printTriangle(const SbVec3f * v, const SbColor * c //std::ostream& str = publ->getU3DOutput()->getFileStream(); // todo + Q_UNUSED(c); } void SoFCVectorizeU3DActionP::printCircle(const SbVec3f & v, const SbColor & c, const float radius) const { // todo + Q_UNUSED(v); + Q_UNUSED(c); + Q_UNUSED(radius); } void SoFCVectorizeU3DActionP::printSquare(const SbVec3f & v, const SbColor & c, const float size) const { // todo + Q_UNUSED(v); + Q_UNUSED(c); + Q_UNUSED(size); } void SoFCVectorizeU3DActionP::printLine(const SoVectorizeLine * item) const @@ -257,16 +266,19 @@ void SoFCVectorizeU3DActionP::printLine(const SoVectorizeLine * item) const //std::ostream& str = publ->getU3DOutput()->getFileStream(); // todo + Q_UNUSED(item); } void SoFCVectorizeU3DActionP::printPoint(const SoVectorizePoint * item) const { // todo + Q_UNUSED(item); } void SoFCVectorizeU3DActionP::printImage(const SoVectorizeImage * item) const { // todo + Q_UNUSED(item); } // ------------------------------------------------------- @@ -300,6 +312,8 @@ SoFCVectorizeU3DAction::getU3DOutput(void) const void SoFCVectorizeU3DAction::actionMethod(SoAction * a, SoNode * n) { + Q_UNUSED(a); + Q_UNUSED(n); } void SoFCVectorizeU3DAction::beginTraversal(SoNode * node) diff --git a/src/Gui/SoTouchEvents.cpp b/src/Gui/SoTouchEvents.cpp index 96e4ca02d6..25bd2b0b85 100644 --- a/src/Gui/SoTouchEvents.cpp +++ b/src/Gui/SoTouchEvents.cpp @@ -42,6 +42,7 @@ SO_EVENT_SOURCE(SoGesturePanEvent); SoGesturePanEvent::SoGesturePanEvent(QPanGesture* qpan, QWidget *widget) { + Q_UNUSED(widget); totalOffset = SbVec2f(qpan->offset().x(), -qpan->offset().y()); deltaOffset = SbVec2f(qpan->delta().x(), -qpan->delta().y()); state = SbGestureState(qpan->state()); @@ -107,6 +108,7 @@ SO_EVENT_SOURCE(SoGestureSwipeEvent); SoGestureSwipeEvent::SoGestureSwipeEvent(QSwipeGesture *qwsipe, QWidget *widget) { + Q_UNUSED(widget); angle = qwsipe->swipeAngle(); switch (qwsipe->verticalDirection()){ case QSwipeGesture::Up : diff --git a/src/Gui/Splashscreen.cpp b/src/Gui/Splashscreen.cpp index 6991057cf5..56c52f3c12 100644 --- a/src/Gui/Splashscreen.cpp +++ b/src/Gui/Splashscreen.cpp @@ -54,7 +54,7 @@ namespace Gui { class SplashObserver : public Base::ConsoleObserver { public: - SplashObserver(QSplashScreen* splasher=0, const char* name=0) + SplashObserver(QSplashScreen* splasher=0) : splash(splasher), alignment(Qt::AlignBottom|Qt::AlignLeft), textColor(Qt::black) { Base::Console().AttachObserver(this); @@ -219,6 +219,8 @@ void AboutDialogFactory::setDefaultFactory(AboutDialogFactory *f) AboutDialog::AboutDialog(bool showLic, QWidget* parent) : QDialog(parent, Qt::FramelessWindowHint), ui(new Ui_AboutApplication) { + Q_UNUSED(showLic); + setModal(true); ui->setupUi(this); ui->labelSplashPicture->setPixmap(getMainWindow()->splashImage()); diff --git a/src/Gui/SplitView3DInventor.cpp b/src/Gui/SplitView3DInventor.cpp index ec5350f07f..597389ed5d 100644 --- a/src/Gui/SplitView3DInventor.cpp +++ b/src/Gui/SplitView3DInventor.cpp @@ -268,7 +268,7 @@ const char *AbstractSplitView::getName(void) const return "SplitView3DInventor"; } -bool AbstractSplitView::onMsg(const char* pMsg, const char** ppReturn) +bool AbstractSplitView::onMsg(const char* pMsg, const char**) { if (strcmp("ViewFit",pMsg) == 0 ) { for (std::vector::iterator it = _viewer.begin(); it != _viewer.end(); ++it) @@ -369,6 +369,7 @@ bool AbstractSplitView::onHasMsg(const char* pMsg) const void AbstractSplitView::setOverrideCursor(const QCursor& aCursor) { + Q_UNUSED(aCursor); //_viewer->getWidget()->setCursor(aCursor); } diff --git a/src/Gui/SyntaxHighlighter.cpp b/src/Gui/SyntaxHighlighter.cpp index a6f5a56f8a..9d12741bed 100644 --- a/src/Gui/SyntaxHighlighter.cpp +++ b/src/Gui/SyntaxHighlighter.cpp @@ -157,6 +157,8 @@ QColor SyntaxHighlighter::colorByType(SyntaxHighlighter::TColor type) void SyntaxHighlighter::colorChanged(const QString& type, const QColor& col) { + Q_UNUSED(type); + Q_UNUSED(col); // rehighlight #if QT_VERSION >= 0x040200 rehighlight(); diff --git a/src/Gui/TaskView/TaskAppearance.cpp b/src/Gui/TaskView/TaskAppearance.cpp index 868e062a6a..976f707132 100644 --- a/src/Gui/TaskView/TaskAppearance.cpp +++ b/src/Gui/TaskView/TaskAppearance.cpp @@ -79,6 +79,7 @@ void TaskAppearance::changeEvent(QEvent *e) void TaskAppearance::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); if (Reason.Type == SelectionChanges::AddSelection || Reason.Type == SelectionChanges::RmvSelection || Reason.Type == SelectionChanges::SetSelection || @@ -199,53 +200,53 @@ void TaskAppearance::on_spinLineWidth_valueChanged(int linewidth) void TaskAppearance::setDisplayModes(const std::vector& views) { - QStringList commonModes, modes; - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - App::Property* prop = (*it)->getPropertyByName("DisplayMode"); + QStringList commonModes, modes; + for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { + App::Property* prop = (*it)->getPropertyByName("DisplayMode"); if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) { - App::PropertyEnumeration* display = static_cast(prop); - if (!display->getEnums()) return; - const std::vector& value = display->getEnumVector(); - if (it == views.begin()) { - for (std::vector::const_iterator jt = value.begin(); jt != value.end(); ++jt) - commonModes << QLatin1String(jt->c_str()); - } - else { - for (std::vector::const_iterator jt = value.begin(); jt != value.end(); ++jt) { - if (commonModes.contains(QLatin1String(jt->c_str()))) - modes << QLatin1String(jt->c_str()); - } - - commonModes = modes; - modes.clear(); - } - } - } - - ui->changeMode->clear(); - ui->changeMode->addItems(commonModes); - ui->changeMode->setDisabled(commonModes.isEmpty()); - - // find the display mode to activate - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - App::Property* prop = (*it)->getPropertyByName("DisplayMode"); + App::PropertyEnumeration* display = static_cast(prop); + if (!display->getEnums()) return; + const std::vector& value = display->getEnumVector(); + if (it == views.begin()) { + for (std::vector::const_iterator jt = value.begin(); jt != value.end(); ++jt) + commonModes << QLatin1String(jt->c_str()); + } + else { + for (std::vector::const_iterator jt = value.begin(); jt != value.end(); ++jt) { + if (commonModes.contains(QLatin1String(jt->c_str()))) + modes << QLatin1String(jt->c_str()); + } + + commonModes = modes; + modes.clear(); + } + } + } + + ui->changeMode->clear(); + ui->changeMode->addItems(commonModes); + ui->changeMode->setDisabled(commonModes.isEmpty()); + + // find the display mode to activate + for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { + App::Property* prop = (*it)->getPropertyByName("DisplayMode"); if (prop && prop->getTypeId() == App::PropertyEnumeration::getClassTypeId()) { - App::PropertyEnumeration* display = static_cast(prop); + App::PropertyEnumeration* display = static_cast(prop); QString activeMode = QString::fromLatin1(display->getValueAsString()); - int index = ui->changeMode->findText(activeMode); - if (index != -1) { - ui->changeMode->setCurrentIndex(index); - break; - } - } - } + int index = ui->changeMode->findText(activeMode); + if (index != -1) { + ui->changeMode->setCurrentIndex(index); + break; + } + } + } } void TaskAppearance::setPointSize(const std::vector& views) { bool pointSize = false; - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - App::Property* prop = (*it)->getPropertyByName("PointSize"); + for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { + App::Property* prop = (*it)->getPropertyByName("PointSize"); if (prop && prop->getTypeId().isDerivedFrom(App::PropertyFloat::getClassTypeId())) { bool blocked = ui->spinPointSize->blockSignals(true); ui->spinPointSize->setValue((int)static_cast(prop)->getValue()); @@ -253,16 +254,16 @@ void TaskAppearance::setPointSize(const std::vector& views) pointSize = true; break; } - } - - ui->spinPointSize->setEnabled(pointSize); + } + + ui->spinPointSize->setEnabled(pointSize); } void TaskAppearance::setLineWidth(const std::vector& views) { bool lineWidth = false; - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - App::Property* prop = (*it)->getPropertyByName("LineWidth"); + for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { + App::Property* prop = (*it)->getPropertyByName("LineWidth"); if (prop && prop->getTypeId().isDerivedFrom(App::PropertyFloat::getClassTypeId())) { bool blocked = ui->spinLineWidth->blockSignals(true); ui->spinLineWidth->setValue((int)static_cast(prop)->getValue()); @@ -270,16 +271,16 @@ void TaskAppearance::setLineWidth(const std::vector& views) lineWidth = true; break; } - } - - ui->spinLineWidth->setEnabled(lineWidth); + } + + ui->spinLineWidth->setEnabled(lineWidth); } void TaskAppearance::setTransparency(const std::vector& views) { bool transparency = false; - for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { - App::Property* prop = (*it)->getPropertyByName("Transparency"); + for (std::vector::const_iterator it = views.begin(); it != views.end(); ++it) { + App::Property* prop = (*it)->getPropertyByName("Transparency"); if (prop && prop->getTypeId().isDerivedFrom(App::PropertyInteger::getClassTypeId())) { bool blocked = ui->spinTransparency->blockSignals(true); ui->spinTransparency->setValue(static_cast(prop)->getValue()); @@ -287,10 +288,10 @@ void TaskAppearance::setTransparency(const std::vector& view transparency = true; break; } - } - - ui->spinTransparency->setEnabled(transparency); - ui->horizontalSlider->setEnabled(transparency); + } + + ui->spinTransparency->setEnabled(transparency); + ui->horizontalSlider->setEnabled(transparency); } std::vector TaskAppearance::getSelection() const diff --git a/src/Gui/TaskView/TaskDialogPython.cpp b/src/Gui/TaskView/TaskDialogPython.cpp index 110d9dbd8e..72a3fdeeba 100644 --- a/src/Gui/TaskView/TaskDialogPython.cpp +++ b/src/Gui/TaskView/TaskDialogPython.cpp @@ -98,7 +98,7 @@ Py::Object ControlPy::showDialog(const Py::Tuple& args) return Py::None(); } -Py::Object ControlPy::activeDialog(const Py::Tuple& args) +Py::Object ControlPy::activeDialog(const Py::Tuple&) { Gui::TaskView::TaskDialog* dlg = Gui::Control().activeDialog(); return Py::Boolean(dlg!=0); diff --git a/src/Gui/TaskView/TaskSelectLinkProperty.cpp b/src/Gui/TaskView/TaskSelectLinkProperty.cpp index 1de2d7178f..62722df247 100644 --- a/src/Gui/TaskView/TaskSelectLinkProperty.cpp +++ b/src/Gui/TaskView/TaskSelectLinkProperty.cpp @@ -207,6 +207,7 @@ void TaskSelectLinkProperty::checkSelectionStatus(void) void TaskSelectLinkProperty::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); if (Reason.Type == SelectionChanges::AddSelection || Reason.Type == SelectionChanges::RmvSelection || Reason.Type == SelectionChanges::SetSelection || diff --git a/src/Gui/TaskView/TaskView.cpp b/src/Gui/TaskView/TaskView.cpp index 64c71a3760..b3bfd3f411 100644 --- a/src/Gui/TaskView/TaskView.cpp +++ b/src/Gui/TaskView/TaskView.cpp @@ -468,6 +468,7 @@ void TaskView::keyPressEvent(QKeyEvent* ke) void TaskView::slotActiveDocument(const App::Document& doc) { + Q_UNUSED(doc); if (!ActiveDialog) updateWatcher(); } @@ -494,6 +495,7 @@ void TaskView::slotRedoDocument(const App::Document&) void TaskView::OnChange(Gui::SelectionSingleton::SubjectType &rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); std::string temp; if (Reason.Type == SelectionChanges::AddSelection || diff --git a/src/Gui/TextEdit.cpp b/src/Gui/TextEdit.cpp index c536d66e49..b3f19b0e6d 100644 --- a/src/Gui/TextEdit.cpp +++ b/src/Gui/TextEdit.cpp @@ -289,6 +289,10 @@ void TextEditor::highlightCurrentLine() void TextEditor::drawMarker(int line, int x, int y, QPainter* p) { + Q_UNUSED(line); + Q_UNUSED(x); + Q_UNUSED(y); + Q_UNUSED(p); } void TextEditor::lineNumberAreaPaintEvent(QPaintEvent *event) @@ -414,6 +418,7 @@ void TextEditor::keyPressEvent (QKeyEvent * e) /** Sets the font, font size and tab size of the editor. */ void TextEditor::OnChange(Base::Subject &rCaller,const char* sReason) { + Q_UNUSED(rCaller); ParameterGrp::handle hPrefGrp = getWindowParameter(); if (strcmp(sReason, "FontSize") == 0 || strcmp(sReason, "Font") == 0) { #ifdef FC_OS_LINUX diff --git a/src/Gui/Thumbnail.cpp b/src/Gui/Thumbnail.cpp index 1172505664..9f7bb17760 100644 --- a/src/Gui/Thumbnail.cpp +++ b/src/Gui/Thumbnail.cpp @@ -79,6 +79,7 @@ void Thumbnail::Save (Base::Writer &writer) const void Thumbnail::Restore(Base::XMLReader &reader) { + Q_UNUSED(reader); //reader.addFile("Thumbnail.png",this); } @@ -124,6 +125,7 @@ void Thumbnail::SaveDocFile (Base::Writer &writer) const void Thumbnail::RestoreDocFile(Base::Reader &reader) { + Q_UNUSED(reader); } void Thumbnail::createThumbnailFromFramebuffer(QImage& img) const diff --git a/src/Gui/TransactionObject.cpp b/src/Gui/TransactionObject.cpp index 380d782020..4f8a6073be 100644 --- a/src/Gui/TransactionObject.cpp +++ b/src/Gui/TransactionObject.cpp @@ -58,4 +58,6 @@ void TransactionViewProvider::applyNew(App::Document& Doc, App::TransactionalObj void TransactionViewProvider::applyDel(App::Document& Doc, App::TransactionalObject* pcObj) { // nothing to do here + Q_UNUSED(Doc); + Q_UNUSED(pcObj); } diff --git a/src/Gui/Tree.cpp b/src/Gui/Tree.cpp index b02007342d..98f5669376 100644 --- a/src/Gui/Tree.cpp +++ b/src/Gui/Tree.cpp @@ -626,6 +626,7 @@ void TreeWidget::slotDeleteDocument(const Gui::Document& Doc) void TreeWidget::slotRenameDocument(const Gui::Document& Doc) { // do nothing here + Q_UNUSED(Doc); } void TreeWidget::slotRelabelDocument(const Gui::Document& Doc) @@ -1054,6 +1055,7 @@ void DocumentItem::slotChangeObject(const Gui::ViewProviderDocumentObject& view) void DocumentItem::slotRenameObject(const Gui::ViewProviderDocumentObject& obj) { // Do nothing here because the Label is set in slotChangeObject + Q_UNUSED(obj); } void DocumentItem::slotActiveObject(const Gui::ViewProviderDocumentObject& obj) @@ -1184,6 +1186,7 @@ void DocumentItem::setData (int column, int role, const QVariant & value) void DocumentItem::setObjectHighlighted(const char* name, bool select) { + Q_UNUSED(select); std::map::iterator pos; pos = ObjectMap.find(name); if (pos != ObjectMap.end()) { diff --git a/src/Gui/View3DInventor.cpp b/src/Gui/View3DInventor.cpp index 2d4f54c8aa..0c29a3503d 100644 --- a/src/Gui/View3DInventor.cpp +++ b/src/Gui/View3DInventor.cpp @@ -93,7 +93,7 @@ using namespace Gui; -void GLOverlayWidget::paintEvent(QPaintEvent* ev) +void GLOverlayWidget::paintEvent(QPaintEvent*) { QPainter paint(this); paint.drawImage(0,0,image); @@ -1034,7 +1034,7 @@ void View3DInventor::keyReleaseEvent (QKeyEvent* e) QMainWindow::keyReleaseEvent(e); } -void View3DInventor::focusInEvent (QFocusEvent * e) +void View3DInventor::focusInEvent (QFocusEvent *) { _viewer->getGLWidget()->setFocus(); } diff --git a/src/Gui/View3DInventorExamples.cpp b/src/Gui/View3DInventorExamples.cpp index 7343c31616..c31b30a682 100644 --- a/src/Gui/View3DInventorExamples.cpp +++ b/src/Gui/View3DInventorExamples.cpp @@ -196,7 +196,7 @@ void doClipping(SbVec3f trans, SbRotation rot) planeTVerts->finishEditing(); } -void draggerCB(void * data, SoDragger * dragger) +void draggerCB(void * /*data*/, SoDragger * dragger) { SoTransformerDragger * drag = (SoTransformerDragger *)dragger; doClipping(drag->translation.getValue(), drag->rotation.getValue()); diff --git a/src/Gui/View3DInventorViewer.cpp b/src/Gui/View3DInventorViewer.cpp index f2d6e30a43..a920ec656f 100644 --- a/src/Gui/View3DInventorViewer.cpp +++ b/src/Gui/View3DInventorViewer.cpp @@ -590,6 +590,7 @@ void View3DInventorViewer::initialize() void View3DInventorViewer::OnChange(Gui::SelectionSingleton::SubjectType& rCaller, Gui::SelectionSingleton::MessageType Reason) { + Q_UNUSED(rCaller); if (Reason.Type == SelectionChanges::AddSelection || Reason.Type == SelectionChanges::RmvSelection || Reason.Type == SelectionChanges::SetSelection || @@ -715,7 +716,7 @@ void View3DInventorViewer::updateOverrideMode(const std::string& mode) overrideMode = mode; } -void View3DInventorViewer::setViewportCB(void* userdata, SoAction* action) +void View3DInventorViewer::setViewportCB(void*, SoAction* action) { // Make sure to override the value set inside SoOffscreenRenderer::render() if (action->isOfType(SoGLRenderAction::getClassTypeId())) { @@ -726,7 +727,7 @@ void View3DInventorViewer::setViewportCB(void* userdata, SoAction* action) } } -void View3DInventorViewer::clearBufferCB(void* userdata, SoAction* action) +void View3DInventorViewer::clearBufferCB(void*, SoAction* action) { if (action->isOfType(SoGLRenderAction::getClassTypeId())) { // do stuff specific for GL rendering here. @@ -1188,7 +1189,7 @@ bool View3DInventorViewer::dumpToFile(SoNode* node, const char* filename, bool b /** * Sets the SoFCInteractiveElement to \a true. */ -void View3DInventorViewer::interactionStartCB(void* data, SoQTQuarterAdaptor* viewer) +void View3DInventorViewer::interactionStartCB(void*, SoQTQuarterAdaptor* viewer) { SoGLRenderAction* glra = viewer->getSoRenderManager()->getGLRenderAction(); SoFCInteractiveElement::set(glra->getState(), viewer->getSceneGraph(), true); @@ -1197,7 +1198,7 @@ void View3DInventorViewer::interactionStartCB(void* data, SoQTQuarterAdaptor* vi /** * Sets the SoFCInteractiveElement to \a false and forces a redraw. */ -void View3DInventorViewer::interactionFinishCB(void* data, SoQTQuarterAdaptor* viewer) +void View3DInventorViewer::interactionFinishCB(void*, SoQTQuarterAdaptor* viewer) { SoGLRenderAction* glra = viewer->getSoRenderManager()->getGLRenderAction(); SoFCInteractiveElement::set(glra->getState(), viewer->getSceneGraph(), false); @@ -1207,7 +1208,7 @@ void View3DInventorViewer::interactionFinishCB(void* data, SoQTQuarterAdaptor* v /** * Logs the type of the action that traverses the Inventor tree. */ -void View3DInventorViewer::interactionLoggerCB(void* ud, SoAction* action) +void View3DInventorViewer::interactionLoggerCB(void*, SoAction* action) { Base::Console().Log("%s\n", action->getTypeId().getName().getString()); } @@ -2268,7 +2269,7 @@ View3DInventorViewer::getFeedbackSize(void) const Decide whether or not the mouse pointer cursor should be visible in the rendering canvas. */ -void View3DInventorViewer::setCursorEnabled(SbBool enable) +void View3DInventorViewer::setCursorEnabled(SbBool /*enable*/) { this->setCursorRepresentation(navigation->getViewingMode()); } diff --git a/src/Gui/ViewProvider.cpp b/src/Gui/ViewProvider.cpp index 1f5138aaa3..8d3bca186b 100644 --- a/src/Gui/ViewProvider.cpp +++ b/src/Gui/ViewProvider.cpp @@ -123,15 +123,18 @@ void ViewProvider::finishEditing() bool ViewProvider::setEdit(int ModNum) { + Q_UNUSED(ModNum); return true; } void ViewProvider::unsetEdit(int ModNum) { + Q_UNUSED(ModNum); } void ViewProvider::setEditViewer(View3DInventorViewer*, int ModNum) { + Q_UNUSED(ModNum); } void ViewProvider::unsetEditViewer(View3DInventorViewer*) @@ -150,8 +153,7 @@ void ViewProvider::setUpdatesEnabled (bool enable) void highlight(const HighlightMode& high) { - - + Q_UNUSED(high); } void ViewProvider::eventCallback(void * ud, SoEventCallback * node) diff --git a/src/Gui/ViewProvider.h b/src/Gui/ViewProvider.h index 2327605e25..be1dcb28a9 100644 --- a/src/Gui/ViewProvider.h +++ b/src/Gui/ViewProvider.h @@ -129,16 +129,20 @@ public: virtual SoDetail* getDetail(const char*) const { return 0; } virtual std::vector getModelPoints(const SoPickedPoint *) const; /// return the higlight lines for a given element or the whole shape - virtual std::vector getSelectionShape(const char* Element) const - { return std::vector(); } + virtual std::vector getSelectionShape(const char* Element) const { + (void)Element; + return std::vector(); + } /** * Get called if the object is about to get deleted. * Here you can delete other objects, switch their visibility or prevent the deletion of the object. * @param subNames list of selected subelements * @return true if the deletion is approoved by the view provider. */ - virtual bool onDelete(const std::vector &subNames) - { return true;} + virtual bool onDelete(const std::vector &subNames) { + (void)subNames; + return true; + } //@} @@ -286,17 +290,29 @@ public: //@} /// is called when the provider is in edit and a key event occurs. Only ESC ends edit. - virtual bool keyPressed(bool pressed, int key) { return false; } + virtual bool keyPressed(bool pressed, int key) { + (void)pressed; + (void)key; + return false; + } /// is called by the tree if the user double click on the object virtual bool doubleClicked(void) { return false; } /// is called when the provider is in edit and the mouse is moved virtual bool mouseMove(const SbVec2s &cursorPos, - View3DInventorViewer* viewer) - { return false; } + View3DInventorViewer* viewer) { + (void)cursorPos; + (void)viewer; + return false; + } /// is called when the Provider is in edit and the mouse is clicked virtual bool mouseButtonPressed(int button, bool pressed, const SbVec2s &cursorPos, - const View3DInventorViewer* viewer) - { return false; } + const View3DInventorViewer* viewer) { + (void)button; + (void)pressed; + (void)cursorPos; + (void)viewer; + return false; + } /// set up the context-menu with the supported edit modes virtual void setupContextMenu(QMenu*, QObject*, const char*) {} diff --git a/src/Gui/ViewProviderAnnotation.cpp b/src/Gui/ViewProviderAnnotation.cpp index 0fb2802e46..681255d43d 100644 --- a/src/Gui/ViewProviderAnnotation.cpp +++ b/src/Gui/ViewProviderAnnotation.cpp @@ -388,13 +388,13 @@ void ViewProviderAnnotationLabel::setupContextMenu(QMenu* menu, QObject* receive menu->addAction(QObject::tr("Move annotation"), receiver, member); } -void ViewProviderAnnotationLabel::dragStartCallback(void *data, SoDragger *) +void ViewProviderAnnotationLabel::dragStartCallback(void *, SoDragger *) { // This is called when a manipulator is about to manipulating Gui::Application::Instance->activeDocument()->openCommand("Transform"); } -void ViewProviderAnnotationLabel::dragFinishCallback(void *data, SoDragger *) +void ViewProviderAnnotationLabel::dragFinishCallback(void *, SoDragger *) { // This is called when a manipulator has done manipulating Gui::Application::Instance->activeDocument()->commitCommand(); @@ -412,6 +412,7 @@ void ViewProviderAnnotationLabel::dragMotionCallback(void *data, SoDragger *drag bool ViewProviderAnnotationLabel::setEdit(int ModNum) { + Q_UNUSED(ModNum); SoSearchAction sa; sa.setInterest(SoSearchAction::FIRST); sa.setSearchingAll(false); @@ -432,6 +433,7 @@ bool ViewProviderAnnotationLabel::setEdit(int ModNum) void ViewProviderAnnotationLabel::unsetEdit(int ModNum) { + Q_UNUSED(ModNum); SoSearchAction sa; sa.setType(TranslateManip::getClassTypeId()); sa.setInterest(SoSearchAction::FIRST); diff --git a/src/Gui/ViewProviderDocumentObject.cpp b/src/Gui/ViewProviderDocumentObject.cpp index 74c16afe21..e9717f57c3 100644 --- a/src/Gui/ViewProviderDocumentObject.cpp +++ b/src/Gui/ViewProviderDocumentObject.cpp @@ -285,10 +285,25 @@ PyObject* ViewProviderDocumentObject::getPyObject() return pyViewObject; } -bool ViewProviderDocumentObject::allowDrop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos) +bool ViewProviderDocumentObject::allowDrop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos) { + Q_UNUSED(objList); + Q_UNUSED(keys); + Q_UNUSED(mouseBts); + Q_UNUSED(pos); return false; } -void ViewProviderDocumentObject::drop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos) + +void ViewProviderDocumentObject::drop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos) { + Q_UNUSED(objList); + Q_UNUSED(keys); + Q_UNUSED(mouseBts); + Q_UNUSED(pos); } diff --git a/src/Gui/ViewProviderDocumentObject.h b/src/Gui/ViewProviderDocumentObject.h index e6f5007c06..56e658f83a 100644 --- a/src/Gui/ViewProviderDocumentObject.h +++ b/src/Gui/ViewProviderDocumentObject.h @@ -96,9 +96,15 @@ public: /** @name drag & drop handling */ //@{ /// get called if the user hover over a object in the tree - virtual bool allowDrop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos); + virtual bool allowDrop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos); /// get called if the user drops some objects - virtual void drop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos); + virtual void drop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos); //@} protected: diff --git a/src/Gui/ViewProviderDocumentObjectGroup.cpp b/src/Gui/ViewProviderDocumentObjectGroup.cpp index b249169d5f..39787371f1 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.cpp +++ b/src/Gui/ViewProviderDocumentObjectGroup.cpp @@ -117,6 +117,8 @@ void ViewProviderDocumentObjectGroup::updateData(const App::Property* prop) } } } +#else + Q_UNUSED(prop); #endif } @@ -177,8 +179,15 @@ bool ViewProviderDocumentObjectGroup::onDelete(const std::vector &) return true; } -bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos) +bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos) { + Q_UNUSED(keys); + Q_UNUSED(mouseBts); + Q_UNUSED(pos); + for( std::vector::const_iterator it = objList.begin();it!=objList.end();++it) if ((*it)->getTypeId().isDerivedFrom(App::DocumentObjectGroup::getClassTypeId())) { if (static_cast(getObject())->isChildOf( @@ -189,40 +198,47 @@ bool ViewProviderDocumentObjectGroup::allowDrop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos) -{ - // Open command - App::DocumentObjectGroup* grp = static_cast(getObject()); - App::Document* doc = grp->getDocument(); - Gui::Document* gui = Gui::Application::Instance->getDocument(doc); - gui->openCommand("Move object"); - for( std::vector::const_iterator it = objList.begin();it!=objList.end();++it) { - // get document object - const App::DocumentObject* obj = *it; - const App::DocumentObjectGroup* par = App::DocumentObjectGroup::getGroupOfObject(obj); - if (par) { - // allow an object to be in one group only - QString cmd; - cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").removeObject(" - "App.getDocument(\"%1\").getObject(\"%3\"))") - .arg(QString::fromLatin1(doc->getName())) - .arg(QString::fromLatin1(par->getNameInDocument())) - .arg(QString::fromLatin1(obj->getNameInDocument())); - Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8()); - } - // build Python command for execution +void ViewProviderDocumentObjectGroup::drop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos) +{ + Q_UNUSED(keys); + Q_UNUSED(mouseBts); + Q_UNUSED(pos); + + // Open command + App::DocumentObjectGroup* grp = static_cast(getObject()); + App::Document* doc = grp->getDocument(); + Gui::Document* gui = Gui::Application::Instance->getDocument(doc); + gui->openCommand("Move object"); + for( std::vector::const_iterator it = objList.begin();it!=objList.end();++it) { + // get document object + const App::DocumentObject* obj = *it; + const App::DocumentObjectGroup* par = App::DocumentObjectGroup::getGroupOfObject(obj); + if (par) { + // allow an object to be in one group only QString cmd; - cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").addObject(" + cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").removeObject(" "App.getDocument(\"%1\").getObject(\"%3\"))") .arg(QString::fromLatin1(doc->getName())) - .arg(QString::fromLatin1(grp->getNameInDocument())) + .arg(QString::fromLatin1(par->getNameInDocument())) .arg(QString::fromLatin1(obj->getNameInDocument())); - Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8()); } - gui->commitCommand(); + // build Python command for execution + QString cmd; + cmd = QString::fromLatin1("App.getDocument(\"%1\").getObject(\"%2\").addObject(" + "App.getDocument(\"%1\").getObject(\"%3\"))") + .arg(QString::fromLatin1(doc->getName())) + .arg(QString::fromLatin1(grp->getNameInDocument())) + .arg(QString::fromLatin1(obj->getNameInDocument())); + + Gui::Command::runCommand(Gui::Command::App, cmd.toUtf8()); + } + gui->commitCommand(); } void ViewProviderDocumentObjectGroup::hide(void) diff --git a/src/Gui/ViewProviderDocumentObjectGroup.h b/src/Gui/ViewProviderDocumentObjectGroup.h index abbc5b3fbe..d9e8736f3d 100644 --- a/src/Gui/ViewProviderDocumentObjectGroup.h +++ b/src/Gui/ViewProviderDocumentObjectGroup.h @@ -59,9 +59,15 @@ public: virtual bool onDelete(const std::vector &); /// get called if the user hover over a object in the tree - virtual bool allowDrop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos); + virtual bool allowDrop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos); /// get called if the user drops some objects - virtual void drop(const std::vector &objList,Qt::KeyboardModifiers keys,Qt::MouseButtons mouseBts,const QPoint &pos); + virtual void drop(const std::vector &objList, + Qt::KeyboardModifiers keys, + Qt::MouseButtons mouseBts, + const QPoint &pos); protected: /// get called by the container whenever a property has been changed diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index 561e8f8b75..5eb17793a4 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -196,6 +196,8 @@ void ViewProviderGeometryObject::setupContextMenu(QMenu* menu, QObject* receiver bool ViewProviderGeometryObject::setEdit(int ModNum) { + Q_UNUSED(ModNum); + App::DocumentObject *genericObject = this->getObject(); if (genericObject->isDerivedFrom(App::GeoFeature::getClassTypeId())) { @@ -230,6 +232,8 @@ bool ViewProviderGeometryObject::setEdit(int ModNum) void ViewProviderGeometryObject::unsetEdit(int ModNum) { + Q_UNUSED(ModNum); + if(csysDragger) { pcTransform->translation.disconnect(&csysDragger->translation); @@ -243,6 +247,8 @@ void ViewProviderGeometryObject::unsetEdit(int ModNum) void ViewProviderGeometryObject::setEditViewer(Gui::View3DInventorViewer* viewer, int ModNum) { + Q_UNUSED(ModNum); + if (csysDragger && viewer) { SoPickStyle *rootPickStyle = new SoPickStyle(); @@ -259,7 +265,7 @@ void ViewProviderGeometryObject::unsetEditViewer(Gui::View3DInventorViewer* view static_cast(viewer->getSceneGraph())->removeChild(child); } -void ViewProviderGeometryObject::dragStartCallback(void *data, SoDragger *) +void ViewProviderGeometryObject::dragStartCallback(void *, SoDragger *) { // This is called when a manipulator is about to manipulating Gui::Application::Instance->activeDocument()->openCommand("Transform"); diff --git a/src/Gui/ViewProviderMeasureDistance.cpp b/src/Gui/ViewProviderMeasureDistance.cpp index d22dcfc51f..6f9d9c7a18 100644 --- a/src/Gui/ViewProviderMeasureDistance.cpp +++ b/src/Gui/ViewProviderMeasureDistance.cpp @@ -258,7 +258,7 @@ int PointMarker::countPoints() const return vp->pCoords->point.getNum(); } -void PointMarker::customEvent(QEvent* e) +void PointMarker::customEvent(QEvent*) { Gui::Document* doc = Gui::Application::Instance->activeDocument(); doc->openCommand("Measure distance"); diff --git a/src/Gui/ViewProviderPyImp.cpp b/src/Gui/ViewProviderPyImp.cpp index 0f00442dd0..f3ae09cc82 100644 --- a/src/Gui/ViewProviderPyImp.cpp +++ b/src/Gui/ViewProviderPyImp.cpp @@ -157,12 +157,12 @@ PyObject* ViewProviderPy::setTransformation(PyObject *args) return 0; } -PyObject *ViewProviderPy::getCustomAttributes(const char* attr) const +PyObject *ViewProviderPy::getCustomAttributes(const char*) const { return 0; } -int ViewProviderPy::setCustomAttributes(const char* attr, PyObject *obj) +int ViewProviderPy::setCustomAttributes(const char*, PyObject *) { return 0; } @@ -180,7 +180,7 @@ Py::Object ViewProviderPy::getAnnotation(void) const } } -void ViewProviderPy::setAnnotation(Py::Object arg) +void ViewProviderPy::setAnnotation(Py::Object) { } @@ -198,7 +198,7 @@ Py::Object ViewProviderPy::getRootNode(void) const } } -void ViewProviderPy::setRootNode(Py::Object arg) +void ViewProviderPy::setRootNode(Py::Object) { } diff --git a/src/Gui/ViewProviderPythonFeature.cpp b/src/Gui/ViewProviderPythonFeature.cpp index 5ca106e721..b910d0667d 100644 --- a/src/Gui/ViewProviderPythonFeature.cpp +++ b/src/Gui/ViewProviderPythonFeature.cpp @@ -407,7 +407,7 @@ SoDetail* ViewProviderPythonFeatureImp::getDetail(const char* name) const return 0; } -std::vector ViewProviderPythonFeatureImp::getSelectionShape(const char* Element) const +std::vector ViewProviderPythonFeatureImp::getSelectionShape(const char* /*Element*/) const { return std::vector(); } diff --git a/src/Gui/WhatsThis.cpp b/src/Gui/WhatsThis.cpp index d85aea5945..4f6b38e66d 100644 --- a/src/Gui/WhatsThis.cpp +++ b/src/Gui/WhatsThis.cpp @@ -63,6 +63,7 @@ Action * StdCmdDescription::createAction(void) void StdCmdDescription::activated(int iMsg) { + Q_UNUSED(iMsg); if ( !inDescriptionMode() ) enterDescriptionMode(); else diff --git a/src/Gui/WidgetFactory.cpp b/src/Gui/WidgetFactory.cpp index 3d34603d8f..9edd0d381e 100644 --- a/src/Gui/WidgetFactory.cpp +++ b/src/Gui/WidgetFactory.cpp @@ -560,7 +560,7 @@ QWidget* UiLoader::createWidget(const QString & className, QWidget * parent, // ---------------------------------------------------- -PyObject *UiLoaderPy::PyMake(struct _typeobject *type, PyObject * args, PyObject * kwds) +PyObject *UiLoaderPy::PyMake(struct _typeobject */*type*/, PyObject * args, PyObject * /*kwds*/) { if (!PyArg_ParseTuple(args, "")) return 0; @@ -1167,7 +1167,7 @@ Py::Object PyResource::setValue(const Py::Tuple& args) /** * If any resouce has been loaded this methods shows it as a modal dialog. */ -Py::Object PyResource::show(const Py::Tuple& args) +Py::Object PyResource::show(const Py::Tuple&) { if (myDlg) { // small trick to get focus diff --git a/src/Gui/Widgets.cpp b/src/Gui/Widgets.cpp index 38102478be..8478288cb2 100644 --- a/src/Gui/Widgets.cpp +++ b/src/Gui/Widgets.cpp @@ -70,8 +70,9 @@ CommandIconView::~CommandIconView () /** * Stores the name of the selected commands for drag and drop. */ -void CommandIconView::startDrag ( Qt::DropActions supportedActions ) +void CommandIconView::startDrag (Qt::DropActions supportedActions) { + Q_UNUSED(supportedActions); QList items = selectedItems(); QByteArray itemData; QDataStream dataStream(&itemData, QIODevice::WriteOnly); @@ -284,6 +285,7 @@ void ActionSelector::onCurrentItemChanged(QTreeWidgetItem*, QTreeWidgetItem*) void ActionSelector::onItemDoubleClicked(QTreeWidgetItem * item, int column) { + Q_UNUSED(column); QTreeWidget* treeWidget = item->treeWidget(); if (treeWidget == availableWidget) { int index = availableWidget->indexOfTopLevelItem(item); diff --git a/src/Gui/Window.cpp b/src/Gui/Window.cpp index d7e353f2b4..a0746c9f3c 100644 --- a/src/Gui/Window.cpp +++ b/src/Gui/Window.cpp @@ -23,6 +23,7 @@ #include "PreCompiled.h" +#include #include "Window.h" #include @@ -72,6 +73,8 @@ bool WindowParameter::setGroupName(const char* name) void WindowParameter::OnChange(Base::Subject &rCaller, const char * sReason) { + Q_UNUSED(rCaller); + Q_UNUSED(sReason); Base::Console().Log("Parameter has changed and window (%s) has not overridden this function!",_handle->GetGroupName()); } diff --git a/src/Gui/Workbench.cpp b/src/Gui/Workbench.cpp index 24487e2831..b8f436ca1d 100644 --- a/src/Gui/Workbench.cpp +++ b/src/Gui/Workbench.cpp @@ -332,6 +332,8 @@ void Workbench::setupCustomShortcuts() const void Workbench::setupContextMenu(const char* recipient,MenuItem* item) const { + Q_UNUSED(recipient); + Q_UNUSED(item); } void Workbench::createMainWindowPopupMenu(MenuItem*) const @@ -688,6 +690,8 @@ void BlankWorkbench::deactivated() void BlankWorkbench::setupContextMenu(const char* recipient,MenuItem* item) const { + Q_UNUSED(recipient); + Q_UNUSED(item); } MenuItem* BlankWorkbench::setupMenuBar() const @@ -725,6 +729,8 @@ NoneWorkbench::~NoneWorkbench() void NoneWorkbench::setupContextMenu(const char* recipient,MenuItem* item) const { + Q_UNUSED(recipient); + Q_UNUSED(item); } MenuItem* NoneWorkbench::setupMenuBar() const @@ -881,6 +887,7 @@ DockWindowItems* PythonBaseWorkbench::setupDockWindows() const void PythonBaseWorkbench::setupContextMenu(const char* recipient, MenuItem* item) const { + Q_UNUSED(recipient); QList items = _contextMenu->getItems(); for (QList::Iterator it = items.begin(); it != items.end(); ++it) { item->appendItem((*it)->copy()); diff --git a/src/Gui/WorkbenchPyImp.cpp b/src/Gui/WorkbenchPyImp.cpp index ce3635310c..78f0acf2da 100644 --- a/src/Gui/WorkbenchPyImp.cpp +++ b/src/Gui/WorkbenchPyImp.cpp @@ -51,6 +51,9 @@ std::string WorkbenchPy::representation(void) const /** Retrieves the workbench name */ PyObject* WorkbenchPy::name(PyObject *args) { + if (!PyArg_ParseTuple(args, "")) // convert args: Python->C + return NULL; // NULL triggers exception + PY_TRY { std::string name = getWorkbenchPtr()->name(); PyObject* pyName = PyString_FromString(name.c_str()); @@ -61,6 +64,9 @@ PyObject* WorkbenchPy::name(PyObject *args) /** Activates the workbench object */ PyObject* WorkbenchPy::activate(PyObject *args) { + if (!PyArg_ParseTuple(args, "")) // convert args: Python->C + return NULL; // NULL triggers exception + PY_TRY { std::string name = getWorkbenchPtr()->name(); WorkbenchManager::instance()->activate( name, getWorkbenchPtr()->getTypeId().getName() ); @@ -68,12 +74,12 @@ PyObject* WorkbenchPy::activate(PyObject *args) }PY_CATCH; } -PyObject *WorkbenchPy::getCustomAttributes(const char* attr) const +PyObject *WorkbenchPy::getCustomAttributes(const char*) const { return 0; } -int WorkbenchPy::setCustomAttributes(const char* attr, PyObject *obj) +int WorkbenchPy::setCustomAttributes(const char*, PyObject *) { return 0; } diff --git a/src/Gui/iisTaskPanel/src/iisiconlabel.cpp b/src/Gui/iisTaskPanel/src/iisiconlabel.cpp index 8950958f1f..f014cbf3c6 100644 --- a/src/Gui/iisTaskPanel/src/iisiconlabel.cpp +++ b/src/Gui/iisTaskPanel/src/iisiconlabel.cpp @@ -83,6 +83,7 @@ QSize iisIconLabel::minimumSizeHint() const void iisIconLabel::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); QRect textRect(rect().adjusted(0,0,-1,0)); diff --git a/src/Gui/iisTaskPanel/src/iistaskbox.cpp b/src/Gui/iisTaskPanel/src/iistaskbox.cpp index 95cc5d79e9..a262f63a3a 100644 --- a/src/Gui/iisTaskPanel/src/iistaskbox.cpp +++ b/src/Gui/iisTaskPanel/src/iistaskbox.cpp @@ -150,6 +150,7 @@ void iisTaskBox::processShow() void iisTaskBox::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); if (myDummy->isVisible()) { diff --git a/src/Gui/iisTaskPanel/src/iistaskgroup.cpp b/src/Gui/iisTaskPanel/src/iistaskgroup.cpp index 3b67217b1f..b550fb4a4f 100644 --- a/src/Gui/iisTaskPanel/src/iistaskgroup.cpp +++ b/src/Gui/iisTaskPanel/src/iistaskgroup.cpp @@ -50,6 +50,7 @@ void iisTaskGroup::addIconLabel(iisIconLabel *label, bool addToLayout) void iisTaskGroup::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); //p.setOpacity(/*m_opacity+*/0.7); diff --git a/src/Gui/iisTaskPanel/src/iistaskheader.cpp b/src/Gui/iisTaskPanel/src/iistaskheader.cpp index 479df3e7c0..12e75cc201 100644 --- a/src/Gui/iisTaskPanel/src/iistaskheader.cpp +++ b/src/Gui/iisTaskPanel/src/iistaskheader.cpp @@ -97,6 +97,7 @@ void iisTaskHeader::setScheme(iisTaskPanelScheme *scheme) void iisTaskHeader::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); #if QT_VERSION >= 0x040203 diff --git a/src/Gui/iisTaskPanel/src/iistaskpanel.cpp b/src/Gui/iisTaskPanel/src/iistaskpanel.cpp index 486db44ead..8605fbde87 100644 --- a/src/Gui/iisTaskPanel/src/iistaskpanel.cpp +++ b/src/Gui/iisTaskPanel/src/iistaskpanel.cpp @@ -52,6 +52,7 @@ void iisTaskPanel::setScheme(iisTaskPanelScheme *scheme) void iisTaskPanel::paintEvent ( QPaintEvent * event ) { + Q_UNUSED(event); QPainter p(this); //p.setOpacity(0.5); @@ -72,6 +73,7 @@ void iisTaskPanel::removeWidget(QWidget *w) void iisTaskPanel::addStretch(int s) { + Q_UNUSED(s); if (!mySpacer) { mySpacer = new QSpacerItem(0,0,QSizePolicy::Minimum, QSizePolicy::Expanding); layout()->addItem(mySpacer); diff --git a/src/Gui/propertyeditor/PropertyItem.cpp b/src/Gui/propertyeditor/PropertyItem.cpp index 3557f8a80c..bba4718c7b 100644 --- a/src/Gui/propertyeditor/PropertyItem.cpp +++ b/src/Gui/propertyeditor/PropertyItem.cpp @@ -574,6 +574,9 @@ TYPESYSTEM_SOURCE(Gui::PropertyEditor::PropertySeparatorItem, Gui::PropertyEdito QWidget* PropertySeparatorItem::createEditor(QWidget* parent, const QObject* receiver, const char* method) const { + Q_UNUSED(parent); + Q_UNUSED(receiver); + Q_UNUSED(method); return 0; }