summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/document.h6
-rw-r--r--src/gc-anchored.h6
-rw-r--r--src/knot.h6
-rw-r--r--src/knotholder.h5
-rw-r--r--src/message-stack.h6
-rw-r--r--src/object/uri-references.h6
-rw-r--r--src/preferences.h8
-rw-r--r--src/selection.h12
-rw-r--r--src/ui/toolbar/gradient-toolbar.cpp2
-rw-r--r--src/ui/toolbar/select-toolbar.cpp4
-rw-r--r--src/ui/tools/tool-base.h5
-rw-r--r--src/ui/uxmanager.h7
-rw-r--r--src/ui/widget/combo-tool-item.cpp12
-rw-r--r--src/ui/widget/combo-tool-item.h6
-rw-r--r--src/ui/widget/spin-button-tool-item.cpp1
-rw-r--r--src/ui/widget/spinbutton.h9
-rw-r--r--src/widgets/toolbox.h1
17 files changed, 48 insertions, 54 deletions
diff --git a/src/document.h b/src/document.h
index e22542f80..e24d2ae12 100644
--- a/src/document.h
+++ b/src/document.h
@@ -230,9 +230,6 @@ public:
void setModifiedSinceSave(bool const modified = true);
private:
- SPDocument(SPDocument const &) = delete; // no copy
- void operator=(SPDocument const &) = delete; // no assign
-
Persp3D *current_persp3d; /**< Currently 'active' perspective (to which, e.g., newly created boxes are attached) */
Persp3DImpl *current_persp3d_impl;
@@ -242,6 +239,9 @@ private:
SPDocument *_parent_document;
public:
+ SPDocument(SPDocument const &) = delete; // no copy
+ void operator=(SPDocument const &) = delete; // no assign
+
sigc::connection connectReconstructionStart(ReconstructionStart::slot_type slot);
sigc::connection connectReconstructionFinish(ReconstructionFinish::slot_type slot);
void emitReconstructionStart();
diff --git a/src/gc-anchored.h b/src/gc-anchored.h
index 7871dfb09..8a7b2d765 100644
--- a/src/gc-anchored.h
+++ b/src/gc-anchored.h
@@ -55,6 +55,9 @@ public:
return ( _anchor ? _anchor->refcount : 0 );
}
+ Anchored(Anchored const &) = delete; // no copy
+ void operator=(Anchored const &) = delete; // no assign
+
protected:
Anchored() : _anchor(nullptr) { anchor(); } // initial refcount of one
virtual ~Anchored() = default;
@@ -73,9 +76,6 @@ private:
Anchor *_new_anchor() const;
void _free_anchor(Anchor *anchor) const;
-
- Anchored(Anchored const &) = delete; // no copy
- void operator=(Anchored const &) = delete; // no assign
};
/**
diff --git a/src/knot.h b/src/knot.h
index b09061cbe..224214900 100644
--- a/src/knot.h
+++ b/src/knot.h
@@ -44,6 +44,9 @@ public:
SPKnot(SPDesktop *desktop, char const *tip);
virtual ~SPKnot();
+ SPKnot(SPKnot const&) = delete;
+ SPKnot& operator=(SPKnot const&) = delete;
+
int ref_count; // FIXME encapsulation
SPDesktop *desktop; /**< Desktop we are on. */
@@ -153,9 +156,6 @@ public:
Geom::Point position() const;
private:
- SPKnot(SPKnot const&) = delete;
- SPKnot& operator=(SPKnot const&) = delete;
-
/**
* Set knot control state (dragging/mouseover/normal).
*/
diff --git a/src/knotholder.h b/src/knotholder.h
index 5e02c7fc1..659de5b62 100644
--- a/src/knotholder.h
+++ b/src/knotholder.h
@@ -50,6 +50,8 @@ public:
KnotHolder(SPDesktop *desktop, SPItem *item, SPKnotHolderReleasedFunc relhandler);
virtual ~KnotHolder();
+ KnotHolder() = delete; // declared but not defined
+
void update_knots();
void unselect_knots();
void knot_mousedown_handler(SPKnot *knot, unsigned int state);
@@ -89,9 +91,6 @@ protected:
bool dragging;
Geom::Affine _edit_transform;
-
-private:
- KnotHolder() = delete; // declared but not defined
};
/**
diff --git a/src/message-stack.h b/src/message-stack.h
index d105095da..f86ae7b94 100644
--- a/src/message-stack.h
+++ b/src/message-stack.h
@@ -51,6 +51,9 @@ public:
MessageStack();
~MessageStack();
+ MessageStack(MessageStack const &) = delete; // no copy
+ void operator=(MessageStack const &) = delete; // no assign
+
/** @brief returns the type of message currently at the top of the stack */
MessageType currentMessageType() {
return _messages ? _messages->type : NORMAL_MESSAGE;
@@ -160,9 +163,6 @@ private:
guint timeout_id;
};
- MessageStack(MessageStack const &) = delete; // no copy
- void operator=(MessageStack const &) = delete; // no assign
-
/// pushes a message onto the stack with an optional timeout
MessageId _push(MessageType type, unsigned int lifetime, char const *message);
diff --git a/src/object/uri-references.h b/src/object/uri-references.h
index 404e7a85a..730f2534a 100644
--- a/src/object/uri-references.h
+++ b/src/object/uri-references.h
@@ -50,6 +50,9 @@ public:
URIReference(SPObject *owner);
URIReference(SPDocument *owner_document);
+ /* Definition-less to prevent accidental use. */
+ void operator=(URIReference const& ref) = delete;
+
/**
* Destructor. Calls shutdown() if the reference has not been
* shut down yet.
@@ -138,9 +141,6 @@ private:
void _setObject(SPObject *object);
void _release(SPObject *object);
-
- void operator=(URIReference const& ref) = delete;
- /* Private and definition-less to prevent accidental use. */
};
}
diff --git a/src/preferences.h b/src/preferences.h
index 8781023f2..db13a917f 100644
--- a/src/preferences.h
+++ b/src/preferences.h
@@ -261,6 +261,10 @@ public:
};
+ // disable copying
+ Preferences(Preferences const &) = delete;
+ Preferences operator=(Preferences const &) = delete;
+
// utility methods
/**
@@ -588,10 +592,6 @@ private:
XML::Node *_getNode(Glib::ustring const &pref_path, bool create=false);
XML::Node *_findObserverNode(Glib::ustring const &pref_path, Glib::ustring &node_key, Glib::ustring &attr_key, bool create);
- // disable copying
- Preferences(Preferences const &) = delete;
- Preferences operator=(Preferences const &) = delete;
-
std::string _prefs_filename; ///< Full filename (with directory) of the prefs file
Glib::ustring _lastErrPrimary; ///< Last primary error message, if any.
Glib::ustring _lastErrSecondary; ///< Last secondary error message, if any.
diff --git a/src/selection.h b/src/selection.h
index 04c976459..f6d09346c 100644
--- a/src/selection.h
+++ b/src/selection.h
@@ -70,6 +70,11 @@ public:
Selection(LayerModel *layers, SPDesktop *desktop);
~Selection() override;
+ /** no copy. */
+ Selection(Selection const &) = delete;
+ /** no assign. */
+ void operator=(Selection const &) = delete;
+
/**
* Returns the layer model the selection is bound to (works in console or GUI mode)
*
@@ -78,8 +83,6 @@ public:
*/
LayerModel *layers() { return _layers; }
-
-
/**
* Returns active layer for selection (currentLayer or its parent).
*
@@ -207,11 +210,6 @@ protected:
void _releaseSignals(SPObject* object) override;
private:
- /** no copy. */
- Selection(Selection const &) = delete;
- /** no assign. */
- void operator=(Selection const &) = delete;
-
/** Issues modification notification signals. */
static int _emit_modified(Selection *selection);
/** Schedules an item modification signal to be sent. */
diff --git a/src/ui/toolbar/gradient-toolbar.cpp b/src/ui/toolbar/gradient-toolbar.cpp
index f98d3f25b..60779f03a 100644
--- a/src/ui/toolbar/gradient-toolbar.cpp
+++ b/src/ui/toolbar/gradient-toolbar.cpp
@@ -943,7 +943,7 @@ GradientToolbar::selection_changed(Inkscape::Selection * /*selection*/)
_stop_cb->set_sensitive( gr_selected && !gr_multi);
- int stop = update_stop_list (gr_selected, nullptr, gr_multi);
+ update_stop_list (gr_selected, nullptr, gr_multi);
select_stop_by_draggers(gr_selected, ev);
}
diff --git a/src/ui/toolbar/select-toolbar.cpp b/src/ui/toolbar/select-toolbar.cpp
index 8d6805487..e8fc61bc9 100644
--- a/src/ui/toolbar/select-toolbar.cpp
+++ b/src/ui/toolbar/select-toolbar.cpp
@@ -64,8 +64,8 @@ SelectToolbar::SelectToolbar(SPDesktop *desktop) :
{
Inkscape::Preferences *prefs = Inkscape::Preferences::get();
- auto select_all_button = add_toolbutton_for_verb(SP_VERB_EDIT_SELECT_ALL);
- auto select_all_in_all_layers_button = add_toolbutton_for_verb(SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS);
+ add_toolbutton_for_verb(SP_VERB_EDIT_SELECT_ALL);
+ add_toolbutton_for_verb(SP_VERB_EDIT_SELECT_ALL_IN_ALL_LAYERS);
auto deselect_button = add_toolbutton_for_verb(SP_VERB_EDIT_DESELECT);
_context_items.push_back(deselect_button);
diff --git a/src/ui/tools/tool-base.h b/src/ui/tools/tool-base.h
index 3533482cf..9060f6b86 100644
--- a/src/ui/tools/tool-base.h
+++ b/src/ui/tools/tool-base.h
@@ -152,6 +152,9 @@ public:
virtual ~ToolBase();
+ ToolBase(const ToolBase&) = delete;
+ ToolBase& operator=(const ToolBase&) = delete;
+
Inkscape::Preferences::Observer *pref_observer;
Glib::RefPtr<Gdk::Cursor> cursor;
@@ -230,8 +233,6 @@ protected:
bool sp_event_context_knot_mouseover() const;
private:
- ToolBase(const ToolBase&) = delete;
- ToolBase& operator=(const ToolBase&) = delete;
bool _keyboardMove(GdkEventKey const &event, Geom::Point const &dir);
diff --git a/src/ui/uxmanager.h b/src/ui/uxmanager.h
index f7d39f59d..5cb799ce9 100644
--- a/src/ui/uxmanager.h
+++ b/src/ui/uxmanager.h
@@ -38,12 +38,11 @@ public:
virtual bool isWidescreen() const = 0;
-protected:
- UXManager();
-
-private:
UXManager( UXManager const & ) = delete;
UXManager & operator=( UXManager const & ) = delete;
+
+protected:
+ UXManager();
};
} // namespace UI
diff --git a/src/ui/widget/combo-tool-item.cpp b/src/ui/widget/combo-tool-item.cpp
index ee9202b6f..eb26e5c6e 100644
--- a/src/ui/widget/combo-tool-item.cpp
+++ b/src/ui/widget/combo-tool-item.cpp
@@ -39,13 +39,13 @@ ComboToolItem::create(const Glib::ustring &group_label,
return new ComboToolItem(group_label, tooltip, stock_id, store);
}
-ComboToolItem::ComboToolItem(const Glib::ustring &group_label,
- const Glib::ustring &tooltip,
- const Glib::ustring &stock_id,
+ComboToolItem::ComboToolItem(Glib::ustring group_label,
+ Glib::ustring tooltip,
+ Glib::ustring stock_id,
Glib::RefPtr<Gtk::ListStore> store ) :
- _group_label( group_label ),
- _tooltip( tooltip ),
- _stock_id( stock_id ),
+ _group_label(std::move( group_label )),
+ _tooltip(std::move( tooltip )),
+ _stock_id(std::move( stock_id )),
_store (std::move(store)),
_use_label (true),
_use_icon (false),
diff --git a/src/ui/widget/combo-tool-item.h b/src/ui/widget/combo-tool-item.h
index 50f81cc43..1e4590163 100644
--- a/src/ui/widget/combo-tool-item.h
+++ b/src/ui/widget/combo-tool-item.h
@@ -105,9 +105,9 @@ private:
void on_changed_combobox();
void on_toggled_radiomenu(int n);
- ComboToolItem(const Glib::ustring &group_label,
- const Glib::ustring &tooltip,
- const Glib::ustring &stock_id,
+ ComboToolItem(Glib::ustring group_label,
+ Glib::ustring tooltip,
+ Glib::ustring stock_id,
Glib::RefPtr<Gtk::ListStore> store );
};
}
diff --git a/src/ui/widget/spin-button-tool-item.cpp b/src/ui/widget/spin-button-tool-item.cpp
index 2efb24ff9..140df1586 100644
--- a/src/ui/widget/spin-button-tool-item.cpp
+++ b/src/ui/widget/spin-button-tool-item.cpp
@@ -274,7 +274,6 @@ SpinButtonToolItem::create_numeric_menu()
auto adj_value = adj->get_value();
auto lower = adj->get_lower();
auto upper = adj->get_upper();
- auto range = upper - lower;
auto step = adj->get_step_increment();
auto page = adj->get_page_increment();
diff --git a/src/ui/widget/spinbutton.h b/src/ui/widget/spinbutton.h
index 33ff11576..c41aabf84 100644
--- a/src/ui/widget/spinbutton.h
+++ b/src/ui/widget/spinbutton.h
@@ -48,6 +48,10 @@ public:
~SpinButton() override = default;;
+ // noncopyable
+ SpinButton(const SpinButton&) = delete;
+ SpinButton& operator=(const SpinButton&) = delete;
+
void setUnitMenu(UnitMenu* unit_menu) { _unit_menu = unit_menu; };
void addUnitTracker(UnitTracker* ut) { _unit_tracker = ut; };
@@ -87,11 +91,6 @@ protected:
* Undo the editing, by resetting the value upon when the spinbutton got focus.
*/
void undo();
-
-private:
- // noncopyable
- SpinButton(const SpinButton&) = delete;
- SpinButton& operator=(const SpinButton&) = delete;
};
} // namespace Widget
diff --git a/src/widgets/toolbox.h b/src/widgets/toolbox.h
index 9a4eef3cd..f396f4d9a 100644
--- a/src/widgets/toolbox.h
+++ b/src/widgets/toolbox.h
@@ -64,7 +64,6 @@ public:
static GtkIconSize prefToSize(Glib::ustring const &path, int base = 0 );
static Gtk::IconSize prefToSize_mm(Glib::ustring const &path, int base = 0);
- private:
ToolboxFactory() = delete;
};