diff options
author | axis <qt-info@nokia.com> | 2009-04-24 14:03:55 (GMT) |
---|---|---|
committer | axis <qt-info@nokia.com> | 2009-04-27 07:09:01 (GMT) |
commit | e74c8dc65e2feffb9a55d00aee5ca634fba41df8 (patch) | |
tree | 3a131f9235fb6a455793178d8313655e4fd0036e /mkspecs/features | |
parent | 8f427b2b914d5b575a4a7c0ed65d2fb8f45acc76 (diff) | |
parent | 211bea9838bcc2acd7f54b65468fe1be2d81b1e0 (diff) | |
download | Qt-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 'mkspecs/features')
-rw-r--r-- | mkspecs/features/include_source_dir.prf | 1 | ||||
-rw-r--r-- | mkspecs/features/moc.prf | 74 | ||||
-rw-r--r-- | mkspecs/features/uic.prf | 14 |
3 files changed, 67 insertions, 22 deletions
diff --git a/mkspecs/features/include_source_dir.prf b/mkspecs/features/include_source_dir.prf new file mode 100644 index 0000000..8794998 --- /dev/null +++ b/mkspecs/features/include_source_dir.prf @@ -0,0 +1 @@ +!equals(_PRO_FILE_PWD_, $$OUT_PWD):INCLUDEPATH *= . diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index faa9871..60508c8 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -8,30 +8,50 @@ isEmpty(MOC_DIR):MOC_DIR = . isEmpty(QMAKE_H_MOD_MOC):QMAKE_H_MOD_MOC = moc_ isEmpty(QMAKE_EXT_CPP_MOC):QMAKE_EXT_CPP_MOC = .moc -# This function on Windows puts the includes into a .inc file which moc will read, if the project -# has more than 30 includes. We do this to overcome a command-line limit on Win < XP -# Otherwise the function simply returns the normal command-line for moc -defineReplace(mocCmd) { - win32:count($$list($$INCPATH), 40, >) { - EOC = $$escape_expand(\n\t) +# On Windows, put the includes into a .inc file which moc will read, if the project +# has too many includes. We do this to overcome a command-line limit on Win < XP +INCLUDETEMP= +WIN_INCLUDETEMP= +win32:count($$list($$INCPATH), 40, >) { + INCLUDETEMP = $$MOC_DIR/mocinclude.tmp - if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { - # the VCPROJ generator will replace the \r\h with the coded \r\n: 
 - # No other generator understands the \h - if(win32-msvc.net|win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h) - else: EOC = $$escape_expand(\\)$$escape_expand(\n\t) - } + # Remove any existing mocinclude.tmp when qmake runs + WIN_INCLUDETEMP=$$INCLUDETEMP + WIN_INCLUDETEMP~=s,/,\,g + system($$QMAKE_DEL_FILE $$WIN_INCLUDETEMP > NUL 2>&1) + + EOC = $$escape_expand(\n\t) + + if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { + # the VCPROJ generator will replace the \r\h with the coded \r\n: 
 + # No other generator understands the \h + if(win32-msvc.net|win32-msvc2*|wince*msvc*): EOC = $$escape_expand(\r\h) + else: EOC = $$escape_expand(\\)$$escape_expand(\n\t) + } + + unset(INCFILELIST) + RET = + for(incfile, $$list($$INCPATH)) { + INCFILELIST = -I$$incfile + isEmpty(RET): RET += @echo $$INCFILELIST> $$WIN_INCLUDETEMP $$EOC + else: RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC + } + !isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$WIN_INCLUDETEMP $$EOC - INCLUDETEMP = mocinclude.tmp - unset(INCFILELIST) + build_pass|isEmpty(BUILDS) { + mocinclude.target = $$INCLUDETEMP + mocinclude.commands = $$RET + QMAKE_EXTRA_TARGETS += mocinclude + } +} + +defineReplace(mocCmd) { + !isEmpty(WIN_INCLUDETEMP) { RET = - for(incfile, $$list($$INCPATH)) { - INCFILELIST = -I$$incfile - isEmpty(RET): RET += @echo $$INCFILELIST> $$INCLUDETEMP $$EOC - else: RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC + if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { + RET += $$mocinclude.commands } - !isEmpty(INCFILELIST):RET += @echo $$INCFILELIST>> $$INCLUDETEMP $$EOC - RET += $$QMAKE_MOC $(DEFINES) @$$INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2 + RET += $$QMAKE_MOC $(DEFINES) @$$WIN_INCLUDETEMP $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2 return($$RET) } return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) $$1 -o $$2) @@ -45,6 +65,7 @@ moc_header.output = $$MOC_DIR/$${QMAKE_H_MOD_MOC}${QMAKE_FILE_BASE}$${first(QMAK moc_header.input = HEADERS moc_header.variable_out = SOURCES moc_header.name = MOC ${QMAKE_FILE_IN} +!isEmpty(INCLUDETEMP):moc_header.depends += $$INCLUDETEMP silent:moc_header.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_header.commands QMAKE_EXTRA_COMPILERS += moc_header INCREDIBUILD_XGE += moc_header @@ -56,12 +77,23 @@ moc_source.commands = ${QMAKE_FUNC_mocCmd} moc_source.output = $$MOC_DIR/$${QMAKE_CPP_MOD_MOC}${QMAKE_FILE_BASE}$${QMAKE_EXT_CPP_MOC} moc_source.input = SOURCES OBJECTIVE_SOURCES moc_source.name = MOC ${QMAKE_FILE_IN} +!isEmpty(INCLUDETEMP):moc_source.depends += $$INCLUDETEMP silent:moc_source.commands = @echo moc ${QMAKE_FILE_IN} && $$moc_source.commands QMAKE_EXTRA_COMPILERS += moc_source INCREDIBUILD_XGE += moc_source #make sure we can include these files -INCLUDEPATH += $$MOC_DIR +moc_dir_short = $$MOC_DIR +win32:moc_dir_short ~= s,^.:,/, +contains(moc_dir_short, ^[/\\\\].*):INCLUDEPATH += $$MOC_DIR +else:INCLUDEPATH += $$OUT_PWD/$$MOC_DIR + +# Backwards compatibility: Make shadow builds with default MOC_DIR work +# if the user did not add the source dir explicitly. +equals(MOC_DIR, .) { + CONFIG -= include_source_dir + CONFIG = include_source_dir $$CONFIG +} #auto depend on moc unix:!no_mocdepend { diff --git a/mkspecs/features/uic.prf b/mkspecs/features/uic.prf index 885fad7..d2985f9 100644 --- a/mkspecs/features/uic.prf +++ b/mkspecs/features/uic.prf @@ -34,7 +34,19 @@ isEmpty(QMAKE_MOD_UIC):QMAKE_MOD_UIC = ui_ INCREDIBUILD_XGE += uic } -INCLUDEPATH += $$UI_HEADERS_DIR +!isEmpty(FORMS)|!isEmpty(FORMS3) { + ui_dir_short = $$UI_HEADERS_DIR + win32:ui_dir_short ~= s,^.:,/, + contains(ui_dir_short, ^[/\\\\].*):INCLUDEPATH += $$UI_HEADERS_DIR + else:INCLUDEPATH += $$OUT_PWD/$$UI_HEADERS_DIR +} + +# Backwards compatibility: Make shadow builds with default UI_DIR work +# if the user did not add the source dir explicitly. +equals(UI_DIR, .) { + CONFIG -= include_source_dir + CONFIG = include_source_dir $$CONFIG +} uic3 { isEmpty(FORMS3) { |