inline initOld()

the separation serves no purpose except confusing.

Change-Id: I6a0d04b2162a4eee7a200345e94baa272120ea5b
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
This commit is contained in:
Oswald Buddenhagen 2014-11-12 18:11:43 +01:00
parent 39882d88d0
commit a7fe3309d6
2 changed files with 35 additions and 40 deletions

View File

@ -794,7 +794,41 @@ void VcprojGenerator::init()
} }
MakefileGenerator::init(); MakefileGenerator::init();
initOld(); // Currently calling old DSP code to set variables. CLEAN UP!
// $$QMAKE.. -> $$MSVCPROJ.. -------------------------------------
const ProStringList &incs = project->values("INCLUDEPATH");
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
QString inc = (*incit).toQString();
if (!inc.startsWith('"') && !inc.endsWith('"'))
inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already
project->values("MSVCPROJ_INCPATH").append("-I" + inc);
}
QString dest = Option::fixPathToTargetOS(project->first("TARGET").toQString()) + project->first("TARGET_EXT");
project->values("MSVCPROJ_TARGET") = ProStringList(dest);
// DLL COPY ------------------------------------------------------
if (project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) {
const ProStringList &dlldirs = project->values("DLLDESTDIR");
QString copydll("");
ProStringList::ConstIterator dlldir;
for (dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
if (!copydll.isEmpty())
copydll += " && ";
copydll += "copy \"$(TargetPath)\" \"" + *dlldir + "\"";
}
QString deststr("Copy " + dest + " to ");
for (dlldir = dlldirs.begin(); dlldir != dlldirs.end();) {
deststr += *dlldir;
++dlldir;
if (dlldir != dlldirs.end())
deststr += ", ";
}
project->values("MSVCPROJ_COPY_DLL").append(copydll);
project->values("MSVCPROJ_COPY_DLL_DESC").append(deststr);
}
#if 0 #if 0
// Verbose output if "-d -d"... // Verbose output if "-d -d"...
@ -1608,44 +1642,6 @@ void VcprojGenerator::initExtraCompilerOutputs()
} }
} }
void VcprojGenerator::initOld()
{
// $$QMAKE.. -> $$MSVCPROJ.. -------------------------------------
const ProStringList &incs = project->values("INCLUDEPATH");
for (ProStringList::ConstIterator incit = incs.begin(); incit != incs.end(); ++incit) {
QString inc = (*incit).toQString();
if (!inc.startsWith('"') && !inc.endsWith('"'))
inc = QString("\"%1\"").arg(inc); // Quote all paths if not quoted already
project->values("MSVCPROJ_INCPATH").append("-I" + inc);
}
QString dest = Option::fixPathToTargetOS(project->first("TARGET").toQString()) + project->first("TARGET_EXT");
project->values("MSVCPROJ_TARGET") = ProStringList(dest);
// DLL COPY ------------------------------------------------------
if(project->isActiveConfig("dll") && !project->values("DLLDESTDIR").isEmpty()) {
const ProStringList &dlldirs = project->values("DLLDESTDIR");
QString copydll("");
ProStringList::ConstIterator dlldir;
for(dlldir = dlldirs.begin(); dlldir != dlldirs.end(); ++dlldir) {
if(!copydll.isEmpty())
copydll += " && ";
copydll += "copy \"$(TargetPath)\" \"" + *dlldir + "\"";
}
QString deststr("Copy " + dest + " to ");
for(dlldir = dlldirs.begin(); dlldir != dlldirs.end();) {
deststr += *dlldir;
++dlldir;
if(dlldir != dlldirs.end())
deststr += ", ";
}
project->values("MSVCPROJ_COPY_DLL").append(copydll);
project->values("MSVCPROJ_COPY_DLL_DESC").append(deststr);
}
}
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------
// ------------------------------------------------------------------------------------------------ // ------------------------------------------------------------------------------------------------

View File

@ -85,7 +85,6 @@ protected:
virtual bool openOutput(QFile &file, const QString &build) const; virtual bool openOutput(QFile &file, const QString &build) const;
void initOld();
virtual void initProject(); virtual void initProject();
void initConfiguration(); void initConfiguration();
void initCompilerTool(); void initCompilerTool();