diff options
author | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-05-10 11:06:46 +0200 |
---|---|---|
committer | Joerg Bornemann <joerg.bornemann@qt.io> | 2019-05-16 11:36:22 +0000 |
commit | 43a66453c5b04d5ee877ef80dca15f90c697e536 (patch) | |
tree | cec3bc07362f3b4b1ea81b9d9aab945209324054 /qmake | |
parent | db525e6e9d90350cb9778e745f43271aca4cb4e6 (diff) |
Clean up class definitions of makefile generators
Remove pointless constructors and destructors.
Change-Id: I7aea8587bf3598b6f5324aac8898edf227475d63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'qmake')
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.h | 7 | ||||
-rw-r--r-- | qmake/generators/makefile.cpp | 7 | ||||
-rw-r--r-- | qmake/generators/makefile.h | 9 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/projectgenerator.h | 5 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake.h | 9 | ||||
-rw-r--r-- | qmake/generators/unix/unixmake2.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/mingw_make.h | 6 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.cpp | 5 | ||||
-rw-r--r-- | qmake/generators/win32/msvc_nmake.h | 11 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.cpp | 4 | ||||
-rw-r--r-- | qmake/generators/win32/winmakefile.h | 6 |
14 files changed, 5 insertions, 82 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index 3bed28afdf..c97b7051de 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -60,11 +60,6 @@ static QString qtSha1(const QByteArray &src) return QString::fromLatin1(digest.toHex()); } -ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator() : UnixMakefileGenerator() -{ - -} - bool ProjectBuilderMakefileGenerator::writeMakefile(QTextStream &t) { diff --git a/qmake/generators/mac/pbuilder_pbx.h b/qmake/generators/mac/pbuilder_pbx.h index f15c814cb4..ac0d63606d 100644 --- a/qmake/generators/mac/pbuilder_pbx.h +++ b/qmake/generators/mac/pbuilder_pbx.h @@ -61,19 +61,12 @@ class ProjectBuilderMakefileGenerator : public UnixMakefileGenerator QString writeSettings(const QString &var, const ProStringList &vals, int flags=0, int indent_level=0); public: - ProjectBuilderMakefileGenerator(); - ~ProjectBuilderMakefileGenerator(); - bool supportsMetaBuild() override { return false; } bool openOutput(QFile &, const QString &) const override; protected: bool doPrecompiledHeaders() const override { return false; } bool doDepends() const override { return writingUnixMakefileGenerator && UnixMakefileGenerator::doDepends(); } }; - -inline ProjectBuilderMakefileGenerator::~ProjectBuilderMakefileGenerator() -{ } - QT_END_NAMESPACE #endif // PBUILDER_PBX_H diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 1a7a7a4322..cfd71a911b 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -94,13 +94,6 @@ bool MakefileGenerator::mkdir(const QString &in_path) const return QDir().mkpath(path); } -// ** base makefile generator -MakefileGenerator::MakefileGenerator() : - no_io(false), project(nullptr) -{ -} - - void MakefileGenerator::verifyCompilers() { diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h index 350ebd377a..ecda6eb257 100644 --- a/qmake/generators/makefile.h +++ b/qmake/generators/makefile.h @@ -54,7 +54,7 @@ struct ReplaceExtraCompilerCacheKey; class MakefileGenerator : protected QMakeSourceFileInfo { QString spec; - bool no_io; + bool no_io = false; bool resolveDependenciesInFrameworks = false; QHash<QString, bool> init_compiler_already; QString makedir, chkexists; @@ -131,7 +131,7 @@ protected: QMakeLocalFileName fixPathForFile(const QMakeLocalFileName &, bool) override; QMakeLocalFileName findFileForDep(const QMakeLocalFileName &, const QMakeLocalFileName &) override; QFileInfo findFileInfo(const QMakeLocalFileName &) override; - QMakeProject *project; + QMakeProject *project = nullptr; //escape virtual QString escapeFilePath(const QString &path) const = 0; @@ -256,8 +256,6 @@ protected: const QString &fixedFile); public: - MakefileGenerator(); - ~MakefileGenerator(); QMakeProject *projectFile() const; void setProjectFile(QMakeProject *p); @@ -295,9 +293,6 @@ inline QString MakefileGenerator::installRoot() const inline bool MakefileGenerator::findLibraries(bool, bool) { return true; } -inline MakefileGenerator::~MakefileGenerator() -{ } - struct ReplaceExtraCompilerCacheKey { mutable uint hash; diff --git a/qmake/generators/projectgenerator.cpp b/qmake/generators/projectgenerator.cpp index f729ec89ef..119dd652b3 100644 --- a/qmake/generators/projectgenerator.cpp +++ b/qmake/generators/projectgenerator.cpp @@ -50,10 +50,6 @@ QString project_builtin_regx() //calculate the builtin regular expression.. return ret; } -ProjectGenerator::ProjectGenerator() : MakefileGenerator() -{ -} - void ProjectGenerator::init() { diff --git a/qmake/generators/projectgenerator.h b/qmake/generators/projectgenerator.h index cbc9f371ab..e9b050cc74 100644 --- a/qmake/generators/projectgenerator.h +++ b/qmake/generators/projectgenerator.h @@ -46,15 +46,10 @@ protected: QString escapeFilePath(const QString &path) const override { Q_ASSERT(false); return QString(); } public: - ProjectGenerator(); - ~ProjectGenerator(); bool supportsMetaBuild() override { return false; } bool openOutput(QFile &, const QString &) const override; }; -inline ProjectGenerator::~ProjectGenerator() -{ } - QT_END_NAMESPACE #endif // PROJECTGENERATOR_H diff --git a/qmake/generators/unix/unixmake.h b/qmake/generators/unix/unixmake.h index 5b0766855b..901419d3cc 100644 --- a/qmake/generators/unix/unixmake.h +++ b/qmake/generators/unix/unixmake.h @@ -35,15 +35,11 @@ QT_BEGIN_NAMESPACE class UnixMakefileGenerator : public MakefileGenerator { - bool include_deps; + bool include_deps = false; QString libtoolFileName(bool fixify=true); void writeLibtoolFile(); // for libtool void writePrlFile(QTextStream &) override; -public: - UnixMakefileGenerator(); - ~UnixMakefileGenerator(); - protected: virtual bool doPrecompiledHeaders() const { return project->isActiveConfig("precompile_header"); } bool doDepends() const override { return !Option::mkfile::do_stub_makefile && MakefileGenerator::doDepends(); } @@ -69,9 +65,6 @@ private: ProStringList libdirToFlags(const ProKey &key); }; -inline UnixMakefileGenerator::~UnixMakefileGenerator() -{ } - QT_END_NAMESPACE #endif // UNIXMAKE_H diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index a384439aac..7d72347d37 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -39,11 +39,6 @@ QT_BEGIN_NAMESPACE -UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), include_deps(false) -{ - -} - void UnixMakefileGenerator::writePrlFile(QTextStream &t) { diff --git a/qmake/generators/win32/mingw_make.cpp b/qmake/generators/win32/mingw_make.cpp index eb771a695a..325823e1d9 100644 --- a/qmake/generators/win32/mingw_make.cpp +++ b/qmake/generators/win32/mingw_make.cpp @@ -38,10 +38,6 @@ QT_BEGIN_NAMESPACE -MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator() -{ -} - QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const { QString ret = path; diff --git a/qmake/generators/win32/mingw_make.h b/qmake/generators/win32/mingw_make.h index 5da5b24088..8cae28a78b 100644 --- a/qmake/generators/win32/mingw_make.h +++ b/qmake/generators/win32/mingw_make.h @@ -35,9 +35,6 @@ QT_BEGIN_NAMESPACE class MingwMakefileGenerator : public Win32MakefileGenerator { -public: - MingwMakefileGenerator(); - ~MingwMakefileGenerator(); protected: using MakefileGenerator::escapeDependencyPath; QString escapeDependencyPath(const QString &path) const override; @@ -65,9 +62,6 @@ private: QString objectsLinkLine; }; -inline MingwMakefileGenerator::~MingwMakefileGenerator() -{ } - QT_END_NAMESPACE #endif // MINGW_MAKE_H diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp index f48eea9202..1f6223f01d 100644 --- a/qmake/generators/win32/msvc_nmake.cpp +++ b/qmake/generators/win32/msvc_nmake.cpp @@ -38,11 +38,6 @@ QT_BEGIN_NAMESPACE -NmakeMakefileGenerator::NmakeMakefileGenerator() : usePCH(false), usePCHC(false) -{ - -} - bool NmakeMakefileGenerator::writeMakefile(QTextStream &t) { diff --git a/qmake/generators/win32/msvc_nmake.h b/qmake/generators/win32/msvc_nmake.h index 5bfdba2bbc..3064f06521 100644 --- a/qmake/generators/win32/msvc_nmake.h +++ b/qmake/generators/win32/msvc_nmake.h @@ -54,17 +54,10 @@ protected: QString var(const ProKey &value) const override; QString precompH, precompObj, precompPch; QString precompObjC, precompPchC; - bool usePCH, usePCHC; - -public: - NmakeMakefileGenerator(); - ~NmakeMakefileGenerator(); - + bool usePCH = false; + bool usePCHC = false; }; -inline NmakeMakefileGenerator::~NmakeMakefileGenerator() -{ } - QT_END_NAMESPACE #endif // MSVC_NMAKE_H diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp index 8ee86ac395..2c4766584a 100644 --- a/qmake/generators/win32/winmakefile.cpp +++ b/qmake/generators/win32/winmakefile.cpp @@ -40,10 +40,6 @@ QT_BEGIN_NAMESPACE -Win32MakefileGenerator::Win32MakefileGenerator() : MakefileGenerator() -{ -} - ProString Win32MakefileGenerator::fixLibFlag(const ProString &lib) { if (lib.startsWith("-l")) // Fallback for unresolved -l libs. diff --git a/qmake/generators/win32/winmakefile.h b/qmake/generators/win32/winmakefile.h index 4416951a09..33af195965 100644 --- a/qmake/generators/win32/winmakefile.h +++ b/qmake/generators/win32/winmakefile.h @@ -35,9 +35,6 @@ QT_BEGIN_NAMESPACE class Win32MakefileGenerator : public MakefileGenerator { -public: - Win32MakefileGenerator(); - ~Win32MakefileGenerator(); protected: QString defaultInstall(const QString &) override; virtual void writeCleanParts(QTextStream &t); @@ -68,9 +65,6 @@ protected: virtual QString getManifestFileForRcFile() const; }; -inline Win32MakefileGenerator::~Win32MakefileGenerator() -{ } - QT_END_NAMESPACE #endif // WINMAKEFILE_H |