mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-26 03:11:59 +00:00
Forbid wrong compiler generated copy constructors
This fixes cppcheck warnings (style) 'class x' does not have a copy constructor which is recommended since the class contains a pointer to allocated memory.
This commit is contained in:
parent
141026b6b1
commit
1ad4d9e657
@ -27,6 +27,9 @@ namespace lyx {
|
|||||||
|
|
||||||
class Thesaurus
|
class Thesaurus
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
Thesaurus(Thesaurus const &);
|
||||||
|
void operator=(Thesaurus const &);
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
Thesaurus();
|
Thesaurus();
|
||||||
|
@ -47,6 +47,9 @@ enum UndoKind {
|
|||||||
|
|
||||||
class Undo
|
class Undo
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
Undo(Undo const &);
|
||||||
|
void operator=(Undo const &);
|
||||||
public:
|
public:
|
||||||
|
|
||||||
Undo(Buffer &);
|
Undo(Buffer &);
|
||||||
|
@ -25,6 +25,9 @@ namespace lyx {
|
|||||||
*/
|
*/
|
||||||
class FileDialog
|
class FileDialog
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
FileDialog(FileDialog const &);
|
||||||
|
void operator=(FileDialog const &);
|
||||||
public:
|
public:
|
||||||
/// label, directory path button
|
/// label, directory path button
|
||||||
typedef std::pair<QString, QString> Button;
|
typedef std::pair<QString, QString> Button;
|
||||||
|
@ -269,8 +269,12 @@ typedef shared_ptr<Dialog> DialogPtr;
|
|||||||
} // namespace anon
|
} // namespace anon
|
||||||
|
|
||||||
|
|
||||||
struct GuiView::GuiViewPrivate
|
class GuiView::GuiViewPrivate
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
GuiViewPrivate(GuiViewPrivate const &);
|
||||||
|
void operator=(GuiViewPrivate const &);
|
||||||
|
public:
|
||||||
GuiViewPrivate(GuiView * gv)
|
GuiViewPrivate(GuiView * gv)
|
||||||
: gv_(gv), current_work_area_(0), current_main_work_area_(0),
|
: gv_(gv), current_work_area_(0), current_main_work_area_(0),
|
||||||
layout_(0), autosave_timeout_(5000),
|
layout_(0), autosave_timeout_(5000),
|
||||||
|
@ -287,7 +287,7 @@ private:
|
|||||||
bool goToFileRow(std::string const & argument);
|
bool goToFileRow(std::string const & argument);
|
||||||
|
|
||||||
///
|
///
|
||||||
struct GuiViewPrivate;
|
class GuiViewPrivate;
|
||||||
GuiViewPrivate & d;
|
GuiViewPrivate & d;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -103,8 +103,12 @@ public:
|
|||||||
//
|
//
|
||||||
/////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
struct LayoutBox::Private
|
class LayoutBox::Private
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
Private(Private const &);
|
||||||
|
void operator=(Private const &);
|
||||||
|
public:
|
||||||
Private(LayoutBox * parent, GuiView & gv) : p(parent), owner_(gv),
|
Private(LayoutBox * parent, GuiView & gv) : p(parent), owner_(gv),
|
||||||
inset_(0),
|
inset_(0),
|
||||||
// set the layout model with two columns
|
// set the layout model with two columns
|
||||||
|
@ -61,7 +61,7 @@ private Q_SLOTS:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
friend class LayoutItemDelegate;
|
friend class LayoutItemDelegate;
|
||||||
struct Private;
|
class Private;
|
||||||
Private * const d;
|
Private * const d;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -58,6 +58,9 @@ private:
|
|||||||
|
|
||||||
class Menus
|
class Menus
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
Menus(Menus const &);
|
||||||
|
void operator=(Menus const &);
|
||||||
public:
|
public:
|
||||||
Menus();
|
Menus();
|
||||||
~Menus();
|
~Menus();
|
||||||
|
@ -34,6 +34,9 @@ class TocTypeModel;
|
|||||||
/// There is one TocModel per list in the TocBackend.
|
/// There is one TocModel per list in the TocBackend.
|
||||||
class TocModel
|
class TocModel
|
||||||
{
|
{
|
||||||
|
/// noncopyable
|
||||||
|
TocModel(TocModel const &);
|
||||||
|
void operator=(TocModel const &);
|
||||||
public:
|
public:
|
||||||
///
|
///
|
||||||
TocModel(QObject * parent);
|
TocModel(QObject * parent);
|
||||||
|
Loading…
Reference in New Issue
Block a user