From 1a99cdbb36334e17c34b38dd5df1bdd70167b42a Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Wed, 4 Aug 2010 14:15:35 +0200 Subject: Add breakpad support Breakpad is a portable crash handler. It sends the raw crash information to a server for analysis. This analysis needs debug information. Consequently, we compile with debug info even in release mode if qt-breakpad integration is requested (via an environment variable). Reviewed-by: ossi --- mkspecs/common/g++.conf | 2 + mkspecs/common/mac-g++.conf | 3 ++ mkspecs/features/default_post.prf | 88 +++++++++++++++++++++++++++++++++++++++ mkspecs/win32-msvc2003/qmake.conf | 3 ++ mkspecs/win32-msvc2005/qmake.conf | 3 ++ mkspecs/win32-msvc2008/qmake.conf | 3 ++ mkspecs/win32-msvc2010/qmake.conf | 3 ++ 7 files changed, 105 insertions(+) diff --git a/mkspecs/common/g++.conf b/mkspecs/common/g++.conf index d3db24a..0d511fc 100644 --- a/mkspecs/common/g++.conf +++ b/mkspecs/common/g++.conf @@ -8,6 +8,7 @@ QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC @@ -22,6 +23,7 @@ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf index 446547d..29b7408 100644 --- a/mkspecs/common/mac-g++.conf +++ b/mkspecs/common/mac-g++.conf @@ -10,6 +10,7 @@ QMAKE_CFLAGS_DEPS += -M QMAKE_CFLAGS_WARN_ON += -Wall -W QMAKE_CFLAGS_WARN_OFF += -w QMAKE_CFLAGS_RELEASE += -O2 +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -g -gdwarf-2 QMAKE_CFLAGS_DEBUG += -g QMAKE_CFLAGS_SHLIB += -fPIC QMAKE_CFLAGS_STATIC_LIB += -fPIC @@ -33,6 +34,7 @@ QMAKE_CXXFLAGS_DEPS += $$QMAKE_CFLAGS_DEPS QMAKE_CXXFLAGS_WARN_ON += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS_WARN_OFF += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE += $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_SHLIB += $$QMAKE_CFLAGS_SHLIB QMAKE_CXXFLAGS_STATIC_LIB += $$QMAKE_CFLAGS_STATIC_LIB @@ -52,6 +54,7 @@ QMAKE_LINK_C = $$QMAKE_CC QMAKE_LINK_C_SHLIB = $$QMAKE_CC QMAKE_LFLAGS += -headerpad_max_install_names QMAKE_LFLAGS_RELEASE += +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO += -g -gdwarf-2 QMAKE_LFLAGS_DEBUG += QMAKE_LFLAGS_APP += QMAKE_LFLAGS_SHLIB += -single_module -dynamiclib diff --git a/mkspecs/features/default_post.prf b/mkspecs/features/default_post.prf index d844385..59a5e86 100644 --- a/mkspecs/features/default_post.prf +++ b/mkspecs/features/default_post.prf @@ -1,3 +1,15 @@ +QT_BREAKPAD_ROOT_PATH = $$(QT_BREAKPAD_ROOT_PATH) +!isEmpty(QT_BREAKPAD_ROOT_PATH): \ # quick test first whether requested ... + !staticlib:!static:CONFIG(release, debug|release):contains(TEMPLATE, .*(app|lib)): \ # is it applicable? + !contains(TARGET, .*phony_target.*): \ # monster hack, you don't really see this here, right? ;) + system($$QT_BREAKPAD_ROOT_PATH/qtbreakpadsymbols --breakpad-exists) { # do we really have it? + CONFIG += breakpad + CONFIG -= no_debug_info separate_debug_info + QMAKE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO + QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO + QMAKE_LFLAGS_RELEASE = $$QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO +} + CONFIG(debug, debug|release):load(debug) else:load(release) debug_and_release:load(debug_and_release) @@ -6,6 +18,82 @@ incredibuild_xge { CONFIG = incredibuild_xge $$CONFIG } +breakpad { + !contains(DESTDIR, (/|.:[/\\\\]).*):TARGET_BASEPATH = $${OUT_PWD}/ + !isEmpty(DESTDIR):TARGET_BASEPATH = $${TARGET_BASEPATH}$${DESTDIR}/ + + win32 { + TARGET_BASEPATH ~= s,/,\\, + contains(TEMPLATE, .*lib) { + isEmpty(TARGET_VERSION_EXT):!isEmpty(VERSION) { + TARGET_VERSION_EXT = $$section(VERSION, ., 0, 0) + isEqual(TARGET_VERSION_EXT, 0):unset(TARGET_VERSION_EXT) + } + TARGET_EXT = .dll + } else { + TARGET_EXT = .exe + } + + DEBUGFILENAME = $${TARGET_BASEPATH}$${TARGET}$${TARGET_VERSION_EXT}$${TARGET_EXT} + PDBFILENAME = $${TARGET_BASEPATH}$${TARGET}$${TARGET_VERSION_EXT}.pdb + DEBUGFILENAME ~= s,/,\\, + PDBFILENAME ~= s,/,\\, + QMAKE_CLEAN += $$PDBFILENAME # for the debug case it is hardcoded in qmake + } else { + contains(TEMPLATE, .*lib):LIBPREFIX = lib + + macx { + equals(TEMPLATE, lib) { + lib_bundle { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.framework/$${TARGET} + } else { + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET} + !plugin { + TEMP_VERSION = $$section(VERSION, ., 0, 0) + isEmpty(TEMP_VERSION):TEMP_VERSION = 1 + TARGET_FILENAME = $${TARGET_FILENAME}.$${TEMP_VERSION} + } + TARGET_FILENAME = $${TARGET_FILENAME}.$${QMAKE_EXTENSION_SHLIB} + } + } else { + app_bundle { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET}.app/Contents/MacOS/$${TARGET} + } else { + TARGET_FILENAME = $${TARGET_BASEPATH}$${TARGET} + } + } + DEBUGFILENAME = $$TARGET_FILENAME + } else { + equals(TEMPLATE, lib) { + plugin { + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so + } else { + TEMP_VERSION = $$VERSION + isEmpty(TEMP_VERSION):TEMP_VERSION = 1.0.0 + TARGET_FILENAME = $${TARGET_BASEPATH}$${LIBPREFIX}$${TARGET}.so.$${TEMP_VERSION} + } + } else { + TARGET_BASEPATH = $${TARGET_BASEPATH}$${TARGET} + } + DEBUGFILENAME = $$TARGET_BASEPATH + } + } + + PROJECTPATH = $$OUT_PWD + win32:PROJECTPATH ~= s,/,\\, + + !isEmpty(QMAKE_POST_LINK):QMAKE_POST_LINK = $$QMAKE_POST_LINK$$escape_expand(\\n\\t) + QMAKE_POST_LINK += $$quote($${QT_BREAKPAD_ROOT_PATH}$${DIR_SEPARATOR}qtbreakpadsymbols \"$$DEBUGFILENAME\" \"$$PROJECTPATH\") + !isEmpty(QMAKE_STRIP):QMAKE_POST_LINK = $$quote($$QMAKE_POST_LINK$$escape_expand(\\n\\t)$$QMAKE_STRIP \"$$DEBUGFILENAME\") + + unset(TARGET_BASEPATH) + unset(TARGET_FILENAME) + unset(SYMBOLFILENAME) + unset(TARGET_EXT) + unset(TARGET_VERSION_EXT) + unset(TEMP_VERSION) +} + QMAKE_INCDIR += $$QMAKE_INCDIR_POST QMAKE_LIBDIR += $$QMAKE_LIBDIR_POST diff --git a/mkspecs/win32-msvc2003/qmake.conf b/mkspecs/win32-msvc2003/qmake.conf index 0230b30..63d1ffd 100644 --- a/mkspecs/win32-msvc2003/qmake.conf +++ b/mkspecs/win32-msvc2003/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm300 QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = @@ -28,6 +29,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_STL_ON = -EHsc @@ -51,6 +53,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS diff --git a/mkspecs/win32-msvc2005/qmake.conf b/mkspecs/win32-msvc2005/qmake.conf index 0406fd0..265d028 100644 --- a/mkspecs/win32-msvc2005/qmake.conf +++ b/mkspecs/win32-msvc2005/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -29,6 +30,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -53,6 +55,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2008/qmake.conf b/mkspecs/win32-msvc2008/qmake.conf index 9a69aaa..1432645 100644 --- a/mkspecs/win32-msvc2008/qmake.conf +++ b/mkspecs/win32-msvc2008/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -30,6 +31,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -55,6 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" diff --git a/mkspecs/win32-msvc2010/qmake.conf b/mkspecs/win32-msvc2010/qmake.conf index 8331c14..84086e2 100644 --- a/mkspecs/win32-msvc2010/qmake.conf +++ b/mkspecs/win32-msvc2010/qmake.conf @@ -20,6 +20,7 @@ QMAKE_CFLAGS = -nologo -Zm200 -Zc:wchar_t- QMAKE_CFLAGS_WARN_ON = -W3 QMAKE_CFLAGS_WARN_OFF = -W0 QMAKE_CFLAGS_RELEASE = -O2 -MD +QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO += -O2 -MD -Zi QMAKE_CFLAGS_DEBUG = -Zi -MDd QMAKE_CFLAGS_YACC = QMAKE_CFLAGS_LTCG = -GL @@ -30,6 +31,7 @@ QMAKE_CXXFLAGS = $$QMAKE_CFLAGS QMAKE_CXXFLAGS_WARN_ON = $$QMAKE_CFLAGS_WARN_ON -w34100 -w34189 QMAKE_CXXFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE +QMAKE_CXXFLAGS_RELEASE_WITH_DEBUGINFO += $$QMAKE_CFLAGS_RELEASE_WITH_DEBUGINFO QMAKE_CXXFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS_YACC = $$QMAKE_CFLAGS_YACC QMAKE_CXXFLAGS_LTCG = $$QMAKE_CFLAGS_LTCG @@ -55,6 +57,7 @@ QMAKE_RUN_CXX_IMP_BATCH = $(CXX) -c $(CXXFLAGS) $(INCPATH) -Fo$@ @<< QMAKE_LINK = link QMAKE_LFLAGS = /NOLOGO QMAKE_LFLAGS_RELEASE = /INCREMENTAL:NO +QMAKE_LFLAGS_RELEASE_WITH_DEBUGINFO = /INCREMENTAL:NO /DEBUG QMAKE_LFLAGS_DEBUG = /DEBUG QMAKE_LFLAGS_CONSOLE = /SUBSYSTEM:CONSOLE QMAKE_LFLAGS_WINDOWS = /SUBSYSTEM:WINDOWS \"/MANIFESTDEPENDENCY:type=\'win32\' name=\'Microsoft.Windows.Common-Controls\' version=\'6.0.0.0\' publicKeyToken=\'6595b64144ccf1df\' language=\'*\' processorArchitecture=\'*\'\" -- cgit v0.12 From 9e5a1b618ea7bf579c7b2d66a8844d606405bc6d Mon Sep 17 00:00:00 2001 From: Anders Bakken Date: Mon, 20 Sep 2010 19:14:10 +0200 Subject: Enable building Qt/Webkit with debug symbols With this patch one can configure with -webkit-debug to build Webkit with debug symbols without having to manually edit WebCore.pro. Merge-request: 816 Reviewed-by: Oswald Buddenhagen --- configure | 50 ++++++++++++++++++++------------- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- tools/configure/configureapp.cpp | 16 +++++++++-- 3 files changed, 45 insertions(+), 23 deletions(-) diff --git a/configure b/configure index da6fb0a..4316cc8 100755 --- a/configure +++ b/configure @@ -686,7 +686,7 @@ CFG_AUDIO_BACKEND=auto CFG_SVG=auto CFG_DECLARATIVE=auto CFG_DECLARATIVE_DEBUG=yes -CFG_WEBKIT=auto # (yes|no|auto) +CFG_WEBKIT=auto # (yes|no|auto|debug) CFG_JAVASCRIPTCORE_JIT=auto CFG_GFX_AVAILABLE="linuxfb transformed qvfb vnc multiscreen directfb" @@ -939,13 +939,26 @@ while [ "$#" -gt 0 ]; do VAR=`echo $1 | sed "s,^-[^-]*-\(.*\),\1,"` VAL=`echo $1 | sed "s,^-\([^-]*\).*,\1,"` ;; + #WebKit options + -webkit) + VAR="webkit" + VAL="yes" + ;; + -webkit-debug) + VAR="webkit" + VAL="debug" + ;; + -no-webkit) + VAR="webkit" + VAL="no" + ;; #Qt style no options -no-*) VAR=`echo $1 | sed "s,^-no-\(.*\),\1,"` VAL=no ;; #Qt style yes options - -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-webkit|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) + -incremental|-qvfb|-profile|-shared|-static|-sm|-xinerama|-xshape|-xsync|-xinput|-egl|-reduce-exports|-pch|-separate-debug-info|-stl|-freetype|-xcursor|-xfixes|-xrandr|-xrender|-mitshm|-fontconfig|-xkb|-nis|-qdbus|-dbus|-dbus-linked|-glib|-gstreamer|-gtkstyle|-cups|-iconv|-largefile|-h|-help|-v|-verbose|-debug|-release|-fast|-accessibility|-confirm-license|-gnumake|-framework|-qt3support|-debug-and-release|-exceptions|-cocoa|-carbon|-universal|-prefix-install|-silent|-armfpa|-optimized-qmake|-dwarf2|-reduce-relocations|-sse|-openssl|-openssl-linked|-ptmalloc|-xmlpatterns|-phonon|-phonon-backend|-multimedia|-audio-backend|-svg|-declarative|-javascript-jit|-script|-scripttools|-rpath|-force-pkg-config|-s60|-usedeffiles) VAR=`echo $1 | sed "s,^-\(.*\),\1,"` VAL=yes ;; @@ -2010,15 +2023,8 @@ while [ "$#" -gt 0 ]; do fi ;; webkit) - if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ]; then - CFG_WEBKIT="yes" - else - if [ "$VAL" = "no" ]; then - CFG_WEBKIT="no" - else - UNKNOWN_OPT=yes - fi - fi + [ "$VAL" = "auto" ] && VAL="yes" + CFG_WEBKIT="$VAL" ;; javascript-jit) if [ "$VAL" = "yes" ] || [ "$VAL" = "auto" ] || [ "$VAL" = "no" ]; then @@ -3535,10 +3541,10 @@ Usage: $relconf [-h] [-prefix ] [-prefix-install] [-bindir ] [-libdir [-no-multimedia] [-multimedia] [-no-phonon] [-phonon] [-no-phonon-backend] [-phonon-backend] [-no-media-backend] [-media-backend] [-no-audio-backend] [-audio-backend] [-no-openssl] [-openssl] [-openssl-linked] - [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-no-javascript-jit] [-javascript-jit] + [-no-gtkstyle] [-gtkstyle] [-no-svg] [-svg] [-no-webkit] [-webkit] [-webkit-debug] + [-no-javascript-jit] [-javascript-jit] [-no-script] [-script] [-no-scripttools] [-scripttools] [-no-declarative] [-declarative][-no-declarative-debug] [-declarative-debug] - [additional platform specific options (see below)] @@ -3690,6 +3696,7 @@ fi -no-webkit ......... Do not build the WebKit module. + -webkit ............ Build the WebKit module. WebKit is built if a decent C++ compiler is used. + -webkit-debug ...... Build the WebKit module with debug symbols. -no-javascript-jit . Do not build the JavaScriptCore JIT compiler. + -javascript-jit .... Build the JavaScriptCore JIT compiler. @@ -7191,14 +7198,15 @@ if [ "$CFG_WEBKIT" = "auto" ]; then CFG_WEBKIT="$canBuildWebKit" fi -if [ "$CFG_WEBKIT" = "yes" ]; then +if [ "$CFG_WEBKIT" != "no" ]; then # This include takes care of adding "webkit" to QT_CONFIG. cp -f "$relpath/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri" "$outpath/mkspecs/modules/qt_webkit_version.pri" # The reason we set CFG_WEBKIT, is such that the printed overview of what will be enabled, shows correctly. - CFG_WEBKIT="yes" + if [ "$CFG_WEBKIT" = "debug" ]; then + QMAKE_CONFIG="$QMAKE_CONFIG webkit-debug" + fi else rm -f "$outpath/mkspecs/modules/qt_webkit_version.pri" - CFG_WEBKIT="no" QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_WEBKIT" fi @@ -8130,7 +8138,7 @@ EOF *) ;; esac -if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" = "yes" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then +if [ "$PLATFORM_MAC" = "yes" ] && [ "$CFG_MAC_DWARF2" = "no" ] && [ "$CFG_WEBKIT" != "no" ] && [ "$CFG_DEBUG_RELEASE" = "yes" ]; then cat < Date: Tue, 21 Sep 2010 11:00:49 +0200 Subject: make lupdate test less fragile the sensivity to additions of new calls to unimplemented qmake functions to .prf files kinda sucks, so remove it. --- .../linguist/lupdate/testdata/good/heuristics/expectedoutput.txt | 1 - tests/auto/linguist/lupdate/tst_lupdate.cpp | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt b/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt index 093610d..1eed403 100644 --- a/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt +++ b/tests/auto/linguist/lupdate/testdata/good/heuristics/expectedoutput.txt @@ -1,4 +1,3 @@ -*.*Function 'eval' is not implemented Updating 'project\.ts'\.\.\. Found 3 source text\(s\) \(3 new and 0 already existing\) Removed 5 obsolete entries diff --git a/tests/auto/linguist/lupdate/tst_lupdate.cpp b/tests/auto/linguist/lupdate/tst_lupdate.cpp index 5ba6c52..e6d2135 100644 --- a/tests/auto/linguist/lupdate/tst_lupdate.cpp +++ b/tests/auto/linguist/lupdate/tst_lupdate.cpp @@ -122,12 +122,19 @@ static bool prepareMatch(const QString &expect, QString *tmpl, int *require, int return true; } -void tst_lupdate::doCompare(const QStringList &actual, const QString &expectedFn, bool err) +void tst_lupdate::doCompare(const QStringList &_actual, const QString &expectedFn, bool err) { QFile file(expectedFn); QVERIFY2(file.open(QIODevice::ReadOnly | QIODevice::Text), qPrintable(expectedFn)); QStringList expected = QString(file.readAll()).split('\n'); + QStringList actual; + actual.reserve(_actual.size()); + QRegExp niRx(".*:Function '\\w+' is not implemented"); + foreach (const QString &a, _actual) + if (!niRx.exactMatch(a)) + actual << a; + int ei = 0, ai = 0, em = expected.size(), am = actual.size(); int oei = 0, oai = 0, oem = em, oam = am; int require = 0, accept = 0; -- cgit v0.12 From 9fcbca8de0963e2429dc7d25adccbf6a895fa7e8 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 10 May 2010 15:04:06 +0400 Subject: move QUnicodeTables:: script() and lineBreakClass() implementations from qchar.cpp to qunicodetables.cpp --- src/corelib/tools/qchar.cpp | 17 ----------------- util/unicode/main.cpp | 18 ++++++++++++++++++ 2 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/corelib/tools/qchar.cpp b/src/corelib/tools/qchar.cpp index ed0af4e..bb777cd 100644 --- a/src/corelib/tools/qchar.cpp +++ b/src/corelib/tools/qchar.cpp @@ -1630,21 +1630,4 @@ static void canonicalOrderHelper(QString *str, QChar::UnicodeVersion version, in } } -int QT_FASTCALL QUnicodeTables::script(unsigned int uc) -{ - if (uc > 0xffff) - return Common; - int script = uc_scripts[uc >> 7]; - if (script < ScriptSentinel) - return script; - script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount); - script = uc_scripts[script + (uc & 0x7f)]; - return script; -} - -Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4) -{ - return (QUnicodeTables::LineBreakClass) qGetProp(ucs4)->line_break_class; -} - QT_END_NAMESPACE diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index f2ebe7c..5303c0d 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1908,6 +1908,19 @@ QByteArray createScriptTableDeclaration() } declaration += "\n};\n\n} // namespace QUnicodeTables\n\n"; + declaration += + "Q_CORE_EXPORT int QT_FASTCALL QUnicodeTables::script(uint ucs4)\n" + "{\n" + " if (ucs4 > 0xffff)\n" + " return Common;\n" + " int script = uc_scripts[ucs4 >> 7];\n" + " if (script < ScriptSentinel)\n" + " return script;\n" + " script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount);\n" + " script = uc_scripts[script + (ucs4 & 0x7f)];\n" + " return script;\n" + "}\n\n"; + qDebug("createScriptTableDeclaration: table size is %d bytes", unicodeBlockCount + (extraBlockList.size() * unicodeBlockSize)); @@ -2168,6 +2181,11 @@ static QByteArray createPropertyInfo() " return uc_properties + index;\n" "}\n\n"; + out += "Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4)\n" + "{\n" + " return (QUnicodeTables::LineBreakClass)qGetProp(ucs4)->line_break_class;\n" + "}\n\n"; + out += "static const ushort specialCaseMap[] = {\n "; for (int i = 0; i < specialCaseMap.size(); ++i) { out += QByteArray(" 0x") + QByteArray::number(specialCaseMap.at(i), 16); -- cgit v0.12 From fea278afe6ed287f7dc74ee1b90249d00bae2162 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Mon, 10 May 2010 20:39:34 +0400 Subject: tiny clean-up for generated data --- util/unicode/main.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 5303c0d..5ae9c1f 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1905,6 +1905,8 @@ QByteArray createScriptTableDeclaration() else declaration += ' '; } + if (declaration.endsWith(' ')) + declaration.chop(1); } declaration += "\n};\n\n} // namespace QUnicodeTables\n\n"; @@ -2668,14 +2670,14 @@ int main(int, char **) f.write("\n"); f.write(scriptEnumDeclaration); f.write("\n"); - f.write(lineBreakClass); - f.write("\n"); f.write(grapheme_break_string); f.write("\n"); f.write(word_break_string); f.write("\n"); f.write(sentence_break_string); f.write("\n"); + f.write(lineBreakClass); + f.write("\n"); f.write(methods); f.write("} // namespace QUnicodeTables\n\n" "QT_END_NAMESPACE\n\n" -- cgit v0.12 From 18da74c622108dc955682f95af7795d635c405c5 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Tue, 11 May 2010 06:10:31 +0400 Subject: minor improvements for data parsers improve readability of upperCase/lowerCase/titleCase/caseFolded code paths; additional tests make some parsers more consistent; minor speed-up --- util/unicode/main.cpp | 138 ++++++++++++++++++++++++++++---------------------- 1 file changed, 77 insertions(+), 61 deletions(-) diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 5ae9c1f..33fa8ae 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -738,27 +738,29 @@ static void readUnicodeData() if (!properties[UD_UpperCase].isEmpty()) { int upperCase = properties[UD_UpperCase].toInt(&ok, 16); Q_ASSERT(ok); - if (qAbs(upperCase - codepoint) >= (1<<14)) + int diff = upperCase - codepoint; + if (qAbs(diff) >= (1<<14)) qWarning() << "upperCaseDiff exceeded (" << hex << codepoint << "->" << upperCase << ")"; - data.p.upperCaseDiff = upperCase - codepoint; - maxUpperCaseDiff = qMax(maxUpperCaseDiff, qAbs(data.p.upperCaseDiff)); - if (codepoint > 0xffff) { - // if the condition below doesn't hold anymore we need to modify our case folding code - //qDebug() << codepoint << QChar::highSurrogate(codepoint) << QChar::highSurrogate(foldMap.at(0)); + data.p.upperCaseDiff = diff; + maxUpperCaseDiff = qMax(maxUpperCaseDiff, qAbs(diff)); + if (codepoint >= 0x10000 || upperCase >= 0x10000) { + // if the conditions below doesn't hold anymore we need to modify our upper casing code Q_ASSERT(QChar::highSurrogate(codepoint) == QChar::highSurrogate(upperCase)); + Q_ASSERT(QChar::lowSurrogate(codepoint) + diff == QChar::lowSurrogate(upperCase)); } } if (!properties[UD_LowerCase].isEmpty()) { int lowerCase = properties[UD_LowerCase].toInt(&ok, 16); Q_ASSERT(ok); - if (qAbs(lowerCase - codepoint) >= (1<<14)) + int diff = lowerCase - codepoint; + if (qAbs(diff) >= (1<<14)) qWarning() << "lowerCaseDiff exceeded (" << hex << codepoint << "->" << lowerCase << ")"; - data.p.lowerCaseDiff = lowerCase - codepoint; - maxLowerCaseDiff = qMax(maxLowerCaseDiff, qAbs(data.p.lowerCaseDiff)); - if (codepoint > 0xffff) { - // if the condition below doesn't hold anymore we need to modify our case folding code - //qDebug() << codepoint << QChar::highSurrogate(codepoint) << QChar::highSurrogate(foldMap.at(0)); + data.p.lowerCaseDiff = diff; + maxLowerCaseDiff = qMax(maxLowerCaseDiff, qAbs(diff)); + if (codepoint >= 0x10000 || lowerCase >= 0x10000) { + // if the conditions below doesn't hold anymore we need to modify our lower casing code Q_ASSERT(QChar::highSurrogate(codepoint) == QChar::highSurrogate(lowerCase)); + Q_ASSERT(QChar::lowSurrogate(codepoint) + diff == QChar::lowSurrogate(lowerCase)); } } // we want toTitleCase to map to ToUpper in case we don't have any titlecase. @@ -767,14 +769,15 @@ static void readUnicodeData() if (!properties[UD_TitleCase].isEmpty()) { int titleCase = properties[UD_TitleCase].toInt(&ok, 16); Q_ASSERT(ok); - if (qAbs(titleCase - codepoint) >= (1<<14)) + int diff = titleCase - codepoint; + if (qAbs(diff) >= (1<<14)) qWarning() << "titleCaseDiff exceeded (" << hex << codepoint << "->" << titleCase << ")"; - data.p.titleCaseDiff = titleCase - codepoint; - maxTitleCaseDiff = qMax(maxTitleCaseDiff, qAbs(data.p.titleCaseDiff)); - if (codepoint > 0xffff) { - // if the condition below doesn't hold anymore we need to modify our case folding code - //qDebug() << codepoint << QChar::highSurrogate(codepoint) << QChar::highSurrogate(foldMap.at(0)); + data.p.titleCaseDiff = diff; + maxTitleCaseDiff = qMax(maxTitleCaseDiff, qAbs(diff)); + if (codepoint >= 0x10000 || titleCase >= 0x10000) { + // if the conditions below doesn't hold anymore we need to modify our title casing code Q_ASSERT(QChar::highSurrogate(codepoint) == QChar::highSurrogate(titleCase)); + Q_ASSERT(QChar::lowSurrogate(codepoint) + diff == QChar::lowSurrogate(titleCase)); } } @@ -1109,6 +1112,7 @@ static void computeUniqueProperties() static void readLineBreak() { + qDebug() << "Reading LineBreak.txt"; QFile f("data/LineBreak.txt"); if (!f.exists()) qFatal("Couldn't find LineBreak.txt"); @@ -1145,7 +1149,7 @@ static void readLineBreak() Q_ASSERT(ok); } - LineBreakClass lb = line_break_map.value(l[1].trimmed(), LineBreak_Unassigned); + LineBreakClass lb = line_break_map.value(l[1], LineBreak_Unassigned); if (lb == LineBreak_Unassigned) qFatal("unassigned line break class: %s", l[1].constData()); @@ -1190,7 +1194,10 @@ static void readSpecialCasing() bool ok; int codepoint = l[0].trimmed().toInt(&ok, 16); Q_ASSERT(ok); - Q_ASSERT(codepoint <= 0xffff); + + // if the condition below doesn't hold anymore we need to modify our + // lower/upper/title casing code and case folding code + Q_ASSERT(codepoint < 0x10000); // qDebug() << "codepoint" << hex << codepoint; // qDebug() << line; @@ -1290,16 +1297,18 @@ static void readCaseFolding() UnicodeData ud = unicodeData.value(codepoint, UnicodeData(codepoint)); if (foldMap.size() == 1) { - if (qAbs(foldMap.at(0) - codepoint) >= (1<<14)) - qWarning() << "caseFoldDiff exceeded (" << hex << codepoint << "->" << foldMap.at(0) << ")"; - ud.p.caseFoldDiff = foldMap.at(0) - codepoint; - maxCaseFoldDiff = qMax(maxCaseFoldDiff, qAbs(ud.p.caseFoldDiff)); - if (codepoint > 0xffff) { - // if the condition below doesn't hold anymore we need to modify our case folding code - //qDebug() << codepoint << QChar::highSurrogate(codepoint) << QChar::highSurrogate(foldMap.at(0)); - Q_ASSERT(QChar::highSurrogate(codepoint) == QChar::highSurrogate(foldMap.at(0))); + int caseFolded = foldMap.at(0); + int diff = caseFolded - codepoint; + if (qAbs(diff) >= (1<<14)) + qWarning() << "caseFoldDiff exceeded (" << hex << codepoint << "->" << caseFolded << ")"; + ud.p.caseFoldDiff = diff; + maxCaseFoldDiff = qMax(maxCaseFoldDiff, qAbs(diff)); + if (codepoint >= 0x10000 || caseFolded >= 0x10000) { + // if the conditions below doesn't hold anymore we need to modify our case folding code + Q_ASSERT(QChar::highSurrogate(codepoint) == QChar::highSurrogate(caseFolded)); + Q_ASSERT(QChar::lowSurrogate(codepoint) + diff == QChar::lowSurrogate(caseFolded)); } - if (foldMap.at(0) != codepoint + ud.p.lowerCaseDiff) + if (caseFolded != codepoint + ud.p.lowerCaseDiff) qDebug() << hex << codepoint; } else { qFatal("we currently don't support full case foldings"); @@ -1329,13 +1338,15 @@ static void readGraphemeBreak() int comment = line.indexOf('#'); if (comment >= 0) line = line.left(comment); + line.replace(" ", ""); if (line.isEmpty()) continue; QList l = line.split(';'); + Q_ASSERT(l.size() == 2); - QByteArray codes = l[0].trimmed(); + QByteArray codes = l[0]; codes.replace("..", "."); QList cl = codes.split('.'); @@ -1348,7 +1359,7 @@ static void readGraphemeBreak() Q_ASSERT(ok); } - GraphemeBreak brk = grapheme_break_map.value(l[1].trimmed(), GraphemeBreak_Unassigned); + GraphemeBreak brk = grapheme_break_map.value(l[1], GraphemeBreak_Unassigned); if (brk == GraphemeBreak_Unassigned) qFatal("unassigned grapheme break class: %s", l[1].constData()); @@ -1378,13 +1389,15 @@ static void readWordBreak() int comment = line.indexOf('#'); if (comment >= 0) line = line.left(comment); + line.replace(" ", ""); if (line.isEmpty()) continue; QList l = line.split(';'); + Q_ASSERT(l.size() == 2); - QByteArray codes = l[0].trimmed(); + QByteArray codes = l[0]; codes.replace("..", "."); QList cl = codes.split('.'); @@ -1397,7 +1410,7 @@ static void readWordBreak() Q_ASSERT(ok); } - WordBreak brk = word_break_map.value(l[1].trimmed(), WordBreak_Unassigned); + WordBreak brk = word_break_map.value(l[1], WordBreak_Unassigned); if (brk == WordBreak_Unassigned) qFatal("unassigned word break class: %s", l[1].constData()); @@ -1427,13 +1440,15 @@ static void readSentenceBreak() int comment = line.indexOf('#'); if (comment >= 0) line = line.left(comment); + line.replace(" ", ""); if (line.isEmpty()) continue; QList l = line.split(';'); + Q_ASSERT(l.size() == 2); - QByteArray codes = l[0].trimmed(); + QByteArray codes = l[0]; codes.replace("..", "."); QList cl = codes.split('.'); @@ -1446,7 +1461,7 @@ static void readSentenceBreak() Q_ASSERT(ok); } - SentenceBreak brk = sentence_break_map.value(l[1].trimmed(), SentenceBreak_Unassigned); + SentenceBreak brk = sentence_break_map.value(l[1], SentenceBreak_Unassigned); if (brk == SentenceBreak_Unassigned) qFatal("unassigned sentence break class: %s", l[1].constData()); @@ -1624,17 +1639,22 @@ static void readBlocks() QByteArray blockName = line.mid(semicolon + 1); int blockIndex = blockNames.indexOf(blockName); - if (blockIndex < 0) { + if (blockIndex == -1) { + blockIndex = blockNames.size(); blockNames.append(blockName); - blockIndex = blockNames.indexOf(blockName); - Q_ASSERT(blockIndex >= 0); } - int dotdot = codePoints.indexOf(".."); - Q_ASSERT(dotdot >= 0); - bool unused; - int first = codePoints.left(dotdot).toInt(&unused, 16); - int last = codePoints.mid(dotdot + 2).toInt(&unused, 16); + codePoints.replace("..", "."); + QList cl = codePoints.split('.'); + + bool ok; + int first = cl[0].toInt(&ok, 16); + Q_ASSERT(ok); + int last = first; + if (cl.size() == 2) { + last = cl[1].toInt(&ok, 16); + Q_ASSERT(ok); + } BlockInfo blockInfo = { blockIndex, first, last }; blockInfoList.append(blockInfo); @@ -1670,7 +1690,6 @@ static void readScripts() if (!f.exists()) qFatal("Couldn't find %s", files[i]); - f.open(QFile::ReadOnly); while (!f.atEnd()) { @@ -1693,28 +1712,25 @@ static void readScripts() QByteArray scriptName = line.mid(semicolon + 1); int scriptIndex = scriptNames.indexOf(scriptName); - if (scriptIndex < 0) { + if (scriptIndex == -1) { + scriptIndex = scriptNames.size(); scriptNames.append(scriptName); - scriptIndex = scriptNames.indexOf(scriptName); - Q_ASSERT(scriptIndex >= 0); } - int dotdot = codePoints.indexOf(".."); - bool unused; - int first = -1, last = -1; - if (dotdot >= 0) { - first = codePoints.left(dotdot).toInt(&unused, 16); - last = codePoints.mid(dotdot + 2).toInt(&unused, 16); - } else { - first = codePoints.toInt(&unused, 16); - } + codePoints.replace("..", "."); + QList cl = codePoints.split('.'); - if (last != -1) { - for (int i = first; i <= last; ++i) - scriptAssignment[i] = scriptIndex; - } else { - scriptAssignment[first] = scriptIndex; + bool ok; + int first = cl[0].toInt(&ok, 16); + Q_ASSERT(ok); + int last = first; + if (cl.size() == 2) { + last = cl[1].toInt(&ok, 16); + Q_ASSERT(ok); } + + for (int i = first; i <= last; ++i) + scriptAssignment[i] = scriptIndex; } } } -- cgit v0.12 From 8572f583e138e15446903f8e2d3792cea5ae477b Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Fri, 14 May 2010 23:56:25 +0400 Subject: minor clean-ups improve readability nicer output --- util/unicode/main.cpp | 47 +++++++++++++++++++++-------------------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 33fa8ae..268f046 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -403,7 +403,7 @@ struct PropertyFlags { // from DerivedAge.txt QChar::UnicodeVersion age : 4; int digitValue; - uint line_break_class : 6; + LineBreakClass line_break_class; int mirrorDiff : 16; @@ -429,7 +429,7 @@ static int appendToSpecialCaseMap(const QList &map) QList utf16map; for (int i = 0; i < map.size(); ++i) { int val = map.at(i); - if (val > 0xffff) { + if (val >= 0x10000) { utf16map << QChar::highSurrogate(val); utf16map << QChar::lowSurrogate(val); } else { @@ -505,7 +505,7 @@ struct UnicodeData { // from BidiMirroring.txt int mirroredChar; - // CompositionExclusions.txt + // DerivedNormalizationProps.txt bool excludedComposition; // computed position of unicode property set @@ -726,8 +726,8 @@ static void readUnicodeData() data.p.category = categoryMap.value(properties[UD_Category], QChar::NoCategory); if (data.p.category == QChar::NoCategory) qFatal("unassigned char category: %s", properties[UD_Category].constData()); - data.p.combiningClass = properties[UD_CombiningClass].toInt(); + data.p.combiningClass = properties[UD_CombiningClass].toInt(); if (!combiningClassUsage.contains(data.p.combiningClass)) combiningClassUsage[data.p.combiningClass] = 1; else @@ -1006,15 +1006,15 @@ static void readDerivedNormalizationProps() && d.decomposition.size() > 1) { Q_ASSERT(d.decomposition.size() == 2); - uint part1 = d.decomposition.at(0); - uint part2 = d.decomposition.at(1); + int part1 = d.decomposition.at(0); + int part2 = d.decomposition.at(1); // all non-starters are listed in DerivedNormalizationProps.txt // and already excluded from composition Q_ASSERT(unicodeData.value(part1, UnicodeData(part1)).p.combiningClass == 0); ++numLigatures; - highestLigature = qMax(highestLigature, (int)part1); + highestLigature = qMax(highestLigature, part1); Ligature l = {(ushort)part1, (ushort)part2, codepoint}; ligatureHashes[part2].append(l); } @@ -1865,21 +1865,18 @@ QByteArray createScriptTableDeclaration() declaration += ", /* U+"; declaration += QByteArray::number(block, 16).rightJustified(4, '0'); declaration += '-'; - declaration += - QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); + declaration += QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); declaration += " */\n"; } else { const int value = extraBlockList.size() + scriptSentinel; - const int offset = - ((value - scriptSentinel) * unicodeBlockSize) + unicodeBlockCount; + const int offset = ((value - scriptSentinel) * unicodeBlockSize) + unicodeBlockCount; declaration += " "; declaration += QByteArray::number(value); declaration += ", /* U+"; declaration += QByteArray::number(block, 16).rightJustified(4, '0'); declaration += '-'; - declaration += - QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); + declaration += QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); declaration += " at offset "; declaration += QByteArray::number(offset); declaration += " */\n"; @@ -1896,16 +1893,14 @@ QByteArray createScriptTableDeclaration() for (int i = 0; i < extraBlockList.size(); ++i) { const int value = i + scriptSentinel; - const int offset = - ((value - scriptSentinel) * unicodeBlockSize) + unicodeBlockCount; + const int offset = ((value - scriptSentinel) * unicodeBlockSize) + unicodeBlockCount; const ExtraBlock &extraBlock = extraBlockList.at(i); const int block = extraBlock.block; declaration += "\n\n /* U+"; declaration += QByteArray::number(block, 16).rightJustified(4, '0'); declaration += '-'; - declaration += - QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); + declaration += QByteArray::number(block + unicodeBlockSize - 1, 16).rightJustified(4, '0'); declaration += " at offset "; declaration += QByteArray::number(offset); declaration += " */\n "; @@ -2240,7 +2235,7 @@ static QByteArray createCompositionInfo() const int SMP_BLOCKSIZE = 256; const int SMP_SHIFT = 8; - if(SMP_END <= highestComposedCharacter) + if (SMP_END <= highestComposedCharacter) qFatal("end of table smaller than highest composed character at %x", highestComposedCharacter); QList blocks; @@ -2453,15 +2448,15 @@ static QByteArray createLigatureInfo() int uc = block*BMP_BLOCKSIZE + i; QList l = ligatureHashes.value(uc); if (!l.isEmpty()) { - b.decompositionPositions.append(tableIndex); qSort(l); ligatures.append(l.size()); - for (int i = 0; i < l.size(); ++i) { - Q_ASSERT(l.at(i).u2 == uc); - ligatures.append(l.at(i).u1); - ligatures.append(l.at(i).ligature); + for (int j = 0; j < l.size(); ++j) { + Q_ASSERT(l.at(j).u2 == uc); + ligatures.append(l.at(j).u1); + ligatures.append(l.at(j).ligature); } + b.decompositionPositions.append(tableIndex); tableIndex += 2*l.size() + 1; } else { b.decompositionPositions.append(0xffff); @@ -2486,12 +2481,11 @@ static QByteArray createLigatureInfo() qDebug(" %d unique blocks in BMP.", blocks.size()); qDebug(" block data uses: %d bytes", bmp_block_data); qDebug(" trie data uses : %d bytes", bmp_trie); - qDebug(" ligature data uses : %d bytes", ligatures.size()*2); - qDebug(" memory usage: %d bytes", bmp_mem + ligatures.size() * 2); + qDebug("\n ligature data uses : %d bytes", ligatures.size()*2); + qDebug(" memory usage: %d bytes", bmp_mem + ligatures.size() * 2); QByteArray out; - out += "static const unsigned short uc_ligature_trie[] = {\n"; // first write the map @@ -2567,6 +2561,7 @@ QByteArray createCasingInfo() return out; } + int main(int, char **) { initAgeMap(); -- cgit v0.12 From 3f40a0309ea960fc33bc3b993e891db288b2ef13 Mon Sep 17 00:00:00 2001 From: Ritt Konstantin Date: Fri, 14 May 2010 23:56:53 +0400 Subject: remove extra includes --- src/corelib/io/qurl.cpp | 1 - src/corelib/tools/qbytearray.cpp | 1 - src/corelib/tools/qstringmatcher.cpp | 1 - src/gui/dialogs/qfiledialog.cpp | 1 - src/gui/kernel/qapplication_x11.cpp | 1 - src/gui/painting/qprintengine_ps.cpp | 1 - src/gui/text/qtextdocumentfragment.cpp | 1 - src/gui/text/qtexthtmlparser.cpp | 1 - src/opengl/qgl_x11.cpp | 1 + src/qt3support/dialogs/q3filedialog.cpp | 1 - src/qt3support/text/q3richtext.cpp | 1 - 11 files changed, 1 insertion(+), 10 deletions(-) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index d1fab2d..6a3037d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -176,7 +176,6 @@ */ #include "qplatformdefs.h" #include "qurl.h" -#include "private/qunicodetables_p.h" #include "qatomic.h" #include "qbytearray.h" #include "qdir.h" diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 033da90..b0c784e 100644 --- a/src/corelib/tools/qbytearray.cpp +++ b/src/corelib/tools/qbytearray.cpp @@ -46,7 +46,6 @@ #include "qlist.h" #include "qlocale.h" #include "qlocale_p.h" -#include "qunicodetables_p.h" #include "qscopedpointer.h" #include diff --git a/src/corelib/tools/qstringmatcher.cpp b/src/corelib/tools/qstringmatcher.cpp index 80a8457..d445ed4 100644 --- a/src/corelib/tools/qstringmatcher.cpp +++ b/src/corelib/tools/qstringmatcher.cpp @@ -40,7 +40,6 @@ ****************************************************************************/ #include "qstringmatcher.h" -#include "qunicodetables_p.h" QT_BEGIN_NAMESPACE diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index cb74a3c..fc3c186 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -302,7 +302,6 @@ QT_BEGIN_INCLUDE_NAMESPACE #endif #include #ifdef Q_WS_MAC -#include #include #endif QT_END_INCLUDE_NAMESPACE diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index e7b7ed8..d8fb74c 100644 --- a/src/gui/kernel/qapplication_x11.cpp +++ b/src/gui/kernel/qapplication_x11.cpp @@ -74,7 +74,6 @@ #include "qevent_p.h" #include "qvarlengtharray.h" #include "qdebug.h" -#include #include #include #include diff --git a/src/gui/painting/qprintengine_ps.cpp b/src/gui/painting/qprintengine_ps.cpp index 28e9a7a..ca694ae 100644 --- a/src/gui/painting/qprintengine_ps.cpp +++ b/src/gui/painting/qprintengine_ps.cpp @@ -64,7 +64,6 @@ #include "qbitmap.h" #include "qregion.h" #include "qimagewriter.h" -#include #include #include #include diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index 7c5f973..26346ca 100644 --- a/src/gui/text/qtextdocumentfragment.cpp +++ b/src/gui/text/qtextdocumentfragment.cpp @@ -43,7 +43,6 @@ #include "qtextdocumentfragment_p.h" #include "qtextcursor_p.h" #include "qtextlist.h" -#include "private/qunicodetables_p.h" #include #include diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index e190379..ca0942e 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -53,7 +53,6 @@ #include "qtextdocument_p.h" #include "qtextcursor.h" #include "qfont_p.h" -#include "private/qunicodetables_p.h" #include "private/qfunctions_p.h" #ifndef QT_NO_TEXTHTMLPARSER diff --git a/src/opengl/qgl_x11.cpp b/src/opengl/qgl_x11.cpp index bfb232d..f3a4c95 100644 --- a/src/opengl/qgl_x11.cpp +++ b/src/opengl/qgl_x11.cpp @@ -54,6 +54,7 @@ #include #include #include +#include #ifdef Q_OS_HPUX // for GLXPBuffer #include diff --git a/src/qt3support/dialogs/q3filedialog.cpp b/src/qt3support/dialogs/q3filedialog.cpp index 35f7890..f9dfaa1 100644 --- a/src/qt3support/dialogs/q3filedialog.cpp +++ b/src/qt3support/dialogs/q3filedialog.cpp @@ -106,7 +106,6 @@ #ifdef Q_WS_MAC #include "qmacstyle_mac.h" #include "private/qt_mac_p.h" -#include "private/qunicodetables_p.h" #undef check #endif diff --git a/src/qt3support/text/q3richtext.cpp b/src/qt3support/text/q3richtext.cpp index 8614076..d82d0f0 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -64,7 +64,6 @@ #include "q3stylesheet.h" #include "qtextstream.h" #include -#include #include -- cgit v0.12 From a84fd31ffcb62294045a3caf711e293db80b9eaf Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Sep 2010 12:28:12 +0200 Subject: Compile in C++0x mode --- util/unicode/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/unicode/main.cpp b/util/unicode/main.cpp index 268f046..cfe5956 100644 --- a/util/unicode/main.cpp +++ b/util/unicode/main.cpp @@ -1015,7 +1015,7 @@ static void readDerivedNormalizationProps() ++numLigatures; highestLigature = qMax(highestLigature, part1); - Ligature l = {(ushort)part1, (ushort)part2, codepoint}; + Ligature l = {(ushort)part1, (ushort)part2, (ushort)codepoint}; ligatureHashes[part2].append(l); } } -- cgit v0.12 From a2d38842317977d78a3c0bfd227db18f505d96bd Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Sep 2010 12:48:31 +0200 Subject: Regenerate the Unicode tables after updates to the generator tool --- src/corelib/tools/qunicodetables.cpp | 119 ++++++++++++++++++++--------------- src/corelib/tools/qunicodetables_p.h | 28 ++++----- 2 files changed, 82 insertions(+), 65 deletions(-) diff --git a/src/corelib/tools/qunicodetables.cpp b/src/corelib/tools/qunicodetables.cpp index 9df31e5..68e72cc 100644 --- a/src/corelib/tools/qunicodetables.cpp +++ b/src/corelib/tools/qunicodetables.cpp @@ -4345,6 +4345,11 @@ Q_CORE_EXPORT const QUnicodeTables::Properties * QT_FASTCALL QUnicodeTables::pro return uc_properties + index; } +Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL QUnicodeTables::lineBreakClass(uint ucs4) +{ + return (QUnicodeTables::LineBreakClass)qGetProp(ucs4)->line_break_class; +} + static const ushort specialCaseMap[] = { 0x53, 0x73, 0x0, 0x53, 0x53, 0x0, @@ -8561,7 +8566,7 @@ static const unsigned char uc_scripts[] = { Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Common, Common, Common, Common, Greek, Greek, Common, Common, - Common, Common, Greek, Greek, Greek, Greek, Common, Common, + Common, Common, Greek, Greek, Greek, Greek, Common, Common, /* U+0380-03ff at offset 640 */ Common, Common, Common, Common, Greek, Greek, Greek, Common, @@ -8579,7 +8584,7 @@ static const unsigned char uc_scripts[] = { Greek, Greek, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Coptic, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, - Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, + Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, /* U+0480-04ff at offset 768 */ Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Common, @@ -8597,7 +8602,7 @@ static const unsigned char uc_scripts[] = { Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, - Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, + Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, /* U+0500-057f at offset 896 */ Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, Cyrillic, @@ -8615,7 +8620,7 @@ static const unsigned char uc_scripts[] = { Common, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, - Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, + Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, /* U+0580-05ff at offset 1024 */ Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, Armenian, @@ -8633,7 +8638,7 @@ static const unsigned char uc_scripts[] = { Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Common, Common, Common, Common, Common, Hebrew, Hebrew, Hebrew, Hebrew, Hebrew, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0600-067f at offset 1152 */ Common, Common, Common, Common, Common, Common, Common, Common, @@ -8651,7 +8656,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Inherited, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+0680-06ff at offset 1280 */ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, @@ -8669,7 +8674,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+0700-077f at offset 1408 */ Syriac, Syriac, Syriac, Syriac, Syriac, Syriac, Syriac, Syriac, @@ -8687,7 +8692,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0780-07ff at offset 1536 */ Thaana, Thaana, Thaana, Thaana, Thaana, Thaana, Thaana, Thaana, @@ -8705,7 +8710,7 @@ static const unsigned char uc_scripts[] = { Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, Nko, - Nko, Nko, Nko, Common, Common, Common, Common, Common, + Nko, Nko, Nko, Common, Common, Common, Common, Common, /* U+0900-097f at offset 1664 */ Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, @@ -8723,7 +8728,7 @@ static const unsigned char uc_scripts[] = { Devanagari, Devanagari, Devanagari, Devanagari, Common, Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, + Common, Common, Common, Devanagari, Devanagari, Devanagari, Devanagari, Devanagari, /* U+0980-09ff at offset 1792 */ Common, Bengali, Bengali, Bengali, Common, Bengali, Bengali, Bengali, @@ -8741,7 +8746,7 @@ static const unsigned char uc_scripts[] = { Bengali, Bengali, Bengali, Bengali, Common, Common, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, Bengali, - Bengali, Bengali, Bengali, Common, Common, Common, Common, Common, + Bengali, Bengali, Bengali, Common, Common, Common, Common, Common, /* U+0a00-0a7f at offset 1920 */ Common, Gurmukhi, Gurmukhi, Gurmukhi, Common, Gurmukhi, Gurmukhi, Gurmukhi, @@ -8759,7 +8764,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Gurmukhi, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0a80-0aff at offset 2048 */ Common, Gujarati, Gujarati, Gujarati, Common, Gujarati, Gujarati, Gujarati, @@ -8777,7 +8782,7 @@ static const unsigned char uc_scripts[] = { Gujarati, Gujarati, Gujarati, Gujarati, Common, Common, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Gujarati, Common, Gujarati, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0b00-0b7f at offset 2176 */ Common, Oriya, Oriya, Oriya, Common, Oriya, Oriya, Oriya, @@ -8795,7 +8800,7 @@ static const unsigned char uc_scripts[] = { Oriya, Oriya, Common, Common, Common, Common, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Oriya, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0b80-0bff at offset 2304 */ Common, Common, Tamil, Tamil, Common, Tamil, Tamil, Tamil, @@ -8813,7 +8818,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, Tamil, - Tamil, Tamil, Tamil, Common, Common, Common, Common, Common, + Tamil, Tamil, Tamil, Common, Common, Common, Common, Common, /* U+0c00-0c7f at offset 2432 */ Common, Telugu, Telugu, Telugu, Common, Telugu, Telugu, Telugu, @@ -8831,7 +8836,7 @@ static const unsigned char uc_scripts[] = { Telugu, Telugu, Common, Common, Common, Common, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Telugu, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0c80-0cff at offset 2560 */ Common, Common, Kannada, Kannada, Common, Kannada, Kannada, Kannada, @@ -8849,7 +8854,7 @@ static const unsigned char uc_scripts[] = { Kannada, Kannada, Kannada, Kannada, Common, Common, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Kannada, Common, Kannada, Kannada, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0d00-0d7f at offset 2688 */ Common, Common, Malayalam, Malayalam, Common, Malayalam, Malayalam, Malayalam, @@ -8867,7 +8872,7 @@ static const unsigned char uc_scripts[] = { Malayalam, Malayalam, Common, Common, Common, Common, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Malayalam, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0d80-0dff at offset 2816 */ Common, Common, Sinhala, Sinhala, Common, Sinhala, Sinhala, Sinhala, @@ -8885,7 +8890,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Sinhala, Sinhala, Sinhala, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0e00-0e7f at offset 2944 */ Common, Thai, Thai, Thai, Thai, Thai, Thai, Thai, @@ -8903,7 +8908,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0e80-0eff at offset 3072 */ Common, Lao, Lao, Common, Lao, Common, Common, Lao, @@ -8921,7 +8926,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+0f00-0f7f at offset 3200 */ Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, @@ -8939,7 +8944,7 @@ static const unsigned char uc_scripts[] = { Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Common, Common, Common, Common, Common, Common, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, - Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, + Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, /* U+0f80-0fff at offset 3328 */ Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, Tibetan, @@ -8957,7 +8962,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+1000-107f at offset 3456 */ Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, Myanmar, @@ -8975,7 +8980,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+1080-10ff at offset 3584 */ Common, Common, Common, Common, Common, Common, Common, Common, @@ -8993,7 +8998,7 @@ static const unsigned char uc_scripts[] = { Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, - Georgian, Georgian, Georgian, Common, Georgian, Common, Common, Common, + Georgian, Georgian, Georgian, Common, Georgian, Common, Common, Common, /* U+1100-117f at offset 3712 */ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, @@ -9011,7 +9016,7 @@ static const unsigned char uc_scripts[] = { Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, - Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, + Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, /* U+1180-11ff at offset 3840 */ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, @@ -9029,7 +9034,7 @@ static const unsigned char uc_scripts[] = { Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, - Hangul, Hangul, Common, Common, Common, Common, Common, Common, + Hangul, Hangul, Common, Common, Common, Common, Common, Common, /* U+1680-16ff at offset 3968 */ Ogham, Ogham, Ogham, Ogham, Ogham, Ogham, Ogham, Ogham, @@ -9047,7 +9052,7 @@ static const unsigned char uc_scripts[] = { Runic, Runic, Runic, Runic, Runic, Runic, Runic, Runic, Runic, Runic, Runic, Common, Common, Common, Runic, Runic, Runic, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+1780-17ff at offset 4096 */ Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, @@ -9065,7 +9070,7 @@ static const unsigned char uc_scripts[] = { Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Common, Common, Common, Common, Common, Common, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, - Khmer, Khmer, Common, Common, Common, Common, Common, Common, + Khmer, Khmer, Common, Common, Common, Common, Common, Common, /* U+1980-19ff at offset 4224 */ NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, NewTaiLue, @@ -9083,7 +9088,7 @@ static const unsigned char uc_scripts[] = { Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, - Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, + Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, Khmer, /* U+1d00-1d7f at offset 4352 */ Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, @@ -9101,7 +9106,7 @@ static const unsigned char uc_scripts[] = { Greek, Greek, Latin, Latin, Latin, Latin, Greek, Greek, Greek, Greek, Greek, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, - Cyrillic, Latin, Latin, Latin, Latin, Latin, Latin, Latin, + Cyrillic, Latin, Latin, Latin, Latin, Latin, Latin, Latin, /* U+1d80-1dff at offset 4480 */ Latin, Latin, Latin, Latin, Latin, Latin, Latin, Latin, @@ -9119,7 +9124,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Inherited, Inherited, + Common, Common, Common, Common, Common, Common, Inherited, Inherited, /* U+1f00-1f7f at offset 4608 */ Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, @@ -9137,7 +9142,7 @@ static const unsigned char uc_scripts[] = { Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, - Greek, Greek, Greek, Greek, Greek, Greek, Common, Common, + Greek, Greek, Greek, Greek, Greek, Greek, Common, Common, /* U+1f80-1fff at offset 4736 */ Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, @@ -9155,7 +9160,7 @@ static const unsigned char uc_scripts[] = { Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Greek, Common, Common, Greek, Greek, Greek, Common, Greek, Greek, - Greek, Greek, Greek, Greek, Greek, Greek, Greek, Common, + Greek, Greek, Greek, Greek, Greek, Greek, Greek, Common, /* U+2000-207f at offset 4864 */ Common, Common, Common, Common, Common, Common, Common, Common, @@ -9173,7 +9178,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Latin, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Latin, + Common, Common, Common, Common, Common, Common, Common, Latin, /* U+2080-20ff at offset 4992 */ Common, Common, Common, Common, Common, Common, Common, Common, @@ -9191,7 +9196,7 @@ static const unsigned char uc_scripts[] = { Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+2100-217f at offset 5120 */ Common, Common, Common, Common, Common, Common, Common, Common, @@ -9209,7 +9214,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+2d00-2d7f at offset 5248 */ Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, Georgian, @@ -9227,7 +9232,7 @@ static const unsigned char uc_scripts[] = { Tifinagh, Tifinagh, Tifinagh, Tifinagh, Tifinagh, Tifinagh, Common, Common, Common, Common, Common, Common, Common, Common, Common, Tifinagh, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+3000-307f at offset 5376 */ Common, Common, Common, Common, Common, Han, Common, Han, @@ -9245,7 +9250,7 @@ static const unsigned char uc_scripts[] = { Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, - Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, + Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, /* U+3080-30ff at offset 5504 */ Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, Hiragana, @@ -9263,7 +9268,7 @@ static const unsigned char uc_scripts[] = { Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, - Katakana, Katakana, Katakana, Common, Common, Katakana, Katakana, Katakana, + Katakana, Katakana, Katakana, Common, Common, Katakana, Katakana, Katakana, /* U+3100-317f at offset 5632 */ Common, Common, Common, Common, Common, Bopomofo, Bopomofo, Bopomofo, @@ -9281,7 +9286,7 @@ static const unsigned char uc_scripts[] = { Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, - Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, + Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, /* U+3180-31ff at offset 5760 */ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, @@ -9299,7 +9304,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, - Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, + Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, /* U+3200-327f at offset 5888 */ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, @@ -9317,7 +9322,7 @@ static const unsigned char uc_scripts[] = { Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, - Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Common, Common, + Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Common, Common, /* U+d780-d7ff at offset 6016 */ Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, Hangul, @@ -9335,7 +9340,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common, + Common, Common, Common, Common, Common, Common, Common, Common, /* U+fb00-fb7f at offset 6144 */ Latin, Latin, Latin, Latin, Latin, Latin, Latin, Common, @@ -9353,7 +9358,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+fb80-fbff at offset 6272 */ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, @@ -9371,7 +9376,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+fd00-fd7f at offset 6400 */ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, @@ -9389,7 +9394,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+fd80-fdff at offset 6528 */ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, @@ -9407,7 +9412,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common, + Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common, /* U+fe00-fe7f at offset 6656 */ Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, Inherited, @@ -9425,7 +9430,7 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Arabic, Arabic, Arabic, Arabic, Arabic, Common, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, + Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, /* U+fe80-feff at offset 6784 */ Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, @@ -9443,7 +9448,7 @@ static const unsigned char uc_scripts[] = { Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, Arabic, - Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common, + Arabic, Arabic, Arabic, Arabic, Arabic, Common, Common, Common, /* U+ff80-ffff at offset 6912 */ Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, Katakana, @@ -9461,9 +9466,21 @@ static const unsigned char uc_scripts[] = { Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, Common, - Common, Common, Common, Common, Common, Common, Common, Common + Common, Common, Common, Common, Common, Common, Common, Common }; } // namespace QUnicodeTables +Q_CORE_EXPORT int QT_FASTCALL QUnicodeTables::script(uint ucs4) +{ + if (ucs4 > 0xffff) + return Common; + int script = uc_scripts[ucs4 >> 7]; + if (script < ScriptSentinel) + return script; + script = (((script - ScriptSentinel) * UnicodeBlockSize) + UnicodeBlockCount); + script = uc_scripts[script + (ucs4 & 0x7f)]; + return script; +} + QT_END_NAMESPACE diff --git a/src/corelib/tools/qunicodetables_p.h b/src/corelib/tools/qunicodetables_p.h index 5c7cc08..be52bf9 100644 --- a/src/corelib/tools/qunicodetables_p.h +++ b/src/corelib/tools/qunicodetables_p.h @@ -162,20 +162,6 @@ namespace QUnicodeTables { enum { ScriptSentinel = 32 }; - // see http://www.unicode.org/reports/tr14/tr14-19.html - // we don't use the XX, AI and CB properties and map them to AL instead. - // as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well. - enum LineBreakClass { - LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS, - LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO, - LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY, - LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM, - LineBreak_WJ, LineBreak_H2, LineBreak_H3, LineBreak_JL, LineBreak_JV, - LineBreak_JT, LineBreak_SA, LineBreak_SG, - LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK - }; - - enum GraphemeBreak { GraphemeBreakOther, GraphemeBreakCR, @@ -217,6 +203,20 @@ namespace QUnicodeTables { }; + // see http://www.unicode.org/reports/tr14/tr14-19.html + // we don't use the XX, AI and CB properties and map them to AL instead. + // as we don't support any EBDIC based OS'es, NL is ignored and mapped to AL as well. + enum LineBreakClass { + LineBreak_OP, LineBreak_CL, LineBreak_QU, LineBreak_GL, LineBreak_NS, + LineBreak_EX, LineBreak_SY, LineBreak_IS, LineBreak_PR, LineBreak_PO, + LineBreak_NU, LineBreak_AL, LineBreak_ID, LineBreak_IN, LineBreak_HY, + LineBreak_BA, LineBreak_BB, LineBreak_B2, LineBreak_ZW, LineBreak_CM, + LineBreak_WJ, LineBreak_H2, LineBreak_H3, LineBreak_JL, LineBreak_JV, + LineBreak_JT, LineBreak_SA, LineBreak_SG, + LineBreak_SP, LineBreak_CR, LineBreak_LF, LineBreak_BK + }; + + Q_CORE_EXPORT QUnicodeTables::LineBreakClass QT_FASTCALL lineBreakClass(uint ucs4); inline int lineBreakClass(const QChar &ch) { return lineBreakClass(ch.unicode()); } -- cgit v0.12 From bfeb62c5bb6aa6119555ca8d489250ad3cf5c15f Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 21 Sep 2010 12:49:00 +0200 Subject: Use regparm(3) for ICC too, otherwise it's an ABI mismatch in QChar Reviewed-By: Bradley T. Hughes --- src/corelib/global/qglobal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 8f27b03..a1641cb 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -1050,7 +1050,7 @@ redefine to built-in booleans to make autotests work properly */ #if defined(__i386__) || defined(_WIN32) || defined(_WIN32_WCE) # if defined(Q_CC_GNU) -#if !defined(Q_CC_INTEL) && ((100*(__GNUC__ - 0) + 10*(__GNUC_MINOR__ - 0) + __GNUC_PATCHLEVEL__) >= 332) +#if ((100*(__GNUC__ - 0) + 10*(__GNUC_MINOR__ - 0) + __GNUC_PATCHLEVEL__) >= 332) # define QT_FASTCALL __attribute__((regparm(3))) #else # define QT_FASTCALL -- cgit v0.12 From 36fc9e830b828b69c4df775c68c07c25c9bab4cf Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 21 Sep 2010 16:51:15 +0200 Subject: qmake: fix quoting of moc calls Task-number: QTBUG-13782 Reviewed-by: ossi --- mkspecs/features/moc.prf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mkspecs/features/moc.prf b/mkspecs/features/moc.prf index abda78f..15e7fd9 100644 --- a/mkspecs/features/moc.prf +++ b/mkspecs/features/moc.prf @@ -45,10 +45,10 @@ defineReplace(mocCmd) { if(contains(TEMPLATE, "vc.*")|contains(TEMPLATE_PREFIX, "vc")) { RET += $$mocinclude.commands } - RET += $$QMAKE_MOC $(DEFINES) @$$WIN_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) + return($$QMAKE_MOC $(DEFINES) $(INCPATH) $$join(QMAKE_COMPILER_DEFINES, " -D", -D) \"$$1\" -o $$2) } #moc headers -- cgit v0.12 From cc28790dcdc1e519c4a097ba8d91ec7b19b14b54 Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Thu, 19 Aug 2010 14:59:21 +0200 Subject: fix build with QT_NO_GESTURES --- src/gui/kernel/qapplication_p.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index aa3a6d5..9c5095d 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -530,12 +530,12 @@ public: #ifndef QT_NO_GESTURES QGestureManager *gestureManager; QWidget *gestureWidget; +#endif #if defined(Q_WS_X11) || defined(Q_WS_WIN) QPixmap *move_cursor; QPixmap *copy_cursor; QPixmap *link_cursor; #endif -#endif #if defined(Q_WS_WIN) QPixmap *ignore_cursor; #endif -- cgit v0.12 From b588e0cbef6b7343307cf38d676d4471f2123cdc Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Mon, 16 Aug 2010 11:37:39 +0200 Subject: fix qt static build on wince Reviewed-by: mariusso --- src/3rdparty/libjpeg.pri | 15 +++++++++++++++ src/plugins/imageformats/jpeg/jpeg.pro | 14 -------------- 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/3rdparty/libjpeg.pri b/src/3rdparty/libjpeg.pri index 4551d7b..63f2aca 100644 --- a/src/3rdparty/libjpeg.pri +++ b/src/3rdparty/libjpeg.pri @@ -1,3 +1,18 @@ +wince*: { + DEFINES += NO_GETENV + contains(CE_ARCH,x86):CONFIG -= stl exceptions + contains(CE_ARCH,x86):CONFIG += exceptions_off +} + +#Disable warnings in 3rdparty code due to unused arguments +symbian: { + QMAKE_CXXFLAGS.CW += -W nounusedarg + TARGET.UID3=0x2001E61B +} else:contains(QMAKE_CC, gcc): { + QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main +} + + INCLUDEPATH += $$PWD/libjpeg SOURCES += \ $$PWD/libjpeg/jaricom.c \ diff --git a/src/plugins/imageformats/jpeg/jpeg.pro b/src/plugins/imageformats/jpeg/jpeg.pro index c5671c3..fb254b8 100644 --- a/src/plugins/imageformats/jpeg/jpeg.pro +++ b/src/plugins/imageformats/jpeg/jpeg.pro @@ -3,20 +3,6 @@ include(../../qpluginbase.pri) QTDIR_build:REQUIRES = "!contains(QT_CONFIG, no-jpeg)" -wince*: { - DEFINES += NO_GETENV - contains(CE_ARCH,x86):CONFIG -= stl exceptions - contains(CE_ARCH,x86):CONFIG += exceptions_off -} - -#Disable warnings in 3rdparty code due to unused arguments -symbian: { - QMAKE_CXXFLAGS.CW += -W nounusedarg - TARGET.UID3=0x2001E61B -} else:contains(QMAKE_CC, gcc): { - QMAKE_CFLAGS_WARN_ON += -Wno-unused-parameter -Wno-main -} - include(../../../gui/image/qjpeghandler.pri) SOURCES += main.cpp -- cgit v0.12 From 44ac0a7ff72c94e7b417da18766ad1578b97b4b0 Mon Sep 17 00:00:00 2001 From: Romain Pokrzywka Date: Mon, 16 Aug 2010 11:33:38 +0200 Subject: apply msvc flags to wince too Reviewed-by: mariusso --- src/3rdparty/webkit/WebCore/WebCore.pro | 2 +- src/3rdparty/webkit/WebKit.pri | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 6b21d8a..981dba2 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -104,7 +104,7 @@ freebsd-*: DEFINES += HAVE_PTHREAD_NP_H DEFINES += BUILD_WEBKIT # Remove whole program optimizations due to miscompilations -win32-msvc2005|win32-msvc2008:{ +win32-msvc2005|win32-msvc2008|wince*:{ QMAKE_CFLAGS_RELEASE -= -GL QMAKE_CXXFLAGS_RELEASE -= -GL } diff --git a/src/3rdparty/webkit/WebKit.pri b/src/3rdparty/webkit/WebKit.pri index a080c43..bb3fd71 100644 --- a/src/3rdparty/webkit/WebKit.pri +++ b/src/3rdparty/webkit/WebKit.pri @@ -79,5 +79,5 @@ contains(DEFINES, QT_NO_UITOOLS): CONFIG -= uitools # Disable a few warnings on Windows. The warnings are also # disabled in WebKitLibraries/win/tools/vsprops/common.vsprops -win32-msvc*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 +win32-msvc*|wince*: QMAKE_CXXFLAGS += -wd4291 -wd4344 -wd4396 -wd4503 -wd4800 -wd4819 -wd4996 -- cgit v0.12