mirror of https://github.com/CGAL/cgal
Fix override and shadow warnings for clang
This commit is contained in:
parent
ef26c37b75
commit
d34ac7b14b
|
|
@ -860,6 +860,7 @@ public:
|
|||
return ok;
|
||||
}
|
||||
|
||||
using Polyhedron_demo_plugin_interface::init;
|
||||
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface,
|
||||
Messages_interface* m) override;
|
||||
QList<QAction*> actions() const Q_DECL_OVERRIDE;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ class Polyhedron_demo_camera_positions_plugin :
|
|||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90")
|
||||
|
||||
public:
|
||||
void init();
|
||||
void init() override;
|
||||
|
||||
QString name() const { return "camera_positions_plugin"; }
|
||||
QString nameFilters() const { return "Camera positions (*.camera.txt)"; }
|
||||
|
|
|
|||
|
|
@ -42,7 +42,6 @@
|
|||
using namespace CGAL::Three;
|
||||
class Io_implicit_function_plugin :
|
||||
public QObject,
|
||||
// public Polyhedron_demo_plugin_interface,
|
||||
protected Polyhedron_demo_plugin_helper
|
||||
{
|
||||
Q_OBJECT
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ public:
|
|||
// To silent a warning -Woverloaded-virtual
|
||||
// See http://stackoverflow.com/questions/9995421/gcc-woverloaded-virtual-warnings
|
||||
|
||||
using Polyhedron_demo_io_plugin_interface::init;
|
||||
//! Configures the widget
|
||||
void init(QMainWindow* mainWindow,
|
||||
CGAL::Three::Scene_interface* scene_interface,
|
||||
|
|
@ -43,14 +44,14 @@ public:
|
|||
connect(actionJoin_polylines, &QAction::triggered, this, &Polyhedron_demo_polylines_io_plugin::join);
|
||||
|
||||
}
|
||||
QString name() const { return "polylines_io_plugin"; }
|
||||
QString nameFilters() const { return "Polylines files (*.polylines.txt *.cgal)"; }
|
||||
bool canLoad(QFileInfo fileinfo) const;
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true);
|
||||
QString name() const override{ return "polylines_io_plugin"; }
|
||||
QString nameFilters() const override{ return "Polylines files (*.polylines.txt *.cgal)"; }
|
||||
bool canLoad(QFileInfo fileinfo) const override;
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) override;
|
||||
|
||||
bool canSave(const CGAL::Three::Scene_item*);
|
||||
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&);
|
||||
bool applicable(QAction* a) const {
|
||||
bool canSave(const CGAL::Three::Scene_item*) override;
|
||||
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>&) override;
|
||||
bool applicable(QAction* a) const override{
|
||||
bool all_polylines_selected = true;
|
||||
Q_FOREACH(int index, scene->selectionIndices())
|
||||
{
|
||||
|
|
@ -69,7 +70,7 @@ public:
|
|||
else
|
||||
return false;
|
||||
}
|
||||
QList<QAction*> actions() const {
|
||||
QList<QAction*> actions() const override{
|
||||
|
||||
return QList<QAction*>()<<actionSplit_polylines
|
||||
<<actionJoin_polylines;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ public:
|
|||
private:
|
||||
bool try_load_other_binary_format(std::istream& in, C3t3& c3t3);
|
||||
bool try_load_a_cdt_3(std::istream& in, C3t3& c3t3);
|
||||
CGAL::Three::Scene_interface* scene;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -211,11 +211,11 @@ class Io_image_plugin :
|
|||
|
||||
public:
|
||||
|
||||
bool applicable(QAction*) const {
|
||||
bool applicable(QAction*) const override{
|
||||
return qobject_cast<Scene_image_item*>(scene->item(scene->mainSelectionIndex()));
|
||||
}
|
||||
|
||||
|
||||
using Polyhedron_demo_plugin_interface::init;
|
||||
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface *mi) override {
|
||||
this->message_interface = mi;
|
||||
this->scene = scene_interface;
|
||||
|
|
@ -270,10 +270,10 @@ public:
|
|||
}
|
||||
}
|
||||
}
|
||||
QList<QAction*> actions() const {
|
||||
QList<QAction*> actions() const override{
|
||||
return QList<QAction*>() << planeSwitch;
|
||||
}
|
||||
virtual void closure()
|
||||
virtual void closure() override
|
||||
{
|
||||
QDockWidget* controlDockWidget = mw->findChild<QDockWidget*>("volumePlanesControl");
|
||||
if(controlDockWidget)
|
||||
|
|
@ -281,12 +281,12 @@ public:
|
|||
}
|
||||
Io_image_plugin() : planeSwitch(NULL) {}
|
||||
|
||||
QString nameFilters() const;
|
||||
bool canLoad(QFileInfo) const;
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true);
|
||||
QString nameFilters() const override;
|
||||
bool canLoad(QFileInfo) const override;
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) override;
|
||||
|
||||
bool canSave(const CGAL::Three::Scene_item*);
|
||||
bool save(QFileInfo fileinfo, QList<CGAL::Three::Scene_item*>& items ) {
|
||||
bool canSave(const CGAL::Three::Scene_item*) override;
|
||||
bool save(QFileInfo fileinfo, QList<CGAL::Three::Scene_item*>& items ) override{
|
||||
Scene_item* item = items.front();
|
||||
const Scene_image_item* im_item = qobject_cast<const Scene_image_item*>(item);
|
||||
|
||||
|
|
@ -295,7 +295,7 @@ public:
|
|||
items.pop_front();
|
||||
return ok;
|
||||
}
|
||||
QString name() const { return "segmented images"; }
|
||||
QString name() const override{ return "segmented images"; }
|
||||
|
||||
|
||||
public Q_SLOTS:
|
||||
|
|
|
|||
|
|
@ -75,10 +75,10 @@ class Polyhedron_demo_selection_plugin :
|
|||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.PluginInterface/1.0" FILE "selection_plugin.json")
|
||||
Q_PLUGIN_METADATA(IID "com.geometryfactory.PolyhedronDemo.IOPluginInterface/1.90")
|
||||
public:
|
||||
QString nameFilters() const { return "Selection files(*.selection.txt)"; }
|
||||
QString name() const { return "selection_sm_plugin"; }
|
||||
QString nameFilters() const override { return "Selection files(*.selection.txt)"; }
|
||||
QString name() const override { return "selection_sm_plugin"; }
|
||||
|
||||
bool canLoad(QFileInfo) const {
|
||||
bool canLoad(QFileInfo) const override {
|
||||
Scene_item * item = CGAL::Three::Three::scene()->item(
|
||||
CGAL::Three::Three::scene()->mainSelectionIndex());
|
||||
Scene_facegraph_item* fg_item = qobject_cast<Scene_facegraph_item*>(item);
|
||||
|
|
@ -91,7 +91,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) {
|
||||
QList<Scene_item*> load(QFileInfo fileinfo, bool& ok, bool add_to_scene=true) override {
|
||||
if(fileinfo.suffix().toLower() != "txt")
|
||||
{
|
||||
ok = false;
|
||||
|
|
@ -111,10 +111,10 @@ public:
|
|||
return QList<Scene_item*>()<<item;
|
||||
}
|
||||
|
||||
bool canSave(const CGAL::Three::Scene_item* scene_item) {
|
||||
bool canSave(const CGAL::Three::Scene_item* scene_item) override {
|
||||
return qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
|
||||
}
|
||||
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) {
|
||||
bool save(QFileInfo fileinfo,QList<CGAL::Three::Scene_item*>& items) override {
|
||||
Scene_item* scene_item = items.front();
|
||||
const Scene_polyhedron_selection_item* item = qobject_cast<const Scene_polyhedron_selection_item*>(scene_item);
|
||||
if(item == NULL) { return false; }
|
||||
|
|
@ -125,14 +125,14 @@ public:
|
|||
return res;
|
||||
}
|
||||
|
||||
bool applicable(QAction*) const {
|
||||
bool applicable(QAction*) const override {
|
||||
return qobject_cast<Scene_face_graph_item*>(scene->item(scene->mainSelectionIndex()))
|
||||
|| qobject_cast<Scene_polyhedron_selection_item*>(scene->item(scene->mainSelectionIndex()));
|
||||
}
|
||||
void print_message(QString message) { CGAL::Three::Three::information(message); }
|
||||
QList<QAction*> actions() const { return QList<QAction*>() << actionSelection; }
|
||||
|
||||
void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) override{
|
||||
QList<QAction*> actions() const override { return QList<QAction*>() << actionSelection; }
|
||||
using Polyhedron_demo_io_plugin_interface::init;
|
||||
virtual void init(QMainWindow* mainWindow, CGAL::Three::Scene_interface* scene_interface, Messages_interface* m) override{
|
||||
mw = mainWindow;
|
||||
scene = scene_interface;
|
||||
messages = m;
|
||||
|
|
@ -216,7 +216,7 @@ public:
|
|||
operations_map[operations_strings[8]] = 8;
|
||||
operations_map[operations_strings[9]] = 9;
|
||||
}
|
||||
virtual void closure()
|
||||
virtual void closure() override
|
||||
{
|
||||
dock_widget->hide();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue