summaryrefslogtreecommitdiffstats
path: root/qmake/generators
diff options
context:
space:
mode:
authoraxis <qt-info@nokia.com>2009-04-24 14:03:55 (GMT)
committeraxis <qt-info@nokia.com>2009-04-27 07:09:01 (GMT)
commite74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch)
tree3a131f9235fb6a455793178d8313655e4fd0036e /qmake/generators
parent8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff)
parent211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff)
downloadQt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.zip
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.gz
Qt-e74c8dc65e2feffb9a55d00aee5ca634fba41df8.tar.bz2
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt
Configure.exe recompiled with MSVC6. Conflicts: configure.exe examples/network/network.pro src/gui/dialogs/qfiledialog_p.h src/gui/dialogs/qfilesystemmodel_p.h src/gui/kernel/qapplication.cpp tests/auto/_Categories/qmake.txt tests/auto/qfile/test/test.pro tests/auto/qfile/tst_qfile.cpp tests/auto/qlibrary/tst_qlibrary.cpp tests/auto/qline/tst_qline.cpp tests/auto/qstyle/tst_qstyle.cpp tests/auto/qtextstream/tst_qtextstream.cpp tests/auto/qtranslator/qtranslator.pro tests/auto/qwaitcondition/tst_qwaitcondition.cpp translations/qt_ja_JP.ts
Diffstat (limited to 'qmake/generators')
-rw-r--r--qmake/generators/makefile.cpp16
-rw-r--r--qmake/generators/makefile.h6
-rw-r--r--qmake/generators/metamakefile.cpp2
-rw-r--r--qmake/generators/win32/msvc_nmake.cpp6
-rw-r--r--qmake/generators/win32/msvc_vcproj.cpp2
-rw-r--r--qmake/generators/win32/winmakefile.cpp18
6 files changed, 27 insertions, 23 deletions
diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp
index 56fae15..82703c5 100644
--- a/qmake/generators/makefile.cpp
+++ b/qmake/generators/makefile.cpp
@@ -1494,7 +1494,7 @@ MakefileGenerator::replaceExtraCompilerVariables(const QString &orig_var, const
val += project->values(varname);
}
if(val.isEmpty() && var.startsWith(QLatin1String("QMAKE_VAR_FIRST_"))) {
- const QString varname = var.mid(12);
+ const QString varname = var.mid(16);
val += project->first(varname);
}
@@ -2797,16 +2797,9 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
ret.prepend(pwd);
ret = Option::fixPathToTargetOS(ret, false, canon);
} else { //fix it..
- QString qfile(Option::fixPathToLocalOS(ret, true, canon)), in_dir(in_d), out_dir(out_d);
+ QString out_dir = QDir(Option::output_dir).absoluteFilePath(out_d);
+ QString in_dir = QDir(pwd).absoluteFilePath(in_d);
{
- if(out_dir.isNull() || QDir::isRelativePath(out_dir))
- out_dir.prepend(Option::output_dir + "/");
- else if(out_dir == ".")
- out_dir = pwd;
- if(in_dir.isEmpty() || QDir::isRelativePath(in_dir))
- in_dir.prepend(pwd);
- else if(in_dir == ".")
- in_dir = pwd;
QFileInfo in_fi(fileInfo(in_dir));
if(in_fi.exists())
in_dir = in_fi.canonicalFilePath();
@@ -2815,6 +2808,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
out_dir = out_fi.canonicalFilePath();
}
+ QString qfile(Option::fixPathToLocalOS(ret, true, canon));
QFileInfo qfileinfo(fileInfo(qfile));
if(out_dir != in_dir || !qfileinfo.isRelative()) {
if(qfileinfo.isRelative()) {
@@ -2868,7 +2862,7 @@ MakefileGenerator::fileFixify(const QString& file, const QString &out_d, const Q
}
if(ret.isEmpty())
ret = ".";
- debug_msg(3, "Fixed[%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, orig_file.toLatin1().constData(),
+ debug_msg(3, "Fixed[%d,%d] %s :: to :: %s [%s::%s] [%s::%s]", fix, canon, orig_file.toLatin1().constData(),
ret.toLatin1().constData(), in_d.toLatin1().constData(), out_d.toLatin1().constData(),
pwd.toLatin1().constData(), Option::output_dir.toLatin1().constData());
cache->insert(cacheKey, ret);
diff --git a/qmake/generators/makefile.h b/qmake/generators/makefile.h
index c39cbce..9896c1d 100644
--- a/qmake/generators/makefile.h
+++ b/qmake/generators/makefile.h
@@ -114,7 +114,7 @@ protected:
struct SubTarget
{
QString name;
- QString in_directory, out_directory;
+ QString in_directory, out_directory;
QString profile, target, makefile;
QStringList depends;
};
@@ -188,8 +188,8 @@ protected:
void filterIncludedFiles(const QString &);
virtual void processSources() {
- filterIncludedFiles("SOURCES");
- filterIncludedFiles("GENERATED_SOURCES");
+ filterIncludedFiles("SOURCES");
+ filterIncludedFiles("GENERATED_SOURCES");
}
//for cross-platform dependent directories
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index 5413618..5a77271 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -361,7 +361,7 @@ SubdirsMetaMakefileGenerator::init()
}
--recurseDepth;
- Option::output.setFileName(old_output);
+ Option::output.setFileName(old_output);
Option::output_dir = old_output_dir;
qmake_setpwd(oldpwd);
}
diff --git a/qmake/generators/win32/msvc_nmake.cpp b/qmake/generators/win32/msvc_nmake.cpp
index 4b1b66d..b5904cc 100644
--- a/qmake/generators/win32/msvc_nmake.cpp
+++ b/qmake/generators/win32/msvc_nmake.cpp
@@ -244,14 +244,14 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
project->variables().remove("QMAKE_RUN_CC");
QHash<QString, void*> source_directories;
- source_directories.insertMulti(".", (void*)1);
+ source_directories.insert(".", (void*)1);
QString directories[] = { QString("UI_SOURCES_DIR"), QString("UI_DIR"), QString() };
for(int y = 0; !directories[y].isNull(); y++) {
QString dirTemp = project->first(directories[y]);
if (dirTemp.endsWith("\\"))
dirTemp.truncate(dirTemp.length()-1);
if(!dirTemp.isEmpty())
- source_directories.insertMulti(dirTemp, (void*)1);
+ source_directories.insert(dirTemp, (void*)1);
}
QString srcs[] = { QString("SOURCES"), QString("GENERATED_SOURCES"), QString() };
for(int x = 0; !srcs[x].isNull(); x++) {
@@ -262,7 +262,7 @@ void NmakeMakefileGenerator::writeImplicitRulesPart(QTextStream &t)
sep = "/";
QString dir = (*sit).section(sep, 0, -2);
if(!dir.isEmpty() && !source_directories[dir])
- source_directories.insertMulti(dir, (void*)1);
+ source_directories.insert(dir, (void*)1);
}
}
diff --git a/qmake/generators/win32/msvc_vcproj.cpp b/qmake/generators/win32/msvc_vcproj.cpp
index 7e703c2..bbbb027 100644
--- a/qmake/generators/win32/msvc_vcproj.cpp
+++ b/qmake/generators/win32/msvc_vcproj.cpp
@@ -1030,7 +1030,6 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
if(project->isActiveConfig("debug")){
// Debug version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_DEBUG"));
if((projectTarget == Application) || (projectTarget == StaticLib))
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DBG"));
@@ -1038,7 +1037,6 @@ void VcprojGenerator::initCompilerTool()
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_MT_DLLDBG"));
} else {
// Release version
- conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS"));
conf.compiler.parseOptions(project->values("QMAKE_CXXFLAGS_RELEASE"));
conf.compiler.PreprocessorDefinitions += "QT_NO_DEBUG";
conf.compiler.PreprocessorDefinitions += "NDEBUG";
diff --git a/qmake/generators/win32/winmakefile.cpp b/qmake/generators/win32/winmakefile.cpp
index 60a27be..87f55cf 100644
--- a/qmake/generators/win32/winmakefile.cpp
+++ b/qmake/generators/win32/winmakefile.cpp
@@ -432,9 +432,21 @@ void Win32MakefileGenerator::processRcFileVar()
writeRcFile = rcFile.readAll() != rcString;
rcFile.close();
}
- if (writeRcFile && rcFile.open(QFile::WriteOnly)) {
- rcFile.write(rcString);
- rcFile.close();
+ if (writeRcFile) {
+ bool ok;
+ ok = rcFile.open(QFile::WriteOnly);
+ if (!ok) {
+ // The file can't be opened... try creating the containing
+ // directory first (needed for clean shadow builds)
+ QDir().mkpath(QFileInfo(rcFile).path());
+ ok = rcFile.open(QFile::WriteOnly);
+ }
+ if (!ok) {
+ ::fprintf(stderr, "Cannot open for writing: %s", rcFile.fileName().toLatin1().constData());
+ ::exit(1);
+ }
+ rcFile.write(rcString);
+ rcFile.close();
}
if (project->values("QMAKE_WRITE_DEFAULT_RC").isEmpty())
project->values("RC_FILE").insert(0, rcFile.fileName());