summaryrefslogtreecommitdiffstats
path: root/qmake/generators/win32/msvc_vcproj.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-10-22 09:05:17 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-10-22 09:05:17 (GMT)
commit26139fcacc05b4a74fce1ef4e0db819118765310 (patch)
tree75ce453868e95faa72b8f3b871c58969bbeb2a7e /qmake/generators/win32/msvc_vcproj.cpp
parent9a216c3f7abeacae8b9e9f78e50ddfcfbb5e2fa3 (diff)
parentb8238ec7e41d483a9166eb7aebbf911f36976cdc (diff)
downloadQt-26139fcacc05b4a74fce1ef4e0db819118765310.zip
Qt-26139fcacc05b4a74fce1ef4e0db819118765310.tar.gz
Qt-26139fcacc05b4a74fce1ef4e0db819118765310.tar.bz2
Merge remote branch 'qt/master' into lighthouse-master
Conflicts: src/gui/kernel/qapplication_win.cpp src/gui/kernel/qwidget.cpp src/gui/text/qfontengine_ft.cpp
Diffstat (limited to 'qmake/generators/win32/msvc_vcproj.cpp')
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp30
1 files changed, 9 insertions, 21 deletions
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 3c42f14..c98251b 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -459,6 +459,7 @@ void VcprojGenerator::writeSubDirs(QTextStream &t)
tmp_vcproj.setProjectFile(&tmp_proj);
Option::qmake_mode = old_mode;
if(Option::debug_level) {
+ debug_msg(1, "Dumping all variables:");
QMap<QString, QStringList> &vars = tmp_proj.variables();
for(QMap<QString, QStringList>::Iterator it = vars.begin();
it != vars.end(); ++it) {
@@ -1068,37 +1069,23 @@ void VcprojGenerator::initPreBuildEventTools()
{
}
-QString VcprojGenerator::fixCommandLine(DotNET version, const QString &input) const
-{
- QString result = input;
-
- if (version >= NET2005)
- result = result.replace(QLatin1Char('\n'), QLatin1String("&#x000D;&#x000A;"));
-
- return result;
-}
-
void VcprojGenerator::initPostBuildEventTools()
{
VCConfiguration &conf = vcProject.Configuration;
if(!project->values("QMAKE_POST_LINK").isEmpty()) {
- QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_POST_LINK"));
+ QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_POST_LINK"));
conf.postBuild.CommandLine = cmdline;
- if (conf.CompilerVersion < NET2005)
- cmdline = cmdline.replace("\n", "&&");
- conf.postBuild.Description = cmdline;
+ conf.postBuild.Description = cmdline.join(QLatin1String("\r\n"));
}
QString signature = !project->isEmpty("SIGNATURE_FILE") ? var("SIGNATURE_FILE") : var("DEFAULT_SIGNATURE");
bool useSignature = !signature.isEmpty() && !project->isActiveConfig("staticlib") &&
!project->isEmpty("CE_SDK") && !project->isEmpty("CE_ARCH");
if(useSignature)
- conf.postBuild.CommandLine.prepend(QLatin1String("signtool sign /F ") + signature + " \"$(TargetPath)\"\n" +
- (!conf.postBuild.CommandLine.isEmpty() ? " && " : ""));
+ conf.postBuild.CommandLine.prepend(
+ QLatin1String("signtool sign /F ") + signature + QLatin1String(" \"$(TargetPath)\""));
if(!project->values("MSVCPROJ_COPY_DLL").isEmpty()) {
- if(!conf.postBuild.CommandLine.isEmpty())
- conf.postBuild.CommandLine += " && ";
conf.postBuild.Description += var("MSVCPROJ_COPY_DLL_DESC");
conf.postBuild.CommandLine += var("MSVCPROJ_COPY_DLL");
}
@@ -1188,7 +1175,8 @@ void VcprojGenerator::initDeploymentTool()
devicePath = Option::fixPathToLocalOS(QDir::cleanPath(targetPath + QLatin1Char('\\') + devicePath));
}
// foreach d in item.sources
- foreach(QString source, project->values(item + ".sources")) {
+ // ### Qt 5: remove .sources, inconsistent with INSTALLS
+ foreach(QString source, project->values(item + ".sources") + project->values(item + ".files")) {
QString itemDevicePath = devicePath;
source = Option::fixPathToLocalOS(source);
QString nameFilter;
@@ -1227,9 +1215,9 @@ void VcprojGenerator::initPreLinkEventTools()
{
VCConfiguration &conf = vcProject.Configuration;
if(!project->values("QMAKE_PRE_LINK").isEmpty()) {
- QString cmdline = fixCommandLine(conf.CompilerVersion, var("QMAKE_PRE_LINK"));
- conf.preLink.Description = cmdline;
+ QStringList cmdline = VCToolBase::fixCommandLine(var("QMAKE_PRE_LINK"));
conf.preLink.CommandLine = cmdline;
+ conf.preLink.Description = cmdline.join(QLatin1String("\r\n"));
}
}