qmake: fix const correctness

Partial cherry-pick of
https://qt.gitorious.org/qt/jpnurmi-qt/commit/8c4ef19

Task-number: QTBUG-21910
Change-Id: Ieb833a977fc00d2637f8419278698c82b6086e2f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
This commit is contained in:
J-P Nurmi 2013-12-07 20:35:18 +01:00 committed by The Qt Project
parent 3be88bf778
commit 0a19b9ec70
4 changed files with 22 additions and 22 deletions

View File

@ -1420,31 +1420,31 @@ MakefileGenerator::writeInstalls(QTextStream &t, bool noBuild)
}
QString
MakefileGenerator::var(const ProKey &var)
MakefileGenerator::var(const ProKey &var) const
{
return val(project->values(var));
}
QString
MakefileGenerator::val(const ProStringList &varList)
MakefileGenerator::val(const ProStringList &varList) const
{
return valGlue(varList, "", " ", "");
}
QString
MakefileGenerator::val(const QStringList &varList)
MakefileGenerator::val(const QStringList &varList) const
{
return valGlue(varList, "", " ", "");
}
QString
MakefileGenerator::varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after)
MakefileGenerator::varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
{
return valGlue(project->values(var), before, glue, after);
}
QString
MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after)
MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const
{
ProStringList varList;
foreach (const ProString &val, project->values(var))
@ -1453,7 +1453,7 @@ MakefileGenerator::fileVarGlue(const ProKey &var, const QString &before, const Q
}
QString
MakefileGenerator::valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after)
MakefileGenerator::valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after) const
{
QString ret;
for (ProStringList::ConstIterator it = varList.begin(); it != varList.end(); ++it) {
@ -1467,7 +1467,7 @@ MakefileGenerator::valGlue(const ProStringList &varList, const QString &before,
}
QString
MakefileGenerator::valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after)
MakefileGenerator::valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after) const
{
QString ret;
for(QStringList::ConstIterator it = varList.begin(); it != varList.end(); ++it) {
@ -1482,19 +1482,19 @@ MakefileGenerator::valGlue(const QStringList &varList, const QString &before, co
QString
MakefileGenerator::varList(const ProKey &var)
MakefileGenerator::varList(const ProKey &var) const
{
return valList(project->values(var));
}
QString
MakefileGenerator::valList(const ProStringList &varList)
MakefileGenerator::valList(const ProStringList &varList) const
{
return valGlue(varList, "", " \\\n\t\t", "");
}
QString
MakefileGenerator::valList(const QStringList &varList)
MakefileGenerator::valList(const QStringList &varList) const
{
return valGlue(varList, "", " \\\n\t\t", "");
}

View File

@ -225,16 +225,16 @@ protected:
virtual bool findLibraries();
//for retrieving values and lists of values
virtual QString var(const ProKey &var);
QString varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after);
QString fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after);
QString varList(const ProKey &var);
QString val(const ProStringList &varList);
QString val(const QStringList &varList);
QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after);
QString valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after);
QString valList(const QStringList &varList);
QString valList(const ProStringList &varList);
virtual QString var(const ProKey &var) const;
QString varGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
QString fileVarGlue(const ProKey &var, const QString &before, const QString &glue, const QString &after) const;
QString varList(const ProKey &var) const;
QString val(const ProStringList &varList) const;
QString val(const QStringList &varList) const;
QString valGlue(const QStringList &varList, const QString &before, const QString &glue, const QString &after) const;
QString valGlue(const ProStringList &varList, const QString &before, const QString &glue, const QString &after) const;
QString valList(const QStringList &varList) const;
QString valList(const ProStringList &varList) const;
QString filePrefixRoot(const QString &, const QString &);

View File

@ -303,7 +303,7 @@ void NmakeMakefileGenerator::writeNmakeParts(QTextStream &t)
}
}
QString NmakeMakefileGenerator::var(const ProKey &value)
QString NmakeMakefileGenerator::var(const ProKey &value) const
{
if (usePCH) {
if ((value == "QMAKE_RUN_CXX_IMP_BATCH"

View File

@ -62,7 +62,7 @@ protected:
virtual QString getPdbTarget();
virtual QString defaultInstall(const QString &t);
virtual QStringList &findDependencies(const QString &file);
QString var(const ProKey &value);
QString var(const ProKey &value) const;
QString precompH, precompObj, precompPch;
bool usePCH;