From 7fbd0a170a90f8fba8e81abb964ec06702f25448 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Thu, 27 May 2010 16:35:28 +0200 Subject: Upgrade harfbuzz to the latest version Merge the folling changes from harfbuzz: commit 85ad0ddd092522b4cff251f324128662f100991f Author: Lars Knoll Date: Thu May 27 16:05:00 2010 +0200 use unsigned char instead of unsigned in the bitfield. This saves significant memory, as the HB_CharAttributes and HB_GlyphAttributes structures are not 4 byte aligned anymore, by aligned to 1 resp. 2 bytes. The change is not compliant with ISO C, but accepted by almost all compilers. commit 30f0e6c3d0aa67ab9ff95c60903fe28c4df80fbc Author: Behdad Esfahbod Date: Mon May 17 15:43:46 2010 -0400 [hangul] Fix typo Reviewed-By: Thiago Macieira --- src/3rdparty/harfbuzz/src/harfbuzz-hangul.c | 2 +- src/3rdparty/harfbuzz/src/harfbuzz-shaper.h | 36 +++++++++++++++++++---------- 2 files changed, 25 insertions(+), 13 deletions(-) diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c index a819dac..6f89ed6 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c +++ b/src/3rdparty/harfbuzz/src/harfbuzz-hangul.c @@ -130,7 +130,7 @@ static int hangul_nextSyllableBoundary(const HB_UChar16 *s, int start, int end) static const HB_OpenTypeFeature hangul_features [] = { { HB_MAKE_TAG('c', 'c', 'm', 'p'), CcmpProperty }, { HB_MAKE_TAG('l', 'j', 'm', 'o'), CcmpProperty }, - { HB_MAKE_TAG('j', 'j', 'm', 'o'), CcmpProperty }, + { HB_MAKE_TAG('v', 'j', 'm', 'o'), CcmpProperty }, { HB_MAKE_TAG('t', 'j', 'm', 'o'), CcmpProperty }, { 0, 0 } }; diff --git a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h index f7c7714..470e27b 100644 --- a/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h +++ b/src/3rdparty/harfbuzz/src/harfbuzz-shaper.h @@ -34,6 +34,18 @@ HB_BEGIN_HEADER +/* + using anything else than signed or unsigned for bitfields in C is non standard, + but accepted by almost all compilers. And it gives a significant reduction in + memory consumption as HB_CharAttributes and HB_GlyphAttributes will not have + a 4 byte alignment +*/ +#ifdef __xlC__ +typedef unsigned hb_bitfield; +#else +typedef hb_uint8 hb_bitfield; +#endif + typedef enum { HB_Script_Common, HB_Script_Greek, @@ -123,12 +135,12 @@ typedef enum { typedef struct { - /*HB_LineBreakType*/ unsigned lineBreakType :2; - /*HB_Bool*/ unsigned whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */ - /*HB_Bool*/ unsigned charStop :1; /* Valid cursor position (for left/right arrow) */ - /*HB_Bool*/ unsigned wordBoundary :1; - /*HB_Bool*/ unsigned sentenceBoundary :1; - unsigned unused :2; + /*HB_LineBreakType*/ hb_bitfield lineBreakType :2; + /*HB_Bool*/ hb_bitfield whiteSpace :1; /* A unicode whitespace character, except NBSP, ZWNBSP */ + /*HB_Bool*/ hb_bitfield charStop :1; /* Valid cursor position (for left/right arrow) */ + /*HB_Bool*/ hb_bitfield wordBoundary :1; + /*HB_Bool*/ hb_bitfield sentenceBoundary :1; + hb_bitfield unused :2; } HB_CharAttributes; void HB_GetCharAttributes(const HB_UChar16 *string, hb_uint32 stringLength, @@ -181,12 +193,12 @@ typedef enum { * it like that. If this is a problem please tell Trolltech :) */ typedef struct { - unsigned justification :4; /* Justification class */ - unsigned clusterStart :1; /* First glyph of representation of cluster */ - unsigned mark :1; /* needs to be positioned around base char */ - unsigned zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */ - unsigned dontPrint :1; - unsigned combiningClass :8; + hb_bitfield justification :4; /* Justification class */ + hb_bitfield clusterStart :1; /* First glyph of representation of cluster */ + hb_bitfield mark :1; /* needs to be positioned around base char */ + hb_bitfield zeroWidth :1; /* ZWJ, ZWNJ etc, with no width */ + hb_bitfield dontPrint :1; + hb_bitfield combiningClass :8; } HB_GlyphAttributes; typedef struct HB_FaceRec_ { -- cgit v0.12 From 19c2aef89f7a8748c11161ffab9765313d0e2e7d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorbj=C3=B8rn=20Lindeijer?= Date: Thu, 27 May 2010 16:36:19 +0200 Subject: Removed unused variable Reviewed-by: Olivier Goffart --- src/gui/itemviews/qitemdelegate.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/gui/itemviews/qitemdelegate.cpp b/src/gui/itemviews/qitemdelegate.cpp index d5f6fd2..9bbfc23 100644 --- a/src/gui/itemviews/qitemdelegate.cpp +++ b/src/gui/itemviews/qitemdelegate.cpp @@ -667,7 +667,6 @@ void QItemDelegate::drawDisplay(QPainter *painter, const QStyleOptionViewItem &o { Q_D(const QItemDelegate); - QPen pen = painter->pen(); QPalette::ColorGroup cg = option.state & QStyle::State_Enabled ? QPalette::Normal : QPalette::Disabled; if (cg == QPalette::Normal && !(option.state & QStyle::State_Active)) -- cgit v0.12 From c3d652967c313cdc1853e9d905440ddf645c49f4 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 27 May 2010 15:42:10 +0200 Subject: fix & unify path separator escaping Reviewed-by: mauricek --- configure.exe | Bin 1316864 -> 1317888 bytes tools/configure/configureapp.cpp | 104 +++++++++++++++++++++------------------ tools/configure/configureapp.h | 3 +- 3 files changed, 58 insertions(+), 49 deletions(-) diff --git a/configure.exe b/configure.exe index a19f515..1fddc81 100755 Binary files a/configure.exe and b/configure.exe differ diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index ee49bbf..c2b3a57 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -392,11 +392,19 @@ Configure::~Configure() } } -QString Configure::fixSeparators(QString somePath) +QString Configure::fixSeparators(const QString &somePath, bool escape) { - return useUnixSeparators ? - QDir::fromNativeSeparators(somePath) : - QDir::toNativeSeparators(somePath); + if (useUnixSeparators) + return QDir::fromNativeSeparators(somePath); + QString ret = QDir::toNativeSeparators(somePath); + return escape ? escapeSeparators(ret) : ret; +} + +QString Configure::escapeSeparators(const QString &somePath) +{ + QString out = somePath; + out.replace(QLatin1Char('\\'), QLatin1String("\\\\")); + return out; } // We could use QDir::homePath() + "/.qt-license", but @@ -2573,10 +2581,10 @@ void Configure::generateOutputVars() qtConfig += "accessibility"; if( !qmakeLibs.isEmpty() ) - qmakeVars += "LIBS += " + qmakeLibs.join( " " ); + qmakeVars += "LIBS += " + escapeSeparators(qmakeLibs.join( " " )); if( !dictionary["QT_LFLAGS_SQLITE"].isEmpty() ) - qmakeVars += "QT_LFLAGS_SQLITE += " + dictionary["QT_LFLAGS_SQLITE"]; + qmakeVars += "QT_LFLAGS_SQLITE += " + escapeSeparators(dictionary["QT_LFLAGS_SQLITE"]); if (dictionary[ "QT3SUPPORT" ] == "yes") qtConfig += "qt3support"; @@ -2721,14 +2729,14 @@ void Configure::generateOutputVars() if(dictionary.contains("XQMAKESPEC") && dictionary[ "XQMAKESPEC" ].startsWith("linux")) dictionary[ "QMAKE_RPATHDIR" ] = dictionary[ "QT_INSTALL_LIBS" ]; - qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators( "tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ] ); - qmakeVars += QString("MOC_DIR = ") + fixSeparators( "tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ] ); - qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"]); + qmakeVars += QString("OBJECTS_DIR = ") + fixSeparators("tmp/obj/" + dictionary[ "QMAKE_OUTDIR" ], true); + qmakeVars += QString("MOC_DIR = ") + fixSeparators("tmp/moc/" + dictionary[ "QMAKE_OUTDIR" ], true); + qmakeVars += QString("RCC_DIR = ") + fixSeparators("tmp/rcc/" + dictionary["QMAKE_OUTDIR"], true); if (!qmakeDefines.isEmpty()) qmakeVars += QString("DEFINES += ") + qmakeDefines.join( " " ); if (!qmakeIncludes.isEmpty()) - qmakeVars += QString("INCLUDEPATH += ") + qmakeIncludes.join( " " ); + qmakeVars += QString("INCLUDEPATH += ") + escapeSeparators(qmakeIncludes.join( " " )); if (!opensslLibs.isEmpty()) qmakeVars += opensslLibs; else if (dictionary[ "OPENSSL" ] == "linked") { @@ -2800,27 +2808,27 @@ void Configure::generateCachefile() QString targetSpec = dictionary.contains("XQMAKESPEC") ? dictionary[ "XQMAKESPEC" ] : dictionary[ "QMAKESPEC" ]; QString mkspec_path = fixSeparators(sourcePath + "/mkspecs/" + targetSpec); if(QFile::exists(mkspec_path)) - cacheStream << "QMAKESPEC = " << mkspec_path << endl; + cacheStream << "QMAKESPEC = " << escapeSeparators(mkspec_path) << endl; else - cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec) << endl; - cacheStream << "ARCH = " << fixSeparators(dictionary[ "ARCHITECTURE" ]) << endl; - cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ]) << endl; - cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ]) << endl; + cacheStream << "QMAKESPEC = " << fixSeparators(targetSpec, true) << endl; + cacheStream << "ARCH = " << dictionary[ "ARCHITECTURE" ] << endl; + cacheStream << "QT_BUILD_TREE = " << fixSeparators(dictionary[ "QT_BUILD_TREE" ], true) << endl; + cacheStream << "QT_SOURCE_TREE = " << fixSeparators(dictionary[ "QT_SOURCE_TREE" ], true) << endl; if (dictionary["QT_EDITION"] != "QT_EDITION_OPENSOURCE") cacheStream << "DEFINES *= QT_EDITION=QT_EDITION_DESKTOP" << endl; //so that we can build without an install first (which would be impossible) - cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe") << endl; - cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe") << endl; - cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe") << endl; - cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe") << endl; - cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe") << endl; - cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include") << endl; - cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib") << endl; + cacheStream << "QMAKE_MOC = $$QT_BUILD_TREE" << fixSeparators("/bin/moc.exe", true) << endl; + cacheStream << "QMAKE_UIC = $$QT_BUILD_TREE" << fixSeparators("/bin/uic.exe", true) << endl; + cacheStream << "QMAKE_UIC3 = $$QT_BUILD_TREE" << fixSeparators("/bin/uic3.exe", true) << endl; + cacheStream << "QMAKE_RCC = $$QT_BUILD_TREE" << fixSeparators("/bin/rcc.exe", true) << endl; + cacheStream << "QMAKE_DUMPCPP = $$QT_BUILD_TREE" << fixSeparators("/bin/dumpcpp.exe", true) << endl; + cacheStream << "QMAKE_INCDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/include", true) << endl; + cacheStream << "QMAKE_LIBDIR_QT = $$QT_BUILD_TREE" << fixSeparators("/lib", true) << endl; if (dictionary["CETEST"] == "yes") { - cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ]) << endl; - cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ]) << endl; + cacheStream << "QT_CE_RAPI_INC = " << fixSeparators(dictionary[ "QT_CE_RAPI_INC" ], true) << endl; + cacheStream << "QT_CE_RAPI_LIB = " << fixSeparators(dictionary[ "QT_CE_RAPI_LIB" ], true) << endl; } // embedded @@ -2896,7 +2904,7 @@ void Configure::generateCachefile() << "QT_PATCH_VERSION = " << dictionary["VERSION_PATCH"] << endl; configStream << "#Qt for Windows CE c-runtime deployment" << endl - << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ]) << endl; + << "QT_CE_C_RUNTIME = " << fixSeparators(dictionary[ "CE_CRT" ], true) << endl; if(dictionary["CE_SIGNATURE"] != QLatin1String("no")) configStream << "DEFAULT_SIGNATURE=" << dictionary["CE_SIGNATURE"] << endl; @@ -3213,32 +3221,32 @@ void Configure::generateConfigfiles() << endl; if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) tmpStream << "#if !defined(QT_BOOTSTRAPPED) && !defined(QT_BUILD_QMAKE)" << endl; - tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary["QT_INSTALL_PREFIX"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << QString(dictionary["QT_INSTALL_DOCS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << QString(dictionary["QT_INSTALL_HEADERS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << QString(dictionary["QT_INSTALL_LIBS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << QString(dictionary["QT_INSTALL_BINS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << QString(dictionary["QT_INSTALL_PLUGINS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << QString(dictionary["QT_INSTALL_IMPORTS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << QString(dictionary["QT_INSTALL_DATA"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << QString(dictionary["QT_INSTALL_TRANSLATIONS"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << QString(dictionary["QT_INSTALL_EXAMPLES"]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << QString(dictionary["QT_INSTALL_DEMOS"]).replace( "\\", "\\\\" ) << "\";" << endl - //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << QString(dictionary["QT_INSTALL_SETTINGS"]).replace( "\\", "\\\\" ) << "\";" << endl + tmpStream << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary["QT_INSTALL_PREFIX"]) << "\";" << endl + << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << escapeSeparators(dictionary["QT_INSTALL_DOCS"]) << "\";" << endl + << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << escapeSeparators(dictionary["QT_INSTALL_HEADERS"]) << "\";" << endl + << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << escapeSeparators(dictionary["QT_INSTALL_LIBS"]) << "\";" << endl + << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << escapeSeparators(dictionary["QT_INSTALL_BINS"]) << "\";" << endl + << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << escapeSeparators(dictionary["QT_INSTALL_PLUGINS"]) << "\";" << endl + << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << escapeSeparators(dictionary["QT_INSTALL_IMPORTS"]) << "\";" << endl + << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << escapeSeparators(dictionary["QT_INSTALL_DATA"]) << "\";" << endl + << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << escapeSeparators(dictionary["QT_INSTALL_TRANSLATIONS"]) << "\";" << endl + << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << escapeSeparators(dictionary["QT_INSTALL_EXAMPLES"]) << "\";" << endl + << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << escapeSeparators(dictionary["QT_INSTALL_DEMOS"]) << "\";" << endl + //<< "static const char qt_configure_settings_path_str [256] = \"qt_stngpath=" << escapeSeparators(dictionary["QT_INSTALL_SETTINGS"]) << "\";" << endl ; if(!dictionary[ "QT_HOST_PREFIX" ].isNull()) { tmpStream << "#else" << endl - << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << QString(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) << "\";" << endl - << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ]).replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example").replace( "\\", "\\\\" ) <<"\";" << endl - << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos").replace( "\\", "\\\\" ) <<"\";" << endl + << "static const char qt_configure_prefix_path_str [512 + 12] = \"qt_prfxpath=" << escapeSeparators(dictionary[ "QT_HOST_PREFIX" ]) << "\";" << endl + << "static const char qt_configure_documentation_path_str[512 + 12] = \"qt_docspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/doc", true) <<"\";" << endl + << "static const char qt_configure_headers_path_str [512 + 12] = \"qt_hdrspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/include", true) <<"\";" << endl + << "static const char qt_configure_libraries_path_str [512 + 12] = \"qt_libspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/lib", true) <<"\";" << endl + << "static const char qt_configure_binaries_path_str [512 + 12] = \"qt_binspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/bin", true) <<"\";" << endl + << "static const char qt_configure_plugins_path_str [512 + 12] = \"qt_plugpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/plugins", true) <<"\";" << endl + << "static const char qt_configure_imports_path_str [512 + 12] = \"qt_impspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/imports", true) <<"\";" << endl + << "static const char qt_configure_data_path_str [512 + 12] = \"qt_datapath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ], true) <<"\";" << endl + << "static const char qt_configure_translations_path_str [512 + 12] = \"qt_trnspath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/translations", true) <<"\";" << endl + << "static const char qt_configure_examples_path_str [512 + 12] = \"qt_xmplpath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/example", true) <<"\";" << endl + << "static const char qt_configure_demos_path_str [512 + 12] = \"qt_demopath=" << fixSeparators(dictionary[ "QT_HOST_PREFIX" ] + "/demos", true) <<"\";" << endl << "#endif //QT_BOOTSTRAPPED" << endl; } tmpStream << "/* strlen( \"qt_lcnsxxxx\" ) == 12 */" << endl diff --git a/tools/configure/configureapp.h b/tools/configure/configureapp.h index c441129..6c10dd8 100644 --- a/tools/configure/configureapp.h +++ b/tools/configure/configureapp.h @@ -147,7 +147,8 @@ private: int outputWidth; bool useUnixSeparators; - QString fixSeparators(QString somePath); + QString fixSeparators(const QString &somePath, bool escape = false); + QString escapeSeparators(const QString &somePath); bool filesDiffer(const QString &file1, const QString &file2); bool findFile(const QString &fileName); -- cgit v0.12 From c86bb735e9b783b03010bc830c2a7a2fbcdb71b7 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 27 May 2010 16:31:57 +0200 Subject: escape backslashes in QMAKE_PRL_LIBS they may contain (absolute) windows paths, which need escaping now. Reviewed-by: mauricek --- qmake/generators/makefile.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/makefile.cpp b/qmake/generators/makefile.cpp index 4c4f5bc..d6b3e09 100644 --- a/qmake/generators/makefile.cpp +++ b/qmake/generators/makefile.cpp @@ -972,7 +972,7 @@ MakefileGenerator::writePrlFile(QTextStream &t) libs << "QMAKE_LIBS_PRIVATE"; t << "QMAKE_PRL_LIBS = "; for(QStringList::Iterator it = libs.begin(); it != libs.end(); ++it) - t << project->values((*it)).join(" ") << " "; + t << project->values((*it)).join(" ").replace('\\', "\\\\") << " "; t << endl; } } -- cgit v0.12 From f399b0deede15c7c5cb1108db261b77452afb394 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Thu, 27 May 2010 16:39:11 +0200 Subject: fix escaping - by not using eval the left-hand-side of qmake assignments is expanded, so there is no need to use eval. --- mkspecs/features/incredibuild_xge.prf | 6 +++--- src/src.pro | 16 ++++++++-------- src/tools/tools.pro | 16 ++++++++-------- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/mkspecs/features/incredibuild_xge.prf b/mkspecs/features/incredibuild_xge.prf index b8ca571..a81a0cc 100644 --- a/mkspecs/features/incredibuild_xge.prf +++ b/mkspecs/features/incredibuild_xge.prf @@ -1,11 +1,11 @@ contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc") { - EOC = \$\$escape_expand(\\\\n\\\\t) + EOC = $$escape_expand(\\n\\t) # The VCPROJ generator will replace the \r\h with the coded \r\n: # No other generator understands the \h - win32-msvc2*|wince*msvc*: EOC = \$\$escape_expand(\\\\r\\\\h) + win32-msvc2*|wince*msvc*: EOC = $$escape_expand(\\r\\h) for(xge, INCREDIBUILD_XGE) { - eval($${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands)) + $${xge}.commands = Rem IncrediBuild_AllowRemote $$EOC Rem IncrediBuild_OutputFile $$replace($${xge}.output,/,\\) $$EOC $$eval($${xge}.commands) } } diff --git a/src/src.pro b/src/src.pro index 7574796..5436c4a 100644 --- a/src/src.pro +++ b/src/src.pro @@ -157,24 +157,24 @@ for(subname, SRC_SUBDIRS) { SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { #debug - eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) - eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) + debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS + debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug) EXTRA_DEBUG_TARGETS += debug-$${subtarget} QMAKE_EXTRA_TARGETS += debug-$${subtarget} #release - eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) - eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) + release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS + release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release) EXTRA_RELEASE_TARGETS += release-$${subtarget} QMAKE_EXTRA_TARGETS += release-$${subtarget} } else { #do not have a real debug target/release #debug - eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) - eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS + debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first) EXTRA_DEBUG_TARGETS += debug-$${subtarget} QMAKE_EXTRA_TARGETS += debug-$${subtarget} #release - eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) - eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS + release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first) EXTRA_RELEASE_TARGETS += release-$${subtarget} QMAKE_EXTRA_TARGETS += release-$${subtarget} } diff --git a/src/tools/tools.pro b/src/tools/tools.pro index 1ecb944..4736d09 100644 --- a/src/tools/tools.pro +++ b/src/tools/tools.pro @@ -45,24 +45,24 @@ EXTRA_RELEASE_TARGETS = SUB_TEMPLATE = $$list($$fromfile($$subpro, TEMPLATE)) !isEqual(subname, src_tools_bootstrap):if(isEqual($$SUB_TEMPLATE, lib) | isEqual($$SUB_TEMPLATE, subdirs) | isEqual(subname, src_tools_idc) | isEqual(subname, src_tools_uic3)):!separate_debug_info { #debug - eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) - eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug)) + debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS + debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) debug) EXTRA_DEBUG_TARGETS += debug-$${subtarget} QMAKE_EXTRA_TARGETS += debug-$${subtarget} #release - eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) - eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release)) + release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS + release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) release) EXTRA_RELEASE_TARGETS += release-$${subtarget} QMAKE_EXTRA_TARGETS += release-$${subtarget} } else { #do not have a real debug target/release #debug - eval(debug-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS) - eval(debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + debug-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_DEBUG_TARGETS + debug-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first) EXTRA_DEBUG_TARGETS += debug-$${subtarget} QMAKE_EXTRA_TARGETS += debug-$${subtarget} #release - eval(release-$${subtarget}.depends = $${subdir}\$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS) - eval(release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first)) + release-$${subtarget}.depends = $${subdir}$${QMAKE_DIR_SEP}$(MAKEFILE) $$EXTRA_RELEASE_TARGETS + release-$${subtarget}.commands = (cd $$subdir && $(MAKE) -f $(MAKEFILE) first) EXTRA_RELEASE_TARGETS += release-$${subtarget} QMAKE_EXTRA_TARGETS += release-$${subtarget} } -- cgit v0.12