const correctness for values() calls
Change-Id: I1476ae8d3fb7364686398c5650729dee94a8e933 Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This commit is contained in:
parent
e0f1de0788
commit
f85292ab20
@ -259,8 +259,8 @@ GBuildMakefileGenerator::write()
|
||||
t << "\t-Iwork\n";
|
||||
t << "\t-Llib\n";
|
||||
t << "\t";
|
||||
QStringList &l = project->values("QMAKE_CXXFLAGS");
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values("QMAKE_CXXFLAGS");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
if ((*it).startsWith("-"))
|
||||
t << "\n" << "\t" << (*it);
|
||||
else
|
||||
@ -285,8 +285,8 @@ GBuildMakefileGenerator::write()
|
||||
if (isnativebin && (i == 0))
|
||||
continue;
|
||||
t << "\t";
|
||||
QStringList &l = project->values(src[i]);
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values(src[i]);
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
if ((*it).startsWith("-"))
|
||||
t << "\n" << "\t" << (*it);
|
||||
else
|
||||
@ -298,8 +298,8 @@ GBuildMakefileGenerator::write()
|
||||
|
||||
/* first subdirectories/subprojects */
|
||||
{
|
||||
QStringList &l = project->values("SUBDIRS");
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values("SUBDIRS");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString gpjname((*it));
|
||||
/* avoid native tools */
|
||||
if (nativebins.contains(gpjname.section("_", -1)))
|
||||
@ -319,9 +319,10 @@ GBuildMakefileGenerator::write()
|
||||
}
|
||||
|
||||
{
|
||||
QStringList &l = project->values("RESOURCES");
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString tmpstr((*it).replace(pathtoremove, ""));
|
||||
const QStringList &l = project->values("RESOURCES");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString tmpstr(*it);
|
||||
tmpstr.remove(pathtoremove);
|
||||
t << tmpstr << "\t[Qt Resource]\n";
|
||||
tmpstr = tmpstr.section(".", -2, -1).section(QDir::separator(), -1);
|
||||
tmpstr.remove(".qrc");
|
||||
@ -332,9 +333,10 @@ GBuildMakefileGenerator::write()
|
||||
}
|
||||
}
|
||||
{
|
||||
QStringList &l = project->values("FORMS");
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString tmpstr((*it).replace(pathtoremove, ""));
|
||||
const QStringList &l = project->values("FORMS");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString tmpstr(*it);
|
||||
tmpstr.remove(pathtoremove);
|
||||
t << tmpstr << "\t[Qt Dialog]\n";
|
||||
tmpstr = tmpstr.section(".", 0, 0).section(QDir::separator(), -1);
|
||||
tmpstr.insert(tmpstr.lastIndexOf(QDir::separator()) + 1, "ui_");
|
||||
@ -347,22 +349,22 @@ GBuildMakefileGenerator::write()
|
||||
/* source files for this project */
|
||||
QString src[] = { "HEADERS", "SOURCES", QString() };
|
||||
for (int i = 0; !src[i].isNull(); i++) {
|
||||
QStringList &l = project->values(src[i]);
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values(src[i]);
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
if ((*it).isEmpty())
|
||||
continue;
|
||||
/* native tools aren't preprocessed */
|
||||
if (!isnativebin)
|
||||
t << writeOne((*it), pathtoremove);
|
||||
else
|
||||
t << (*it).remove(pathtoremove) << "\n";
|
||||
t << QString(*it).remove(pathtoremove) << "\n";
|
||||
}
|
||||
}
|
||||
t << "\n";
|
||||
|
||||
{
|
||||
QStringList &l = project->values("GENERATED_SOURCES");
|
||||
for (QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values("GENERATED_SOURCES");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
t << "work/" << (*it).section(QDir::separator(), -1) << "\n";
|
||||
}
|
||||
}
|
||||
|
@ -393,7 +393,7 @@ ProjectBuilderMakefileGenerator::writeSubDirs(QTextStream &t)
|
||||
t << "\t\t\t" << writeSettings("buildConfigurationList", keyFor("QMAKE_SUBDIR_PBX_BUILDCONFIG_LIST")) << ";" << "\n";
|
||||
t << "\t\t\t" << "projectReferences = (" << "\n";
|
||||
{
|
||||
QStringList &qmake_subdirs = project->values("QMAKE_PBX_SUBDIRS");
|
||||
const QStringList &qmake_subdirs = project->values("QMAKE_PBX_SUBDIRS");
|
||||
for(int i = 0; i < qmake_subdirs.count(); i++) {
|
||||
QString subdir = qmake_subdirs[i];
|
||||
t << "\t\t\t\t" << "{" << "\n"
|
||||
@ -714,16 +714,16 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
mkt << "IMAGES = " << varList("QMAKE_IMAGE_COLLECTION") << endl;
|
||||
mkt << "PARSERS =";
|
||||
if(!project->isEmpty("YACCSOURCES")) {
|
||||
QStringList &yaccs = project->values("YACCSOURCES");
|
||||
for(QStringList::Iterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) {
|
||||
const QStringList &yaccs = project->values("YACCSOURCES");
|
||||
for (QStringList::ConstIterator yit = yaccs.begin(); yit != yaccs.end(); ++yit) {
|
||||
QFileInfo fi(fileInfo((*yit)));
|
||||
mkt << " " << fi.path() << Option::dir_sep << fi.baseName()
|
||||
<< Option::yacc_mod << Option::cpp_ext.first();
|
||||
}
|
||||
}
|
||||
if(!project->isEmpty("LEXSOURCES")) {
|
||||
QStringList &lexs = project->values("LEXSOURCES");
|
||||
for(QStringList::Iterator lit = lexs.begin(); lit != lexs.end(); ++lit) {
|
||||
const QStringList &lexs = project->values("LEXSOURCES");
|
||||
for (QStringList::ConstIterator lit = lexs.begin(); lit != lexs.end(); ++lit) {
|
||||
QFileInfo fi(fileInfo((*lit)));
|
||||
mkt << " " << fi.path() << Option::dir_sep << fi.baseName()
|
||||
<< Option::lex_mod << Option::cpp_ext.first();
|
||||
|
@ -671,7 +671,7 @@ MakefileGenerator::init()
|
||||
if(tmp_out.isEmpty())
|
||||
continue;
|
||||
if(project->values((*it) + ".CONFIG").indexOf("combine") != -1) {
|
||||
QStringList &compilerInputs = project->values((*it) + ".input");
|
||||
const QStringList &compilerInputs = project->values((*it) + ".input");
|
||||
// Don't generate compiler output if it doesn't have input.
|
||||
if (compilerInputs.isEmpty() || project->values(compilerInputs.first()).isEmpty())
|
||||
continue;
|
||||
@ -709,8 +709,8 @@ MakefileGenerator::init()
|
||||
}
|
||||
}
|
||||
} else {
|
||||
QStringList &tmp = project->values((*it) + ".input");
|
||||
for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
const QStringList &tmp = project->values((*it) + ".input");
|
||||
for (QStringList::ConstIterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
const QStringList inputs = project->values((*it2));
|
||||
for(QStringList::ConstIterator input = inputs.constBegin(); input != inputs.constEnd(); ++input) {
|
||||
if((*input).isEmpty())
|
||||
@ -1157,11 +1157,11 @@ MakefileGenerator::writePrlFile()
|
||||
void
|
||||
MakefileGenerator::writeObj(QTextStream &t, const QString &src)
|
||||
{
|
||||
QStringList &srcl = project->values(src);
|
||||
QStringList objl = createObjectList(srcl);
|
||||
const QStringList &srcl = project->values(src);
|
||||
const QStringList objl = createObjectList(srcl);
|
||||
|
||||
QStringList::Iterator oit = objl.begin();
|
||||
QStringList::Iterator sit = srcl.begin();
|
||||
QStringList::ConstIterator oit = objl.begin();
|
||||
QStringList::ConstIterator sit = srcl.begin();
|
||||
QString stringSrc("$src");
|
||||
QString stringObj("$obj");
|
||||
for(;sit != srcl.end() && oit != objl.end(); ++oit, ++sit) {
|
||||
@ -1222,8 +1222,8 @@ MakefileGenerator::writeInstalls(QTextStream &t, const QString &installs, bool n
|
||||
rm_dir_contents = "-$(DEL_FILE) -r";
|
||||
|
||||
QString all_installs, all_uninstalls;
|
||||
QStringList &l = project->values(installs);
|
||||
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values(installs);
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
QString pvar = (*it) + ".path";
|
||||
if(project->values((*it) + ".CONFIG").indexOf("no_path") == -1 &&
|
||||
project->values((*it) + ".CONFIG").indexOf("dummy_install") == -1 &&
|
||||
@ -1689,10 +1689,10 @@ MakefileGenerator::verifyExtraCompiler(const QString &comp, const QString &file_
|
||||
if(!pass)
|
||||
return false;
|
||||
} else {
|
||||
QStringList &tmp = project->values(comp + ".input");
|
||||
for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
|
||||
QStringList &inputs = project->values((*it));
|
||||
for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
const QStringList &tmp = project->values(comp + ".input");
|
||||
for (QStringList::ConstIterator it = tmp.begin(); it != tmp.end(); ++it) {
|
||||
const QStringList &inputs = project->values((*it));
|
||||
for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
if((*input).isEmpty())
|
||||
continue;
|
||||
QString in = fileFixify(Option::fixPathToTargetOS((*input), false));
|
||||
@ -1735,10 +1735,10 @@ MakefileGenerator::verifyExtraCompiler(const QString &comp, const QString &file_
|
||||
if(system(cmd.toLatin1().constData()))
|
||||
return false;
|
||||
} else {
|
||||
QStringList &tmp = project->values(comp + ".input");
|
||||
for(QStringList::Iterator it = tmp.begin(); it != tmp.end(); ++it) {
|
||||
QStringList &inputs = project->values((*it));
|
||||
for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
const QStringList &tmp = project->values(comp + ".input");
|
||||
for (QStringList::ConstIterator it = tmp.begin(); it != tmp.end(); ++it) {
|
||||
const QStringList &inputs = project->values((*it));
|
||||
for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
if((*input).isEmpty())
|
||||
continue;
|
||||
QString in = fileFixify(Option::fixPathToTargetOS((*input), false));
|
||||
@ -1759,14 +1759,14 @@ MakefileGenerator::verifyExtraCompiler(const QString &comp, const QString &file_
|
||||
void
|
||||
MakefileGenerator::writeExtraTargets(QTextStream &t)
|
||||
{
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
QString targ = var((*it) + ".target"),
|
||||
cmd = var((*it) + ".commands"), deps;
|
||||
if(targ.isEmpty())
|
||||
targ = (*it);
|
||||
QStringList &deplist = project->values((*it) + ".depends");
|
||||
for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
|
||||
const QStringList &deplist = project->values((*it) + ".depends");
|
||||
for (QStringList::ConstIterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
|
||||
QString dep = var((*dep_it) + ".target");
|
||||
if(dep.isEmpty())
|
||||
dep = (*dep_it);
|
||||
@ -1828,7 +1828,7 @@ MakefileGenerator::writeExtraCompilerTargets(QTextStream &t)
|
||||
+ escapeFilePath(Option::fixPathToLocalOS(Option::output_dir, false))
|
||||
+ QLatin1String(" && ");
|
||||
}
|
||||
QStringList &vars = project->values((*it) + ".variables");
|
||||
const QStringList &vars = project->values((*it) + ".variables");
|
||||
if(tmp_out.isEmpty() || tmp_cmd.isEmpty())
|
||||
continue;
|
||||
QStringList tmp_inputs;
|
||||
@ -2120,10 +2120,10 @@ MakefileGenerator::writeExtraVariables(QTextStream &t)
|
||||
t << endl;
|
||||
|
||||
QStringList outlist;
|
||||
QHash<QString, QStringList> &vars = project->variables();
|
||||
QStringList &exports = project->values("QMAKE_EXTRA_VARIABLES");
|
||||
for (QHash<QString, QStringList>::Iterator it = vars.begin(); it != vars.end(); ++it) {
|
||||
for (QStringList::Iterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
|
||||
const QHash<QString, QStringList> &vars = project->variables();
|
||||
const QStringList &exports = project->values("QMAKE_EXTRA_VARIABLES");
|
||||
for (QHash<QString, QStringList>::ConstIterator it = vars.begin(); it != vars.end(); ++it) {
|
||||
for (QStringList::ConstIterator exp_it = exports.begin(); exp_it != exports.end(); ++exp_it) {
|
||||
QRegExp rx((*exp_it), Qt::CaseInsensitive, QRegExp::Wildcard);
|
||||
if (rx.exactMatch(it.key()))
|
||||
outlist << ("EXPORT_" + it.key() + " = " + it.value().join(" "));
|
||||
@ -2139,7 +2139,7 @@ bool
|
||||
MakefileGenerator::writeStubMakefile(QTextStream &t)
|
||||
{
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
//const QString ofile = Option::fixPathToTargetOS(fileFixify(Option::output.fileName()));
|
||||
@ -2396,8 +2396,8 @@ void
|
||||
MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubTarget*> targets, int flags)
|
||||
{
|
||||
// blasted includes
|
||||
QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
for(QStringList::Iterator qeui_it = qeui.begin(); qeui_it != qeui.end(); ++qeui_it)
|
||||
const QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
for (QStringList::ConstIterator qeui_it = qeui.begin(); qeui_it != qeui.end(); ++qeui_it)
|
||||
t << "include " << (*qeui_it) << endl;
|
||||
|
||||
if (!(flags & SubTargetSkipDefaultVariables)) {
|
||||
@ -2607,16 +2607,16 @@ MakefileGenerator::writeSubTargets(QTextStream &t, QList<MakefileGenerator::SubT
|
||||
}
|
||||
|
||||
// user defined targets
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::Iterator qut_it = qut.begin(); qut_it != qut.end(); ++qut_it) {
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (QStringList::ConstIterator qut_it = qut.begin(); qut_it != qut.end(); ++qut_it) {
|
||||
QString targ = var((*qut_it) + ".target"),
|
||||
cmd = var((*qut_it) + ".commands"), deps;
|
||||
if(targ.isEmpty())
|
||||
targ = (*qut_it);
|
||||
t << endl;
|
||||
|
||||
QStringList &deplist = project->values((*qut_it) + ".depends");
|
||||
for(QStringList::Iterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
|
||||
const QStringList &deplist = project->values((*qut_it) + ".depends");
|
||||
for (QStringList::ConstIterator dep_it = deplist.begin(); dep_it != deplist.end(); ++dep_it) {
|
||||
QString dep = var((*dep_it) + ".target");
|
||||
if(dep.isEmpty())
|
||||
dep = Option::fixPathToTargetOS(*dep_it, false);
|
||||
@ -2931,8 +2931,8 @@ MakefileGenerator::checkMultipleDefinition(const QString &f, const QString &w)
|
||||
int slsh = f.lastIndexOf(Option::dir_sep);
|
||||
if(slsh != -1)
|
||||
file.remove(0, slsh + 1);
|
||||
QStringList &l = project->values(w);
|
||||
for(QStringList::Iterator val_it = l.begin(); val_it != l.end(); ++val_it) {
|
||||
const QStringList &l = project->values(w);
|
||||
for (QStringList::ConstIterator val_it = l.begin(); val_it != l.end(); ++val_it) {
|
||||
QString file2((*val_it));
|
||||
slsh = file2.lastIndexOf(Option::dir_sep);
|
||||
if(slsh != -1)
|
||||
@ -2965,8 +2965,8 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
QMakeLocalFileName ret;
|
||||
if(!project->isEmpty("SKIP_DEPENDS")) {
|
||||
bool found = false;
|
||||
QStringList &nodeplist = project->values("SKIP_DEPENDS");
|
||||
for(QStringList::Iterator it = nodeplist.begin();
|
||||
const QStringList &nodeplist = project->values("SKIP_DEPENDS");
|
||||
for (QStringList::ConstIterator it = nodeplist.begin();
|
||||
it != nodeplist.end(); ++it) {
|
||||
QRegExp regx((*it));
|
||||
if(regx.indexIn(dep.local()) != -1) {
|
||||
@ -3014,8 +3014,8 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
}
|
||||
{ //is it from an EXTRA_TARGET
|
||||
const QString dep_basename = dep.local().section(Option::dir_sep, -1);
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::Iterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it) {
|
||||
QString targ = var((*it) + ".target");
|
||||
if(targ.isEmpty())
|
||||
targ = (*it);
|
||||
@ -3033,10 +3033,10 @@ MakefileGenerator::findFileForDep(const QMakeLocalFileName &dep, const QMakeLoca
|
||||
QString tmp_out = project->values((*it) + ".output").first();
|
||||
if(tmp_out.isEmpty())
|
||||
continue;
|
||||
QStringList &tmp = project->values((*it) + ".input");
|
||||
for(QStringList::Iterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
QStringList &inputs = project->values((*it2));
|
||||
for(QStringList::Iterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
const QStringList &tmp = project->values((*it) + ".input");
|
||||
for (QStringList::ConstIterator it2 = tmp.begin(); it2 != tmp.end(); ++it2) {
|
||||
const QStringList &inputs = project->values((*it2));
|
||||
for (QStringList::ConstIterator input = inputs.begin(); input != inputs.end(); ++input) {
|
||||
QString out = Option::fixPathToTargetOS(unescapeFilePath(replaceExtraCompilerVariables(tmp_out, (*input), QString())));
|
||||
if(out == dep.real() || out.section(Option::dir_sep, -1) == dep_basename) {
|
||||
ret = QMakeLocalFileName(fileFixify(out, qmake_getpwd(), Option::output_dir));
|
||||
|
@ -742,7 +742,7 @@ UnixMakefileGenerator::defaultInstall(const QString &t)
|
||||
|
||||
QStringList links;
|
||||
QString target="$(TARGET)";
|
||||
QStringList &targets = project->values(t + ".targets");
|
||||
const QStringList &targets = project->values(t + ".targets");
|
||||
if(!project->isEmpty("QMAKE_BUNDLE")) {
|
||||
target = project->first("QMAKE_BUNDLE");
|
||||
bundle = true;
|
||||
|
@ -82,7 +82,7 @@ UnixMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
writeHeader(t);
|
||||
if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
t << "first all clean install distclean uninstall qmake_all:" << "\n\t"
|
||||
@ -190,11 +190,13 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << "SOURCES = " << valList(escapeFilePaths(project->values("SOURCES"))) << " "
|
||||
<< valList(escapeFilePaths(project->values("GENERATED_SOURCES"))) << endl;
|
||||
if(do_incremental) {
|
||||
QStringList &objs = project->values("OBJECTS"), &incrs = project->values("QMAKE_INCREMENTAL"), incrs_out;
|
||||
const QStringList &objs = project->values("OBJECTS");
|
||||
const QStringList &incrs = project->values("QMAKE_INCREMENTAL");
|
||||
QStringList incrs_out;
|
||||
t << "OBJECTS = ";
|
||||
for(QStringList::Iterator objit = objs.begin(); objit != objs.end(); ++objit) {
|
||||
for (QStringList::ConstIterator objit = objs.begin(); objit != objs.end(); ++objit) {
|
||||
bool increment = false;
|
||||
for(QStringList::Iterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
|
||||
for (QStringList::ConstIterator incrit = incrs.begin(); incrit != incrs.end(); ++incrit) {
|
||||
if((*objit).indexOf(QRegExp((*incrit), Qt::CaseSensitive,
|
||||
QRegExp::Wildcard)) != -1) {
|
||||
increment = true;
|
||||
@ -247,8 +249,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
t << endl;
|
||||
|
||||
// blasted includes
|
||||
QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
QStringList::Iterator it;
|
||||
const QStringList &qeui = project->values("QMAKE_EXTRA_INCLUDES");
|
||||
QStringList::ConstIterator it;
|
||||
for(it = qeui.begin(); it != qeui.end(); ++it)
|
||||
t << "include " << (*it) << endl;
|
||||
|
||||
@ -301,8 +303,8 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
|
||||
QString src[] = { "SOURCES", "GENERATED_SOURCES", QString() };
|
||||
for(int x = 0; !src[x].isNull(); x++) {
|
||||
QStringList &l = project->values(src[x]);
|
||||
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it) {
|
||||
const QStringList &l = project->values(src[x]);
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it) {
|
||||
if(!(*it).isEmpty()) {
|
||||
QString d_file;
|
||||
for(QStringList::Iterator cit = Option::c_ext.begin();
|
||||
@ -343,15 +345,15 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
if(!project->isEmpty("SUBLIBS_DIR"))
|
||||
libdir = project->first("SUBLIBS_DIR");
|
||||
t << "SUBLIBS = ";
|
||||
QStringList &l = project->values("SUBLIBS");
|
||||
for(QStringList::Iterator it = l.begin(); it != l.end(); ++it)
|
||||
const QStringList &l = project->values("SUBLIBS");
|
||||
for (QStringList::ConstIterator it = l.begin(); it != l.end(); ++it)
|
||||
t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
|
||||
<< project->first("QMAKE_EXTENSION_STATICLIB") << " ";
|
||||
t << endl << endl;
|
||||
}
|
||||
if(project->isActiveConfig("depend_prl") && !project->isEmpty("QMAKE_PRL_INTERNAL_FILES")) {
|
||||
QStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
|
||||
QStringList::Iterator it;
|
||||
const QStringList &l = project->values("QMAKE_PRL_INTERNAL_FILES");
|
||||
QStringList::ConstIterator it;
|
||||
for(it = l.begin(); it != l.end(); ++it) {
|
||||
QMakeMetaInfo libinfo;
|
||||
if(libinfo.readLib((*it)) && !libinfo.isEmpty("QMAKE_PRL_BUILD_DIR")) {
|
||||
@ -886,7 +888,7 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t)
|
||||
QString libdir = "tmp/";
|
||||
if(!project->isEmpty("SUBLIBS_DIR"))
|
||||
libdir = project->first("SUBLIBS_DIR");
|
||||
QStringList &l = project->values("SUBLIBS");
|
||||
const QStringList &l = project->values("SUBLIBS");
|
||||
for(it = l.begin(); it != l.end(); ++it)
|
||||
t << libdir << project->first("QMAKE_PREFIX_STATICLIB") << (*it) << "."
|
||||
<< project->first("QMAKE_EXTENSION_STATICLIB") << ":\n\t"
|
||||
|
@ -57,7 +57,7 @@ BorlandMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
{
|
||||
writeHeader(t);
|
||||
if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
t << "all first clean:" << "\n\t"
|
||||
|
@ -91,8 +91,8 @@ bool MingwMakefileGenerator::findLibraries(const QString &where)
|
||||
|
||||
QList<QMakeLocalFileName> dirs;
|
||||
{
|
||||
QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for(QStringList::Iterator libpathit = libpaths.begin();
|
||||
const QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for (QStringList::ConstIterator libpathit = libpaths.begin();
|
||||
libpathit != libpaths.end(); ++libpathit)
|
||||
dirs.append(QMakeLocalFileName((*libpathit)));
|
||||
}
|
||||
@ -148,7 +148,7 @@ bool MingwMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
|
||||
if(Option::mkfile::do_stub_makefile) {
|
||||
t << "QMAKE = " << var("QMAKE_QMAKE") << endl;
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for(QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
t << "first all clean install distclean uninstall: qmake" << endl
|
||||
@ -344,8 +344,8 @@ void MingwMakefileGenerator::writeIncPart(QTextStream &t)
|
||||
{
|
||||
t << "INCPATH = ";
|
||||
|
||||
QStringList &incs = project->values("INCLUDEPATH");
|
||||
for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
const QStringList &incs = project->values("INCLUDEPATH");
|
||||
for (QStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
QString inc = (*incit);
|
||||
inc.replace(QRegExp("\\\\$"), "");
|
||||
inc.replace(QRegExp("\""), "");
|
||||
|
@ -59,7 +59,7 @@ NmakeMakefileGenerator::writeMakefile(QTextStream &t)
|
||||
{
|
||||
writeHeader(t);
|
||||
if(!project->values("QMAKE_FAILED_REQUIREMENTS").isEmpty()) {
|
||||
QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
const QStringList &qut = project->values("QMAKE_EXTRA_TARGETS");
|
||||
for (QStringList::ConstIterator it = qut.begin(); it != qut.end(); ++it)
|
||||
t << *it << " ";
|
||||
t << "all first clean:" << "\n\t"
|
||||
@ -332,8 +332,8 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
|
||||
}
|
||||
QString srcs[] = { QString("SOURCES"), QString("GENERATED_SOURCES"), QString() };
|
||||
for(int x = 0; !srcs[x].isNull(); x++) {
|
||||
QStringList &l = project->values(srcs[x]);
|
||||
for(QStringList::Iterator sit = l.begin(); sit != l.end(); ++sit) {
|
||||
const QStringList &l = project->values(srcs[x]);
|
||||
for (QStringList::ConstIterator sit = l.begin(); sit != l.end(); ++sit) {
|
||||
QString sep = "\\";
|
||||
if((*sit).indexOf(sep) == -1)
|
||||
sep = "/";
|
||||
|
@ -475,7 +475,7 @@ protected:
|
||||
virtual ~VCToolBase(){}
|
||||
virtual bool parseOption(const char* option) = 0;
|
||||
public:
|
||||
void parseOptions(QStringList& options) {
|
||||
void parseOptions(const QStringList& options) {
|
||||
for (QStringList::ConstIterator it=options.begin(); (it!=options.end()); it++)
|
||||
parseOption((*it).toLatin1().constData());
|
||||
}
|
||||
|
@ -1112,7 +1112,7 @@ void VcprojGenerator::initDeploymentTool()
|
||||
|
||||
// Only deploy Qt libs for shared build
|
||||
if (!project->values("QMAKE_QT_DLL").isEmpty()) {
|
||||
QStringList& arg = project->values("MSVCPROJ_LIBS");
|
||||
const QStringList &arg = project->values("MSVCPROJ_LIBS");
|
||||
for (QStringList::ConstIterator it = arg.constBegin(); it != arg.constEnd(); ++it) {
|
||||
if (it->contains(project->first("QMAKE_LIBDIR"))) {
|
||||
QString dllName = *it;
|
||||
@ -1471,8 +1471,8 @@ void VcprojGenerator::initOld()
|
||||
// $$QMAKE.. -> $$MSVCPROJ.. -------------------------------------
|
||||
project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS");
|
||||
project->values("MSVCPROJ_LIBS") += project->values("QMAKE_LIBS_PRIVATE");
|
||||
QStringList &incs = project->values("INCLUDEPATH");
|
||||
for(QStringList::Iterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
const QStringList &incs = project->values("INCLUDEPATH");
|
||||
for (QStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
|
||||
QString inc = (*incit);
|
||||
if (!inc.startsWith('"') && !inc.endsWith('"'))
|
||||
inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already
|
||||
|
@ -110,8 +110,8 @@ Win32MakefileGenerator::findLibraries(const QString &where)
|
||||
QStringList &l = project->values(where);
|
||||
QList<QMakeLocalFileName> dirs;
|
||||
{
|
||||
QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for(QStringList::Iterator libpathit = libpaths.begin();
|
||||
const QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for (QStringList::ConstIterator libpathit = libpaths.begin();
|
||||
libpathit != libpaths.end(); ++libpathit)
|
||||
dirs.append(QMakeLocalFileName((*libpathit)));
|
||||
}
|
||||
@ -223,8 +223,8 @@ Win32MakefileGenerator::processPrlFiles()
|
||||
QHash<QString, bool> processed;
|
||||
QList<QMakeLocalFileName> libdirs;
|
||||
{
|
||||
QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for(QStringList::Iterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit)
|
||||
const QStringList &libpaths = project->values("QMAKE_LIBDIR");
|
||||
for (QStringList::ConstIterator libpathit = libpaths.begin(); libpathit != libpaths.end(); ++libpathit)
|
||||
libdirs.append(QMakeLocalFileName((*libpathit)));
|
||||
}
|
||||
for(bool ret = false; true; ret = false) {
|
||||
@ -730,8 +730,8 @@ void Win32MakefileGenerator::writeStandardParts(QTextStream &t)
|
||||
if(!project->isEmpty("TRANSLATIONS"))
|
||||
dist_files << var("TRANSLATIONS");
|
||||
if(!project->isEmpty("FORMS")) {
|
||||
QStringList &forms = project->values("FORMS");
|
||||
for(QStringList::Iterator formit = forms.begin(); formit != forms.end(); ++formit) {
|
||||
const QStringList &forms = project->values("FORMS");
|
||||
for (QStringList::ConstIterator formit = forms.begin(); formit != forms.end(); ++formit) {
|
||||
QString ui_h = fileFixify((*formit) + Option::h_ext.first());
|
||||
if(exists(ui_h))
|
||||
dist_files << ui_h;
|
||||
|
Loading…
Reference in New Issue
Block a user