From 779a728a8cf191d7744861fa0146ea21d6bf148e Mon Sep 17 00:00:00 2001 From: wmayer Date: Fri, 12 Aug 2022 17:59:59 +0200 Subject: [PATCH] Gui: remove redundant void --- src/Gui/ActiveObjectList.h | 14 +++++++------- src/Gui/Control.h | 10 +++++----- src/Gui/DlgMacroExecuteImp.h | 2 +- src/Gui/DlgRunExternal.h | 10 +++++----- src/Gui/PythonDebugger.h | 8 ++++---- src/Gui/QListWidgetCustom.cpp | 1 - src/Gui/SoAxisCrossKit.h | 4 ++-- src/Gui/SoFCBackgroundGradient.h | 6 +++--- src/Gui/SoFCBoundingBox.h | 6 +++--- src/Gui/SoFCDB.h | 2 +- src/Gui/SoFCInteractiveElement.cpp | 1 - src/Gui/SoFCInteractiveElement.h | 18 ++++++++--------- src/Gui/SoFCOffscreenRenderer.h | 8 ++++---- src/Gui/SoFCSelectionAction.cpp | 13 ++++++------- src/Gui/SoFCSelectionAction.h | 31 +++++++++++++++--------------- src/Gui/SoFCVectorizeSVGAction.h | 16 +++++++-------- src/Gui/SoFCVectorizeU3DAction.h | 16 +++++++-------- src/Gui/Splashscreen.h | 2 +- src/Gui/TaskView/TaskDialog.h | 10 +++++----- 19 files changed, 87 insertions(+), 91 deletions(-) diff --git a/src/Gui/ActiveObjectList.h b/src/Gui/ActiveObjectList.h index cd40323145..c20f7917ad 100644 --- a/src/Gui/ActiveObjectList.h +++ b/src/Gui/ActiveObjectList.h @@ -41,13 +41,13 @@ namespace Gui class Document; class ViewProviderDocumentObject; - /** List of active or special objects - * This class holds a list of objects with a special name. - * Its mainly used to points to something like the active Body or Part in a edit session. - * The class is used the viewer (editor) of a document. - * @see Gui::MDIViewer - * @author Jürgen Riegel - */ + /** List of active or special objects + * This class holds a list of objects with a special name. + * Its mainly used to points to something like the active Body or Part in a edit session. + * The class is used the viewer (editor) of a document. + * @see Gui::MDIViewer + * @author Jürgen Riegel + */ class GuiExport ActiveObjectList { public: diff --git a/src/Gui/Control.h b/src/Gui/Control.h index be66f6f352..7da5098ce3 100644 --- a/src/Gui/Control.h +++ b/src/Gui/Control.h @@ -56,8 +56,8 @@ class GuiExport ControlSingleton : public QObject Q_OBJECT public: - static ControlSingleton& instance(void); - static void destruct (void); + static ControlSingleton& instance(); + static void destruct (); /** @name dialog handling * These methods are used to control the TaskDialog stuff. @@ -83,17 +83,17 @@ public: If a task dialog is open then it indicates whether this task dialog allows other commands to modify the document while it is open. If no task dialog is open true is returned. */ - bool isAllowedAlterDocument(void) const; + bool isAllowedAlterDocument() const; /*! If a task dialog is open then it indicates whether this task dialog allows other commands to modify the 3d view while it is open. If no task dialog is open true is returned. */ - bool isAllowedAlterView(void) const; + bool isAllowedAlterView() const; /*! If a task dialog is open then it indicates whether this task dialog allows other commands to modify the selection while it is open. If no task dialog is open true is returned. */ - bool isAllowedAlterSelection(void) const; + bool isAllowedAlterSelection() const; public Q_SLOTS: void accept(); diff --git a/src/Gui/DlgMacroExecuteImp.h b/src/Gui/DlgMacroExecuteImp.h index 6e2885fdae..a2092b6923 100644 --- a/src/Gui/DlgMacroExecuteImp.h +++ b/src/Gui/DlgMacroExecuteImp.h @@ -44,7 +44,7 @@ class DlgMacroExecuteImp : public QDialog, public Gui::WindowParameter Q_OBJECT public: - DlgMacroExecuteImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); + DlgMacroExecuteImp( QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags() ); ~DlgMacroExecuteImp() override; void accept() override; diff --git a/src/Gui/DlgRunExternal.h b/src/Gui/DlgRunExternal.h index 70ed2768a3..5b5c9056d4 100644 --- a/src/Gui/DlgRunExternal.h +++ b/src/Gui/DlgRunExternal.h @@ -44,16 +44,16 @@ public: DlgRunExternal(QWidget* parent = nullptr, Qt::WindowFlags fl = Qt::WindowFlags()); ~DlgRunExternal() override; - int Do(void); + int Do(); QString ProcName; QStringList arguments; protected Q_SLOTS: - void reject(void) override; - void accept(void) override; - virtual void abort(void); - virtual void advanced(void); + void reject() override; + void accept() override; + virtual void abort(); + virtual void advanced(); void finished (int exitCode, QProcess::ExitStatus exitStatus); void on_chooseProgram_clicked(); diff --git a/src/Gui/PythonDebugger.h b/src/Gui/PythonDebugger.h index 042c47bc05..489c992b15 100644 --- a/src/Gui/PythonDebugger.h +++ b/src/Gui/PythonDebugger.h @@ -95,7 +95,7 @@ inline bool Breakpoint::operator ==(const QString& fn) class GuiExport PythonDebugModule : public Py::ExtensionModule { public: - static void init_module(void); + static void init_module(); PythonDebugModule(); virtual ~PythonDebugModule(); @@ -113,7 +113,7 @@ private: class GuiExport PythonDebugStdout : public Py::PythonExtension { public: - static void init_type(void); // announce properties and methods + static void init_type(); // announce properties and methods PythonDebugStdout(); ~PythonDebugStdout(); @@ -129,7 +129,7 @@ public: class GuiExport PythonDebugStderr : public Py::PythonExtension { public: - static void init_type(void); // announce properties and methods + static void init_type(); // announce properties and methods PythonDebugStderr(); ~PythonDebugStderr(); @@ -144,7 +144,7 @@ public: class GuiExport PythonDebugExcept : public Py::PythonExtension { public: - static void init_type(void); // announce properties and methods + static void init_type(); // announce properties and methods PythonDebugExcept(); ~PythonDebugExcept(); diff --git a/src/Gui/QListWidgetCustom.cpp b/src/Gui/QListWidgetCustom.cpp index 75eb889414..ced5555e1c 100644 --- a/src/Gui/QListWidgetCustom.cpp +++ b/src/Gui/QListWidgetCustom.cpp @@ -24,7 +24,6 @@ #include "PreCompiled.h" #ifndef _PreComp_ # include -# include # include #endif diff --git a/src/Gui/SoAxisCrossKit.h b/src/Gui/SoAxisCrossKit.h index 4d9c8dd362..80631e00ce 100644 --- a/src/Gui/SoAxisCrossKit.h +++ b/src/Gui/SoAxisCrossKit.h @@ -47,8 +47,8 @@ class GuiExport SoShapeScale : public SoBaseKit { SO_KIT_CATALOG_ENTRY_HEADER(shape); public: - SoShapeScale(void); - static void initClass(void); + SoShapeScale(); + static void initClass(); SoSFFloat active; SoSFFloat scaleFactor; diff --git a/src/Gui/SoFCBackgroundGradient.h b/src/Gui/SoFCBackgroundGradient.h index ad1a7028ed..1a07c8bc7b 100644 --- a/src/Gui/SoFCBackgroundGradient.h +++ b/src/Gui/SoFCBackgroundGradient.h @@ -39,9 +39,9 @@ class GuiExport SoFCBackgroundGradient : public SoNode { SO_NODE_HEADER(Gui::SoFCBackgroundGradient); public: - static void initClass(void); - static void finish(void); - SoFCBackgroundGradient(void); + static void initClass(); + static void finish(); + SoFCBackgroundGradient(); void GLRender (SoGLRenderAction *action); void setColorGradient(const SbColor& fromColor, const SbColor& toColor); diff --git a/src/Gui/SoFCBoundingBox.h b/src/Gui/SoFCBoundingBox.h index 9431694d45..bdfcfeb96f 100644 --- a/src/Gui/SoFCBoundingBox.h +++ b/src/Gui/SoFCBoundingBox.h @@ -83,9 +83,9 @@ class GuiExport SoSkipBoundingGroup : public SoGroup { SO_NODE_HEADER(Gui::SoSkipBoundingGroup); public: - static void initClass(void); - static void finish(void); - SoSkipBoundingGroup(void); + static void initClass(); + static void finish(); + SoSkipBoundingGroup(); enum Modes { INCLUDE_BBOX, EXCLUDE_BBOX diff --git a/src/Gui/SoFCDB.h b/src/Gui/SoFCDB.h index aca7014756..d9ecb349eb 100644 --- a/src/Gui/SoFCDB.h +++ b/src/Gui/SoFCDB.h @@ -41,7 +41,7 @@ namespace Gui { class GuiExport SoFCDB { public: - static SbBool isInitialized(void); + static SbBool isInitialized(); static void init(); static void finish(); static SoNode* replaceSwitches(SoNode* node); diff --git a/src/Gui/SoFCInteractiveElement.cpp b/src/Gui/SoFCInteractiveElement.cpp index b3e79132af..0c0ca65e08 100644 --- a/src/Gui/SoFCInteractiveElement.cpp +++ b/src/Gui/SoFCInteractiveElement.cpp @@ -28,7 +28,6 @@ #include "SoFCInteractiveElement.h" - using namespace Gui; SO_ELEMENT_SOURCE(SoFCInteractiveElement) diff --git a/src/Gui/SoFCInteractiveElement.h b/src/Gui/SoFCInteractiveElement.h index e849886179..d28f7e688d 100644 --- a/src/Gui/SoFCInteractiveElement.h +++ b/src/Gui/SoFCInteractiveElement.h @@ -42,7 +42,7 @@ class GuiExport SoFCInteractiveElement : public SoReplacedElement { SO_ELEMENT_HEADER(SoFCInteractiveElement); public: - static void initClass(void); + static void initClass(); virtual void init(SoState * state); static void set(SoState * const state, SoNode * const node, SbBool mode); @@ -63,14 +63,14 @@ class GuiExport SoGLWidgetElement : public SoElement { SO_ELEMENT_HEADER(SoGLWidgetElement); public: - static void initClass(void); + static void initClass(); virtual void init(SoState * state); virtual void push(SoState * state); virtual void pop(SoState * state, const SoElement * prevTopElement); virtual SbBool matches(const SoElement * element) const; - virtual SoElement * copyMatchInfo(void) const; + virtual SoElement * copyMatchInfo() const; static void set(SoState * state, QtGLWidget * window); static void get(SoState * state, QtGLWidget *& window); @@ -88,14 +88,14 @@ class GuiExport SoGLRenderActionElement : public SoElement { SO_ELEMENT_HEADER(SoGLRenderActionElement); public: - static void initClass(void); + static void initClass(); virtual void init(SoState * state); virtual void push(SoState * state); virtual void pop(SoState * state, const SoElement * prevTopElement); virtual SbBool matches(const SoElement * element) const; - virtual SoElement * copyMatchInfo(void) const; + virtual SoElement * copyMatchInfo() const; static void set(SoState * state, SoGLRenderAction * action); static void get(SoState * state, SoGLRenderAction * & action); @@ -113,8 +113,8 @@ class GuiExport SoGLWidgetNode : public SoNode { SO_NODE_HEADER(SoGLWidgetNode); public: - static void initClass(void); - SoGLWidgetNode(void); + static void initClass(); + SoGLWidgetNode(); QtGLWidget * window; @@ -131,14 +131,14 @@ class GuiExport SoGLVBOActivatedElement : public SoElement { SO_ELEMENT_HEADER(SoGLVBOActivatedElement); public: - static void initClass(void); + static void initClass(); virtual void init(SoState * state); virtual void push(SoState * state); virtual void pop(SoState * state, const SoElement * prevTopElement); virtual SbBool matches(const SoElement * element) const; - virtual SoElement * copyMatchInfo(void) const; + virtual SoElement * copyMatchInfo() const; static void set(SoState * state, SbBool); static void get(SoState * state, SbBool& active); diff --git a/src/Gui/SoFCOffscreenRenderer.h b/src/Gui/SoFCOffscreenRenderer.h index aff0538bc7..c8df7c2af2 100644 --- a/src/Gui/SoFCOffscreenRenderer.h +++ b/src/Gui/SoFCOffscreenRenderer.h @@ -109,16 +109,16 @@ public: ~SoQtOffscreenRenderer(); void setViewportRegion(const SbViewportRegion & region); - const SbViewportRegion & getViewportRegion(void) const; + const SbViewportRegion & getViewportRegion() const; void setBackgroundColor(const SbColor4f & color); - const SbColor4f & getBackgroundColor(void) const; + const SbColor4f & getBackgroundColor() const; void setGLRenderAction(SoGLRenderAction * action); - SoGLRenderAction * getGLRenderAction(void) const; + SoGLRenderAction * getGLRenderAction() const; void setNumPasses(const int num); - int getNumPasses(void) const; + int getNumPasses() const; void setInternalTextureFormat(GLenum internalTextureFormat); GLenum internalTextureFormat() const; diff --git a/src/Gui/SoFCSelectionAction.cpp b/src/Gui/SoFCSelectionAction.cpp index 9e4501d8df..1fef87e8be 100644 --- a/src/Gui/SoFCSelectionAction.cpp +++ b/src/Gui/SoFCSelectionAction.cpp @@ -1116,7 +1116,6 @@ SoBoxSelectionRenderAction::constructorCommon() // Initialize local variables PRIVATE(this)->initBoxGraph(); - // this->hlVisible = true; this->hlVisible = false; PRIVATE(this)->basecolor->rgb.setValue(1.0f, 0.0f, 0.0f); @@ -1154,7 +1153,7 @@ SoBoxSelectionRenderAction::apply(SoNode * node) { SoGLRenderAction::apply(node); if (this->hlVisible) { - if (PRIVATE(this)->searchaction == nullptr) { + if (!PRIVATE(this)->searchaction) { PRIVATE(this)->searchaction = new SoSearchAction; } PRIVATE(this)->searchaction->setType(SoFCSelection::getClassTypeId()); @@ -1169,7 +1168,7 @@ SoBoxSelectionRenderAction::apply(SoNode * node) assert(selection->getTypeId().isDerivedFrom(SoFCSelection::getClassTypeId())); if (selection->selected.getValue() && selection->style.getValue() == SoFCSelection::BOX) { PRIVATE(this)->basecolor->rgb.setValue(selection->colorSelection.getValue()); - if (PRIVATE(this)->selectsearch == nullptr) { + if (!PRIVATE(this)->selectsearch) { PRIVATE(this)->selectsearch = new SoSearchAction; } PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId()); @@ -1188,8 +1187,8 @@ SoBoxSelectionRenderAction::apply(SoNode * node) selection->style.getValue() == SoFCSelection::BOX) { PRIVATE(this)->basecolor->rgb.setValue(selection->colorHighlight.getValue()); - if (PRIVATE(this)->selectsearch == nullptr) { - PRIVATE(this)->selectsearch = new SoSearchAction; + if (!PRIVATE(this)->selectsearch) { + PRIVATE(this)->selectsearch = new SoSearchAction; } PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId()); PRIVATE(this)->selectsearch->setInterest(SoSearchAction::FIRST); @@ -1236,8 +1235,8 @@ SoBoxSelectionRenderAction::apply(SoPath * path) selection->style.getValue() == SoFCSelection::BOX) { PRIVATE(this)->basecolor->rgb.setValue(selection->colorHighlight.getValue()); - if (PRIVATE(this)->selectsearch == nullptr) { - PRIVATE(this)->selectsearch = new SoSearchAction; + if (!PRIVATE(this)->selectsearch) { + PRIVATE(this)->selectsearch = new SoSearchAction; } PRIVATE(this)->selectsearch->setType(SoShape::getClassTypeId()); PRIVATE(this)->selectsearch->setInterest(SoSearchAction::FIRST); diff --git a/src/Gui/SoFCSelectionAction.h b/src/Gui/SoFCSelectionAction.h index 545b3d4640..d818b7f9a4 100644 --- a/src/Gui/SoFCSelectionAction.h +++ b/src/Gui/SoFCSelectionAction.h @@ -29,7 +29,6 @@ #include #include - class SoSFString; class SoSFColor; @@ -51,7 +50,7 @@ public: ~SoFCHighlightAction(); static void initClass(); - static void finish(void); + static void finish(); const SelectionChanges &SelChange; @@ -76,7 +75,7 @@ public: ~SoFCSelectionAction(); static void initClass(); - static void finish(void); + static void finish(); const SelectionChanges &SelChange; @@ -103,7 +102,7 @@ public: SbBool selection; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -128,7 +127,7 @@ public: SbBool highlight; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -153,7 +152,7 @@ public: SoSFColor selectionColor; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -178,7 +177,7 @@ public: SoSFColor highlightColor; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -203,7 +202,7 @@ public: SoSFString documentName; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -229,7 +228,7 @@ public: SbBool isHandled() const; static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); @@ -316,11 +315,11 @@ class GuiExport SoBoxSelectionRenderAction : public SoGLRenderAction { SO_ACTION_HEADER(SoBoxSelectionRenderAction); public: - SoBoxSelectionRenderAction(void); + SoBoxSelectionRenderAction(); SoBoxSelectionRenderAction(const SbViewportRegion & viewportregion); virtual ~SoBoxSelectionRenderAction(); - static void initClass(void); + static void initClass(); virtual void apply(SoNode * node); virtual void apply(SoPath * path); @@ -328,17 +327,17 @@ public: void setVisible(SbBool b) { hlVisible = b; } SbBool isVisible() const { return hlVisible; } void setColor(const SbColor & color); - const SbColor & getColor(void); + const SbColor & getColor(); void setLinePattern(unsigned short pattern); - unsigned short getLinePattern(void) const; + unsigned short getLinePattern() const; void setLineWidth(const float width); - float getLineWidth(void) const; + float getLineWidth() const; protected: SbBool hlVisible; private: - void constructorCommon(void); + void constructorCommon(); void drawBoxes(SoPath * pathtothis, const SoPathList * pathlist); SoBoxSelectionRenderActionP * pimpl; @@ -357,7 +356,7 @@ public: ~SoUpdateVBOAction(); static void initClass(); - static void finish(void); + static void finish(); protected: virtual void beginTraversal(SoNode *node); diff --git a/src/Gui/SoFCVectorizeSVGAction.h b/src/Gui/SoFCVectorizeSVGAction.h index 2924418bd2..ed12f0dd88 100644 --- a/src/Gui/SoFCVectorizeSVGAction.h +++ b/src/Gui/SoFCVectorizeSVGAction.h @@ -37,7 +37,7 @@ public: virtual ~SoSVGVectorOutput(); virtual SbBool openFile (const char *filename); - virtual void closeFile (void); + virtual void closeFile (); std::fstream& getFileStream(); private: @@ -54,11 +54,11 @@ class GuiExport SoFCVectorizeSVGAction : public SoVectorizeAction { SO_ACTION_HEADER(SoFCVectorizeSVGAction); public: - SoFCVectorizeSVGAction(void); + SoFCVectorizeSVGAction(); virtual ~SoFCVectorizeSVGAction(); - static void initClass(void); - SoSVGVectorOutput * getSVGOutput(void) const; + static void initClass(); + SoSVGVectorOutput * getSVGOutput() const; virtual void setBackgroundState(bool b) { m_backgroundState = b; } virtual bool getBackgroundState(void) const { return m_backgroundState; } @@ -68,11 +68,11 @@ public: virtual bool getUseMM(void) const { return m_usemm; } protected: - virtual void printHeader(void) const; - virtual void printFooter(void) const; - virtual void printBackground(void) const; + virtual void printHeader() const; + virtual void printFooter() const; + virtual void printBackground() const; virtual void printItem(const SoVectorizeItem * item) const; - virtual void printViewport(void) const; + virtual void printViewport() const; private: SoFCVectorizeSVGActionP* p; diff --git a/src/Gui/SoFCVectorizeU3DAction.h b/src/Gui/SoFCVectorizeU3DAction.h index de5c01bdac..3142347726 100644 --- a/src/Gui/SoFCVectorizeU3DAction.h +++ b/src/Gui/SoFCVectorizeU3DAction.h @@ -36,7 +36,7 @@ public: virtual ~SoU3DVectorOutput(); virtual SbBool openFile (const char *filename); - virtual void closeFile (void); + virtual void closeFile (); std::fstream& getFileStream(); private: @@ -53,20 +53,20 @@ class GuiExport SoFCVectorizeU3DAction : public SoVectorizeAction { SO_ACTION_HEADER(SoFCVectorizeU3DAction); public: - SoFCVectorizeU3DAction(void); + SoFCVectorizeU3DAction(); virtual ~SoFCVectorizeU3DAction(); - static void initClass(void); - SoU3DVectorOutput * getU3DOutput(void) const; + static void initClass(); + SoU3DVectorOutput * getU3DOutput() const; protected: virtual void beginTraversal(SoNode * node); virtual void endTraversal(SoNode *node); - virtual void printHeader(void) const; - virtual void printFooter(void) const; - virtual void printBackground(void) const; + virtual void printHeader() const; + virtual void printFooter() const; + virtual void printBackground() const; virtual void printItem(const SoVectorizeItem * item) const; - virtual void printViewport(void) const; + virtual void printViewport() const; private: static void actionMethod(SoAction *, SoNode *); diff --git a/src/Gui/Splashscreen.h b/src/Gui/Splashscreen.h index 1248a2e9c6..558bfd11f7 100644 --- a/src/Gui/Splashscreen.h +++ b/src/Gui/Splashscreen.h @@ -26,7 +26,7 @@ #include #include #include -#include "MDIView.h" +#include namespace Gui { diff --git a/src/Gui/TaskView/TaskDialog.h b/src/Gui/TaskView/TaskDialog.h index a15fe66bc7..b399793330 100644 --- a/src/Gui/TaskView/TaskDialog.h +++ b/src/Gui/TaskView/TaskDialog.h @@ -57,11 +57,11 @@ public: { pos = p; } ButtonPosition buttonPosition() const { return pos; } - const std::vector &getDialogContent(void) const; + const std::vector &getDialogContent() const; bool canClose() const; /// tells the framework which buttons are wished for the dialog - virtual QDialogButtonBox::StandardButtons getStandardButtons(void) const + virtual QDialogButtonBox::StandardButtons getStandardButtons() const { return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; } virtual void modifyStandardButtons(QDialogButtonBox*) {} @@ -91,19 +91,19 @@ public: Indicates whether this task dialog allows other commands to modify the document while it is open. */ - virtual bool isAllowedAlterDocument(void) const + virtual bool isAllowedAlterDocument() const { return false; } /*! Indicates whether this task dialog allows other commands to modify the 3d view while it is open. */ - virtual bool isAllowedAlterView(void) const + virtual bool isAllowedAlterView() const { return true; } /*! Indicates whether this task dialog allows other commands to modify the selection while it is open. */ - virtual bool isAllowedAlterSelection(void) const + virtual bool isAllowedAlterSelection() const { return true; } virtual bool needsFullSpace() const { return false; }