Misc: modernize C++: use override
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#define APP_AUTOTRANSACTION_H
|
||||
|
||||
#include <cstddef>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace App {
|
||||
|
||||
|
||||
@@ -123,7 +123,7 @@ class GuiExport SoFCEnableHighlightAction : public SoAction
|
||||
|
||||
public:
|
||||
SoFCEnableHighlightAction (const SbBool& sel);
|
||||
~SoFCEnableHighlightAction();
|
||||
~SoFCEnableHighlightAction() override;
|
||||
|
||||
SbBool highlight;
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
#define GUI_TREEVIEW_H
|
||||
|
||||
#include <QTreeView>
|
||||
#include <FCGlobal.h>
|
||||
|
||||
namespace Gui {
|
||||
|
||||
@@ -34,11 +35,11 @@ class GuiExport TreeView : public QTreeView
|
||||
|
||||
public:
|
||||
TreeView(QWidget* parent=nullptr);
|
||||
virtual ~TreeView();
|
||||
~TreeView() override;
|
||||
|
||||
protected:
|
||||
void mouseDoubleClickEvent (QMouseEvent * );
|
||||
void rowsInserted (const QModelIndex & parent, int start, int end);
|
||||
void mouseDoubleClickEvent (QMouseEvent * ) override;
|
||||
void rowsInserted (const QModelIndex & parent, int start, int end) override;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -204,7 +204,7 @@ public:
|
||||
imp = new ViewProviderPythonFeatureImp(this,Proxy);
|
||||
}
|
||||
/// destructor.
|
||||
virtual ~ViewProviderPythonFeatureT() override {
|
||||
~ViewProviderPythonFeatureT() override {
|
||||
delete imp;
|
||||
}
|
||||
|
||||
|
||||
@@ -123,10 +123,10 @@ class MeshExport MeshTopFacetVisitor : public MeshFacetVisitor
|
||||
{
|
||||
public:
|
||||
MeshTopFacetVisitor (std::vector<FacetIndex> &raulNB) : _raulNeighbours(raulNB) {}
|
||||
~MeshTopFacetVisitor () override {}
|
||||
~MeshTopFacetVisitor () override = default;
|
||||
/** Collects the facet indices. */
|
||||
virtual bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom,
|
||||
FacetIndex ulFInd, unsigned long) override
|
||||
bool Visit (const MeshFacet &rclFacet, const MeshFacet &rclFrom,
|
||||
FacetIndex ulFInd, unsigned long) override
|
||||
{
|
||||
(void)rclFacet;
|
||||
(void)rclFrom;
|
||||
|
||||
@@ -75,7 +75,7 @@ public:
|
||||
void helpRequested() override;
|
||||
|
||||
/// returns for Close and Help button
|
||||
virtual QDialogButtonBox::StandardButtons getStandardButtons() const override
|
||||
QDialogButtonBox::StandardButtons getStandardButtons() const override
|
||||
{ return QDialogButtonBox::Ok|QDialogButtonBox::Cancel; }
|
||||
|
||||
protected:
|
||||
|
||||
@@ -73,7 +73,7 @@ public:
|
||||
std::vector<std::string> getDisplayModes() const override;
|
||||
void updateData(const App::Property*) override;
|
||||
void recomputeBoundingBox();
|
||||
virtual QIcon getIcon() const override;
|
||||
QIcon getIcon() const override;
|
||||
|
||||
bool useNewSelectionModel() const override;
|
||||
std::string getElement(const SoDetail *) const override;
|
||||
|
||||
@@ -71,7 +71,7 @@ class DrawSketchHandlerTrimming: public DrawSketchHandler
|
||||
{
|
||||
public:
|
||||
DrawSketchHandlerTrimming() = default;
|
||||
virtual ~DrawSketchHandlerTrimming()
|
||||
~DrawSketchHandlerTrimming() override
|
||||
{
|
||||
Gui::Selection().rmvSelectionGate();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ public:
|
||||
* A destructor.
|
||||
* A more elaborate description of the destructor.
|
||||
*/
|
||||
virtual ~PropertyCosmeticEdgeList() override;
|
||||
~PropertyCosmeticEdgeList() override;
|
||||
|
||||
void setSize(int newSize) override;
|
||||
int getSize(void) const override;
|
||||
|
||||
@@ -48,7 +48,7 @@ class TaskDimRepair: public QWidget
|
||||
|
||||
public:
|
||||
TaskDimRepair(TechDraw::DrawViewDimension* inDvd);
|
||||
~TaskDimRepair();
|
||||
~TaskDimRepair() override;
|
||||
|
||||
public:
|
||||
virtual bool accept();
|
||||
@@ -58,7 +58,7 @@ protected Q_SLOTS:
|
||||
void slotUseSelection();
|
||||
|
||||
protected:
|
||||
void changeEvent(QEvent* e);
|
||||
void changeEvent(QEvent* e) override;
|
||||
|
||||
void setUiPrimary();
|
||||
void replaceReferences();
|
||||
|
||||
@@ -57,7 +57,7 @@ namespace @self.export.Namespace.replace("::"," { namespace ")@
|
||||
class @self.export.Namespace.replace("::","_")@Export @self.export.Name@ : public @self.export.FatherNamespace@::@self.export.Father@
|
||||
{
|
||||
protected:
|
||||
~@self.export.Name@();
|
||||
~@self.export.Name@() override;
|
||||
|
||||
public:
|
||||
static PyTypeObject Type;
|
||||
@@ -79,12 +79,12 @@ public:
|
||||
static int descriptorSetter(PyObject* self, PyObject* obj, PyObject* value);
|
||||
-
|
||||
static PyGetSetDef GetterSetter[];
|
||||
virtual PyTypeObject *GetType() {return &Type;}
|
||||
PyTypeObject *GetType() override {return &Type;}
|
||||
|
||||
public:
|
||||
@self.export.Name@(@self.export.TwinPointer@ *pcObject, PyTypeObject *T = &Type);
|
||||
static PyObject *PyMake(struct _typeobject *, PyObject *, PyObject *);
|
||||
virtual int PyInit(PyObject* args, PyObject*k);
|
||||
int PyInit(PyObject* args, PyObject*k) override;
|
||||
|
||||
+ if (self.export.Initialization):
|
||||
int initialization();
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
using PointerType = @self.export.TwinPointer@*;
|
||||
|
||||
virtual PyObject *_repr(); // the representation
|
||||
PyObject *_repr() override; // the representation
|
||||
std::string representation() const;
|
||||
|
||||
/** @name callbacks and implementers for the python object methods */
|
||||
@@ -232,8 +232,8 @@ public:
|
||||
/// setter for special attributes (e.g. dynamic ones)
|
||||
/// Output: Success=1, Failure=-1, Ignore=0
|
||||
int setCustomAttributes(const char* attr, PyObject *obj);
|
||||
PyObject *_getattr(const char *attr); // __getattr__ function
|
||||
int _setattr(const char *attr, PyObject *value); // __setattr__ function
|
||||
PyObject *_getattr(const char *attr) override; // __getattr__ function
|
||||
int _setattr(const char *attr, PyObject *value) override; // __setattr__ function
|
||||
-
|
||||
|
||||
/// getter for the object handled by this class
|
||||
|
||||
@@ -23,8 +23,7 @@ public:
|
||||
testInventorBuilder()
|
||||
: builder(output)
|
||||
{}
|
||||
~testInventorBuilder()
|
||||
{}
|
||||
~testInventorBuilder() override = default;
|
||||
|
||||
SoNode* loadBuffer(const std::string& buffer)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user