forked from qt-creator/qt-creator
Header cleaning: Make Toolchain::equals take const parameters.
This commit is contained in:
@@ -58,7 +58,7 @@ static const char MSVC_RegKey[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Mi
|
||||
static const char MSVC_RegKey[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7";
|
||||
#endif
|
||||
|
||||
bool ToolChain::equals(ToolChain *a, ToolChain *b)
|
||||
bool ToolChain::equals(const ToolChain *a, const ToolChain *b)
|
||||
{
|
||||
if (a == b)
|
||||
return true;
|
||||
@@ -322,9 +322,9 @@ IOutputParser *GccToolChain::outputParser() const
|
||||
return new GccParser;
|
||||
}
|
||||
|
||||
bool GccToolChain::equals(ToolChain *other) const
|
||||
bool GccToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
return (m_gcc == static_cast<GccToolChain *>(other)->m_gcc);
|
||||
return (m_gcc == static_cast<const GccToolChain *>(other)->m_gcc);
|
||||
}
|
||||
|
||||
MinGWToolChain::MinGWToolChain(const QString &gcc, const QString &mingwPath)
|
||||
@@ -338,9 +338,9 @@ ToolChain::ToolChainType MinGWToolChain::type() const
|
||||
return ToolChain::MinGW;
|
||||
}
|
||||
|
||||
bool MinGWToolChain::equals(ToolChain *other) const
|
||||
bool MinGWToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
MinGWToolChain *o = static_cast<MinGWToolChain *>(other);
|
||||
const MinGWToolChain *o = static_cast<const MinGWToolChain *>(other);
|
||||
return (m_mingwPath == o->m_mingwPath && this->GccToolChain::equals(other));
|
||||
}
|
||||
|
||||
@@ -592,9 +592,9 @@ ToolChain::ToolChainType MSVCToolChain::type() const
|
||||
return ToolChain::MSVC;
|
||||
}
|
||||
|
||||
bool MSVCToolChain::equals(ToolChain *other) const
|
||||
bool MSVCToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
MSVCToolChain *o = static_cast<MSVCToolChain *>(other);
|
||||
const MSVCToolChain *o = static_cast<const MSVCToolChain *>(other);
|
||||
return (m_installation.name == o->m_installation.name);
|
||||
}
|
||||
|
||||
@@ -875,9 +875,9 @@ ToolChain::ToolChainType WinCEToolChain::type() const
|
||||
return ToolChain::WINCE;
|
||||
}
|
||||
|
||||
bool WinCEToolChain::equals(ToolChain *other) const
|
||||
bool WinCEToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
WinCEToolChain *o = static_cast<WinCEToolChain *>(other);
|
||||
const WinCEToolChain *o = static_cast<const WinCEToolChain *>(other);
|
||||
return (m_platform == o->m_platform && this->MSVCToolChain::equals(other));
|
||||
}
|
||||
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
ToolChain();
|
||||
virtual ~ToolChain();
|
||||
|
||||
static bool equals(ToolChain *, ToolChain *);
|
||||
static bool equals(const ToolChain *, const ToolChain *);
|
||||
// Factory methods
|
||||
static ToolChain *createGccToolChain(const QString &gcc);
|
||||
static ToolChain *createMinGWToolChain(const QString &gcc, const QString &mingwPath);
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
static QString toolChainName(ToolChainType tc);
|
||||
|
||||
protected:
|
||||
virtual bool equals(ToolChain *other) const = 0;
|
||||
virtual bool equals(const ToolChain *other) const = 0;
|
||||
};
|
||||
|
||||
class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
virtual IOutputParser *outputParser() const;
|
||||
|
||||
protected:
|
||||
virtual bool equals(ToolChain *other) const;
|
||||
virtual bool equals(const ToolChain *other) const;
|
||||
QByteArray m_predefinedMacros;
|
||||
QList<HeaderPath> m_systemHeaderPaths;
|
||||
QString gcc() const { return m_gcc; }
|
||||
@@ -152,7 +152,7 @@ public:
|
||||
virtual IOutputParser *outputParser() const;
|
||||
|
||||
protected:
|
||||
virtual bool equals(ToolChain *other) const;
|
||||
virtual bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
QString m_mingwPath;
|
||||
@@ -216,7 +216,7 @@ protected:
|
||||
typedef QPair<QString, QString> StringStringPair;
|
||||
typedef QList<StringStringPair> StringStringPairList;
|
||||
|
||||
virtual bool equals(ToolChain *other) const;
|
||||
virtual bool equals(const ToolChain *other) const;
|
||||
static StringStringPairList readEnvironmentSetting(const QString &varsBat,
|
||||
const QStringList &args,
|
||||
const ProjectExplorer::Environment &env);
|
||||
@@ -249,7 +249,7 @@ public:
|
||||
|
||||
protected:
|
||||
explicit WinCEToolChain(const Installation &in, const QString &platform);
|
||||
virtual bool equals(ToolChain *other) const;
|
||||
virtual bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
const QString m_platform;
|
||||
|
||||
@@ -76,9 +76,9 @@ QString MaemoToolChain::makeCommand() const
|
||||
return QLatin1String("make" EXEC_SUFFIX);
|
||||
}
|
||||
|
||||
bool MaemoToolChain::equals(ToolChain *other) const
|
||||
bool MaemoToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
MaemoToolChain *toolChain = static_cast<MaemoToolChain*> (other);
|
||||
const MaemoToolChain *toolChain = static_cast<const MaemoToolChain*> (other);
|
||||
return other->type() == type()
|
||||
&& toolChain->sysrootRoot() == sysrootRoot()
|
||||
&& toolChain->targetRoot() == targetRoot();
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
bool allowsPackagingDisabling() const { return version() == Maemo5; }
|
||||
|
||||
protected:
|
||||
bool equals(ToolChain *other) const;
|
||||
bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
void setMaddeRoot() const;
|
||||
|
||||
@@ -151,7 +151,7 @@ QString GCCEToolChain::makeCommand() const
|
||||
return QLatin1String("make");
|
||||
}
|
||||
|
||||
bool GCCEToolChain::equals(ToolChain *otherIn) const
|
||||
bool GCCEToolChain::equals(const ToolChain *otherIn) const
|
||||
{
|
||||
if (otherIn->type() != type())
|
||||
return false;
|
||||
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
virtual QString makeCommand() const;
|
||||
|
||||
protected:
|
||||
virtual bool equals(ToolChain *other) const;
|
||||
virtual bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
QString gcceVersion() const;
|
||||
|
||||
@@ -275,7 +275,7 @@ ProjectExplorer::IOutputParser *RVCTToolChain::outputParser() const
|
||||
return new RvctParser;
|
||||
}
|
||||
|
||||
bool RVCTToolChain::equals(ToolChain *otherIn) const
|
||||
bool RVCTToolChain::equals(const ToolChain *otherIn) const
|
||||
{
|
||||
if (otherIn->type() != type())
|
||||
return false;
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
static QString rvctBinary();
|
||||
|
||||
protected:
|
||||
bool equals(ToolChain *other) const;
|
||||
bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
void addToRVCTPathVariable(const QString &postfix, const QStringList &values,
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
using namespace ProjectExplorer;
|
||||
using namespace Qt4ProjectManager::Internal;
|
||||
|
||||
WINSCWToolChain::WINSCWToolChain(S60Devices::Device device, const QString &mwcDirectory)
|
||||
WINSCWToolChain::WINSCWToolChain(const S60Devices::Device &device, const QString &mwcDirectory)
|
||||
: m_mixin(device),
|
||||
m_carbidePath(mwcDirectory),
|
||||
m_deviceId(device.id),
|
||||
@@ -117,9 +117,9 @@ IOutputParser *WINSCWToolChain::outputParser() const
|
||||
return new WinscwParser;
|
||||
}
|
||||
|
||||
bool WINSCWToolChain::equals(ToolChain *other) const
|
||||
bool WINSCWToolChain::equals(const ToolChain *other) const
|
||||
{
|
||||
WINSCWToolChain *otherWINSCW = static_cast<WINSCWToolChain *>(other);
|
||||
const WINSCWToolChain *otherWINSCW = static_cast<const WINSCWToolChain *>(other);
|
||||
return (other->type() == type()
|
||||
&& m_deviceId == otherWINSCW->m_deviceId
|
||||
&& m_deviceName == otherWINSCW->m_deviceName
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Internal {
|
||||
class WINSCWToolChain : public ProjectExplorer::ToolChain
|
||||
{
|
||||
public:
|
||||
WINSCWToolChain(S60Devices::Device device, const QString &mwcDirectory);
|
||||
explicit WINSCWToolChain(const S60Devices::Device &device, const QString &mwcDirectory);
|
||||
QByteArray predefinedMacros();
|
||||
QList<ProjectExplorer::HeaderPath> systemHeaderPaths();
|
||||
void addToEnvironment(ProjectExplorer::Environment &env);
|
||||
@@ -49,7 +49,7 @@ public:
|
||||
ProjectExplorer::IOutputParser *outputParser() const;
|
||||
|
||||
protected:
|
||||
bool equals(ToolChain *other) const;
|
||||
bool equals(const ToolChain *other) const;
|
||||
|
||||
private:
|
||||
QStringList systemIncludes() const;
|
||||
|
||||
Reference in New Issue
Block a user