Clean up class definitions of makefile generators

Remove pointless constructors and destructors.

Change-Id: I7aea8587bf3598b6f5324aac8898edf227475d63
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Joerg Bornemann 2019-05-10 11:06:46 +02:00
parent db525e6e9d
commit 43a66453c5
14 changed files with 5 additions and 82 deletions

View File

@ -60,11 +60,6 @@ static QString qtSha1(const QByteArray &src)
return QString::fromLatin1(digest.toHex());
}
ProjectBuilderMakefileGenerator::ProjectBuilderMakefileGenerator() : UnixMakefileGenerator()
{
}
bool
ProjectBuilderMakefileGenerator::writeMakefile(QTextStream &t)
{

View File

@ -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

View File

@ -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()
{

View File

@ -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;

View File

@ -50,10 +50,6 @@ QString project_builtin_regx() //calculate the builtin regular expression..
return ret;
}
ProjectGenerator::ProjectGenerator() : MakefileGenerator()
{
}
void
ProjectGenerator::init()
{

View File

@ -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

View File

@ -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

View File

@ -39,11 +39,6 @@
QT_BEGIN_NAMESPACE
UnixMakefileGenerator::UnixMakefileGenerator() : MakefileGenerator(), include_deps(false)
{
}
void
UnixMakefileGenerator::writePrlFile(QTextStream &t)
{

View File

@ -38,10 +38,6 @@
QT_BEGIN_NAMESPACE
MingwMakefileGenerator::MingwMakefileGenerator() : Win32MakefileGenerator()
{
}
QString MingwMakefileGenerator::escapeDependencyPath(const QString &path) const
{
QString ret = path;

View File

@ -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

View File

@ -38,11 +38,6 @@
QT_BEGIN_NAMESPACE
NmakeMakefileGenerator::NmakeMakefileGenerator() : usePCH(false), usePCHC(false)
{
}
bool
NmakeMakefileGenerator::writeMakefile(QTextStream &t)
{

View File

@ -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

View File

@ -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.

View File

@ -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