From 7668d515d8a982950ff23d48e8fe8812b9e00402 Mon Sep 17 00:00:00 2001
From: Eugene Zelenko <eugene@diakopto.com>
Date: Sun, 10 May 2020 18:53:20 -0700
Subject: [PATCH] Fix Clang -Wextra-semi and
 -Winconsistent-missing-destructor-override appearing during configure run.
 Also fix typos in comments.

---
 qmake/generators/mac/pbuilder_pbx.cpp        | 8 ++++----
 qmake/generators/metamakefile.cpp            | 4 ++--
 qmake/generators/win32/msbuild_objectmodel.h | 4 ++--
 qmake/generators/win32/msvc_objectmodel.h    | 6 +++---
 qmake/generators/win32/msvc_vcproj.h         | 2 +-
 src/corelib/global/qglobal.cpp               | 2 +-
 src/corelib/io/qbuffer.cpp                   | 2 +-
 src/corelib/io/qbuffer.h                     | 2 +-
 src/corelib/io/qfile.h                       | 2 +-
 src/corelib/io/qfile_p.h                     | 2 +-
 src/corelib/io/qfiledevice.h                 | 2 +-
 src/corelib/io/qfiledevice_p.h               | 2 +-
 src/corelib/io/qfsfileengine_iterator_p.h    | 2 +-
 src/corelib/io/qfsfileengine_p.h             | 2 +-
 src/corelib/io/qsettings_p.h                 | 2 +-
 src/corelib/io/qtemporaryfile.h              | 2 +-
 src/corelib/io/qtemporaryfile_p.h            | 4 ++--
 src/corelib/kernel/qmetatype.cpp             | 4 ++--
 src/corelib/kernel/qmetatype.h               | 8 ++++----
 src/corelib/serialization/qxmlstream.cpp     | 2 +-
 20 files changed, 32 insertions(+), 32 deletions(-)

diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp
index c6aab40d85..535e8a858d 100644
--- a/qmake/generators/mac/pbuilder_pbx.cpp
+++ b/qmake/generators/mac/pbuilder_pbx.cpp
@@ -576,7 +576,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
       << "\t" << writeSettings("objectVersion", QString::number(pbVersion), SettingsNoQuote) << ";\n"
       << "\tobjects = {\n";
 
-    //MAKE QMAKE equivelant
+    //MAKE QMAKE equivalent
     if (!project->isActiveConfig("no_autoqmake")) {
         QString mkfile = pbx_dir + Option::dir_sep + "qt_makeqmake.mak";
         QFile mkf(mkfile);
@@ -1065,7 +1065,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
           << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
           << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n"
           // The build phases are not executed in the order they are defined, but by their
-          // resolved dependenices, so we have to ensure that this phase is run after the
+          // resolved dependencies, so we have to ensure that this phase is run after the
           // compilation phase, and before the link phase. Making the phase depend on the
           // object file directory, and "write" to the list of files to link achieves that.
           << "\t\t\t" << writeSettings("inputPaths", inputPaths, SettingsAsList, 4) << ";\n"
@@ -1112,7 +1112,7 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
           << "\t\t\t" << writeSettings("buildActionMask", "2147483647", SettingsNoQuote) << ";\n"
           << "\t\t\t" << writeSettings("files", ProStringList(), SettingsAsList, 4) << ";\n"
           // The build phases are not executed in the order they are defined, but by their
-          // resolved dependenices, so we have to ensure the phase is run after linking.
+          // resolved dependencies, so we have to ensure the phase is run after linking.
           << "\t\t\t" << writeSettings("inputPaths", ProStringList("$(TARGET_BUILD_DIR)/$(EXECUTABLE_PATH)"), SettingsAsList, 4) << ";\n"
           << "\t\t\t" << writeSettings("isa", "PBXShellScriptBuildPhase", SettingsNoQuote) << ";\n"
           << "\t\t\t" << writeSettings("runOnlyForDeploymentPostprocessing", "0", SettingsNoQuote) << ";\n"
@@ -1975,7 +1975,7 @@ static QString quotedStringLiteral(const QString &value)
 
     // Escape
     for (int i = 0; i < len; ++i) {
-        QChar character = value.at(i);;
+        QChar character = value.at(i);
         ushort code = character.unicode();
         switch (code) {
         case '\\':
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 7776d77008..6c4c882889 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -67,7 +67,7 @@ private:
 public:
 
     BuildsMetaMakefileGenerator(QMakeProject *p, const QString &n, bool op) : MetaMakefileGenerator(p, n, op), init_flag(false) { }
-    ~BuildsMetaMakefileGenerator() { clearBuilds(); }
+    ~BuildsMetaMakefileGenerator() override { clearBuilds(); }
 
     bool init() override;
     int type() const override { return BUILDSMETATYPE; }
@@ -300,7 +300,7 @@ protected:
 
 public:
     SubdirsMetaMakefileGenerator(QMakeProject *p, const QString &n, bool op) : MetaMakefileGenerator(p, n, op), init_flag(false) { }
-    ~SubdirsMetaMakefileGenerator();
+    ~SubdirsMetaMakefileGenerator() override;
 
     bool init() override;
     int type() const override { return SUBDIRSMETATYPE; }
diff --git a/qmake/generators/win32/msbuild_objectmodel.h b/qmake/generators/win32/msbuild_objectmodel.h
index ce5711f2da..4713796baf 100644
--- a/qmake/generators/win32/msbuild_objectmodel.h
+++ b/qmake/generators/win32/msbuild_objectmodel.h
@@ -60,7 +60,7 @@ class XTreeNode : public XNode
     ChildrenMap children;
 
 public:
-    virtual ~XTreeNode() { removeElements(); }
+    ~XTreeNode() override { removeElements(); }
 
     int pathIndex(const QString &filepath) {
         int Windex = filepath.indexOf("\\");
@@ -112,7 +112,7 @@ class XFlatNode : public XNode
     ChildrenMapFlat children;
 
 public:
-    virtual ~XFlatNode() { removeElements(); }
+    ~XFlatNode() override { removeElements(); }
 
     int pathIndex(const QString &filepath) {
         int Windex = filepath.lastIndexOf("\\");
diff --git a/qmake/generators/win32/msvc_objectmodel.h b/qmake/generators/win32/msvc_objectmodel.h
index 33eff0d914..76b06652e8 100644
--- a/qmake/generators/win32/msvc_objectmodel.h
+++ b/qmake/generators/win32/msvc_objectmodel.h
@@ -59,7 +59,7 @@ enum DotNET {
 DotNET vsVersionFromString(const ProString &versionString);
 
 /*
-    This Object model is of course VERY simplyfied,
+    This Object model is of course VERY simplified,
     and does not actually follow the original MSVC
     object model. However, it fulfilles the basic
     needs for qmake
@@ -1027,7 +1027,7 @@ class TreeNode : public Node
     ChildrenMap children;
 
 public:
-    virtual ~TreeNode() { removeElements(); }
+    ~TreeNode() override { removeElements(); }
 
     int pathIndex(const QString &filepath) {
         int Windex = filepath.indexOf("\\");
@@ -1078,7 +1078,7 @@ class FlatNode : public Node
     ChildrenMapFlat children;
 
 public:
-    virtual ~FlatNode() { removeElements(); }
+    ~FlatNode() override { removeElements(); }
 
     int pathIndex(const QString &filepath) {
         int Windex = filepath.lastIndexOf("\\");
diff --git a/qmake/generators/win32/msvc_vcproj.h b/qmake/generators/win32/msvc_vcproj.h
index c565b709d2..a31b75ae7e 100644
--- a/qmake/generators/win32/msvc_vcproj.h
+++ b/qmake/generators/win32/msvc_vcproj.h
@@ -54,7 +54,7 @@ class VcprojGenerator : public Win32MakefileGenerator
 
 public:
     VcprojGenerator();
-    ~VcprojGenerator();
+    ~VcprojGenerator() override;
 
     QString defaultMakefile() const;
     QString precompH, precompHFilename, precompSource,
diff --git a/src/corelib/global/qglobal.cpp b/src/corelib/global/qglobal.cpp
index 2b2a03cc76..fe681778c9 100644
--- a/src/corelib/global/qglobal.cpp
+++ b/src/corelib/global/qglobal.cpp
@@ -3152,7 +3152,7 @@ QByteArray QSysInfo::bootUniqueId()
         return QByteArray(uuid, uuidlen - 1);
 #endif
     return QByteArray();
-};
+}
 
 /*!
     \macro void Q_ASSERT(bool test)
diff --git a/src/corelib/io/qbuffer.cpp b/src/corelib/io/qbuffer.cpp
index 595fcd2724..c1dacf1681 100644
--- a/src/corelib/io/qbuffer.cpp
+++ b/src/corelib/io/qbuffer.cpp
@@ -55,7 +55,7 @@ public:
         , writtenSinceLastEmit(0), signalConnectionCount(0), signalsEmitted(false)
 #endif
     { }
-    ~QBufferPrivate() { }
+    ~QBufferPrivate() override = default;
 
     QByteArray *buf;
     QByteArray defaultBuf;
diff --git a/src/corelib/io/qbuffer.h b/src/corelib/io/qbuffer.h
index 39e1e7b39d..a5e9e12bab 100644
--- a/src/corelib/io/qbuffer.h
+++ b/src/corelib/io/qbuffer.h
@@ -63,7 +63,7 @@ public:
      QBuffer();
      explicit QBuffer(QByteArray *buf);
 #endif
-    ~QBuffer();
+    ~QBuffer() override;
 
     QByteArray &buffer();
     const QByteArray &buffer() const;
diff --git a/src/corelib/io/qfile.h b/src/corelib/io/qfile.h
index dab20b85a1..40bc2ba41e 100644
--- a/src/corelib/io/qfile.h
+++ b/src/corelib/io/qfile.h
@@ -118,7 +118,7 @@ public:
     }
 #endif // QT_CONFIG(cxx17_filesystem)
 #endif // !QT_NO_QOBJECT
-    ~QFile();
+    ~QFile() override;
 
     QString fileName() const override;
 #if QT_CONFIG(cxx17_filesystem)
diff --git a/src/corelib/io/qfile_p.h b/src/corelib/io/qfile_p.h
index 545890c6b3..9bfb525344 100644
--- a/src/corelib/io/qfile_p.h
+++ b/src/corelib/io/qfile_p.h
@@ -65,7 +65,7 @@ class QFilePrivate : public QFileDevicePrivate
 
 protected:
     QFilePrivate();
-    ~QFilePrivate();
+    ~QFilePrivate() override;
 
     bool openExternalFile(int flags, int fd, QFile::FileHandleFlags handleFlags);
     bool openExternalFile(int flags, FILE *fh, QFile::FileHandleFlags handleFlags);
diff --git a/src/corelib/io/qfiledevice.h b/src/corelib/io/qfiledevice.h
index 2d524193c5..fb4aa1b640 100644
--- a/src/corelib/io/qfiledevice.h
+++ b/src/corelib/io/qfiledevice.h
@@ -95,7 +95,7 @@ public:
     };
     Q_DECLARE_FLAGS(FileHandleFlags, FileHandleFlag)
 
-    ~QFileDevice();
+    ~QFileDevice() override;
 
     FileError error() const;
     void unsetError();
diff --git a/src/corelib/io/qfiledevice_p.h b/src/corelib/io/qfiledevice_p.h
index aef3fca811..7212a0a75c 100644
--- a/src/corelib/io/qfiledevice_p.h
+++ b/src/corelib/io/qfiledevice_p.h
@@ -65,7 +65,7 @@ class QFileDevicePrivate : public QIODevicePrivate
     Q_DECLARE_PUBLIC(QFileDevice)
 protected:
     QFileDevicePrivate();
-    ~QFileDevicePrivate();
+    ~QFileDevicePrivate() override;
 
     virtual QAbstractFileEngine *engine() const;
 
diff --git a/src/corelib/io/qfsfileengine_iterator_p.h b/src/corelib/io/qfsfileengine_iterator_p.h
index bde00bf578..9681344249 100644
--- a/src/corelib/io/qfsfileengine_iterator_p.h
+++ b/src/corelib/io/qfsfileengine_iterator_p.h
@@ -66,7 +66,7 @@ class QFSFileEngineIterator : public QAbstractFileEngineIterator
 {
 public:
     QFSFileEngineIterator(QDir::Filters filters, const QStringList &filterNames);
-    ~QFSFileEngineIterator();
+    ~QFSFileEngineIterator() override;
 
     QString next() override;
     bool hasNext() const override;
diff --git a/src/corelib/io/qfsfileengine_p.h b/src/corelib/io/qfsfileengine_p.h
index 639c01571a..8a461a65f1 100644
--- a/src/corelib/io/qfsfileengine_p.h
+++ b/src/corelib/io/qfsfileengine_p.h
@@ -76,7 +76,7 @@ class Q_CORE_EXPORT QFSFileEngine : public QAbstractFileEngine
 public:
     QFSFileEngine();
     explicit QFSFileEngine(const QString &file);
-    ~QFSFileEngine();
+    ~QFSFileEngine() override;
 
     bool open(QIODevice::OpenMode openMode) override;
     bool open(QIODevice::OpenMode flags, FILE *fh);
diff --git a/src/corelib/io/qsettings_p.h b/src/corelib/io/qsettings_p.h
index c30f099a72..9971b8fb3f 100644
--- a/src/corelib/io/qsettings_p.h
+++ b/src/corelib/io/qsettings_p.h
@@ -267,7 +267,7 @@ public:
     QConfFileSettingsPrivate(QSettings::Format format, QSettings::Scope scope,
                              const QString &organization, const QString &application);
     QConfFileSettingsPrivate(const QString &fileName, QSettings::Format format);
-    ~QConfFileSettingsPrivate();
+    ~QConfFileSettingsPrivate() override;
 
     void remove(const QString &key) override;
     void set(const QString &key, const QVariant &value) override;
diff --git a/src/corelib/io/qtemporaryfile.h b/src/corelib/io/qtemporaryfile.h
index 90a6a613e6..75ca9bafa1 100644
--- a/src/corelib/io/qtemporaryfile.h
+++ b/src/corelib/io/qtemporaryfile.h
@@ -69,7 +69,7 @@ public:
     explicit QTemporaryFile(QObject *parent);
     QTemporaryFile(const QString &templateName, QObject *parent);
 #endif
-    ~QTemporaryFile();
+    ~QTemporaryFile() override;
 
     bool autoRemove() const;
     void setAutoRemove(bool b);
diff --git a/src/corelib/io/qtemporaryfile_p.h b/src/corelib/io/qtemporaryfile_p.h
index 6bcff936b4..493a284fe6 100644
--- a/src/corelib/io/qtemporaryfile_p.h
+++ b/src/corelib/io/qtemporaryfile_p.h
@@ -90,7 +90,7 @@ class QTemporaryFilePrivate : public QFilePrivate
 public:
     QTemporaryFilePrivate();
     explicit QTemporaryFilePrivate(const QString &templateNameIn);
-    ~QTemporaryFilePrivate();
+    ~QTemporaryFilePrivate() override;
 
     QAbstractFileEngine *engine() const override;
     void resetFileEngine() const;
@@ -128,7 +128,7 @@ public:
             QFSFileEngine::setFileName(file);
         }
     }
-    ~QTemporaryFileEngine();
+    ~QTemporaryFileEngine() override;
 
     bool isReallyOpen() const;
     void setFileName(const QString &file) override;
diff --git a/src/corelib/kernel/qmetatype.cpp b/src/corelib/kernel/qmetatype.cpp
index c34e442cdb..6025141830 100644
--- a/src/corelib/kernel/qmetatype.cpp
+++ b/src/corelib/kernel/qmetatype.cpp
@@ -148,7 +148,7 @@ struct QMetaTypeCustomRegistry
         if (ti->legacyRegisterOp)
             ti->legacyRegisterOp();
         return ti->typeId;
-    };
+    }
 
     void unregisterDynamicType(int id)
     {
@@ -534,7 +534,7 @@ QMetaType::TypeFlags QMetaType::flags() const
 
     If the type is a pointer type to a subclass of QObject, flags() contains
     QMetaType::PointerToQObject and this function returns the corresponding QMetaObject. This can
-    be used to in combinaison with QMetaObject::construct to create QObject of this type.
+    be used to in combination with QMetaObject::construct to create QObject of this type.
 
     If the type is a Q_GADGET, flags() contains QMetaType::IsGadget, and this function returns its
     QMetaObject.  This can be used to retrieve QMetaMethod and QMetaProperty and use them on a
diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h
index eb81ac4c28..bf86e895a2 100644
--- a/src/corelib/kernel/qmetatype.h
+++ b/src/corelib/kernel/qmetatype.h
@@ -2326,7 +2326,7 @@ private:
                 || s == '_');
     }
     static constexpr bool is_space(char s) { return (s == ' ' || s == '\t' || s == '\n'); }
-    static constexpr bool is_number(char s) { return s >= '0' && s <= '9'; };
+    static constexpr bool is_number(char s) { return s >= '0' && s <= '9'; }
     static constexpr bool starts_with_token(const char *b, const char *e, const char *token,
                                             bool msvcKw = false)
     {
@@ -2371,7 +2371,7 @@ private:
         if (x != e)
             x++;
         return x;
-    };
+    }
     static constexpr const char *skipTemplate(const char *x, const char *e, bool stopAtComa = false)
     {
         int scopeDepth = 0;
@@ -2412,7 +2412,7 @@ private:
             x++;
         }
         return x;
-    };
+    }
 
     constexpr void append(char x)
     {
@@ -2426,7 +2426,7 @@ private:
     {
         while (*x)
             append(*x++);
-    };
+    }
 
 public:
     constexpr int normalizeType(const char *begin, const char *end, bool adjustConst = true)
diff --git a/src/corelib/serialization/qxmlstream.cpp b/src/corelib/serialization/qxmlstream.cpp
index 9391b3861a..333e5464cc 100644
--- a/src/corelib/serialization/qxmlstream.cpp
+++ b/src/corelib/serialization/qxmlstream.cpp
@@ -1093,7 +1093,7 @@ bool QXmlStreamReaderPrivate::scanAfterLangleBang()
 
     default:
         ;
-    };
+    }
     return false;
 }
 
-- 
2.17.1

