mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-22 01:59:02 +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
|
||||
{
|
||||
/// noncopyable
|
||||
Thesaurus(Thesaurus const &);
|
||||
void operator=(Thesaurus const &);
|
||||
public:
|
||||
///
|
||||
Thesaurus();
|
||||
|
@ -47,6 +47,9 @@ enum UndoKind {
|
||||
|
||||
class Undo
|
||||
{
|
||||
/// noncopyable
|
||||
Undo(Undo const &);
|
||||
void operator=(Undo const &);
|
||||
public:
|
||||
|
||||
Undo(Buffer &);
|
||||
|
@ -25,6 +25,9 @@ namespace lyx {
|
||||
*/
|
||||
class FileDialog
|
||||
{
|
||||
/// noncopyable
|
||||
FileDialog(FileDialog const &);
|
||||
void operator=(FileDialog const &);
|
||||
public:
|
||||
/// label, directory path button
|
||||
typedef std::pair<QString, QString> Button;
|
||||
|
@ -269,8 +269,12 @@ typedef shared_ptr<Dialog> DialogPtr;
|
||||
} // namespace anon
|
||||
|
||||
|
||||
struct GuiView::GuiViewPrivate
|
||||
class GuiView::GuiViewPrivate
|
||||
{
|
||||
/// noncopyable
|
||||
GuiViewPrivate(GuiViewPrivate const &);
|
||||
void operator=(GuiViewPrivate const &);
|
||||
public:
|
||||
GuiViewPrivate(GuiView * gv)
|
||||
: gv_(gv), current_work_area_(0), current_main_work_area_(0),
|
||||
layout_(0), autosave_timeout_(5000),
|
||||
|
@ -287,7 +287,7 @@ private:
|
||||
bool goToFileRow(std::string const & argument);
|
||||
|
||||
///
|
||||
struct GuiViewPrivate;
|
||||
class GuiViewPrivate;
|
||||
GuiViewPrivate & d;
|
||||
|
||||
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),
|
||||
inset_(0),
|
||||
// set the layout model with two columns
|
||||
|
@ -61,7 +61,7 @@ private Q_SLOTS:
|
||||
|
||||
private:
|
||||
friend class LayoutItemDelegate;
|
||||
struct Private;
|
||||
class Private;
|
||||
Private * const d;
|
||||
};
|
||||
|
||||
|
@ -58,6 +58,9 @@ private:
|
||||
|
||||
class Menus
|
||||
{
|
||||
/// noncopyable
|
||||
Menus(Menus const &);
|
||||
void operator=(Menus const &);
|
||||
public:
|
||||
Menus();
|
||||
~Menus();
|
||||
|
@ -34,6 +34,9 @@ class TocTypeModel;
|
||||
/// There is one TocModel per list in the TocBackend.
|
||||
class TocModel
|
||||
{
|
||||
/// noncopyable
|
||||
TocModel(TocModel const &);
|
||||
void operator=(TocModel const &);
|
||||
public:
|
||||
///
|
||||
TocModel(QObject * parent);
|
||||
|
Loading…
Reference in New Issue
Block a user