From e5c4e31da6490ab874518c644feb475e06bdc1ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Marjam=C3=A4ki?= Date: Tue, 1 May 2018 09:35:53 +0200 Subject: [PATCH] Fix a number of noOperatorEq and noCopyConstructor warnings --- gui/codeeditor.h | 2 ++ gui/libraryaddfunctiondialog.h | 2 ++ gui/librarydialog.h | 2 ++ gui/libraryeditargdialog.h | 2 ++ gui/mainwindow.h | 2 ++ gui/newsuppressiondialog.h | 2 ++ gui/resultsview.h | 2 ++ gui/settingsdialog.h | 2 ++ 8 files changed, 16 insertions(+) diff --git a/gui/codeeditor.h b/gui/codeeditor.h index 5b44cb848..23fd998ad 100644 --- a/gui/codeeditor.h +++ b/gui/codeeditor.h @@ -49,6 +49,8 @@ class CodeEditor : public QPlainTextEdit { public: explicit CodeEditor(QWidget *parent); + CodeEditor(const CodeEditor &) = delete; + CodeEditor &operator=(const CodeEditor &) = delete; void lineNumberAreaPaintEvent(QPaintEvent *event); int lineNumberAreaWidth(); diff --git a/gui/libraryaddfunctiondialog.h b/gui/libraryaddfunctiondialog.h index 465c567af..238cc0002 100644 --- a/gui/libraryaddfunctiondialog.h +++ b/gui/libraryaddfunctiondialog.h @@ -16,7 +16,9 @@ class LibraryAddFunctionDialog : public QDialog { public: explicit LibraryAddFunctionDialog(QWidget *parent = 0); + LibraryAddFunctionDialog(const LibraryAddFunctionDialog &) = delete; ~LibraryAddFunctionDialog(); + LibraryAddFunctionDialog &operator=(const LibraryAddFunctionDialog &) = delete; QString functionName() const; int numberOfArguments() const; diff --git a/gui/librarydialog.h b/gui/librarydialog.h index 3358fc437..58e76d742 100644 --- a/gui/librarydialog.h +++ b/gui/librarydialog.h @@ -35,7 +35,9 @@ class LibraryDialog : public QDialog { public: explicit LibraryDialog(QWidget *parent = 0); + LibraryDialog(const LibraryDialog &) = delete; ~LibraryDialog(); + LibraryDialog &operator=(const LibraryDialog &) = delete; private slots: void openCfg(); diff --git a/gui/libraryeditargdialog.h b/gui/libraryeditargdialog.h index ae9f2858a..ffca06b2b 100644 --- a/gui/libraryeditargdialog.h +++ b/gui/libraryeditargdialog.h @@ -13,7 +13,9 @@ class LibraryEditArgDialog : public QDialog { public: LibraryEditArgDialog(QWidget *parent, const CppcheckLibraryData::Function::Arg &arg); + LibraryEditArgDialog(const LibraryEditArgDialog &) = delete; ~LibraryEditArgDialog(); + LibraryEditArgDialog &operator=(const LibraryEditArgDialog &) = delete; CppcheckLibraryData::Function::Arg getArg() const; diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 7c0bb5444..1936bac88 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -54,7 +54,9 @@ public: enum { MaxRecentProjects = 5 }; MainWindow(TranslationHandler* th, QSettings* settings); + MainWindow(const MainWindow &) = delete; virtual ~MainWindow(); + MainWindow &operator=(const MainWindow &) = delete; /** * List of checked platforms. diff --git a/gui/newsuppressiondialog.h b/gui/newsuppressiondialog.h index 9f51d5cf6..a318d9fc5 100644 --- a/gui/newsuppressiondialog.h +++ b/gui/newsuppressiondialog.h @@ -13,7 +13,9 @@ class NewSuppressionDialog : public QDialog { public: explicit NewSuppressionDialog(QWidget *parent = 0); + NewSuppressionDialog(const NewSuppressionDialog &) = delete; ~NewSuppressionDialog(); + NewSuppressionDialog &operator=(const NewSuppressionDialog &) = delete; Suppressions::Suppression getSuppression() const; diff --git a/gui/resultsview.h b/gui/resultsview.h index d54d15b2f..d50cf39f7 100644 --- a/gui/resultsview.h +++ b/gui/resultsview.h @@ -46,7 +46,9 @@ public: explicit ResultsView(QWidget * parent = 0); void initialize(QSettings *settings, ApplicationList *list, ThreadHandler *checkThreadHandler); + ResultsView(const ResultsView &) = delete; virtual ~ResultsView(); + ResultsView &operator=(const ResultsView &) = delete; void setTags(const QStringList &tags) { mUI.mTree->setTags(tags); diff --git a/gui/settingsdialog.h b/gui/settingsdialog.h index c657d411e..bbe1e1752 100644 --- a/gui/settingsdialog.h +++ b/gui/settingsdialog.h @@ -41,7 +41,9 @@ public: SettingsDialog(ApplicationList *list, TranslationHandler *translator, QWidget *parent = 0); + SettingsDialog(const SettingsDialog &) = delete; virtual ~SettingsDialog(); + SettingsDialog &operator=(const SettingsDialog &) = delete; /** * @brief Save all values to QSettings