Fix a number of noOperatorEq and noCopyConstructor warnings

This commit is contained in:
Daniel Marjamäki 2018-05-01 09:35:53 +02:00
parent 9710e819be
commit e5c4e31da6
8 changed files with 16 additions and 0 deletions

View File

@ -49,6 +49,8 @@ class CodeEditor : public QPlainTextEdit {
public: public:
explicit CodeEditor(QWidget *parent); explicit CodeEditor(QWidget *parent);
CodeEditor(const CodeEditor &) = delete;
CodeEditor &operator=(const CodeEditor &) = delete;
void lineNumberAreaPaintEvent(QPaintEvent *event); void lineNumberAreaPaintEvent(QPaintEvent *event);
int lineNumberAreaWidth(); int lineNumberAreaWidth();

View File

@ -16,7 +16,9 @@ class LibraryAddFunctionDialog : public QDialog {
public: public:
explicit LibraryAddFunctionDialog(QWidget *parent = 0); explicit LibraryAddFunctionDialog(QWidget *parent = 0);
LibraryAddFunctionDialog(const LibraryAddFunctionDialog &) = delete;
~LibraryAddFunctionDialog(); ~LibraryAddFunctionDialog();
LibraryAddFunctionDialog &operator=(const LibraryAddFunctionDialog &) = delete;
QString functionName() const; QString functionName() const;
int numberOfArguments() const; int numberOfArguments() const;

View File

@ -35,7 +35,9 @@ class LibraryDialog : public QDialog {
public: public:
explicit LibraryDialog(QWidget *parent = 0); explicit LibraryDialog(QWidget *parent = 0);
LibraryDialog(const LibraryDialog &) = delete;
~LibraryDialog(); ~LibraryDialog();
LibraryDialog &operator=(const LibraryDialog &) = delete;
private slots: private slots:
void openCfg(); void openCfg();

View File

@ -13,7 +13,9 @@ class LibraryEditArgDialog : public QDialog {
public: public:
LibraryEditArgDialog(QWidget *parent, const CppcheckLibraryData::Function::Arg &arg); LibraryEditArgDialog(QWidget *parent, const CppcheckLibraryData::Function::Arg &arg);
LibraryEditArgDialog(const LibraryEditArgDialog &) = delete;
~LibraryEditArgDialog(); ~LibraryEditArgDialog();
LibraryEditArgDialog &operator=(const LibraryEditArgDialog &) = delete;
CppcheckLibraryData::Function::Arg getArg() const; CppcheckLibraryData::Function::Arg getArg() const;

View File

@ -54,7 +54,9 @@ public:
enum { MaxRecentProjects = 5 }; enum { MaxRecentProjects = 5 };
MainWindow(TranslationHandler* th, QSettings* settings); MainWindow(TranslationHandler* th, QSettings* settings);
MainWindow(const MainWindow &) = delete;
virtual ~MainWindow(); virtual ~MainWindow();
MainWindow &operator=(const MainWindow &) = delete;
/** /**
* List of checked platforms. * List of checked platforms.

View File

@ -13,7 +13,9 @@ class NewSuppressionDialog : public QDialog {
public: public:
explicit NewSuppressionDialog(QWidget *parent = 0); explicit NewSuppressionDialog(QWidget *parent = 0);
NewSuppressionDialog(const NewSuppressionDialog &) = delete;
~NewSuppressionDialog(); ~NewSuppressionDialog();
NewSuppressionDialog &operator=(const NewSuppressionDialog &) = delete;
Suppressions::Suppression getSuppression() const; Suppressions::Suppression getSuppression() const;

View File

@ -46,7 +46,9 @@ public:
explicit ResultsView(QWidget * parent = 0); explicit ResultsView(QWidget * parent = 0);
void initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler); void initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler);
ResultsView(const ResultsView &) = delete;
virtual ~ResultsView(); virtual ~ResultsView();
ResultsView &operator=(const ResultsView &) = delete;
void setTags(const QStringList &tags) { void setTags(const QStringList &tags) {
mUI.mTree->setTags(tags); mUI.mTree->setTags(tags);

View File

@ -41,7 +41,9 @@ public:
SettingsDialog(ApplicationList *list, SettingsDialog(ApplicationList *list,
TranslationHandler *translator, TranslationHandler *translator,
QWidget *parent = 0); QWidget *parent = 0);
SettingsDialog(const SettingsDialog &) = delete;
virtual ~SettingsDialog(); virtual ~SettingsDialog();
SettingsDialog &operator=(const SettingsDialog &) = delete;
/** /**
* @brief Save all values to QSettings * @brief Save all values to QSettings