diff options
author | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-09-27 09:41:38 (GMT) |
---|---|---|
committer | Gunnar Sletta <gunnar.sletta@nokia.com> | 2010-09-27 09:41:38 (GMT) |
commit | 2271315eb46665b0a9e61ff0525340713163c1b6 (patch) | |
tree | d0068e34924eca85eb6af4089b3f443a89c929f6 /src | |
parent | 33e7ee9d1866f12a9b92fe4b5549c31e30974d8e (diff) | |
parent | 53d010a989aed878c21522cbaf0d75c7cf821b42 (diff) | |
download | Qt-2271315eb46665b0a9e61ff0525340713163c1b6.zip Qt-2271315eb46665b0a9e61ff0525340713163c1b6.tar.gz Qt-2271315eb46665b0a9e61ff0525340713163c1b6.tar.bz2 |
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt
Conflicts:
configure
src/corelib/global/qglobal.h
Diffstat (limited to 'src')
249 files changed, 7381 insertions, 5265 deletions
diff --git a/src/3rdparty/libconninet/config.guess b/src/3rdparty/libconninet/config.guess deleted file mode 100755 index e3a2116..0000000 --- a/src/3rdparty/libconninet/config.guess +++ /dev/null @@ -1,1533 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-10' - -# This file is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Originally written by Per Bothner <per@bothner.com>. -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# This script attempts to guess a canonical system name similar to -# config.sub. If it succeeds, it prints the system name on stdout, and -# exits with 0. Otherwise, it exits with 1. -# -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] - -Output the configuration name of the system \`$me' is run on. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.guess ($timestamp) - -Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" >&2 - exit 1 ;; - * ) - break ;; - esac -done - -if test $# != 0; then - echo "$me: too many arguments$help" >&2 - exit 1 -fi - -trap 'exit 1' 1 2 15 - -# CC_FOR_BUILD -- compiler used by this script. Note that the use of a -# compiler to aid in system detection is discouraged as it requires -# temporary files to be created and, as you can see below, it is a -# headache to deal with in a portable fashion. - -# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still -# use `HOST_CC' if defined, but it is deprecated. - -# Portable tmp directory creation inspired by the Autoconf team. - -set_cc_for_build=' -trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; -trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; -: ${TMPDIR=/tmp} ; - { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || - { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || - { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || - { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; -dummy=$tmp/dummy ; -tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; -case $CC_FOR_BUILD,$HOST_CC,$CC in - ,,) echo "int x;" > $dummy.c ; - for c in cc gcc c89 c99 ; do - if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then - CC_FOR_BUILD="$c"; break ; - fi ; - done ; - if test x"$CC_FOR_BUILD" = x ; then - CC_FOR_BUILD=no_compiler_found ; - fi - ;; - ,,*) CC_FOR_BUILD=$CC ;; - ,*,*) CC_FOR_BUILD=$HOST_CC ;; -esac ; set_cc_for_build= ;' - -# This is needed to find uname on a Pyramid OSx when run in the BSD universe. -# (ghazi@noc.rutgers.edu 1994-08-24) -if (test -f /.attbin/uname) >/dev/null 2>&1 ; then - PATH=$PATH:/.attbin ; export PATH -fi - -UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown -UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown -UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown -UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown - -# Note: order is significant - the case branches are not exclusive. - -case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in - *:NetBSD:*:*) - # NetBSD (nbsd) targets should (where applicable) match one or - # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, - # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently - # switched to ELF, *-*-netbsd* would select the old - # object file format. This provides both forward - # compatibility and a consistent mechanism for selecting the - # object file format. - # - # Note: NetBSD doesn't particularly care about the vendor - # portion of the name. We always set it to "unknown". - sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` - case "${UNAME_MACHINE_ARCH}" in - armeb) machine=armeb-unknown ;; - arm*) machine=arm-unknown ;; - sh3el) machine=shl-unknown ;; - sh3eb) machine=sh-unknown ;; - sh5el) machine=sh5le-unknown ;; - *) machine=${UNAME_MACHINE_ARCH}-unknown ;; - esac - # The Operating System including object format, if it has switched - # to ELF recently, or will in the future. - case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) - eval $set_cc_for_build - if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ELF__ - then - # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). - # Return netbsd for either. FIX? - os=netbsd - else - os=netbsdelf - fi - ;; - *) - os=netbsd - ;; - esac - # The OS release - # Debian GNU/NetBSD machines have a different userland, and - # thus, need a distinct triplet. However, they do not need - # kernel version information, so it can be replaced with a - # suitable tag, in the style of linux-gnu. - case "${UNAME_VERSION}" in - Debian*) - release='-gnu' - ;; - *) - release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` - ;; - esac - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" - exit ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # According to Compaq, /usr/sbin/psrinfo has been available on - # OSF/1 and Tru64 systems produced since 1995. I hope that - # covers most systems running today. This code pipes the CPU - # types through head -n 1, so we only detect the type of CPU 0. - ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` - case "$ALPHA_CPU_TYPE" in - "EV4 (21064)") - UNAME_MACHINE="alpha" ;; - "EV4.5 (21064)") - UNAME_MACHINE="alpha" ;; - "LCA4 (21066/21068)") - UNAME_MACHINE="alpha" ;; - "EV5 (21164)") - UNAME_MACHINE="alphaev5" ;; - "EV5.6 (21164A)") - UNAME_MACHINE="alphaev56" ;; - "EV5.6 (21164PC)") - UNAME_MACHINE="alphapca56" ;; - "EV5.7 (21164PC)") - UNAME_MACHINE="alphapca57" ;; - "EV6 (21264)") - UNAME_MACHINE="alphaev6" ;; - "EV6.7 (21264A)") - UNAME_MACHINE="alphaev67" ;; - "EV6.8CB (21264C)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8AL (21264B)") - UNAME_MACHINE="alphaev68" ;; - "EV6.8CX (21264D)") - UNAME_MACHINE="alphaev68" ;; - "EV6.9A (21264/EV69A)") - UNAME_MACHINE="alphaev69" ;; - "EV7 (21364)") - UNAME_MACHINE="alphaev7" ;; - "EV7.9 (21364A)") - UNAME_MACHINE="alphaev79" ;; - esac - # A Pn.n version is a patched version. - # A Vn.n version is a released version. - # A Tn.n version is a released field test version. - # A Xn.n version is an unreleased experimental baselevel. - # 1.2 uses "1.2" for uname -r. - echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - Alpha\ *:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # Should we change UNAME_MACHINE based on the output of uname instead - # of the specific Alpha model? - echo alpha-pc-interix - exit ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) - # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. - if test "`(/bin/universe) 2>/dev/null`" = att ; then - echo pyramid-pyramid-sysv3 - else - echo pyramid-pyramid-bsd - fi - exit ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - s390x:SunOS:*:*) - echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - eval $set_cc_for_build - SUN_ARCH="i386" - # If there is a compiler, see if it is configured for 64-bit objects. - # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. - # This test works for both compilers. - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - SUN_ARCH="x86_64" - fi - fi - echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:6*:*) - # According to config.sub, this is the proper way to canonicalize - # SunOS6. Hard to guess exactly what SunOS6 will be like, but - # it's likely to be more like Solaris than SunOS4. - echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:*:*) - case "`/usr/bin/arch -k`" in - Series*|S4*) - UNAME_RELEASE=`uname -v` - ;; - esac - # Japanese Language versions have a version number like `4.1.3-JL'. - echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` - exit ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - sun*:*:4.2BSD:*) - UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` - test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 - case "`/bin/arch`" in - sun3) - echo m68k-sun-sunos${UNAME_RELEASE} - ;; - sun4) - echo sparc-sun-sunos${UNAME_RELEASE} - ;; - esac - exit ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # The situation for MiNT is a little confusing. The machine name - # can be virtually everything (everything which is not - # "atarist" or "atariste" at least should have a processor - # > m68000). The system name ranges from "MiNT" over "FreeMiNT" - # to the lowercase version "mint" (or "freemint"). Finally - # the system name "TOS" denotes a system which is actually not - # MiNT. But MiNT is downward compatible to TOS, so this should - # be no problem. - atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - mips:*:*:UMIPS | mips:*:*:RISCos) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c -#ifdef __cplusplus -#include <stdio.h> /* for printf() prototype */ - int main (int argc, char *argv[]) { -#else - int main (argc, argv) int argc; char *argv[]; { -#endif - #if defined (host_mips) && defined (MIPSEB) - #if defined (SYSTYPE_SYSV) - printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_SVR4) - printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); - #endif - #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) - printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); - #endif - #endif - exit (-1); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` - if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] - then - if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ - [ ${TARGET_BINARY_INTERFACE}x = x ] - then - echo m88k-dg-dgux${UNAME_RELEASE} - else - echo m88k-dg-dguxbcs${UNAME_RELEASE} - fi - else - echo i586-dg-dgux${UNAME_RELEASE} - fi - exit ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. - echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id - exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - ia64:AIX:*:*) - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} - exit ;; - *:AIX:2:3) - if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <sys/systemcfg.h> - - main() - { - if (!__power_pc()) - exit(1); - puts("powerpc-ibm-aix3.2.5"); - exit(0); - } -EOF - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then - echo rs6000-ibm-aix3.2.4 - else - echo rs6000-ibm-aix3.2 - fi - exit ;; - *:AIX:*:[456]) - IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` - if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then - IBM_ARCH=rs6000 - else - IBM_ARCH=powerpc - fi - if [ -x /usr/bin/oslevel ] ; then - IBM_REV=`/usr/bin/oslevel` - else - IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} - fi - echo ${IBM_ARCH}-ibm-aix${IBM_REV} - exit ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 9000/[34678]??:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - case "${UNAME_MACHINE}" in - 9000/31? ) HP_ARCH=m68000 ;; - 9000/[34]?? ) HP_ARCH=m68k ;; - 9000/[678][0-9][0-9]) - if [ -x /usr/bin/getconf ]; then - sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; - '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac - fi - if [ "${HP_ARCH}" = "" ]; then - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - - #define _HPUX_SOURCE - #include <stdlib.h> - #include <unistd.h> - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } -EOF - (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` - test -z "$HP_ARCH" && HP_ARCH=hppa - fi ;; - esac - if [ ${HP_ARCH} = "hppa2.0w" ] - then - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep -q __LP64__ - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 3050*:HI-UX:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <unistd.h> - int - main () - { - long cpu = sysconf (_SC_CPU_VERSION); - /* The order matters, because CPU_IS_HP_MC68K erroneously returns - true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct - results, however. */ - if (CPU_IS_PA_RISC (cpu)) - { - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; - case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; - default: puts ("hppa-hitachi-hiuxwe2"); break; - } - } - else if (CPU_IS_HP_MC68K (cpu)) - puts ("m68k-hitachi-hiuxwe2"); - else puts ("unknown-hitachi-hiuxwe2"); - exit (0); - } -EOF - $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*[A-Z]90:*:*:*) - echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ - | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ - -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ - -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) - FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - *:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in - x86) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T | authenticamd | genuineintel) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - IA64) - echo ia64-unknown-interix${UNAME_RELEASE} - exit ;; - esac ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 8664:Windows_NT:*) - echo x86_64-pc-mks - exit ;; - i*:Windows_NT*:* | Pentium*:Windows_NT*:*) - # How do we know it's Interix rather than the generic POSIX subsystem? - # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we - # UNAME_MACHINE based on the output of uname instead of i386? - echo i586-pc-interix - exit ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *:GNU/*:*:*) - # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu - exit ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - eval $set_cc_for_build - if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep -q __ARM_EABI__ - then - echo ${UNAME_MACHINE}-unknown-linux-gnu - else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi - fi - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - mips:Linux:*:* | mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef ${UNAME_MACHINE} - #undef ${UNAME_MACHINE}el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=${UNAME_MACHINE}el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=${UNAME_MACHINE} - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; - padre:Linux:*:*) - echo sparc-unknown-linux-gnu - exit ;; - parisc:Linux:*:* | hppa:Linux:*:*) - # Look for CPU level - case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-unknown-linux-gnu ;; - PA8*) echo hppa2.0-unknown-linux-gnu ;; - *) echo hppa-unknown-linux-gnu ;; - esac - exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include <features.h> - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - i*86:DYNIX/ptx:4*:*) - # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. - # earlier versions are messed up and put the nodename in both - # sysname and nodename. - echo i386-sequent-sysv4 - exit ;; - i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, - # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. - echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} - exit ;; - i*86:OS/2:*:*) - # If we were able to find `uname', then EMX Unix compatibility - # is probably installed. - echo ${UNAME_MACHINE}-pc-os2-emx - exit ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) - UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` - if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then - echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} - else - echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} - fi - exit ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - case `/bin/uname -X | grep "^Machine"` in - *486*) UNAME_MACHINE=i486 ;; - *Pentium) UNAME_MACHINE=i586 ;; - *Pent*|*Celeron) UNAME_MACHINE=i686 ;; - esac - echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} - exit ;; - i*86:*:3.2:*) - if test -f /usr/options/cb.name; then - UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name` - echo ${UNAME_MACHINE}-pc-isc$UNAME_REL - elif /bin/uname -X 2>/dev/null >/dev/null ; then - UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` - (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 - (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ - && UNAME_MACHINE=i586 - (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ - && UNAME_MACHINE=i686 - (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ - && UNAME_MACHINE=i686 - echo ${UNAME_MACHINE}-pc-sco$UNAME_REL - else - echo ${UNAME_MACHINE}-pc-sysv32 - fi - exit ;; - pc:*:*:*) - # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. - # Note: whatever this is, it MUST be the same as what config.sub - # prints for the "djgpp" host, or else GDB configury will decide that - # this is a cross-build. - echo i586-pc-msdosdjgpp - exit ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - i860:*:4.*:*) # i860-SVR4 - if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then - echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 - else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 - fi - exit ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) - OS_REL='' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - NCR*:*:4.2:* | MPRAS*:*:4.2:*) - OS_REL='.3' - test -r /etc/.relid \ - && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } - /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *:SINIX-*:*:*) - if uname -p 2>/dev/null >/dev/null ; then - UNAME_MACHINE=`(uname -p) 2>/dev/null` - echo ${UNAME_MACHINE}-sni-sysv4 - else - echo ns32k-sni-sysv - fi - exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says <Richard.M.Bartel@ccMail.Census.GOV> - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes <hewes@openmarket.com>. - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) - if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} - else - echo mips-unknown-sysv${UNAME_RELEASE} - fi - exit ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - BePC:Haiku:*:*) # Haiku running on Intel PC compatible. - echo i586-pc-haiku - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - SX-7:SUPER-UX:*:*) - echo sx7-nec-superux${UNAME_RELEASE} - exit ;; - SX-8:SUPER-UX:*:*) - echo sx8-nec-superux${UNAME_RELEASE} - exit ;; - SX-8R:SUPER-UX:*:*) - echo sx8r-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *:procnto*:*:* | *:QNX:[0123456789]*:*) - UNAME_PROCESSOR=`uname -p` - if test "$UNAME_PROCESSOR" = "x86"; then - UNAME_PROCESSOR=i386 - UNAME_MACHINE=pc - fi - echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} - exit ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *:Plan9:*:*) - # "uname -m" is not consistent, so use $cputype instead. 386 - # is converted to i386 for consistency with other x86 - # operating systems. - if test "$cputype" = "386"; then - UNAME_MACHINE=i386 - else - UNAME_MACHINE="$cputype" - fi - echo ${UNAME_MACHINE}-unknown-plan9 - exit ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; - i*86:AROS:*:*) - echo ${UNAME_MACHINE}-pc-aros - exit ;; -esac - -#echo '(No uname command or uname output not recognized.)' 1>&2 -#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 - -eval $set_cc_for_build -cat >$dummy.c <<EOF -#ifdef _SEQUENT_ -# include <sys/types.h> -# include <sys/utsname.h> -#endif -main () -{ -#if defined (sony) -#if defined (MIPSEB) - /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, - I don't know.... */ - printf ("mips-sony-bsd\n"); exit (0); -#else -#include <sys/param.h> - printf ("m68k-sony-newsos%s\n", -#ifdef NEWSOS4 - "4" -#else - "" -#endif - ); exit (0); -#endif -#endif - -#if defined (__arm) && defined (__acorn) && defined (__unix) - printf ("arm-acorn-riscix\n"); exit (0); -#endif - -#if defined (hp300) && !defined (hpux) - printf ("m68k-hp-bsd\n"); exit (0); -#endif - -#if defined (NeXT) -#if !defined (__ARCHITECTURE__) -#define __ARCHITECTURE__ "m68k" -#endif - int version; - version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; - if (version < 4) - printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); - else - printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); - exit (0); -#endif - -#if defined (MULTIMAX) || defined (n16) -#if defined (UMAXV) - printf ("ns32k-encore-sysv\n"); exit (0); -#else -#if defined (CMU) - printf ("ns32k-encore-mach\n"); exit (0); -#else - printf ("ns32k-encore-bsd\n"); exit (0); -#endif -#endif -#endif - -#if defined (__386BSD__) - printf ("i386-pc-bsd\n"); exit (0); -#endif - -#if defined (sequent) -#if defined (i386) - printf ("i386-sequent-dynix\n"); exit (0); -#endif -#if defined (ns32000) - printf ("ns32k-sequent-dynix\n"); exit (0); -#endif -#endif - -#if defined (_SEQUENT_) - struct utsname un; - - uname(&un); - - if (strncmp(un.version, "V2", 2) == 0) { - printf ("i386-sequent-ptx2\n"); exit (0); - } - if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ - printf ("i386-sequent-ptx1\n"); exit (0); - } - printf ("i386-sequent-ptx\n"); exit (0); - -#endif - -#if defined (vax) -# if !defined (ultrix) -# include <sys/param.h> -# if defined (BSD) -# if BSD == 43 - printf ("vax-dec-bsd4.3\n"); exit (0); -# else -# if BSD == 199006 - printf ("vax-dec-bsd4.3reno\n"); exit (0); -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# endif -# else - printf ("vax-dec-bsd\n"); exit (0); -# endif -# else - printf ("vax-dec-ultrix\n"); exit (0); -# endif -#endif - -#if defined (alliant) && defined (i860) - printf ("i860-alliant-bsd\n"); exit (0); -#endif - - exit (1); -} -EOF - -$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# Convex versions that predate uname can use getsysinfo(1) - -if [ -x /usr/convex/getsysinfo ] -then - case `getsysinfo -f cpu_type` in - c1*) - echo c1-convex-bsd - exit ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - esac -fi - -cat >&2 <<EOF -$0: unable to guess system type - -This script, last modified $timestamp, has failed to recognize -the operating system you are using. It is advised that you -download the most up to date version of the config scripts from - - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD -and - http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD - -If the version you run ($0) is already up to date, please -send the following data and any information you think might be -pertinent to <config-patches@gnu.org> in order to provide the needed -information to handle your system. - -config.guess timestamp = $timestamp - -uname -m = `(uname -m) 2>/dev/null || echo unknown` -uname -r = `(uname -r) 2>/dev/null || echo unknown` -uname -s = `(uname -s) 2>/dev/null || echo unknown` -uname -v = `(uname -v) 2>/dev/null || echo unknown` - -/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` -/bin/uname -X = `(/bin/uname -X) 2>/dev/null` - -hostinfo = `(hostinfo) 2>/dev/null` -/bin/universe = `(/bin/universe) 2>/dev/null` -/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` -/bin/arch = `(/bin/arch) 2>/dev/null` -/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` -/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` - -UNAME_MACHINE = ${UNAME_MACHINE} -UNAME_RELEASE = ${UNAME_RELEASE} -UNAME_SYSTEM = ${UNAME_SYSTEM} -UNAME_VERSION = ${UNAME_VERSION} -EOF - -exit 1 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/src/3rdparty/libconninet/config.sub b/src/3rdparty/libconninet/config.sub deleted file mode 100755 index eb0389a..0000000 --- a/src/3rdparty/libconninet/config.sub +++ /dev/null @@ -1,1693 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. - -timestamp='2009-06-11' - -# This file is (in principle) common to ALL GNU software. -# The presence of a machine in this file suggests that SOME GNU software -# can handle that machine. It does not imply ALL GNU software can. -# -# This file is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2 of the License, or -# (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, USA. -# -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - - -# Please send patches to <config-patches@gnu.org>. Submit a context -# diff and a properly formatted ChangeLog entry. -# -# Configuration subroutine to validate and canonicalize a configuration type. -# Supply the specified configuration type as an argument. -# If it is invalid, we print an error message on stderr and exit with code 1. -# Otherwise, we print the canonical config type on stdout and succeed. - -# This file is supposed to be the same for all GNU packages -# and recognize all the CPU types, system types and aliases -# that are meaningful with *any* GNU software. -# Each package is responsible for reporting which valid configurations -# it does not support. The user should be able to distinguish -# a failure to support a valid configuration from a meaningless -# configuration. - -# The goal of this file is to map all the various variations of a given -# machine specification into a single specification in the form: -# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM -# or in some cases, the newer four-part form: -# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM -# It is wrong to echo any other type of specification. - -me=`echo "$0" | sed -e 's,.*/,,'` - -usage="\ -Usage: $0 [OPTION] CPU-MFR-OPSYS - $0 [OPTION] ALIAS - -Canonicalize a configuration name. - -Operation modes: - -h, --help print this help, then exit - -t, --time-stamp print date of last modification, then exit - -v, --version print version number, then exit - -Report bugs and patches to <config-patches@gnu.org>." - -version="\ -GNU config.sub ($timestamp) - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -This is free software; see the source for copying conditions. There is NO -warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - -help=" -Try \`$me --help' for more information." - -# Parse command line -while test $# -gt 0 ; do - case $1 in - --time-stamp | --time* | -t ) - echo "$timestamp" ; exit ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # Stop option processing - shift; break ;; - - ) # Use stdin as input. - break ;; - -* ) - echo "$me: invalid option $1$help" - exit 1 ;; - - *local*) - # First pass through any local machine types. - echo $1 - exit ;; - - * ) - break ;; - esac -done - -case $# in - 0) echo "$me: missing argument$help" >&2 - exit 1;; - 1) ;; - *) echo "$me: too many arguments$help" >&2 - exit 1;; -esac - -# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). -# Here we must recognize all the valid KERNEL-OS combinations. -maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` -case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ - kopensolaris*-gnu* | \ - storm-chaos* | os2-emx* | rtmk-nova*) - os=-$maybe_os - basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` - ;; - *) - basic_machine=`echo $1 | sed 's/-[^-]*$//'` - if [ $basic_machine != $1 ] - then os=`echo $1 | sed 's/.*-/-/'` - else os=; fi - ;; -esac - -### Let's recognize common machines as not being operating systems so -### that things like config.sub decstation-3100 work. We also -### recognize some manufacturers as not being operating systems, so we -### can provide default operating systems below. -case $os in - -sun*os*) - # Prevent following clause from handling this invalid input. - ;; - -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ - -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ - -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ - -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ - -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ - -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) - os= - basic_machine=$1 - ;; - -bluegene*) - os=-cnk - ;; - -sim | -cisco | -oki | -wec | -winbond) - os= - basic_machine=$1 - ;; - -scout) - ;; - -wrs) - os=-vxworks - basic_machine=$1 - ;; - -chorusos*) - os=-chorusos - basic_machine=$1 - ;; - -chorusrdb) - os=-chorusrdb - basic_machine=$1 - ;; - -hiux*) - os=-hiuxwe2 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5) - os=-sco3.2v5 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco4) - os=-sco3.2v4 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2.[4-9]*) - os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco3.2v[4-9]*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco5v6*) - # Don't forget version if it is 3.2v4 or newer. - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -sco*) - os=-sco3.2v2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -udk*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -isc) - os=-isc2.2 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -clix*) - basic_machine=clipper-intergraph - ;; - -isc*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -lynx*) - os=-lynxos - ;; - -ptx*) - basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` - ;; - -windowsnt*) - os=`echo $os | sed -e 's/windowsnt/winnt/'` - ;; - -psos*) - os=-psos - ;; - -mint | -mint[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; -esac - -# Decode aliases for certain CPU-COMPANY combinations. -case $basic_machine in - # Recognize the basic CPU types without company name. - # Some are omitted here because they have special meanings below. - 1750a | 580 \ - | a29k \ - | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ - | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ - | am33_2.0 \ - | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ - | bfin \ - | c4x | clipper \ - | d10v | d30v | dlx | dsp16xx \ - | fido | fr30 | frv \ - | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ - | i370 | i860 | i960 | ia64 \ - | ip2k | iq2000 \ - | lm32 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore | mep | metag \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64octeon | mips64octeonel \ - | mips64orion | mips64orionel \ - | mips64r5900 | mips64r5900el \ - | mips64vr | mips64vrel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | moxie \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k | z80) - basic_machine=$basic_machine-unknown - ;; - m6811 | m68hc11 | m6812 | m68hc12) - # Motorola 68HC11/12. - basic_machine=$basic_machine-unknown - os=-none - ;; - m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # We use `pc' rather than `unknown' - # because (1) that's what they normally are, and - # (2) the word "unknown" tends to confuse beginning users. - i*86 | x86_64) - basic_machine=$basic_machine-pc - ;; - # Object if more than one company name word. - *-*-*) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; - # Recognize the basic CPU types with company name. - 580-* \ - | a29k-* \ - | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ - | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ - | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ - | avr-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | cydra-* \ - | d10v-* | d30v-* | dlx-* \ - | elxsi-* \ - | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ - | h8300-* | h8500-* \ - | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ - | i*86-* | i860-* | i960-* | ia64-* \ - | ip2k-* | iq2000-* \ - | lm32-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64octeon-* | mips64octeonel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64r5900-* | mips64r5900el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | xstormy16-* | xtensa*-* \ - | ymp-* \ - | z8k-* | z80-*) - ;; - # Recognize the basic CPU types without company name, with glob match. - xtensa*) - basic_machine=$basic_machine-unknown - ;; - # Recognize the various machine names and aliases which stand - # for a CPU type and a company and sometimes even an OS. - 386bsd) - basic_machine=i386-unknown - os=-bsd - ;; - 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) - basic_machine=m68000-att - ;; - 3b*) - basic_machine=we32k-att - ;; - a29khif) - basic_machine=a29k-amd - os=-udi - ;; - abacus) - basic_machine=abacus-unknown - ;; - adobe68k) - basic_machine=m68010-adobe - os=-scout - ;; - alliant | fx80) - basic_machine=fx80-alliant - ;; - altos | altos3068) - basic_machine=m68k-altos - ;; - am29k) - basic_machine=a29k-none - os=-bsd - ;; - amd64) - basic_machine=x86_64-pc - ;; - amd64-*) - basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - amdahl) - basic_machine=580-amdahl - os=-sysv - ;; - amiga | amiga-*) - basic_machine=m68k-unknown - ;; - amigaos | amigados) - basic_machine=m68k-unknown - os=-amigaos - ;; - amigaunix | amix) - basic_machine=m68k-unknown - os=-sysv4 - ;; - apollo68) - basic_machine=m68k-apollo - os=-sysv - ;; - apollo68bsd) - basic_machine=m68k-apollo - os=-bsd - ;; - aros) - basic_machine=i386-pc - os=-aros - ;; - aux) - basic_machine=m68k-apple - os=-aux - ;; - balance) - basic_machine=ns32k-sequent - os=-dynix - ;; - blackfin) - basic_machine=bfin-unknown - os=-linux - ;; - blackfin-*) - basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - bluegene*) - basic_machine=powerpc-ibm - os=-cnk - ;; - c90) - basic_machine=c90-cray - os=-unicos - ;; - cegcc) - basic_machine=arm-unknown - os=-cegcc - ;; - convex-c1) - basic_machine=c1-convex - os=-bsd - ;; - convex-c2) - basic_machine=c2-convex - os=-bsd - ;; - convex-c32) - basic_machine=c32-convex - os=-bsd - ;; - convex-c34) - basic_machine=c34-convex - os=-bsd - ;; - convex-c38) - basic_machine=c38-convex - os=-bsd - ;; - cray | j90) - basic_machine=j90-cray - os=-unicos - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16) - basic_machine=cr16-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - da30 | da30-*) - basic_machine=m68k-da30 - ;; - decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) - basic_machine=mips-dec - ;; - decsystem10* | dec10*) - basic_machine=pdp10-dec - os=-tops10 - ;; - decsystem20* | dec20*) - basic_machine=pdp10-dec - os=-tops20 - ;; - delta | 3300 | motorola-3300 | motorola-delta \ - | 3300-motorola | delta-motorola) - basic_machine=m68k-motorola - ;; - delta88) - basic_machine=m88k-motorola - os=-sysv3 - ;; - dicos) - basic_machine=i686-pc - os=-dicos - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - dpx20 | dpx20-*) - basic_machine=rs6000-bull - os=-bosx - ;; - dpx2* | dpx2*-bull) - basic_machine=m68k-bull - os=-sysv3 - ;; - ebmon29k) - basic_machine=a29k-amd - os=-ebmon - ;; - elxsi) - basic_machine=elxsi-elxsi - os=-bsd - ;; - encore | umax | mmax) - basic_machine=ns32k-encore - ;; - es1800 | OSE68k | ose68k | ose | OSE) - basic_machine=m68k-ericsson - os=-ose - ;; - fx2800) - basic_machine=i860-alliant - ;; - genix) - basic_machine=ns32k-ns - ;; - gmicro) - basic_machine=tron-gmicro - os=-sysv - ;; - go32) - basic_machine=i386-pc - os=-go32 - ;; - h3050r* | hiux*) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - h8300hms) - basic_machine=h8300-hitachi - os=-hms - ;; - h8300xray) - basic_machine=h8300-hitachi - os=-xray - ;; - h8500hms) - basic_machine=h8500-hitachi - os=-hms - ;; - harris) - basic_machine=m88k-harris - os=-sysv3 - ;; - hp300-*) - basic_machine=m68k-hp - ;; - hp300bsd) - basic_machine=m68k-hp - os=-bsd - ;; - hp300hpux) - basic_machine=m68k-hp - os=-hpux - ;; - hp3k9[0-9][0-9] | hp9[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k2[0-9][0-9] | hp9k31[0-9]) - basic_machine=m68000-hp - ;; - hp9k3[2-9][0-9]) - basic_machine=m68k-hp - ;; - hp9k6[0-9][0-9] | hp6[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hp9k7[0-79][0-9] | hp7[0-79][0-9]) - basic_machine=hppa1.1-hp - ;; - hp9k78[0-9] | hp78[0-9]) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) - # FIXME: really hppa2.0-hp - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][13679] | hp8[0-9][13679]) - basic_machine=hppa1.1-hp - ;; - hp9k8[0-9][0-9] | hp8[0-9][0-9]) - basic_machine=hppa1.0-hp - ;; - hppa-next) - os=-nextstep3 - ;; - hppaosf) - basic_machine=hppa1.1-hp - os=-osf - ;; - hppro) - basic_machine=hppa1.1-hp - os=-proelf - ;; - i370-ibm* | ibm*) - basic_machine=i370-ibm - ;; -# I'm not sure what "Sysv32" means. Should this be sysv3.2? - i*86v32) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv32 - ;; - i*86v4*) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv4 - ;; - i*86v) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-sysv - ;; - i*86sol2) - basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` - os=-solaris2 - ;; - i386mach) - basic_machine=i386-mach - os=-mach - ;; - i386-vsta | vsta) - basic_machine=i386-unknown - os=-vsta - ;; - iris | iris4d) - basic_machine=mips-sgi - case $os in - -irix*) - ;; - *) - os=-irix4 - ;; - esac - ;; - isi68 | isi) - basic_machine=m68k-isi - os=-sysv - ;; - m68knommu) - basic_machine=m68k-unknown - os=-linux - ;; - m68knommu-*) - basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - m88k-omron*) - basic_machine=m88k-omron - ;; - magnum | m3230) - basic_machine=mips-mips - os=-sysv - ;; - merlin) - basic_machine=ns32k-utek - os=-sysv - ;; - mingw32) - basic_machine=i386-pc - os=-mingw32 - ;; - mingw32ce) - basic_machine=arm-unknown - os=-mingw32ce - ;; - miniframe) - basic_machine=m68000-convergent - ;; - *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) - basic_machine=m68k-atari - os=-mint - ;; - mips3*-*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` - ;; - mips3*) - basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - mvs) - basic_machine=i370-ibm - os=-mvs - ;; - ncr3000) - basic_machine=i486-ncr - os=-sysv4 - ;; - netbsd386) - basic_machine=i386-unknown - os=-netbsd - ;; - netwinder) - basic_machine=armv4l-rebel - os=-linux - ;; - news | news700 | news800 | news900) - basic_machine=m68k-sony - os=-newsos - ;; - news1000) - basic_machine=m68030-sony - os=-newsos - ;; - news-3600 | risc-news) - basic_machine=mips-sony - os=-newsos - ;; - necv70) - basic_machine=v70-nec - os=-sysv - ;; - next | m*-next ) - basic_machine=m68k-next - case $os in - -nextstep* ) - ;; - -ns2*) - os=-nextstep2 - ;; - *) - os=-nextstep3 - ;; - esac - ;; - nh3000) - basic_machine=m68k-harris - os=-cxux - ;; - nh[45]000) - basic_machine=m88k-harris - os=-cxux - ;; - nindy960) - basic_machine=i960-intel - os=-nindy - ;; - mon960) - basic_machine=i960-intel - os=-mon960 - ;; - nonstopux) - basic_machine=mips-compaq - os=-nonstopux - ;; - np1) - basic_machine=np1-gould - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - os400) - basic_machine=powerpc-ibm - os=-os400 - ;; - OSE68000 | ose68000) - basic_machine=m68000-ericsson - os=-ose - ;; - os68k) - basic_machine=m68k-none - os=-os68k - ;; - pa-hitachi) - basic_machine=hppa1.1-hitachi - os=-hiuxwe2 - ;; - paragon) - basic_machine=i860-intel - os=-osf - ;; - parisc) - basic_machine=hppa-unknown - os=-linux - ;; - parisc-*) - basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` - os=-linux - ;; - pbd) - basic_machine=sparc-tti - ;; - pbb) - basic_machine=m68k-tti - ;; - pc532 | pc532-*) - basic_machine=ns32k-pc532 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium | p5 | k5 | k6 | nexgen | viac3) - basic_machine=i586-pc - ;; - pentiumpro | p6 | 6x86 | athlon | athlon_*) - basic_machine=i686-pc - ;; - pentiumii | pentium2 | pentiumiii | pentium3) - basic_machine=i686-pc - ;; - pentium4) - basic_machine=i786-pc - ;; - pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) - basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumpro-* | p6-* | 6x86-* | athlon-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pentium4-*) - basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - sei) - basic_machine=mips-sei - os=-seiux - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - sh5el) - basic_machine=sh5le-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparclite-wrs | simso-wrs) - basic_machine=sparclite-wrs - os=-vxworks - ;; - sps7) - basic_machine=m68k-bull - os=-sysv2 - ;; - spur) - basic_machine=spur-unknown - ;; - st2000) - basic_machine=m68k-tandem - ;; - stratus) - basic_machine=i860-stratus - os=-sysv4 - ;; - sun2) - basic_machine=m68000-sun - ;; - sun2os3) - basic_machine=m68000-sun - os=-sunos3 - ;; - sun2os4) - basic_machine=m68000-sun - os=-sunos4 - ;; - sun3os3) - basic_machine=m68k-sun - os=-sunos3 - ;; - sun3os4) - basic_machine=m68k-sun - os=-sunos4 - ;; - sun4os3) - basic_machine=sparc-sun - os=-sunos3 - ;; - sun4os4) - basic_machine=sparc-sun - os=-sunos4 - ;; - sun4sol2) - basic_machine=sparc-sun - os=-solaris2 - ;; - sun3 | sun3-*) - basic_machine=m68k-sun - ;; - sun4) - basic_machine=sparc-sun - ;; - sun386 | sun386i | roadrunner) - basic_machine=i386-sun - ;; - sv1) - basic_machine=sv1-cray - os=-unicos - ;; - symmetry) - basic_machine=i386-sequent - os=-dynix - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff - ;; - tile*) - basic_machine=tile-unknown - os=-linux-gnu - ;; - tx39) - basic_machine=mipstx39-unknown - ;; - tx39el) - basic_machine=mipstx39el-unknown - ;; - toad1) - basic_machine=pdp10-xkl - os=-tops20 - ;; - tower | tower-32) - basic_machine=m68k-ncr - ;; - tpf) - basic_machine=s390x-ibm - os=-tpf - ;; - udi29k) - basic_machine=a29k-amd - os=-udi - ;; - ultra3) - basic_machine=a29k-nyu - os=-sym1 - ;; - v810 | necv810) - basic_machine=v810-nec - os=-none - ;; - vaxv) - basic_machine=vax-dec - os=-sysv - ;; - vms) - basic_machine=vax-dec - os=-vms - ;; - vpp*|vx|vx-*) - basic_machine=f301-fujitsu - ;; - vxworks960) - basic_machine=i960-wrs - os=-vxworks - ;; - vxworks68) - basic_machine=m68k-wrs - os=-vxworks - ;; - vxworks29k) - basic_machine=a29k-wrs - os=-vxworks - ;; - w65*) - basic_machine=w65-wdc - os=-none - ;; - w89k-*) - basic_machine=hppa1.1-winbond - os=-proelf - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - xps | xps100) - basic_machine=xps100-honeywell - ;; - ymp) - basic_machine=ymp-cray - os=-unicos - ;; - z8k-*-coff) - basic_machine=z8k-unknown - os=-sim - ;; - z80-*-coff) - basic_machine=z80-unknown - os=-sim - ;; - none) - basic_machine=none-none - os=-none - ;; - -# Here we handle the default manufacturer of certain CPU types. It is in -# some cases the only manufacturer, in others, it is the most popular. - w89k) - basic_machine=hppa1.1-winbond - ;; - op50n) - basic_machine=hppa1.1-oki - ;; - op60c) - basic_machine=hppa1.1-oki - ;; - romp) - basic_machine=romp-ibm - ;; - mmix) - basic_machine=mmix-knuth - ;; - rs6000) - basic_machine=rs6000-ibm - ;; - vax) - basic_machine=vax-dec - ;; - pdp10) - # there are many clones, so DEC is not a safe bet - basic_machine=pdp10-unknown - ;; - pdp11) - basic_machine=pdp11-dec - ;; - we32k) - basic_machine=we32k-att - ;; - sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* | -aros* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ - | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ - | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ - | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ - | -chorusos* | -chorusrdb* | -cegcc* \ - | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ - | -uxpv* | -beos* | -mpeix* | -udk* \ - | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ - | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ - | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ - | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ - | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ - | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) - # Remember, each alternative MUST END IN *, to match a version number. - ;; - -qnx*) - case $basic_machine in - x86-* | i*86-*) - ;; - *) - os=-nto$os - ;; - esac - ;; - -nto-qnx*) - ;; - -nto*) - os=`echo $os | sed -e 's|nto|nto-qnx|'` - ;; - -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ - | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ - | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) - ;; - -mac*) - os=`echo $os | sed -e 's|mac|macos|'` - ;; - -linux-dietlibc) - os=-linux-dietlibc - ;; - -linux*) - os=`echo $os | sed -e 's|linux|linux-gnu|'` - ;; - -sunos5*) - os=`echo $os | sed -e 's|sunos5|solaris2|'` - ;; - -sunos6*) - os=`echo $os | sed -e 's|sunos6|solaris3|'` - ;; - -opened*) - os=-openedition - ;; - -os400*) - os=-os400 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -syllable*) - os=-syllable - ;; - -386bsd) - os=-bsd - ;; - -ctix* | -uts*) - os=-sysv - ;; - -nova*) - os=-rtmk-nova - ;; - -ns2 ) - os=-nextstep2 - ;; - -nsk*) - os=-nsk - ;; - # Preserve the version number of sinix5. - -sinix5.*) - os=`echo $os | sed -e 's|sinix|sysv|'` - ;; - -sinix*) - os=-sysv4 - ;; - -tpf*) - os=-tpf - ;; - -triton*) - os=-sysv3 - ;; - -oss*) - os=-sysv3 - ;; - -svr4) - os=-sysv4 - ;; - -svr3) - os=-sysv3 - ;; - -sysvr4) - os=-sysv4 - ;; - # This must come after -sysvr4. - -sysv*) - ;; - -ose*) - os=-ose - ;; - -es1800*) - os=-ose - ;; - -xenix) - os=-xenix - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - os=-mint - ;; - -aros*) - os=-aros - ;; - -kaos*) - os=-kaos - ;; - -zvmoe) - os=-zvmoe - ;; - -dicos*) - os=-dicos - ;; - -none) - ;; - *) - # Get rid of the `-' at the beginning of $os. - os=`echo $os | sed 's/[^-]*-//'` - echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 - exit 1 - ;; -esac -else - -# Here we handle the default operating systems that come with various machines. -# The value should be what the vendor currently ships out the door with their -# machine or put another way, the most popular os provided with the machine. - -# Note that if you're going to try to match "-MANUFACTURER" here (say, -# "-sun"), then you have to tell the case statement up towards the top -# that MANUFACTURER isn't an operating system. Otherwise, code above -# will signal an error saying that MANUFACTURER isn't an operating -# system, and we'll never get to this point. - -case $basic_machine in - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-acorn) - os=-riscix1.2 - ;; - arm*-rebel) - os=-linux - ;; - arm*-semi) - os=-aout - ;; - c4x-* | tic4x-*) - os=-coff - ;; - # This must come before the *-dec entry. - pdp10-*) - os=-tops20 - ;; - pdp11-*) - os=-none - ;; - *-dec | vax-*) - os=-ultrix4.2 - ;; - m68*-apollo) - os=-domain - ;; - i386-sun) - os=-sunos4.0.2 - ;; - m68000-sun) - os=-sunos3 - # This also exists in the configure program, but was not the - # default. - # os=-sunos4 - ;; - m68*-cisco) - os=-aout - ;; - mep-*) - os=-elf - ;; - mips*-cisco) - os=-elf - ;; - mips*-*) - os=-elf - ;; - or32-*) - os=-coff - ;; - *-tti) # must be before sparc entry or we get the wrong os. - os=-sysv3 - ;; - sparc-* | *-sun) - os=-sunos4.1.1 - ;; - *-be) - os=-beos - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-wec) - os=-proelf - ;; - *-winbond) - os=-proelf - ;; - *-oki) - os=-proelf - ;; - *-hp) - os=-hpux - ;; - *-hitachi) - os=-hiux - ;; - i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) - os=-sysv - ;; - *-cbm) - os=-amigaos - ;; - *-dg) - os=-dgux - ;; - *-dolphin) - os=-sysv3 - ;; - m68k-ccur) - os=-rtu - ;; - m88k-omron*) - os=-luna - ;; - *-next ) - os=-nextstep - ;; - *-sequent) - os=-ptx - ;; - *-crds) - os=-unos - ;; - *-ns) - os=-genix - ;; - i370-*) - os=-mvs - ;; - *-next) - os=-nextstep3 - ;; - *-gould) - os=-sysv - ;; - *-highlevel) - os=-bsd - ;; - *-encore) - os=-bsd - ;; - *-sgi) - os=-irix - ;; - *-siemens) - os=-sysv4 - ;; - *-masscomp) - os=-rtu - ;; - f30[01]-fujitsu | f700-fujitsu) - os=-uxpv - ;; - *-rom68k) - os=-coff - ;; - *-*bug) - os=-coff - ;; - *-apple) - os=-macos - ;; - *-atari*) - os=-mint - ;; - *) - os=-none - ;; -esac -fi - -# Here we handle the case where we know the os, and the CPU type, but not the -# manufacturer. We pick the logical manufacturer. -vendor=unknown -case $basic_machine in - *-unknown) - case $os in - -riscix*) - vendor=acorn - ;; - -sunos*) - vendor=sun - ;; - -cnk*|-aix*) - vendor=ibm - ;; - -beos*) - vendor=be - ;; - -hpux*) - vendor=hp - ;; - -mpeix*) - vendor=hp - ;; - -hiux*) - vendor=hitachi - ;; - -unos*) - vendor=crds - ;; - -dgux*) - vendor=dg - ;; - -luna*) - vendor=omron - ;; - -genix*) - vendor=ns - ;; - -mvs* | -opened*) - vendor=ibm - ;; - -os400*) - vendor=ibm - ;; - -ptx*) - vendor=sequent - ;; - -tpf*) - vendor=ibm - ;; - -vxsim* | -vxworks* | -windiss*) - vendor=wrs - ;; - -aux*) - vendor=apple - ;; - -hms*) - vendor=hitachi - ;; - -mpw* | -macos*) - vendor=apple - ;; - -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) - vendor=atari - ;; - -vos*) - vendor=stratus - ;; - esac - basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` - ;; -esac - -echo $basic_machine$os -exit - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "timestamp='" -# time-stamp-format: "%:y-%02m-%02d" -# time-stamp-end: "'" -# End: diff --git a/src/3rdparty/libconninet/configure.ac b/src/3rdparty/libconninet/configure.ac index 2a383ee..72fa98b 100644 --- a/src/3rdparty/libconninet/configure.ac +++ b/src/3rdparty/libconninet/configure.ac @@ -75,10 +75,6 @@ PKG_CHECK_MODULES(GCONF, gconf-2.0) AC_SUBST(GCONF_CFLAGS) AC_SUBST(GCONF_LIBS) -PKG_CHECK_MODULES(QGCONF, gq-gconf) -AC_SUBST(QGCONF_CFLAGS) -AC_SUBST(QGCONF_LIBS) - CONCFLAGS="-Wall -Werror -Wmissing-prototypes" AC_SUBST(CONCFLAGS) diff --git a/src/3rdparty/libconninet/debian/changelog b/src/3rdparty/libconninet/debian/changelog index 4063317..10e9dec 100644 --- a/src/3rdparty/libconninet/debian/changelog +++ b/src/3rdparty/libconninet/debian/changelog @@ -1,9 +1,21 @@ -libconninet (0.42+0m6) unstable; urgency=low +libconninet (0.45) unstable; urgency=low - * This entry has been added by BIFH queue processor - version has been changed to 0.42+0m6 + * Fixes: NB#187470 - libconninet: add automake to build-deps - -- Qing Jin <ext-qing.1.jin@nokia.com> Thu, 22 Jul 2010 14:04:58 +0300 + -- Markus Silvan <ext-markus.p.silvan@nokia.com> Wed, 25 Aug 2010 09:02:55 +0300 + +libconninet (0.44) unstable; urgency=low + + * Added autoconf to build dependencies + + -- Markus Silvan <ext-markus.p.silvan@nokia.com> Wed, 25 Aug 2010 09:02:55 +0300 + +libconninet (0.43) unstable; urgency=low + + * Fixes: NB#184824 - Getting all proxy variables from gconf in one go + which will speedup the HTTP requests done by Qt4.7 webkit + + -- Jukka Rissanen <jukka.rissanen@nokia.com> Thu, 12 Aug 2010 10:15:20 +0300 libconninet (0.42) unstable; urgency=low diff --git a/src/3rdparty/libconninet/debian/control b/src/3rdparty/libconninet/debian/control index 2db660f..a2343a0 100644 --- a/src/3rdparty/libconninet/debian/control +++ b/src/3rdparty/libconninet/debian/control @@ -3,7 +3,7 @@ Priority: optional Maintainer: Jukka Rissanen <jukka.rissanen@nokia.com> Build-Depends: debhelper (>= 4.0.0), autotools-dev, libglib2.0-dev (>= 2.8), libdbus-1-dev (>= 0.60), libconnsettings0-dev (>= 0.4), icd2-osso-ic-dev, - icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev + icd2-dev, libqt4-dev, libgconf2-dev (>> 2.6.4), autoconf, automake Standards-Version: 3.6.2 Section: libs @@ -12,7 +12,7 @@ Section: libdevel Architecture: any Depends: libconninet0 (= ${Source-Version}), libdbus-1-dev (>= 0.60), libglib2.0-dev (>= 2.8), libconnsettings0-dev (>= 0.4), libqt4-dev, - icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4), libgq-gconf-dev + icd2-osso-ic-dev, icd2-dev, libgconf2-dev (>> 2.6.4) Description: Internet Connectivity support library development files Internet Connectivity support library (libconninet) provides common support functions for connecting to icd2 and accessing configuration diff --git a/src/3rdparty/libconninet/src/proxyconf.cpp b/src/3rdparty/libconninet/src/proxyconf.cpp index 5b27565..d377a31 100644 --- a/src/3rdparty/libconninet/src/proxyconf.cpp +++ b/src/3rdparty/libconninet/src/proxyconf.cpp @@ -20,11 +20,13 @@ 02110-1301 USA */ +#include <QVariant> +#include <QStringList> #include <QDebug> #include <QWriteLocker> #include <QNetworkProxyFactory> #include <QNetworkProxy> -#include <GConfItem> +#include <gconf/gconf-value.h> #include <gconf/gconf-client.h> #include "proxyconf.h" @@ -34,6 +36,92 @@ namespace Maemo { +static QString convertKey(const char *key) +{ + return QString::fromUtf8(key); +} + +static QVariant convertValue(GConfValue *src) +{ + if (!src) { + return QVariant(); + } else { + switch (src->type) { + case GCONF_VALUE_INVALID: + return QVariant(QVariant::Invalid); + case GCONF_VALUE_BOOL: + return QVariant((bool)gconf_value_get_bool(src)); + case GCONF_VALUE_INT: + return QVariant(gconf_value_get_int(src)); + case GCONF_VALUE_FLOAT: + return QVariant(gconf_value_get_float(src)); + case GCONF_VALUE_STRING: + return QVariant(QString::fromUtf8(gconf_value_get_string(src))); + case GCONF_VALUE_LIST: + switch (gconf_value_get_list_type(src)) { + case GCONF_VALUE_STRING: + { + QStringList result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(QString::fromUtf8(gconf_value_get_string((GConfValue *)elts->data))); + return QVariant(result); + } + default: + { + QList<QVariant> result; + for (GSList *elts = gconf_value_get_list(src); elts; elts = elts->next) + result.append(convertValue((GConfValue *)elts->data)); + return QVariant(result); + } + } + case GCONF_VALUE_SCHEMA: + default: + return QVariant(); + } + } +} + + +/* Fast version of GConfItem, allows reading subtree at a time */ +class GConfItemFast { +public: + GConfItemFast(const QString &k) : key(k) {} + QHash<QString,QVariant> getEntries() const; + +private: + QString key; +}; + +#define withClient(c) for (GConfClient *c = gconf_client_get_default(); c; c=0) + + +QHash<QString,QVariant> GConfItemFast::getEntries() const +{ + QHash<QString,QVariant> children; + + withClient(client) { + QByteArray k = key.toUtf8(); + GSList *entries = gconf_client_all_entries(client, k.data(), NULL); + for (GSList *e = entries; e; e = e->next) { + char *key_name = strrchr(((GConfEntry *)e->data)->key, '/'); + if (!key_name) + key_name = ((GConfEntry *)e->data)->key; + else + key_name++; + QString key(convertKey(key_name)); + QVariant value = convertValue(((GConfEntry *)e->data)->value); + gconf_entry_unref((GConfEntry *)e->data); + //qDebug()<<"key="<<key<<"value="<<value; + children.insert(key, value); + } + g_slist_free (entries); + } + + return children; +} + + + class NetworkProxyFactory : QNetworkProxyFactory { public: NetworkProxyFactory() { } @@ -71,10 +159,6 @@ private: QString rtsp_host; quint16 rtsp_port; - QVariant getValue(QString& name); - QVariant getHttpValue(QString& name); - QVariant getValue(const char *name); - QVariant getHttpValue(const char *name); bool isHostExcluded(const QString &host); public: @@ -86,51 +170,44 @@ public: }; -QVariant ProxyConfPrivate::getValue(QString& name) +static QHash<QString,QVariant> getValues(const QString& prefix) { - GConfItem item(prefix + name); - return item.value(); + GConfItemFast item(prefix); + return item.getEntries(); } -QVariant ProxyConfPrivate::getHttpValue(QString& name) +static QHash<QString,QVariant> getHttpValues(const QString& prefix) { - GConfItem item(http_prefix + name); - return item.value(); + GConfItemFast item(prefix); + return item.getEntries(); } - -QVariant ProxyConfPrivate::getValue(const char *name) -{ - QString n = QString(name); - return getValue(n); -} - -QVariant ProxyConfPrivate::getHttpValue(const char *name) -{ - QString n = QString(name); - return getHttpValue(n); -} - - #define GET(var, type) \ do { \ - var = getValue(#var).to##type (); \ - /*qDebug()<<"var="<<var;*/ \ + QVariant v = values.value(#var); \ + if (v.isValid()) \ + var = v.to##type (); \ } while(0) -#define GET2(var, name, type) \ +#define GET_HTTP(var, name, type) \ do { \ - var = getHttpValue(#name).to##type (); \ - /*qDebug()<<"var="<<var;*/ \ + QVariant v = httpValues.value(#name); \ + if (v.isValid()) \ + var = v.to##type (); \ } while(0) void ProxyConfPrivate::readProxyData() { + QHash<QString,QVariant> values = getValues(prefix); + QHash<QString,QVariant> httpValues = getHttpValues(http_prefix); + + //qDebug()<<"values="<<values; + /* Read the proxy settings from /system/proxy* */ - GET2(http_proxy, host, String); - GET2(http_port, port, Int); - GET2(ignore_hosts, ignore_hosts, List); + GET_HTTP(http_proxy, host, String); + GET_HTTP(http_port, port, Int); + GET_HTTP(ignore_hosts, ignore_hosts, List); GET(mode, String); GET(autoconfig_url, String); @@ -271,8 +348,8 @@ ProxyConf::ProxyConf() : d_ptr(new ProxyConfPrivate) { g_type_init(); - d_ptr->prefix = CONF_PROXY "/"; - d_ptr->http_prefix = HTTP_PROXY "/"; + d_ptr->prefix = CONF_PROXY; + d_ptr->http_prefix = HTTP_PROXY; } ProxyConf::~ProxyConf() 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/3rdparty/webkit/.tag b/src/3rdparty/webkit/.tag index 1148320..ae33228 100644 --- a/src/3rdparty/webkit/.tag +++ b/src/3rdparty/webkit/.tag @@ -1 +1 @@ -460b651cbe4f6994b492ff08614e57b0e31a24c8 +715b53069911a31a559aa0b3d94ffc6a5ac20988 diff --git a/src/3rdparty/webkit/JavaScriptCore/ChangeLog b/src/3rdparty/webkit/JavaScriptCore/ChangeLog index 2be6f5a..9922da6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/ChangeLog +++ b/src/3rdparty/webkit/JavaScriptCore/ChangeLog @@ -1,3 +1,60 @@ +2010-06-16 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Reindent the asm code I've moved to inside the function + (previous commit) + + * jit/JITStubs.cpp: + +2010-06-16 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Fix the JIT compilation with the Intel 32-bit C++ compiler. + + ICC doesn't understand the use of "asm" statements outside of + function bodies, so move the assembly code inside a dummy + function (and mark it so that the compiler doesn't remove it + altogether). + + Also removed the ".text" entry that I had added because now + the assembly code is properly inside a code section (fixes + compilation with -ffunction-sections). + + * jit/JITStubs.cpp: + +2010-06-16 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Don't use __attribute__((may_alias)) with the Intel compiler, + as it doesn't understand it. + + * wtf/Vector.h: + +2010-06-16 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Fix compilation with the Intel C++ compiler (11.1.072). + + Like RVCT, label pointers must be void*, not const void*. + + * bytecode/Opcode.h: + +2010-06-16 Thiago Macieira <thiago.macieira@nokia.com> + + Reviewed by NOBODY (OOPS!). + + Add the WTF_COMPILER_INTEL for when the Intel compiler is used + for building. Usually, the Intel compiler masquerades as + another compiler in the system and gets away with it, but some + times specific fixes are required (such as when using language + extensions). + + * wtf/Platform.h: + 2010-07-08 Andreas Kling <andreas.kling@nokia.com> Reviewed by Oliver Hunt. diff --git a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h index 509daeb..f7f53fd 100644 --- a/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h +++ b/src/3rdparty/webkit/JavaScriptCore/bytecode/Opcode.h @@ -206,7 +206,7 @@ namespace JSC { #undef VERIFY_OPCODE_ID #if HAVE(COMPUTED_GOTO) -#if COMPILER(RVCT) +#if COMPILER(RVCT) || COMPILER(INTEL) typedef void* Opcode; #else typedef const void* Opcode; diff --git a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp index e5fcdc4..23fcb96 100644 --- a/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp +++ b/src/3rdparty/webkit/JavaScriptCore/jit/JITStubs.cpp @@ -113,56 +113,59 @@ COMPILE_ASSERT(offsetof(struct JITStackFrame, savedEBX) == 0x3c, JITStackFrame_s COMPILE_ASSERT(offsetof(struct JITStackFrame, callFrame) == 0x58, JITStackFrame_callFrame_offset_matches_ctiTrampoline); COMPILE_ASSERT(offsetof(struct JITStackFrame, code) == 0x50, JITStackFrame_code_offset_matches_ctiTrampoline); -asm volatile ( -".text\n" -".globl " SYMBOL_STRING(ctiTrampoline) "\n" -HIDE_SYMBOL(ctiTrampoline) "\n" -SYMBOL_STRING(ctiTrampoline) ":" "\n" - "pushl %ebp" "\n" - "movl %esp, %ebp" "\n" - "pushl %esi" "\n" - "pushl %edi" "\n" - "pushl %ebx" "\n" - "subl $0x3c, %esp" "\n" - "movl $512, %esi" "\n" - "movl 0x58(%esp), %edi" "\n" - "call *0x50(%esp)" "\n" - "addl $0x3c, %esp" "\n" - "popl %ebx" "\n" - "popl %edi" "\n" - "popl %esi" "\n" - "popl %ebp" "\n" - "ret" "\n" -); - -asm volatile ( -".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" -HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" -SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" +static void __attribute__((used)) asm_wrapper() +{ + asm volatile ( + ".text\n" + ".globl " SYMBOL_STRING(ctiTrampoline) "\n" + HIDE_SYMBOL(ctiTrampoline) "\n" + SYMBOL_STRING(ctiTrampoline) ":" "\n" + "pushl %ebp" "\n" + "movl %esp, %ebp" "\n" + "pushl %esi" "\n" + "pushl %edi" "\n" + "pushl %ebx" "\n" + "subl $0x3c, %esp" "\n" + "movl $512, %esi" "\n" + "movl 0x58(%esp), %edi" "\n" + "call *0x50(%esp)" "\n" + "addl $0x3c, %esp" "\n" + "popl %ebx" "\n" + "popl %edi" "\n" + "popl %esi" "\n" + "popl %ebp" "\n" + "ret" "\n" + ); + + asm volatile ( + ".globl " SYMBOL_STRING(ctiVMThrowTrampoline) "\n" + HIDE_SYMBOL(ctiVMThrowTrampoline) "\n" + SYMBOL_STRING(ctiVMThrowTrampoline) ":" "\n" #if !USE(JIT_STUB_ARGUMENT_VA_LIST) - "movl %esp, %ecx" "\n" + "movl %esp, %ecx" "\n" #endif - "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" - "addl $0x3c, %esp" "\n" - "popl %ebx" "\n" - "popl %edi" "\n" - "popl %esi" "\n" - "popl %ebp" "\n" - "ret" "\n" -); - -asm volatile ( -".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" -HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" -SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" - "addl $0x3c, %esp" "\n" - "popl %ebx" "\n" - "popl %edi" "\n" - "popl %esi" "\n" - "popl %ebp" "\n" - "ret" "\n" -); + "call " SYMBOL_STRING_RELOCATION(cti_vm_throw) "\n" + "addl $0x3c, %esp" "\n" + "popl %ebx" "\n" + "popl %edi" "\n" + "popl %esi" "\n" + "popl %ebp" "\n" + "ret" "\n" + ); + asm volatile ( + ".globl " SYMBOL_STRING(ctiOpThrowNotCaught) "\n" + HIDE_SYMBOL(ctiOpThrowNotCaught) "\n" + SYMBOL_STRING(ctiOpThrowNotCaught) ":" "\n" + "addl $0x3c, %esp" "\n" + "popl %ebx" "\n" + "popl %edi" "\n" + "popl %esi" "\n" + "popl %ebp" "\n" + "ret" "\n" + ); +} + #elif COMPILER(GCC) && CPU(X86_64) #if USE(JIT_STUB_ARGUMENT_VA_LIST) diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h index 84b6153..15f0ffc 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Platform.h @@ -99,7 +99,10 @@ #undef _WIN32 #endif - +/* COMPILER(INTEL) - Intel C++ Compiler */ +#if defined(__INTEL_COMPILER) +#define WTF_COMPILER_INTEL 1 +#endif /* ==== CPU() - the target CPU architecture ==== */ diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h index 4d9ea61..c267050 100644 --- a/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h +++ b/src/3rdparty/webkit/JavaScriptCore/wtf/Vector.h @@ -49,7 +49,7 @@ namespace WTF { #error WTF_ALIGN macros need alignment control. #endif - #if COMPILER(GCC) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 303) + #if COMPILER(GCC) && !COMPILER(INTEL) && (((__GNUC__ * 100) + __GNUC_MINOR__) >= 303) typedef char __attribute__((__may_alias__)) AlignedBufferChar; #else typedef char AlignedBufferChar; diff --git a/src/3rdparty/webkit/VERSION b/src/3rdparty/webkit/VERSION index aff3f2a..f919bdf 100644 --- a/src/3rdparty/webkit/VERSION +++ b/src/3rdparty/webkit/VERSION @@ -4,4 +4,4 @@ This is a snapshot of the Qt port of WebKit from and has the sha1 checksum - 460b651cbe4f6994b492ff08614e57b0e31a24c8 + 715b53069911a31a559aa0b3d94ffc6a5ac20988 diff --git a/src/3rdparty/webkit/WebCore/ChangeLog b/src/3rdparty/webkit/WebCore/ChangeLog index 98d4d51..2d20cbd 100644 --- a/src/3rdparty/webkit/WebCore/ChangeLog +++ b/src/3rdparty/webkit/WebCore/ChangeLog @@ -1,3 +1,105 @@ +2010-09-09 Kristian Amlie <kristian.amlie@nokia.com> + + Reviewed by Andreas Kling. + + [Qt] Fixed incorrect Symbian scoping. + + The missing install functionality is only true for mmp based systems. + + https://bugs.webkit.org/show_bug.cgi?id=45268 + + * WebCore.pro: + +2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] fix qt_webkit_version.pri install for in-Qt builds + + Always add the target, even if building inside Qt - as opposed to the + headers and libraries, there are no rules for that coming from + qbase.pri. + + Task-number: QTBUG-13306 + + * WebCore.pro: + +2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Let QtWebKit inject itself into the qt configuration + + i.e., don't explicitly deal with qt_webkit_version.pri outside of the + webkit source directory. + + Task-number: QTBUG-12379 + + * WebCore.pro: + +2010-08-20 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Ariya Hidayat. + + [Qt] When using the raster graphics system on Maemo5, allow + Flash to render directly into the raster window surface. + wmode=transparent is now supported as a result of this change. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::paintUsingImageSurfaceExtension): + +2010-08-18 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Kenneth Rohde Christiansen. + + [Qt] Implement Maemo5 local rendering NPAPI extension. See + https://wiki.mozilla.org/Plugins:NokiaMaemoImageSurface for details. + + With the local rendering extension, Flash will paint into a 16-bit surface. + For wmode=transparent, Flash expects the surface to contain the contents + beneath it. As it is tricky to implement the content propagation across all + graphics systems, transparent Flash is not supported. We just fill the surface + with white and wmode=transparent behaves the same as wmode=opaque with a white + background. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCore.pro: + * plugins/PluginView.cpp: + (WebCore::PluginView::setValue): + (WebCore::PluginView::PluginView): + * plugins/PluginView.h: + * plugins/qt/PluginViewQt.cpp: + (WebCore::PluginView::updatePluginWidget): + (WebCore::PluginView::paintUsingImageSurfaceExtension): + (WebCore::PluginView::paint): + (WebCore::PluginView::platformGetValueStatic): + +2010-08-17 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Antonio Gomes. + + [Qt] On Maemo5, there is no libgdk-x11-2.0.so symlink. Look for + libgdk-x11-2.0.so.0 instead on X11 and Maemo5. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/qt/PluginViewQt.cpp: + (WebCore::getPluginDisplay): + +2010-08-17 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Kenneth Rohde Christiansen. + Set PluginQuirkRequiresDefaultScreenDepth for all Flash versions and not + just Flash 10. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * plugins/PluginPackage.cpp: + (WebCore::PluginPackage::determineQuirks): + 2010-08-10 Tor Arne Vestbø <tor.arne.vestbo@nokia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebCore/WebCore.pro b/src/3rdparty/webkit/WebCore/WebCore.pro index 7e57b9c..4cda5bc 100644 --- a/src/3rdparty/webkit/WebCore/WebCore.pro +++ b/src/3rdparty/webkit/WebCore/WebCore.pro @@ -105,7 +105,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 } @@ -2193,6 +2193,9 @@ contains(DEFINES, ENABLE_NETSCAPE_PLUGIN_API=1) { CONFIG += x11 LIBS += -lXrender } + maemo5 { + DEFINES += MOZ_PLATFORM_MAEMO=5 + } SOURCES += \ plugins/qt/PluginContainerQt.cpp \ plugins/qt/PluginPackageQt.cpp \ @@ -2884,7 +2887,7 @@ HEADERS += $$WEBKIT_API_HEADERS exists($$OUTPUT_DIR/include/QtWebKit/classheaders.pri): include($$OUTPUT_DIR/include/QtWebKit/classheaders.pri) WEBKIT_INSTALL_HEADERS = $$WEBKIT_API_HEADERS $$WEBKIT_CLASS_HEADERS - !symbian { + !symbian-abld:!symbian-sbsv2 { headers.files = $$WEBKIT_INSTALL_HEADERS !isEmpty(INSTALL_HEADERS): headers.path = $$INSTALL_HEADERS/QtWebKit @@ -2895,7 +2898,7 @@ HEADERS += $$WEBKIT_API_HEADERS INSTALLS += target headers } else { - # INSTALLS is not implemented in qmake's s60 generators, copy headers manually + # INSTALLS is not implemented in qmake's mmp generators, copy headers manually inst_headers.commands = $$QMAKE_COPY ${QMAKE_FILE_NAME} ${QMAKE_FILE_OUT} inst_headers.input = WEBKIT_INSTALL_HEADERS inst_headers.CONFIG = no_clean @@ -2950,7 +2953,7 @@ HEADERS += $$WEBKIT_API_HEADERS } } -CONFIG(QTDIR_build) { +!CONFIG(webkit-debug):CONFIG(QTDIR_build) { # Remove the following 2 lines if you want debug information in WebCore CONFIG -= separate_debug_info CONFIG += no_debug_info diff --git a/src/3rdparty/webkit/WebCore/bridge/npapi.h b/src/3rdparty/webkit/WebCore/bridge/npapi.h index 533fcba..daa3a36 100644 --- a/src/3rdparty/webkit/WebCore/bridge/npapi.h +++ b/src/3rdparty/webkit/WebCore/bridge/npapi.h @@ -247,6 +247,12 @@ typedef struct _NPRect } NPRect; +typedef struct _NPSize +{ + int32 width; + int32 height; +} NPSize; + #ifdef XP_UNIX /* * Unix specific structures and definitions @@ -373,6 +379,11 @@ typedef enum { /* In the NPDrawingModelCoreAnimation drawing model, the browser asks the plug-in for a Core Animation layer. */ NPPVpluginCoreAnimationLayer = 1003 #endif + + +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + NPPVpluginWindowlessLocalBool = 2002 +#endif } NPPVariable; /* @@ -419,6 +430,9 @@ typedef enum { , NPNVsupportsCocoaBool = 3001 /* TRUE if the browser supports the Cocoa event model */ #endif /* XP_MACOSX */ +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + , NPNVSupportsWindowlessLocal = 2002 +#endif } NPNVariable; typedef enum { @@ -539,6 +553,23 @@ typedef struct _NPWindow } NPWindow; +typedef struct _NPImageExpose +{ + char* data; /* image pointer */ + int32 stride; /* Stride of data image pointer */ + int32 depth; /* Depth of image pointer */ + int32 x; /* Expose x */ + int32 y; /* Expose y */ + uint32 width; /* Expose width */ + uint32 height; /* Expose height */ + NPSize dataSize; /* Data buffer size */ + float translateX; /* translate X matrix value */ + float translateY; /* translate Y matrix value */ + float scaleX; /* scale X matrix value */ + float scaleY; /* scale Y matrix value */ +} NPImageExpose; + + typedef struct _NPFullPrint { NPBool pluginPrinted; /* Set TRUE if plugin handled fullscreen */ diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp index ad03ecd..3881f54 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginPackage.cpp @@ -185,12 +185,12 @@ void PluginPackage::determineQuirks(const String& mimeType) #if PLATFORM(QT) m_quirks.add(PluginQuirkRequiresGtkToolKit); #endif - m_quirks.add(PluginQuirkRequiresDefaultScreenDepth); } else { // Flash 9 and older requests windowless plugins if we return a mozilla user agent m_quirks.add(PluginQuirkWantsMozillaUserAgent); } + m_quirks.add(PluginQuirkRequiresDefaultScreenDepth); m_quirks.add(PluginQuirkThrottleInvalidate); m_quirks.add(PluginQuirkThrottleWMUserPlusOneMessages); m_quirks.add(PluginQuirkFlashURLNotifyBug); diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp index df9a29b..b8b2f2f 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.cpp @@ -1,6 +1,7 @@ /* * Copyright (C) 2006, 2007, 2008, 2009, 2010 Apple Inc. All rights reserved. * Copyright (C) 2008 Collabora Ltd. All rights reserved. + * Copyright (C) 2010 Girish Ramakrishnan <girish@forwardbias.in> * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -679,6 +680,12 @@ NPError PluginView::setValue(NPPVariable variable, void* value) } #endif // defined(XP_MACOSX) +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + case NPPVpluginWindowlessLocalBool: + m_renderToImage = true; + return NPERR_NO_ERROR; +#endif + default: notImplemented(); return NPERR_GENERIC_ERROR; @@ -852,6 +859,9 @@ PluginView::PluginView(Frame* parentFrame, const IntSize& size, PluginPackage* p , m_colormap(0) , m_pluginDisplay(0) #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + , m_renderToImage(false) +#endif , m_loadManually(loadManually) , m_manualStream(0) , m_isJavaScriptPaused(false) diff --git a/src/3rdparty/webkit/WebCore/plugins/PluginView.h b/src/3rdparty/webkit/WebCore/plugins/PluginView.h index 51b2127..f346134 100644 --- a/src/3rdparty/webkit/WebCore/plugins/PluginView.h +++ b/src/3rdparty/webkit/WebCore/plugins/PluginView.h @@ -54,6 +54,10 @@ typedef PlatformWidget PlatformPluginWidget; #include <QPixmap> #endif #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +#include <QImage> +class QPainter; +#endif namespace JSC { namespace Bindings { @@ -371,6 +375,12 @@ private: void initXEvent(XEvent* event); #endif +#if PLATFORM(QT) && defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + QImage m_image; + bool m_renderToImage; + void paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect); +#endif + IntRect m_clipRect; // The clip rect to apply to a windowed plug-in IntRect m_windowRect; // Our window rect. diff --git a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp index fb88b87..8dadc11 100644 --- a/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp +++ b/src/3rdparty/webkit/WebCore/plugins/qt/PluginViewQt.cpp @@ -110,12 +110,20 @@ void PluginView::updatePluginWidget() return; if (!m_isWindowed && m_windowRect.size() != oldWindowRect.size()) { - if (m_drawable) - XFreePixmap(QX11Info::display(), m_drawable); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + // On Maemo5, Flash always renders to 16-bit buffer + if (m_renderToImage) + m_image = QImage(m_windowRect.width(), m_windowRect.height(), QImage::Format_RGB16); + else +#endif + { + if (m_drawable) + XFreePixmap(QX11Info::display(), m_drawable); - m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(), - ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth); - QApplication::syncX(); // make sure that the server knows about the Drawable + m_drawable = XCreatePixmap(QX11Info::display(), QX11Info::appRootWindow(), m_windowRect.width(), m_windowRect.height(), + ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth); + QApplication::syncX(); // make sure that the server knows about the Drawable + } } // do not call setNPWindowIfNeeded immediately, will be called on paint() @@ -154,6 +162,71 @@ void PluginView::hide() Widget::hide(); } +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) +void PluginView::paintUsingImageSurfaceExtension(QPainter* painter, const IntRect& exposedRect) +{ + NPImageExpose imageExpose; + QPoint offset; + QWebPageClient* client = m_parentFrame->view()->hostWindow()->platformPageClient(); + const bool surfaceHasUntransformedContents = client && qobject_cast<QWidget*>(client->pluginParent()); + + QPaintDevice* surface = QPainter::redirected(painter->device(), &offset); + + // If the surface is a QImage, we can render directly into it + if (surfaceHasUntransformedContents && surface && surface->devType() == QInternal::Image) { + QImage* image = static_cast<QImage*>(surface); + offset = -offset; // negating the offset gives us the offset of the view within the surface + imageExpose.data = reinterpret_cast<char*>(image->bits()); + imageExpose.dataSize.width = image->width(); + imageExpose.dataSize.height = image->height(); + imageExpose.stride = image->bytesPerLine(); + imageExpose.depth = image->depth(); // this is guaranteed to be 16 on Maemo5 + imageExpose.translateX = offset.x() + m_windowRect.x(); + imageExpose.translateY = offset.y() + m_windowRect.y(); + imageExpose.scaleX = 1; + imageExpose.scaleY = 1; + } else { + if (m_isTransparent) { + // On Maemo5, Flash expects the buffer to contain the contents that are below it. + // We don't support transparency for non-raster graphicssystem, so clean the image + // before giving to Flash. + QPainter imagePainter(&m_image); + imagePainter.fillRect(exposedRect, Qt::white); + } + + imageExpose.data = reinterpret_cast<char*>(m_image.bits()); + imageExpose.dataSize.width = m_image.width(); + imageExpose.dataSize.height = m_image.height(); + imageExpose.stride = m_image.bytesPerLine(); + imageExpose.depth = m_image.depth(); + imageExpose.translateX = 0; + imageExpose.translateY = 0; + imageExpose.scaleX = 1; + imageExpose.scaleY = 1; + } + imageExpose.x = exposedRect.x(); + imageExpose.y = exposedRect.y(); + imageExpose.width = exposedRect.width(); + imageExpose.height = exposedRect.height(); + + XEvent xevent; + memset(&xevent, 0, sizeof(XEvent)); + XGraphicsExposeEvent& exposeEvent = xevent.xgraphicsexpose; + exposeEvent.type = GraphicsExpose; + exposeEvent.display = 0; + exposeEvent.drawable = reinterpret_cast<XID>(&imageExpose); + exposeEvent.x = exposedRect.x(); + exposeEvent.y = exposedRect.y(); + exposeEvent.width = exposedRect.width(); + exposeEvent.height = exposedRect.height(); + + dispatchNPEvent(xevent); + + if (!surfaceHasUntransformedContents || !surface || surface->devType() != QInternal::Image) + painter->drawImage(QPoint(frameRect().x() + exposedRect.x(), frameRect().y() + exposedRect.y()), m_image, exposedRect); +} +#endif + void PluginView::paint(GraphicsContext* context, const IntRect& rect) { if (!m_isStarted) { @@ -166,19 +239,32 @@ void PluginView::paint(GraphicsContext* context, const IntRect& rect) setNPWindowIfNeeded(); - if (m_isWindowed || !m_drawable) + if (m_isWindowed) return; - const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display(); + if (!m_drawable +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + && m_image.isNull() +#endif + ) + return; QPainter* painter = context->platformContext(); IntRect exposedRect(rect); exposedRect.intersect(frameRect()); exposedRect.move(-frameRect().x(), -frameRect().y()); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + if (!m_image.isNull()) { + paintUsingImageSurfaceExtension(painter, exposedRect); + return; + } +#endif + QPixmap qtDrawable = QPixmap::fromX11Pixmap(m_drawable, QPixmap::ExplicitlyShared); const int drawableDepth = ((NPSetWindowCallbackStruct*)m_npWindow.ws_info)->depth; ASSERT(drawableDepth == qtDrawable.depth()); + const bool syncX = m_pluginDisplay && m_pluginDisplay != QX11Info::display(); // When printing, Qt uses a QPicture to capture the output in preview mode. The // QPicture holds a reference to the X Pixmap. As a result, the print preview would @@ -576,6 +662,13 @@ bool PluginView::platformGetValueStatic(NPNVariable variable, void* value, NPErr *result = NPERR_NO_ERROR; return true; +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + case NPNVSupportsWindowlessLocal: + *static_cast<NPBool*>(value) = true; + *result = NPERR_NO_ERROR; + return true; +#endif + default: return false; } @@ -651,7 +744,7 @@ static Display *getPluginDisplay() // support gdk based plugins (like flash) that use a different X connection. // The code below has the same effect as this one: // Display *gdkDisplay = gdk_x11_display_get_xdisplay(gdk_display_get_default()); - QLibrary library("libgdk-x11-2.0"); + QLibrary library("libgdk-x11-2.0.so.0"); if (!library.load()) return 0; 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 diff --git a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h index 665bf1b..63d9e55 100644 --- a/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h +++ b/src/3rdparty/webkit/WebKit/qt/Api/qwebkitglobal.h @@ -22,9 +22,9 @@ #include <QtCore/qglobal.h> -#define QTWEBKIT_VERSION_STR "2.0.0" +#define QTWEBKIT_VERSION_STR "2.0.1" // QTWEBKIT_VERSION is (major << 16) + (minor << 8) + patch. Similar to Qt. -#define QTWEBKIT_VERSION 0x020000 +#define QTWEBKIT_VERSION 0x020001 // Use: #if (QTWEBKIT_VERSION >= QTWEBKIT_VERSION_CHECK(2, 0, 0)). Similar to Qt. #define QTWEBKIT_VERSION_CHECK(major, minor, patch) ((major<<16)|(minor<<8)|(patch)) diff --git a/src/3rdparty/webkit/WebKit/qt/ChangeLog b/src/3rdparty/webkit/WebKit/qt/ChangeLog index 5083ba5..c6c3d72 100644 --- a/src/3rdparty/webkit/WebKit/qt/ChangeLog +++ b/src/3rdparty/webkit/WebKit/qt/ChangeLog @@ -1,3 +1,80 @@ +2010-09-12 Martin Smith <martin.smith@nokia.com> + + Reviewed by Simon Hausmann. + + doc: Changed the title so lists of contents sort better. + + * docs/qtwebkit.qdoc: + +2010-09-12 David Boddie <david.boddie@nokia.com> + + Reviewed by Simon Hausmann. + + Doc: More work on the QML documentation. + + * declarative/qdeclarativewebview.cpp: + +2010-09-12 Martin Jones <martin.jones@nokia.com> + + Reviewed by Simon Hausmann. + + [Qml] Ensure WebView gets focus when an editable node is clicked on. + + Task-number: QTBUG-13342 + + * declarative/qdeclarativewebview.cpp: + (GraphicsWebView::mousePressEvent): + +2010-09-12 David Boddie <david.boddie@nokia.com> + + Reviewed by Simon Hausmann. + + Doc: qdoc fixes. + + * declarative/qdeclarativewebview.cpp: + +2010-09-12 Oswald Buddenhagen <oswald.buddenhagen@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] let WebKit inject itself into the qt configuration + + Task-number: QTBUG-12379 + + * qt_webkit_version.pri: Use the faster + instead of * + operator to add webkit to the config. + +2010-09-12 Martin Smith <martin.smith@nokia.com> + + Reviewed by Simon Hausmann. + + [Qt] Fix group of declarative web view in QML docs. + + * declarative/qdeclarativewebview.cpp: + +2010-08-20 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Ariya Hidayat. + + [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + +2010-08-19 Girish Ramakrishnan <girish@forwardbias.in> + + Reviewed by Kenneth Christiansen. + + [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5 + as Flash XEmbed support is flaky. + + https://bugs.webkit.org/show_bug.cgi?id=44043 + + * WebCoreSupport/FrameLoaderClientQt.cpp: + (WebCore::FrameLoaderClientQt::createPlugin): + 2010-08-05 David Leong <david.leong@nokia.com> Reviewed by Simon Hausmann. diff --git a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp index 713fa39..dcbf614 100644 --- a/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp +++ b/src/3rdparty/webkit/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp @@ -4,7 +4,7 @@ * Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies) * Copyright (C) 2008 Collabora Ltd. All rights reserved. * Coypright (C) 2008 Holger Hans Peter Freyther - * Coypright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in> + * Coypright (C) 2009, 2010 Girish Ramakrishnan <girish@forwardbias.in> * * All rights reserved. * @@ -1349,7 +1349,19 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, Vector<String> values = paramValues; if (mimeType == "application/x-shockwave-flash") { QWebPageClient* client = m_webFrame->page()->d->client; - if (!client || !qobject_cast<QWidget*>(client->pluginParent())) { + const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent()); +#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5) + size_t wmodeIndex = params.find("wmode"); + if (wmodeIndex == -1) { + // Disable XEmbed mode and force it to opaque mode + params.append("wmode"); + values.append("opaque"); + } else if (!isQWebView) { + // Disable transparency if client is not a QWebView + values[wmodeIndex] = "opaque"; + } +#else + if (!isQWebView) { // inject wmode=opaque when there is no client or the client is not a QWebView size_t wmodeIndex = params.find("wmode"); if (wmodeIndex == -1) { @@ -1358,6 +1370,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize, } else values[wmodeIndex] = "opaque"; } +#endif } RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url, diff --git a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri index 4594d1e..f2282f8 100644 --- a/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri +++ b/src/3rdparty/webkit/WebKit/qt/qt_webkit_version.pri @@ -1,5 +1,5 @@ -QT_WEBKIT_VERSION = 4.7.0 +QT_WEBKIT_VERSION = 4.7.1 QT_WEBKIT_MAJOR_VERSION = 4 QT_WEBKIT_MINOR_VERSION = 7 -QT_WEBKIT_PATCH_VERSION = 0 +QT_WEBKIT_PATCH_VERSION = 1 QT_CONFIG += webkit diff --git a/src/corelib/arch/arch.pri b/src/corelib/arch/arch.pri index 57bc80a..971069f 100644 --- a/src/corelib/arch/arch.pri +++ b/src/corelib/arch/arch.pri @@ -21,7 +21,9 @@ vxworks:HEADERS += arch/qatomic_vxworks.h arch/qatomic_generic.h \ arch/qatomic_powerpc.h \ arch/qatomic_arm.h \ + arch/qatomic_armv5.h \ arch/qatomic_armv6.h \ + arch/qatomic_armv7.h \ arch/qatomic_i386.h \ arch/qatomic_mips.h \ arch/qatomic_s390.h \ diff --git a/src/corelib/arch/armv6/arch.pri b/src/corelib/arch/armv6/arch.pri deleted file mode 100644 index fd0cce1..0000000 --- a/src/corelib/arch/armv6/arch.pri +++ /dev/null @@ -1,3 +0,0 @@ -# -# ARMv6 -# diff --git a/src/corelib/arch/qatomic_arm.h b/src/corelib/arch/qatomic_arm.h index 9df02a2..f9d71e9 100644 --- a/src/corelib/arch/qatomic_arm.h +++ b/src/corelib/arch/qatomic_arm.h @@ -44,387 +44,32 @@ QT_BEGIN_HEADER -QT_BEGIN_NAMESPACE - -#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isReferenceCountingNative() -{ return false; } -inline bool QBasicAtomicInt::isReferenceCountingWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isTestAndSetNative() -{ return false; } -inline bool QBasicAtomicInt::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE -#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_WAIT_FREE - -inline bool QBasicAtomicInt::isFetchAndStoreNative() -{ return true; } -inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() -{ return true; } - -#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE - -inline bool QBasicAtomicInt::isFetchAndAddNative() -{ return false; } -inline bool QBasicAtomicInt::isFetchAndAddWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative() -{ return false; } -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree() -{ return false; } - -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE -#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_WAIT_FREE - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative() -{ return true; } -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree() -{ return true; } - -#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative() -{ return false; } -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() -{ return false; } - -#ifndef QT_NO_ARM_EABI - -// kernel places a restartable cmpxchg implementation at a fixed address -extern "C" typedef int (qt_atomic_eabi_cmpxchg_int_t)(int oldval, int newval, volatile int *ptr); -extern "C" typedef int (qt_atomic_eabi_cmpxchg_ptr_t)(void *oldval, void *newval, volatile void *ptr); -#define qt_atomic_eabi_cmpxchg_int (*reinterpret_cast<qt_atomic_eabi_cmpxchg_int_t *>(0xffff0fc0)) -#define qt_atomic_eabi_cmpxchg_ptr (*reinterpret_cast<qt_atomic_eabi_cmpxchg_ptr_t *>(0xffff0fc0)) - -#else - -extern Q_CORE_EXPORT char q_atomic_lock; -Q_CORE_EXPORT void qt_atomic_yield(int *); - -#ifdef Q_CC_RVCT - -Q_CORE_EXPORT __asm char q_atomic_swp(volatile char *ptr, char newval); - -#else - -inline char q_atomic_swp(volatile char *ptr, char newval) -{ - register char ret; - asm volatile("swpb %0,%2,[%3]" - : "=&r"(ret), "=m" (*ptr) - : "r"(newval), "r"(ptr) - : "cc", "memory"); - return ret; -} - -#endif // Q_CC_RVCT - -#endif // QT_NO_ARM_EABI - -// Reference counting - -inline bool QBasicAtomicInt::ref() -{ -#ifndef QT_NO_ARM_EABI - register int originalValue; - register int newValue; - do { - originalValue = _q_value; - newValue = originalValue + 1; - } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); - return newValue != 0; -#else - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - int originalValue = _q_value++; - q_atomic_swp(&q_atomic_lock, 0); - return originalValue != -1; -#endif -} - -inline bool QBasicAtomicInt::deref() -{ -#ifndef QT_NO_ARM_EABI - register int originalValue; - register int newValue; - do { - originalValue = _q_value; - newValue = originalValue - 1; - } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); - return newValue != 0; -#else - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - int originalValue = _q_value--; - q_atomic_swp(&q_atomic_lock, 0); - return originalValue != 1; -#endif -} - -// Test and set for integers - -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) -{ -#ifndef QT_NO_ARM_EABI - register int originalValue; - do { - originalValue = _q_value; - if (originalValue != expectedValue) - return false; - } while (qt_atomic_eabi_cmpxchg_int(expectedValue, newValue, &_q_value) != 0); - return true; -#else - bool returnValue = false; - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - if (_q_value == expectedValue) { - _q_value = newValue; - returnValue = true; - } - q_atomic_swp(&q_atomic_lock, 0); - return returnValue; -#endif -} - -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for integers - -#ifndef Q_CC_RVCT - -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) -{ - int originalValue; - asm volatile("swp %0,%2,[%3]" - : "=&r"(originalValue), "=m" (_q_value) - : "r"(newValue), "r"(&_q_value) - : "cc", "memory"); - return originalValue; -} - -#endif - -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for integers - -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) -{ -#ifndef QT_NO_ARM_EABI - register int originalValue; - register int newValue; - do { - originalValue = _q_value; - newValue = originalValue + valueToAdd; - } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); - return originalValue; -#else - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - int originalValue = _q_value; - _q_value += valueToAdd; - q_atomic_swp(&q_atomic_lock, 0); - return originalValue; -#endif -} - -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -// Test and set for pointers - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) -{ -#ifndef QT_NO_ARM_EABI - register T *originalValue; - do { - originalValue = _q_value; - if (originalValue != expectedValue) - return false; - } while (qt_atomic_eabi_cmpxchg_ptr(expectedValue, newValue, &_q_value) != 0); - return true; +#if defined(__ARM_ARCH_7__) \ + || defined(__ARM_ARCH_7A__) \ + || defined(__ARM_ARCH_7R__) \ + || defined(__ARM_ARCH_7M__) +# define QT_ARCH_ARMV7 +QT_BEGIN_INCLUDE_HEADER +# include "QtCore/qatomic_armv7.h" +QT_END_INCLUDE_HEADER +#elif defined(__ARM_ARCH_6__) \ + || defined(__ARM_ARCH_6J__) \ + || defined(__ARM_ARCH_6T2__) \ + || defined(__ARM_ARCH_6Z__) \ + || defined(__ARM_ARCH_6K__) \ + || defined(__ARM_ARCH_6ZK__) \ + || defined(__ARM_ARCH_6M__) \ + || (__TARGET_ARCH_ARM-0 >= 6) +# define QT_ARCH_ARMV6 +QT_BEGIN_INCLUDE_HEADER +# include "QtCore/qatomic_armv6.h" +QT_END_INCLUDE_HEADER #else - bool returnValue = false; - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - if (_q_value == expectedValue) { - _q_value = newValue; - returnValue = true; - } - q_atomic_swp(&q_atomic_lock, 0); - return returnValue; +# define QT_ARCH_ARMV5 +QT_BEGIN_INCLUDE_HEADER +# include "QtCore/qatomic_armv5.h" +QT_END_INCLUDE_HEADERS #endif -} - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} - -// Fetch and store for pointers - -#ifdef Q_CC_RVCT - -template <typename T> -__asm T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) -{ - add r2, pc, #0 - bx r2 - arm - swp r2,r1,[r0] - mov r0, r2 - bx lr - thumb -} - -#else - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) -{ - T *originalValue; - asm volatile("swp %0,%2,[%3]" - : "=&r"(originalValue), "=m" (_q_value) - : "r"(newValue), "r"(&_q_value) - : "cc", "memory"); - return originalValue; -} - -#endif // Q_CC_RVCT - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) -{ - return fetchAndStoreOrdered(newValue); -} - -// Fetch and add for pointers - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) -{ -#ifndef QT_NO_ARM_EABI - register T *originalValue; - register T *newValue; - do { - originalValue = _q_value; - newValue = originalValue + valueToAdd; - } while (qt_atomic_eabi_cmpxchg_ptr(originalValue, newValue, &_q_value) != 0); - return originalValue; -#else - int count = 0; - while (q_atomic_swp(&q_atomic_lock, ~0) != 0) - qt_atomic_yield(&count); - T *originalValue = (_q_value); - _q_value += valueToAdd; - q_atomic_swp(&q_atomic_lock, 0); - return originalValue; -#endif -} - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd) -{ - return fetchAndAddOrdered(valueToAdd); -} - -QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/arch/qatomic_armv5.h b/src/corelib/arch/qatomic_armv5.h new file mode 100644 index 0000000..ab48380 --- /dev/null +++ b/src/corelib/arch/qatomic_armv5.h @@ -0,0 +1,431 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QATOMIC_ARMV5_H +#define QATOMIC_ARMV5_H + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +#define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isReferenceCountingNative() +{ return false; } +inline bool QBasicAtomicInt::isReferenceCountingWaitFree() +{ return false; } + +#define Q_ATOMIC_INT_TEST_AND_SET_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isTestAndSetNative() +{ return false; } +inline bool QBasicAtomicInt::isTestAndSetWaitFree() +{ return false; } + +#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_ALWAYS_NATIVE +#define Q_ATOMIC_INT_FETCH_AND_STORE_IS_WAIT_FREE + +inline bool QBasicAtomicInt::isFetchAndStoreNative() +{ return true; } +inline bool QBasicAtomicInt::isFetchAndStoreWaitFree() +{ return true; } + +#define Q_ATOMIC_INT_FETCH_AND_ADD_IS_NOT_NATIVE + +inline bool QBasicAtomicInt::isFetchAndAddNative() +{ return false; } +inline bool QBasicAtomicInt::isFetchAndAddWaitFree() +{ return false; } + +#define Q_ATOMIC_POINTER_TEST_AND_SET_IS_NOT_NATIVE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetNative() +{ return false; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isTestAndSetWaitFree() +{ return false; } + +#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_ALWAYS_NATIVE +#define Q_ATOMIC_POINTER_FETCH_AND_STORE_IS_WAIT_FREE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreNative() +{ return true; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndStoreWaitFree() +{ return true; } + +#define Q_ATOMIC_POINTER_FETCH_AND_ADD_IS_NOT_NATIVE + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddNative() +{ return false; } +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() +{ return false; } + +#ifndef QT_NO_ARM_EABI + +// kernel places a restartable cmpxchg implementation at a fixed address +extern "C" typedef int (qt_atomic_eabi_cmpxchg_int_t)(int oldval, int newval, volatile int *ptr); +extern "C" typedef int (qt_atomic_eabi_cmpxchg_ptr_t)(void *oldval, void *newval, volatile void *ptr); +#define qt_atomic_eabi_cmpxchg_int (*reinterpret_cast<qt_atomic_eabi_cmpxchg_int_t *>(0xffff0fc0)) +#define qt_atomic_eabi_cmpxchg_ptr (*reinterpret_cast<qt_atomic_eabi_cmpxchg_ptr_t *>(0xffff0fc0)) + +#else + +extern Q_CORE_EXPORT char q_atomic_lock; +Q_CORE_EXPORT void qt_atomic_yield(int *); + +#ifdef Q_CC_RVCT + +Q_CORE_EXPORT __asm char q_atomic_swp(volatile char *ptr, char newval); + +#else + +inline char q_atomic_swp(volatile char *ptr, char newval) +{ + register char ret; + asm volatile("swpb %0,%2,[%3]" + : "=&r"(ret), "=m" (*ptr) + : "r"(newval), "r"(ptr) + : "cc", "memory"); + return ret; +} + +#endif // Q_CC_RVCT + +#endif // QT_NO_ARM_EABI + +// Reference counting + +inline bool QBasicAtomicInt::ref() +{ +#ifndef QT_NO_ARM_EABI + register int originalValue; + register int newValue; + do { + originalValue = _q_value; + newValue = originalValue + 1; + } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); + return newValue != 0; +#else + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + int originalValue = _q_value++; + q_atomic_swp(&q_atomic_lock, 0); + return originalValue != -1; +#endif +} + +inline bool QBasicAtomicInt::deref() +{ +#ifndef QT_NO_ARM_EABI + register int originalValue; + register int newValue; + do { + originalValue = _q_value; + newValue = originalValue - 1; + } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); + return newValue != 0; +#else + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + int originalValue = _q_value--; + q_atomic_swp(&q_atomic_lock, 0); + return originalValue != 1; +#endif +} + +// Test and set for integers + +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +{ +#ifndef QT_NO_ARM_EABI + register int originalValue; + do { + originalValue = _q_value; + if (originalValue != expectedValue) + return false; + } while (qt_atomic_eabi_cmpxchg_int(expectedValue, newValue, &_q_value) != 0); + return true; +#else + bool returnValue = false; + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + if (_q_value == expectedValue) { + _q_value = newValue; + returnValue = true; + } + q_atomic_swp(&q_atomic_lock, 0); + return returnValue; +#endif +} + +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +// Fetch and store for integers + +#ifndef Q_CC_RVCT + +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +{ + int originalValue; + asm volatile("swp %0,%2,[%3]" + : "=&r"(originalValue), "=m" (_q_value) + : "r"(newValue), "r"(&_q_value) + : "cc", "memory"); + return originalValue; +} + +#endif + +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +// Fetch and add for integers + +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +{ +#ifndef QT_NO_ARM_EABI + register int originalValue; + register int newValue; + do { + originalValue = _q_value; + newValue = originalValue + valueToAdd; + } while (qt_atomic_eabi_cmpxchg_int(originalValue, newValue, &_q_value) != 0); + return originalValue; +#else + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + int originalValue = _q_value; + _q_value += valueToAdd; + q_atomic_swp(&q_atomic_lock, 0); + return originalValue; +#endif +} + +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +// Test and set for pointers + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) +{ +#ifndef QT_NO_ARM_EABI + register T *originalValue; + do { + originalValue = _q_value; + if (originalValue != expectedValue) + return false; + } while (qt_atomic_eabi_cmpxchg_ptr(expectedValue, newValue, &_q_value) != 0); + return true; +#else + bool returnValue = false; + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + if (_q_value == expectedValue) { + _q_value = newValue; + returnValue = true; + } + q_atomic_swp(&q_atomic_lock, 0); + return returnValue; +#endif +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue) +{ + return testAndSetOrdered(expectedValue, newValue); +} + +// Fetch and store for pointers + +#ifdef Q_CC_RVCT + +template <typename T> +__asm T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) +{ + add r2, pc, #0 + bx r2 + arm + swp r2,r1,[r0] + mov r0, r2 + bx lr + thumb +} + +#else + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) +{ + T *originalValue; + asm volatile("swp %0,%2,[%3]" + : "=&r"(originalValue), "=m" (_q_value) + : "r"(newValue), "r"(&_q_value) + : "cc", "memory"); + return originalValue; +} + +#endif // Q_CC_RVCT + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) +{ + return fetchAndStoreOrdered(newValue); +} + +// Fetch and add for pointers + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) +{ +#ifndef QT_NO_ARM_EABI + register T *originalValue; + register T *newValue; + do { + originalValue = _q_value; + newValue = originalValue + valueToAdd; + } while (qt_atomic_eabi_cmpxchg_ptr(originalValue, newValue, &_q_value) != 0); + return originalValue; +#else + int count = 0; + while (q_atomic_swp(&q_atomic_lock, ~0) != 0) + qt_atomic_yield(&count); + T *originalValue = (_q_value); + _q_value += valueToAdd; + q_atomic_swp(&q_atomic_lock, 0); + return originalValue; +#endif +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd) +{ + return fetchAndAddOrdered(valueToAdd); +} + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QATOMIC_ARMV5_H diff --git a/src/corelib/arch/qatomic_armv6.h b/src/corelib/arch/qatomic_armv6.h index 38b7069..1aa3b88 100644 --- a/src/corelib/arch/qatomic_armv6.h +++ b/src/corelib/arch/qatomic_armv6.h @@ -45,6 +45,7 @@ QT_BEGIN_HEADER QT_BEGIN_NAMESPACE + #define Q_ATOMIC_INT_REFERENCE_COUNTING_IS_ALWAYS_NATIVE inline bool QBasicAtomicInt::isReferenceCountingNative() @@ -102,6 +103,13 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::isFetchAndAddWaitFree() #ifndef Q_CC_RVCT +#ifndef Q_DATA_MEMORY_BARRIER +# define Q_DATA_MEMORY_BARRIER asm volatile("":::"memory") +#endif +#ifndef Q_COMPILER_MEMORY_BARRIER +# define Q_COMPILER_MEMORY_BARRIER asm volatile("":::"memory") +#endif + inline bool QBasicAtomicInt::ref() { register int newValue; @@ -138,7 +146,7 @@ inline bool QBasicAtomicInt::deref() return newValue != 0; } -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) { register int result; asm volatile("0:\n" @@ -152,11 +160,11 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) : [expectedValue] "r" (expectedValue), [newValue] "r" (newValue), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return result == 0; } -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) { register int originalValue; register int result; @@ -170,11 +178,11 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) "+m" (_q_value) : [newValue] "r" (newValue), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return originalValue; } -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) { register int originalValue; register int newValue; @@ -191,12 +199,12 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) "+m" (_q_value) : [valueToAdd] "r" (valueToAdd), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return originalValue; } template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) { register T *result; asm volatile("0:\n" @@ -210,12 +218,12 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu : [expectedValue] "r" (expectedValue), [newValue] "r" (newValue), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return result == 0; } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) { register T *originalValue; register int result; @@ -229,12 +237,12 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) "+m" (_q_value) : [newValue] "r" (newValue), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return originalValue; } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) { register T *originalValue; register T *newValue; @@ -251,7 +259,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo "+m" (_q_value) : [valueToAdd] "r" (valueToAdd * sizeof(T)), [_q_value] "r" (&_q_value) - : "cc", "memory"); + : "cc"); return originalValue; } @@ -263,9 +271,18 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo // RVCT embedded assembly documentation: // http://www.keil.com/support/man/docs/armcc/armcc_chddbeib.htm -// save our pragma state and switch to ARM mode -#pragma push -#pragma arm +#if __TARGET_ARCH_THUMB-0 < 4 +// save our pragma state and switch to ARM mode (unless using Thumb2) +# pragma push +# pragma arm +#endif + +#ifndef Q_DATA_MEMORY_BARRIER +# define Q_DATA_MEMORY_BARRIER __schedule_barrier() +#endif +#ifndef Q_COMPILER_MEMORY_BARRIER +# define Q_COMPILER_MEMORY_BARRIER __schedule_barrier() +#endif inline bool QBasicAtomicInt::ref() { @@ -297,7 +314,7 @@ inline bool QBasicAtomicInt::deref() return newValue != 0; } -inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) +inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) { register int result; retry: @@ -311,7 +328,7 @@ inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) return result == 0; } -inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) +inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) { register int originalValue; register int result; @@ -325,7 +342,7 @@ inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) return originalValue; } -inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) +inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) { register int originalValue; register int newValue; @@ -342,7 +359,7 @@ inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) } template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) { register T *result; retry: @@ -357,7 +374,7 @@ Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValu } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) { register T *originalValue; register int result; @@ -372,7 +389,7 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) { register T *originalValue; register T *newValue; @@ -388,111 +405,153 @@ Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueTo return originalValue; } -// go back to the previous pragma state (probably Thumb mode) -#pragma pop +#if __TARGET_ARCH_THUMB-0 < 4 +# pragma pop #endif -// common code +#endif -inline bool QBasicAtomicInt::testAndSetRelaxed(int expectedValue, int newValue) -{ - return testAndSetOrdered(expectedValue, newValue); -} +// common code inline bool QBasicAtomicInt::testAndSetAcquire(int expectedValue, int newValue) { - return testAndSetOrdered(expectedValue, newValue); + bool returnValue = testAndSetRelaxed(expectedValue, newValue); + Q_DATA_MEMORY_BARRIER; + return returnValue; } inline bool QBasicAtomicInt::testAndSetRelease(int expectedValue, int newValue) { - return testAndSetOrdered(expectedValue, newValue); + Q_DATA_MEMORY_BARRIER; + return testAndSetRelaxed(expectedValue, newValue); } -inline int QBasicAtomicInt::fetchAndStoreRelaxed(int newValue) +inline bool QBasicAtomicInt::testAndSetOrdered(int expectedValue, int newValue) { - return fetchAndStoreOrdered(newValue); + Q_DATA_MEMORY_BARRIER; + bool returnValue = testAndSetRelaxed(expectedValue, newValue); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; } inline int QBasicAtomicInt::fetchAndStoreAcquire(int newValue) { - return fetchAndStoreOrdered(newValue); + int returnValue = fetchAndStoreRelaxed(newValue); + Q_DATA_MEMORY_BARRIER; + return returnValue; } inline int QBasicAtomicInt::fetchAndStoreRelease(int newValue) { - return fetchAndStoreOrdered(newValue); + Q_DATA_MEMORY_BARRIER; + return fetchAndStoreRelaxed(newValue); } -inline int QBasicAtomicInt::fetchAndAddRelaxed(int valueToAdd) +inline int QBasicAtomicInt::fetchAndStoreOrdered(int newValue) { - return fetchAndAddOrdered(valueToAdd); + Q_DATA_MEMORY_BARRIER; + int returnValue = fetchAndStoreRelaxed(newValue); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; } + inline int QBasicAtomicInt::fetchAndAddAcquire(int valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + int returnValue = fetchAndAddRelaxed(valueToAdd); + Q_DATA_MEMORY_BARRIER; + return returnValue; } inline int QBasicAtomicInt::fetchAndAddRelease(int valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + Q_DATA_MEMORY_BARRIER; + return fetchAndAddRelaxed(valueToAdd); } -template <typename T> -Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelaxed(T *expectedValue, T *newValue) +inline int QBasicAtomicInt::fetchAndAddOrdered(int valueToAdd) { - return testAndSetOrdered(expectedValue, newValue); + Q_DATA_MEMORY_BARRIER; + int returnValue = fetchAndAddRelaxed(valueToAdd); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetAcquire(T *expectedValue, T *newValue) { - return testAndSetOrdered(expectedValue, newValue); + bool returnValue = testAndSetRelaxed(expectedValue, newValue); + Q_DATA_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetRelease(T *expectedValue, T *newValue) { - return testAndSetOrdered(expectedValue, newValue); + Q_DATA_MEMORY_BARRIER; + return testAndSetRelaxed(expectedValue, newValue); } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelaxed(T *newValue) +Q_INLINE_TEMPLATE bool QBasicAtomicPointer<T>::testAndSetOrdered(T *expectedValue, T *newValue) { - return fetchAndStoreOrdered(newValue); + Q_DATA_MEMORY_BARRIER; + bool returnValue = testAndSetAcquire(expectedValue, newValue); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreAcquire(T *newValue) { - return fetchAndStoreOrdered(newValue); + T *returnValue = fetchAndStoreRelaxed(newValue); + Q_DATA_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreRelease(T *newValue) { - return fetchAndStoreOrdered(newValue); + Q_DATA_MEMORY_BARRIER; + return fetchAndStoreRelaxed(newValue); } template <typename T> -Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelaxed(qptrdiff valueToAdd) +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndStoreOrdered(T *newValue) { - return fetchAndAddOrdered(valueToAdd); + Q_DATA_MEMORY_BARRIER; + T *returnValue = fetchAndStoreRelaxed(newValue); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddAcquire(qptrdiff valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + T *returnValue = fetchAndAddRelaxed(valueToAdd); + Q_DATA_MEMORY_BARRIER; + return returnValue; } template <typename T> Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddRelease(qptrdiff valueToAdd) { - return fetchAndAddOrdered(valueToAdd); + Q_DATA_MEMORY_BARRIER; + return fetchAndAddRelaxed(valueToAdd); } +template <typename T> +Q_INLINE_TEMPLATE T *QBasicAtomicPointer<T>::fetchAndAddOrdered(qptrdiff valueToAdd) +{ + Q_DATA_MEMORY_BARRIER; + T *returnValue = fetchAndAddRelaxed(valueToAdd); + Q_COMPILER_MEMORY_BARRIER; + return returnValue; +} + +#undef Q_DATA_MEMORY_BARRIER +#undef Q_COMPILER_MEMORY_BARRIER + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/corelib/arch/qatomic_armv7.h b/src/corelib/arch/qatomic_armv7.h new file mode 100644 index 0000000..a95c4ea --- /dev/null +++ b/src/corelib/arch/qatomic_armv7.h @@ -0,0 +1,61 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the QtCore module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef QATOMIC_ARMV7_H +#define QATOMIC_ARMV7_H + +QT_BEGIN_HEADER + +// use the DMB instruction when compiling for ARMv7, ... +#ifndef Q_CC_RCVT +# define Q_DATA_MEMORY_BARRIER asm volatile("dmb\n":::"memory") +#else +# define Q_DATA_MEMORY_BARRIER do{__asm { dmb } __schedule_barrier();}while(0) +#endif + +// ... but the implementation is otherwise identical to that for ARMv6 +QT_BEGIN_INCLUDE_HEADER +#include "QtCore/qatomic_armv6.h" +QT_END_INCLUDE_HEADER + +QT_END_HEADER + +#endif // QATOMIC_ARMV7_H diff --git a/src/corelib/arch/symbian/arch.pri b/src/corelib/arch/symbian/arch.pri index 3ef1c9e..84a4984 100644 --- a/src/corelib/arch/symbian/arch.pri +++ b/src/corelib/arch/symbian/arch.pri @@ -2,4 +2,4 @@ # Symbian architecture # SOURCES += $$QT_ARCH_CPP/qatomic_symbian.cpp \ - $$QT_ARCH_CPP/../armv6/qatomic_generic_armv6.cpp + $$QT_ARCH_CPP/qatomic_generic_armv6.cpp diff --git a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp b/src/corelib/arch/symbian/qatomic_generic_armv6.cpp index 39d966a..39d966a 100644 --- a/src/corelib/arch/armv6/qatomic_generic_armv6.cpp +++ b/src/corelib/arch/symbian/qatomic_generic_armv6.cpp diff --git a/src/corelib/codecs/qtextcodec_symbian.cpp b/src/corelib/codecs/qtextcodec_symbian.cpp index 20e0cfc..9d7e856 100644 --- a/src/corelib/codecs/qtextcodec_symbian.cpp +++ b/src/corelib/codecs/qtextcodec_symbian.cpp @@ -59,8 +59,8 @@ struct QSymbianCodecInitData { It is ordered by charsetId to allow binary search lookup */ static const QSymbianCodecInitData codecsData[] = { - { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0MS_KANJI\0SJIS\0" }, - { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, + { /*268439485*/ KCharacterSetIdentifierShiftJis, 17, "Shift_JIS\0MS_Kanji\0csShiftJIS\0SJIS\0" }, + { /*268439486*/ KCharacterSetIdentifierGb2312, 57, "GB2312\0csGB2312\0CN-GB\0EUC-CN\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instaead of 57 { /*268439487*/ KCharacterSetIdentifierBig5, 2026, "Big5\0csBig5\0Big5-ETen\0CP950\0BIG-FIVE\0CN-BIG5\0" }, { /*268440246*/ KCharacterSetIdentifierCodePage1252, 2252, "windows-1252\0Code Page 1252\0CP1252\0MS-ANSI\0" }, // { /*268450576*/ KCharacterSetIdentifierIso88591, 4, "ISO-8859-1\0ISO_8859-1:1987\0iso-ir-100\0ISO_8859-1\0latin1\0l1\0IBM819\0CP819\0csISOLatin1\0ISO-IR-100\0ISO8859-1\0L1\0LATIN1\0CSISOLATIN1\0" }, @@ -110,15 +110,20 @@ static const QSymbianCodecInitData codecsData[] = { { /*270562232*/ 270562232, 2258, "Windows-1258\0CP1258\0WINDOWS-1258\0" }, { /*270586888*/ 270586888, 0, "J5\0" }, { /*271011982*/ 271011982, 0, "ISCII\0" }, - { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, + { /*271066541*/ 271066541, 2009, "CP850\0IBM850\0""850\0csPC850Multilingual\0" }, // Note: ConvertCharacterSetIdentifierToMibEnumL returns Mib 0 instead of 2009 { /*271082493*/ 271082493, 0, "EXTENDED_SMS_7BIT\0" }, { /*271082494*/ 271082494, 0, "gsm7_turkish_single\0" }, { /*271082495*/ 271082495, 0, "turkish_locking_gsm7ext\0" }, { /*271082496*/ 271082496, 0, "turkish_locking_single\0" }, + { /*271082503*/ 271082503, 0, "portuguese_gsm7_single\0" }, + { /*271082504*/ 271082504, 0, "portuguese_locking_gsm7ext\0" }, + { /*271082505*/ 271082505, 0, "portuguese_locking_single\0" }, + { /*271082506*/ 271082506, 0, "spanish_gsm7_single\0" }, + { /*271085624*/ 271085624, 114, "GB18030\0" }, { /*536929574*/ 536929574, 38, "EUC-KR\0" }, { /*536936703*/ 536936703, 0, "CP949\0" }, - { /*536936705*/ 536936705, 37, "ISO-2022-KR\0" }, - { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0" } + { /*536936705*/ 536936705, 37, "ISO-2022-KR\0csISO2022KR\0" }, + { /*536941517*/ 536941517, 36, "KS_C_5601-1987\0iso-ir-149\0KS_C_5601-1989\0KSC_5601\0Korean\0csKSC56011987\0" } }; @@ -659,6 +664,10 @@ QSymbianTextCodec *QSymbianTextCodec::init() if (charsetId == localeMapperId) localeMapper = c; } else { + // We did not find the charsetId in our codecsData[], therefore we ask + // the OS for the codec name. We first try to get a "standard name" and fall + // back to array->At(i).Name(), if really needed. array->At(i).Name() is not + // guaranteed to be a correct name for QTextCodec::codecFromName(). QScopedPointer<HBufC8> buf; QT_TRAP_THROWING(buf.reset(converter->ConvertCharacterSetIdentifierToStandardNameL(charsetId, qt_s60GetRFs()))) QByteArray name; diff --git a/src/corelib/concurrent/qthreadpool.cpp b/src/corelib/concurrent/qthreadpool.cpp index f25a494..265de33 100644 --- a/src/corelib/concurrent/qthreadpool.cpp +++ b/src/corelib/concurrent/qthreadpool.cpp @@ -250,6 +250,7 @@ bool QThreadPoolPrivate::tooManyThreadsActive() const void QThreadPoolPrivate::startThread(QRunnable *runnable) { QScopedPointer <QThreadPoolThread> thread(new QThreadPoolThread(this)); + thread->setObjectName(QLatin1String("Thread (pooled)")); allThreads.insert(thread.data()); ++activeThreads; diff --git a/src/corelib/global/qglobal.h b/src/corelib/global/qglobal.h index 74bb309..1bf2dd3 100644 --- a/src/corelib/global/qglobal.h +++ b/src/corelib/global/qglobal.h @@ -402,6 +402,19 @@ namespace QT_NAMESPACE {} # undef QT_HAVE_3DNOW # endif +#if defined(Q_CC_MSVC) && _MSC_VER >= 1600 +# define Q_COMPILER_RVALUE_REFS +# define Q_COMPILER_INITIALIZER_LISTS +# define Q_COMPILER_AUTO_TYPE +# define Q_COMPILER_LAMBDA +//# define Q_COMPILER_VARIADIC_TEMPLATES +//# define Q_COMPILER_CLASS_ENUM +//# define Q_COMPILER_DEFAULT_DELETE_MEMBERS +//# define Q_COMPILER_UNICODE_STRINGS +//# define Q_COMPILER_EXTERN_TEMPLATES +# endif + + #elif defined(__BORLANDC__) || defined(__TURBOC__) # define Q_CC_BOR # define Q_INLINE_TEMPLATE diff --git a/src/corelib/global/qlibraryinfo.cpp b/src/corelib/global/qlibraryinfo.cpp index 957abbf..d493390 100644 --- a/src/corelib/global/qlibraryinfo.cpp +++ b/src/corelib/global/qlibraryinfo.cpp @@ -517,6 +517,9 @@ void qt_core_boilerplate() #ifdef QT_BUILD_KEY_COMPAT2 "| " QT_BUILD_KEY_COMPAT2 " " #endif +#ifdef QT_BUILD_KEY_COMPAT3 + "| " QT_BUILD_KEY_COMPAT3 " " +#endif "|\n" "Build date: %s\n" "Installation prefix: %s\n" diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h index bb41073..3ed6291 100644 --- a/src/corelib/global/qnamespace.h +++ b/src/corelib/global/qnamespace.h @@ -92,6 +92,7 @@ Qt { Q_ENUMS(ConnectionType) #ifndef QT_NO_GESTURES Q_ENUMS(GestureState) + Q_ENUMS(GestureType) #endif #endif // (defined(Q_MOC_RUN) || defined(QT_JAMBI_RUN)) diff --git a/src/corelib/global/qnumeric.cpp b/src/corelib/global/qnumeric.cpp index 75fd31e..7ddb9e2 100644 --- a/src/corelib/global/qnumeric.cpp +++ b/src/corelib/global/qnumeric.cpp @@ -44,14 +44,49 @@ QT_BEGIN_NAMESPACE +/*! + Returns true if the double \a {d} is equivalent to infinity. +*/ Q_CORE_EXPORT bool qIsInf(double d) { return qt_is_inf(d); } + +/*! + Returns true if the double \a {d} is not a number (NaN). +*/ Q_CORE_EXPORT bool qIsNaN(double d) { return qt_is_nan(d); } + +/*! + Returns true if the double \a {d} is a finite number. +*/ Q_CORE_EXPORT bool qIsFinite(double d) { return qt_is_finite(d); } + +/*! + Returns true if the float \a {f} is equivalent to infinity. +*/ Q_CORE_EXPORT bool qIsInf(float f) { return qt_is_inf(f); } + +/*! + Returns true if the float \a {f} is not a number (NaN). +*/ Q_CORE_EXPORT bool qIsNaN(float f) { return qt_is_nan(f); } + +/*! + Returns true if the float \a {f} is a finite number. +*/ Q_CORE_EXPORT bool qIsFinite(float f) { return qt_is_finite(f); } + +/*! + Returns the bit pattern of a signalling NaN as a double. +*/ Q_CORE_EXPORT double qSNaN() { return qt_snan(); } + +/*! + Returns the bit pattern of a quiet NaN as a double. +*/ Q_CORE_EXPORT double qQNaN() { return qt_qnan(); } + +/*! + Returns the bit pattern for an infinite number as a double. +*/ Q_CORE_EXPORT double qInf() { return qt_inf(); } diff --git a/src/corelib/io/qdir.cpp b/src/corelib/io/qdir.cpp index f6f4b19..426f61e 100644 --- a/src/corelib/io/qdir.cpp +++ b/src/corelib/io/qdir.cpp @@ -1552,10 +1552,11 @@ bool QDir::makeAbsolute() // ### What do the return values signify? QScopedPointer<QDirPrivate> dir(new QDirPrivate(*d_ptr.constData())); dir->setPath(absolutePath); - if (!(dir->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) + d_ptr = dir.take(); + + if (!(d_ptr->fileEngine->fileFlags(QAbstractFileEngine::TypesMask) & QAbstractFileEngine::DirectoryType)) return false; - d_ptr = dir.take(); return true; } diff --git a/src/corelib/io/qsettings_win.cpp b/src/corelib/io/qsettings_win.cpp index de96e06..b3fe734 100644 --- a/src/corelib/io/qsettings_win.cpp +++ b/src/corelib/io/qsettings_win.cpp @@ -535,6 +535,15 @@ bool QWinSettingsPrivate::readKey(HKEY parentHandle, const QString &rSubKey, QVa break; } + case REG_QWORD: { + Q_ASSERT(data.size() == sizeof(qint64)); + qint64 i; + memcpy((char*)&i, data.constData(), sizeof(qint64)); + if (value != 0) + *value = i; + break; + } + default: qWarning("QSettings: Unknown data %d type in Windows registry", static_cast<int>(dataType)); if (value != 0) @@ -683,10 +692,19 @@ void QWinSettingsPrivate::set(const QString &uKey, const QVariant &value) break; } - case QVariant::Int: { + case QVariant::Int: + case QVariant::UInt: { type = REG_DWORD; - int i = value.toInt(); - regValueBuff = QByteArray((const char*)&i, sizeof(int)); + qint32 i = value.toInt(); + regValueBuff = QByteArray((const char*)&i, sizeof(qint32)); + break; + } + + case QVariant::LongLong: + case QVariant::ULongLong: { + type = REG_QWORD; + qint64 i = value.toLongLong(); + regValueBuff = QByteArray((const char*)&i, sizeof(qint64)); break; } diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index b320624..6452c0f 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" @@ -3464,9 +3463,8 @@ QString QUrlPrivate::canonicalHost() const that->host = host.toLower(); } else { that->host = qt_ACE_do(host, NormalizeAce); - if (that->host.isNull()) - that->isHostValid = false; } + that->isHostValid = !that->host.isNull(); return that->host; } @@ -3781,6 +3779,10 @@ void QUrlPrivate::validate() const QString auth = authority(); // causes the non-encoded forms to be valid + // authority() calls canonicalHost() which sets this + if (!isHostValid) + return; + if (scheme == QLatin1String("mailto")) { if (!host.isEmpty() || port != -1 || !userName.isEmpty() || !password.isEmpty()) { that->isValid = false; @@ -3954,9 +3956,10 @@ QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const url += scheme.toLatin1(); url += ':'; } + QString savedHost = host; // pre-validation, may be invalid! QString auth = authority(); bool doFileScheme = scheme == QLatin1String("file") && encodedPath.startsWith('/'); - if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority && (!auth.isEmpty() || doFileScheme)) { + if ((options & QUrl::RemoveAuthority) != QUrl::RemoveAuthority && (!auth.isEmpty() || doFileScheme || !savedHost.isEmpty())) { if (doFileScheme && !encodedPath.startsWith('/')) url += '/'; url += "//"; @@ -3982,6 +3985,12 @@ QByteArray QUrlPrivate::toEncoded(QUrl::FormattingOptions options) const url += '['; url += host.toLatin1(); url += ']'; + } else if (host.isEmpty() && !savedHost.isEmpty()) { + // this case is only possible with an invalid URL + // it's here only so that we can keep the original, invalid hostname + // in encodedOriginal. + // QUrl::isValid() will return false, so toEncoded() can be anything (it's not valid) + url += savedHost.toUtf8(); } else { url += QUrl::toAce(host); } @@ -4101,7 +4110,7 @@ const QByteArray &QUrlPrivate::normalized() const QString QUrlPrivate::createErrorString() { - if (isValid) + if (isValid && isHostValid) return QString(); QString errorString(QLatin1String(QT_TRANSLATE_NOOP(QUrl, "Invalid URL \""))); @@ -4125,7 +4134,10 @@ QString QUrlPrivate::createErrorString() errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, "\'")); } else { errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ": ")); - errorString += QLatin1String(errorInfo._message); + if (isHostValid) + errorString += QLatin1String(errorInfo._message); + else + errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, "invalid hostname")); } if (errorInfo._found) { errorString += QLatin1String(QT_TRANSLATE_NOOP(QUrl, ", but found \'")); @@ -4488,7 +4500,7 @@ void QUrl::setAuthority(const QString &authority) if (!QURL_HASFLAG(d->stateFlags, QUrlPrivate::Parsed)) d->parse(); detach(); - QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized); + QURL_UNSETFLAG(d->stateFlags, QUrlPrivate::Validated | QUrlPrivate::Normalized | QUrlPrivate::HostCanonicalized); d->setAuthority(authority); } diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp index ad645e3..e967884 100644 --- a/src/corelib/kernel/qcoreapplication.cpp +++ b/src/corelib/kernel/qcoreapplication.cpp @@ -2115,7 +2115,8 @@ QStringList QCoreApplication::arguments() l1arg == "-stylesheet" || l1arg == "-widgetcount") ; - else if (l1arg.startsWith("-style=")) + else if (l1arg.startsWith("-style=") || + l1arg.startsWith("-qmljsdebugger=")) ; else if (l1arg == "-style" || l1arg == "-session" || diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index 72f3c0e..b2b9806 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -557,18 +557,22 @@ int QTimerInfoList::activateTimers() if (qt_disable_lowpriority_timers || isEmpty()) return 0; // nothing to do - bool firstTime = true; - timeval currentTime; - int n_act = 0, maxCount = count(); + int n_act = 0, maxCount = 0; firstTimerInfo = 0; - while (maxCount--) { - currentTime = updateCurrentTime(); - if (firstTime) { - repairTimersIfNeeded(); - firstTime = false; - } + timeval currentTime = updateCurrentTime(); + repairTimersIfNeeded(); + + // Find out how many timer have expired + for (QTimerInfoList::const_iterator it = constBegin(); it != constEnd(); ++it) { + if (currentTime < (*it)->timeout) + break; + maxCount++; + } + + //fire the timers. + while (maxCount--) { if (isEmpty()) break; diff --git a/src/corelib/kernel/qmath.qdoc b/src/corelib/kernel/qmath.qdoc new file mode 100644 index 0000000..48f74b6 --- /dev/null +++ b/src/corelib/kernel/qmath.qdoc @@ -0,0 +1,155 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:FDL$ +** Commercial Usage +** Licensees holding valid Qt Commercial licenses may use this file in +** accordance with the Qt Commercial License Agreement provided with the +** Software or, alternatively, in accordance with the terms contained in a +** written agreement between you and Nokia. +** +** GNU Free Documentation License +** Alternatively, this file may be used under the terms of the GNU Free +** Documentation License version 1.3 as published by the Free Software +** Foundation and appearing in the file included in the packaging of this +** file. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** $QT_END_LICENSE$ +** +****************************************************************************/ + +/*! + \headerfile <QtCore/qmath.h> + \title Math Functions + \ingroup funclists + \brief The <QtCore/qmath.h> header provides various math functions. + \pagekeywords math trigonometry qmath floor ceiling absolute sine cosine tangent inverse tan exponent power natural logarithm +*/ + +/*! + \fn int qCeil(qreal v) + Return the ceiling of the value \a v. + + The ceiling is the smallest integer that is not less than \a v. + For example, if \a v is 41.2, then the ceiling is 42. + + \relates <QtCore/qmath.h> + \sa qFloor() +*/ + +/*! + \fn int qFloor(qreal v) + Return the floor of the value \a v. + + The floor is the largest integer that is not greater than \a v. + For example, if \a v is 41.2, then the floor is 41. + + \relates <QtCore/qmath.h> + \sa qCeil() +*/ + +/*! + \fn qreal qFabs(qreal v) + Returns the absolute value of \a v as a qreal. +*/ + +/*! + \fn qreal qSin(qreal v) + Returns the sine of the angle \a v in radians. + + \relates <QtCore/qmath.h> + \sa qCos(), qTan() +*/ + +/*! + \fn qreal qCos(qreal v) + Returns the cosine of an angle \a v in radians. + + \relates <QtCore/qmath.h> + \sa qSin(), qTan() +*/ + +/*! + \fn qreal qTan(qreal v) + Returns the tangent of an angle \a v in radians. + + \relates <QtCore/qmath.h> + \sa qSin(), qCos() +*/ + +/*! + \fn qreal qAcos(qreal v) + Returns the arccosine of \a v as an angle in radians. + Arccosine is the inverse operation of cosine. + + \relates <QtCore/qmath.h> + \sa qAtan(), qAsin(), qCos() +*/ + +/*! + \fn qreal qAsin(qreal v) + Returns the arcsine of \a v as an angle in radians. + Arcsine is the inverse operation of sine. + + \relates <QtCore/qmath.h> + \sa qSin(), qAtan(), qAcos() +*/ + +/*! + \fn qreal qAtan(qreal v) + Returns the arctangent of \a v as an angle in radians. + Arctangent is the inverse operation of tangent. + + \relates <QtCore/qmath.h> + \sa qTan(), qAcos(), qAsin() +*/ + +/*! + \fn qreal qAtan2(qreal x, qreal y) + Returns the arctangent of a point specified by the coordinates \a x and \a y. + This function will return the angle and its direction. + + \relates <QtCore/qmath.h> + \sa qAtan() +*/ + +/*! + \fn qreal qSqrt(qreal v) + Returns the square root of \a v. + This function returns a NaN if \a v is a negative number. + + \relates <QtCore/qmath.h> + \sa qPow() +*/ + +/*! + \fn qreal qLn(qreal v) + Returns the natural logarithm of \a v. Natural logarithm uses base e. + + \relates <QtCore/qmath.h> + \sa qExp() +*/ + +/*! + \fn qreal qExp(qreal v) + Returns the exponential function of \c e to the power of \a v. + + \relates <QtCore/qmath.h> + \sa qLn() +*/ + +/*! + \fn qreal qPow(qreal x, qreal y) + Returns the value of \a x raised to the power of \a y. + That is, \a x is the base and \a y is the exponent. + + \relates <QtCore/qmath.h> + \sa qSqrt() +*/ diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index a70772f..ceb2a9c 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -266,7 +266,25 @@ QObject *QMetaObject::cast(QObject *obj) const const QMetaObject *m = obj->metaObject(); do { if (m == this) - return const_cast<QObject*>(obj); + return obj; + } while ((m = m->d.superdata)); + } + return 0; +} + +/*! + \internal + + Returns \a obj if object \a obj inherits from this + meta-object; otherwise returns 0. +*/ +const QObject *QMetaObject::cast(const QObject *obj) const +{ + if (obj) { + const QMetaObject *m = obj->metaObject(); + do { + if (m == this) + return obj; } while ((m = m->d.superdata)); } return 0; diff --git a/src/corelib/kernel/qmetatype.h b/src/corelib/kernel/qmetatype.h index 52efcd0..eebb3db 100644 --- a/src/corelib/kernel/qmetatype.h +++ b/src/corelib/kernel/qmetatype.h @@ -156,7 +156,18 @@ void qMetaTypeLoadHelper(QDataStream &stream, T *t) } #endif // QT_NO_DATASTREAM -template <typename T> struct QMetaTypeId2; +template <typename T> +struct QMetaTypeId +{ + enum { Defined = 0 }; +}; + +template <typename T> +struct QMetaTypeId2 +{ + enum { Defined = QMetaTypeId<T>::Defined }; + static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); } +}; namespace QtPrivate { template <typename T, bool Defined = QMetaTypeId2<T>::Defined> @@ -210,19 +221,6 @@ void qRegisterMetaTypeStreamOperators(const char *typeName #endif // QT_NO_DATASTREAM template <typename T> -struct QMetaTypeId -{ - enum { Defined = 0 }; -}; - -template <typename T> -struct QMetaTypeId2 -{ - enum { Defined = QMetaTypeId<T>::Defined }; - static inline int qt_metatype_id() { return QMetaTypeId<T>::qt_metatype_id(); } -}; - -template <typename T> inline int qMetaTypeId( #ifndef qdoc T * /* dummy */ = 0 diff --git a/src/corelib/kernel/qobject.h b/src/corelib/kernel/qobject.h index b5db936..63fdf76 100644 --- a/src/corelib/kernel/qobject.h +++ b/src/corelib/kernel/qobject.h @@ -351,7 +351,7 @@ inline QT_DEPRECATED T qFindChild(const QObject *o, const QString &name = QStrin { return o->findChild<T>(name); } template<typename T> -inline QList<T> qFindChildren(const QObject *o, const QString &name = QString()) +inline QT_DEPRECATED QList<T> qFindChildren(const QObject *o, const QString &name = QString()) { return o->findChildren<T>(name); } @@ -378,14 +378,10 @@ inline T qobject_cast(QObject *object) template <class T> inline T qobject_cast(const QObject *object) { - // this will cause a compilation error if T is not const - register T ptr = static_cast<T>(object); - Q_UNUSED(ptr); - #if !defined(QT_NO_QOBJECT_CHECK) reinterpret_cast<T>(0)->qt_check_for_QOBJECT_macro(*reinterpret_cast<T>(const_cast<QObject *>(object))); #endif - return static_cast<T>(const_cast<QObject *>(reinterpret_cast<T>(0)->staticMetaObject.cast(const_cast<QObject *>(object)))); + return static_cast<T>(reinterpret_cast<T>(0)->staticMetaObject.cast(object)); } diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 996fce2..db46ba5 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -298,6 +298,7 @@ struct Q_CORE_EXPORT QMetaObject const QMetaObject *superClass() const; QObject *cast(QObject *obj) const; + const QObject *cast(const QObject *obj) const; #ifndef QT_NO_TRANSLATION // ### Qt 4: Merge overloads diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp index 5cd0220..fbfb961 100644 --- a/src/corelib/kernel/qpointer.cpp +++ b/src/corelib/kernel/qpointer.cpp @@ -41,7 +41,7 @@ /*! \class QPointer - \brief The QPointer class is a template class that provides guarded pointers to QObjects. + \brief The QPointer class is a template class that provides guarded pointers to QObject. \ingroup objectmodel diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp index 62d565a..a26dcd8 100644 --- a/src/corelib/plugin/qfactoryloader.cpp +++ b/src/corelib/plugin/qfactoryloader.cpp @@ -244,6 +244,14 @@ QObject *QFactoryLoader::instance(const QString &key) const return 0; } +#ifdef Q_WS_X11 +QLibraryPrivate *QFactoryLoader::library(const QString &key) const +{ + Q_D(const QFactoryLoader); + return d->keyMap.value(d->cs ? key : key.toLower()); +} +#endif + void QFactoryLoader::refreshAll() { QMutexLocker locker(qt_factoryloader_mutex()); diff --git a/src/corelib/plugin/qfactoryloader_p.h b/src/corelib/plugin/qfactoryloader_p.h index 10e6e2a..068c6c7 100644 --- a/src/corelib/plugin/qfactoryloader_p.h +++ b/src/corelib/plugin/qfactoryloader_p.h @@ -77,6 +77,10 @@ public: QStringList keys() const; QObject *instance(const QString &key) const; +#ifdef Q_WS_X11 + QLibraryPrivate *library(const QString &key) const; +#endif + void update(); static void refreshAll(); diff --git a/src/corelib/plugin/qlibrary.cpp b/src/corelib/plugin/qlibrary.cpp index 239509e..f812275 100644 --- a/src/corelib/plugin/qlibrary.cpp +++ b/src/corelib/plugin/qlibrary.cpp @@ -854,6 +854,9 @@ bool QLibraryPrivate::isPlugin(QSettings *settings) #ifdef QT_BUILD_KEY_COMPAT2 && key != QT_BUILD_KEY_COMPAT2 #endif +#ifdef QT_BUILD_KEY_COMPAT3 + && key != QT_BUILD_KEY_COMPAT3 +#endif ) { if (qt_debug_component()) { qWarning("In %s:\n" diff --git a/src/corelib/plugin/qsystemlibrary.cpp b/src/corelib/plugin/qsystemlibrary.cpp index a11ed50..eeb142b 100644 --- a/src/corelib/plugin/qsystemlibrary.cpp +++ b/src/corelib/plugin/qsystemlibrary.cpp @@ -78,7 +78,7 @@ (http://msdn.microsoft.com/en-us/library/ms886736.aspx) */ #if defined(Q_OS_WINCE) -HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) +HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory /* = true */) { return ::LoadLibrary(libraryName); } @@ -101,7 +101,7 @@ static QString qSystemDirectory() return QString::fromWCharArray(fullPath.constData(), int(retLen)); } -HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory/*= true*/) +HINSTANCE QSystemLibrary::load(const wchar_t *libraryName, bool onlySystemDirectory /* = true */) { QStringList searchOrder; diff --git a/src/corelib/statemachine/qstatemachine.cpp b/src/corelib/statemachine/qstatemachine.cpp index a3c702a..d704615 100644 --- a/src/corelib/statemachine/qstatemachine.cpp +++ b/src/corelib/statemachine/qstatemachine.cpp @@ -2135,6 +2135,7 @@ void QStateMachine::endMicrostep(QEvent *event) /*! \reimp + This function will call start() to start the state machine. */ void QStateMachine::onEntry(QEvent *event) { @@ -2144,6 +2145,8 @@ void QStateMachine::onEntry(QEvent *event) /*! \reimp + This function will call stop() to stop the state machine and + subsequently emit the stopped() signal. */ void QStateMachine::onExit(QEvent *event) { diff --git a/src/corelib/thread/qatomic.cpp b/src/corelib/thread/qatomic.cpp index 743da24..697da38 100644 --- a/src/corelib/thread/qatomic.cpp +++ b/src/corelib/thread/qatomic.cpp @@ -48,10 +48,9 @@ For atomic operations on pointers, see the QAtomicPointer class. - An complex operation that completes without interruption is said - to be \e atomic. The QAtomicInt class provides atomic reference - counting, test-and-set, fetch-and-store, and fetch-and-add for - integers. + An \e atomic operation is a complex operation that completes without interruption. + The QAtomicInt class provides atomic reference counting, test-and-set, fetch-and-store, + and fetch-and-add for integers. \section1 Non-atomic convenience operators @@ -635,9 +634,8 @@ For atomic operations on integers, see the QAtomicInt class. - An complex operation that completes without interruption is said - to be \e atomic. The QAtomicPointer class provides atomic - test-and-set, fetch-and-store, and fetch-and-add for pointers. + An \e atomic operation is a complex operation that completes without interruption. + The QAtomicPointer class provides atomic test-and-set, fetch-and-store, and fetch-and-add for pointers. \section1 Non-atomic convenience operators diff --git a/src/corelib/thread/qthread_unix.cpp b/src/corelib/thread/qthread_unix.cpp index f8cf67d..eaba3f3 100644 --- a/src/corelib/thread/qthread_unix.cpp +++ b/src/corelib/thread/qthread_unix.cpp @@ -142,6 +142,20 @@ static void destroy_current_thread_data_key() } Q_DESTRUCTOR_FUNCTION(destroy_current_thread_data_key) +#ifdef Q_OS_SYMBIAN +static void init_symbian_thread_handle(RThread &thread) +{ + thread = RThread(); + TThreadId threadId = thread.Id(); + thread.Open(threadId); + + // Make thread handle accessible process wide + RThread originalCloser = thread; + thread.Duplicate(thread, EOwnerProcess); + originalCloser.Close(); +} +#endif + QThreadData *QThreadData::current() { pthread_once(¤t_thread_data_once, create_current_thread_data_key); @@ -182,9 +196,7 @@ void QAdoptedThread::init() Q_D(QThread); d->thread_id = pthread_self(); #ifdef Q_OS_SYMBIAN - d->data->symbian_thread_handle = RThread(); - TThreadId threadId = d->data->symbian_thread_handle.Id(); - d->data->symbian_thread_handle.Open(threadId); + init_symbian_thread_handle(d->data->symbian_thread_handle); #endif } @@ -244,9 +256,8 @@ void *QThreadPrivate::start(void *arg) // RThread and pthread_t, we must delay initialization of the RThread // handle when creating a thread, until we are running in the new thread. // Here, we pick up the current thread and assign that to the handle. - data->symbian_thread_handle = RThread(); - TThreadId threadId = data->symbian_thread_handle.Id(); - data->symbian_thread_handle.Open(threadId); + init_symbian_thread_handle(data->symbian_thread_handle); + // On symbian, threads other than the main thread are non critical by default // This means a worker thread can crash without crashing the application - to // use this feature, we would need to use RThread::Logon in the main thread @@ -659,6 +670,18 @@ bool QThread::wait(unsigned long time) return true; while (d->running) { +#ifdef Q_OS_SYMBIAN + // Check if thread still exists. Needed because kernel will kill it without notification + // before global statics are deleted at application exit. + if (d->data->symbian_thread_handle.Handle() + && d->data->symbian_thread_handle.ExitType() != EExitPending) { + // Cannot call finish here as wait is typically called from another thread. + // It won't be necessary anyway, as we should never get here under normal operations; + // all QThreads are EProcessCritical and therefore cannot normally exit + // undetected (i.e. panic) as long as all thread control is via QThread. + return true; + } +#endif if (!d->thread_done.wait(locker.mutex(), time)) return false; } diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp index 0a4aad2..6be3416 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 <qdatastream.h> 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/src/corelib/tools/qcryptographichash.cpp b/src/corelib/tools/qcryptographichash.cpp index f418de9..043d6a3 100644 --- a/src/corelib/tools/qcryptographichash.cpp +++ b/src/corelib/tools/qcryptographichash.cpp @@ -147,7 +147,7 @@ void QCryptographicHash::addData(const char *data, int length) } /*! - /overload + \overload addData() */ void QCryptographicHash::addData(const QByteArray &data) { diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index cc90b3a..7589f59 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3735,7 +3735,7 @@ QByteArray QString::toUtf8() const Returns a UCS-4/UTF-32 representation of the string as a QVector<uint>. UCS-4 is a Unicode codec and is lossless. All characters from this string - can be encoded in UCS-4. + can be encoded in UCS-4. The vector is not null terminated. \sa fromUtf8(), toAscii(), toLatin1(), toLocal8Bit(), QTextCodec, fromUcs4(), toWCharArray() */ @@ -3965,8 +3965,8 @@ QString QString::fromUtf8(const char *str, int size) This function checks for a Byte Order Mark (BOM). If it is missing, host byte order is assumed. - This function is comparatively slow. - Use QString(const ushort *, int) or QString(const ushort *) if possible. + This function is slow compared to the other Unicode conversions. + Use QString(const QChar *, int) or QString(const QChar *) if possible. QString makes a deep copy of the Unicode data. 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/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()); } diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h index 7eee33d..c16aefb 100644 --- a/src/corelib/tools/qvector.h +++ b/src/corelib/tools/qvector.h @@ -439,7 +439,7 @@ QVector<T>::QVector(int asize, const T &t) template <typename T> QVector<T>::QVector(std::initializer_list<T> args) { - p = malloc(args.size()); + d = malloc(args.size()); d->ref = 1; d->alloc = d->size = args.size(); d->sharable = true; diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 1bbfcf4..1f2bf4f 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -49,6 +49,8 @@ #include <QtCore/qstringlist.h> #include <private/qobject_p.h> +#include <private/qapplication_p.h> +#include <QtGui/qapplication.h> QT_BEGIN_NAMESPACE @@ -147,24 +149,41 @@ bool QDeclarativeDebugServer::hasDebuggingClient() const QDeclarativeDebugServer *QDeclarativeDebugServer::instance() { - static bool envTested = false; + static bool commandLineTested = false; static QDeclarativeDebugServer *server = 0; - if (!envTested) { - envTested = true; - QByteArray env = qgetenv("QML_DEBUG_SERVER_PORT"); - QByteArray block = qgetenv("QML_DEBUG_SERVER_BLOCK"); + if (!commandLineTested) { + commandLineTested = true; +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL + QApplicationPrivate *appD = static_cast<QApplicationPrivate*>(QObjectPrivate::get(qApp)); + // ### remove port definition when protocol is changed + int port = 0; + bool block = false; bool ok = false; - int port = env.toInt(&ok); - if (ok && port > 1024) { - server = new QDeclarativeDebugServer(port); - server->listen(); - if (!block.isEmpty()) { - server->waitForConnection(); + // format: qmljsdebugger=port:3768[,block] + if (!appD->qmljsDebugArguments.isEmpty()) { + + if (appD->qmljsDebugArguments.indexOf(QLatin1String("port:")) == 0) { + int separatorIndex = appD->qmljsDebugArguments.indexOf(QLatin1Char(',')); + port = appD->qmljsDebugArguments.mid(5, separatorIndex - 5).toInt(&ok); + } + block = appD->qmljsDebugArguments.contains(QLatin1String("block")); + + if (ok) { + server = new QDeclarativeDebugServer(port); + server->listen(); + if (block) { + server->waitForConnection(); + } + } else { + qWarning(QString("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Format is -qmljsdebugger=port:<port>[,block]").arg( + appD->qmljsDebugArguments).toAscii().constData()); } } +#endif } return server; diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index d4c65ae..c507795 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -128,8 +128,8 @@ QDeclarativeFlickablePrivate::QDeclarativeFlickablePrivate() , flickingHorizontally(false), flickingVertically(false) , hMoved(false), vMoved(false) , movingHorizontally(false), movingVertically(false) - , stealMouse(false), pressed(false) - , interactive(true), deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100) + , stealMouse(false), pressed(false), interactive(true), calcVelocity(false) + , deceleration(500), maxVelocity(2000), reportedVelocitySmoothing(100) , delayedPressEvent(0), delayedPressTarget(0), pressDelay(0), fixupDuration(600) , vTime(0), visibleArea(0) , flickableDirection(QDeclarativeFlickable::AutoFlickDirection) @@ -372,11 +372,12 @@ void QDeclarativeFlickablePrivate::updateBeginningEnd() \inlineimage flickable.gif \endfloat - The following example shows a large + The following example shows a small view onto a large image in which the + user can drag or flick the image in order to view different parts of it. - \clearfloat \snippet doc/src/snippets/declarative/flickable.qml document + \clearfloat \section1 Limitations \note Due to an implementation detail, items placed inside a Flickable cannot anchor to it by @@ -981,7 +982,7 @@ void QDeclarativeFlickable::viewportMoved() qreal prevY = d->lastFlickablePosition.x(); qreal prevX = d->lastFlickablePosition.y(); d->velocityTimeline.clear(); - if (d->pressed) { + if (d->pressed || d->calcVelocity) { int elapsed = QDeclarativeItemPrivate::restart(d->velocityTime); if (elapsed > 0) { qreal horizontalVelocity = (prevX - d->hData.move.value()) * 1000 / elapsed; diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h index 261b271..beee741 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p_p.h @@ -141,6 +141,7 @@ public: bool stealMouse : 1; bool pressed : 1; bool interactive : 1; + bool calcVelocity : 1; QElapsedTimer lastPosTime; QPointF lastPos; QPointF pressPos; @@ -173,7 +174,7 @@ public: // flickableData property static void data_append(QDeclarativeListProperty<QObject> *, QObject *); static int data_count(QDeclarativeListProperty<QObject> *); - static QObject * data_at(QDeclarativeListProperty<QObject> *, int); + static QObject *data_at(QDeclarativeListProperty<QObject> *, int); static void data_clear(QDeclarativeListProperty<QObject> *); }; diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index a0faf14..8d08c99 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1070,27 +1070,41 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m GridView are laid out horizontally or vertically. Grid views are inherently flickable as GridView inherits from \l Flickable. - For example, if there is a simple list model defined in a file \c ContactModel.qml like this: + \section1 Example Usage + + The following example shows the definition of a simple list model defined + in a file called \c ContactModel.qml: \snippet doc/src/snippets/declarative/gridview/ContactModel.qml 0 - Another component can display this model data in a GridView, like this: + \beginfloatright + \inlineimage gridview-simple.png + \endfloat + + This model can be referenced as \c ContactModel in other QML files. See \l{QML Modules} + for more information about creating reusable components like this. + + Another component can display this model data in a GridView, as in the following + example, which creates a \c ContactModel component for its model, and a \l Column element + (containing \l Image and \l Text elements) for its delegate. + \clearfloat \snippet doc/src/snippets/declarative/gridview/gridview.qml import \codeline \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs simple - \image gridview-simple.png - Here, the GridView creates a \c ContactModel component for its model, and a \l Column element - (containing \l Image and \ Text elements) for its delegate. The view will create a new delegate - for each item in the model. Notice the delegate is able to access the model's \c name and - \c portrait data directly. + \beginfloatright + \inlineimage gridview-highlight.png + \endfloat + + The view will create a new delegate for each item in the model. Note that the delegate + is able to access the model's \c name and \c portrait data directly. An improved grid view is shown below. The delegate is visually improved and is moved into a separate \c contactDelegate component. - + + \clearfloat \snippet doc/src/snippets/declarative/gridview/gridview.qml classdocs advanced - \image gridview-highlight.png The currently selected item is highlighted with a blue \l Rectangle using the \l highlight property, and \c focus is set to \c true to enable keyboard navigation for the grid view. @@ -1099,10 +1113,10 @@ void QDeclarativeGridViewPrivate::flick(AxisData &data, qreal minExtent, qreal m Delegates are instantiated as needed and may be destroyed at any time. State should \e never be stored in a delegate. - \note Views do not enable \e clip automatically. If the view - is not clipped by another item or the screen, it will be necessary - to set \e {clip: true} in order to have the out of view items clipped - nicely. + \note Views do not set the \l{Item::}{clip} property automatically. + If the view is not clipped by another item or the screen, it will be necessary + to set this property to true in order to clip the items that are partially or + fully outside the view. \sa {declarative/modelviews/gridview}{GridView example} */ @@ -2241,7 +2255,9 @@ void QDeclarativeGridView::trackedPositionChanged() } if (viewPos != pos) { cancelFlick(); + d->calcVelocity = true; d->setPosition(pos); + d->calcVelocity = false; } } } diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 11f9179..e9da4f7 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -44,6 +44,7 @@ #include "private/qdeclarativeevents_p_p.h" #include <private/qdeclarativeengine_p.h> +#include <private/qgraphicsitem_p.h> #include <qdeclarativeengine.h> #include <qdeclarativeopenmetaobject_p.h> @@ -1619,6 +1620,51 @@ void QDeclarativeItemPrivate::data_append(QDeclarativeListProperty<QObject> *pro } } +static inline int children_count_helper(QDeclarativeListProperty<QObject> *prop) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast<QGraphicsObject *>(prop->object)); + return d->children.count(); +} + +static inline QObject *children_at_helper(QDeclarativeListProperty<QObject> *prop, int index) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast<QGraphicsObject *>(prop->object)); + if (index >= 0 && index < d->children.count()) + return d->children.at(index)->toGraphicsObject(); + else + return 0; +} + +static inline void children_clear_helper(QDeclarativeListProperty<QObject> *prop) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast<QGraphicsObject *>(prop->object)); + int childCount = d->children.count(); + for (int index = 0 ;index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); +} + +int QDeclarativeItemPrivate::data_count(QDeclarativeListProperty<QObject> *prop) +{ + return resources_count(prop) + children_count_helper(prop); +} + +QObject *QDeclarativeItemPrivate::data_at(QDeclarativeListProperty<QObject> *prop, int i) +{ + int resourcesCount = resources_count(prop); + if (i < resourcesCount) + return resources_at(prop, i); + const int j = i - resourcesCount; + if (j < children_count_helper(prop)) + return children_at_helper(prop, j); + return 0; +} + +void QDeclarativeItemPrivate::data_clear(QDeclarativeListProperty<QObject> *prop) +{ + resources_clear(prop); + children_clear_helper(prop); +} + QObject *QDeclarativeItemPrivate::resources_at(QDeclarativeListProperty<QObject> *prop, int index) { const QObjectList children = prop->object->children(); @@ -1638,6 +1684,13 @@ int QDeclarativeItemPrivate::resources_count(QDeclarativeListProperty<QObject> * return prop->object->children().count(); } +void QDeclarativeItemPrivate::resources_clear(QDeclarativeListProperty<QObject> *prop) +{ + const QObjectList children = prop->object->children(); + for (int index = 0; index < children.count(); index++) + children.at(index)->setParent(0); +} + int QDeclarativeItemPrivate::transform_count(QDeclarativeListProperty<QGraphicsTransform> *list) { QGraphicsObject *object = qobject_cast<QGraphicsObject *>(list->object); @@ -1724,7 +1777,11 @@ void QDeclarativeItemPrivate::parentProperty(QObject *o, void *rv, QDeclarativeN QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::data() { - return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::data_append); + return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::data_append, + QDeclarativeItemPrivate::data_count, + QDeclarativeItemPrivate::data_at, + QDeclarativeItemPrivate::data_clear + ); } /*! @@ -2413,7 +2470,9 @@ QDeclarativeListProperty<QObject> QDeclarativeItemPrivate::resources() { return QDeclarativeListProperty<QObject>(q_func(), 0, QDeclarativeItemPrivate::resources_append, QDeclarativeItemPrivate::resources_count, - QDeclarativeItemPrivate::resources_at); + QDeclarativeItemPrivate::resources_at, + QDeclarativeItemPrivate::resources_clear + ); } /*! @@ -2484,7 +2543,7 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi /*! \qmlproperty bool Item::clip - This property holds whether clipping is enabled. + This property holds whether clipping is enabled. The default clip value is \c false. If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle. @@ -2494,9 +2553,9 @@ QDeclarativeListProperty<QDeclarativeTransition> QDeclarativeItemPrivate::transi /*! \property QDeclarativeItem::clip - This property holds whether clipping is enabled. + This property holds whether clipping is enabled. The default clip value is \c false. - if clipping is enabled, an item will clip its own painting, as well + If clipping is enabled, an item will clip its own painting, as well as the painting of its children, to its bounding rectangle. If you set clipping during an item's paint operation, remember to re-set it to prevent clipping the rest of your scene. diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index fffb4f7..f85fa27 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -176,11 +176,15 @@ public: // data property static void data_append(QDeclarativeListProperty<QObject> *, QObject *); + static int data_count(QDeclarativeListProperty<QObject> *); + static QObject *data_at(QDeclarativeListProperty<QObject> *, int); + static void data_clear(QDeclarativeListProperty<QObject> *); // resources property static QObject *resources_at(QDeclarativeListProperty<QObject> *, int); static void resources_append(QDeclarativeListProperty<QObject> *, QObject *); static int resources_count(QDeclarativeListProperty<QObject> *); + static void resources_clear(QDeclarativeListProperty<QObject> *); // transform property static int transform_count(QDeclarativeListProperty<QGraphicsTransform> *list); diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 177c5b3..c1e6aaa 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1394,11 +1394,14 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m QAbstractListModel. A ListView has a \l model, which defines the data to be displayed, and - a \l delegate, which defines how the data should be displayed. Items in a - ListView are laid out horizontally or vertically. List views are inherently flickable - as ListView inherits from \l Flickable. + a \l delegate, which defines how the data should be displayed. Items in a + ListView are laid out horizontally or vertically. List views are inherently + flickable because ListView inherits from \l Flickable. - For example, if there is a simple list model defined in a file \c ContactModel.qml like this: + \section1 Example Usage + + The following example shows the definition of a simple list model defined + in a file called \c ContactModel.qml: \snippet doc/src/snippets/declarative/listview/ContactModel.qml 0 @@ -1416,7 +1419,7 @@ void QDeclarativeListViewPrivate::flick(AxisData &data, qreal minExtent, qreal m An improved list view is shown below. The delegate is visually improved and is moved into a separate \c contactDelegate component. - + \snippet doc/src/snippets/declarative/listview/listview.qml classdocs advanced \image listview-highlight.png @@ -2732,7 +2735,9 @@ void QDeclarativeListView::trackedPositionChanged() } if (viewPos != pos) { cancelFlick(); + d->calcVelocity = true; d->setPosition(pos); + d->calcVelocity = false; } } } diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 5d71625..1066c2b 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -212,8 +212,8 @@ QDeclarativeLoader::~QDeclarativeLoader() \qmlproperty url Loader::source This property holds the URL of the QML component to instantiate. - Note the QML component must be an \l Item-based component. Loader cannot - load non-visual components. + Note the QML component must be an \l{Item}-based component. The loader + cannot load non-visual components. To unload the currently loaded item, set this property to an empty string, or set \l sourceComponent to \c undefined. @@ -275,8 +275,8 @@ void QDeclarativeLoader::setSource(const QUrl &url) } \endqml - To unload the currently loaded item, set this property to an empty string, - or set \l sourceComponent to \c undefined. + To unload the currently loaded item, set this property to an empty string + or \c undefined. \sa source, progress */ diff --git a/src/declarative/graphicsitems/qdeclarativemousearea.cpp b/src/declarative/graphicsitems/qdeclarativemousearea.cpp index 5516611..a0208ef 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea.cpp +++ b/src/declarative/graphicsitems/qdeclarativemousearea.cpp @@ -185,27 +185,57 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() \brief The MouseArea item enables simple mouse handling. \inherits Item - A MouseArea is typically used in conjunction with a visible item, - where the MouseArea effectively 'proxies' mouse handling for that - item. For example, we can put a MouseArea in a \l Rectangle that changes + A MouseArea is an invisible item that is typically used in conjunction with + a visible item in order to provide mouse handling for that item. + By effectively acting as a proxy, the logic for mouse handling can be + contained within a MouseArea item. + + For basic key handling, see the \l{Keys}{Keys attached property}. + + The \l enabled property is used to enable and disable mouse handling for + the proxied item. When disabled, the mouse area becomes transparent to + mouse events. + + The \l pressed read-only property indicates whether or not the user is + holding down a mouse button over the mouse area. This property is often + used in bindings between properties in a user interface. The containsMouse + read-only property indicates the presence of the mouse cursor over the + mouse area but, by default, only when a mouse button is held down; see below + for further details. + + Information about the mouse position and button clicks are provided via + signals for which event handler properties are defined. The most commonly + used involved handling mouse presses and clicks: onClicked, onDoubleClicked, + onPressed, onReleased and onPressAndHold. + + By default, MouseArea items only report mouse clicks and not changes to the + position of the mouse cursor. Setting the hoverEnabled property ensures that + handlers defined for onPositionChanged, onEntered and onExited are used and + that the containsMouse property is updated even when no mouse buttons are + pressed. + + \section1 Example Usage + + \beginfloatright + \inlineimage qml-mousearea-snippet.png + \endfloat + + The following example uses a MouseArea in a \l Rectangle that changes the \l Rectangle color to red when clicked: - \snippet doc/src/snippets/declarative/mousearea.qml import + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml import \codeline - \snippet doc/src/snippets/declarative/mousearea.qml intro + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro - Many MouseArea signals pass a \l {MouseEvent}{mouse} parameter that contains + \clearfloat + Many MouseArea signals pass a \l{MouseEvent}{mouse} parameter that contains additional information about the mouse event, such as the position, button, and any key modifiers. Here is an extension of the previous example that produces a different color when the area is right clicked: - \snippet doc/src/snippets/declarative/mousearea.qml intro-extended - - For basic key handling, see the \l {Keys}{Keys attached property}. - - MouseArea is an invisible item: it is never painted. + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml intro-extended \sa MouseEvent, {declarative/touchinteraction/mousearea}{MouseArea example} */ @@ -303,18 +333,23 @@ QDeclarativeMouseAreaPrivate::~QDeclarativeMouseAreaPrivate() The \l {MouseEvent}{mouse} parameter provides information about the click, including the x and y position of the release of the click, and whether the click was held. - The \e accepted property of the MouseEvent parameter is ignored in this handler. + If the \e accepted property of the \l {MouseEvent}{mouse} parameter is set to false + in the handler, the onPressed/onReleased/onClicked handlers will be called for the second + click; otherwise they are supressed. The accepted property defaults to true. */ /*! \qmlsignal MouseArea::onCanceled() This handler is called when mouse events have been canceled, either because an event was not accepted, or - because another element stole the mouse event handling. This signal is for advanced use: it is useful when - there is more than one MouseArea that is handling input, or when there is a MouseArea inside a \l Flickable. In the latter - case, if you execute some logic on the pressed signal and then start dragging, the \l Flickable will steal the mouse handling - from the MouseArea. In these cases, to reset the logic when the MouseArea has lost the mouse handling to the - \l Flickable, \c onCanceled should be used in addition to onReleased. + because another element stole the mouse event handling. + + This signal is for advanced use: it is useful when there is more than one MouseArea + that is handling input, or when there is a MouseArea inside a \l Flickable. In the latter + case, if you execute some logic on the pressed signal and then start dragging, the + \l Flickable will steal the mouse handling from the MouseArea. In these cases, to reset + the logic when the MouseArea has lost the mouse handling to the \l Flickable, + \c onCanceled should be used in addition to onReleased. */ QDeclarativeMouseArea::QDeclarativeMouseArea(QDeclarativeItem *parent) @@ -331,11 +366,13 @@ QDeclarativeMouseArea::~QDeclarativeMouseArea() /*! \qmlproperty real MouseArea::mouseX \qmlproperty real MouseArea::mouseY - These properties hold the coordinates of the mouse. + These properties hold the coordinates of the mouse cursor. If the hoverEnabled property is false then these properties will only be valid while a button is pressed, and will remain valid as long as the button is held - even if the mouse is moved outside the area. + down even if the mouse is moved outside the area. + + By default, this property is false. If hoverEnabled is true then these properties will be valid when: \list @@ -360,6 +397,8 @@ qreal QDeclarativeMouseArea::mouseY() const /*! \qmlproperty bool MouseArea::enabled This property holds whether the item accepts mouse events. + + By default, this property is true. */ bool QDeclarativeMouseArea::isEnabled() const { @@ -387,7 +426,8 @@ void QDeclarativeMouseArea::setEnabled(bool a) \endlist The code below displays "right" when the right mouse buttons is pressed: - \snippet doc/src/snippets/declarative/mousearea.qml mousebuttons + + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml mousebuttons \sa acceptedButtons */ @@ -525,12 +565,13 @@ void QDeclarativeMouseArea::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *even if (!d->absorb) { QDeclarativeItem::mouseDoubleClickEvent(event); } else { - QDeclarativeItem::mouseDoubleClickEvent(event); - if (event->isAccepted()) { - // Only deliver the event if we have accepted the press. - d->saveEvent(event); - QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false); - emit this->doubleClicked(&me); + d->saveEvent(event); + QDeclarativeMouseEvent me(d->lastPos.x(), d->lastPos.y(), d->lastButton, d->lastButtons, d->lastModifiers, true, false); + me.setAccepted(d->isDoubleClickConnected()); + emit this->doubleClicked(&me); + if (!me.isAccepted()) { + // Only deliver the press event if we haven't accepted the double click. + QDeclarativeItem::mouseDoubleClickEvent(event); } } } @@ -704,7 +745,8 @@ QVariant QDeclarativeMouseArea::itemChange(GraphicsItemChange change, pressed. Hover enables handling of all mouse events even when no mouse button is pressed. - This property affects the containsMouse property and the onEntered, onExited and onPositionChanged signals. + This property affects the containsMouse property and the onEntered, onExited and + onPositionChanged signals. */ bool QDeclarativeMouseArea::hoverEnabled() const { @@ -847,7 +889,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() The following example displays a \l Rectangle that can be dragged along the X-axis. The opacity of the rectangle is reduced when it is dragged to the right. - \snippet doc/src/snippets/declarative/mousearea.qml drag + \snippet doc/src/snippets/declarative/mousearea/mousearea.qml drag \note Items cannot be dragged if they are anchored for the requested \c drag.axis. For example, if \c anchors.left or \c anchors.right was set @@ -858,7 +900,7 @@ QDeclarativeDrag *QDeclarativeMouseArea::drag() If \c drag.filterChildren is set to true, a drag can override descendant MouseAreas. This enables a parent MouseArea to handle drags, for example, while descendants handle clicks: - \snippet doc/src/snippets/declarative/mouseareadragfilter.qml dragfilter + \snippet doc/src/snippets/declarative/mousearea/mouseareadragfilter.qml dragfilter */ diff --git a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h index cf9dc18..48a56d9 100644 --- a/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativemousearea_p_p.h @@ -95,6 +95,12 @@ public: return QObjectPrivate::get(q)->isSignalConnected(idx); } + bool isDoubleClickConnected() { + Q_Q(QDeclarativeMouseArea); + static int idx = QObjectPrivate::get(q)->signalIndex("doubleClicked(QDeclarativeMouseEvent*)"); + return QObjectPrivate::get(q)->isSignalConnected(idx); + } + bool absorb : 1; bool hovered : 1; bool pressed : 1; diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index de3f9fa..d134929 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -141,11 +141,13 @@ void QDeclarativePathViewPrivate::releaseItem(QDeclarativeItem *item) { if (!item || !model) return; - if (QDeclarativePathViewAttached *att = attached(item)) - att->setOnPath(false); QDeclarativeItemPrivate *itemPrivate = static_cast<QDeclarativeItemPrivate*>(QGraphicsItemPrivate::get(item)); itemPrivate->removeItemChangeListener(this, QDeclarativeItemPrivate::Geometry); - model->release(item); + if (model->release(item) == 0) { + // item was not destroyed, and we no longer reference it. + if (QDeclarativePathViewAttached *att = attached(item)) + att->setOnPath(false); + } } QDeclarativePathViewAttached *QDeclarativePathViewPrivate::attached(QDeclarativeItem *item) @@ -404,14 +406,14 @@ QDeclarativePathView::~QDeclarativePathView() be instantiated, but not considered to be currently on the path. Usually, these items would be set invisible, for example: - \code + \qml Component { Rectangle { visible: PathView.onPath ... } } - \endcode + \endqml It is attached to each instance of the delegate. */ @@ -1033,103 +1035,138 @@ QPointF QDeclarativePathViewPrivate::pointNear(const QPointF &point, qreal *near return nearPoint; } - void QDeclarativePathView::mousePressEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - if (!d->interactive || !d->items.count()) + if (d->interactive) { + d->handleMousePressEvent(event); + event->accept(); + } else { + QDeclarativeItem::mousePressEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) +{ + Q_Q(QDeclarativePathView); + if (!interactive || !items.count()) return; - QPointF scenePoint = mapToScene(event->pos()); + QPointF scenePoint = q->mapToScene(event->pos()); int idx = 0; - for (; idx < d->items.count(); ++idx) { - QRectF rect = d->items.at(idx)->boundingRect(); - rect = d->items.at(idx)->mapToScene(rect).boundingRect(); + for (; idx < items.count(); ++idx) { + QRectF rect = items.at(idx)->boundingRect(); + rect = items.at(idx)->mapToScene(rect).boundingRect(); if (rect.contains(scenePoint)) break; } - if (idx == d->items.count() && d->dragMargin == 0.) // didn't click on an item + if (idx == items.count() && dragMargin == 0.) // didn't click on an item return; - d->startPoint = d->pointNear(event->pos(), &d->startPc); - if (idx == d->items.count()) { - qreal distance = qAbs(event->pos().x() - d->startPoint.x()) + qAbs(event->pos().y() - d->startPoint.y()); - if (distance > d->dragMargin) + startPoint = pointNear(event->pos(), &startPc); + if (idx == items.count()) { + qreal distance = qAbs(event->pos().x() - startPoint.x()) + qAbs(event->pos().y() - startPoint.y()); + if (distance > dragMargin) return; } - if (d->tl.isActive() && d->flicking) - d->stealMouse = true; // If we've been flicked then steal the click. + if (tl.isActive() && flicking) + stealMouse = true; // If we've been flicked then steal the click. else - d->stealMouse = false; + stealMouse = false; - d->lastElapsed = 0; - d->lastDist = 0; - QDeclarativeItemPrivate::start(d->lastPosTime); - d->tl.clear(); + lastElapsed = 0; + lastDist = 0; + QDeclarativeItemPrivate::start(lastPosTime); + tl.clear(); } void QDeclarativePathView::mouseMoveEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - if (!d->interactive || !d->lastPosTime.isValid()) + if (d->interactive) { + d->handleMouseMoveEvent(event); + if (d->stealMouse) + setKeepMouseGrab(true); + event->accept(); + } else { + QDeclarativeItem::mouseMoveEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent *event) +{ + Q_Q(QDeclarativePathView); + if (!interactive || !lastPosTime.isValid()) return; - if (!d->stealMouse) { - QPointF delta = event->pos() - d->startPoint; + if (!stealMouse) { + QPointF delta = event->pos() - startPoint; if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) - d->stealMouse = true; + stealMouse = true; } - if (d->stealMouse) { - d->moveReason = QDeclarativePathViewPrivate::Mouse; + if (stealMouse) { + moveReason = QDeclarativePathViewPrivate::Mouse; qreal newPc; - d->pointNear(event->pos(), &newPc); - qreal diff = (newPc - d->startPc)*d->modelCount*d->mappedRange; + pointNear(event->pos(), &newPc); + qreal diff = (newPc - startPc)*modelCount*mappedRange; if (diff) { - setOffset(d->offset + diff); + setOffset(offset + diff); - if (diff > d->modelCount/2) - diff -= d->modelCount; - else if (diff < -d->modelCount/2) - diff += d->modelCount; + if (diff > modelCount/2) + diff -= modelCount; + else if (diff < -modelCount/2) + diff += modelCount; - d->lastElapsed = QDeclarativeItemPrivate::restart(d->lastPosTime); - d->lastDist = diff; - d->startPc = newPc; + lastElapsed = QDeclarativeItemPrivate::restart(lastPosTime); + lastDist = diff; + startPc = newPc; } - if (!d->moving) { - d->moving = true; - emit movingChanged(); - emit movementStarted(); + if (!moving) { + moving = true; + emit q->movingChanged(); + emit q->movementStarted(); } } } -void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) +void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *event) { Q_D(QDeclarativePathView); - d->stealMouse = false; - setKeepMouseGrab(false); - if (!d->interactive || !d->lastPosTime.isValid()) + if (d->interactive) { + d->handleMouseReleaseEvent(event); + event->accept(); + ungrabMouse(); + } else { + QDeclarativeItem::mouseReleaseEvent(event); + } +} + +void QDeclarativePathViewPrivate::handleMouseReleaseEvent(QGraphicsSceneMouseEvent *) +{ + Q_Q(QDeclarativePathView); + stealMouse = false; + q->setKeepMouseGrab(false); + if (!interactive || !lastPosTime.isValid()) return; - qreal elapsed = qreal(d->lastElapsed + QDeclarativeItemPrivate::elapsed(d->lastPosTime)) / 1000.; - qreal velocity = elapsed > 0. ? d->lastDist / elapsed : 0; - if (d->model && d->modelCount && qAbs(velocity) > 1.) { - qreal count = d->pathItems == -1 ? d->modelCount : d->pathItems; + qreal elapsed = qreal(lastElapsed + QDeclarativeItemPrivate::elapsed(lastPosTime)) / 1000.; + qreal velocity = elapsed > 0. ? lastDist / elapsed : 0; + if (model && modelCount && qAbs(velocity) > 1.) { + qreal count = pathItems == -1 ? modelCount : pathItems; if (qAbs(velocity) > count * 2) // limit velocity velocity = (velocity > 0 ? count : -count) * 2; // Calculate the distance to be travelled qreal v2 = velocity*velocity; - qreal accel = d->deceleration/10; + qreal accel = deceleration/10; // + 0.25 to encourage moving at least one item in the flick direction - qreal dist = qMin(qreal(d->modelCount-1), qreal(v2 / (accel * 2.0) + 0.25)); - if (d->haveHighlightRange && d->highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) { + qreal dist = qMin(qreal(modelCount-1), qreal(v2 / (accel * 2.0) + 0.25)); + if (haveHighlightRange && highlightRangeMode == QDeclarativePathView::StrictlyEnforceRange) { // round to nearest item. if (velocity > 0.) - dist = qRound(dist + d->offset) - d->offset; + dist = qRound(dist + offset) - offset; else - dist = qRound(dist - d->offset) + d->offset; + dist = qRound(dist - offset) + offset; // Calculate accel required to stop on item boundary if (dist <= 0.) { dist = 0.; @@ -1138,23 +1175,22 @@ void QDeclarativePathView::mouseReleaseEvent(QGraphicsSceneMouseEvent *) accel = v2 / (2.0f * qAbs(dist)); } } - d->offsetAdj = 0.0; - d->moveOffset.setValue(d->offset); - d->tl.accel(d->moveOffset, velocity, accel, dist); - d->tl.callback(QDeclarativeTimeLineCallback(&d->moveOffset, d->fixOffsetCallback, d)); - if (!d->flicking) { - d->flicking = true; - emit flickingChanged(); - emit flickStarted(); + offsetAdj = 0.0; + moveOffset.setValue(offset); + tl.accel(moveOffset, velocity, accel, dist); + tl.callback(QDeclarativeTimeLineCallback(&moveOffset, fixOffsetCallback, this)); + if (!flicking) { + flicking = true; + emit q->flickingChanged(); + emit q->flickStarted(); } } else { - d->fixOffset(); + fixOffset(); } - d->lastPosTime.invalidate(); - ungrabMouse(); - if (!d->tl.isActive()) - movementEnding(); + lastPosTime.invalidate(); + if (!tl.isActive()) + q->movementEnding(); } bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) @@ -1164,7 +1200,8 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) QRectF myRect = mapToScene(QRectF(0, 0, width(), height())).boundingRect(); QGraphicsScene *s = scene(); QDeclarativeItem *grabber = s ? qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()) : 0; - if ((d->stealMouse || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { + bool stealThisEvent = d->stealMouse; + if ((stealThisEvent || myRect.contains(event->scenePos().toPoint())) && (!grabber || !grabber->keepMouseGrab())) { mouseEvent.setAccepted(false); for (int i = 0x1; i <= 0x10; i <<= 1) { if (event->buttons() & i) { @@ -1179,25 +1216,28 @@ bool QDeclarativePathView::sendMouseEvent(QGraphicsSceneMouseEvent *event) switch(mouseEvent.type()) { case QEvent::GraphicsSceneMouseMove: - mouseMoveEvent(&mouseEvent); + d->handleMouseMoveEvent(&mouseEvent); break; case QEvent::GraphicsSceneMousePress: - mousePressEvent(&mouseEvent); + d->handleMousePressEvent(&mouseEvent); + stealThisEvent = d->stealMouse; // Update stealThisEvent in case changed by function call above break; case QEvent::GraphicsSceneMouseRelease: - mouseReleaseEvent(&mouseEvent); + d->handleMouseReleaseEvent(&mouseEvent); break; default: break; } grabber = qobject_cast<QDeclarativeItem*>(s->mouseGrabberItem()); - if (grabber && d->stealMouse && !grabber->keepMouseGrab() && grabber != this) + if (grabber && stealThisEvent && !grabber->keepMouseGrab() && grabber != this) grabMouse(); return d->stealMouse; } else if (d->lastPosTime.isValid()) { d->lastPosTime.invalidate(); } + if (mouseEvent.type() == QEvent::GraphicsSceneMouseRelease) + d->stealMouse = false; return false; } @@ -1211,12 +1251,7 @@ bool QDeclarativePathView::sceneEventFilter(QGraphicsItem *i, QEvent *e) case QEvent::GraphicsSceneMousePress: case QEvent::GraphicsSceneMouseMove: case QEvent::GraphicsSceneMouseRelease: - { - bool ret = sendMouseEvent(static_cast<QGraphicsSceneMouseEvent *>(e)); - if (e->type() == QEvent::GraphicsSceneMouseRelease) - return ret; - break; - } + return sendMouseEvent(static_cast<QGraphicsSceneMouseEvent *>(e)); default: break; } diff --git a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h index dfebe35..b217216 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativepathview_p_p.h @@ -123,6 +123,10 @@ public: return model && model->count() > 0 && model->isValid() && path; } + void handleMousePressEvent(QGraphicsSceneMouseEvent *event); + void handleMouseMoveEvent(QGraphicsSceneMouseEvent *event); + void handleMouseReleaseEvent(QGraphicsSceneMouseEvent *); + int calcCurrentIndex(); void updateCurrent(); static void fixOffsetCallback(void*); diff --git a/src/declarative/graphicsitems/qdeclarativerectangle.cpp b/src/declarative/graphicsitems/qdeclarativerectangle.cpp index d027924..9831d5f 100644 --- a/src/declarative/graphicsitems/qdeclarativerectangle.cpp +++ b/src/declarative/graphicsitems/qdeclarativerectangle.cpp @@ -85,8 +85,8 @@ void QDeclarativePen::setWidth(int w) /*! \qmlclass GradientStop QDeclarativeGradientStop \ingroup qml-basic-visual-elements - \since 4.7 - \brief The GradientStop item defines the color at a position in a Gradient + \since 4.7 + \brief The GradientStop item defines the color at a position in a Gradient. \sa Gradient */ @@ -95,7 +95,12 @@ void QDeclarativePen::setWidth(int w) \qmlproperty real GradientStop::position \qmlproperty color GradientStop::color - Sets a \e color at a \e position in a gradient. + The position and color properties describe the color used at a given + position in a gradient, as represented by a gradient stop. + + The default position is 0.0; the default color is black. + + \sa Gradient */ void QDeclarativeGradientStop::updateGradient() @@ -107,20 +112,50 @@ void QDeclarativeGradientStop::updateGradient() /*! \qmlclass Gradient QDeclarativeGradient \ingroup qml-basic-visual-elements - \since 4.7 + \since 4.7 \brief The Gradient item defines a gradient fill. - A gradient is defined by two or more colors, which will be blended seemlessly. The - colors are specified at their position in the range 0.0 - 1.0 via - the GradientStop item. For example, the following code paints a - rectangle with a gradient starting with red, blending to yellow at 1/3 of the - size of the rectangle, and ending with Green: + A gradient is defined by two or more colors, which will be blended seamlessly. - \snippet doc/src/snippets/declarative/gradient.qml code + The colors are specified as a set of GradientStop child items, each of + which defines a position on the gradient from 0.0 to 1.0 and a color. + The position of each GradientStop is defined by setting its + \l{GradientStop::}{position} property; its color is defined using its + \l{GradientStop::}{color} property. + + A gradient without any gradient stops is rendered as a solid white fill. Note that this item is not a visual representation of a gradient. To display a - gradient use a visual item (like rectangle) which supports having a gradient set - on it for display. + gradient, use a visual element (like \l Rectangle) which supports the use + of gradients. + + \section1 Example Usage + + \beginfloatright + \inlineimage qml-gradient.png + \endfloat + + The following example declares a \l Rectangle item with a gradient starting + with red, blending to yellow at one third of the height of the rectangle, + and ending with green: + + \snippet doc/src/snippets/declarative/gradient.qml code + + \clearfloat + \section1 Performance and Limitations + + Calculating gradients can be computationally expensive compared to the use + of solid color fills or images. Consider using gradients for static items + in a user interface. + + In Qt 4.7, only vertical, linear gradients can be applied to items. If you + need to apply different orientations of gradients, a combination of rotation + and clipping will need to be applied to the relevant items. This can + introduce additional performance requirements for your application. + + The use of animations involving gradient stops may not give the desired + result. An alternative way to animate gradients is to use pre-generated + images or SVG drawings containing gradients. \sa GradientStop */ @@ -128,6 +163,10 @@ void QDeclarativeGradientStop::updateGradient() /*! \qmlproperty list<GradientStop> Gradient::stops This property holds the gradient stops describing the gradient. + + By default, this property contains an empty list. + + To set the gradient stops, define them as children of the Gradient element. */ const QGradient *QDeclarativeGradient::gradient() const @@ -155,27 +194,46 @@ void QDeclarativeGradient::doUpdate() /*! \qmlclass Rectangle QDeclarativeRectangle \ingroup qml-basic-visual-elements - \since 4.7 - \brief The Rectangle item allows you to add rectangles to a scene. + \since 4.7 + \brief The Rectangle item provides a filled rectangle with an optional border. \inherits Item - A Rectangle is painted using a solid fill (color) and an optional border. - You can also create rounded rectangles using the \l radius property. + Rectangle items are used to fill areas with solid color or gradients, and are + often used to hold other items. - \qml - import Qt 4.7 - - Rectangle { - width: 100 - height: 100 - color: "red" - border.color: "black" - border.width: 5 - radius: 10 - } - \endqml + \section1 Appearance + + Each Rectangle item is painted using either a solid fill color, specified using + the \l color property, or a gradient, defined using a Gradient element and set + using the \l gradient property. If both a color and a gradient are specified, + the gradient is used. + + You can add an optional border to a rectangle with its own color and thickness + by settting the \l border.color and \l border.width properties. + + You can also create rounded rectangles using the \l radius property. Since this + introduces curved edges to the corners of a rectangle, it may be appropriate to + set the \l smooth property to improve its appearance. - \image declarative-rect.png + \section1 Example Usage + + \beginfloatright + \inlineimage declarative-rect.png + \endfloat + + The following example shows the effects of some of the common properties on a + Rectangle item, which in this case is used to create a square: + + \snippet doc/src/snippets/declarative/rectangle/rectangle.qml document + + \clearfloat + \section1 Performance + + Using the \l smooth property improves the appearance of a rounded rectangle at + the cost of rendering performance. You should consider unsetting this property + for rectangles in motion, and only set it when they are stationary. + + \sa Image */ int QDeclarativeRectanglePrivate::doUpdateSlotIdx = -1; @@ -207,13 +265,14 @@ void QDeclarativeRectangle::doUpdate() rectangle's boundaries, and the spare pixel is rendered to the right and below the rectangle (as documented for QRect rendering). This can cause unintended effects if \c border.width is 1 and the rectangle is \l{Item::clip}{clipped} by a parent item: - - \table - \row - \o \snippet doc/src/snippets/declarative/rect-border-width.qml 0 - \o \image rect-border-width.png - \endtable + \beginfloatright + \inlineimage rect-border-width.png + \endfloat + + \snippet doc/src/snippets/declarative/rectangle/rect-border-width.qml 0 + + \clearfloat Here, the innermost rectangle's border is clipped on the bottom and right edges by its parent. To avoid this, the border width can be set to two instead of one. */ @@ -231,34 +290,12 @@ QDeclarativePen *QDeclarativeRectangle::border() This property allows for the construction of simple vertical gradients. Other gradients may by formed by adding rotation to the rectangle. - \table - \row - \o \image declarative-rect_gradient.png - \o - \qml - Rectangle { - y: 0; width: 80; height: 80 - color: "lightsteelblue" - } - - Rectangle { - y: 100; width: 80; height: 80 - gradient: Gradient { - GradientStop { position: 0.0; color: "lightsteelblue" } - GradientStop { position: 1.0; color: "blue" } - } - } + \beginfloatleft + \inlineimage declarative-rect_gradient.png + \endfloat - Rectangle { - y: 200; width: 80; height: 80 - rotation: 90 - gradient: Gradient { - GradientStop { position: 0.0; color: "lightsteelblue" } - GradientStop { position: 1.0; color: "blue" } - } - } - \endqml - \endtable + \snippet doc/src/snippets/declarative/rectangle/rectangle-gradient.qml rectangles + \clearfloat If both a gradient and a color are specified, the gradient will be used. @@ -319,17 +356,21 @@ void QDeclarativeRectangle::setRadius(qreal radius) \qmlproperty color Rectangle::color This property holds the color used to fill the rectangle. - \qml - // green rectangle using hexidecimal notation - Rectangle { color: "#00FF00" } + The default color is white. - // steelblue rectangle using SVG color name - Rectangle { color: "steelblue" } - \endqml + \beginfloatright + \inlineimage rect-color.png + \endfloat - The default color is white. + The following example shows rectangles with colors specified + using hexadecimal and named color notation: + \snippet doc/src/snippets/declarative/rectangle/rectangle-colors.qml rectangles + + \clearfloat If both a gradient and a color are specified, the gradient will be used. + + \sa gradient */ QColor QDeclarativeRectangle::color() const { diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 14194a0..1f4c1c7 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -1206,6 +1206,16 @@ void QDeclarativeText::mousePressEvent(QGraphicsSceneMouseEvent *event) \qmlsignal Text::onLinkActivated(string link) This handler is called when the user clicks on a link embedded in the text. + The link must be in rich text or HTML format and the + \a link string provides access to the particular link. + + \snippet doc/src/snippets/declarative/text/onLinkActivated.qml 0 + + The example code will display the text + "The main website is at \l{http://qt.nokia.com}{Nokia Qt DF}." + + Clicking on the highlighted link will output + \tt{http://qt.nokia.com link activated} to the console. */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index a46ee73..a70886e 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -287,16 +287,12 @@ public: m_roles = m_listModelInterface->roles(); for (int ii = 0; ii < m_roles.count(); ++ii) m_roleNames.insert(m_listModelInterface->toString(m_roles.at(ii)).toUtf8(), m_roles.at(ii)); - if (m_roles.count() == 1) - m_roleNames.insert("modelData", m_roles.at(0)); } else if (m_abstractItemModel) { for (QHash<int,QByteArray>::const_iterator it = m_abstractItemModel->roleNames().begin(); it != m_abstractItemModel->roleNames().end(); ++it) { m_roles.append(it.key()); m_roleNames.insert(*it, it.key()); } - if (m_roles.count() == 1) - m_roleNames.insert("modelData", m_roles.at(0)); if (m_roles.count()) m_roleNames.insert("hasModelChildren", -1); } else if (m_listAccessor) { @@ -314,7 +310,8 @@ public: } } - QHash<int,int> roleToPropId; + QHash<int,int> m_roleToPropId; + int m_modelDataPropId; void createMetaData() { if (!m_metaDataCreated) { ensureRoles(); @@ -322,9 +319,12 @@ public: QHash<QByteArray, int>::const_iterator it = m_roleNames.begin(); while (it != m_roleNames.end()) { int propId = m_delegateDataType->createProperty(it.key()) - m_delegateDataType->propertyOffset(); - roleToPropId.insert(*it, propId); + m_roleToPropId.insert(*it, propId); ++it; } + // Add modelData property + if (m_roles.count() == 1) + m_modelDataPropId = m_delegateDataType->createProperty("modelData") - m_delegateDataType->propertyOffset(); m_metaDataCreated = true; } } @@ -430,6 +430,11 @@ public: void setIndex(int index); int propForRole(int) const; + int modelDataPropertyId() const { + QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(m_model); + return model->m_modelDataPropId; + } + void setValue(int, const QVariant &); bool hasValue(int id) const { return m_meta->hasValue(id); @@ -450,8 +455,8 @@ private: int QDeclarativeVisualDataModelData::propForRole(int id) const { QDeclarativeVisualDataModelPrivate *model = QDeclarativeVisualDataModelPrivate::get(m_model); - QHash<int,int>::const_iterator it = model->roleToPropId.find(id); - if (it != model->roleToPropId.end()) + QHash<int,int>::const_iterator it = model->m_roleToPropId.find(id); + if (it != model->m_roleToPropId.end()) return *it; return -1; @@ -518,14 +523,16 @@ QVariant QDeclarativeVisualDataModelDataMetaObject::initialValue(int propId) } } else if (model->m_abstractItemModel) { model->ensureRoles(); + QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); if (propName == "hasModelChildren") { - QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); return model->m_abstractItemModel->hasChildren(index); } else { QHash<QByteArray,int>::const_iterator it = model->m_roleNames.find(propName); if (it != model->m_roleNames.end()) { - QModelIndex index = model->m_abstractItemModel->index(data->m_index, 0, model->m_root); return model->m_abstractItemModel->data(index, *it); + } else if (model->m_roles.count() == 1 && propName == "modelData") { + //for compatibility with other lists, assign modelData if there is only a single role + return model->m_abstractItemModel->data(index, model->m_roles.first()); } } } @@ -1195,6 +1202,19 @@ void QDeclarativeVisualDataModel::_q_itemsChanged(int index, int count, qmlInfo(this) << "Changing role not present in item: " << roleName; } } + if (roles.count() == 1) { + // Handle the modelData role we add if there is just one role. + int propId = data->modelDataPropertyId(); + if (data->hasValue(propId)) { + int role = roles.at(0); + if (d->m_listModelInterface) { + data->setValue(propId, d->m_listModelInterface->data(idx, QList<int>() << role).value(role)); + } else if (d->m_abstractItemModel) { + QModelIndex index = d->m_abstractItemModel->index(idx, 0, d->m_root); + data->setValue(propId, d->m_abstractItemModel->data(index, role)); + } + } + } } } } diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index c6b64ae..985ab72 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -269,7 +269,7 @@ int qmlRegisterInterface(const char *typeName) QByteArray pointerName(name + '*'); QByteArray listName("QDeclarativeListProperty<" + name + ">"); - QDeclarativePrivate::RegisterInterface interface = { + QDeclarativePrivate::RegisterInterface qmlInterface = { 0, qRegisterMetaType<T *>(pointerName.constData()), @@ -278,7 +278,7 @@ int qmlRegisterInterface(const char *typeName) qobject_interface_iid<T *>() }; - return QDeclarativePrivate::qmlregister(QDeclarativePrivate::InterfaceRegistration, &interface); + return QDeclarativePrivate::qmlregister(QDeclarativePrivate::InterfaceRegistration, &qmlInterface); } template<typename T> diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index e096305..cb6ad8c 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -48,6 +48,7 @@ #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" +#include "private/qdeclarativestate_p_p.h" #include <QVariant> #include <QtCore/qdebug.h> @@ -373,6 +374,18 @@ void QDeclarativeAbstractBinding::removeFromObject() } } +static void bindingDummyDeleter(QDeclarativeAbstractBinding *) +{ +} + +QDeclarativeAbstractBinding::Pointer QDeclarativeAbstractBinding::weakPointer() +{ + if (m_selfPointer.isNull()) + m_selfPointer = QSharedPointer<QDeclarativeAbstractBinding>(this, bindingDummyDeleter); + + return m_selfPointer.toWeakRef(); +} + void QDeclarativeAbstractBinding::clear() { if (m_mePtr) { diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 598f09f..941a1b3 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -67,6 +67,8 @@ QT_BEGIN_NAMESPACE class Q_DECLARATIVE_EXPORT QDeclarativeAbstractBinding { public: + typedef QWeakPointer<QDeclarativeAbstractBinding> Pointer; + QDeclarativeAbstractBinding(); virtual void destroy(); @@ -86,21 +88,26 @@ public: void addToObject(QObject *); void removeFromObject(); + static Pointer getPointer(QDeclarativeAbstractBinding *p) { return p ? p->weakPointer() : Pointer(); } + protected: virtual ~QDeclarativeAbstractBinding(); void clear(); private: + Pointer weakPointer(); friend class QDeclarativeData; friend class QDeclarativeValueTypeProxyBinding; friend class QDeclarativePropertyPrivate; friend class QDeclarativeVME; + friend class QtSharedPointer::ExternalRefCount<QDeclarativeAbstractBinding>; QObject *m_object; QDeclarativeAbstractBinding **m_mePtr; QDeclarativeAbstractBinding **m_prevBinding; QDeclarativeAbstractBinding *m_nextBinding; + QSharedPointer<QDeclarativeAbstractBinding> m_selfPointer; }; class QDeclarativeValueTypeProxyBinding : public QDeclarativeAbstractBinding diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 1b1454b..a551cc8 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -74,7 +74,7 @@ class QDeclarativeEngine; class QDeclarativeCompiledData; class QDeclarativeComponentAttached; -class QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback +class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, public QDeclarativeTypeData::TypeDataCallback { Q_DECLARE_PUBLIC(QDeclarativeComponent) diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h index 509e30a..c3f9dd2 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/declarative/qml/qdeclarativecustomparser_p.h @@ -117,7 +117,7 @@ public: NoFlag = 0x00000000, AcceptsAttachedProperties = 0x00000001 }; - Q_DECLARE_FLAGS(Flags, Flag); + Q_DECLARE_FLAGS(Flags, Flag) QDeclarativeCustomParser() : compiler(0), object(0), m_flags(NoFlag) {} QDeclarativeCustomParser(Flags f) : compiler(0), object(0), m_flags(f) {} diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index dd8e9cd..06b1ed3 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -906,7 +906,7 @@ QDeclarativeEngine::ObjectOwnership QDeclarativeEngine::objectOwnership(QObject return ddata->indestructible?CppOwnership:JavaScriptOwnership; } -void qmlExecuteDeferred(QObject *object) +Q_AUTOTEST_EXPORT void qmlExecuteDeferred(QObject *object) { QDeclarativeData *data = QDeclarativeData::get(object); diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index 9d74238..ab6ff74 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -843,7 +843,7 @@ QDeclarativeObjectMethodScriptClass::Value QDeclarativeObjectMethodScriptClass:: for (int ii = 0; ii < argTypeNames.count(); ++ii) { argTypes[ii] = QMetaType::type(argTypeNames.at(ii)); if (argTypes[ii] == QVariant::Invalid) - argTypes[ii] = enumType(method->object->metaObject(), argTypeNames.at(ii)); + argTypes[ii] = enumType(method->object->metaObject(), QString::fromLatin1(argTypeNames.at(ii))); if (argTypes[ii] == QVariant::Invalid) return Value(ctxt, ctxt->throwError(QString::fromLatin1("Unknown method parameter type: %1").arg(QLatin1String(argTypeNames.at(ii))))); } diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index c956051..57cc9ab 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -895,7 +895,7 @@ QList<QDeclarativeError> QDeclarativeScriptParser::errors() const static void replaceWithSpace(QString &str, int idx, int n) { QChar *data = str.data() + idx; - QChar space(' '); + const QChar space(QLatin1Char(' ')); for (int ii = 0; ii < n; ++ii) *data++ = space; } diff --git a/src/declarative/qml/qdeclarativetypeloader.cpp b/src/declarative/qml/qdeclarativetypeloader.cpp index 9b42065..061f309 100644 --- a/src/declarative/qml/qdeclarativetypeloader.cpp +++ b/src/declarative/qml/qdeclarativetypeloader.cpp @@ -804,7 +804,7 @@ void QDeclarativeTypeData::done() error.setUrl(finalUrl()); error.setLine(script.location.line); error.setColumn(script.location.column); - error.setDescription(typeLoader()->tr("Script %1 unavailable").arg(script.script->url().toString())); + error.setDescription(QDeclarativeTypeLoader::tr("Script %1 unavailable").arg(script.script->url().toString())); errors.prepend(error); setError(errors); } @@ -822,7 +822,7 @@ void QDeclarativeTypeData::done() error.setUrl(finalUrl()); error.setLine(type.location.line); error.setColumn(type.location.column); - error.setDescription(typeLoader()->tr("Type %1 unavailable").arg(typeName)); + error.setDescription(QDeclarativeTypeLoader::tr("Type %1 unavailable").arg(typeName)); errors.prepend(error); setError(errors); } @@ -995,9 +995,9 @@ void QDeclarativeTypeData::resolveTypes() QString userTypeName = parserRef->name; userTypeName.replace(QLatin1Char('/'),QLatin1Char('.')); if (typeNamespace) - error.setDescription(typeLoader()->tr("Namespace %1 cannot be used as a type").arg(userTypeName)); + error.setDescription(QDeclarativeTypeLoader::tr("Namespace %1 cannot be used as a type").arg(userTypeName)); else - error.setDescription(typeLoader()->tr("%1 %2").arg(userTypeName).arg(errorString)); + error.setDescription(QDeclarativeTypeLoader::tr("%1 %2").arg(userTypeName).arg(errorString)); if (!parserRef->refObjects.isEmpty()) { QDeclarativeParser::Object *obj = parserRef->refObjects.first(); diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 98e9a58..fda62ee 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -47,7 +47,7 @@ QT_BEGIN_NAMESPACE -Q_DECL_IMPORT extern int qt_defaultDpi(); +Q_GUI_EXPORT int qt_defaultDpi(); template<typename T> int qmlRegisterValueTypeEnums(const char *qmlName) diff --git a/src/declarative/qml/qdeclarativexmlhttprequest.cpp b/src/declarative/qml/qdeclarativexmlhttprequest.cpp index 301ea1d..adfdbb3 100644 --- a/src/declarative/qml/qdeclarativexmlhttprequest.cpp +++ b/src/declarative/qml/qdeclarativexmlhttprequest.cpp @@ -1641,8 +1641,8 @@ static QScriptValue qmlxmlhttprequest_responseXML(QScriptContext *context, QScri THROW_REFERENCE("Not an XMLHttpRequest object"); if (!request->receivedXml() || - request->readyState() != QDeclarativeXMLHttpRequest::Loading && - request->readyState() != QDeclarativeXMLHttpRequest::Done) + (request->readyState() != QDeclarativeXMLHttpRequest::Loading && + request->readyState() != QDeclarativeXMLHttpRequest::Done)) return engine->nullValue(); else return Document::load(engine, request->rawResponseBody()); diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index 6637282..3a96f98 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -2699,14 +2699,15 @@ void QDeclarativeParentAnimation::transition(QDeclarativeStateActions &actions, qreal scale = 1; qreal rotation = 0; - if (ok && transform.type() != QTransform::TxRotate) { + bool isRotate = (transform.type() == QTransform::TxRotate) || (transform.m11() < 0); + if (ok && !isRotate) { if (transform.m11() == transform.m22()) scale = transform.m11(); else { qmlInfo(this) << QDeclarativeParentAnimation::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } - } else if (ok && transform.type() == QTransform::TxRotate) { + } else if (ok && isRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); else { diff --git a/src/declarative/util/qdeclarativefontloader.cpp b/src/declarative/util/qdeclarativefontloader.cpp index 1755855..6879494 100644 --- a/src/declarative/util/qdeclarativefontloader.cpp +++ b/src/declarative/util/qdeclarativefontloader.cpp @@ -58,23 +58,91 @@ QT_BEGIN_NAMESPACE +#define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 + +class QDeclarativeFontObject : public QObject +{ +Q_OBJECT + +public: + QDeclarativeFontObject(int _id); + + void download(const QUrl &url, QNetworkAccessManager *manager); + +Q_SIGNALS: + void fontDownloaded(const QString&, QDeclarativeFontLoader::Status); + +private Q_SLOTS: + void replyFinished(); + +public: + int id; + +private: + QNetworkReply *reply; + int redirectCount; + + Q_DISABLE_COPY(QDeclarativeFontObject) +}; + +QDeclarativeFontObject::QDeclarativeFontObject(int _id = -1) + : QObject(0), id(_id), reply(0), redirectCount(0) {} + + +void QDeclarativeFontObject::download(const QUrl &url, QNetworkAccessManager *manager) +{ + QNetworkRequest req(url); + req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); + reply = manager->get(req); + QObject::connect(reply, SIGNAL(finished()), this, SLOT(replyFinished())); +} + +void QDeclarativeFontObject::replyFinished() +{ + if (reply) { + redirectCount++; + if (redirectCount < FONTLOADER_MAXIMUM_REDIRECT_RECURSION) { + QVariant redirect = reply->attribute(QNetworkRequest::RedirectionTargetAttribute); + if (redirect.isValid()) { + QUrl url = reply->url().resolved(redirect.toUrl()); + QNetworkAccessManager *manager = reply->manager(); + reply->deleteLater(); + reply = 0; + download(url, manager); + return; + } + } + redirectCount = 0; + + if (!reply->error()) { + id = QFontDatabase::addApplicationFontFromData(reply->readAll()); + if (id != -1) + emit fontDownloaded(QFontDatabase::applicationFontFamilies(id).at(0), QDeclarativeFontLoader::Ready); + else + emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + } else { + emit fontDownloaded(QString(), QDeclarativeFontLoader::Error); + } + reply->deleteLater(); + reply = 0; + } +} + + class QDeclarativeFontLoaderPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeFontLoader) public: - QDeclarativeFontLoaderPrivate() : reply(0), status(QDeclarativeFontLoader::Null), redirectCount(0) {} - - void addFontToDatabase(const QByteArray &); + QDeclarativeFontLoaderPrivate() : status(QDeclarativeFontLoader::Null) {} QUrl url; QString name; - QNetworkReply *reply; QDeclarativeFontLoader::Status status; - int redirectCount; + static QHash<QUrl, QDeclarativeFontObject*> fonts; }; - +QHash<QUrl, QDeclarativeFontObject*> QDeclarativeFontLoaderPrivate::fonts; /*! \qmlclass FontLoader QDeclarativeFontLoader @@ -127,30 +195,61 @@ void QDeclarativeFontLoader::setSource(const QUrl &url) if (url == d->url) return; d->url = qmlContext(this)->resolvedUrl(url); - - d->status = Loading; - emit statusChanged(); emit sourceChanged(); + #ifndef QT_NO_LOCALFILE_OPTIMIZED_QML - QString lf = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); - if (!lf.isEmpty()) { - int id = QFontDatabase::addApplicationFont(lf); - if (id != -1) { - d->name = QFontDatabase::applicationFontFamilies(id).at(0); - emit nameChanged(); - d->status = QDeclarativeFontLoader::Ready; + QString localFile = QDeclarativeEnginePrivate::urlToLocalFileOrQrc(d->url); + if (!localFile.isEmpty()) { + if (!d->fonts.contains(d->url)) { + int id = QFontDatabase::addApplicationFont(localFile); + if (id != -1) { + updateFontInfo(QFontDatabase::applicationFontFamilies(id).at(0), Ready); + QDeclarativeFontObject *fo = new QDeclarativeFontObject(id); + d->fonts[d->url] = fo; + } else { + updateFontInfo(QString(), Error); + } } else { - d->status = QDeclarativeFontLoader::Error; - qmlInfo(this) << "Cannot load font: \"" << url.toString() << "\""; + updateFontInfo(QFontDatabase::applicationFontFamilies(d->fonts[d->url]->id).at(0), Ready); } - emit statusChanged(); } else #endif { - QNetworkRequest req(d->url); - req.setAttribute(QNetworkRequest::HttpPipeliningAllowedAttribute, true); - d->reply = qmlEngine(this)->networkAccessManager()->get(req); - QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(replyFinished())); + if (!d->fonts.contains(d->url)) { + QDeclarativeFontObject *fo = new QDeclarativeFontObject; + d->fonts[d->url] = fo; + fo->download(d->url, qmlEngine(this)->networkAccessManager()); + d->status = Loading; + emit statusChanged(); + QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)), + this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status))); + } else { + QDeclarativeFontObject *fo = d->fonts[d->url]; + if (fo->id == -1) { + d->status = Loading; + emit statusChanged(); + QObject::connect(fo, SIGNAL(fontDownloaded(QString, QDeclarativeFontLoader::Status)), + this, SLOT(updateFontInfo(QString, QDeclarativeFontLoader::Status))); + } + else + updateFontInfo(QFontDatabase::applicationFontFamilies(fo->id).at(0), Ready); + } + } +} + +void QDeclarativeFontLoader::updateFontInfo(const QString& name, QDeclarativeFontLoader::Status status) +{ + Q_D(QDeclarativeFontLoader); + + if (name != d->name) { + d->name = name; + emit nameChanged(); + } + if (status != d->status) { + if (status == Error) + qmlInfo(this) << "Cannot load font: \"" << d->url.toString() << "\""; + d->status = status; + emit statusChanged(); } } @@ -177,7 +276,7 @@ QString QDeclarativeFontLoader::name() const void QDeclarativeFontLoader::setName(const QString &name) { Q_D(QDeclarativeFontLoader); - if (d->name == name ) + if (d->name == name) return; d->name = name; emit nameChanged(); @@ -223,52 +322,6 @@ QDeclarativeFontLoader::Status QDeclarativeFontLoader::status() const return d->status; } -#define FONTLOADER_MAXIMUM_REDIRECT_RECURSION 16 - -void QDeclarativeFontLoader::replyFinished() -{ - Q_D(QDeclarativeFontLoader); - if (d->reply) { - d->redirectCount++; - if (d->redirectCount < FONTLOADER_MAXIMUM_REDIRECT_RECURSION) { - QVariant redirect = d->reply->attribute(QNetworkRequest::RedirectionTargetAttribute); - if (redirect.isValid()) { - QUrl url = d->reply->url().resolved(redirect.toUrl()); - d->reply->deleteLater(); - d->reply = 0; - setSource(url); - return; - } - } - d->redirectCount=0; - - if (!d->reply->error()) { - QByteArray ba = d->reply->readAll(); - d->addFontToDatabase(ba); - } else { - d->status = Error; - qmlInfo(this) << "Cannot load font: \"" << d->reply->url().toString() << "\""; - emit statusChanged(); - } - d->reply->deleteLater(); - d->reply = 0; - } -} - -void QDeclarativeFontLoaderPrivate::addFontToDatabase(const QByteArray &ba) -{ - Q_Q(QDeclarativeFontLoader); - - int id = QFontDatabase::addApplicationFontFromData(ba); - if (id != -1) { - name = QFontDatabase::applicationFontFamilies(id).at(0); - emit q->nameChanged(); - status = QDeclarativeFontLoader::Ready; - } else { - status = QDeclarativeFontLoader::Error; - qmlInfo(q) << "Cannot load font: \"" << url.toString() << "\""; - } - emit q->statusChanged(); -} - QT_END_NAMESPACE + +#include <qdeclarativefontloader.moc> diff --git a/src/declarative/util/qdeclarativefontloader_p.h b/src/declarative/util/qdeclarativefontloader_p.h index 0344d99..bebd5a0 100644 --- a/src/declarative/util/qdeclarativefontloader_p.h +++ b/src/declarative/util/qdeclarativefontloader_p.h @@ -79,7 +79,7 @@ public: Status status() const; private Q_SLOTS: - void replyFinished(); + void updateFontInfo(const QString&, QDeclarativeFontLoader::Status); Q_SIGNALS: void sourceChanged(); diff --git a/src/declarative/util/qdeclarativelistmodel.cpp b/src/declarative/util/qdeclarativelistmodel.cpp index c7d5024..5ce95e9 100644 --- a/src/declarative/util/qdeclarativelistmodel.cpp +++ b/src/declarative/util/qdeclarativelistmodel.cpp @@ -58,6 +58,28 @@ Q_DECLARE_METATYPE(QListModelInterface *) QT_BEGIN_NAMESPACE +template<typename T> +void qdeclarativelistmodel_move(int from, int to, int n, T *items) +{ + if (n == 1) { + items->move(from, to); + } else { + T replaced; + int i=0; + typename T::ConstIterator it=items->begin(); it += from+n; + for (; i<to-from; ++i,++it) + replaced.append(*it); + i=0; + it=items->begin(); it += from; + for (; i<n; ++i,++it) + replaced.append(*it); + typename T::ConstIterator f=replaced.begin(); + typename T::Iterator t=items->begin(); t += from; + for (; f != replaced.end(); ++f, ++t) + *t = *f; + } +} + QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListModelData::instructions() const { return (QDeclarativeListModelParser::ListInstruction *)((char *)this + sizeof(ListModelData)); @@ -69,49 +91,67 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \since 4.7 \brief The ListModel element defines a free-form list data source. - The ListModel is a simple hierarchy of elements containing data roles. The contents can - be defined dynamically, or explicitly in QML: + The ListModel is a simple container of ListElement definitions, each containing data roles. + The contents can be defined dynamically, or explicitly in QML. - For example: + The number of elements in the model can be obtained from its \l count property. + A number of familiar methods are also provided to manipulate the contents of the + model, including append(), insert(), move(), remove() and set(). These methods + accept dictionaries as their arguments; these are translated to ListElement objects + by the model. - \snippet doc/src/snippets/declarative/listmodel.qml 0 + Elements can be manipulated via the model using the setProperty() method, which + allows the roles of the specified element to be set and changed. - Roles (properties) must begin with a lower-case letter. The above example defines a - ListModel containing three elements, with the roles "name" and "cost". + \section1 Example Usage - Values must be simple constants - either strings (quoted and optionally within a call to QT_TR_NOOP), - bools (true, false), numbers, or enum values (like Text.AlignHCenter). + The following example shows a ListModel containing three elements, with the roles + "name" and "cost". + + \beginfloatright + \inlineimage listmodel.png + \endfloat + + \snippet doc/src/snippets/declarative/listmodel.qml 0 - The defined model can be used in views such as ListView: + \clearfloat + Roles (properties) in each element must begin with a lower-case letter and + should be common to all elements in a model. The ListElement documentation + provides more guidelines for how elements should be defined. + + Since the example model contains an \c id property, it can be referenced + by views, such as the ListView in this example: \snippet doc/src/snippets/declarative/listmodel-simple.qml 0 \dots 8 \snippet doc/src/snippets/declarative/listmodel-simple.qml 1 - \image listmodel.png - It is possible for roles to contain list data. In the example below we create a list of fruit attributes: + It is possible for roles to contain list data. In the following example we + create a list of fruit attributes: \snippet doc/src/snippets/declarative/listmodel-nested.qml model - The delegate below displays all the fruit attributes: + The delegate displays all the fruit attributes: - \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate - \image listmodel-nested.png + \beginfloatright + \inlineimage listmodel-nested.png + \endfloat + \snippet doc/src/snippets/declarative/listmodel-nested.qml delegate - \section2 Modifying list models + \clearfloat + \section1 Modifying List Models The content of a ListModel may be created and modified using the clear(), append(), set() and setProperty() methods. For example: - - \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate - Note that when creating content dynamically the set of available properties cannot be changed - once set. Whatever properties are first added to the model are the - only permitted properties in the model. + \snippet doc/src/snippets/declarative/listmodel-modify.qml delegate + Note that when creating content dynamically the set of available properties + cannot be changed once set. Whatever properties are first added to the model + are the only permitted properties in the model. - \section2 Using threaded list models with WorkerScript + \section1 Using Threaded List Models with WorkerScript ListModel can be used together with WorkerScript access a list model from multiple threads. This is useful if list modifications are @@ -127,19 +167,19 @@ QDeclarativeListModelParser::ListInstruction *QDeclarativeListModelParser::ListM \snippet examples/declarative/threading/threadedlistmodel/dataloader.js 0 -working-with-data - worker script by calling \l WorkerScript::sendMessage(). When this message - is received, \l {WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in - \tt dataloader.js, which appends the current time to the list model. + The timer in the main example sends messages to the worker script by calling + \l WorkerScript::sendMessage(). When this message is received, + \l{WorkerScript::onMessage}{WorkerScript.onMessage()} is invoked in \c dataloader.js, + which appends the current time to the list model. - Note the call to sync() from the \l {WorkerScript::onMessage}{WorkerScript.onMessage()} handler. - You must call sync() or else the changes made to the list from the external + Note the call to sync() from the \l{WorkerScript::onMessage}{WorkerScript.onMessage()} + handler. You must call sync() or else the changes made to the list from the external thread will not be reflected in the list model in the main thread. - \section3 Limitations + \section1 Restrictions - If a list model is to be accessed from a WorkerScript, it \bold cannot - contain list data. So, the following model cannot be used from a WorkerScript + If a list model is to be accessed from a WorkerScript, it cannot + contain list-type data. So, the following model cannot be used from a WorkerScript because of the list contained in the "attributes" property: \code @@ -156,7 +196,7 @@ working-with-data } \endcode - In addition, the WorkerScript cannot add any list data to the model. + In addition, the WorkerScript cannot add list-type data to the model. \sa {qmlmodels}{Data Models}, {declarative/threading/threadedlistmodel}{Threaded ListModel example}, QtDeclarative */ @@ -177,17 +217,25 @@ working-with-data */ QDeclarativeListModel::QDeclarativeListModel(QObject *parent) -: QListModelInterface(parent), m_agent(0), m_nested(new NestedListModel(this)), m_flat(0), m_isWorkerCopy(false) +: QListModelInterface(parent), m_agent(0), m_nested(new NestedListModel(this)), m_flat(0) { } -QDeclarativeListModel::QDeclarativeListModel(bool workerCopy, QObject *parent) -: QListModelInterface(parent), m_agent(0), m_nested(0), m_flat(0), m_isWorkerCopy(workerCopy) +QDeclarativeListModel::QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent) +: QListModelInterface(parent), m_agent(0), m_nested(0), m_flat(0) { - if (workerCopy) - m_flat = new FlatListModel(this); - else - m_nested = new NestedListModel(this); + m_flat = new FlatListModel(this); + m_flat->m_parentAgent = parent; + + if (orig->m_flat) { + m_flat->m_roles = orig->m_flat->m_roles; + m_flat->m_strings = orig->m_flat->m_strings; + m_flat->m_values = orig->m_flat->m_values; + + m_flat->m_nodeData.reserve(m_flat->m_values.count()); + for (int i=0; i<m_flat->m_values.count(); i++) + m_flat->m_nodeData << 0; + } } QDeclarativeListModel::~QDeclarativeListModel() @@ -223,19 +271,28 @@ bool QDeclarativeListModel::flatten() flat->m_strings.insert(s, roles[i]); } + flat->m_nodeData.reserve(flat->m_values.count()); + for (int i=0; i<flat->m_values.count(); i++) + flat->m_nodeData << 0; + m_flat = flat; delete m_nested; m_nested = 0; return true; } +bool QDeclarativeListModel::inWorkerThread() const +{ + return m_flat && m_flat->m_parentAgent; +} + QDeclarativeListModelWorkerAgent *QDeclarativeListModel::agent() { if (m_agent) return m_agent; if (!flatten()) { - qmlInfo(this) << "List contains nested list values and cannot be used from a worker script"; + qmlInfo(this) << "List contains list-type data and cannot be used from a worker script"; return 0; } @@ -293,12 +350,43 @@ void QDeclarativeListModel::clear() else m_nested->clear(); - if (!m_isWorkerCopy) { + if (!inWorkerThread()) { emit itemsRemoved(0, cleared); emit countChanged(); } } +QDeclarativeListModel *ModelNode::model(const NestedListModel *model) +{ + if (!modelCache) { + modelCache = new QDeclarativeListModel; + QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(model->m_listModel)); + modelCache->m_nested->_root = this; // ListModel defaults to nestable model + + for (int i=0; i<values.count(); ++i) { + ModelNode *subNode = qvariant_cast<ModelNode *>(values.at(i)); + if (subNode) + subNode->m_model = modelCache->m_nested; + } + } + return modelCache; +} + +ModelObject *ModelNode::object(const NestedListModel *model) +{ + if (!objectCache) { + objectCache = new ModelObject(this, + const_cast<NestedListModel*>(model), + QDeclarativeEnginePrivate::getScriptEngine(qmlEngine(model->m_listModel))); + QHash<QString, ModelNode *>::iterator it; + for (it = properties.begin(); it != properties.end(); ++it) { + objectCache->setValue(it.key().toUtf8(), model->valueForNode(*it)); + } + objectCache->setNodeUpdatesEnabled(true); + } + return objectCache; +} + /*! \qmlmethod ListModel::remove(int index) @@ -318,7 +406,7 @@ void QDeclarativeListModel::remove(int index) else m_nested->remove(index); - if (!m_isWorkerCopy) { + if (!inWorkerThread()) { emit itemsRemoved(index, 1); emit countChanged(); } @@ -352,7 +440,7 @@ void QDeclarativeListModel::insert(int index, const QScriptValue& valuemap) } bool ok = m_flat ? m_flat->insert(index, valuemap) : m_nested->insert(index, valuemap); - if (ok && !m_isWorkerCopy) { + if (ok && !inWorkerThread()) { emit itemsInserted(index, 1); emit countChanged(); } @@ -376,7 +464,7 @@ void QDeclarativeListModel::move(int from, int to, int n) { if (n==0 || from==to) return; - if (from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0) { + if (!canMove(from, to, n)) { qmlInfo(this) << tr("move: out of range"); return; } @@ -398,7 +486,7 @@ void QDeclarativeListModel::move(int from, int to, int n) else m_nested->move(from, to, n); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsMoved(origfrom, origto, orign); } @@ -427,11 +515,15 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap) /*! \qmlmethod object ListModel::get(int index) - Returns the item at \a index in the list model. + Returns the item at \a index in the list model. This allows the item + data to be accessed or modified from JavaScript: \code - fruitModel.append({"cost": 5.95, "name":"Jackfruit"}) - fruitModel.get(0).cost + Component.onCompleted: { + fruitModel.append({"cost": 5.95, "name":"Jackfruit"}); + console.log(fruitModel.get(0).cost); + fruitModel.get(0).cost = 10.95; + } \endcode The \a index must be an element in the list. @@ -446,6 +538,9 @@ void QDeclarativeListModel::append(const QScriptValue& valuemap) fruitModel.get(0).attributes.get(1).value; // == "green" \endcode + \warning The returned object is not guaranteed to remain valid. It + should not be used in \l{Property Binding}{property bindings}. + \sa append() */ QScriptValue QDeclarativeListModel::get(int index) const @@ -489,7 +584,7 @@ void QDeclarativeListModel::set(int index, const QScriptValue& valuemap) else m_nested->set(index, valuemap, &roles); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsChanged(index, 1, roles); } } @@ -520,7 +615,7 @@ void QDeclarativeListModel::setProperty(int index, const QString& property, cons else m_nested->setProperty(index, property, value, &roles); - if (!m_isWorkerCopy) + if (!inWorkerThread()) emit itemsChanged(index, 1, roles); } @@ -687,7 +782,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & { QDeclarativeListModel *rv = static_cast<QDeclarativeListModel *>(obj); - ModelNode *root = new ModelNode; + ModelNode *root = new ModelNode(rv->m_nested); rv->m_nested->_root = root; QStack<ModelNode *> nodes; nodes << root; @@ -704,7 +799,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & case ListInstruction::Push: { ModelNode *n = nodes.top(); - ModelNode *n2 = new ModelNode; + ModelNode *n2 = new ModelNode(rv->m_nested); n->values << QVariant::fromValue(n2); nodes.push(n2); if (processingSet) @@ -743,7 +838,7 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & case ListInstruction::Set: { ModelNode *n = nodes.top(); - ModelNode *n2 = new ModelNode; + ModelNode *n2 = new ModelNode(rv->m_nested); n->properties.insert(QString::fromUtf8(data + instr.dataIdx), n2); nodes.push(n2); processingSet = true; @@ -751,6 +846,13 @@ void QDeclarativeListModelParser::setCustomData(QObject *obj, const QByteArray & break; } } + + ModelNode *rootNode = rv->m_nested->_root; + for (int i=0; i<rootNode->values.count(); ++i) { + ModelNode *node = qvariant_cast<ModelNode *>(rootNode->values[i]); + node->listIndex = i; + node->updateListIndexes(); + } } bool QDeclarativeListModelParser::definesEmptyList(const QString &s) @@ -765,22 +867,57 @@ bool QDeclarativeListModelParser::definesEmptyList(const QString &s) return false; } + /*! \qmlclass ListElement QDeclarativeListElement \ingroup qml-working-with-data \since 4.7 \brief The ListElement element defines a data item in a ListModel. + List elements are defined inside ListModel definitions, and represent items in a + list that will be displayed using ListView or \l Repeater items. + + List elements are defined like other QML elements except that they contain + a collection of \e role definitions instead of properties. Using the same + syntax as property definitions, roles both define how the data is accessed + and include the data itself. + + The names used for roles must begin with a lower-case letter and should be + common to all elements in a given model. Values must be simple constants; either + strings (quoted and optionally within a call to QT_TR_NOOP), boolean values + (true, false), numbers, or enumeration values (such as AlignText.AlignHCenter). + + \section1 Referencing Roles + + The role names are used by delegates to obtain data from list elements. + Each role name is accessible in the delegate's scope, and refers to the + corresponding role in the current element. Where a role name would be + ambiguous to use, it can be accessed via the \l{ListView::}{model} + property (e.g., \c{model.cost} instead of \c{cost}). + + \section1 Example Usage + + The following model defines a series of list elements, each of which + contain "name" and "cost" roles and their associated values. + + \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml model + + The delegate obtains the name and cost for each element by simply referring + to \c name and \c cost: + + \snippet doc/src/snippets/declarative/qml-data-models/listelements.qml view + \sa ListModel */ FlatListModel::FlatListModel(QDeclarativeListModel *base) - : m_scriptEngine(0), m_listModel(base) + : m_scriptEngine(0), m_listModel(base), m_scriptClass(0), m_parentAgent(0) { } FlatListModel::~FlatListModel() { + qDeleteAll(m_nodeData); } QHash<int,QVariant> FlatListModel::data(int index, const QList<int> &roles) const @@ -824,11 +961,15 @@ int FlatListModel::count() const void FlatListModel::clear() { m_values.clear(); + + qDeleteAll(m_nodeData); + m_nodeData.clear(); } void FlatListModel::remove(int index) { m_values.removeAt(index); + removedNode(index); } bool FlatListModel::append(const QScriptValue &value) @@ -845,6 +986,8 @@ bool FlatListModel::insert(int index, const QScriptValue &value) return false; m_values.insert(index, row); + insertedNode(index); + return true; } @@ -858,13 +1001,17 @@ QScriptValue FlatListModel::get(int index) const if (index < 0 || index >= m_values.count()) return scriptEngine->undefinedValue(); - QScriptValue rv = scriptEngine->newObject(); + FlatListModel *that = const_cast<FlatListModel*>(this); + if (!m_scriptClass) + that->m_scriptClass = new FlatListScriptClass(that, scriptEngine); - QHash<int, QVariant> row = m_values.at(index); - for (QHash<int, QVariant>::ConstIterator iter = row.begin(); iter != row.end(); ++iter) - rv.setProperty(m_roles.value(iter.key()), scriptEngine->toScriptValue(iter.value())); + FlatNodeData *data = m_nodeData.value(index); + if (!data) { + data = new FlatNodeData(index); + that->m_nodeData.replace(index, data); + } - return rv; + return QScriptDeclarativeClass::newObject(scriptEngine, m_scriptClass, new FlatNodeObjectData(data)); } void FlatListModel::set(int index, const QScriptValue &value, QList<int> *roles) @@ -896,23 +1043,8 @@ void FlatListModel::setProperty(int index, const QString& property, const QVaria void FlatListModel::move(int from, int to, int n) { - if (n == 1) { - m_values.move(from, to); - } else { - QList<QHash<int, QVariant> > replaced; - int i=0; - QList<QHash<int, QVariant> >::ConstIterator it=m_values.begin(); it += from+n; - for (; i<to-from; ++i,++it) - replaced.append(*it); - i=0; - it=m_values.begin(); it += from; - for (; i<n; ++i,++it) - replaced.append(*it); - QList<QHash<int, QVariant> >::ConstIterator f=replaced.begin(); - QList<QHash<int, QVariant> >::Iterator t=m_values.begin(); t += from; - for (; f != replaced.end(); ++f, ++t) - *t = *f; - } + qdeclarativelistmodel_move<QList<QHash<int, QVariant> > >(from, to, n, &m_values); + moveNodes(from, to, n); } bool FlatListModel::addValue(const QScriptValue &value, QHash<int, QVariant> *row, QList<int> *roles) @@ -922,7 +1054,7 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash<int, QVariant> *ro it.next(); QScriptValue value = it.value(); if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { - qmlInfo(m_listModel) << "Cannot add nested list values when modifying or after modification from a worker script"; + qmlInfo(m_listModel) << "Cannot add list-type data when modifying or after modification from a worker script"; return false; } @@ -942,6 +1074,139 @@ bool FlatListModel::addValue(const QScriptValue &value, QHash<int, QVariant> *ro return true; } +void FlatListModel::insertedNode(int index) +{ + if (index >= 0 && index <= m_values.count()) { + m_nodeData.insert(index, 0); + + for (int i=index + 1; i<m_nodeData.count(); i++) { + if (m_nodeData[i]) + m_nodeData[i]->index = i; + } + } +} + +void FlatListModel::removedNode(int index) +{ + if (index >= 0 && index < m_nodeData.count()) { + delete m_nodeData.takeAt(index); + + for (int i=index; i<m_nodeData.count(); i++) { + if (m_nodeData[i]) + m_nodeData[i]->index = i; + } + } +} + +void FlatListModel::moveNodes(int from, int to, int n) +{ + if (!m_listModel->canMove(from, to, n)) + return; + + qdeclarativelistmodel_move<QList<FlatNodeData *> >(from, to, n, &m_nodeData); + + for (int i=from; i<from + (to-from); i++) { + if (m_nodeData[i]) + m_nodeData[i]->index = i; + } +} + + + +FlatNodeData::~FlatNodeData() +{ + for (QSet<FlatNodeObjectData *>::Iterator iter = objects.begin(); iter != objects.end(); ++iter) { + FlatNodeObjectData *data = *iter; + data->nodeData = 0; + } +} + +void FlatNodeData::addData(FlatNodeObjectData *data) +{ + objects.insert(data); +} + +void FlatNodeData::removeData(FlatNodeObjectData *data) +{ + objects.remove(data); +} + + +FlatListScriptClass::FlatListScriptClass(FlatListModel *model, QScriptEngine *seng) + : QScriptDeclarativeClass(seng), + m_model(model) +{ +} + +QScriptDeclarativeClass::Value FlatListScriptClass::property(Object *obj, const Identifier &name) +{ + FlatNodeObjectData *objData = static_cast<FlatNodeObjectData*>(obj); + if (!objData->nodeData) // item at this index has been deleted + return QScriptDeclarativeClass::Value(engine(), engine()->undefinedValue()); + + int index = objData->nodeData->index; + QString propName = toString(name); + int role = m_model->m_strings.value(propName, -1); + + if (role >= 0 && index >=0 ) { + const QHash<int, QVariant> &row = m_model->m_values[index]; + QScriptValue sv = engine()->toScriptValue<QVariant>(row[role]); + return QScriptDeclarativeClass::Value(engine(), sv); + } + + return QScriptDeclarativeClass::Value(engine(), engine()->undefinedValue()); +} + +void FlatListScriptClass::setProperty(Object *obj, const Identifier &name, const QScriptValue &value) +{ + if (!value.isVariant() && !value.isRegExp() && !value.isDate() && value.isObject()) { + qmlInfo(m_model->m_listModel) << "Cannot add list-type data when modifying or after modification from a worker script"; + return; + } + + FlatNodeObjectData *objData = static_cast<FlatNodeObjectData*>(obj); + if (!objData->nodeData) // item at this index has been deleted + return; + + int index = objData->nodeData->index; + QString propName = toString(name); + + int role = m_model->m_strings.value(propName, -1); + if (role >= 0 && index >= 0) { + QHash<int, QVariant> &row = m_model->m_values[index]; + row[role] = value.toVariant(); + + if (m_model->m_parentAgent) { + // This is the list in the worker thread, so tell the agent to + // emit itemsChanged() later + m_model->m_parentAgent->changedData(index, 1); + } else { + // This is the list in the main thread, so emit itemsChanged() + QList<int> roles; + roles << role; + emit m_model->m_listModel->itemsChanged(index, 1, roles); + } + } +} + +QScriptClass::QueryFlags FlatListScriptClass::queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags) +{ + return (QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess); +} + +bool FlatListScriptClass::compare(Object *obj1, Object *obj2) +{ + FlatNodeObjectData *data1 = static_cast<FlatNodeObjectData*>(obj1); + FlatNodeObjectData *data2 = static_cast<FlatNodeObjectData*>(obj2); + + if (!data1->nodeData || !data2->nodeData) + return false; + + return data1->nodeData->index == data2->nodeData->index; +} + + + NestedListModel::NestedListModel(QDeclarativeListModel *base) : _root(0), m_ownsRoot(false), m_listModel(base), _rolesOk(false) { @@ -1067,11 +1332,12 @@ void NestedListModel::remove(int index) bool NestedListModel::insert(int index, const QScriptValue& valuemap) { if (!_root) { - _root = new ModelNode; + _root = new ModelNode(this); m_ownsRoot = true; } - ModelNode *mn = new ModelNode; + ModelNode *mn = new ModelNode(this); + mn->listIndex = index; mn->setObjectValue(valuemap); _root->values.insert(index,QVariant::fromValue(mn)); return true; @@ -1079,34 +1345,19 @@ bool NestedListModel::insert(int index, const QScriptValue& valuemap) void NestedListModel::move(int from, int to, int n) { - if (n==1) { - _root->values.move(from,to); - } else { - QList<QVariant> replaced; - int i=0; - QVariantList::const_iterator it=_root->values.begin(); it += from+n; - for (; i<to-from; ++i,++it) - replaced.append(*it); - i=0; - it=_root->values.begin(); it += from; - for (; i<n; ++i,++it) - replaced.append(*it); - QVariantList::const_iterator f=replaced.begin(); - QVariantList::iterator t=_root->values.begin(); t += from; - for (; f != replaced.end(); ++f, ++t) - *t = *f; - } + if (!_root) + return; + qdeclarativelistmodel_move<QVariantList>(from, to, n, &_root->values); } bool NestedListModel::append(const QScriptValue& valuemap) { if (!_root) { - _root = new ModelNode; + _root = new ModelNode(this); m_ownsRoot = true; } - ModelNode *mn = new ModelNode; - mn->setObjectValue(valuemap); - _root->values << QVariant::fromValue(mn); + + insert(count(), valuemap); return true; } @@ -1201,8 +1452,8 @@ QString NestedListModel::toString(int role) const } -ModelNode::ModelNode() -: modelCache(0), objectCache(0), isArray(false) +ModelNode::ModelNode(NestedListModel *model) +: modelCache(0), objectCache(0), isArray(false), m_model(model), listIndex(-1) { } @@ -1226,18 +1477,18 @@ void ModelNode::clear() properties.clear(); } -void ModelNode::setObjectValue(const QScriptValue& valuemap) { +void ModelNode::setObjectValue(const QScriptValue& valuemap, bool writeToCache) { QScriptValueIterator it(valuemap); while (it.hasNext()) { it.next(); - ModelNode *value = new ModelNode; + ModelNode *value = new ModelNode(m_model); QScriptValue v = it.value(); if (v.isArray()) { value->isArray = true; value->setListValue(v); } else { value->values << v.toVariant(); - if (objectCache) + if (writeToCache && objectCache) objectCache->setValue(it.name().toUtf8(), value->values.last()); } if (properties.contains(it.name())) @@ -1250,14 +1501,16 @@ void ModelNode::setListValue(const QScriptValue& valuelist) { values.clear(); int size = valuelist.property(QLatin1String("length")).toInt32(); for (int i=0; i<size; i++) { - ModelNode *value = new ModelNode; + ModelNode *value = new ModelNode(m_model); QScriptValue v = valuelist.property(i); if (v.isArray()) { value->isArray = true; value->setListValue(v); } else if (v.isObject()) { + value->listIndex = i; value->setObjectValue(v); } else { + value->listIndex = i; value->values << v.toVariant(); } values.append(QVariant::fromValue(value)); @@ -1269,7 +1522,7 @@ void ModelNode::setProperty(const QString& prop, const QVariant& val) { if (it != properties.end()) { (*it)->values[0] = val; } else { - ModelNode *n = new ModelNode; + ModelNode *n = new ModelNode(m_model); n->values << val; properties.insert(prop,n); } @@ -1277,6 +1530,40 @@ void ModelNode::setProperty(const QString& prop, const QVariant& val) { objectCache->setValue(prop.toUtf8(), val); } +void ModelNode::updateListIndexes() +{ + for (QHash<QString, ModelNode *>::ConstIterator iter = properties.begin(); iter != properties.end(); ++iter) { + ModelNode *node = iter.value(); + if (node->isArray) { + for (int i=0; i<node->values.count(); ++i) { + ModelNode *subNode = qvariant_cast<ModelNode *>(node->values.at(i)); + if (subNode) + subNode->listIndex = i; + } + } + node->updateListIndexes(); + } +} + +/* + Need to call this to emit itemsChanged() for modifications outside of set() + and setProperty(), i.e. if an item returned from get() is modified +*/ +void ModelNode::changedProperty(const QString &name) const +{ + if (listIndex < 0) + return; + + m_model->checkRoles(); + QList<int> roles; + int role = m_model->roleStrings.indexOf(name); + if (role < 0) + roles = m_model->roles(); + else + roles << role; + emit m_model->m_listModel->itemsChanged(listIndex, 1, roles); +} + void ModelNode::dump(ModelNode *node, int ind) { QByteArray indentBa(ind * 4, ' '); @@ -1298,16 +1585,47 @@ void ModelNode::dump(ModelNode *node, int ind) } } -ModelObject::ModelObject() -: _mo(new QDeclarativeOpenMetaObject(this)) +ModelObject::ModelObject(ModelNode *node, NestedListModel *model, QScriptEngine *seng) + : m_model(model), + m_node(node), + m_meta(new ModelNodeMetaObject(seng, this)) { } void ModelObject::setValue(const QByteArray &name, const QVariant &val) { - _mo->setValue(name, val); + m_meta->setValue(name, val); setProperty(name.constData(), val); } +void ModelObject::setNodeUpdatesEnabled(bool enable) +{ + m_meta->m_enabled = enable; +} + + +ModelNodeMetaObject::ModelNodeMetaObject(QScriptEngine *seng, ModelObject *object) + : QDeclarativeOpenMetaObject(object), + m_enabled(false), + m_seng(seng), + m_obj(object) +{ +} + +void ModelNodeMetaObject::propertyWritten(int index) +{ + if (!m_enabled) + return; + + QString propName = QString::fromUtf8(name(index)); + QVariant value = operator[](index); + + QScriptValue sv = m_seng->newObject(); + sv.setProperty(propName, m_seng->newVariant(value)); + m_obj->m_node->setObjectValue(sv, false); + + m_obj->m_node->changedProperty(propName); +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativelistmodel_p.h b/src/declarative/util/qdeclarativelistmodel_p.h index 6aff9c6..fe42ef6 100644 --- a/src/declarative/util/qdeclarativelistmodel_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p.h @@ -63,6 +63,7 @@ class FlatListModel; class NestedListModel; class QDeclarativeListModelWorkerAgent; struct ModelNode; +class FlatListScriptClass; class Q_DECLARATIVE_EXPORT QDeclarativeListModel : public QListModelInterface { Q_OBJECT @@ -96,16 +97,21 @@ Q_SIGNALS: private: friend class QDeclarativeListModelParser; friend class QDeclarativeListModelWorkerAgent; + friend class FlatListModel; + friend class FlatListScriptClass; friend struct ModelNode; - QDeclarativeListModel(bool workerCopy, QObject *parent=0); + // Constructs a flat list model for a worker agent + QDeclarativeListModel(const QDeclarativeListModel *orig, QDeclarativeListModelWorkerAgent *parent); + bool flatten(); - bool modifyCheck(); + bool inWorkerThread() const; + + inline bool canMove(int from, int to, int n) const { return !(from+n > count() || to+n > count() || from < 0 || to < 0 || n < 0); } QDeclarativeListModelWorkerAgent *m_agent; NestedListModel *m_nested; FlatListModel *m_flat; - bool m_isWorkerCopy; }; // ### FIXME diff --git a/src/declarative/util/qdeclarativelistmodel_p_p.h b/src/declarative/util/qdeclarativelistmodel_p_p.h index 8231414..d2d40ee 100644 --- a/src/declarative/util/qdeclarativelistmodel_p_p.h +++ b/src/declarative/util/qdeclarativelistmodel_p_p.h @@ -54,9 +54,11 @@ // #include "private/qdeclarativelistmodel_p.h" - -#include "qdeclarative.h" #include "private/qdeclarativeengine_p.h" +#include "private/qdeclarativeopenmetaobject_p.h" +#include "qdeclarative.h" + +#include <private/qscriptdeclarativeclass_p.h> QT_BEGIN_HEADER @@ -68,6 +70,8 @@ class QDeclarativeOpenMetaObject; class QScriptEngine; class QDeclarativeListModelWorkerAgent; struct ModelNode; +class FlatListScriptClass; +class FlatNodeData; class FlatListModel { @@ -94,16 +98,82 @@ public: private: friend class QDeclarativeListModelWorkerAgent; friend class QDeclarativeListModel; + friend class FlatListScriptClass; + friend class FlatNodeData; bool addValue(const QScriptValue &value, QHash<int, QVariant> *row, QList<int> *roles); + void insertedNode(int index); + void removedNode(int index); + void moveNodes(int from, int to, int n); QScriptEngine *m_scriptEngine; QHash<int, QString> m_roles; QHash<QString, int> m_strings; QList<QHash<int, QVariant> > m_values; QDeclarativeListModel *m_listModel; + + FlatListScriptClass *m_scriptClass; + QList<FlatNodeData *> m_nodeData; + QDeclarativeListModelWorkerAgent *m_parentAgent; +}; + + +/* + Created when get() is called on a FlatListModel. This allows changes to the + object returned by get() to be tracked, and passed onto the model. +*/ +class FlatListScriptClass : public QScriptDeclarativeClass +{ +public: + FlatListScriptClass(FlatListModel *model, QScriptEngine *seng); + + Value property(Object *, const Identifier &); + void setProperty(Object *, const Identifier &name, const QScriptValue &); + QScriptClass::QueryFlags queryProperty(Object *, const Identifier &, QScriptClass::QueryFlags flags); + bool compare(Object *, Object *); + +private: + FlatListModel *m_model; +}; + +/* + FlatNodeData and FlatNodeObjectData allow objects returned by get() to still + point to the correct list index if move(), insert() or remove() are called. +*/ +struct FlatNodeObjectData; +class FlatNodeData +{ +public: + FlatNodeData(int i) + : index(i) {} + + ~FlatNodeData(); + + void addData(FlatNodeObjectData *data); + void removeData(FlatNodeObjectData *data); + + int index; + +private: + QSet<FlatNodeObjectData*> objects; +}; + +struct FlatNodeObjectData : public QScriptDeclarativeClass::Object +{ + FlatNodeObjectData(FlatNodeData *data) : nodeData(data) { + nodeData->addData(this); + } + + ~FlatNodeObjectData() { + if (nodeData) + nodeData->removeData(this); + } + + FlatNodeData *nodeData; }; + + class NestedListModel { public: @@ -134,25 +204,50 @@ public: QDeclarativeListModel *m_listModel; private: + friend struct ModelNode; mutable QStringList roleStrings; mutable bool _rolesOk; }; +class ModelNodeMetaObject; class ModelObject : public QObject { Q_OBJECT public: - ModelObject(); + ModelObject(ModelNode *node, NestedListModel *model, QScriptEngine *seng); void setValue(const QByteArray &name, const QVariant &val); + void setNodeUpdatesEnabled(bool enable); + + NestedListModel *m_model; + ModelNode *m_node; private: - QDeclarativeOpenMetaObject *_mo; + ModelNodeMetaObject *m_meta; }; +class ModelNodeMetaObject : public QDeclarativeOpenMetaObject +{ +public: + ModelNodeMetaObject(QScriptEngine *seng, ModelObject *object); + + bool m_enabled; + +protected: + void propertyWritten(int index); + +private: + QScriptEngine *m_seng; + ModelObject *m_obj; +}; + + +/* + A ModelNode is created for each item in a NestedListModel. +*/ struct ModelNode { - ModelNode(); + ModelNode(NestedListModel *model); ~ModelNode(); QList<QVariant> values; @@ -160,35 +255,22 @@ struct ModelNode void clear(); - QDeclarativeListModel *model(const NestedListModel *model) { - if (!modelCache) { - modelCache = new QDeclarativeListModel; - QDeclarativeEngine::setContextForObject(modelCache,QDeclarativeEngine::contextForObject(model->m_listModel)); - modelCache->m_nested->_root = this; // ListModel defaults to nestable model - } - return modelCache; - } - - ModelObject *object(const NestedListModel *model) { - if (!objectCache) { - objectCache = new ModelObject(); - QHash<QString, ModelNode *>::iterator it; - for (it = properties.begin(); it != properties.end(); ++it) { - objectCache->setValue(it.key().toUtf8(), model->valueForNode(*it)); - } - } - return objectCache; - } + QDeclarativeListModel *model(const NestedListModel *model); + ModelObject *object(const NestedListModel *model); - - void setObjectValue(const QScriptValue& valuemap); + void setObjectValue(const QScriptValue& valuemap, bool writeToCache = true); void setListValue(const QScriptValue& valuelist); void setProperty(const QString& prop, const QVariant& val); + void changedProperty(const QString &name) const; + void updateListIndexes(); static void dump(ModelNode *node, int ind); QDeclarativeListModel *modelCache; ModelObject *objectCache; bool isArray; + + NestedListModel *m_model; + int listIndex; // only used for top-level nodes within a list }; diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp index d9df169..6804d4a 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent.cpp +++ b/src/declarative/util/qdeclarativelistmodelworkeragent.cpp @@ -83,11 +83,11 @@ void QDeclarativeListModelWorkerAgent::Data::changedChange(int index, int count) } QDeclarativeListModelWorkerAgent::QDeclarativeListModelWorkerAgent(QDeclarativeListModel *model) -: m_engine(0), m_ref(1), m_orig(model), m_copy(new QDeclarativeListModel(true, this)) + : m_engine(0), + m_ref(1), + m_orig(model), + m_copy(new QDeclarativeListModel(model, this)) { - m_copy->m_flat->m_roles = m_orig->m_flat->m_roles; - m_copy->m_flat->m_strings = m_orig->m_flat->m_strings; - m_copy->m_flat->m_values = m_orig->m_flat->m_values; } QDeclarativeListModelWorkerAgent::~QDeclarativeListModelWorkerAgent() @@ -194,6 +194,11 @@ void QDeclarativeListModelWorkerAgent::sync() mutex.unlock(); } +void QDeclarativeListModelWorkerAgent::changedData(int index, int count) +{ + data.changedChange(index, count); +} + bool QDeclarativeListModelWorkerAgent::event(QEvent *e) { if (e->type() == QEvent::User) { @@ -216,6 +221,24 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) orig->m_strings = copy->m_strings; orig->m_values = copy->m_values; + // update the orig->m_nodeData list + for (int ii = 0; ii < changes.count(); ++ii) { + const Change &change = changes.at(ii); + switch (change.type) { + case Change::Inserted: + orig->insertedNode(change.index); + break; + case Change::Removed: + orig->removedNode(change.index); + break; + case Change::Moved: + orig->moveNodes(change.index, change.to, change.count); + break; + case Change::Changed: + break; + } + } + syncDone.wakeAll(); locker.unlock(); @@ -232,7 +255,7 @@ bool QDeclarativeListModelWorkerAgent::event(QEvent *e) emit m_orig->itemsMoved(change.index, change.to, change.count); break; case Change::Changed: - emit m_orig->itemsChanged(change.index, change.to, orig->m_roles.keys()); + emit m_orig->itemsChanged(change.index, change.count, orig->m_roles.keys()); break; } } diff --git a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h index 01da374..10c3bca 100644 --- a/src/declarative/util/qdeclarativelistmodelworkeragent_p.h +++ b/src/declarative/util/qdeclarativelistmodelworkeragent_p.h @@ -67,6 +67,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativeListModel; +class FlatListScriptClass; class QDeclarativeListModelWorkerAgent : public QObject { @@ -115,6 +116,7 @@ protected: private: friend class QDeclarativeWorkerScriptEnginePrivate; + friend class FlatListScriptClass; QScriptEngine *m_engine; struct Change { @@ -141,6 +143,8 @@ private: QDeclarativeListModel *list; }; + void changedData(int index, int count); + QAtomicInt m_ref; QDeclarativeListModel *m_orig; QDeclarativeListModel *m_copy; diff --git a/src/declarative/util/qdeclarativepixmapcache_p.h b/src/declarative/util/qdeclarativepixmapcache_p.h index b4d88bd..2e83cc4 100644 --- a/src/declarative/util/qdeclarativepixmapcache_p.h +++ b/src/declarative/util/qdeclarativepixmapcache_p.h @@ -98,7 +98,7 @@ public: bool connectDownloadProgress(QObject *, int); private: - Q_DISABLE_COPY(QDeclarativePixmap); + Q_DISABLE_COPY(QDeclarativePixmap) QDeclarativePixmapData *d; }; diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index e897458..8d01b80 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -52,6 +52,7 @@ #include <qdeclarativeguard_p.h> #include <qdeclarativeproperty_p.h> #include <qdeclarativecontext_p.h> +#include <qdeclarativestate_p_p.h> #include <QtCore/qdebug.h> @@ -200,14 +201,14 @@ public: }; -class QDeclarativePropertyChangesPrivate : public QObjectPrivate +class QDeclarativePropertyChangesPrivate : public QDeclarativeStateOperationPrivate { Q_DECLARE_PUBLIC(QDeclarativePropertyChanges) public: - QDeclarativePropertyChangesPrivate() : object(0), decoded(true), restore(true), + QDeclarativePropertyChangesPrivate() : decoded(true), restore(true), isExplicit(false) {} - QObject *object; + QDeclarativeGuard<QObject> object; QByteArray data; bool decoded : 1; @@ -497,4 +498,272 @@ void QDeclarativePropertyChanges::setIsExplicit(bool e) d->isExplicit = e; } +bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + + QListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return true; + } + } + + return false; +} + +bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + QListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return true; + } + } + + return false; +} + +bool QDeclarativePropertyChanges::containsProperty(const QByteArray &name) const +{ + return containsValue(name) || containsExpression(name); +} + +void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVariant &value) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + expressionIterator.remove(); + if (state() && state()->isStateActive()) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + oldBinding->destroy(); + } + d->property(name).write(value); + } + + d->properties.append(PropertyEntry(name, value)); + return; + } + } + + QMutableListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + entry.second = value; + if (state() && state()->isStateActive()) + d->property(name).write(value); + return; + } + } + + QDeclarativeAction action; + action.restore = restoreEntryValues(); + action.property = d->property(name); + action.fromValue = action.property.read(); + action.specifiedObject = object(); + action.specifiedProperty = QString::fromUtf8(name); + action.toValue = value; + + propertyIterator.insert(PropertyEntry(name, value)); + if (state() && state()->isStateActive()) { + state()->addEntryToRevertList(action); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + if (oldBinding) + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + d->property(name).write(value); + } +} + +void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const QString &expression) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + bool hadValue = false; + + QMutableListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + propertyIterator.remove(); + hadValue = true; + break; + } + } + + QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + entry.second->setExpression(expression); + if (state() && state()->isStateActive()) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(d->property(name), 0); + oldBinding->destroy(); + } + + QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } + return; + } + } + + QDeclarativeExpression *newExpression = new QDeclarativeExpression(qmlContext(this), d->object, expression); + expressionIterator.insert(ExpressionEntry(name, newExpression)); + + if (state() && state()->isStateActive()) { + if (hadValue) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); + if (oldBinding) { + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + state()->changeBindingInRevertList(object(), name, oldBinding); + } + + QDeclarativeBinding *newBinding = new QDeclarativeBinding(expression, object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + QDeclarativePropertyPrivate::setBinding(d->property(name), newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } else { + QDeclarativeAction action; + action.restore = restoreEntryValues(); + action.property = d->property(name); + action.fromValue = action.property.read(); + action.specifiedObject = object(); + action.specifiedProperty = QString::fromUtf8(name); + + + if (d->isExplicit) { + action.toValue = newExpression->evaluate(); + } else { + QDeclarativeBinding *newBinding = new QDeclarativeBinding(newExpression->expression(), object(), qmlContext(this)); + newBinding->setTarget(d->property(name)); + action.toBinding = newBinding; + action.deletableToBinding = true; + + state()->addEntryToRevertList(action); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(action.property); + if (oldBinding) + oldBinding->setEnabled(false, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + + QDeclarativePropertyPrivate::setBinding(action.property, newBinding, QDeclarativePropertyPrivate::DontRemoveBinding | QDeclarativePropertyPrivate::BypassInterceptor); + } + } + } + // what about the signal handler? +} + +QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + QListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return entry.second; + } + } + + QListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return QVariant(entry.second->expression()); + } + } + + return QVariant(); +} + +void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) +{ + Q_D(QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + QMutableListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + expressionIterator.remove(); + state()->removeEntryFromRevertList(object(), name); + return; + } + } + + QMutableListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + propertyIterator.remove(); + state()->removeEntryFromRevertList(object(), name); + return; + } + } +} + +QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair<QByteArray, QVariant> PropertyEntry; + + QListIterator<PropertyEntry> propertyIterator(d->properties); + while (propertyIterator.hasNext()) { + const PropertyEntry &entry = propertyIterator.next(); + if (entry.first == name) { + return entry.second; + } + } + + return QVariant(); +} + +QString QDeclarativePropertyChanges::expression(const QByteArray &name) const +{ + Q_D(const QDeclarativePropertyChanges); + typedef QPair<QByteArray, QDeclarativeExpression *> ExpressionEntry; + + QListIterator<ExpressionEntry> expressionIterator(d->expressions); + while (expressionIterator.hasNext()) { + const ExpressionEntry &entry = expressionIterator.next(); + if (entry.first == name) { + return entry.second->expression(); + } + } + + return QString(); +} + +void QDeclarativePropertyChanges::detachFromState() +{ + if (state()) + state()->removeAllEntriesFromRevertList(object()); +} + +void QDeclarativePropertyChanges::attachToState() +{ + if (state()) + state()->addEntriesToRevertList(actions()); +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h index 8578086..199928f 100644 --- a/src/declarative/util/qdeclarativepropertychanges_p.h +++ b/src/declarative/util/qdeclarativepropertychanges_p.h @@ -52,7 +52,7 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) class QDeclarativePropertyChangesPrivate; -class Q_AUTOTEST_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation +class Q_DECLARATIVE_EXPORT QDeclarativePropertyChanges : public QDeclarativeStateOperation { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativePropertyChanges) @@ -74,6 +74,20 @@ public: void setIsExplicit(bool); virtual ActionList actions(); + + bool containsProperty(const QByteArray &name) const; + bool containsValue(const QByteArray &name) const; + bool containsExpression(const QByteArray &name) const; + void changeValue(const QByteArray &name, const QVariant &value); + void changeExpression(const QByteArray &name, const QString &expression); + void removeProperty(const QByteArray &name); + QVariant value(const QByteArray &name) const; + QString expression(const QByteArray &name) const; + + void detachFromState(); + void attachToState(); + + QVariant property(const QByteArray &name) const; }; class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 1ed7923..0f5413e 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -304,7 +304,7 @@ void QDeclarativeStatePrivate::complete() for (int ii = 0; ii < reverting.count(); ++ii) { for (int jj = 0; jj < revertList.count(); ++jj) { - if (revertList.at(jj).property == reverting.at(ii)) { + if (revertList.at(jj).property() == reverting.at(ii)) { revertList.removeAt(jj); break; } @@ -370,6 +370,192 @@ void QDeclarativeAction::deleteFromBinding() } } +bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return true; + } + } + + return false; +} + +bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + simpleAction.setValue(revertValue); + return true; + } + } + } + + return false; +} + +bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.binding()) + simpleAction.binding()->destroy(); + + simpleAction.setBinding(binding); + return true; + } + } + } + + return false; +} + +bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteArray &name) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.property().object() == target && simpleAction.property().name().toUtf8() == name) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + oldBinding->destroy(); + } + + simpleAction.property().write(simpleAction.value()); + if (simpleAction.binding()) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + + revertListIterator.remove(); + return true; + } + } + } + + return false; +} + +void QDeclarativeState::addEntryToRevertList(const QDeclarativeAction &action) +{ + Q_D(QDeclarativeState); + + QDeclarativeSimpleAction simpleAction(action); + + d->revertList.append(simpleAction); +} + +void QDeclarativeState::removeAllEntriesFromRevertList(QObject *target) +{ + Q_D(QDeclarativeState); + + if (isStateActive()) { + QMutableListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.property().object() == target) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) { + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + oldBinding->destroy(); + } + + simpleAction.property().write(simpleAction.value()); + if (simpleAction.binding()) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), simpleAction.binding()); + + revertListIterator.remove(); + } + } + } +} + +void QDeclarativeState::addEntriesToRevertList(const QList<QDeclarativeAction> &actionList) +{ + Q_D(QDeclarativeState); + if (isStateActive()) { + QList<QDeclarativeSimpleAction> simpleActionList; + + QListIterator<QDeclarativeAction> actionListIterator(actionList); + while(actionListIterator.hasNext()) { + const QDeclarativeAction &action = actionListIterator.next(); + QDeclarativeSimpleAction simpleAction(action); + action.property.write(action.toValue); + if (action.toBinding) { + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); + if (oldBinding) + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); + QDeclarativePropertyPrivate::setBinding(simpleAction.property(), action.toBinding, QDeclarativePropertyPrivate::DontRemoveBinding); + } + + simpleActionList.append(simpleAction); + } + + d->revertList.append(simpleActionList); + } +} + +QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return simpleAction.value(); + } + } + + return QVariant(); +} + +QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QByteArray &name) const +{ + Q_D(const QDeclarativeState); + + if (isStateActive()) { + QListIterator<QDeclarativeSimpleAction> revertListIterator(d->revertList); + + while (revertListIterator.hasNext()) { + const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + return simpleAction.binding(); + } + } + + return 0; +} + +bool QDeclarativeState::isStateActive() const +{ + return stateGroup() && stateGroup()->state() == name(); +} + void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransition *trans, QDeclarativeState *revert) { Q_D(QDeclarativeState); @@ -403,13 +589,13 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit continue; bool found = false; for (int jj = 0; jj < d->revertList.count(); ++jj) { - QDeclarativeActionEvent *event = d->revertList.at(jj).event; + QDeclarativeActionEvent *event = d->revertList.at(jj).event(); if (event && event->typeName() == action.event->typeName()) { if (action.event->override(event)) { found = true; - if (action.event != d->revertList.at(jj).event && action.event->needsCopy()) { - action.event->copyOriginals(d->revertList.at(jj).event); + if (action.event != d->revertList.at(jj).event() && action.event->needsCopy()) { + action.event->copyOriginals(d->revertList.at(jj).event()); QDeclarativeSimpleAction r(action); additionalReverts << r; @@ -434,9 +620,9 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit action.fromBinding = QDeclarativePropertyPrivate::binding(action.property); for (int jj = 0; jj < d->revertList.count(); ++jj) { - if (d->revertList.at(jj).property == action.property) { + if (d->revertList.at(jj).property() == action.property) { found = true; - if (d->revertList.at(jj).binding != action.fromBinding) { + if (d->revertList.at(jj).binding() != action.fromBinding) { action.deleteFromBinding(); } break; @@ -445,7 +631,7 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit if (!found) { if (!action.restore) { - action.deleteFromBinding(); + action.deleteFromBinding();; } else { // Only need to revert the applyList action if the previous // state doesn't have a higher priority revert already @@ -460,8 +646,8 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit // into this state need to be translated into apply actions for (int ii = 0; ii < d->revertList.count(); ++ii) { bool found = false; - if (d->revertList.at(ii).event) { - QDeclarativeActionEvent *event = d->revertList.at(ii).event; + if (d->revertList.at(ii).event()) { + QDeclarativeActionEvent *event = d->revertList.at(ii).event(); if (!event->isReversable()) continue; for (int jj = 0; !found && jj < applyList.count(); ++jj) { @@ -474,31 +660,31 @@ void QDeclarativeState::apply(QDeclarativeStateGroup *group, QDeclarativeTransit } else { for (int jj = 0; !found && jj < applyList.count(); ++jj) { const QDeclarativeAction &action = applyList.at(jj); - if (action.property == d->revertList.at(ii).property) + if (action.property == d->revertList.at(ii).property()) found = true; } } if (!found) { - QVariant cur = d->revertList.at(ii).property.read(); + QVariant cur = d->revertList.at(ii).property().read(); QDeclarativeAbstractBinding *delBinding = - QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property, 0); + QDeclarativePropertyPrivate::setBinding(d->revertList.at(ii).property(), 0); if (delBinding) delBinding->destroy(); QDeclarativeAction a; - a.property = d->revertList.at(ii).property; + a.property = d->revertList.at(ii).property(); a.fromValue = cur; - a.toValue = d->revertList.at(ii).value; - a.toBinding = d->revertList.at(ii).binding; - a.specifiedObject = d->revertList.at(ii).specifiedObject; - a.specifiedProperty = d->revertList.at(ii).specifiedProperty; - a.event = d->revertList.at(ii).event; - a.reverseEvent = d->revertList.at(ii).reverseEvent; + a.toValue = d->revertList.at(ii).value(); + a.toBinding = d->revertList.at(ii).binding(); + a.specifiedObject = d->revertList.at(ii).specifiedObject(); + a.specifiedProperty = d->revertList.at(ii).specifiedProperty(); + a.event = d->revertList.at(ii).event(); + a.reverseEvent = d->revertList.at(ii).reverseEvent(); if (a.event && a.event->isRewindable()) a.event->saveCurrentValues(); applyList << a; // Store these special reverts in the reverting list - d->reverting << d->revertList.at(ii).property; + d->reverting << d->revertList.at(ii).property(); } } // All the local reverts now become part of the ongoing revertList @@ -526,4 +712,16 @@ QDeclarativeStateOperation::ActionList QDeclarativeStateOperation::actions() return ActionList(); } +QDeclarativeState *QDeclarativeStateOperation::state() const +{ + Q_D(const QDeclarativeStateOperation); + return d->m_state; +} + +void QDeclarativeStateOperation::setState(QDeclarativeState *state) +{ + Q_D(QDeclarativeStateOperation); + d->m_state = state; +} + QT_END_NAMESPACE diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 2e2ce7b..a0ab11b 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -111,6 +111,8 @@ public: //### rename to QDeclarativeStateChange? class QDeclarativeStateGroup; +class QDeclarativeState; +class QDeclarativeStateOperationPrivate; class Q_DECLARATIVE_EXPORT QDeclarativeStateOperation : public QObject { Q_OBJECT @@ -121,8 +123,15 @@ public: virtual ActionList actions(); + QDeclarativeState *state() const; + void setState(QDeclarativeState *state); + protected: QDeclarativeStateOperation(QObjectPrivate &dd, QObject *parent = 0); + +private: + Q_DECLARE_PRIVATE(QDeclarativeStateOperation) + Q_DISABLE_COPY(QDeclarativeStateOperation) }; typedef QDeclarativeStateOperation::ActionList QDeclarativeStateActions; @@ -169,6 +178,18 @@ public: QDeclarativeStateGroup *stateGroup() const; void setStateGroup(QDeclarativeStateGroup *); + bool containsPropertyInRevertList(QObject *target, const QByteArray &name) const; + bool changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue); + bool changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding); + bool removeEntryFromRevertList(QObject *target, const QByteArray &name); + void addEntryToRevertList(const QDeclarativeAction &action); + void removeAllEntriesFromRevertList(QObject *target); + void addEntriesToRevertList(const QList<QDeclarativeAction> &actions); + QVariant valueInRevertList(QObject *target, const QByteArray &name) const; + QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QByteArray &name) const; + + bool isStateActive() const; + Q_SIGNALS: void completed(); diff --git a/src/declarative/util/qdeclarativestate_p_p.h b/src/declarative/util/qdeclarativestate_p_p.h index 2ef9bb0..4fd8f21 100644 --- a/src/declarative/util/qdeclarativestate_p_p.h +++ b/src/declarative/util/qdeclarativestate_p_p.h @@ -61,6 +61,8 @@ #include <private/qdeclarativeproperty_p.h> #include <private/qdeclarativeguard_p.h> +#include <private/qdeclarativebinding_p.h> + #include <private/qobject_p.h> QT_BEGIN_NAMESPACE @@ -69,30 +71,123 @@ class QDeclarativeSimpleAction { public: enum State { StartState, EndState }; - QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState) + QDeclarativeSimpleAction(const QDeclarativeAction &a, State state = StartState) { - property = a.property; - specifiedObject = a.specifiedObject; - specifiedProperty = a.specifiedProperty; - event = a.event; + m_property = a.property; + m_specifiedObject = a.specifiedObject; + m_specifiedProperty = a.specifiedProperty; + m_event = a.event; if (state == StartState) { - value = a.fromValue; - binding = QDeclarativePropertyPrivate::binding(property); - reverseEvent = true; + m_value = a.fromValue; + if (QDeclarativePropertyPrivate::binding(m_property)) { + m_binding = QDeclarativeAbstractBinding::getPointer(QDeclarativePropertyPrivate::binding(m_property)); + } + m_reverseEvent = true; } else { - value = a.toValue; - binding = a.toBinding; - reverseEvent = false; + m_value = a.toValue; + m_binding = QDeclarativeAbstractBinding::getPointer(a.toBinding); + m_reverseEvent = false; } } - QDeclarativeProperty property; - QVariant value; - QDeclarativeAbstractBinding *binding; - QObject *specifiedObject; - QString specifiedProperty; - QDeclarativeActionEvent *event; - bool reverseEvent; + ~QDeclarativeSimpleAction() + { + } + + QDeclarativeSimpleAction(const QDeclarativeSimpleAction &other) + : m_property(other.m_property), + m_value(other.m_value), + m_binding(QDeclarativeAbstractBinding::getPointer(other.binding())), + m_specifiedObject(other.m_specifiedObject), + m_specifiedProperty(other.m_specifiedProperty), + m_event(other.m_event), + m_reverseEvent(other.m_reverseEvent) + { + } + + QDeclarativeSimpleAction &operator =(const QDeclarativeSimpleAction &other) + { + m_property = other.m_property; + m_value = other.m_value; + m_binding = QDeclarativeAbstractBinding::getPointer(other.binding()); + m_specifiedObject = other.m_specifiedObject; + m_specifiedProperty = other.m_specifiedProperty; + m_event = other.m_event; + m_reverseEvent = other.m_reverseEvent; + + return *this; + } + + void setProperty(const QDeclarativeProperty &property) + { + m_property = property; + } + + const QDeclarativeProperty &property() const + { + return m_property; + } + + void setValue(const QVariant &value) + { + m_value = value; + } + + const QVariant &value() const + { + return m_value; + } + + void setBinding(QDeclarativeAbstractBinding *binding) + { + m_binding = QDeclarativeAbstractBinding::getPointer(binding); + } + + QDeclarativeAbstractBinding *binding() const + { + return m_binding.data(); + } + + QObject *specifiedObject() const + { + return m_specifiedObject; + } + + const QString &specifiedProperty() const + { + return m_specifiedProperty; + } + + QDeclarativeActionEvent *event() const + { + return m_event; + } + + bool reverseEvent() const + { + return m_reverseEvent; + } + +private: + QDeclarativeProperty m_property; + QVariant m_value; + QDeclarativeAbstractBinding::Pointer m_binding; + QObject *m_specifiedObject; + QString m_specifiedProperty; + QDeclarativeActionEvent *m_event; + bool m_reverseEvent; +}; + +class QDeclarativeStateOperationPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeStateOperation) + +public: + + QDeclarativeStateOperationPrivate() + : m_state(0) {} + + QDeclarativeState *m_state; }; class QDeclarativeStatePrivate : public QObjectPrivate @@ -122,10 +217,14 @@ public: static void operations_append(QDeclarativeListProperty<QDeclarativeStateOperation> *prop, QDeclarativeStateOperation *op) { QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data); + op->setState(qobject_cast<QDeclarativeState*>(prop->object)); list->append(OperationGuard(op, list)); } static void operations_clear(QDeclarativeListProperty<QDeclarativeStateOperation> *prop) { QList<OperationGuard> *list = static_cast<QList<OperationGuard> *>(prop->data); + QMutableListIterator<OperationGuard> listIterator(*list); + while(listIterator.hasNext()) + listIterator.next()->setState(0); list->clear(); } static int operations_count(QDeclarativeListProperty<QDeclarativeStateOperation> *prop) { diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 845b3da..8cb813c 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -52,6 +52,7 @@ #include "private/qdeclarativecontext_p.h" #include "private/qdeclarativeproperty_p.h" #include "private/qdeclarativebinding_p.h" +#include "private/qdeclarativestate_p_p.h" #include <QtCore/qdebug.h> #include <QtGui/qgraphicsitem.h> @@ -61,7 +62,7 @@ QT_BEGIN_NAMESPACE -class QDeclarativeParentChangePrivate : public QObjectPrivate +class QDeclarativeParentChangePrivate : public QDeclarativeStateOperationPrivate { Q_DECLARE_PUBLIC(QDeclarativeParentChange) public: @@ -98,14 +99,15 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q qreal scale = 1; qreal rotation = 0; - if (ok && transform.type() != QTransform::TxRotate) { + bool isRotate = (transform.type() == QTransform::TxRotate) || (transform.m11() < 0); + if (ok && !isRotate) { if (transform.m11() == transform.m22()) scale = transform.m11(); else { qmlInfo(q) << QDeclarativeParentChange::tr("Unable to preserve appearance under non-uniform scale"); ok = false; } - } else if (ok && transform.type() == QTransform::TxRotate) { + } else if (ok && isRotate) { if (transform.m11() == transform.m22()) scale = qSqrt(transform.m11()*transform.m11() + transform.m12()*transform.m12()); else { @@ -579,7 +581,7 @@ void QDeclarativeParentChange::rewind() d->doChange(d->rewindParent, d->rewindStackBefore); } -class QDeclarativeStateChangeScriptPrivate : public QObjectPrivate +class QDeclarativeStateChangeScriptPrivate : public QDeclarativeStateOperationPrivate { public: QDeclarativeStateChangeScriptPrivate() {} @@ -964,7 +966,7 @@ void QDeclarativeAnchorSet::resetCenterIn() } -class QDeclarativeAnchorChangesPrivate : public QObjectPrivate +class QDeclarativeAnchorChangesPrivate : public QDeclarativeStateOperationPrivate { public: QDeclarativeAnchorChangesPrivate() @@ -1029,6 +1031,11 @@ public: bool applyOrigVCenter; bool applyOrigBaseline; + QDeclarativeNullableValue<qreal> origWidth; + QDeclarativeNullableValue<qreal> origHeight; + qreal origX; + qreal origY; + QList<QDeclarativeAbstractBinding*> oldBindings; QDeclarativeProperty leftProp; @@ -1320,6 +1327,42 @@ void QDeclarativeAnchorChanges::reverse(Reason reason) QDeclarativePropertyPrivate::setBinding(d->vCenterProp, d->origVCenterBinding); if (d->origBaselineBinding) QDeclarativePropertyPrivate::setBinding(d->baselineProp, d->origBaselineBinding); + + //restore any absolute geometry changed by the state's anchors + QDeclarativeAnchors::Anchors stateVAnchors = d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::Vertical_Mask; + QDeclarativeAnchors::Anchors origVAnchors = targetPrivate->anchors()->usedAnchors() & QDeclarativeAnchors::Vertical_Mask; + QDeclarativeAnchors::Anchors stateHAnchors = d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::Horizontal_Mask; + QDeclarativeAnchors::Anchors origHAnchors = targetPrivate->anchors()->usedAnchors() & QDeclarativeAnchors::Horizontal_Mask; + + bool stateSetWidth = (stateHAnchors && + stateHAnchors != QDeclarativeAnchors::LeftAnchor && + stateHAnchors != QDeclarativeAnchors::RightAnchor && + stateHAnchors != QDeclarativeAnchors::HCenterAnchor); + bool origSetWidth = (origHAnchors && + origHAnchors != QDeclarativeAnchors::LeftAnchor && + origHAnchors != QDeclarativeAnchors::RightAnchor && + origHAnchors != QDeclarativeAnchors::HCenterAnchor); + if (d->origWidth.isValid() && stateSetWidth && !origSetWidth) + d->target->setWidth(d->origWidth.value); + + bool stateSetHeight = (stateVAnchors && + stateVAnchors != QDeclarativeAnchors::TopAnchor && + stateVAnchors != QDeclarativeAnchors::BottomAnchor && + stateVAnchors != QDeclarativeAnchors::VCenterAnchor && + stateVAnchors != QDeclarativeAnchors::BaselineAnchor); + bool origSetHeight = (origVAnchors && + origVAnchors != QDeclarativeAnchors::TopAnchor && + origVAnchors != QDeclarativeAnchors::BottomAnchor && + origVAnchors != QDeclarativeAnchors::VCenterAnchor && + origVAnchors != QDeclarativeAnchors::BaselineAnchor); + if (d->origHeight.isValid() && stateSetHeight && !origSetHeight) + d->target->setHeight(d->origHeight.value); + + if (stateHAnchors && !origHAnchors) + d->target->setX(d->origX); + + if (stateVAnchors && !origVAnchors) + d->target->setY(d->origY); } QString QDeclarativeAnchorChanges::typeName() const @@ -1382,6 +1425,14 @@ void QDeclarativeAnchorChanges::saveOriginals() d->origVCenterBinding = QDeclarativePropertyPrivate::binding(d->vCenterProp); d->origBaselineBinding = QDeclarativePropertyPrivate::binding(d->baselineProp); + QDeclarativeItemPrivate *targetPrivate = QDeclarativeItemPrivate::get(d->target); + if (targetPrivate->widthValid) + d->origWidth = d->target->width(); + if (targetPrivate->heightValid) + d->origHeight = d->target->height(); + d->origX = d->target->x(); + d->origY = d->target->y(); + d->applyOrigLeft = d->applyOrigRight = d->applyOrigHCenter = d->applyOrigTop = d->applyOrigBottom = d->applyOrigVCenter = d->applyOrigBaseline = false; @@ -1414,6 +1465,11 @@ void QDeclarativeAnchorChanges::copyOriginals(QDeclarativeActionEvent *other) d->origVCenterBinding = acp->origVCenterBinding; d->origBaselineBinding = acp->origBaselineBinding; + d->origWidth = acp->origWidth; + d->origHeight = acp->origHeight; + d->origX = acp->origX; + d->origY = acp->origY; + d->oldBindings.clear(); d->oldBindings << acp->leftBinding << acp->rightBinding << acp->hCenterBinding << acp->topBinding << acp->bottomBinding << acp->baselineBinding; diff --git a/src/declarative/util/qdeclarativetransitionmanager.cpp b/src/declarative/util/qdeclarativetransitionmanager.cpp index d82c4bb..89b0044 100644 --- a/src/declarative/util/qdeclarativetransitionmanager.cpp +++ b/src/declarative/util/qdeclarativetransitionmanager.cpp @@ -86,8 +86,8 @@ void QDeclarativeTransitionManager::complete() d->applyBindings(); for (int ii = 0; ii < d->completeList.count(); ++ii) { - const QDeclarativeProperty &prop = d->completeList.at(ii).property; - prop.write(d->completeList.at(ii).value); + const QDeclarativeProperty &prop = d->completeList.at(ii).property(); + prop.write(d->completeList.at(ii).value()); } d->completeList.clear(); diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 905ef1e..870a523 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -209,8 +209,9 @@ Q_SIGNALS: protected: void run() { + m_mutex.lock(); + while (!m_quit) { - m_mutex.lock(); if (!m_jobs.isEmpty()) m_currentJob = m_jobs.dequeue(); m_mutex.unlock(); @@ -230,12 +231,13 @@ protected: m_mutex.lock(); if (m_currentJob.queryId != -1 && m_abortQueryId != m_currentJob.queryId) emit queryCompleted(r); - if (m_jobs.isEmpty()) + if (m_jobs.isEmpty() && !m_quit) m_condition.wait(&m_mutex); m_currentJob.queryId = -1; m_abortQueryId = -1; - m_mutex.unlock(); } + + m_mutex.unlock(); } private: diff --git a/src/gui/accessible/qaccessible_win.cpp b/src/gui/accessible/qaccessible_win.cpp index 132d01f..31e7245 100644 --- a/src/gui/accessible/qaccessible_win.cpp +++ b/src/gui/accessible/qaccessible_win.cpp @@ -76,71 +76,71 @@ QT_END_INCLUDE_NAMESPACE static const char *roleString(QAccessible::Role role) { static const char *roles[] = { - "NoRole" /*= 0x00000000*/, - "TitleBar" /*= 0x00000001*/, - "MenuBar" /*= 0x00000002*/, - "ScrollBar" /*= 0x00000003*/, - "Grip" /*= 0x00000004*/, - "Sound" /*= 0x00000005*/, - "Cursor" /*= 0x00000006*/, - "Caret" /*= 0x00000007*/, - "AlertMessage" /*= 0x00000008*/, - "Window" /*= 0x00000009*/, - "Client" /*= 0x0000000A*/, - "PopupMenu" /*= 0x0000000B*/, - "MenuItem" /*= 0x0000000C*/, - "ToolTip" /*= 0x0000000D*/, - "Application" /*= 0x0000000E*/, - "Document" /*= 0x0000000F*/, - "Pane" /*= 0x00000010*/, - "Chart" /*= 0x00000011*/, - "Dialog" /*= 0x00000012*/, - "Border" /*= 0x00000013*/, - "Grouping" /*= 0x00000014*/, - "Separator" /*= 0x00000015*/, - "ToolBar" /*= 0x00000016*/, - "StatusBar" /*= 0x00000017*/, - "Table" /*= 0x00000018*/, - "ColumnHeader" /*= 0x00000019*/, - "RowHeader" /*= 0x0000001A*/, - "Column" /*= 0x0000001B*/, - "Row" /*= 0x0000001C*/, - "Cell" /*= 0x0000001D*/, - "Link" /*= 0x0000001E*/, - "HelpBalloon" /*= 0x0000001F*/, - "Assistant" /*= 0x00000020*/, - "List" /*= 0x00000021*/, - "ListItem" /*= 0x00000022*/, - "Tree" /*= 0x00000023*/, - "TreeItem" /*= 0x00000024*/, - "PageTab" /*= 0x00000025*/, - "PropertyPage" /*= 0x00000026*/, - "Indicator" /*= 0x00000027*/, - "Graphic" /*= 0x00000028*/, - "StaticText" /*= 0x00000029*/, - "EditableText" /*= 0x0000002A*/, // Editable, selectable, etc. - "PushButton" /*= 0x0000002B*/, - "CheckBox" /*= 0x0000002C*/, - "RadioButton" /*= 0x0000002D*/, - "ComboBox" /*= 0x0000002E*/, - "DropList" /*= 0x0000002F*/, // commented out - "ProgressBar" /*= 0x00000030*/, - "Dial" /*= 0x00000031*/, - "HotkeyField" /*= 0x00000032*/, - "Slider" /*= 0x00000033*/, - "SpinBox" /*= 0x00000034*/, - "Canvas" /*= 0x00000035*/, - "Animation" /*= 0x00000036*/, - "Equation" /*= 0x00000037*/, - "ButtonDropDown" /*= 0x00000038*/, - "ButtonMenu" /*= 0x00000039*/, - "ButtonDropGrid" /*= 0x0000003A*/, - "Whitespace" /*= 0x0000003B*/, - "PageTabList" /*= 0x0000003C*/, - "Clock" /*= 0x0000003D*/, - "Splitter" /*= 0x0000003E*/, - "LayeredPane" /*= 0x0000003F*/, - "UserRole" /*= 0x0000ffff*/ + "NoRole" /* = 0x00000000 */, + "TitleBar" /* = 0x00000001 */, + "MenuBar" /* = 0x00000002 */, + "ScrollBar" /* = 0x00000003 */, + "Grip" /* = 0x00000004 */, + "Sound" /* = 0x00000005 */, + "Cursor" /* = 0x00000006 */, + "Caret" /* = 0x00000007 */, + "AlertMessage" /* = 0x00000008 */, + "Window" /* = 0x00000009 */, + "Client" /* = 0x0000000A */, + "PopupMenu" /* = 0x0000000B */, + "MenuItem" /* = 0x0000000C */, + "ToolTip" /* = 0x0000000D */, + "Application" /* = 0x0000000E */, + "Document" /* = 0x0000000F */, + "Pane" /* = 0x00000010 */, + "Chart" /* = 0x00000011 */, + "Dialog" /* = 0x00000012 */, + "Border" /* = 0x00000013 */, + "Grouping" /* = 0x00000014 */, + "Separator" /* = 0x00000015 */, + "ToolBar" /* = 0x00000016 */, + "StatusBar" /* = 0x00000017 */, + "Table" /* = 0x00000018 */, + "ColumnHeader" /* = 0x00000019 */, + "RowHeader" /* = 0x0000001A */, + "Column" /* = 0x0000001B */, + "Row" /* = 0x0000001C */, + "Cell" /* = 0x0000001D */, + "Link" /* = 0x0000001E */, + "HelpBalloon" /* = 0x0000001F */, + "Assistant" /* = 0x00000020 */, + "List" /* = 0x00000021 */, + "ListItem" /* = 0x00000022 */, + "Tree" /* = 0x00000023 */, + "TreeItem" /* = 0x00000024 */, + "PageTab" /* = 0x00000025 */, + "PropertyPage" /* = 0x00000026 */, + "Indicator" /* = 0x00000027 */, + "Graphic" /* = 0x00000028 */, + "StaticText" /* = 0x00000029 */, + "EditableText" /* = 0x0000002A */, // Editable, selectable, etc. + "PushButton" /* = 0x0000002B */, + "CheckBox" /* = 0x0000002C */, + "RadioButton" /* = 0x0000002D */, + "ComboBox" /* = 0x0000002E */, + "DropList" /* = 0x0000002F */, // commented out + "ProgressBar" /* = 0x00000030 */, + "Dial" /* = 0x00000031 */, + "HotkeyField" /* = 0x00000032 */, + "Slider" /* = 0x00000033 */, + "SpinBox" /* = 0x00000034 */, + "Canvas" /* = 0x00000035 */, + "Animation" /* = 0x00000036 */, + "Equation" /* = 0x00000037 */, + "ButtonDropDown" /* = 0x00000038 */, + "ButtonMenu" /* = 0x00000039 */, + "ButtonDropGrid" /* = 0x0000003A */, + "Whitespace" /* = 0x0000003B */, + "PageTabList" /* = 0x0000003C */, + "Clock" /* = 0x0000003D */, + "Splitter" /* = 0x0000003E */, + "LayeredPane" /* = 0x0000003F */, + "UserRole" /* = 0x0000ffff*/ }; if (role >=0x40) diff --git a/src/gui/dialogs/qfiledialog.cpp b/src/gui/dialogs/qfiledialog.cpp index a0dca5d..624610b 100644 --- a/src/gui/dialogs/qfiledialog.cpp +++ b/src/gui/dialogs/qfiledialog.cpp @@ -302,7 +302,6 @@ QT_BEGIN_INCLUDE_NAMESPACE #endif #include <qshortcut.h> #ifdef Q_WS_MAC -#include <private/qunicodetables_p.h> #include <qmacstyle_mac.h> #endif QT_END_INCLUDE_NAMESPACE diff --git a/src/gui/egl/qegl.cpp b/src/gui/egl/qegl.cpp index 0419b62..2a82427 100644 --- a/src/gui/egl/qegl.cpp +++ b/src/gui/egl/qegl.cpp @@ -259,7 +259,7 @@ EGLConfig QEgl::defaultConfig(int devType, API api, ConfigOptions options) // Add paint engine requirements if (api == OpenVG) { -#ifndef QVG_SCISSOR_CLIP +#if !defined(QVG_SCISSOR_CLIP) && defined(EGL_ALPHA_MASK_SIZE) configAttribs.setValue(EGL_ALPHA_MASK_SIZE, 1); #endif } else { diff --git a/src/gui/egl/qegl_p.h b/src/gui/egl/qegl_p.h index c214e88..aa08934 100644 --- a/src/gui/egl/qegl_p.h +++ b/src/gui/egl/qegl_p.h @@ -65,6 +65,10 @@ QT_BEGIN_INCLUDE_NAMESPACE #else # include <EGL/egl.h> #endif +#if !defined(EGL_VERSION_1_2) +typedef unsigned int EGLenum; +typedef void *EGLClientBuffer; +#endif #else //types from egltypes.h for compiling stub without EGL headers diff --git a/src/gui/egl/qeglcontext_p.h b/src/gui/egl/qeglcontext_p.h index cae8164..5bc8f09 100644 --- a/src/gui/egl/qeglcontext_p.h +++ b/src/gui/egl/qeglcontext_p.h @@ -107,6 +107,9 @@ private: static QEglContext *currentContext(QEgl::API api); static void setCurrentContext(QEgl::API api, QEglContext *context); + + friend class QMeeGoGraphicsSystem; + friend class QMeeGoPixmapData; }; QT_END_NAMESPACE diff --git a/src/gui/egl/qeglproperties.cpp b/src/gui/egl/qeglproperties.cpp index 3638de5..4b8ca9a 100644 --- a/src/gui/egl/qeglproperties.cpp +++ b/src/gui/egl/qeglproperties.cpp @@ -241,8 +241,10 @@ void QEglProperties::setRenderableType(QEgl::API api) // reductions in complexity are possible. bool QEglProperties::reduceConfiguration() { +#ifdef EGL_SWAP_BEHAVIOR if (value(EGL_SWAP_BEHAVIOR) != EGL_DONT_CARE) removeValue(EGL_SWAP_BEHAVIOR); +#endif #ifdef EGL_VG_ALPHA_FORMAT_PRE_BIT // For OpenVG, we sometimes try to create a surface using a pre-multiplied format. If we can't @@ -258,7 +260,7 @@ bool QEglProperties::reduceConfiguration() // those with smaller (but faster) lower color depths. One // way around this is to set EGL_BUFFER_SIZE to 16, which // trumps the others. Of course, there may not be a 16-bit - // config avaliable, so it's the first restraint we remove. + // config available, so it's the first restraint we remove. if (value(EGL_BUFFER_SIZE) == 16) { removeValue(EGL_BUFFER_SIZE); return true; diff --git a/src/gui/embedded/qsoundqss_qws.cpp b/src/gui/embedded/qsoundqss_qws.cpp index 3958cf0..c77c35c 100644 --- a/src/gui/embedded/qsoundqss_qws.cpp +++ b/src/gui/embedded/qsoundqss_qws.cpp @@ -286,7 +286,7 @@ public: rightVolume = maxVolume>>1; isPriority = false; samples_due = 0; - max1 = max2 = out = 0;//= sound_buffer_size; + max1 = max2 = out = 0;// = sound_buffer_size; data = data1; max = &max1; sampleRunin = 0; diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 58395f5..096be63 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -1272,37 +1272,40 @@ void QGraphicsItemPrivate::setParentItemHelper(QGraphicsItem *newParent, const Q Returns the bounding rect of this item's children (excluding itself). */ -void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip) +void QGraphicsItemPrivate::childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem) { Q_Q(QGraphicsItem); QRectF childrenRect; QRectF *result = rect; rect = &childrenRect; + const bool setTopMostEffectItem = !topMostEffectItem; for (int i = 0; i < children.size(); ++i) { QGraphicsItem *child = children.at(i); QGraphicsItemPrivate *childd = child->d_ptr.data(); + if (setTopMostEffectItem) + topMostEffectItem = child; bool hasPos = !childd->pos.isNull(); if (hasPos || childd->transformData) { // COMBINE QTransform matrix = childd->transformToParent(); if (x) matrix *= *x; - *rect |= matrix.mapRect(child->d_ptr->effectiveBoundingRect()); + *rect |= matrix.mapRect(child->d_ptr->effectiveBoundingRect(topMostEffectItem)); if (!childd->children.isEmpty()) - childd->childrenBoundingRectHelper(&matrix, rect); + childd->childrenBoundingRectHelper(&matrix, rect, topMostEffectItem); } else { if (x) - *rect |= x->mapRect(child->d_ptr->effectiveBoundingRect()); + *rect |= x->mapRect(child->d_ptr->effectiveBoundingRect(topMostEffectItem)); else - *rect |= child->d_ptr->effectiveBoundingRect(); + *rect |= child->d_ptr->effectiveBoundingRect(topMostEffectItem); if (!childd->children.isEmpty()) - childd->childrenBoundingRectHelper(x, rect); + childd->childrenBoundingRectHelper(x, rect, topMostEffectItem); } } - if (doClip && (flags & QGraphicsItem::ItemClipsChildrenToShape)){ + if (flags & QGraphicsItem::ItemClipsChildrenToShape){ if (x) *rect &= x->mapRect(q->boundingRect()); else @@ -1870,6 +1873,10 @@ void QGraphicsItem::setFlags(GraphicsItemFlags flags) // Item children clipping changes. Propagate the ancestor flag to // all children. d_ptr->updateAncestorFlag(ItemClipsChildrenToShape); + // The childrenBoundingRect is clipped to the boundingRect in case of ItemClipsChildrenToShape, + // which means we have to invalidate the cached childrenBoundingRect whenever this flag changes. + d_ptr->dirtyChildrenBoundingRect = 1; + d_ptr->markParentDirty(true); } if ((flags & ItemIgnoresTransformations) != (oldFlags & ItemIgnoresTransformations)) { @@ -2800,6 +2807,8 @@ QRectF QGraphicsItemPrivate::effectiveBoundingRect(const QRectF &rect) const Q_Q(const QGraphicsItem); QGraphicsEffect *effect = graphicsEffect; if (scene && effect && effect->isEnabled()) { + if (scene->d_func()->views.isEmpty()) + return effect->boundingRectFor(rect); QRectF sceneRect = q->mapRectToScene(rect); QRectF sceneEffectRect; foreach (QGraphicsView *view, scene->views()) { @@ -2823,12 +2832,12 @@ QRectF QGraphicsItemPrivate::effectiveBoundingRect(const QRectF &rect) const \sa boundingRect() */ -QRectF QGraphicsItemPrivate::effectiveBoundingRect() const +QRectF QGraphicsItemPrivate::effectiveBoundingRect(QGraphicsItem *topMostEffectItem) const { #ifndef QT_NO_GRAPHICSEFFECT Q_Q(const QGraphicsItem); QRectF brect = effectiveBoundingRect(q_ptr->boundingRect()); - if (ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren) + if (ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren || topMostEffectItem == q) return brect; const QGraphicsItem *effectParent = parent; @@ -2839,8 +2848,10 @@ QRectF QGraphicsItemPrivate::effectiveBoundingRect() const const QRectF effectRectInParentSpace = effectParent->d_ptr->effectiveBoundingRect(brectInParentSpace); brect = effectParent->mapRectToItem(q, effectRectInParentSpace); } - if (effectParent->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren) + if (effectParent->d_ptr->ancestorFlags & QGraphicsItemPrivate::AncestorClipsChildren + || topMostEffectItem == effectParent) { return brect; + } effectParent = effectParent->d_ptr->parent; } @@ -4715,7 +4726,7 @@ QRectF QGraphicsItem::childrenBoundingRect() const return d_ptr->childrenBoundingRect; d_ptr->childrenBoundingRect = QRectF(); - d_ptr->childrenBoundingRectHelper(0, &d_ptr->childrenBoundingRect); + d_ptr->childrenBoundingRectHelper(0, &d_ptr->childrenBoundingRect, 0); d_ptr->dirtyChildrenBoundingRect = 0; return d_ptr->childrenBoundingRect; } @@ -7676,6 +7687,14 @@ QGraphicsObject *QGraphicsItemPrivate::children_at(QDeclarativeListProperty<QGra return 0; } +void QGraphicsItemPrivate::children_clear(QDeclarativeListProperty<QGraphicsObject> *list) +{ + QGraphicsItemPrivate *d = QGraphicsItemPrivate::get(static_cast<QGraphicsObject *>(list->object)); + int childCount = d->children.count(); + for (int index = 0; index < childCount; index++) + QGraphicsItemPrivate::get(d->children.at(0))->setParentItemHelper(0, /*newParentVariant=*/0, /*thisPointerVariant=*/0); +} + /*! Returns a list of this item's children. @@ -7689,7 +7708,7 @@ QDeclarativeListProperty<QGraphicsObject> QGraphicsItemPrivate::childrenList() if (isObject) { QGraphicsObject *that = static_cast<QGraphicsObject *>(q); return QDeclarativeListProperty<QGraphicsObject>(that, &children, children_append, - children_count, children_at); + children_count, children_at, children_clear); } else { //QGraphicsItem is not supported for this property return QDeclarativeListProperty<QGraphicsObject>(); @@ -11166,14 +11185,8 @@ QRectF QGraphicsItemEffectSourcePrivate::boundingRect(Qt::CoordinateSystem syste } QRectF rect = item->boundingRect(); - if (!item->d_ptr->children.isEmpty()) { - if (dirtyChildrenBoundingRect) { - childrenBoundingRect = QRectF(); - item->d_ptr->childrenBoundingRectHelper(0, &childrenBoundingRect, true); - dirtyChildrenBoundingRect = false; - } - rect |= childrenBoundingRect; - } + if (!item->d_ptr->children.isEmpty()) + rect |= item->childrenBoundingRect(); if (deviceCoordinates) { Q_ASSERT(info->painter); diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index d60dffb..77e4054 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -300,10 +300,10 @@ public: QDeclarativeListProperty<QGraphicsObject> childrenList(); void setParentItemHelper(QGraphicsItem *parent, const QVariant *newParentVariant, const QVariant *thisPointerVariant); - void childrenBoundingRectHelper(QTransform *x, QRectF *rect, bool doClip = true); + void childrenBoundingRectHelper(QTransform *x, QRectF *rect, QGraphicsItem *topMostEffectItem); void initStyleOption(QStyleOptionGraphicsItem *option, const QTransform &worldTransform, const QRegion &exposedRegion, bool allItems = false) const; - QRectF effectiveBoundingRect() const; + QRectF effectiveBoundingRect(QGraphicsItem *topMostEffectItem = 0) const; QRectF sceneEffectiveBoundingRect() const; QRectF effectiveBoundingRect(const QRectF &rect) const; @@ -487,6 +487,7 @@ public: static void children_append(QDeclarativeListProperty<QGraphicsObject> *list, QGraphicsObject *item); static int children_count(QDeclarativeListProperty<QGraphicsObject> *list); static QGraphicsObject *children_at(QDeclarativeListProperty<QGraphicsObject> *list, int); + static void children_clear(QDeclarativeListProperty<QGraphicsObject> *list); inline QTransform transformToParent() const; inline void ensureSortedChildren(); @@ -660,7 +661,7 @@ class QGraphicsItemEffectSourcePrivate : public QGraphicsEffectSourcePrivate { public: QGraphicsItemEffectSourcePrivate(QGraphicsItem *i) - : QGraphicsEffectSourcePrivate(), dirtyChildrenBoundingRect(true), item(i), info(0) + : QGraphicsEffectSourcePrivate(), item(i), info(0) {} inline void detach() @@ -711,9 +712,6 @@ public: QGraphicsEffect::PixmapPadMode mode) const; QRect paddedEffectRect(Qt::CoordinateSystem system, QGraphicsEffect::PixmapPadMode mode, const QRectF &sourceRect, bool *unpadded = 0) const; - mutable bool dirtyChildrenBoundingRect; - mutable QRectF childrenBoundingRect; - QGraphicsItem *item; QGraphicsItemPaintInfo *info; QTransform lastEffectTransform; @@ -871,12 +869,9 @@ inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect) #ifndef QT_NO_GRAPHICSEFFECT if (parentp->graphicsEffect) { if (updateBoundingRect) { - QGraphicsItemEffectSourcePrivate *sourcep = - static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func() - ->source->d_func()); - parentp->dirtyChildrenBoundingRect = 1; + static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func() + ->source->d_func())->invalidateCache(); parentp->notifyInvalidated = 1; - sourcep->invalidateCache(); } if (parentp->scene && parentp->graphicsEffect->isEnabled()) { parentp->dirty = 1; diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index 23f9923..34ec4e0 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -234,7 +234,7 @@ void QGraphicsLayoutItemPrivate::setSize(Qt::SizeHint which, const QSizeF &size) if (userSizeHints) { if (size == userSizeHints[which]) return; - } else if (!size.isValid()) { + } else if (size.width() < 0 && size.height() < 0) { return; } diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 99851db..7cb442f 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -4751,7 +4751,7 @@ void QGraphicsScenePrivate::drawSubtreeRecursive(QGraphicsItem *item, QPainter * ENSURE_TRANSFORM_PTR QRect viewBoundingRect = translateOnlyTransform ? brect.translated(transformPtr->dx(), transformPtr->dy()).toAlignedRect() : transformPtr->mapRect(brect).toAlignedRect(); - viewBoundingRect.adjust(-rectAdjust, -rectAdjust, rectAdjust, rectAdjust); + viewBoundingRect.adjust(-int(rectAdjust), -int(rectAdjust), rectAdjust, rectAdjust); if (widget) item->d_ptr->paintedViewBoundingRects.insert(widget, viewBoundingRect); drawItem = exposedRegion ? exposedRegion->intersects(viewBoundingRect) @@ -4984,14 +4984,15 @@ void QGraphicsScenePrivate::markDirty(QGraphicsItem *item, const QRectF &rect, b return; } - bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents - && !item->d_ptr->graphicsEffect; + bool hasNoContents = item->d_ptr->flags & QGraphicsItem::ItemHasNoContents; if (!hasNoContents) { item->d_ptr->dirty = 1; if (fullItemUpdate) item->d_ptr->fullUpdatePending = 1; else if (!item->d_ptr->fullUpdatePending) item->d_ptr->needsRepaint |= rect; + } else if (item->d_ptr->graphicsEffect) { + invalidateChildren = true; } if (invalidateChildren) { @@ -5270,7 +5271,6 @@ void QGraphicsScene::drawItems(QPainter *painter, if (!d->unpolishedItems.isEmpty()) d->_q_polishItems(); - d->updateAll = false; QTransform viewTransform = painter->worldTransform(); Q_UNUSED(options); @@ -5279,6 +5279,7 @@ void QGraphicsScene::drawItems(QPainter *painter, QRegion *expose = 0; const quint32 oldRectAdjust = d->rectAdjust; if (view) { + d->updateAll = false; expose = &view->d_func()->exposedRegion; if (view->d_func()->optimizationFlags & QGraphicsView::DontAdjustForAntialiasing) d->rectAdjust = 1; @@ -6137,7 +6138,7 @@ void QGraphicsScenePrivate::gestureEventHandler(QGestureEvent *event) << g << item.data(); } // remember the first item that received the override event - // as it most likely become a target if noone else accepts + // as it most likely become a target if no one else accepts // the override event if (!gestureTargets.contains(g) && item) gestureTargets.insert(g, item.data()); diff --git a/src/gui/image/qiconloader.cpp b/src/gui/image/qiconloader.cpp index 34f40a9..0ae54fc 100644 --- a/src/gui/image/qiconloader.cpp +++ b/src/gui/image/qiconloader.cpp @@ -151,7 +151,7 @@ QStringList QIconLoader::themeSearchPaths() const { if (m_iconDirs.isEmpty()) { m_iconDirs = qt_guiPlatformPlugin()->iconThemeSearchPaths(); - // Allways add resource directory as search path + // Always add resource directory as search path m_iconDirs.append(QLatin1String(":/icons")); } return m_iconDirs; @@ -266,7 +266,7 @@ QThemeIconEntries QIconLoader::findIconHelper(const QString &themeName, PixmapEntry *iconEntry = new PixmapEntry; iconEntry->dir = dirInfo; iconEntry->filename = currentDir.filePath(iconName + pngext); - // Notice we ensure that pixmap entries allways come before + // Notice we ensure that pixmap entries always come before // scalable to preserve search order afterwards entries.prepend(iconEntry); } else if (m_supportsSvg && diff --git a/src/gui/image/qjpeghandler.cpp b/src/gui/image/qjpeghandler.cpp index eda5efb..b9eda05 100644 --- a/src/gui/image/qjpeghandler.cpp +++ b/src/gui/image/qjpeghandler.cpp @@ -134,15 +134,18 @@ static void qt_init_source(j_decompress_ptr) static boolean qt_fill_input_buffer(j_decompress_ptr cinfo) { my_jpeg_source_mgr* src = (my_jpeg_source_mgr*)cinfo->src; + qint64 num_read = 0; if (src->memDevice) { src->next_input_byte = (const JOCTET *)(src->memDevice->data().constData() + src->memDevice->pos()); - src->bytes_in_buffer = (size_t)(src->memDevice->data().size() - src->memDevice->pos()); - return true; + num_read = src->memDevice->data().size() - src->memDevice->pos(); + src->device->seek(src->memDevice->data().size()); + } else { + src->next_input_byte = src->buffer; + num_read = src->device->read((char*)src->buffer, max_buf); } - src->next_input_byte = src->buffer; - int num_read = src->device->read((char*)src->buffer, max_buf); if (num_read <= 0) { // Insert a fake EOI marker - as per jpeglib recommendation + src->next_input_byte = src->buffer; src->buffer[0] = (JOCTET) 0xFF; src->buffer[1] = (JOCTET) JPEG_EOI; src->bytes_in_buffer = 2; @@ -183,13 +186,7 @@ static void qt_term_source(j_decompress_ptr cinfo) { my_jpeg_source_mgr* src = (my_jpeg_source_mgr*)cinfo->src; if (!src->device->isSequential()) - { - // read() isn't used for memDevice, so seek past everything that was used - if (src->memDevice) - src->device->seek(src->device->pos() + (src->memDevice->data().size() - src->memDevice->pos() - src->bytes_in_buffer)); - else - src->device->seek(src->device->pos() - src->bytes_in_buffer); - } + src->device->seek(src->device->pos() - src->bytes_in_buffer); } #if defined(Q_C_CALLBACKS) @@ -518,29 +515,10 @@ inline my_jpeg_destination_mgr::my_jpeg_destination_mgr(QIODevice *device) free_in_buffer = max_buf; } -static bool can_write_format(QImage::Format fmt) -{ - switch (fmt) { - case QImage::Format_Mono: - case QImage::Format_MonoLSB: - case QImage::Format_Indexed8: - case QImage::Format_RGB888: - case QImage::Format_RGB32: - case QImage::Format_ARGB32: - case QImage::Format_ARGB32_Premultiplied: - return true; - break; - default: - break; - } - return false; -} -static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int sourceQuality) +static bool write_jpeg_image(const QImage &image, QIODevice *device, int sourceQuality) { bool success = false; - const QImage image = can_write_format(sourceImage.format()) ? - sourceImage : sourceImage.convertToFormat(QImage::Format_RGB888); const QVector<QRgb> cmap = image.colorTable(); struct jpeg_compress_struct cinfo; @@ -617,7 +595,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s case QImage::Format_Mono: case QImage::Format_MonoLSB: if (gray) { - const uchar* data = image.scanLine(cinfo.next_scanline); + const uchar* data = image.constScanLine(cinfo.next_scanline); if (image.format() == QImage::Format_MonoLSB) { for (int i=0; i<w; i++) { bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7))); @@ -630,7 +608,7 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s } } } else { - const uchar* data = image.scanLine(cinfo.next_scanline); + const uchar* data = image.constScanLine(cinfo.next_scanline); if (image.format() == QImage::Format_MonoLSB) { for (int i=0; i<w; i++) { bool bit = !!(*(data + (i >> 3)) & (1 << (i & 7))); @@ -650,13 +628,13 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s break; case QImage::Format_Indexed8: if (gray) { - const uchar* pix = image.scanLine(cinfo.next_scanline); + const uchar* pix = image.constScanLine(cinfo.next_scanline); for (int i=0; i<w; i++) { *row = qRed(cmap[*pix]); ++row; ++pix; } } else { - const uchar* pix = image.scanLine(cinfo.next_scanline); + const uchar* pix = image.constScanLine(cinfo.next_scanline); for (int i=0; i<w; i++) { *row++ = qRed(cmap[*pix]); *row++ = qGreen(cmap[*pix]); @@ -666,12 +644,12 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s } break; case QImage::Format_RGB888: - memcpy(row, image.scanLine(cinfo.next_scanline), w * 3); + memcpy(row, image.constScanLine(cinfo.next_scanline), w * 3); break; case QImage::Format_RGB32: case QImage::Format_ARGB32: case QImage::Format_ARGB32_Premultiplied: { - QRgb* rgb = (QRgb*)image.scanLine(cinfo.next_scanline); + const QRgb* rgb = (const QRgb*)image.constScanLine(cinfo.next_scanline); for (int i=0; i<w; i++) { *row++ = qRed(*rgb); *row++ = qGreen(*rgb); @@ -681,8 +659,12 @@ static bool write_jpeg_image(const QImage &sourceImage, QIODevice *device, int s break; } default: - qWarning("QJpegHandler: unable to write image of format %i", - image.format()); + for (int i=0; i<w; i++) { + QRgb pix = image.pixel(i, cinfo.next_scanline); + *row++ = qRed(pix); + *row++ = qGreen(pix); + *row++ = qBlue(pix); + } break; } jpeg_write_scanlines(&cinfo, row_pointer, 1); diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index dc38a0a..fa00e95 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -579,7 +579,7 @@ int QPixmap::height() const */ QSize QPixmap::size() const { - return data ? QSize(data->width(), data->height()) : QSize(); + return data ? QSize(data->width(), data->height()) : QSize(0, 0); } /*! @@ -1170,15 +1170,24 @@ QPixmap QPixmap::grabWidget(QWidget * widget, const QRect &rect) \warning This function is X11 specific; using it is non-portable. + \warning Since 4.8, pixmaps do not have an X11 handle unless + created with \l {QPixmap::}{fromX11Pixmap()}, or if the native + graphics system is explicitly enabled. + \sa detach() + \sa QApplication::setGraphicsSystem() */ Qt::HANDLE QPixmap::handle() const { #if defined(Q_WS_X11) const QPixmapData *pd = pixmapData(); - if (pd && pd->classId() == QPixmapData::X11Class) - return static_cast<const QX11PixmapData*>(pd)->handle(); + if (pd) { + if (pd->classId() == QPixmapData::X11Class) + return static_cast<const QX11PixmapData*>(pd)->handle(); + else + qWarning("QPixmap::handle(): Pixmap is not an X11 class pixmap"); + } #endif return 0; } diff --git a/src/gui/image/qpixmapfilter.cpp b/src/gui/image/qpixmapfilter.cpp index 70770c4..26bffcc 100644 --- a/src/gui/image/qpixmapfilter.cpp +++ b/src/gui/image/qpixmapfilter.cpp @@ -764,10 +764,17 @@ void expblur(QImage &img, qreal radius, bool improvedQuality = false, int transp } if (transposed == 0) { - qt_memrotate90(reinterpret_cast<const quint32*>(temp.bits()), - temp.width(), temp.height(), temp.bytesPerLine(), - reinterpret_cast<quint32*>(img.bits()), - img.bytesPerLine()); + if (img.depth() == 8) { + qt_memrotate90(reinterpret_cast<const quint8*>(temp.bits()), + temp.width(), temp.height(), temp.bytesPerLine(), + reinterpret_cast<quint8*>(img.bits()), + img.bytesPerLine()); + } else { + qt_memrotate90(reinterpret_cast<const quint32*>(temp.bits()), + temp.width(), temp.height(), temp.bytesPerLine(), + reinterpret_cast<quint32*>(img.bits()), + img.bytesPerLine()); + } } else { img = temp; } diff --git a/src/gui/image/qtiffhandler.cpp b/src/gui/image/qtiffhandler.cpp index de4f680..2e8b998 100644 --- a/src/gui/image/qtiffhandler.cpp +++ b/src/gui/image/qtiffhandler.cpp @@ -196,9 +196,12 @@ bool QTiffHandler::read(QImage *image) uint16 bitPerSample; if (!TIFFGetField(tiff, TIFFTAG_BITSPERSAMPLE, &bitPerSample)) bitPerSample = 1; + uint16 samplesPerPixel; // they may be e.g. grayscale with 2 samples per pixel + if (!TIFFGetField(tiff, TIFFTAG_SAMPLESPERPIXEL, &samplesPerPixel)) + samplesPerPixel = 1; bool grayscale = photometric == PHOTOMETRIC_MINISBLACK || photometric == PHOTOMETRIC_MINISWHITE; - if (grayscale && bitPerSample == 1) { + if (grayscale && bitPerSample == 1 && samplesPerPixel == 1) { if (image->size() != QSize(width, height) || image->format() != QImage::Format_Mono) *image = QImage(width, height, QImage::Format_Mono); QVector<QRgb> colortable(2); @@ -220,7 +223,7 @@ bool QTiffHandler::read(QImage *image) } } } else { - if ((grayscale || photometric == PHOTOMETRIC_PALETTE) && bitPerSample == 8) { + if ((grayscale || photometric == PHOTOMETRIC_PALETTE) && bitPerSample == 8 && samplesPerPixel == 1) { if (image->size() != QSize(width, height) || image->format() != QImage::Format_Indexed8) *image = QImage(width, height, QImage::Format_Indexed8); if (!image->isNull()) { diff --git a/src/gui/itemviews/qabstractproxymodel.cpp b/src/gui/itemviews/qabstractproxymodel.cpp index 4d4b3d8..51dfa7a 100644 --- a/src/gui/itemviews/qabstractproxymodel.cpp +++ b/src/gui/itemviews/qabstractproxymodel.cpp @@ -190,8 +190,12 @@ QItemSelection QAbstractProxyModel::mapSelectionToSource(const QItemSelection &p { QModelIndexList proxyIndexes = proxySelection.indexes(); QItemSelection sourceSelection; - for (int i = 0; i < proxyIndexes.size(); ++i) - sourceSelection << QItemSelectionRange(mapToSource(proxyIndexes.at(i))); + for (int i = 0; i < proxyIndexes.size(); ++i) { + const QModelIndex proxyIdx = mapToSource(proxyIndexes.at(i)); + if (!proxyIdx.isValid()) + continue; + sourceSelection << QItemSelectionRange(proxyIdx); + } return sourceSelection; } @@ -204,8 +208,12 @@ QItemSelection QAbstractProxyModel::mapSelectionFromSource(const QItemSelection { QModelIndexList sourceIndexes = sourceSelection.indexes(); QItemSelection proxySelection; - for (int i = 0; i < sourceIndexes.size(); ++i) - proxySelection << QItemSelectionRange(mapFromSource(sourceIndexes.at(i))); + for (int i = 0; i < sourceIndexes.size(); ++i) { + const QModelIndex srcIdx = mapFromSource(sourceIndexes.at(i)); + if (!srcIdx.isValid()) + continue; + proxySelection << QItemSelectionRange(srcIdx); + } return proxySelection; } diff --git a/src/gui/itemviews/qsortfilterproxymodel.cpp b/src/gui/itemviews/qsortfilterproxymodel.cpp index 953a7f1..dc8d938 100644 --- a/src/gui/itemviews/qsortfilterproxymodel.cpp +++ b/src/gui/itemviews/qsortfilterproxymodel.cpp @@ -2230,6 +2230,14 @@ void QSortFilterProxyModel::setFilterFixedString(const QString &pattern) \brief whether the proxy model is dynamically sorted and filtered whenever the contents of the source model change + Note that you should not update the source model through the proxy + model when dynamicSortFilter is true. For instance, if you set the + proxy model on a QComboBox, then using functions that update the + model, e.g., \l{QComboBox::}{addItem()}, will not work as + expected. An alternative is to set dynamicSortFilter to false and + call \l{QSortFilterProxyModel::}{sort()} after adding items to the + QComboBox. + The default value is false. */ bool QSortFilterProxyModel::dynamicSortFilter() const diff --git a/src/gui/kernel/qaction.cpp b/src/gui/kernel/qaction.cpp index a6d2594..f7e0751 100644 --- a/src/gui/kernel/qaction.cpp +++ b/src/gui/kernel/qaction.cpp @@ -82,8 +82,9 @@ static QString qt_strippedText(QString s) QActionPrivate::QActionPrivate() : group(0), enabled(1), forceDisabled(0), visible(1), forceInvisible(0), checkable(0), checked(0), separator(0), fontSet(false), forceEnabledInSoftkeys(false), menuActionSoftkeys(false), + iconVisibleInMenu(-1), menuRole(QAction::TextHeuristicRole), softKeyRole(QAction::NoSoftKey), - priority(QAction::NormalPriority), iconVisibleInMenu(-1) + priority(QAction::NormalPriority) { #ifdef QT3_SUPPORT static int qt_static_action_id = -1; diff --git a/src/gui/kernel/qapplication.cpp b/src/gui/kernel/qapplication.cpp index dd4de28..463fe2e 100644 --- a/src/gui/kernel/qapplication.cpp +++ b/src/gui/kernel/qapplication.cpp @@ -65,6 +65,7 @@ #include "qcolormap.h" #include "qdebug.h" #include "private/qgraphicssystemfactory_p.h" +#include "private/qgraphicssystem_p.h" #include "private/qstylesheetstyle_p.h" #include "private/qstyle_p.h" #include "qmessagebox.h" @@ -94,6 +95,10 @@ #include <stdlib.h> +#if defined(Q_WS_X11) && !defined(QT_NO_EGL) +#include <link.h> +#endif + #include "qapplication_p.h" #include "qevent_p.h" #include "qwidget_p.h" @@ -490,6 +495,7 @@ bool QApplicationPrivate::fade_tooltip = false; bool QApplicationPrivate::animate_toolbox = false; bool QApplicationPrivate::widgetCount = false; bool QApplicationPrivate::load_testability = false; +QString QApplicationPrivate::qmljsDebugArguments; #ifdef QT_KEYPAD_NAVIGATION # ifdef Q_OS_SYMBIAN Qt::NavigationMode QApplicationPrivate::navigationMode = Qt::NavigationModeKeypadDirectional; @@ -561,6 +567,8 @@ void QApplicationPrivate::process_cmdline() QString s; if (arg == "-qdevel" || arg == "-qdebug") { // obsolete argument + } else if (arg.indexOf("-qmljsdebugger=", 0) != -1) { + qmljsDebugArguments = QString::fromLocal8Bit(arg.right(arg.length() - 15)); } else if (arg.indexOf("-style=", 0) != -1) { s = QString::fromLocal8Bit(arg.right(arg.length() - 7).toLower()); } else if (arg == "-style" && i < argc-1) { @@ -666,6 +674,9 @@ void QApplicationPrivate::process_cmdline() Qt::RightToLeft \o -graphicssystem, sets the backend to be used for on-screen widgets and QPixmaps. Available options are \c{raster} and \c{opengl}. + \o -qmljsdebugger=, activates the QML/JS debugger with a specified port. + The value must be of format port:1234[,block], where block is optional + and will make the application wait until a debugger connects to it. \endlist The X11 version of Qt supports some traditional X11 command line options: @@ -769,6 +780,13 @@ QApplication::QApplication(int &argc, char **argv, Type type , int _internal) : QCoreApplication(*new QApplicationPrivate(argc, argv, type, _internal)) { Q_D(QApplication); d->construct(); } +#if defined(Q_WS_X11) && !defined(QT_NO_EGL) +static int qt_matchLibraryName(dl_phdr_info *info, size_t, void *data) +{ + const char *name = static_cast<const char *>(data); + return strstr(info->dlpi_name, name) != 0; +} +#endif /*! \internal @@ -787,6 +805,19 @@ void QApplicationPrivate::construct( // the environment variable has the lowest precedence of runtime graphicssystem switches if (graphics_system_name.isEmpty()) graphics_system_name = QString::fromLocal8Bit(qgetenv("QT_GRAPHICSSYSTEM")); + +#if defined(Q_WS_X11) && !defined(QT_NO_EGL) + if (graphics_system_name.isEmpty()) { + bool linksWithMeeGoTouch = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libmeegotouchcore")); + bool linksWithMeeGoGraphicsSystemHelper = dl_iterate_phdr(qt_matchLibraryName, const_cast<char *>("libQtMeeGoGraphicsSystemHelper")); + + if (linksWithMeeGoTouch && !linksWithMeeGoGraphicsSystemHelper) { + qWarning("Running non-meego graphics system enabled MeeGo touch, forcing native graphicssystem\n"); + graphics_system_name = QLatin1String("native"); + } + } +#endif + // Must be called before initialize() qt_init(this, qt_appType #ifdef Q_WS_X11 @@ -1119,6 +1150,8 @@ QApplication::~QApplication() QApplicationPrivate::app_style = 0; delete QApplicationPrivate::app_icon; QApplicationPrivate::app_icon = 0; + delete QApplicationPrivate::graphics_system; + QApplicationPrivate::graphics_system = 0; #ifndef QT_NO_CURSOR d->cursor_list.clear(); #endif @@ -4352,11 +4385,13 @@ bool QApplication::notify(QObject *receiver, QEvent *e) eventAccepted = ge.isAccepted(); for (int i = 0; i < gestures.size(); ++i) { QGesture *g = gestures.at(i); - if ((res && eventAccepted) || (!eventAccepted && ge.isAccepted(g))) { + // Ignore res [event return value] because handling of multiple gestures + // packed into a single QEvent depends on not consuming the event + if (eventAccepted || ge.isAccepted(g)) { // if the gesture was accepted, mark the target widget for it gestureEvent->d_func()->targetWidgets[g->gestureType()] = w; gestureEvent->setAccepted(g, true); - } else if (!eventAccepted && !ge.isAccepted(g)) { + } else { // if the gesture was explicitly ignored by the application, // put it back so a parent can get it allGestures.append(g); diff --git a/src/gui/kernel/qapplication_p.h b/src/gui/kernel/qapplication_p.h index 9c78370..9f675e3 100644 --- a/src/gui/kernel/qapplication_p.h +++ b/src/gui/kernel/qapplication_p.h @@ -464,6 +464,8 @@ public: static bool animate_toolbox; static bool widgetCount; // Coupled with -widgetcount switch static bool load_testability; // Coupled with -testability switch + static QString qmljsDebugArguments; // a string containing arguments for js/qml debugging. + #ifdef Q_WS_MAC static bool native_modal_dialog_active; #endif @@ -568,12 +570,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 diff --git a/src/gui/kernel/qapplication_x11.cpp b/src/gui/kernel/qapplication_x11.cpp index cb36b45..d905639 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 <private/qunicodetables_p.h> #include <private/qcrashhandler_p.h> #include <private/qcolor_p.h> #include <private/qcursor_p.h> @@ -400,11 +399,39 @@ QTabletDeviceDataList *qt_tablet_devices() extern bool qt_tabletChokeMouse; #endif +typedef bool(*QX11FilterFunction)(XEvent *event); + +Q_GLOBAL_STATIC(QList<QX11FilterFunction>, x11Filters) + +Q_GUI_EXPORT void qt_installX11EventFilter(QX11FilterFunction func) +{ + Q_ASSERT(func); + + if (QList<QX11FilterFunction> *list = x11Filters()) + list->append(func); +} + +Q_GUI_EXPORT void qt_removeX11EventFilter(QX11FilterFunction func) +{ + Q_ASSERT(func); + + if (QList<QX11FilterFunction> *list = x11Filters()) + list->removeOne(func); +} + + static bool qt_x11EventFilter(XEvent* ev) { long unused; if (qApp->filterEvent(ev, &unused)) return true; + if (const QList<QX11FilterFunction> *list = x11Filters()) { + for (QList<QX11FilterFunction>::const_iterator it = list->constBegin(); it != list->constEnd(); ++it) { + if ((*it)(ev)) + return true; + } + } + return qApp->x11EventFilter(ev); } diff --git a/src/gui/kernel/qcocoaapplication_mac.mm b/src/gui/kernel/qcocoaapplication_mac.mm index 9270213..1b30efd 100644 --- a/src/gui/kernel/qcocoaapplication_mac.mm +++ b/src/gui/kernel/qcocoaapplication_mac.mm @@ -183,6 +183,17 @@ QT_USE_NAMESPACE [super sendEvent:event]; } +- (void)qtDispatcherToQAction:(id)sender +{ + // Forward actions sendt from the menu bar (e.g. quit) to the menu loader. + // Having this method here means that we are the last stop in the responder + // chain, and that we are able to handle menu actions even when no window is + // visible on screen. Note: If Qt is used as a plugin, Qt will not use a + // native menu bar. Hence, we will also not need to do any redirection etc. as + // we do with sendEvent. + [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; +} + @end QT_BEGIN_NAMESPACE diff --git a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h index 970bc0a..efe045c 100644 --- a/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h +++ b/src/gui/kernel/qcocoasharedwindowmethods_mac_p.h @@ -136,16 +136,6 @@ QT_END_NAMESPACE qt_dispatchTabletProximityEvent(tabletEvent); } -- (void)qtDispatcherToQAction:(id)sender -{ - // If this window is modal, the menu bar will be modally shaddowed. - // In that case, since the window will be in the first responder chain, - // we can still catch the trigger here and forward it to the menu bar. - // This is needed as a single modal dialog on Qt should be able to access - // the application menu (e.g. quit). - [[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender]; -} - - (void)terminate:(id)sender { // This function is called from the quit item in the menubar when this window diff --git a/src/gui/kernel/qgesture.cpp b/src/gui/kernel/qgesture.cpp index 13274c4..5725a22 100644 --- a/src/gui/kernel/qgesture.cpp +++ b/src/gui/kernel/qgesture.cpp @@ -775,4 +775,6 @@ int QTapAndHoldGesturePrivate::Timeout = 700; // in ms QT_END_NAMESPACE +#include <moc_qgesture.cpp> + #endif // QT_NO_GESTURES diff --git a/src/gui/kernel/qgesture.h b/src/gui/kernel/qgesture.h index dcb0264..8416708 100644 --- a/src/gui/kernel/qgesture.h +++ b/src/gui/kernel/qgesture.h @@ -54,6 +54,7 @@ QT_BEGIN_HEADER Q_DECLARE_METATYPE(Qt::GestureState) +Q_DECLARE_METATYPE(Qt::GestureType) QT_BEGIN_NAMESPACE @@ -112,6 +113,8 @@ class Q_GUI_EXPORT QPanGesture : public QGesture Q_PROPERTY(QPointF offset READ offset WRITE setOffset) Q_PROPERTY(QPointF delta READ delta STORED false) Q_PROPERTY(qreal acceleration READ acceleration WRITE setAcceleration) + Q_PRIVATE_PROPERTY(QPanGesture::d_func(), qreal horizontalVelocity READ horizontalVelocity WRITE setHorizontalVelocity) + Q_PRIVATE_PROPERTY(QPanGesture::d_func(), qreal verticalVelocity READ verticalVelocity WRITE setVerticalVelocity) public: QPanGesture(QObject *parent = 0); @@ -210,6 +213,7 @@ class Q_GUI_EXPORT QSwipeGesture : public QGesture Q_PROPERTY(SwipeDirection horizontalDirection READ horizontalDirection STORED false) Q_PROPERTY(SwipeDirection verticalDirection READ verticalDirection STORED false) Q_PROPERTY(qreal swipeAngle READ swipeAngle WRITE setSwipeAngle) + Q_PRIVATE_PROPERTY(QSwipeGesture::d_func(), qreal velocity READ velocity WRITE setVelocity) public: enum SwipeDirection { NoDirection, Left, Right, Up, Down }; diff --git a/src/gui/kernel/qgesture_p.h b/src/gui/kernel/qgesture_p.h index 29b923e..6a856ac 100644 --- a/src/gui/kernel/qgesture_p.h +++ b/src/gui/kernel/qgesture_p.h @@ -88,14 +88,21 @@ class QPanGesturePrivate : public QGesturePrivate public: QPanGesturePrivate() - : acceleration(0) + : acceleration(0), xVelocity(0), yVelocity(0) { } + qreal horizontalVelocity() const { return xVelocity; } + void setHorizontalVelocity(qreal value) { xVelocity = value; } + qreal verticalVelocity() const { return yVelocity; } + void setVerticalVelocity(qreal value) { yVelocity = value; } + QPointF lastOffset; QPointF offset; QPoint startPosition; qreal acceleration; + qreal xVelocity; + qreal yVelocity; }; class QPinchGesturePrivate : public QGesturePrivate @@ -105,7 +112,7 @@ class QPinchGesturePrivate : public QGesturePrivate public: QPinchGesturePrivate() : totalChangeFlags(0), changeFlags(0), - totalScaleFactor(0), lastScaleFactor(0), scaleFactor(0), + totalScaleFactor(1), lastScaleFactor(1), scaleFactor(1), totalRotationAngle(0), lastRotationAngle(0), rotationAngle(0), isNewSequence(true) { @@ -139,17 +146,20 @@ public: : horizontalDirection(QSwipeGesture::NoDirection), verticalDirection(QSwipeGesture::NoDirection), swipeAngle(0), - started(false), speed(0) + started(false), velocityValue(0) { } + qreal velocity() const { return velocityValue; } + void setVelocity(qreal value) { velocityValue = value; } + QSwipeGesture::SwipeDirection horizontalDirection; QSwipeGesture::SwipeDirection verticalDirection; qreal swipeAngle; QPoint lastPositions[3]; bool started; - qreal speed; + qreal velocityValue; QElapsedTimer time; }; diff --git a/src/gui/kernel/qgesturemanager.cpp b/src/gui/kernel/qgesturemanager.cpp index 5c80340..8dd2db7 100644 --- a/src/gui/kernel/qgesturemanager.cpp +++ b/src/gui/kernel/qgesturemanager.cpp @@ -184,7 +184,7 @@ void QGestureManager::cleanupCachedGestures(QObject *target, Qt::GestureType typ // get or create a QGesture object that will represent the state for a given object, used by the recognizer QGesture *QGestureManager::getState(QObject *object, QGestureRecognizer *recognizer, Qt::GestureType type) { - // if the widget is being deleted we should be carefull and not to + // if the widget is being deleted we should be careful not to // create a new state, as it will create QWeakPointer which doesnt work // from the destructor. if (object->isWidgetType()) { @@ -239,52 +239,53 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *, // TODO: sort contexts by the gesture type and check if one of the contexts // is already active. - bool ret = false; + bool consumeEventHint = false; // filter the event through recognizers typedef QMultiMap<QObject *, Qt::GestureType>::const_iterator ContextIterator; - for (ContextIterator cit = contexts.begin(), ce = contexts.end(); cit != ce; ++cit) { - Qt::GestureType gestureType = cit.value(); + ContextIterator contextEnd = contexts.end(); + for (ContextIterator context = contexts.begin(); context != contextEnd; ++context) { + Qt::GestureType gestureType = context.value(); QMap<Qt::GestureType, QGestureRecognizer *>::const_iterator - rit = m_recognizers.lowerBound(gestureType), - re = m_recognizers.upperBound(gestureType); - for (; rit != re; ++rit) { - QGestureRecognizer *recognizer = rit.value(); - QObject *target = cit.key(); + typeToRecognizerIterator = m_recognizers.lowerBound(gestureType), + typeToRecognizerEnd = m_recognizers.upperBound(gestureType); + for (; typeToRecognizerIterator != typeToRecognizerEnd; ++typeToRecognizerIterator) { + QGestureRecognizer *recognizer = typeToRecognizerIterator.value(); + QObject *target = context.key(); QGesture *state = getState(target, recognizer, gestureType); if (!state) continue; - QGestureRecognizer::Result result = recognizer->recognize(state, target, event); - QGestureRecognizer::Result type = result & QGestureRecognizer::ResultState_Mask; - result &= QGestureRecognizer::ResultHint_Mask; - if (type == QGestureRecognizer::TriggerGesture) { + QGestureRecognizer::Result recognizerResult = recognizer->recognize(state, target, event); + QGestureRecognizer::Result recognizerState = recognizerResult & QGestureRecognizer::ResultState_Mask; + QGestureRecognizer::Result resultHint = recognizerResult & QGestureRecognizer::ResultHint_Mask; + if (recognizerState == QGestureRecognizer::TriggerGesture) { DEBUG() << "QGestureManager:Recognizer: gesture triggered: " << state; triggeredGestures << state; - } else if (type == QGestureRecognizer::FinishGesture) { + } else if (recognizerState == QGestureRecognizer::FinishGesture) { DEBUG() << "QGestureManager:Recognizer: gesture finished: " << state; finishedGestures << state; - } else if (type == QGestureRecognizer::MayBeGesture) { + } else if (recognizerState == QGestureRecognizer::MayBeGesture) { DEBUG() << "QGestureManager:Recognizer: maybe gesture: " << state; newMaybeGestures << state; - } else if (type == QGestureRecognizer::CancelGesture) { + } else if (recognizerState == QGestureRecognizer::CancelGesture) { DEBUG() << "QGestureManager:Recognizer: not gesture: " << state; notGestures << state; - } else if (type == QGestureRecognizer::Ignore) { + } else if (recognizerState == QGestureRecognizer::Ignore) { DEBUG() << "QGestureManager:Recognizer: ignored the event: " << state; } else { DEBUG() << "QGestureManager:Recognizer: hm, lets assume the recognizer" << "ignored the event: " << state; } - if (result & QGestureRecognizer::ConsumeEventHint) { + if (resultHint & QGestureRecognizer::ConsumeEventHint) { DEBUG() << "QGestureManager: we were asked to consume the event: " << state; - ret = true; + consumeEventHint = true; } } } if (triggeredGestures.isEmpty() && finishedGestures.isEmpty() && newMaybeGestures.isEmpty() && notGestures.isEmpty()) - return ret; + return consumeEventHint; QSet<QGesture *> startedGestures = triggeredGestures - m_activeGestures; triggeredGestures &= m_activeGestures; @@ -381,7 +382,7 @@ bool QGestureManager::filterEventThroughContexts(const QMultiMap<QObject *, recycle(gesture); m_gestureTargets.remove(gesture); } - return ret; + return consumeEventHint; } // Cancel all gestures of children of the widget that original is associated with diff --git a/src/gui/kernel/qkeysequence.cpp b/src/gui/kernel/qkeysequence.cpp index 562227a..e14a9198 100644 --- a/src/gui/kernel/qkeysequence.cpp +++ b/src/gui/kernel/qkeysequence.cpp @@ -590,7 +590,7 @@ static const struct { //: Button that will hang up if we're in call, or make a call if we're not. { Qt::Key_ToggleCallHangup, QT_TRANSLATE_NOOP("QShortcut", "Toggle Call/Hangup") }, { Qt::Key_Flip, QT_TRANSLATE_NOOP("QShortcut", "Flip") }, - //: Button to trigger voice dialling + //: Button to trigger voice dialing { Qt::Key_VoiceDial, QT_TRANSLATE_NOOP("QShortcut", "Voice Dial") }, //: Button to redial the last number called { Qt::Key_LastNumberRedial, QT_TRANSLATE_NOOP("QShortcut", "Last Number Redial") }, diff --git a/src/gui/kernel/qstandardgestures.cpp b/src/gui/kernel/qstandardgestures.cpp index 127e150..893ba2b 100644 --- a/src/gui/kernel/qstandardgestures.cpp +++ b/src/gui/kernel/qstandardgestures.cpp @@ -199,6 +199,7 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, d->startPosition[1] = p2.screenPos(); } QLineF line(p1.screenPos(), p2.screenPos()); + QLineF lastLine(p1.lastScreenPos(), p2.lastScreenPos()); QLineF tmp(line); tmp.setLength(line.length() / 2.); QPointF centerPoint = tmp.p2(); @@ -207,16 +208,15 @@ QGestureRecognizer::Result QPinchGestureRecognizer::recognize(QGesture *state, d->centerPoint = centerPoint; d->changeFlags |= QPinchGesture::CenterPointChanged; - const qreal scaleFactor = - QLineF(p1.screenPos(), p2.screenPos()).length() - / QLineF(d->startPosition[0], d->startPosition[1]).length(); + const qreal scaleFactor = line.length() / lastLine.length(); + if (d->isNewSequence) { d->lastScaleFactor = scaleFactor; } else { d->lastScaleFactor = d->scaleFactor; } d->scaleFactor = scaleFactor; - d->totalScaleFactor += d->scaleFactor - d->lastScaleFactor; + d->totalScaleFactor = d->totalScaleFactor * scaleFactor; d->changeFlags |= QPinchGesture::ScaleFactorChanged; qreal angle = QLineF(p1.screenPos(), p2.screenPos()).angle(); @@ -266,7 +266,7 @@ void QPinchGestureRecognizer::reset(QGesture *state) d->totalChangeFlags = d->changeFlags = 0; d->startCenterPoint = d->lastCenterPoint = d->centerPoint = QPointF(); - d->totalScaleFactor = d->lastScaleFactor = d->scaleFactor = 0; + d->totalScaleFactor = d->lastScaleFactor = d->scaleFactor = 1; d->totalRotationAngle = d->lastRotationAngle = d->rotationAngle = 0; d->isNewSequence = true; @@ -304,7 +304,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state, switch (event->type()) { case QEvent::TouchBegin: { - d->speed = 1; + d->velocityValue = 1; d->time.start(); d->started = true; result = QGestureRecognizer::MayBeGesture; @@ -345,7 +345,7 @@ QGestureRecognizer::Result QSwipeGestureRecognizer::recognize(QGesture *state, int elapsedTime = d->time.restart(); if (!elapsedTime) elapsedTime = 1; - d->speed = 0.9 * d->speed + distance / elapsedTime; + d->velocityValue = 0.9 * d->velocityValue + distance / elapsedTime; d->swipeAngle = QLineF(p1.startScreenPos(), p1.screenPos()).angle(); static const int MoveThreshold = 50; @@ -407,7 +407,7 @@ void QSwipeGestureRecognizer::reset(QGesture *state) d->lastPositions[0] = d->lastPositions[1] = d->lastPositions[2] = QPoint(); d->started = false; - d->speed = 0; + d->velocityValue = 0; d->time.invalidate(); QGestureRecognizer::reset(state); diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 00fd9d4..cd48ca3 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -1199,7 +1199,7 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w) flags |= Qt::WindowTitleHint; } if (customize) - ; // don't modify window flags if the user explicitely set them. + ; // don't modify window flags if the user explicitly set them. else if (type == Qt::Dialog || type == Qt::Sheet) #ifndef Q_WS_WINCE flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowContextHelpButtonHint | Qt::WindowCloseButtonHint; @@ -7514,7 +7514,7 @@ void QWidgetPrivate::hide_helper() A hidden widget will only become visible when show() is called on it. It will not be automatically shown when the parent is shown. - To check visiblity, use !isVisible() instead (notice the exclamation mark). + To check visibility, use !isVisible() instead (notice the exclamation mark). isHidden() implies !isVisible(), but a widget can be not visible and not hidden at the same time. This is the case for widgets that are children of @@ -11129,7 +11129,7 @@ void QWidget::updateMicroFocus() { #if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN)) Q_D(QWidget); - // and optimisation to update input context only it has already been created. + // and optimization to update input context only it has already been created. if (d->ic || qApp->d_func()->inputContext) { QInputContext *ic = inputContext(); if (ic) @@ -11874,8 +11874,8 @@ QWidget *QWidgetPrivate::widgetInNavigationDirection(Direction direction) Tells us if it there is currently a reachable widget by keypad navigation in a certain \a orientation. - If no navigation is possible, occuring key events in that \a orientation may - be used to interact with the value in the focussed widget, even though it + If no navigation is possible, occurring key events in that \a orientation may + be used to interact with the value in the focused widget, even though it currently has not the editFocus. \sa QWidgetPrivate::widgetInNavigationDirection(), QWidget::hasEditFocus() @@ -11895,7 +11895,7 @@ bool QWidgetPrivate::canKeypadNavigate(Qt::Orientation orientation) one, left/right key events will be used to switch between tabs in keypad navigation. If there is no QTabWidget, the horizontal key events can be used to - interact with the value in the focussed widget, even though it currently has + interact with the value in the focused widget, even though it currently has not the editFocus. \sa QWidget::hasEditFocus() diff --git a/src/gui/kernel/qwidget_mac.mm b/src/gui/kernel/qwidget_mac.mm index ef7e1d3..5e41efa 100644 --- a/src/gui/kernel/qwidget_mac.mm +++ b/src/gui/kernel/qwidget_mac.mm @@ -114,6 +114,9 @@ QT_BEGIN_NAMESPACE +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + #define XCOORD_MAX 16383 #define WRECT_MAX 8191 @@ -2375,7 +2378,8 @@ void QWidgetPrivate::recreateMacWindow() HIViewRemoveFromSuperview(myView); determineWindowClass(); createWindow_sys(); - if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) { + + if (QMainWindowLayout *mwl = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q))) { mwl->updateHIToolBarStatus(); } @@ -2912,7 +2916,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // We do this down below for wasCreated, so avoid doing this twice // (only for performance, it gets called a lot anyway). if (!wasCreated) { - if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) { + if (QMainWindowLayout *mwl = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q))) { mwl->updateHIToolBarStatus(); } } @@ -2937,7 +2941,7 @@ void QWidgetPrivate::setParent_sys(QWidget *parent, Qt::WindowFlags f) // If we were a unified window, We just transfered our toolbars out of the unified toolbar. // So redo the status one more time. It apparently is not an issue with Cocoa. if (q->isWindow()) { - if (QMainWindowLayout *mwl = qobject_cast<QMainWindowLayout *>(q->layout())) { + if (QMainWindowLayout *mwl = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q))) { mwl->updateHIToolBarStatus(); } } @@ -5138,7 +5142,7 @@ void QWidgetPrivate::macUpdateMetalAttribute() return; recreateMacWindow(); #else - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout *>(q->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q)); if (q->testAttribute(Qt::WA_MacBrushedMetal)) { if (layout) layout->updateHIToolBarStatus(); diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index 04104fa..91e74b5 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -522,7 +522,7 @@ void QWidgetPrivate::show_sys() if (q->windowState() & Qt::WindowMaximized) { TRect r = static_cast<CEikAppUi*>(S60->appUi())->ClientRect(); id->SetExtent(r.iTl, r.Size()); - } else if (!q->testAttribute(Qt::WA_Moved)) { + } else if (!q->testAttribute(Qt::WA_Moved) && q->windowType() != Qt::Dialog) { id->SetPosition(static_cast<CEikAppUi*>(S60->appUi())->ClientRect().iTl); } } diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index 2a9b31a..54c81ba 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -293,36 +293,6 @@ static ShiftResult good_offset(const QBezier *b1, const QBezier *b2, qreal offse return Ok; } -static inline QLineF qline_shifted(const QPointF &p1, const QPointF &p2, qreal offset) -{ - QLineF l(p1, p2); - QLineF ln = l.normalVector().unitVector(); - l.translate(ln.dx() * offset, ln.dy() * offset); - return l; -} - -static bool qbezier_is_line(QPointF *points, int pointCount) -{ - Q_ASSERT(pointCount > 2); - - qreal dx13 = points[2].x() - points[0].x(); - qreal dy13 = points[2].y() - points[0].y(); - - qreal dx12 = points[1].x() - points[0].x(); - qreal dy12 = points[1].y() - points[0].y(); - - if (pointCount == 3) { - return qFuzzyCompare(dx12 * dy13, dx13 * dy12); - } else if (pointCount == 4) { - qreal dx14 = points[3].x() - points[0].x(); - qreal dy14 = points[3].y() - points[0].y(); - - return (qFuzzyCompare(dx12 * dy13, dx13 * dy12) && qFuzzyCompare(dx12 * dy14, dx14 * dy12)); - } - - return false; -} - static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qreal threshold) { int map[4]; @@ -353,17 +323,6 @@ static ShiftResult shift(const QBezier *orig, QBezier *shifted, qreal offset, qr if (np == 1) return Discard; - // We need to specialcase lines of 3 or 4 points due to numerical - // instability in intersections below - if (np > 2 && qbezier_is_line(points, np)) { - if (points[0] == points[np-1]) - return Discard; - - QLineF l = qline_shifted(points[0], points[np-1], offset); - *shifted = QBezier::fromPoints(l.p1(), l.pointAt(qreal(0.33)), l.pointAt(qreal(0.66)), l.p2()); - return Ok; - } - QRectF b = orig->bounds(); if (np == 4 && b.width() < .1*offset && b.height() < .1*offset) { qreal l = (orig->x1 - orig->x2)*(orig->x1 - orig->x2) + diff --git a/src/gui/painting/qblendfunctions.cpp b/src/gui/painting/qblendfunctions.cpp index 0edf256..e0c2d16 100644 --- a/src/gui/painting/qblendfunctions.cpp +++ b/src/gui/painting/qblendfunctions.cpp @@ -309,9 +309,9 @@ template <typename T> void qt_blend_argb24_on_rgb16(uchar *destPixels, int dbpl, const uchar *src = srcPixels + y * sbpl; const uchar *srcEnd = src + srcOffset; while (src < srcEnd) { -#if defined(QT_ARCH_ARM) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) +#if defined(QT_ARCH_ARMV5) || defined(QT_ARCH_POWERPC) || defined(QT_ARCH_SH) || defined(QT_ARCH_AVR32) || (defined(QT_ARCH_WINDOWSCE) && !defined(_X86_)) || (defined(QT_ARCH_SPARC) && defined(Q_CC_GNU)) // non-16-bit aligned memory access is not possible on PowerPC, - // ARM <v6 (QT_ARCH_ARMV6) & SH & AVR32 & SPARC w/GCC + // ARM <v6 (QT_ARCH_ARMV5) & SH & AVR32 & SPARC w/GCC quint16 spix = (quint16(src[2])<<8) + src[1]; #else quint16 spix = *(quint16 *) (src + 1); diff --git a/src/gui/painting/qbrush.cpp b/src/gui/painting/qbrush.cpp index d3061d8..d0788c7 100644 --- a/src/gui/painting/qbrush.cpp +++ b/src/gui/painting/qbrush.cpp @@ -1218,17 +1218,16 @@ QDataStream &operator>>(QDataStream &s, QBrush &b) \o QConicalGradient \endtable - The colors in a gradient is defined using stop points of the - QGradientStop type, i.e. a position and a color. Use the - setColorAt() function to define a single stop - point. Alternatively, use the setStops() function to define - several stop points in one go. Note that the latter function \e - replaces the current set of stop points. + The colors in a gradient are defined using stop points of the + QGradientStop type; i.e., a position and a color. Use the setColorAt() + function to define a single stop point. Alternatively, use the + setStops() function to define several stop points in one go. Note that + the latter function \e replaces the current set of stop points. It is the gradient's complete set of stop points (accessible through the stops() function) that describes how the gradient area - should be filled. If no stop points have been specified, a - gradient of black at 0 to white at 1 is used. + should be filled. If no stop points have been specified, a gradient + of black at 0 to white at 1 is used. A diagonal linear gradient from black at (100, 100) to white at (200, 200) could be specified like this: diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index bd5b0bd..5f190ba 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -4835,7 +4835,7 @@ void QT_FASTCALL blendUntransformed_dest24(DST *dest, const SRC *src, if (SRC::hasAlpha()) { while (length >= 4) { - const quint32 alpha = BYTE_MUL(uint(alpha_4(src)), uint(coverage)); + const quint32 alpha = QT_PREPEND_NAMESPACE(BYTE_MUL)(uint(alpha_4(src)), uint(coverage)); if (alpha) interpolate_pixel_4(dest, src, alpha); length -= 4; diff --git a/src/gui/painting/qdrawhelper_sse2.cpp b/src/gui/painting/qdrawhelper_sse2.cpp index ba2ba32..f97d865 100644 --- a/src/gui/painting/qdrawhelper_sse2.cpp +++ b/src/gui/painting/qdrawhelper_sse2.cpp @@ -266,10 +266,10 @@ void qt_memfill32_sse2(quint32 *dest, quint32 value, int count) int n = (count128 + 3) / 4; switch (count128 & 0x3) { - case 0: do { _mm_store_si128(dst128++, value128); - case 3: _mm_store_si128(dst128++, value128); - case 2: _mm_store_si128(dst128++, value128); - case 1: _mm_store_si128(dst128++, value128); + case 0: do { _mm_stream_si128(dst128++, value128); + case 3: _mm_stream_si128(dst128++, value128); + case 2: _mm_stream_si128(dst128++, value128); + case 1: _mm_stream_si128(dst128++, value128); } while (--n > 0); } @@ -300,11 +300,14 @@ void QT_FASTCALL comp_func_solid_SourceOver_sse2(uint *destPixels, int length, u const __m128i half = _mm_set1_epi16(0x80); const __m128i minusAlphaOfColorVector = _mm_set1_epi16(minusAlphaOfColor); + ALIGNMENT_PROLOGUE_16BYTES(dst, x, length) + destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor); + for (; x < length-3; x += 4) { - __m128i dstVector = _mm_loadu_si128((__m128i *)&dst[x]); + __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); BYTE_MUL_SSE2(dstVector, dstVector, minusAlphaOfColorVector, colorMask, half); dstVector = _mm_add_epi8(colorVector, dstVector); - _mm_storeu_si128((__m128i *)&dst[x], dstVector); + _mm_store_si128((__m128i *)&dst[x], dstVector); } for (;x < length; ++x) destPixels[x] = color + BYTE_MUL(destPixels[x], minusAlphaOfColor); diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp index 4cb4089..fb5602e 100644 --- a/src/gui/painting/qdrawhelper_ssse3.cpp +++ b/src/gui/painting/qdrawhelper_ssse3.cpp @@ -79,69 +79,6 @@ inline static void blend_pixel(quint32 &dst, const quint32 src) } -#define BLEND_SOURCE_OVER_ARGB32_FIRST_ROW_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \ - int x = 0; \ -\ - /* First, get dst aligned. */ \ - const int offsetToAlignOn16Bytes = (4 - ((reinterpret_cast<quintptr>(dst) >> 2) & 0x3)) & 0x3;\ - const int prologLength = qMin(length, offsetToAlignOn16Bytes);\ -\ - for (; x < prologLength; ++x) {\ - blend_pixel(dst[x], src[x]); \ - } \ -\ - const int minusOffsetToAlignSrcOn16Bytes = (reinterpret_cast<quintptr>(&(src[x])) >> 2) & 0x3;\ -\ - if (!minusOffsetToAlignSrcOn16Bytes) {\ - /* src is aligned, usual algorithm but with aligned operations.\ - See the SSE2 version for more documentation on the algorithm itself. */\ - const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\ - for (; x < length-3; x += 4) { \ - const __m128i srcVector = _mm_load_si128((__m128i *)&src[x]); \ - const __m128i srcVectorAlpha = _mm_and_si128(srcVector, alphaMask); \ - if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, alphaMask)) == 0xffff) { \ - _mm_store_si128((__m128i *)&dst[x], srcVector); \ - } else if (_mm_movemask_epi8(_mm_cmpeq_epi32(srcVectorAlpha, nullVector)) != 0xffff) { \ - __m128i alphaChannel = _mm_shuffle_epi8(srcVector, alphaShuffleMask); \ - alphaChannel = _mm_sub_epi16(one, alphaChannel); \ - const __m128i dstVector = _mm_load_si128((__m128i *)&dst[x]); \ - __m128i destMultipliedByOneMinusAlpha; \ - BYTE_MUL_SSE2(destMultipliedByOneMinusAlpha, dstVector, alphaChannel, colorMask, half); \ - const __m128i result = _mm_add_epi8(srcVector, destMultipliedByOneMinusAlpha); \ - _mm_store_si128((__m128i *)&dst[x], result); \ - } \ - } /* end for() */\ - } else if ((length - x) >= 8) {\ - /* We are at the first line, so "x - minusOffsetToAlignSrcOn16Bytes" could go before src, and\ - generate an invalid access. */\ -\ - /* We use two vectors to extract the src: prevLoaded for the first pixels, lastLoaded for the current pixels. */\ - __m128i srcVectorPrevLoaded;\ - if (minusOffsetToAlignSrcOn16Bytes > prologLength) {\ - /* We go forward 4 pixels to avoid reading before src. */\ - for (; x < prologLength + 4; ++x)\ - blend_pixel(dst[x], src[x]); \ - }\ - srcVectorPrevLoaded = _mm_load_si128((__m128i *)&src[x - minusOffsetToAlignSrcOn16Bytes]);\ - const int palignrOffset = minusOffsetToAlignSrcOn16Bytes << 2;\ -\ - const __m128i alphaShuffleMask = _mm_set_epi8(0xff,15,0xff,15,0xff,11,0xff,11,0xff,7,0xff,7,0xff,3,0xff,3);\ - switch (palignrOffset) {\ - case 4:\ - BLENDING_LOOP(4, length)\ - break;\ - case 8:\ - BLENDING_LOOP(8, length)\ - break;\ - case 12:\ - BLENDING_LOOP(12, length)\ - break;\ - }\ - }\ - for (; x < length; ++x) \ - blend_pixel(dst[x], src[x]); \ -} - // Basically blend src over dst with the const alpha defined as constAlphaVector. // nullVector, half, one, colorMask are constant accross the whole image/texture, and should be defined as: //const __m128i nullVector = _mm_set1_epi32(0); @@ -153,7 +90,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src) // The computation being done is: // result = s + d * (1-alpha) // with shortcuts if fully opaque or fully transparent. -#define BLEND_SOURCE_OVER_ARGB32_MAIN_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \ +#define BLEND_SOURCE_OVER_ARGB32_SSSE3(dst, src, length, nullVector, half, one, colorMask, alphaMask) { \ int x = 0; \ \ /* First, get dst aligned. */ \ @@ -218,14 +155,8 @@ void qt_blend_argb32_on_argb32_ssse3(uchar *destPixels, int dbpl, const __m128i one = _mm_set1_epi16(0xff); const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); - // We have to unrol the first row in order to deal with the load on unaligned data - // prior to the src pointer. - BLEND_SOURCE_OVER_ARGB32_FIRST_ROW_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask); - dst = (quint32 *)(((uchar *) dst) + dbpl); - src = (const quint32 *)(((const uchar *) src) + sbpl); - - for (int y = 1; y < h; ++y) { - BLEND_SOURCE_OVER_ARGB32_MAIN_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask); + for (int y = 0; y < h; ++y) { + BLEND_SOURCE_OVER_ARGB32_SSSE3(dst, src, w, nullVector, half, one, colorMask, alphaMask); dst = (quint32 *)(((uchar *) dst) + dbpl); src = (const quint32 *)(((const uchar *) src) + sbpl); } diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index 2828e9d..a9fbbee 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -94,7 +94,8 @@ QRuntimePixmapData::QRuntimePixmapData(const QRuntimeGraphicsSystem *gs, PixelTy QRuntimePixmapData::~QRuntimePixmapData() { - m_graphicsSystem->removePixmapData(this); + if (QApplicationPrivate::graphics_system) + m_graphicsSystem->removePixmapData(this); delete m_data; } @@ -258,7 +259,8 @@ QRuntimeWindowSurface::QRuntimeWindowSurface(const QRuntimeGraphicsSystem *gs, Q QRuntimeWindowSurface::~QRuntimeWindowSurface() { - m_graphicsSystem->removeWindowSurface(this); + if (QApplicationPrivate::graphics_system) + m_graphicsSystem->removeWindowSurface(this); } QPaintDevice *QRuntimeWindowSurface::paintDevice() diff --git a/src/gui/painting/qgraphicssystem_runtime_p.h b/src/gui/painting/qgraphicssystem_runtime_p.h index 0232241..421fbeb 100644 --- a/src/gui/painting/qgraphicssystem_runtime_p.h +++ b/src/gui/painting/qgraphicssystem_runtime_p.h @@ -177,6 +177,7 @@ private: friend class QRuntimePixmapData; friend class QRuntimeWindowSurface; + friend class QMeeGoGraphicsSystem; }; QT_END_NAMESPACE diff --git a/src/gui/painting/qgraphicssystemfactory.cpp b/src/gui/painting/qgraphicssystemfactory.cpp index ee6fbd8..3adeba4 100644 --- a/src/gui/painting/qgraphicssystemfactory.cpp +++ b/src/gui/painting/qgraphicssystemfactory.cpp @@ -73,7 +73,7 @@ QGraphicsSystem *QGraphicsSystemFactory::create(const QString& key) if (system.isEmpty()) { system = QLatin1String("runtime"); } -#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN) +#elif defined (QT_GRAPHICSSYSTEM_RASTER) && !defined(Q_WS_WIN) && !defined(Q_OS_SYMBIAN) || defined(Q_WS_X11) if (system.isEmpty()) { system = QLatin1String("raster"); } diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 4792f00..3d963a7 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -3100,9 +3100,17 @@ void QRasterPaintEngine::drawCachedGlyphs(int numGlyphs, const glyph_t *glyphs, int margin = cache->glyphMargin(); + bool supportsSubPixelPositions = fontEngine->supportsSubPixelPositions(); + const uchar *bits = image.bits(); for (int i=0; i<numGlyphs; ++i) { - const QTextureGlyphCache::Coord &c = cache->coords.value(glyphs[i]); + + QFixed subPixelPosition; + if (supportsSubPixelPositions) + subPixelPosition = cache->subPixelPositionForX(positions[i].x); + QTextureGlyphCache::GlyphAndSubPixelPosition glyph(glyphs[i], subPixelPosition); + const QTextureGlyphCache::Coord &c = cache->coords.value(glyph); + int x = qFloor(positions[i].x) + c.baseLineX - margin; int y = qFloor(positions[i].y) - c.baseLineY - margin; diff --git a/src/gui/painting/qpaintengineex.cpp b/src/gui/painting/qpaintengineex.cpp index 881bd6e..1e857e4 100644 --- a/src/gui/painting/qpaintengineex.cpp +++ b/src/gui/painting/qpaintengineex.cpp @@ -768,7 +768,7 @@ void QPaintEngineEx::drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yR x1, y2 - (1 - KAPPA) * yRadius, x1, y2 - yRadius, x1, y1 + yRadius, // LineTo - x1, y1 + KAPPA * yRadius, // CurveTo + x1, y1 + (1 - KAPPA) * yRadius, // CurveTo x1 + (1 - KAPPA) * xRadius, y1, x1 + xRadius, y1 }; diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index 004d9cd..35a74c9 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -2737,6 +2737,8 @@ QRectF QPainter::clipBoundingRect() const if (info.clipType == QPainterClipInfo::RectClip) r = info.rect; + else if (info.clipType == QPainterClipInfo::RectFClip) + r = info.rectf; else if (info.clipType == QPainterClipInfo::RegionClip) r = info.region.boundingRect(); else @@ -8932,7 +8934,7 @@ QPainterPath QPaintEngineState::clipPath() const } /*! - Returns wether clipping is enabled or not in the current paint + Returns whether clipping is enabled or not in the current paint engine state. This variable should only be used when the state() returns a 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 <private/qunicodetables_p.h> #include <private/qpainterpath_p.h> #include <qdebug.h> #include <private/qdrawhelper_p.h> diff --git a/src/gui/painting/qprintengine_win.cpp b/src/gui/painting/qprintengine_win.cpp index dd4de99..afae0a5 100644 --- a/src/gui/painting/qprintengine_win.cpp +++ b/src/gui/painting/qprintengine_win.cpp @@ -851,7 +851,7 @@ void QWin32PrintEnginePrivate::strokePath_dev(const QPainterPath &path, const QC HPEN pen = ExtCreatePen(((penWidth == 0) ? PS_COSMETIC : PS_GEOMETRIC) | PS_SOLID | capStyle | joinStyle, - penWidth, &brush, 0, 0); + (penWidth == 0) ? 1 : penWidth, &brush, 0, 0); HGDIOBJ old_pen = SelectObject(hdc, pen); StrokePath(hdc); diff --git a/src/gui/painting/qregion.cpp b/src/gui/painting/qregion.cpp index c57db82..c5d5dc9 100644 --- a/src/gui/painting/qregion.cpp +++ b/src/gui/painting/qregion.cpp @@ -1699,8 +1699,8 @@ QT_BEGIN_INCLUDE_NAMESPACE #include <limits.h> QT_END_INCLUDE_NAMESPACE -/* 1 if two BOXs overlap. - * 0 if two BOXs do not overlap. +/* 1 if two BOXes overlap. + * 0 if two BOXes do not overlap. * Remember, x2 and y2 are not in the region */ #define EXTENTCHECK(r1, r2) \ diff --git a/src/gui/painting/qstroker.cpp b/src/gui/painting/qstroker.cpp index eabbd8a..9cff339 100644 --- a/src/gui/painting/qstroker.cpp +++ b/src/gui/painting/qstroker.cpp @@ -609,7 +609,7 @@ void QStroker::joinPoints(qfixed focal_x, qfixed focal_y, const QLineF &nextLine } QLineF miterLine(QPointF(qt_fixed_to_real(focal_x), qt_fixed_to_real(focal_y)), isect); - if (miterLine.length() > qt_fixed_to_real(m_strokeWidth * m_miterLimit) / 2) { + if (type == QLineF::NoIntersection || miterLine.length() > qt_fixed_to_real(m_strokeWidth * m_miterLimit) / 2) { emitLineTo(qt_real_to_fixed(nextLine.x1()), qt_real_to_fixed(nextLine.y1())); } else { diff --git a/src/gui/painting/qtextureglyphcache.cpp b/src/gui/painting/qtextureglyphcache.cpp index 376219b..9219876 100644 --- a/src/gui/painting/qtextureglyphcache.cpp +++ b/src/gui/painting/qtextureglyphcache.cpp @@ -47,10 +47,6 @@ #include "private/qnativeimage_p.h" #include "private/qfontengine_ft_p.h" -#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH -#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 -#endif - QT_BEGIN_NAMESPACE // #define CACHE_DEBUG @@ -69,8 +65,60 @@ static inline int qt_next_power_of_two(int v) return v; } +int QTextureGlyphCache::calculateSubPixelPositionCount(glyph_t glyph) const +{ + // Test 12 different subpixel positions since it factors into 3*4 so it gives + // the coverage we need. + + QList<QImage> images; + for (int i=0; i<12; ++i) { + QImage img = textureMapForGlyph(glyph, QFixed::fromReal(i / 12.0)); + + if (images.isEmpty()) { + QPainterPath path; + QFixedPoint point; + m_current_fontengine->addGlyphsToPath(&glyph, &point, 1, &path, QTextItem::RenderFlags()); + + // Glyph is space, return 0 to indicate that we need to keep trying + if (path.isEmpty()) + break; + + images.append(img); + } else { + bool found = false; + for (int j=0; j<images.size(); ++j) { + if (images.at(j) == img) { + found = true; + break; + } + } + if (!found) + images.append(img); + } + } + + return images.size(); +} + +QFixed QTextureGlyphCache::subPixelPositionForX(QFixed x) const +{ + if (m_subPixelPositionCount == 0) + return QFixed(); + + QFixed subPixelPosition; + if (x != 0) { + subPixelPosition = x - x.floor(); + QFixed fraction = (subPixelPosition / QFixed::fromReal(1.0 / m_subPixelPositionCount)).floor(); + + // Compensate for precision loss in fixed point to make sure we are always drawing at a subpixel position over + // the lower boundary for the selected rasterization by adding 1/64. + subPixelPosition = fraction / QFixed(m_subPixelPositionCount) + QFixed::fromReal(0.015625); + } + return subPixelPosition; +} + void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const glyph_t *glyphs, - const QFixedPoint *) + const QFixedPoint *positions) { #ifdef CACHE_DEBUG printf("Populating with %d glyphs\n", numGlyphs); @@ -81,15 +129,33 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const const int margin = glyphMargin(); const int paddingDoubled = glyphPadding() * 2; - QHash<glyph_t, Coord> listItemCoordinates; + bool supportsSubPixelPositions = fontEngine->supportsSubPixelPositions(); + if (m_subPixelPositionCount == 0) { + if (!supportsSubPixelPositions) { + m_subPixelPositionCount = 1; + } else { + int i = 0; + while (m_subPixelPositionCount == 0 && i < numGlyphs) + m_subPixelPositionCount = calculateSubPixelPositionCount(glyphs[i++]); + } + } + + QHash<GlyphAndSubPixelPosition, Coord> listItemCoordinates; int rowHeight = 0; // check each glyph for its metrics and get the required rowHeight. for (int i=0; i < numGlyphs; ++i) { const glyph_t glyph = glyphs[i]; - if (coords.contains(glyph)) + + QFixed subPixelPosition; + if (supportsSubPixelPositions) { + QFixed x = positions != 0 ? positions[i].x : QFixed(); + subPixelPosition = subPixelPositionForX(x); + } + + if (coords.contains(GlyphAndSubPixelPosition(glyph, subPixelPosition))) continue; - if (listItemCoordinates.contains(glyph)) + if (listItemCoordinates.contains(GlyphAndSubPixelPosition(glyph, subPixelPosition))) continue; glyph_metrics_t metrics = fontEngine->boundingBox(glyph, m_transform); @@ -119,7 +185,7 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const metrics.x.round().truncate(), -metrics.y.truncate() }; // baseline for horizontal scripts - listItemCoordinates.insert(glyph, c); + listItemCoordinates.insert(GlyphAndSubPixelPosition(glyph, subPixelPosition), c); rowHeight = qMax(rowHeight, glyph_height); } if (listItemCoordinates.isEmpty()) @@ -135,17 +201,25 @@ void QTextureGlyphCache::populate(QFontEngine *fontEngine, int numGlyphs, const } // now actually use the coords and paint the wanted glyps into cache. - QHash<glyph_t, Coord>::iterator iter = listItemCoordinates.begin(); + QHash<GlyphAndSubPixelPosition, Coord>::iterator iter = listItemCoordinates.begin(); + int requiredWidth = m_w; while (iter != listItemCoordinates.end()) { Coord c = iter.value(); m_currentRowHeight = qMax(m_currentRowHeight, c.h + margin * 2); - if (m_cx + c.w > m_w) { - // no room on the current line, start new glyph strip - m_cx = 0; - m_cy += m_currentRowHeight + paddingDoubled; - m_currentRowHeight = 0; // New row + if (m_cx + c.w > requiredWidth) { + int new_width = requiredWidth*2; + while (new_width < m_cx + c.w) + new_width *= 2; + if (new_width <= maxTextureWidth()) { + requiredWidth = new_width; + } else { + // no room on the current line, start new glyph strip + m_cx = 0; + m_cy += m_currentRowHeight + paddingDoubled; + m_currentRowHeight = 0; // New row + } } c.x = m_cx; @@ -164,27 +238,30 @@ void QTextureGlyphCache::fillInPendingGlyphs() if (m_pendingGlyphs.isEmpty()) return; - int requiredHeight = 0; + int requiredHeight = m_h; + int requiredWidth = m_w; // Use a minimum size to avoid a lot of initial reallocations { - QHash<glyph_t, Coord>::iterator iter = m_pendingGlyphs.begin(); + QHash<GlyphAndSubPixelPosition, Coord>::iterator iter = m_pendingGlyphs.begin(); while (iter != m_pendingGlyphs.end()) { Coord c = iter.value(); requiredHeight = qMax(requiredHeight, c.y + c.h); + requiredWidth = qMax(requiredWidth, c.x + c.w); ++iter; } } - if (requiredHeight > m_h) { + if (isNull() || requiredHeight > m_h || requiredWidth > m_w) { if (isNull()) - createCache(m_w, qt_next_power_of_two(requiredHeight)); + createCache(qt_next_power_of_two(requiredWidth), qt_next_power_of_two(requiredHeight)); else - resizeCache(m_w, qt_next_power_of_two(requiredHeight)); + resizeCache(qt_next_power_of_two(requiredWidth), qt_next_power_of_two(requiredHeight)); } { - QHash<glyph_t, Coord>::iterator iter = m_pendingGlyphs.begin(); + QHash<GlyphAndSubPixelPosition, Coord>::iterator iter = m_pendingGlyphs.begin(); while (iter != m_pendingGlyphs.end()) { - fillTexture(iter.value(), iter.key()); + GlyphAndSubPixelPosition key = iter.key(); + fillTexture(iter.value(), key.glyph, key.subPixelPosition); ++iter; } @@ -193,7 +270,7 @@ void QTextureGlyphCache::fillInPendingGlyphs() m_pendingGlyphs.clear(); } -QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const +QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g, QFixed subPixelPosition) const { #if defined(Q_WS_X11) if (m_transform.type() > QTransform::TxTranslate) { @@ -226,7 +303,7 @@ QImage QTextureGlyphCache::textureMapForGlyph(glyph_t g) const } else #endif if (m_type == QFontEngineGlyphCache::Raster_RGBMask) - return m_current_fontengine->alphaRGBMapForGlyph(g, glyphMargin(), m_transform); + return m_current_fontengine->alphaRGBMapForGlyph(g, subPixelPosition, glyphMargin(), m_transform); else return m_current_fontengine->alphaMapForGlyph(g, m_transform); @@ -272,9 +349,9 @@ int QImageTextureGlyphCache::glyphMargin() const #endif } -void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g) +void QImageTextureGlyphCache::fillTexture(const Coord &c, glyph_t g, QFixed subPixelPosition) { - QImage mask = textureMapForGlyph(g); + QImage mask = textureMapForGlyph(g, subPixelPosition); #ifdef CACHE_DEBUG printf("fillTexture of %dx%d at %d,%d in the cache of %dx%d\n", c.w, c.h, c.x, c.y, m_image.width(), m_image.height()); diff --git a/src/gui/painting/qtextureglyphcache_p.h b/src/gui/painting/qtextureglyphcache_p.h index 0770ed4..82aaf0d 100644 --- a/src/gui/painting/qtextureglyphcache_p.h +++ b/src/gui/painting/qtextureglyphcache_p.h @@ -64,6 +64,10 @@ # undef m_type #endif +#ifndef QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH +#define QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH 256 +#endif + struct glyph_metrics_t; typedef unsigned int glyph_t; @@ -77,11 +81,24 @@ class Q_GUI_EXPORT QTextureGlyphCache : public QFontEngineGlyphCache public: QTextureGlyphCache(QFontEngineGlyphCache::Type type, const QTransform &matrix) : QFontEngineGlyphCache(matrix, type), m_current_fontengine(0), - m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0) + m_w(0), m_h(0), m_cx(0), m_cy(0), m_currentRowHeight(0), m_subPixelPositionCount(0) { } virtual ~QTextureGlyphCache() { } + struct GlyphAndSubPixelPosition + { + GlyphAndSubPixelPosition(glyph_t g, QFixed spp) : glyph(g), subPixelPosition(spp) {} + + bool operator==(const GlyphAndSubPixelPosition &other) const + { + return glyph == other.glyph && subPixelPosition == other.subPixelPosition; + } + + glyph_t glyph; + QFixed subPixelPosition; + }; + struct Coord { int x; int y; @@ -101,7 +118,7 @@ public: virtual int glyphMargin() const { return 0; } virtual int glyphPadding() const { return 0; } - virtual void fillTexture(const Coord &coord, glyph_t glyph) = 0; + virtual void fillTexture(const Coord &coord, glyph_t glyph, QFixed subPixelPosition) = 0; inline void createCache(int width, int height) { m_w = width; @@ -118,22 +135,33 @@ public: inline bool isNull() const { return m_h == 0; } - QHash<glyph_t, Coord> coords; + QHash<GlyphAndSubPixelPosition, Coord> coords; + virtual int maxTextureWidth() const { return QT_DEFAULT_TEXTURE_GLYPH_CACHE_WIDTH; } + virtual int maxTextureHeight() const { return 32768; } + + QImage textureMapForGlyph(glyph_t g, QFixed subPixelPosition) const; - QImage textureMapForGlyph(glyph_t g) const; + QFixed subPixelPositionForX(QFixed x) const; protected: - QFontEngine *m_current_fontengine; + int calculateSubPixelPositionCount(glyph_t) const; - QHash<glyph_t, Coord> m_pendingGlyphs; + QFontEngine *m_current_fontengine; + QHash<GlyphAndSubPixelPosition, Coord> m_pendingGlyphs; int m_w; // image width int m_h; // image height int m_cx; // current x int m_cy; // current y int m_currentRowHeight; // Height of last row + int m_subPixelPositionCount; // Number of positions within a single pixel for this cache }; +inline uint qHash(const QTextureGlyphCache::GlyphAndSubPixelPosition &g) +{ + return (g.glyph << 8) | (g.subPixelPosition * 10).round().toInt(); +} + class Q_GUI_EXPORT QImageTextureGlyphCache : public QTextureGlyphCache { @@ -143,7 +171,7 @@ public: virtual int glyphMargin() const; virtual void createTextureData(int width, int height); virtual void resizeTextureData(int width, int height); - virtual void fillTexture(const Coord &c, glyph_t glyph); + virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition); inline const QImage &image() const { return m_image; } diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index f02c798..3ec6e10 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -491,6 +491,24 @@ QPalette* QS60StylePrivate::themePalette() return m_themePalette; } +bool QS60StylePrivate::equalToThemePalette(QColor color, QPalette::ColorRole role) +{ + if (!m_themePalette) + return false; + if (color == m_themePalette->color(role)) + return true; + return false; +} + +bool QS60StylePrivate::equalToThemePalette(qint64 cacheKey, QPalette::ColorRole role) +{ + if (!m_themePalette) + return false; + if (cacheKey == m_themePalette->brush(role).texture().cacheKey()) + return true; + return false; +} + void QS60StylePrivate::setBackgroundTexture(QApplication *app) const { Q_UNUSED(app) @@ -1430,11 +1448,25 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, const QRect iconRect = subElementRect(SE_ItemViewItemDecoration, &voptAdj, widget); QRect textRect = subElementRect(SE_ItemViewItemText, &voptAdj, widget); const QAbstractItemView *itemView = qobject_cast<const QAbstractItemView *>(widget); + const bool singleSelection = + (itemView->selectionMode() == QAbstractItemView::SingleSelection || + itemView->selectionMode() == QAbstractItemView::NoSelection); + const bool selectItems = (itemView->selectionBehavior() == QAbstractItemView::SelectItems); - // draw themed background for table unless background brush has been defined. + // draw themed background for itemview unless background brush has been defined. if (vopt->backgroundBrush == Qt::NoBrush) { if (itemView) { + //With single item selection, use highlight focus as selection indicator. + if (singleSelection && isSelected){ + voptAdj.state = voptAdj.state | State_HasFocus; + if (!hasFocus && selectItems) { + painter->save(); + painter->setOpacity(0.5); + } + } drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget); + if (singleSelection && isSelected && !hasFocus && selectItems) + painter->restore(); } } else { QCommonStyle::drawPrimitive(PE_PanelItemViewItem, &voptAdj, painter, widget);} @@ -1443,28 +1475,20 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, const QIcon::State state = (voptAdj.state & State_Open) ? QIcon::On : QIcon::Off; voptAdj.icon.paint(painter, iconRect, voptAdj.decorationAlignment, mode, state); - // Draw selection check mark. Show check mark only in multi selection modes. - if (itemView) { - const bool singleSelection = - (itemView->selectionMode() == QAbstractItemView::SingleSelection || - itemView->selectionMode() == QAbstractItemView::NoSelection)|| - (itemView->selectionModel()->selectedIndexes().count() < 2 ); - - const bool selectItemsOnly = (itemView->selectionBehavior() == QAbstractItemView::SelectItems); - + // Draw selection check mark or checkbox + if (itemView && (!singleSelection || (vopt->features & QStyleOptionViewItemV2::HasCheckIndicator))) { const QRect selectionRect = subElementRect(SE_ItemViewItemCheckIndicator, &voptAdj, widget); QStyleOptionViewItemV4 checkMarkOption(voptAdj); if (selectionRect.isValid()) checkMarkOption.rect = selectionRect; // Draw selection mark. - if (isSelected && !singleSelection && selectItemsOnly) { + if (isSelected && selectItems) { proxy()->drawPrimitive(PE_IndicatorViewItemCheck, &checkMarkOption, painter, widget); // @todo: this should happen in the rect retrievel i.e. subElementRect() if (textRect.right() > selectionRect.left()) textRect.setRight(selectionRect.left()); - } else if (singleSelection && - voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator) { + } else if (voptAdj.features & QStyleOptionViewItemV2::HasCheckIndicator) { checkMarkOption.state = checkMarkOption.state & ~State_HasFocus; switch (vopt->checkState) { @@ -1484,7 +1508,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, // draw the text if (!voptAdj.text.isEmpty()) { - if (isSelected || hasFocus ) + if (hasFocus) painter->setPen(voptAdj.palette.highlightedText().color()); else painter->setPen(voptAdj.palette.text().color()); @@ -2044,7 +2068,7 @@ void QS60Style::drawControl(ControlElement element, const QStyleOption *option, } break; case CE_Splitter: - if (option->state & State_Sunken && option->state & State_Enabled) { + if (option->state & State_Sunken && option->state & State_Enabled && QS60StylePrivate::themePalette()) { painter->save(); painter->setOpacity(0.5); painter->setBrush(QS60StylePrivate::themePalette()->light()); @@ -2071,7 +2095,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_FrameFocusRect: { //Draw themed highlight to radiobuttons and checkboxes. //For other widgets skip, unless palette has been modified. In that case, draw with commonstyle. - if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) { + if (QS60StylePrivate::equalToThemePalette(option->palette.highlight().color(), QPalette::Highlight)) { if ((qstyleoption_cast<const QStyleOptionFocusRect *>(option) && (qobject_cast<const QRadioButton *>(widget) || qobject_cast<const QCheckBox *>(widget)))) QS60StylePrivate::drawSkinElement( @@ -2103,11 +2127,8 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QS60StyleEnums::SP_QgnIndiCheckboxOn : QS60StyleEnums::SP_QgnIndiCheckboxOff; painter->save(); - const QColor themeColor = QS60StylePrivate::themePalette()->windowText().color(); - const QColor windowTextColor = option->palette.windowText().color(); - - if (themeColor != windowTextColor) - painter->setPen(windowTextColor); + if (QS60StylePrivate::equalToThemePalette(option->palette.windowText().color(), QPalette::WindowText)) + painter->setPen(option->palette.windowText().color()); QS60StylePrivate::drawSkinPart(skinPart, painter, option->rect, flags | QS60StylePrivate::SF_ColorSkinned ); painter->restore(); @@ -2260,8 +2281,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti ) { //Need extra check since dialogs have their own theme background if (QS60StylePrivate::canDrawThemeBackground(option->palette.base(), widget) && - option->palette.window().texture().cacheKey() == - QS60StylePrivate::m_themePalette->window().texture().cacheKey()) + QS60StylePrivate::equalToThemePalette(option->palette.window().texture().cacheKey(), QPalette::Window)) //todo: for combobox listviews, the background should include area for menu scrollers, //but this produces drawing issues as we need to turn clipping off. QS60StylePrivate::drawSkinElement(QS60StylePrivate::SE_PopupBackground, painter, option->rect, flags); @@ -2308,13 +2328,13 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti const bool hasFocus = (vopt->state & State_HasFocus); const bool isPressed = QS60StylePrivate::isWidgetPressed(widget); - if (option->palette.highlight().color() == QS60StylePrivate::themePalette()->highlight().color()) { + if (QS60StylePrivate::equalToThemePalette(option->palette.highlight().color(), QPalette::Highlight)) { QRect highlightRect = vopt->rect.adjusted(1,1,-1,-1); const QAbstractItemView *itemView = qobject_cast<const QAbstractItemView *>(widget); QAbstractItemView::SelectionBehavior selectionBehavior = itemView ? itemView->selectionBehavior() : QAbstractItemView::SelectItems; // Set the draw area for highlights (focus, select rect or pressed rect) - if (hasFocus || isSelected || isPressed) { + if (hasFocus || isPressed) { if (selectionBehavior != QAbstractItemView::SelectItems) { // set highlight rect so that it is continuous from cell to cell, yet sligthly // smaller than cell rect @@ -2344,7 +2364,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti QRect elementRect = option->rect; //draw item is drawn as pressed, if it already has focus. - if (isPressed && (hasFocus || isSelected)) { + if (isPressed && hasFocus) { themeGraphicDefined = true; element = tableView ? QS60StylePrivate::SE_TableItemPressed : QS60StylePrivate::SE_ListItemPressed; } else if (hasFocus || (isSelected && selectionBehavior != QAbstractItemView::SelectItems)) { @@ -2433,7 +2453,7 @@ void QS60Style::drawPrimitive(PrimitiveElement element, const QStyleOption *opti case PE_PanelItemViewRow: // ### Qt 5: remove #ifndef QT_NO_ITEMVIEWS if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(option)) { - if (vopt->palette.base().texture().cacheKey() != QS60StylePrivate::m_themePalette->base().texture().cacheKey()) { + if (QS60StylePrivate::equalToThemePalette(vopt->palette.base().texture().cacheKey(), QPalette::Base)) { //QPalette::Base has been changed, let commonstyle draw the item commonStyleDraws = true; } else { @@ -2984,7 +3004,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con case SE_ItemViewItemText: case SE_ItemViewItemDecoration: if (const QStyleOptionViewItemV4 *vopt = qstyleoption_cast<const QStyleOptionViewItemV4 *>(opt)) { - const QListWidget *listItem = qobject_cast<const QListWidget *>(widget); + const QAbstractItemView *listItem = qobject_cast<const QAbstractItemView *>(widget); const bool multiSelection = !listItem ? false : listItem->selectionMode() == QAbstractItemView::MultiSelection || listItem->selectionMode() == QAbstractItemView::ExtendedSelection || @@ -3054,7 +3074,7 @@ QRect QS60Style::subElementRect(SubElement element, const QStyleOption *opt, con break; case SE_ItemViewItemCheckIndicator: if (const QStyleOptionViewItemV2 *vopt = qstyleoption_cast<const QStyleOptionViewItemV2 *>(opt)) { - const QListWidget *listItem = qobject_cast<const QListWidget *>(widget); + const QAbstractItemView *listItem = qobject_cast<const QAbstractItemView *>(widget); const bool singleSelection = listItem && (listItem->selectionMode() == QAbstractItemView::SingleSelection || @@ -3416,8 +3436,7 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event) break; } case QEvent::MouseButtonRelease: { - const QWidget *w = QApplication::widgetAt(QCursor::pos()); - if (w && d->m_pressedWidget) { + if (d->m_pressedWidget) { d->m_pressedWidget->update(); d->m_pressedWidget = 0; } diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index 51ced96..b3f4160 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -598,6 +598,8 @@ private: void setThemePaletteHash(QPalette *palette) const; static void storeThemePalette(QPalette *palette); static void deleteThemePalette(); + static bool equalToThemePalette(QColor color, QPalette::ColorRole role); + static bool equalToThemePalette(qint64 cacheKey, QPalette::ColorRole role); static QSize partSize(QS60StyleEnums::SkinParts part, SkinElementFlags flags = KDefaultSkinElementFlags); diff --git a/src/gui/text/qfontdatabase_mac.cpp b/src/gui/text/qfontdatabase_mac.cpp index 4648304..712bdb4 100644 --- a/src/gui/text/qfontdatabase_mac.cpp +++ b/src/gui/text/qfontdatabase_mac.cpp @@ -293,8 +293,12 @@ void QFontDatabase::load(const QFontPrivate *d, int script) // previous versions family_list << QApplication::font().defaultFamily(); +#if defined(QT_MAC_USE_COCOA) + QCFString fontName = NULL, familyName = NULL; +#else ATSFontFamilyRef familyRef = 0; ATSFontRef fontRef = 0; +#endif QMutexLocker locker(fontDatabaseMutex()); QFontDatabasePrivate *db = privateDb(); @@ -304,26 +308,20 @@ void QFontDatabase::load(const QFontPrivate *d, int script) for (int k = 0; k < db->count; ++k) { if (db->families[k]->name.compare(family_list.at(i), Qt::CaseInsensitive) == 0) { QByteArray family_name = db->families[k]->name.toUtf8(); +#if defined(QT_MAC_USE_COCOA) + QCFType<CTFontRef> ctFont = CTFontCreateWithName(QCFString(db->families[k]->name), 12, NULL); + if (ctFont) { + fontName = CTFontCopyFullName(ctFont); + familyName = CTFontCopyFamilyName(ctFont); + goto FamilyFound; + } +#else familyRef = ATSFontFamilyFindFromName(QCFString(db->families[k]->name), kATSOptionFlagsDefault); if (familyRef) { fontRef = ATSFontFindFromName(QCFString(db->families[k]->name), kATSOptionFlagsDefault); goto FamilyFound; - } else { -#if defined(QT_MAC_USE_COCOA) - // ATS and CT disagrees on what the family name should be, - // use CT to look up the font if ATS fails. - QCFString familyName = QString::fromAscii(family_name); - QCFType<CTFontRef> CTfontRef = CTFontCreateWithName(familyName, 12, NULL); - QCFType<CTFontDescriptorRef> fontDescriptor = CTFontCopyFontDescriptor(CTfontRef); - QCFString displayName = (CFStringRef)CTFontDescriptorCopyAttribute(fontDescriptor, kCTFontDisplayNameAttribute); - - familyRef = ATSFontFamilyFindFromName(displayName, kATSOptionFlagsDefault); - if (familyRef) { - fontRef = ATSFontFindFromName(displayName, kATSOptionFlagsDefault); - goto FamilyFound; - } -#endif } +#endif } } } @@ -331,18 +329,17 @@ FamilyFound: //fill in the engine's font definition QFontDef fontDef = d->request; //copy.. if(fontDef.pointSize < 0) - fontDef.pointSize = qt_mac_pointsize(fontDef, d->dpi); + fontDef.pointSize = qt_mac_pointsize(fontDef, d->dpi); else - fontDef.pixelSize = qt_mac_pixelsize(fontDef, d->dpi); - { - QCFString actualName; - if(ATSFontFamilyGetName(familyRef, kATSOptionFlagsDefault, &actualName) == noErr) - fontDef.family = actualName; - } + fontDef.pixelSize = qt_mac_pixelsize(fontDef, d->dpi); #ifdef QT_MAC_USE_COCOA - QFontEngine *engine = new QCoreTextFontEngineMulti(familyRef, fontRef, fontDef, d->kerning); + fontDef.family = familyName; + QFontEngine *engine = new QCoreTextFontEngineMulti(fontName, fontDef, d->kerning); #else + QCFString actualName; + if (ATSFontFamilyGetName(familyRef, kATSOptionFlagsDefault, &actualName) == noErr) + fontDef.family = actualName; QFontEngine *engine = new QFontEngineMacMulti(familyRef, fontRef, fontDef, d->kerning); #endif d->engineData->engine = engine; diff --git a/src/gui/text/qfontengine.cpp b/src/gui/text/qfontengine.cpp index b37a190..3652c69 100644 --- a/src/gui/text/qfontengine.cpp +++ b/src/gui/text/qfontengine.cpp @@ -616,7 +616,7 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph, const QTransform &t) return i; } -QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int /* margin */, const QTransform &t) +QImage QFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed /*subPixelPosition*/, int /* margin */, const QTransform &t) { QImage alphaMask = alphaMapForGlyph(glyph, t); QImage rgbMask(alphaMask.width(), alphaMask.height(), QImage::Format_RGB32); @@ -645,10 +645,10 @@ QImage QFontEngine::alphaMapForGlyph(glyph_t glyph) if (glyph_width <= 0 || glyph_height <= 0) return QImage(); QFixedPoint pt; - pt.x = 0; + pt.x = -glyph_x; pt.y = -glyph_y; // the baseline QPainterPath path; - QImage im(glyph_width + qAbs(glyph_x) + 4, glyph_height, QImage::Format_ARGB32_Premultiplied); + QImage im(glyph_width + 4, glyph_height, QImage::Format_ARGB32_Premultiplied); im.fill(Qt::transparent); QPainter p(&im); p.setRenderHint(QPainter::Antialiasing); @@ -737,7 +737,7 @@ void QFontEngine::setGlyphCache(void *key, QFontEngineGlyphCache *data) return; // Limit the glyph caches to 4. This covers all 90 degree rotations and limits - // memory use when there is continous or random rotation + // memory use when there is continuous or random rotation if (m_glyphCaches.size() == 4) m_glyphCaches.removeLast(); diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp index 67bad7b..9a9eb77 100644 --- a/src/gui/text/qfontengine_ft.cpp +++ b/src/gui/text/qfontengine_ft.cpp @@ -1883,10 +1883,10 @@ QImage QFontEngineFT::alphaMapForGlyph(glyph_t g) return img; } -QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, int margin, const QTransform &t) +QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, QFixed subPixelPosition, int margin, const QTransform &t) { if (t.type() > QTransform::TxTranslate) - return QFontEngine::alphaRGBMapForGlyph(g, margin, t); + return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, margin, t); lockFace(); @@ -1895,7 +1895,7 @@ QImage QFontEngineFT::alphaRGBMapForGlyph(glyph_t g, int margin, const QTransfor Glyph *glyph = defaultGlyphSet.outline_drawing ? 0 : loadGlyph(g, glyph_format); if (!glyph) { unlockFace(); - return QFontEngine::alphaRGBMapForGlyph(g, margin, t); + return QFontEngine::alphaRGBMapForGlyph(g, subPixelPosition, margin, t); } QImage img(glyph->width, glyph->height, QImage::Format_RGB32); diff --git a/src/gui/text/qfontengine_ft_p.h b/src/gui/text/qfontengine_ft_p.h index f40ce04..5a27032 100644 --- a/src/gui/text/qfontengine_ft_p.h +++ b/src/gui/text/qfontengine_ft_p.h @@ -241,7 +241,7 @@ private: virtual void recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlags flags) const; virtual QImage alphaMapForGlyph(glyph_t); - virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t); + virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); virtual void removeGlyphFromCache(glyph_t glyph); virtual int glyphCount() const; diff --git a/src/gui/text/qfontengine_mac.mm b/src/gui/text/qfontengine_mac.mm index 2bbf9f2..6e524f6 100644 --- a/src/gui/text/qfontengine_mac.mm +++ b/src/gui/text/qfontengine_mac.mm @@ -143,7 +143,7 @@ void qmacfontengine_gamma_correct(QImage *image) #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5 -QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, const ATSFontRef &atsFontRef, const QFontDef &fontDef, bool kerning) +QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const QCFString &name, const QFontDef &fontDef, bool kerning) : QFontEngineMulti(0) { this->fontDef = fontDef; @@ -159,9 +159,6 @@ QCoreTextFontEngineMulti::QCoreTextFontEngineMulti(const ATSFontFamilyRef &, con break; } - QCFString name; - ATSFontGetName(atsFontRef, kATSOptionFlagsDefault, &name); - transform = CGAffineTransformIdentity; if (fontDef.stretch != 100) { transform = CGAffineTransformMakeScale(float(fontDef.stretch) / float(100), 1); @@ -422,8 +419,7 @@ QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def, synthesisFlags = 0; ctfont = font; CFRetain(ctfont); - ATSFontRef atsfont = CTFontGetPlatformFont(ctfont, 0); - cgFont = CGFontCreateWithPlatformFont(&atsfont); + cgFont = CTFontCopyGraphicsFont(ctfont, NULL); CTFontSymbolicTraits traits = CTFontGetSymbolicTraits(ctfont); if (fontDef.weight >= QFont::Bold && !(traits & kCTFontBoldTrait)) { synthesisFlags |= SynthesizedBold; @@ -443,8 +439,8 @@ QCoreTextFontEngine::QCoreTextFontEngine(CTFontRef font, const QFontDef &def, QCoreTextFontEngine::~QCoreTextFontEngine() { - CFRelease(ctfont); CFRelease(cgFont); + CFRelease(ctfont); } bool QCoreTextFontEngine::stringToCMap(const QChar *, int, QGlyphLayout *, int *, QTextEngine::ShaperFlags) const @@ -663,7 +659,7 @@ QFont QCoreTextFontEngine::createExplicitFont() const return createExplicitFontWithName(familyName); } -QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, int margin, bool aa) +QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, QFixed subPixelPosition, int /*margin*/, bool aa) { const glyph_metrics_t br = boundingBox(glyph); QImage im(qRound(br.width)+2, qRound(br.height)+2, QImage::Format_RGB32); @@ -696,11 +692,10 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, int margin, bool aa) CGContextSetRGBFillColor(ctx, 1, 1, 1, 1); CGContextSetTextDrawingMode(ctx, kCGTextFill); - ATSFontRef atsfont = CTFontGetPlatformFont(ctfont, 0); - QCFType<CGFontRef> cgFont = CGFontCreateWithPlatformFont(&atsfont); CGContextSetFont(ctx, cgFont); - qreal pos_x = -br.x.toReal()+1, pos_y = im.height()+br.y.toReal(); + qreal pos_x = -br.x.toReal() + subPixelPosition.toReal(); + qreal pos_y = im.height()+br.y.toReal(); CGContextSetTextPosition(ctx, pos_x, pos_y); CGSize advance; @@ -721,7 +716,7 @@ QImage QCoreTextFontEngine::imageForGlyph(glyph_t glyph, int margin, bool aa) QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph) { - QImage im = imageForGlyph(glyph, 0, false); + QImage im = imageForGlyph(glyph, QFixed(), 0, false); QImage indexed(im.width(), im.height(), QImage::Format_Indexed8); QVector<QRgb> colors(256); @@ -742,12 +737,12 @@ QImage QCoreTextFontEngine::alphaMapForGlyph(glyph_t glyph) return indexed; } -QImage QCoreTextFontEngine::alphaRGBMapForGlyph(glyph_t glyph, int margin, const QTransform &x) +QImage QCoreTextFontEngine::alphaRGBMapForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, const QTransform &x) { if (x.type() >= QTransform::TxScale) - return QFontEngine::alphaRGBMapForGlyph(glyph, margin, x); + return QFontEngine::alphaRGBMapForGlyph(glyph, subPixelPosition, margin, x); - QImage im = imageForGlyph(glyph, margin, true); + QImage im = imageForGlyph(glyph, subPixelPosition, margin, true); qmacfontengine_gamma_correct(&im); return im; } @@ -1706,7 +1701,7 @@ QImage QFontEngineMac::alphaMapForGlyph(glyph_t glyph) return indexed; } -QImage QFontEngineMac::alphaRGBMapForGlyph(glyph_t glyph, int margin, const QTransform &t) +QImage QFontEngineMac::alphaRGBMapForGlyph(glyph_t glyph, QFixed, int margin, const QTransform &t) { QImage im = imageForGlyph(glyph, margin, true); diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index 487a0c5..c1de906 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -155,6 +155,7 @@ public: SynthesizedStretch = 0x4 }; virtual int synthesized() const { return 0; } + virtual bool supportsSubPixelPositions() const { return false; } virtual QFixed emSquareSize() const { return ascent(); } @@ -188,7 +189,7 @@ public: */ virtual QImage alphaMapForGlyph(glyph_t); virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t); - virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t); + virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); virtual void removeGlyphFromCache(glyph_t); @@ -448,6 +449,7 @@ public: virtual bool canRender(const QChar *string, int len); virtual int synthesized() const { return synthesisFlags; } + virtual bool supportsSubPixelPositions() const { return true; } virtual Type type() const { return QFontEngine::Mac; } @@ -457,13 +459,13 @@ public: virtual bool getSfntTableData(uint /*tag*/, uchar * /*buffer*/, uint * /*length*/) const; virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics); virtual QImage alphaMapForGlyph(glyph_t); - virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t); + virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); virtual qreal minRightBearing() const; virtual qreal minLeftBearing() const; virtual QFont createExplicitFont() const; private: - QImage imageForGlyph(glyph_t glyph, int margin, bool colorful); + QImage imageForGlyph(glyph_t glyph, QFixed subPixelPosition, int margin, bool colorful); CTFontRef ctfont; CGFontRef cgFont; QCoreTextFontEngineMulti *parentEngine; @@ -475,8 +477,7 @@ private: class QCoreTextFontEngineMulti : public QFontEngineMulti { public: - QCoreTextFontEngineMulti(const ATSFontFamilyRef &atsFamily, const ATSFontRef &atsFontRef, - const QFontDef &fontDef, bool kerning); + QCoreTextFontEngineMulti(const QCFString &name, const QFontDef &fontDef, bool kerning); ~QCoreTextFontEngineMulti(); virtual bool stringToCMap(const QChar *str, int len, QGlyphLayout *glyphs, int *nglyphs, @@ -546,7 +547,7 @@ public: virtual Properties properties() const; virtual void getUnscaledGlyph(glyph_t glyph, QPainterPath *path, glyph_metrics_t *metrics); virtual QImage alphaMapForGlyph(glyph_t); - virtual QImage alphaRGBMapForGlyph(glyph_t, int margin, const QTransform &t); + virtual QImage alphaRGBMapForGlyph(glyph_t, QFixed subPixelPosition, int margin, const QTransform &t); private: QImage imageForGlyph(glyph_t glyph, int margin, bool colorful); diff --git a/src/gui/text/qfontengine_win.cpp b/src/gui/text/qfontengine_win.cpp index 82de0d5..3006776 100644 --- a/src/gui/text/qfontengine_win.cpp +++ b/src/gui/text/qfontengine_win.cpp @@ -1254,7 +1254,7 @@ QImage QFontEngineWin::alphaMapForGlyph(glyph_t glyph, const QTransform &xform) #define SPI_GETFONTSMOOTHINGCONTRAST 0x200C #define SPI_SETFONTSMOOTHINGCONTRAST 0x200D -QImage QFontEngineWin::alphaRGBMapForGlyph(glyph_t glyph, int margin, const QTransform &t) +QImage QFontEngineWin::alphaRGBMapForGlyph(glyph_t glyph, QFixed, int margin, const QTransform &t) { HFONT font = hfont; @@ -1296,6 +1296,7 @@ QFontEngineMultiWin::QFontEngineMultiWin(QFontEngineWin *first, const QStringLis engines[0] = first; first->ref.ref(); fontDef = engines[0]->fontDef; + cache_cost = first->cache_cost; } void QFontEngineMultiWin::loadEngine(int at) @@ -1317,6 +1318,8 @@ void QFontEngineMultiWin::loadEngine(int at) engines[at] = new QFontEngineWin(fam, hfont, stockFont, lf); engines[at]->ref.ref(); engines[at]->fontDef = fontDef; + + // TODO: increase cost in QFontCache for the font engine loaded here } QT_END_NAMESPACE diff --git a/src/gui/text/qfontengine_win_p.h b/src/gui/text/qfontengine_win_p.h index 68b53b5..d86f42e 100644 --- a/src/gui/text/qfontengine_win_p.h +++ b/src/gui/text/qfontengine_win_p.h @@ -104,7 +104,7 @@ public: virtual QImage alphaMapForGlyph(glyph_t t) { return alphaMapForGlyph(t, QTransform()); } virtual QImage alphaMapForGlyph(glyph_t, const QTransform &xform); - virtual QImage alphaRGBMapForGlyph(glyph_t t, int margin, const QTransform &xform); + virtual QImage alphaRGBMapForGlyph(glyph_t t, QFixed subPixelPosition, int margin, const QTransform &xform); #ifndef Q_CC_MINGW virtual void getGlyphBearings(glyph_t glyph, qreal *leftBearing = 0, qreal *rightBearing = 0); diff --git a/src/gui/text/qstatictext.cpp b/src/gui/text/qstatictext.cpp index b950b13..9506006 100644 --- a/src/gui/text/qstatictext.cpp +++ b/src/gui/text/qstatictext.cpp @@ -43,6 +43,7 @@ #include "qstatictext_p.h" #include <private/qtextengine_p.h> #include <private/qfontengine_p.h> +#include <qabstracttextdocumentlayout.h> #include <QtGui/qapplication.h> @@ -448,7 +449,6 @@ namespace { currentItem.font = ti.font(); currentItem.charOffset = m_chars.size(); currentItem.numChars = ti.num_chars; - currentItem.numGlyphs = ti.glyphs.numGlyphs; currentItem.glyphOffset = m_glyphs.size(); // Store offset into glyph pool currentItem.positionOffset = m_glyphs.size(); // Offset into position pool currentItem.useBackendOptimizations = m_useBackendOptimizations; @@ -463,8 +463,8 @@ namespace { ti.fontEngine->getGlyphPositions(ti.glyphs, matrix, ti.flags, glyphs, positions); int size = glyphs.size(); - Q_ASSERT(size == ti.glyphs.numGlyphs); Q_ASSERT(size == positions.size()); + currentItem.numGlyphs = size; m_glyphs.resize(m_glyphs.size() + size); m_positions.resize(m_glyphs.size()); @@ -655,7 +655,9 @@ void QStaticTextPrivate::paintText(const QPointF &topLeftPosition, QPainter *p) p->save(); p->translate(topLeftPosition); - document.drawContents(p); + QAbstractTextDocumentLayout::PaintContext ctx; + ctx.palette.setColor(QPalette::Text, p->pen().color()); + document.documentLayout()->draw(p, ctx); p->restore(); if (textWidth >= 0.0) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index 887ac6c..3aa6795 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -291,7 +291,18 @@ QTextCodec *Qt::codecForHtml(const QByteArray &ba) by an editor widget through the undo() and redo() slots; the document also provides contentsChanged(), undoAvailable(), and redoAvailable() signals that inform connected editor widgets about the state of the undo/redo - system. + system. The following are the undo/redo operations of a QTextDocument: + + \list + \o Insertion or removal of characters. A sequence of insertions or removals + within the same text block are regarded as a single undo/redo operation. + \o Insertion or removal of text blocks. Sequences of insertion or removals + in a single operation (e.g., by selecting and then deleting text) are + regarded as a single undo/redo operation. + \o Text character format changes. + \o Text block format changes. + \o Text block group format changes. + \endlist \sa QTextCursor, QTextEdit, \link richtext.html Rich Text Processing\endlink , {Text Object Example} */ diff --git a/src/gui/text/qtextdocumentfragment.cpp b/src/gui/text/qtextdocumentfragment.cpp index d2e2c9f..e36a6f0 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 <qdebug.h> #include <qtextcodec.h> diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 27f647c..5b9ab90 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/gui/text/qtextlayout.cpp b/src/gui/text/qtextlayout.cpp index 3f83aee..fad6c3b2 100644 --- a/src/gui/text/qtextlayout.cpp +++ b/src/gui/text/qtextlayout.cpp @@ -2438,8 +2438,12 @@ void QTextLine::draw(QPainter *p, const QPointF &pos, const QTextLayout::FormatR QTextCharFormat format; if (eng->hasFormats() || selection) { - if (!suppressColors) - format = eng->format(&si); + format = eng->format(&si); + if (suppressColors) { + format.clearForeground(); + format.clearBackground(); + format.clearProperty(QTextFormat::TextUnderlineColor); + } if (selection) format.merge(selection->format); diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index 12a8924..65fd36e 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -616,6 +616,7 @@ void QTextFramePrivate::remove_me() /*! Returns an iterator pointing to the first document element inside the frame. + Please see the document \l{STL-style-Iterators} for more information. \sa end() */ @@ -628,8 +629,8 @@ QTextFrame::iterator QTextFrame::begin() const } /*! - Returns an iterator pointing to the last document element inside the frame. - + Returns an iterator pointing to the position past the last document element inside the frame. + Please see the document \l{STL-Style Iterators} for more information. \sa begin() */ QTextFrame::iterator QTextFrame::end() const diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index 171000b..b540e76 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -60,6 +60,9 @@ QT_BEGIN_NAMESPACE +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + enum { StateFlagVisible = 1, StateFlagFloating = 2 }; /****************************************************************************** @@ -1480,7 +1483,7 @@ QList<int> QDockAreaLayoutInfo::indexOf(QWidget *widget) const QMainWindowLayout *QDockAreaLayoutInfo::mainWindowLayout() const { - QMainWindowLayout *result = qobject_cast<QMainWindowLayout*>(mainWindow->layout()); + QMainWindowLayout *result = qt_mainwindow_layout(mainWindow); Q_ASSERT(result != 0); return result; } @@ -3070,8 +3073,7 @@ void QDockAreaLayout::splitDockWidget(QDockWidget *after, void QDockAreaLayout::apply(bool animate) { - QWidgetAnimator &widgetAnimator - = qobject_cast<QMainWindowLayout*>(mainWindow->layout())->widgetAnimator; + QWidgetAnimator &widgetAnimator = qt_mainwindow_layout(mainWindow)->widgetAnimator; for (int i = 0; i < QInternal::DockCount; ++i) docks[i].apply(animate); @@ -3176,7 +3178,7 @@ void QDockAreaLayout::updateSeparatorWidgets() const if (j < separatorWidgets.size()) { sepWidget = separatorWidgets.at(j); } else { - sepWidget = qobject_cast<QMainWindowLayout*>(mainWindow->layout())->getSeparatorWidget(); + sepWidget = qt_mainwindow_layout(mainWindow)->getSeparatorWidget(); separatorWidgets.append(sepWidget); } j++; diff --git a/src/gui/widgets/qdockwidget.cpp b/src/gui/widgets/qdockwidget.cpp index 11f0a94..df9b171 100644 --- a/src/gui/widgets/qdockwidget.cpp +++ b/src/gui/widgets/qdockwidget.cpp @@ -68,6 +68,9 @@ QT_BEGIN_NAMESPACE extern QString qt_setWindowTitle_helperHelper(const QString&, const QWidget*); // qwidget.cpp +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + static inline bool hasFeature(const QDockWidgetPrivate *priv, QDockWidget::DockWidgetFeature feature) { return (priv->features & feature) == feature; } @@ -690,7 +693,7 @@ void QDockWidgetPrivate::initDrag(const QPoint &pos, bool nca) QMainWindow *win = qobject_cast<QMainWindow*>(parent); Q_ASSERT(win != 0); - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); Q_ASSERT(layout != 0); if (layout->pluggingWidget != 0) // the main window is animating a docking operation return; @@ -711,8 +714,7 @@ void QDockWidgetPrivate::startDrag() if (state == 0 || state->dragging) return; - QMainWindowLayout *layout - = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); Q_ASSERT(layout != 0); state->widgetItem = layout->unplug(q); @@ -739,8 +741,7 @@ void QDockWidgetPrivate::endDrag(bool abort) q->releaseMouse(); if (state->dragging) { - QMainWindowLayout *mwLayout = - qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *mwLayout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); Q_ASSERT(mwLayout != 0); if (abort || !mwLayout->plug(state->widgetItem)) { @@ -780,8 +781,7 @@ bool QDockWidgetPrivate::isAnimating() const if (mainWin == 0) return false; - QMainWindowLayout *mainWinLayout - = qobject_cast<QMainWindowLayout*>(mainWin->layout()); + QMainWindowLayout *mainWinLayout = qt_mainwindow_layout(mainWin); if (mainWinLayout == 0) return false; @@ -847,9 +847,8 @@ bool QDockWidgetPrivate::mouseMoveEvent(QMouseEvent *event) return ret; QDockWidgetLayout *dwlayout - = qobject_cast<QDockWidgetLayout*>(layout); - QMainWindowLayout *mwlayout - = qobject_cast<QMainWindowLayout*>(q->parentWidget()->layout()); + = qobject_cast<QDockWidgetLayout *>(layout); + QMainWindowLayout *mwlayout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); if (!dwlayout->nativeWindowDeco()) { if (!state->dragging && mwlayout->pluggingWidget == 0 @@ -943,8 +942,7 @@ void QDockWidgetPrivate::nonClientAreaMouseEvent(QMouseEvent *event) } #ifdef Q_OS_MAC else { // workaround for lack of mouse-grab on Mac - QMainWindowLayout *layout - = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); Q_ASSERT(layout != 0); q->move(event->globalPos() - state->pressPos); @@ -980,8 +978,7 @@ void QDockWidgetPrivate::moveEvent(QMoveEvent *event) if (state->ctrlDrag) return; - QMainWindowLayout *layout - = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); Q_ASSERT(layout != 0); QPoint globalMousePos = event->pos() + state->pressPos; @@ -1009,7 +1006,7 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect Q_Q(QDockWidget); if (!floating && parent) { - QMainWindowLayout *mwlayout = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *mwlayout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); if (mwlayout && mwlayout->dockWidgetArea(q) == Qt::NoDockWidgetArea) return; // this dockwidget can't be redocked } @@ -1055,7 +1052,7 @@ void QDockWidgetPrivate::setWindowState(bool floating, bool unplug, const QRect if (floating != wasFloating) { emit q->topLevelChanged(floating); if (!floating && parent) { - QMainWindowLayout *mwlayout = qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *mwlayout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); if (mwlayout) emit q->dockLocationChanged(mwlayout->dockWidgetArea(q)); } @@ -1326,10 +1323,10 @@ void QDockWidget::changeEvent(QEvent *event) #ifndef QT_NO_TABBAR { QMainWindow *win = qobject_cast<QMainWindow*>(parentWidget()); - if (QMainWindowLayout *winLayout = - (win ? qobject_cast<QMainWindowLayout*>(win->layout()) : 0)) + if (QMainWindowLayout *winLayout = qt_mainwindow_layout(win)) { if (QDockAreaLayoutInfo *info = winLayout->layoutState.dockAreaLayout.info(this)) info->updateTabBar(); + } } #endif // QT_NO_TABBAR break; @@ -1382,9 +1379,7 @@ bool QDockWidget::event(QEvent *event) Q_D(QDockWidget); QMainWindow *win = qobject_cast<QMainWindow*>(parentWidget()); - QMainWindowLayout *layout = 0; - if (win != 0) - layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); switch (event->type()) { #ifndef QT_NO_ACTION diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index f742d32..a283da6 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -536,7 +536,7 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl \internal Sets the selection to cover the word at the given cursor position. - The word boundries is defined by the behavior of QTextLayout::SkipWords + The word boundaries are defined by the behavior of QTextLayout::SkipWords cursor mode. */ void QLineControl::selectWordAtPos(int cursor) @@ -1211,7 +1211,7 @@ void QLineControl::internalRedo() /*! \internal - If the current cursor position differs from the last emited cursor + If the current cursor position differs from the last emitted cursor position, emits cursorPositionChanged(). */ void QLineControl::emitCursorPositionChanged() diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp index 0378d2d..4ca11b0 100644 --- a/src/gui/widgets/qmainwindow.cpp +++ b/src/gui/widgets/qmainwindow.cpp @@ -39,6 +39,8 @@ ** ****************************************************************************/ +//#define QT_EXPERIMENTAL_CLIENT_DECORATIONS + #include "qmainwindow.h" #include "qmainwindowlayout_p.h" @@ -99,12 +101,70 @@ public: uint hasOldCursor : 1; uint cursorAdjusted : 1; #endif + + static inline QMainWindowLayout *mainWindowLayout(const QMainWindow *mainWindow) + { + return mainWindow ? mainWindow->d_func()->layout : static_cast<QMainWindowLayout *>(0); + } }; +QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *mainWindow) +{ + return QMainWindowPrivate::mainWindowLayout(mainWindow); +} + +#ifdef QT_EXPERIMENTAL_CLIENT_DECORATIONS +Q_GUI_EXPORT void qt_setMainWindowTitleWidget(QMainWindow *mainWindow, Qt::DockWidgetArea area, QWidget *widget) +{ + QGridLayout *topLayout = qobject_cast<QGridLayout *>(mainWindow->layout()); + Q_ASSERT(topLayout); + + int row = 0; + int column = 0; + + switch (area) { + case Qt::LeftDockWidgetArea: + row = 1; + column = 0; + break; + case Qt::TopDockWidgetArea: + row = 0; + column = 1; + break; + case Qt::BottomDockWidgetArea: + row = 2; + column = 1; + break; + case Qt::RightDockWidgetArea: + row = 1; + column = 2; + break; + default: + Q_ASSERT_X(false, "qt_setMainWindowTitleWidget", "Unknown area"); + return; + } + + if (QLayoutItem *oldItem = topLayout->itemAtPosition(row, column)) + delete oldItem->widget(); + topLayout->addWidget(widget, row, column); +} +#endif + void QMainWindowPrivate::init() { Q_Q(QMainWindow); - layout = new QMainWindowLayout(q); + +#ifdef QT_EXPERIMENTAL_CLIENT_DECORATIONS + QGridLayout *topLayout = new QGridLayout(q); + topLayout->setContentsMargins(0, 0, 0, 0); + + layout = new QMainWindowLayout(q, topLayout); + + topLayout->addItem(layout, 1, 1); +#else + layout = new QMainWindowLayout(q, 0); +#endif + const int metric = q->style()->pixelMetric(QStyle::PM_ToolBarIconSize, 0, q); iconSize = QSize(metric, metric); q->setAttribute(Qt::WA_Hover); @@ -461,10 +521,11 @@ QMenuBar *QMainWindow::menuBar() const */ void QMainWindow::setMenuBar(QMenuBar *menuBar) { - Q_D(QMainWindow); - if (d->layout->menuBar() && d->layout->menuBar() != menuBar) { + QLayout *topLayout = layout(); + + if (topLayout->menuBar() && topLayout->menuBar() != menuBar) { // Reparent corner widgets before we delete the old menu bar. - QMenuBar *oldMenuBar = qobject_cast<QMenuBar *>(d->layout->menuBar()); + QMenuBar *oldMenuBar = qobject_cast<QMenuBar *>(topLayout->menuBar()); if (menuBar) { // TopLeftCorner widget. QWidget *cornerWidget = oldMenuBar->cornerWidget(Qt::TopLeftCorner); @@ -478,7 +539,7 @@ void QMainWindow::setMenuBar(QMenuBar *menuBar) oldMenuBar->hide(); oldMenuBar->deleteLater(); } - d->layout->setMenuBar(menuBar); + topLayout->setMenuBar(menuBar); } /*! diff --git a/src/gui/widgets/qmainwindowlayout.cpp b/src/gui/widgets/qmainwindowlayout.cpp index 62ee398..4dd5208 100644 --- a/src/gui/widgets/qmainwindowlayout.cpp +++ b/src/gui/widgets/qmainwindowlayout.cpp @@ -160,7 +160,7 @@ static void dumpLayout(QTextStream &qout, const QDockAreaLayout &layout, QString void qt_dumpLayout(QTextStream &qout, QMainWindow *window) { - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(window->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(window); dumpLayout(qout, layout->layoutState.dockAreaLayout, QString()); } @@ -235,7 +235,7 @@ void QMainWindowLayoutState::apply(bool animated) dockAreaLayout.apply(animated); #else if (centralWidgetItem != 0) { - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(mainWindow->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow); Q_ASSERT(layout != 0); layout->widgetAnimator.animate(centralWidgetItem->widget(), centralWidgetRect, animated); } @@ -1674,8 +1674,8 @@ void QMainWindowLayout::restore(bool keepSavedState) updateGapIndicator(); } -QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow) - : QLayout(mainwindow) +QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLayout) + : QLayout(parentLayout ? static_cast<QWidget *>(0) : mainwindow) , layoutState(mainwindow) , savedState(mainwindow) , dockOptions(QMainWindow::AnimatedDocks | QMainWindow::AllowTabbedDocks) @@ -1698,6 +1698,9 @@ QMainWindowLayout::QMainWindowLayout(QMainWindow *mainwindow) , blockVisiblityCheck(false) #endif { + if (parentLayout) + setParent(parentLayout); + #ifndef QT_NO_DOCKWIDGET #ifndef QT_NO_TABBAR sep = mainwindow->style()->pixelMetric(QStyle::PM_DockWidgetSeparatorExtent, 0, mainwindow); diff --git a/src/gui/widgets/qmainwindowlayout_p.h b/src/gui/widgets/qmainwindowlayout_p.h index 955693d..e1b981c 100644 --- a/src/gui/widgets/qmainwindowlayout_p.h +++ b/src/gui/widgets/qmainwindowlayout_p.h @@ -159,7 +159,7 @@ class Q_AUTOTEST_EXPORT QMainWindowLayout : public QLayout public: QMainWindowLayoutState layoutState, savedState; - explicit QMainWindowLayout(QMainWindow *mainwindow); + QMainWindowLayout(QMainWindow *mainwindow, QLayout *parentLayout); ~QMainWindowLayout(); QMainWindow::DockOptions dockOptions; diff --git a/src/gui/widgets/qmenu_symbian.cpp b/src/gui/widgets/qmenu_symbian.cpp index c643a1e..652e65c 100644 --- a/src/gui/widgets/qmenu_symbian.cpp +++ b/src/gui/widgets/qmenu_symbian.cpp @@ -168,11 +168,11 @@ static void qt_symbian_insert_action(QSymbianMenuAction* action, QList<SymbianMe if (action->action->menu()->actions().size() > 0) { for (int c2= 0; c2 < action->action->menu()->actions().size(); ++c2) { - QSymbianMenuAction *symbianAction2 = new QSymbianMenuAction; + QScopedPointer<QSymbianMenuAction> symbianAction2(new QSymbianMenuAction); symbianAction2->action = action->action->menu()->actions().at(c2); QMenu * menu = symbianAction2->action->menu(); symbianAction2->command = qt_symbian_menu_static_cmd_id++; - qt_symbian_insert_action(symbianAction2, &(menuItem->children)); + qt_symbian_insert_action(symbianAction2.data(), &(menuItem->children)); } } @@ -433,11 +433,11 @@ void QMenuBarPrivate::QSymbianMenuBarPrivate::removeAction(QSymbianMenuAction *a void QMenuBarPrivate::QSymbianMenuBarPrivate::insertNativeMenuItems(const QList<QAction*> &actions) { for (int i = 0; i <actions.size(); ++i) { - QSymbianMenuAction *symbianActionTopLevel = new QSymbianMenuAction; + QScopedPointer<QSymbianMenuAction> symbianActionTopLevel(new QSymbianMenuAction); symbianActionTopLevel->action = actions.at(i); symbianActionTopLevel->parent = 0; symbianActionTopLevel->command = qt_symbian_menu_static_cmd_id++; - qt_symbian_insert_action(symbianActionTopLevel, &symbianMenus); + qt_symbian_insert_action(symbianActionTopLevel.data(), &symbianMenus); } } diff --git a/src/gui/widgets/qtoolbar.cpp b/src/gui/widgets/qtoolbar.cpp index 7ed27ea..316bb44 100644 --- a/src/gui/widgets/qtoolbar.cpp +++ b/src/gui/widgets/qtoolbar.cpp @@ -82,6 +82,9 @@ static void qt_mac_updateToolBarButtonHint(QWidget *parentWidget) } #endif +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + /****************************************************************************** ** QToolBarPrivate */ @@ -197,7 +200,7 @@ void QToolBarPrivate::initDrag(const QPoint &pos) QMainWindow *win = qobject_cast<QMainWindow*>(parent); Q_ASSERT(win != 0); - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); Q_ASSERT(layout != 0); if (layout->pluggingWidget != 0) // the main window is animating a docking operation return; @@ -223,7 +226,7 @@ void QToolBarPrivate::startDrag(bool moving) QMainWindow *win = qobject_cast<QMainWindow*>(parent); Q_ASSERT(win != 0); - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); Q_ASSERT(layout != 0); if (!moving) { @@ -247,8 +250,7 @@ void QToolBarPrivate::endDrag() q->releaseMouse(); if (state->dragging) { - QMainWindowLayout *layout = - qobject_cast<QMainWindowLayout *>(q->parentWidget()->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(q->parentWidget())); Q_ASSERT(layout != 0); if (!layout->plug(state->widgetItem)) { @@ -340,7 +342,7 @@ bool QToolBarPrivate::mouseMoveEvent(QMouseEvent *event) if (win == 0) return true; - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); Q_ASSERT(layout != 0); if (layout->pluggingWidget == 0 @@ -588,7 +590,7 @@ QToolBar::~QToolBar() QMainWindow *mainwindow = qobject_cast<QMainWindow *>(parentWidget()); if (mainwindow) { #ifdef Q_WS_MAC - QMainWindowLayout *mainwin_layout = qobject_cast<QMainWindowLayout *>(mainwindow->layout()); + QMainWindowLayout *mainwin_layout = qt_mainwindow_layout(mainwindow); if (mainwin_layout && mainwin_layout->layoutState.toolBarAreaLayout.isEmpty() && mainwindow->testAttribute(Qt::WA_WState_Created)) macWindowToolbarShow(mainwindow, false); @@ -1135,7 +1137,7 @@ bool QToolBar::event(QEvent *event) if (toolbarInUnifiedToolBar(this)) { // I can static_cast because I did the qobject_cast in the if above, therefore // we must have a QMainWindowLayout here. - QMainWindowLayout *mwLayout = static_cast<QMainWindowLayout *>(parentWidget()->layout()); + QMainWindowLayout *mwLayout = qt_mainwindow_layout(qobject_cast<QMainWindow *>(parentWidget())); mwLayout->fixSizeInUnifiedToolbar(this); mwLayout->syncUnifiedToolbarVisibility(); } @@ -1289,6 +1291,8 @@ QWidget *QToolBar::widgetForAction(QAction *action) const return d->layout->itemAt(index)->widget(); } +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + /*! \internal */ @@ -1315,7 +1319,7 @@ void QToolBar::initStyleOption(QStyleOptionToolBar *option) const if (!mainWindow) return; - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout *>(mainWindow->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow); Q_ASSERT_X(layout != 0, "QToolBar::initStyleOption()", "QMainWindow->layout() != QMainWindowLayout"); diff --git a/src/gui/widgets/qtoolbararealayout.cpp b/src/gui/widgets/qtoolbararealayout.cpp index 8327af5..b312751 100644 --- a/src/gui/widgets/qtoolbararealayout.cpp +++ b/src/gui/widgets/qtoolbararealayout.cpp @@ -59,6 +59,9 @@ QT_BEGIN_NAMESPACE +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *mainWindow); + QSize QToolBarAreaLayoutItem::minimumSize() const { if (skip()) @@ -872,7 +875,7 @@ void QToolBarAreaLayout::insertItem(QToolBar *before, QLayoutItem *item) void QToolBarAreaLayout::apply(bool animate) { - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(mainWindow->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(mainWindow); Q_ASSERT(layout != 0); Qt::LayoutDirection dir = mainWindow->layoutDirection(); diff --git a/src/gui/widgets/qtoolbarlayout.cpp b/src/gui/widgets/qtoolbarlayout.cpp index f87510f..59b027e 100644 --- a/src/gui/widgets/qtoolbarlayout.cpp +++ b/src/gui/widgets/qtoolbarlayout.cpp @@ -57,6 +57,9 @@ QT_BEGIN_NAMESPACE +// qmainwindow.cpp +extern QMainWindowLayout *qt_mainwindow_layout(const QMainWindow *window); + /****************************************************************************** ** QToolBarItem */ @@ -404,7 +407,7 @@ void QToolBarLayout::setGeometry(const QRect &rect) if (QMainWindow *win = qobject_cast<QMainWindow*>(tb->parentWidget())) { Qt::ToolBarArea area = win->toolBarArea(tb); if (win->unifiedTitleAndToolBarOnMac() && area == Qt::TopToolBarArea) { - static_cast<QMainWindowLayout *>(win->layout())->fixSizeInUnifiedToolbar(tb); + qt_mainwindow_layout(win)->fixSizeInUnifiedToolbar(tb); } } # endif @@ -659,7 +662,7 @@ void QToolBarLayout::setExpanded(bool exp) #else animating = !tb->isWindow() && win->isAnimated(); #endif - QMainWindowLayout *layout = qobject_cast<QMainWindowLayout*>(win->layout()); + QMainWindowLayout *layout = qt_mainwindow_layout(win); if (expanded) { tb->raise(); } else { diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 4983840..abab33c 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -167,7 +167,7 @@ QDeclarativeFolderListModel::QDeclarativeFolderListModel(QObject *parent) connect(&d->model, SIGNAL(rowsRemoved(const QModelIndex&,int,int)) , this, SLOT(removed(const QModelIndex&,int,int))); connect(&d->model, SIGNAL(dataChanged(const QModelIndex&,const QModelIndex&)) - , this, SLOT(dataChanged(const QModelIndex&,const QModelIndex&))); + , this, SLOT(handleDataChanged(const QModelIndex&,const QModelIndex&))); connect(&d->model, SIGNAL(modelReset()), this, SLOT(refresh())); connect(&d->model, SIGNAL(layoutChanged()), this, SLOT(refresh())); } @@ -363,7 +363,7 @@ void QDeclarativeFolderListModel::removed(const QModelIndex &index, int start, i } } -void QDeclarativeFolderListModel::dataChanged(const QModelIndex &start, const QModelIndex &end) +void QDeclarativeFolderListModel::handleDataChanged(const QModelIndex &start, const QModelIndex &end) { if (start.parent() == d->folderIndex) emit dataChanged(index(start.row(),0), index(end.row(),0)); diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h index 1bab5f84..24edecd 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.h @@ -138,7 +138,7 @@ private Q_SLOTS: void refresh(); void inserted(const QModelIndex &index, int start, int end); void removed(const QModelIndex &index, int start, int end); - void dataChanged(const QModelIndex &start, const QModelIndex &end); + void handleDataChanged(const QModelIndex &start, const QModelIndex &end); private: Q_DISABLE_COPY(QDeclarativeFolderListModel) diff --git a/src/multimedia/audio/qaudio_symbian_p.cpp b/src/multimedia/audio/qaudio_symbian_p.cpp index 4522c5c..59fc05f 100644 --- a/src/multimedia/audio/qaudio_symbian_p.cpp +++ b/src/multimedia/audio/qaudio_symbian_p.cpp @@ -313,7 +313,8 @@ QAudio::State stateNativeToQt(State nativeState) return QAudio::ActiveState; case IdleState: return QAudio::IdleState; - case SuspendedState: + case SuspendedPausedState: + case SuspendedStoppedState: return QAudio::SuspendedState; default: Q_ASSERT_X(false, Q_FUNC_INFO, "Invalid state"); @@ -432,15 +433,16 @@ bool DevSoundWrapper::isFormatSupported(const QAudioFormat &format) const int DevSoundWrapper::samplesProcessed() const { - Q_ASSERT(StateInitialized == m_state); int result = 0; - switch (m_mode) { - case QAudio::AudioInput: - result = m_devsound->SamplesRecorded(); - break; - case QAudio::AudioOutput: - result = m_devsound->SamplesPlayed(); - break; + if (StateInitialized == m_state) { + switch (m_mode) { + case QAudio::AudioInput: + result = m_devsound->SamplesRecorded(); + break; + case QAudio::AudioOutput: + result = m_devsound->SamplesPlayed(); + break; + } } return result; } @@ -475,10 +477,22 @@ bool DevSoundWrapper::start() return (KErrNone == err); } -void DevSoundWrapper::pause() +bool DevSoundWrapper::pause() { Q_ASSERT(StateInitialized == m_state); - m_devsound->Pause(); + const bool canPause = isResumeSupported(); + if (canPause) + m_devsound->Pause(); + else + stop(); + return canPause; +} + +void DevSoundWrapper::resume() +{ + Q_ASSERT(StateInitialized == m_state); + Q_ASSERT(isResumeSupported()); + // TODO: QTBUG-13625 } void DevSoundWrapper::stop() @@ -557,6 +571,12 @@ void DevSoundWrapper::populateCapabilities() } } +bool DevSoundWrapper::isResumeSupported() const +{ + // TODO: QTBUG-13625 + return false; +} + void DevSoundWrapper::InitializeComplete(TInt aError) { Q_ASSERT(StateInitializing == m_state); diff --git a/src/multimedia/audio/qaudio_symbian_p.h b/src/multimedia/audio/qaudio_symbian_p.h index 58ef192..84a93d1 100644 --- a/src/multimedia/audio/qaudio_symbian_p.h +++ b/src/multimedia/audio/qaudio_symbian_p.h @@ -81,7 +81,10 @@ enum State { , InitializingState , ActiveState , IdleState - , SuspendedState + // QAudio is suspended; DevSound is paused + , SuspendedPausedState + // QAudio is suspended; DevSound is stopped + , SuspendedStoppedState }; /** @@ -117,7 +120,14 @@ public: int samplesProcessed() const; bool setFormat(const QAudioFormat &format); bool start(); - void pause(); + + // If DevSound implementation supports pause, calls pause and returns true. + // Otherwise calls stop and returns false. In this case, all DevSound buffers + // currently held by the backend must be discarded. + bool pause(); + + void resume(); + void stop(); void bufferProcessed(); @@ -140,6 +150,7 @@ signals: private: void getSupportedCodecs(); void populateCapabilities(); + bool isResumeSupported() const; private: const QAudio::Mode m_mode; diff --git a/src/multimedia/audio/qaudioinput_symbian_p.cpp b/src/multimedia/audio/qaudioinput_symbian_p.cpp index 9d240ca..485c695 100644 --- a/src/multimedia/audio/qaudioinput_symbian_p.cpp +++ b/src/multimedia/audio/qaudioinput_symbian_p.cpp @@ -174,23 +174,30 @@ void QAudioInputPrivate::suspend() || SymbianAudio::IdleState == m_internalState) { m_notifyTimer->stop(); m_pullTimer->stop(); - m_devSound->pause(); const qint64 samplesRecorded = getSamplesRecorded(); m_totalSamplesRecorded += samplesRecorded; - if (m_devSoundBuffer) { - m_devSoundBufferQ.append(m_devSoundBuffer); + const bool paused = m_devSound->pause(); + if (paused) { + if (m_devSoundBuffer) + m_devSoundBufferQ.append(m_devSoundBuffer); m_devSoundBuffer = 0; + setState(SymbianAudio::SuspendedPausedState); + } else { + m_devSoundBuffer = 0; + m_devSoundBufferQ.clear(); + m_devSoundBufferPos = 0; + setState(SymbianAudio::SuspendedStoppedState); } - - setState(SymbianAudio::SuspendedState); } } void QAudioInputPrivate::resume() { - if (SymbianAudio::SuspendedState == m_internalState) { - if (!m_pullMode && !bytesReady()) + if (QAudio::SuspendedState == m_externalState) { + if (SymbianAudio::SuspendedPausedState == m_internalState) + m_devSound->resume(); + else m_devSound->start(); startDataTransfer(); } @@ -246,7 +253,7 @@ int QAudioInputPrivate::notifyInterval() const qint64 QAudioInputPrivate::processedUSecs() const { int samplesPlayed = 0; - if (m_devSound && SymbianAudio::SuspendedState != m_internalState) + if (m_devSound && QAudio::SuspendedState != m_externalState) samplesPlayed = getSamplesRecorded(); // Protect against division by zero @@ -335,7 +342,7 @@ void QAudioInputPrivate::startDataTransfer() if (!m_pullMode) pushData(); } else { - if (SymbianAudio::SuspendedState == m_internalState) + if (QAudio::SuspendedState == m_externalState) setState(SymbianAudio::ActiveState); else setState(SymbianAudio::IdleState); @@ -373,7 +380,8 @@ qint64 QAudioInputPrivate::read(char *data, qint64 len) TDesC8 &inputBuffer = buffer->Data(); - const qint64 inputBytes = bytesReady(); + Q_ASSERT(inputBuffer.Length() >= m_devSoundBufferPos); + const qint64 inputBytes = inputBuffer.Length() - m_devSoundBufferPos; const qint64 outputBytes = len - bytesRead; const qint64 copyBytes = outputBytes < inputBytes ? outputBytes : inputBytes; @@ -384,7 +392,7 @@ qint64 QAudioInputPrivate::read(char *data, qint64 len) data += copyBytes; bytesRead += copyBytes; - if (!bytesReady()) + if (inputBytes == copyBytes) bufferEmptied(); } @@ -403,13 +411,14 @@ void QAudioInputPrivate::pullData() TDesC8 &inputBuffer = buffer->Data(); - const qint64 inputBytes = bytesReady(); + Q_ASSERT(inputBuffer.Length() >= m_devSoundBufferPos); + const qint64 inputBytes = inputBuffer.Length() - m_devSoundBufferPos; const qint64 bytesPushed = m_sink->write( (char*)inputBuffer.Ptr() + m_devSoundBufferPos, inputBytes); m_devSoundBufferPos += bytesPushed; - if (!bytesReady()) + if (inputBytes == bytesPushed) bufferEmptied(); if (!bytesPushed) @@ -441,7 +450,7 @@ void QAudioInputPrivate::devsoundBufferToBeEmptied(CMMFBuffer *baseBuffer) m_totalBytesReady += buffer->Data().Length(); - if (SymbianAudio::SuspendedState == m_internalState) { + if (SymbianAudio::SuspendedPausedState == m_internalState) { m_devSoundBufferQ.append(buffer); } else { // Will be returned to DevSoundWrapper by bufferProcessed(). diff --git a/src/multimedia/audio/qaudiooutput_symbian_p.cpp b/src/multimedia/audio/qaudiooutput_symbian_p.cpp index 5098469..ea14e19 100644 --- a/src/multimedia/audio/qaudiooutput_symbian_p.cpp +++ b/src/multimedia/audio/qaudiooutput_symbian_p.cpp @@ -180,39 +180,33 @@ void QAudioOutputPrivate::suspend() || SymbianAudio::IdleState == m_internalState) { m_notifyTimer->stop(); m_underflowTimer->stop(); - const qint64 samplesWritten = SymbianAudio::Utils::bytesToSamples( m_format, m_bytesWritten); - const qint64 samplesPlayed = getSamplesPlayed(); - - m_bytesWritten = 0; - - // CMMFDevSound::Pause() is not guaranteed to work correctly in all - // implementations, for play-mode DevSound sessions. We therefore - // have to implement suspend() by calling CMMFDevSound::Stop(). - // Because this causes buffered data to be dropped, we replace the - // lost data with silence following a call to resume(), in order to - // ensure that processedUSecs() returns the correct value. - m_devSound->stop(); m_totalSamplesPlayed += samplesPlayed; - - // Calculate the amount of data dropped - const qint64 paddingSamples = samplesWritten - samplesPlayed; - Q_ASSERT(paddingSamples >= 0); - m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format, - paddingSamples); - - setState(SymbianAudio::SuspendedState); + m_bytesWritten = 0; + const bool paused = m_devSound->pause(); + if (paused) { + setState(SymbianAudio::SuspendedPausedState); + } else { + m_devSoundBuffer = 0; + // Calculate the amount of data dropped + const qint64 paddingSamples = samplesWritten - samplesPlayed; + Q_ASSERT(paddingSamples >= 0); + m_bytesPadding = SymbianAudio::Utils::samplesToBytes(m_format, + paddingSamples); + setState(SymbianAudio::SuspendedStoppedState); + } } } void QAudioOutputPrivate::resume() { - if (SymbianAudio::SuspendedState == m_internalState) { - if (!m_pullMode && m_devSoundBuffer && m_devSoundBuffer->Data().Length()) - bufferFilled(); - startPlayback(); + if (QAudio::SuspendedState == m_externalState) { + if (SymbianAudio::SuspendedPausedState == m_internalState) + m_devSound->resume(); + else + startPlayback(); } } @@ -270,7 +264,7 @@ int QAudioOutputPrivate::notifyInterval() const qint64 QAudioOutputPrivate::processedUSecs() const { int samplesPlayed = 0; - if (m_devSound && SymbianAudio::SuspendedState != m_internalState) + if (m_devSound && QAudio::SuspendedState != m_externalState) samplesPlayed = getSamplesPlayed(); // Protect against division by zero @@ -371,6 +365,9 @@ void QAudioOutputPrivate::devsoundPlayError(int err) else setState(SymbianAudio::IdleState); break; + case KErrOverflow: + // Silently consume this error when in playback mode + break; default: setError(QAudio::IOError); break; diff --git a/src/multimedia/video/qabstractvideobuffer.cpp b/src/multimedia/video/qabstractvideobuffer.cpp index db05ee5..978636a 100644 --- a/src/multimedia/video/qabstractvideobuffer.cpp +++ b/src/multimedia/video/qabstractvideobuffer.cpp @@ -87,7 +87,7 @@ QT_BEGIN_NAMESPACE \value NotMapped The video buffer has is not mapped to memory. \value ReadOnly The mapped memory is populated with data from the video buffer when mapped, but the content of the mapped memory may be discarded when unmapped. - \value WriteOnly The mapped memory in unitialized when mapped, and the content will be used to + \value WriteOnly The mapped memory is uninitialized when mapped, and the content will be used to populate the video buffer when unmapped. \value ReadWrite The mapped memory is populated with data from the video buffer, and the video buffer is repopulated with the content of the mapped memory. diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp index 95ccb77..2ab28c7 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -746,7 +746,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() return; // try to get a free AND connected socket for (int i = 0; i < channelCount; ++i) { - if (!channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) { + if (!channels[i].reply && !channels[i].isSocketBusy() && channels[i].socket->state() == QAbstractSocket::ConnectedState) { dequeueAndSendRequest(channels[i].socket); } } @@ -756,7 +756,7 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() return; // try to get a free unconnected socket for (int i = 0; i < channelCount; ++i) { - if (!channels[i].isSocketBusy()) { + if (!channels[i].reply && !channels[i].isSocketBusy()) { dequeueAndSendRequest(channels[i].socket); } } diff --git a/src/network/access/qnetworkreplyimpl.cpp b/src/network/access/qnetworkreplyimpl.cpp index 70418e9..3a629cf 100644 --- a/src/network/access/qnetworkreplyimpl.cpp +++ b/src/network/access/qnetworkreplyimpl.cpp @@ -595,6 +595,7 @@ void QNetworkReplyImplPrivate::appendDownstreamData(QIODevice *data) void QNetworkReplyImplPrivate::appendDownstreamData(const QByteArray &data) { + Q_UNUSED(data) // TODO implement // TODO call diff --git a/src/network/bearer/qbearerengine.cpp b/src/network/bearer/qbearerengine.cpp index 2f8624a..b074924 100644 --- a/src/network/bearer/qbearerengine.cpp +++ b/src/network/bearer/qbearerengine.cpp @@ -58,18 +58,21 @@ QBearerEngine::~QBearerEngine() it.value()->isValid = false; it.value()->id.clear(); } + snapConfigurations.clear(); for (it = accessPointConfigurations.begin(), end = accessPointConfigurations.end(); it != end; ++it) { it.value()->isValid = false; it.value()->id.clear(); } + accessPointConfigurations.clear(); for (it = userChoiceConfigurations.begin(), end = userChoiceConfigurations.end(); it != end; ++it) { it.value()->isValid = false; it.value()->id.clear(); } + userChoiceConfigurations.clear(); } bool QBearerEngine::requiresPolling() const diff --git a/src/network/kernel/qauthenticator.cpp b/src/network/kernel/qauthenticator.cpp index 18cc14e..f97d833 100644 --- a/src/network/kernel/qauthenticator.cpp +++ b/src/network/kernel/qauthenticator.cpp @@ -210,19 +210,38 @@ void QAuthenticator::setUser(const QString &user) switch(d->method) { case QAuthenticatorPrivate::DigestMd5: - case QAuthenticatorPrivate::Ntlm: - if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) - { + if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) { //domain name is present + d->userDomain.clear(); d->realm = user.left(separatorPosn); d->user = user.mid(separatorPosn + 1); } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) { //domain name is present + d->userDomain.clear(); d->realm = user.mid(separatorPosn + 1); d->user = user.left(separatorPosn); } else { d->user = user; d->realm.clear(); + d->userDomain.clear(); + } + break; + + case QAuthenticatorPrivate::Ntlm: + if((separatorPosn = user.indexOf(QLatin1String("\\"))) != -1) { + //domain name is present + d->realm.clear(); + d->userDomain = user.left(separatorPosn); + d->user = user.mid(separatorPosn + 1); + } else if((separatorPosn = user.indexOf(QLatin1String("@"))) != -1) { + //domain name is present + d->realm.clear(); + d->userDomain = user.left(separatorPosn); + d->user = user.left(separatorPosn); + } else { + d->user = user; + d->realm.clear(); + d->userDomain.clear(); } break; // For other auth mechanisms, domain name will be part of username @@ -1178,7 +1197,7 @@ static QByteArray qCreatev2Hash(const QAuthenticatorPrivate *ctx, // Assuming the user and domain is always unicode in challenge QByteArray message = qStringAsUcs2Le(ctx->user.toUpper()) + - qStringAsUcs2Le(ctx->realm); + qStringAsUcs2Le(phase3->domainStr); phase3->v2Hash = qEncodeHmacMd5(hashKey, message); } @@ -1364,9 +1383,6 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas bool unicode = ch.flags & NTLMSSP_NEGOTIATE_UNICODE; - if(ctx->realm.isEmpty()) - ctx->realm = ch.targetNameStr; - pb.flags = NTLMSSP_NEGOTIATE_NTLM; if (unicode) pb.flags |= NTLMSSP_NEGOTIATE_UNICODE; @@ -1377,8 +1393,13 @@ static QByteArray qNtlmPhase3(QAuthenticatorPrivate *ctx, const QByteArray& phas int offset = QNtlmPhase3BlockBase::Size; Q_ASSERT(QNtlmPhase3BlockBase::Size == sizeof(QNtlmPhase3BlockBase)); - offset = qEncodeNtlmString(pb.domain, offset, ctx->realm, unicode); - pb.domainStr = ctx->realm; + if(ctx->userDomain.isEmpty()) { + offset = qEncodeNtlmString(pb.domain, offset, ch.targetNameStr, unicode); + pb.domainStr = ch.targetNameStr; + } else { + offset = qEncodeNtlmString(pb.domain, offset, ctx->userDomain, unicode); + pb.domainStr = ctx->userDomain; + } offset = qEncodeNtlmString(pb.user, offset, ctx->user, unicode); pb.userStr = ctx->user; diff --git a/src/network/kernel/qauthenticator_p.h b/src/network/kernel/qauthenticator_p.h index 1096601..4e09360 100644 --- a/src/network/kernel/qauthenticator_p.h +++ b/src/network/kernel/qauthenticator_p.h @@ -91,6 +91,7 @@ public: // ntlm specific QString workstation; + QString userDomain; QByteArray calculateResponse(const QByteArray &method, const QByteArray &path); diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index b762bcc..d89ef08 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -866,6 +866,32 @@ void QGL2PaintEngineExPrivate::fill(const QVectorPath& path) if (do_vectorpath_cache) path.makeCacheable(); + if (!device->format().stencil()) { + // If there is no stencil buffer, triangulate the path instead. + + QRectF bbox = path.controlPointRect(); + // If the path doesn't fit within these limits, it is possible that the triangulation will fail. + bool withinLimits = (bbox.left() > -0x8000 * inverseScale) + && (bbox.right() < 0x8000 * inverseScale) + && (bbox.top() > -0x8000 * inverseScale) + && (bbox.bottom() < 0x8000 * inverseScale); + if (withinLimits) { + QTriangleSet polys = qTriangulate(path, QTransform().scale(1 / inverseScale, 1 / inverseScale)); + + QVarLengthArray<float> vertices(polys.vertices.size()); + for (int i = 0; i < polys.vertices.size(); ++i) + vertices[i] = float(inverseScale * polys.vertices.at(i)); + + prepareForDraw(currentBrush.isOpaque()); + setVertexAttributePointer(QT_VERTEX_COORDS_ATTR, vertices.constData()); + glDrawElements(GL_TRIANGLES, polys.indices.size(), GL_UNSIGNED_INT, polys.indices.constData()); + } else { + // We can't handle big, concave painter paths with OpenGL without stencil buffer. + qWarning("Painter path exceeds +/-32767 pixels."); + } + return; + } + // The path is too complicated & needs the stencil technique vertexCoordinateArray.clear(); vertexCoordinateArray.addPath(path, inverseScale, false); @@ -1525,8 +1551,15 @@ void QGL2PaintEngineExPrivate::drawCachedGlyphs(QFontEngineGlyphCache::Type glyp vertexCoordinates->clear(); textureCoordinates->clear(); + bool supportsSubPixelPositions = staticTextItem->fontEngine->supportsSubPixelPositions(); for (int i=0; i<staticTextItem->numGlyphs; ++i) { - const QTextureGlyphCache::Coord &c = cache->coords.value(staticTextItem->glyphs[i]); + QFixed subPixelPosition; + if (supportsSubPixelPositions) + subPixelPosition = cache->subPixelPositionForX(staticTextItem->glyphPositions[i].x); + + QTextureGlyphCache::GlyphAndSubPixelPosition glyph(staticTextItem->glyphs[i], subPixelPosition); + + const QTextureGlyphCache::Coord &c = cache->coords.value(glyph); int x = staticTextItem->glyphPositions[i].x.toInt() + c.baseLineX - margin; int y = staticTextItem->glyphPositions[i].y.toInt() - c.baseLineY - margin; diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 53a2f3a..f8e34d4 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -216,7 +216,7 @@ void QGLTextureGlyphCache::resizeTextureData(int width, int height) pex->updateClipScissorTest(); } -void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) +void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition) { if (ctx == 0) { qWarning("QGLTextureGlyphCache::fillTexture: Called with no context"); @@ -225,7 +225,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) QGLGlyphTexture *glyphTexture = m_textureResource.value(ctx); if (pex == 0 || ctx->d_ptr->workaround_brokenFBOReadBack) { - QImageTextureGlyphCache::fillTexture(c, glyph); + QImageTextureGlyphCache::fillTexture(c, glyph, subPixelPosition); glBindTexture(GL_TEXTURE_2D, glyphTexture->m_texture); const QImage &texture = image(); @@ -238,7 +238,7 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) return; } - QImage mask = textureMapForGlyph(glyph); + QImage mask = textureMapForGlyph(glyph, subPixelPosition); const int maskWidth = mask.width(); const int maskHeight = mask.height(); @@ -291,4 +291,19 @@ int QGLTextureGlyphCache::glyphPadding() const return 1; } +int QGLTextureGlyphCache::maxTextureWidth() const +{ + if (ctx == 0) + return QImageTextureGlyphCache::maxTextureWidth(); + else + return ctx->d_ptr->maxTextureSize(); +} + +int QGLTextureGlyphCache::maxTextureHeight() const +{ + if (ctx == 0) + return QImageTextureGlyphCache::maxTextureHeight(); + else + return ctx->d_ptr->maxTextureSize(); +} QT_END_NAMESPACE diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h index 2ae3a64..ada47e9 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl_p.h @@ -106,8 +106,10 @@ public: virtual void createTextureData(int width, int height); virtual void resizeTextureData(int width, int height); - virtual void fillTexture(const Coord &c, glyph_t glyph); + virtual void fillTexture(const Coord &c, glyph_t glyph, QFixed subPixelPosition); virtual int glyphPadding() const; + virtual int maxTextureWidth() const; + virtual int maxTextureHeight() const; inline GLuint texture() const { QGLTextureGlyphCache *that = const_cast<QGLTextureGlyphCache *>(this); diff --git a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp index 9bc099d..7b0b8a2 100644 --- a/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp +++ b/src/opengl/gl2paintengineex/qtriangulatingstroker.cpp @@ -509,6 +509,7 @@ void QDashedStrokeProcessor::process(const QVectorPath &path, const QPen &pen, c m_dash_stroker.setDashPattern(pen.dashPattern()); m_dash_stroker.setStrokeWidth(cosmetic ? width * m_inv_scale : width); + m_dash_stroker.setDashOffset(pen.dashOffset()); m_dash_stroker.setMiterLimit(pen.miterLimit()); m_dash_stroker.setClipRect(clip); diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 63d4a6c..ec191e1 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -110,11 +110,10 @@ extern const QX11Info *qt_x11Info(const QPaintDevice *pd); #endif struct QGLThreadContext { -#ifdef QT_OPENGL_ES ~QGLThreadContext() { - eglReleaseThread(); + if (context) + context->doneCurrent(); } -#endif QGLContext *context; }; 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 <private/qt_x11_p.h> #include <private/qpixmap_x11_p.h> #include <private/qimagepixmapcleanuphooks_p.h> +#include <private/qunicodetables_p.h> #ifdef Q_OS_HPUX // for GLXPBuffer #include <private/qglpixelbuffer_p.h> diff --git a/src/opengl/qglframebufferobject.cpp b/src/opengl/qglframebufferobject.cpp index 660201b..cee950a 100644 --- a/src/opengl/qglframebufferobject.cpp +++ b/src/opengl/qglframebufferobject.cpp @@ -324,6 +324,10 @@ void QGLFBOGLPaintDevice::setFBO(QGLFramebufferObject* f, fboFormat.setStencil(true); } else if (attachment == QGLFramebufferObject::Depth) { fboFormat.setDepth(true); + fboFormat.setStencil(false); + } else { + fboFormat.setDepth(false); + fboFormat.setStencil(false); } GLenum format = f->format().internalTextureFormat(); diff --git a/src/opengl/qglpixelbuffer.cpp b/src/opengl/qglpixelbuffer.cpp index da2974c..2ec345d 100644 --- a/src/opengl/qglpixelbuffer.cpp +++ b/src/opengl/qglpixelbuffer.cpp @@ -67,7 +67,13 @@ when the pbuffer contents change, eliminating the need for additional copy operations. This is supported only on Windows and Mac OS X systems that provide the \c render_texture - extension. + extension. Note that under Windows, a multi-sampled pbuffer + can't be used in conjunction with the \c render_texture + extension. If a multi-sampled pbuffer is requested under + Windows, the \c render_texture extension is turned off for that + pbuffer. + + \endlist diff --git a/src/opengl/qglpixelbuffer_win.cpp b/src/opengl/qglpixelbuffer_win.cpp index df83566..1da0aad 100644 --- a/src/opengl/qglpixelbuffer_win.cpp +++ b/src/opengl/qglpixelbuffer_win.cpp @@ -167,6 +167,11 @@ typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, con #define WGL_FLOAT_COMPONENTS_NV 0x20B0 #endif +#ifndef WGL_ARB_multisample +#define WGL_SAMPLE_BUFFERS_ARB 0x2041 +#define WGL_SAMPLES_ARB 0x2042 +#endif + QGLFormat pfiToQGLFormat(HDC hdc, int pfi); static void qt_format_to_attrib_list(bool has_render_texture, const QGLFormat &f, int attribs[]) @@ -226,14 +231,12 @@ static void qt_format_to_attrib_list(bool has_render_texture, const QGLFormat &f attribs[i++] = WGL_FLOAT_COMPONENTS_NV; attribs[i++] = TRUE; } - // sample buffers doesn't work in conjunction with the render_texture extension - // so igonre that for now - // if (f.sampleBuffers()) { - // attribs[i++] = WGL_SAMPLE_BUFFERS_ARB; - // attribs[i++] = 1; - // attribs[i++] = WGL_SAMPLES_ARB; - // attribs[i++] = f.samples() == -1 ? 16 : f.samples(); - // } + if (f.sampleBuffers()) { + attribs[i++] = WGL_SAMPLE_BUFFERS_ARB; + attribs[i++] = 1; + attribs[i++] = WGL_SAMPLES_ARB; + attribs[i++] = f.samples() == -1 ? 16 : f.samples(); + } attribs[i] = 0; } @@ -256,12 +259,17 @@ bool QGLPixelBufferPrivate::init(const QSize &size, const QGLFormat &f, QGLWidge dc = wglGetCurrentDC(); Q_ASSERT(dc); - PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = - (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); + // sample buffers doesn't work in conjunction with the render_texture extension + if (f.sampleBuffers()) { + has_render_texture = false; + } else { + PFNWGLGETEXTENSIONSSTRINGARBPROC wglGetExtensionsStringARB = + (PFNWGLGETEXTENSIONSSTRINGARBPROC) wglGetProcAddress("wglGetExtensionsStringARB"); - if (wglGetExtensionsStringARB) { - QString extensions(QLatin1String(wglGetExtensionsStringARB(dc))); - has_render_texture = extensions.contains(QLatin1String("WGL_ARB_render_texture")); + if (wglGetExtensionsStringARB) { + QString extensions(QLatin1String(wglGetExtensionsStringARB(dc))); + has_render_texture = extensions.contains(QLatin1String("WGL_ARB_render_texture")); + } } int attribs[40]; diff --git a/src/opengl/qpaintengine_opengl.cpp b/src/opengl/qpaintengine_opengl.cpp index 12c487d..58778ea 100644 --- a/src/opengl/qpaintengine_opengl.cpp +++ b/src/opengl/qpaintengine_opengl.cpp @@ -921,6 +921,7 @@ static inline QPainterPath strokeForPath(const QPainterPath &path, const QPen &c stroker.setCapStyle(cpen.capStyle()); stroker.setJoinStyle(cpen.joinStyle()); stroker.setMiterLimit(cpen.miterLimit()); + stroker.setDashOffset(cpen.dashOffset()); qreal width = cpen.widthF(); if (width == 0) @@ -4734,9 +4735,11 @@ void QGLGlyphCache::cacheGlyphs(QGLContext *context, QFontEngine *fontEngine, font_cache = new QGLFontGlyphHash; // qDebug() << "new context" << context << font_cache; qt_context_cache.insert(context, font_cache); - if (context->isValid() && context->device()->devType() == QInternal::Widget) { - QWidget *widget = static_cast<QWidget *>(context->device()); - connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); + if (context->isValid()) { + if (context->device()->devType() == QInternal::Widget) { + QWidget *widget = static_cast<QWidget *>(context->device()); + connect(widget, SIGNAL(destroyed(QObject*)), SLOT(widgetDestroyed(QObject*))); + } connect(QGLSignalProxy::instance(), SIGNAL(aboutToDestroyContext(const QGLContext*)), SLOT(cleanupContext(const QGLContext*))); diff --git a/src/opengl/qpixmapdata_gl_p.h b/src/opengl/qpixmapdata_gl_p.h index 4cb67b0..f000993 100644 --- a/src/opengl/qpixmapdata_gl_p.h +++ b/src/opengl/qpixmapdata_gl_p.h @@ -168,6 +168,7 @@ private: mutable QGLPixmapGLPaintDevice m_glDevice; friend class QGLPixmapGLPaintDevice; + friend class QMeeGoPixmapData; }; QT_END_NAMESPACE diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 52abe5a..bc4912b 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -190,7 +190,10 @@ public: QGLWidget *shareWidget() { if (!initializing && !widget && !cleanedUp) { initializing = true; - widget = new QGLWidget; + + widget = new QGLWidget(QGLFormat(QGL::SingleBuffer | QGL::NoDepthBuffer | QGL::NoStencilBuffer)); + widget->resize(1, 1); + // We dont need this internal widget to appear in QApplication::topLevelWidgets() if (QWidgetPrivate::allWidgets) QWidgetPrivate::allWidgets->remove(widget); @@ -342,12 +345,14 @@ QGLWindowSurface::~QGLWindowSurface() void QGLWindowSurface::deleted(QObject *object) { - // Make sure that the fbo is destroyed before destroying its context. - delete d_ptr->fbo; - d_ptr->fbo = 0; - QWidget *widget = qobject_cast<QWidget *>(object); if (widget) { + if (widget == window()) { + // Make sure that the fbo is destroyed before destroying its context. + delete d_ptr->fbo; + d_ptr->fbo = 0; + } + QWidgetPrivate *widgetPrivate = widget->d_func(); if (widgetPrivate->extraData()) { union { QGLContext **ctxPtr; void **voidPtr; }; @@ -421,6 +426,8 @@ QPaintDevice *QGLWindowSurface::paintDevice() QGLContext *ctx = reinterpret_cast<QGLContext *>(window()->d_func()->extraData()->glContext); ctx->makeCurrent(); + + Q_ASSERT(d_ptr->fbo); return d_ptr->fbo; } diff --git a/src/openvg/qpaintengine_vg.cpp b/src/openvg/qpaintengine_vg.cpp index 75e5a60..3c2fd3d 100644 --- a/src/openvg/qpaintengine_vg.cpp +++ b/src/openvg/qpaintengine_vg.cpp @@ -196,7 +196,9 @@ public: #endif QTransform transform; // Currently active transform. - bool simpleTransform; // True if the transform is simple (non-projective). + bool affineTransform; // True if the transform is non-projective. + bool simpleTransform; // True if the transform is simple translate + // or 0, 90, 180, and 270 degree rotation qreal penScale; // Pen scaling factor from "transform". QTransform pathTransform; // Calculated VG path transformation. @@ -372,6 +374,7 @@ void QVGPaintEnginePrivate::init() roundRectPath = 0; #endif + affineTransform = true; simpleTransform = true; pathTransformSet = false; penScale = 1.0; @@ -524,12 +527,59 @@ void QVGPaintEnginePrivate::setTransform vgLoadMatrix(mat); } +// Determine if a co-ordinate transform is simple enough to allow +// rectangle-based clipping with vgMask() and rounding translation +// to integers. Simple transforms most often result from origin translations. +static inline bool transformIsSimple(const QTransform& transform) +{ + QTransform::TransformationType type = transform.type(); + if (type == QTransform::TxNone || type == QTransform::TxTranslate) { + return true; + } else if (type == QTransform::TxScale) { + // Check for 0 and 180 degree rotations. + // (0 might happen after 4 rotations of 90 degrees). + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m12 == 0.0f && m21 == 0.0f) { + if (m11 == 1.0f && m22 == 1.0f) + return true; // 0 degrees + else if (m11 == -1.0f && m22 == -1.0f) + return true; // 180 degrees. + if(m11 == 1.0f && m22 == -1.0f) + return true; // 0 degrees inverted y. + else if(m11 == -1.0f && m22 == 1.0f) + return true; // 180 degrees inverted y. + } + } else if (type == QTransform::TxRotate) { + // Check for 90, and 270 degree rotations. + qreal m11 = transform.m11(); + qreal m12 = transform.m12(); + qreal m21 = transform.m21(); + qreal m22 = transform.m22(); + if (m11 == 0.0f && m22 == 0.0f) { + if (m12 == 1.0f && m21 == -1.0f) + return true; // 90 degrees. + else if (m12 == -1.0f && m21 == 1.0f) + return true; // 270 degrees. + else if (m12 == -1.0f && m21 == -1.0f) + return true; // 90 degrees inverted y. + else if (m12 == 1.0f && m21 == 1.0f) + return true; // 270 degrees inverted y. + } + } + return false; +} + Q_DECL_IMPORT extern bool qt_scaleForTransform(const QTransform &transform, qreal *scale); void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) { VGfloat devh = pdev->height(); + simpleTransform = transformIsSimple(transform); + // Construct the VG transform by combining the Qt transform with // the following viewport transformation: // | 1 0 0 | @@ -552,9 +602,9 @@ void QVGPaintEnginePrivate::updateTransform(QPaintDevice *pdev) // so we will have to convert the co-ordinates ourselves. // Change the matrix to just the viewport transformation. pathTransform = viewport; - simpleTransform = false; + affineTransform = false; } else { - simpleTransform = true; + affineTransform = true; } pathTransformSet = false; @@ -583,7 +633,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) // Size is sufficient segments for drawRoundedRect() paths. QVarLengthArray<VGubyte, 20> segments; - if (sizeof(qreal) == sizeof(VGfloat) && elements && simpleTransform) { + if (sizeof(qreal) == sizeof(VGfloat) && elements && affineTransform) { // If Qt was compiled with qreal the same size as VGfloat, // then convert the segment types and use the incoming // points array directly. @@ -618,7 +668,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) int curvePos = 0; QPointF temp; - if (elements && simpleTransform) { + if (elements && affineTransform) { // Convert the members of the element array. for (int i = 0; i < count; ++i) { switch (elements[i]) { @@ -662,7 +712,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) } points += 2; } - } else if (elements && !simpleTransform) { + } else if (elements && !affineTransform) { // Convert the members of the element array after applying the // current transform to the path locally. for (int i = 0; i < count; ++i) { @@ -711,7 +761,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) } points += 2; } - } else if (count > 0 && simpleTransform) { + } else if (count > 0 && affineTransform) { // If there is no element array, then the path is assumed // to be a MoveTo followed by several LineTo's. coords.append(points[0]); @@ -724,7 +774,7 @@ VGPath QVGPaintEnginePrivate::vectorPathToVGPath(const QVectorPath& path) segments.append(VG_LINE_TO_ABS); --count; } - } else if (count > 0 && !simpleTransform) { + } else if (count > 0 && !affineTransform) { // Convert a simple path, and apply the transform locally. temp = transform.map(QPointF(points[0], points[1])); coords.append(temp.x()); @@ -785,7 +835,7 @@ VGPath QVGPaintEnginePrivate::painterPathToVGPath(const QPainterPath& path) bool haveStart = false; bool haveEnd = false; - if (simpleTransform) { + if (affineTransform) { // Convert the members of the element array. for (int i = 0; i < count; ++i) { switch (elements[i].type) { @@ -958,7 +1008,7 @@ VGPath QVGPaintEnginePrivate::roundedRectPath(const QRectF &rect, qreal xRadius, x1, y2 - (1 - KAPPA) * yRadius, x1, y2 - yRadius, x1, y1 + yRadius, // LineTo - x1, y1 + KAPPA * yRadius, // CurveTo + x1, y1 + (1 - KAPPA) * yRadius, // CurveTo x1 + (1 - KAPPA) * xRadius, y1, x1 + xRadius, y1 }; @@ -1560,36 +1610,6 @@ void QVGPaintEngine::stroke(const QVectorPath &path, const QPen &pen) vgDestroyPath(vgpath); } -// Determine if a co-ordinate transform is simple enough to allow -// rectangle-based clipping with vgMask(). Simple transforms most -// often result from origin translations. -static inline bool clipTransformIsSimple(const QTransform& transform) -{ - QTransform::TransformationType type = transform.type(); - if (type == QTransform::TxNone || type == QTransform::TxTranslate) - return true; - if (type == QTransform::TxRotate) { - // Check for 0, 90, 180, and 270 degree rotations. - // (0 might happen after 4 rotations of 90 degrees). - qreal m11 = transform.m11(); - qreal m12 = transform.m12(); - qreal m21 = transform.m21(); - qreal m22 = transform.m22(); - if (m11 == 0.0f && m22 == 0.0f) { - if (m12 == 1.0f && m21 == -1.0f) - return true; // 90 degrees. - else if (m12 == -1.0f && m21 == 1.0f) - return true; // 270 degrees. - } else if (m12 == 0.0f && m21 == 0.0f) { - if (m11 == -1.0f && m22 == -1.0f) - return true; // 180 degrees. - else if (m11 == 1.0f && m22 == 1.0f) - return true; // 0 degrees. - } - } - return false; -} - #if defined(QVG_SCISSOR_CLIP) void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) @@ -1607,7 +1627,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // We aren't using masking, so handle simple QRectF's only. if (path.shape() == QVectorPath::RectangleHint && - path.elementCount() == 4 && clipTransformIsSimple(d->transform)) { + path.elementCount() == 4 && d->simpleTransform) { // Clipping region that resulted from QPainter::setClipRect(QRectF). // Convert it into a QRect and apply. const qreal *points = path.points(); @@ -1757,7 +1777,7 @@ void QVGPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // We don't have vgRenderToMask(), so handle simple QRectF's only. if (path.shape() == QVectorPath::RectangleHint && - path.elementCount() == 4 && clipTransformIsSimple(d->transform)) { + path.elementCount() == 4 && d->simpleTransform) { // Clipping region that resulted from QPainter::setClipRect(QRectF). // Convert it into a QRect and apply. const qreal *points = path.points(); @@ -1809,7 +1829,7 @@ void QVGPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) d->dirty |= QPaintEngine::DirtyClipRegion; // If we have a non-simple transform, then use path-based clipping. - if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) { + if (op != Qt::NoClip && !d->simpleTransform) { QPaintEngineEx::clip(rect, op); return; } @@ -1928,7 +1948,7 @@ void QVGPaintEngine::clip(const QRegion ®ion, Qt::ClipOperation op) d->dirty |= QPaintEngine::DirtyClipRegion; // If we have a non-simple transform, then use path-based clipping. - if (op != Qt::NoClip && !clipTransformIsSimple(d->transform)) { + if (op != Qt::NoClip && !d->simpleTransform) { QPaintEngineEx::clip(region, op); return; } @@ -2505,14 +2525,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QBrush &brush) // Check to see if we can use vgClear() for faster filling. if (brush.style() == Qt::SolidPattern && brush.isOpaque() && - clipTransformIsSimple(d->transform) && d->opacity == 1.0f && + d->simpleTransform && d->opacity == 1.0f && clearRect(rect, brush.color())) { return; } #if !defined(QVG_NO_MODIFY_PATH) VGfloat coords[8]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = rect.x(); coords[1] = rect.y(); coords[2] = rect.x() + rect.width(); @@ -2547,14 +2567,14 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color) Q_D(QVGPaintEngine); // Check to see if we can use vgClear() for faster filling. - if (clipTransformIsSimple(d->transform) && d->opacity == 1.0f && color.alpha() == 255 && + if (d->simpleTransform && d->opacity == 1.0f && color.alpha() == 255 && clearRect(rect, color)) { return; } #if !defined(QVG_NO_MODIFY_PATH) VGfloat coords[8]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = rect.x(); coords[1] = rect.y(); coords[2] = rect.x() + rect.width(); @@ -2587,7 +2607,7 @@ void QVGPaintEngine::fillRect(const QRectF &rect, const QColor &color) void QVGPaintEngine::drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode) { Q_D(QVGPaintEngine); - if (d->simpleTransform) { + if (d->affineTransform) { QVGPainterState *s = state(); VGPath vgpath = d->roundedRectPath(rect, xrad, yrad, mode); d->draw(vgpath, s->pen, s->brush); @@ -2606,7 +2626,7 @@ void QVGPaintEngine::drawRects(const QRect *rects, int rectCount) QVGPainterState *s = state(); for (int i = 0; i < rectCount; ++i, ++rects) { VGfloat coords[8]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = rects->x(); coords[1] = rects->y(); coords[2] = rects->x() + rects->width(); @@ -2647,7 +2667,7 @@ void QVGPaintEngine::drawRects(const QRectF *rects, int rectCount) QVGPainterState *s = state(); for (int i = 0; i < rectCount; ++i, ++rects) { VGfloat coords[8]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = rects->x(); coords[1] = rects->y(); coords[2] = rects->x() + rects->width(); @@ -2685,7 +2705,7 @@ void QVGPaintEngine::drawLines(const QLine *lines, int lineCount) QVGPainterState *s = state(); for (int i = 0; i < lineCount; ++i, ++lines) { VGfloat coords[4]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = lines->x1(); coords[1] = lines->y1(); coords[2] = lines->x2(); @@ -2713,7 +2733,7 @@ void QVGPaintEngine::drawLines(const QLineF *lines, int lineCount) QVGPainterState *s = state(); for (int i = 0; i < lineCount; ++i, ++lines) { VGfloat coords[4]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = lines->x1(); coords[1] = lines->y1(); coords[2] = lines->x2(); @@ -2739,7 +2759,7 @@ void QVGPaintEngine::drawEllipse(const QRectF &r) // Based on the description of vguEllipse() in the OpenVG specification. // We don't use vguEllipse(), to avoid unnecessary library dependencies. Q_D(QVGPaintEngine); - if (d->simpleTransform) { + if (d->affineTransform) { QVGPainterState *s = state(); VGPath path = vgCreatePath(VG_PATH_FORMAT_STANDARD, VG_PATH_DATATYPE_F, @@ -2812,7 +2832,7 @@ void QVGPaintEngine::drawPoints(const QPointF *points, int pointCount) for (int i = 0; i < pointCount; ++i, ++points) { VGfloat coords[4]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = points->x(); coords[1] = points->y(); coords[2] = coords[0]; @@ -2846,7 +2866,7 @@ void QVGPaintEngine::drawPoints(const QPoint *points, int pointCount) for (int i = 0; i < pointCount; ++i, ++points) { VGfloat coords[4]; - if (d->simpleTransform) { + if (d->affineTransform) { coords[0] = points->x(); coords[1] = points->y(); coords[2] = coords[0]; @@ -2880,7 +2900,7 @@ void QVGPaintEngine::drawPolygon(const QPointF *points, int pointCount, PolygonD QVarLengthArray<VGfloat, 16> coords; QVarLengthArray<VGubyte, 10> segments; for (int i = 0; i < pointCount; ++i, ++points) { - if (d->simpleTransform) { + if (d->affineTransform) { coords.append(points->x()); coords.append(points->y()); } else { @@ -2927,7 +2947,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr QVarLengthArray<VGfloat, 16> coords; QVarLengthArray<VGubyte, 10> segments; for (int i = 0; i < pointCount; ++i, ++points) { - if (d->simpleTransform) { + if (d->affineTransform) { coords.append(points->x()); coords.append(points->y()); } else { @@ -2962,7 +2982,7 @@ void QVGPaintEngine::drawPolygon(const QPoint *points, int pointCount, PolygonDr void QVGPaintEnginePrivate::setImageOptions() { - if (opacity != 1.0f && simpleTransform) { + if (opacity != 1.0f && affineTransform) { if (opacity != paintOpacity) { VGfloat values[4]; values[0] = 1.0f; @@ -3009,7 +3029,10 @@ static void drawVGImage(QVGPaintEnginePrivate *d, QTransform transform(d->imageTransform); VGfloat scaleX = sr.width() == 0.0f ? 0.0f : r.width() / sr.width(); VGfloat scaleY = sr.height() == 0.0f ? 0.0f : r.height() / sr.height(); - transform.translate(r.x(), r.y()); + if (d->simpleTransform) + transform.translate(qRound(r.x()), qRound(r.y())); + else + transform.translate(r.x(), r.y()); transform.scale(scaleX, scaleY); d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform); @@ -3027,7 +3050,10 @@ static void drawVGImage(QVGPaintEnginePrivate *d, return; QTransform transform(d->imageTransform); - transform.translate(pos.x(), pos.y()); + if(d->simpleTransform) + transform.translate(qRound(pos.x()), qRound(pos.y())); + else + transform.translate(pos.x(), pos.y()); d->setTransform(VG_MATRIX_IMAGE_USER_TO_SURFACE, transform); d->setImageOptions(); @@ -3070,7 +3096,7 @@ void QVGPaintEngine::drawPixmap(const QRectF &r, const QPixmap &pm, const QRectF QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd); if (!vgpd->isValid()) return; - if (d->simpleTransform) + if (d->affineTransform) drawVGImage(d, r, vgpd->toVGImage(), vgpd->size(), sr); else drawVGImage(d, r, vgpd->toVGImage(d->opacity), vgpd->size(), sr); @@ -3089,7 +3115,7 @@ void QVGPaintEngine::drawPixmap(const QPointF &pos, const QPixmap &pm) QVGPixmapData *vgpd = static_cast<QVGPixmapData *>(pd); if (!vgpd->isValid()) return; - if (d->simpleTransform) + if (d->affineTransform) drawVGImage(d, pos, vgpd->toVGImage()); else drawVGImage(d, pos, vgpd->toVGImage(d->opacity)); @@ -3104,7 +3130,7 @@ void QVGPaintEngine::drawImage { Q_D(QVGPaintEngine); VGImage vgImg; - if (d->simpleTransform || d->opacity == 1.0f) + if (d->affineTransform || d->opacity == 1.0f) vgImg = toVGImageSubRect(image, sr.toRect(), flags); else vgImg = toVGImageWithOpacitySubRect(image, d->opacity, sr.toRect()); @@ -3127,7 +3153,7 @@ void QVGPaintEngine::drawImage(const QPointF &pos, const QImage &image) { Q_D(QVGPaintEngine); VGImage vgImg; - if (d->simpleTransform || d->opacity == 1.0f) + if (d->affineTransform || d->opacity == 1.0f) vgImg = toVGImage(image); else vgImg = toVGImageWithOpacity(image, d->opacity); @@ -3160,7 +3186,7 @@ void QVGPaintEngine::drawPixmapFragments(const QPainter::PixmapFragment *drawing QPixmapData *pd = pixmap.pixmapData(); if (!pd) return; // null QPixmap - if (pd->classId() != QPixmapData::OpenVGClass || !d->simpleTransform) { + if (pd->classId() != QPixmapData::OpenVGClass || !d->affineTransform) { QPaintEngineEx::drawPixmapFragments(drawingData, dataCount, pixmap, hints); return; } @@ -3385,7 +3411,7 @@ void QVGPaintEngine::drawTextItem(const QPointF &p, const QTextItem &textItem) // If we are not using a simple transform, then fall back // to the default Qt path stroking algorithm. - if (!d->simpleTransform) { + if (!d->affineTransform) { QPaintEngineEx::drawTextItem(p, textItem); return; } diff --git a/src/openvg/qvg_symbian.cpp b/src/openvg/qvg_symbian.cpp index 0d2425f..e97ade8 100644 --- a/src/openvg/qvg_symbian.cpp +++ b/src/openvg/qvg_symbian.cpp @@ -113,25 +113,8 @@ static VGImage sgImageToVGImage(QEglContext *context, const RSgImage &sgImage) VGImage vgImage = VG_INVALID_HANDLE; - TInt err = 0; - - RSgDriver driver; - err = driver.Open(); - if (err != KErrNone) { - return vgImage; - } - - if (sgImage.IsNull()) { - driver.Close(); - return vgImage; - } - - TSgImageInfo sgImageInfo; - err = sgImage.GetInfo(sgImageInfo); - if (err != KErrNone) { - driver.Close(); + if (sgImage.IsNull()) return vgImage; - } const EGLint KEglImageAttribs[] = {EGL_IMAGE_PRESERVED_SYMBIAN, EGL_TRUE, EGL_NONE}; EGLImageKHR eglImage = QEgl::eglCreateImageKHR(QEgl::display(), @@ -140,22 +123,12 @@ static VGImage sgImageToVGImage(QEglContext *context, const RSgImage &sgImage) (EGLClientBuffer)&sgImage, (EGLint*)KEglImageAttribs); - if (!eglImage || eglGetError() != EGL_SUCCESS) { - driver.Close(); + if (!eglImage) return vgImage; - } vgImage = QVG::vgCreateEGLImageTargetKHR(eglImage); - if (!vgImage || vgGetError() != VG_NO_ERROR) { - QEgl::eglDestroyImageKHR(QEgl::display(), eglImage); - driver.Close(); - return vgImage; - } - //setSerialNumber(++qt_vg_pixmap_serial); - // release stuff QEgl::eglDestroyImageKHR(QEgl::display(), eglImage); - driver.Close(); return vgImage; } #endif diff --git a/src/openvg/qvgimagepool.cpp b/src/openvg/qvgimagepool.cpp index 78277aa..0c236ea 100644 --- a/src/openvg/qvgimagepool.cpp +++ b/src/openvg/qvgimagepool.cpp @@ -154,16 +154,23 @@ bool QVGImagePool::reclaimSpace(VGImageFormat format, Q_UNUSED(width); Q_UNUSED(height); - if (data) + bool succeeded = false; + bool wasInLRU = false; + if (data) { + wasInLRU = data->inLRU; moveToHeadOfLRU(data); + } QVGPixmapData *lrudata = pixmapLRU(); if (lrudata && lrudata != data) { lrudata->reclaimImages(); - return true; + succeeded = true; } - return false; + if (data && !wasInLRU) + removeFromLRU(data); + + return succeeded; } void QVGImagePool::hibernate() diff --git a/src/plugins/bearer/bearer.pro b/src/plugins/bearer/bearer.pro index bbe8ab1..d1d75f0 100644 --- a/src/plugins/bearer/bearer.pro +++ b/src/plugins/bearer/bearer.pro @@ -3,9 +3,9 @@ TEMPLATE = subdirs contains(QT_CONFIG, dbus) { contains(QT_CONFIG, icd) { SUBDIRS += icd - } else { + } else:linux* { SUBDIRS += generic - linux*:SUBDIRS += connman networkmanager + SUBDIRS += connman networkmanager } } @@ -16,4 +16,4 @@ macx:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan macx:SUBDIRS += generic symbian:SUBDIRS += symbian -isEmpty(SUBDIRS):SUBDIRS += generic +isEmpty(SUBDIRS):SUBDIRS = generic diff --git a/src/plugins/bearer/connman/qofonoservice_linux_p.h b/src/plugins/bearer/connman/qofonoservice_linux_p.h index 4892666..0ac1e4a 100644 --- a/src/plugins/bearer/connman/qofonoservice_linux_p.h +++ b/src/plugins/bearer/connman/qofonoservice_linux_p.h @@ -329,4 +329,6 @@ Q_SIGNALS: void incomingMessage(const QString &message, const QVariantMap &info); }; +QT_END_NAMESPACE + #endif //QOFONOSERVICE_H diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 29445ce..554f9b7 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -97,6 +97,10 @@ QNetworkManagerEngine::QNetworkManagerEngine(QObject *parent) QNetworkManagerEngine::~QNetworkManagerEngine() { + qDeleteAll(connections); + qDeleteAll(accessPoints); + qDeleteAll(wirelessDevices); + qDeleteAll(activeConnections); } void QNetworkManagerEngine::initialize() @@ -389,7 +393,7 @@ void QNetworkManagerEngine::deviceRemoved(const QDBusObjectPath &path) { QMutexLocker locker(&mutex); - delete wirelessDevices.value(path.path()); + delete wirelessDevices.take(path.path()); } void QNetworkManagerEngine::newConnection(const QDBusObjectPath &path, @@ -455,6 +459,8 @@ void QNetworkManagerEngine::removeConnection(const QString &path) QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(id); + connection->deleteLater(); + locker.unlock(); emit configurationRemoved(ptr); } @@ -631,7 +637,8 @@ void QNetworkManagerEngine::removeAccessPoint(const QString &path, locker.unlock(); emit configurationChanged(ptr); - return; + locker.relock(); + break; } } } else { diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp index f47c97c..499fe5a 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerservice.cpp @@ -743,8 +743,6 @@ bool QNetworkManagerSettingsConnection::isAutoConnect() quint64 QNetworkManagerSettingsConnection::getTimestamp() { - qDebug() << d->settingsMap.value(QLatin1String("connection")); - return d->settingsMap.value(QLatin1String("connection")) .value(QLatin1String("timestamp")).toUInt(); } diff --git a/src/plugins/bearer/symbian/3_2/3_2.pro b/src/plugins/bearer/symbian/3_2/3_2.pro index 6f3ecaf..ac3b3f8 100644 --- a/src/plugins/bearer/symbian/3_2/3_2.pro +++ b/src/plugins/bearer/symbian/3_2/3_2.pro @@ -1,13 +1,15 @@ include(../symbian.pri) symbian { - exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + contains(S60_VERSION, 3.1) { + is_using_gnupoc { + LIBS += -lapengine + } else { + LIBS += -lAPEngine + } + } else { DEFINES += SNAP_FUNCTIONALITY_AVAILABLE LIBS += -lcmmanager - } else { - # Fall back to 3_1 implementation on platforms that do not have cmmanager - LIBS += -lapengine } } diff --git a/src/plugins/bearer/symbian/symbian.pri b/src/plugins/bearer/symbian/symbian.pri index 9b3f50c..e874945 100644 --- a/src/plugins/bearer/symbian/symbian.pri +++ b/src/plugins/bearer/symbian/symbian.pri @@ -22,11 +22,9 @@ LIBS += -lcommdb \ -lnetmeta is_using_gnupoc { - LIBS += -lconnmon \ - -lapsettingshandlerui + LIBS += -lconnmon } else { - LIBS += -lConnMon \ - -lApSettingsHandlerUI + LIBS += -lConnMon } QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/bearer diff --git a/src/plugins/bearer/symbian/symbian.pro b/src/plugins/bearer/symbian/symbian.pro index f320eb6..91f8217 100644 --- a/src/plugins/bearer/symbian/symbian.pro +++ b/src/plugins/bearer/symbian/symbian.pro @@ -1,3 +1,8 @@ TEMPLATE = subdirs -SUBDIRS += 3_1 3_2 symbian_3
\ No newline at end of file +contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + SUBDIRS += 3_1 3_2 +} + +# Symbian3 builds the default plugin for winscw so it is always needed +SUBDIRS += symbian_3
\ No newline at end of file diff --git a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro index fd66198..ef90ad2 100644 --- a/src/plugins/bearer/symbian/symbian_3/symbian_3.pro +++ b/src/plugins/bearer/symbian/symbian_3/symbian_3.pro @@ -1,22 +1,20 @@ include(../symbian.pri) symbian { - exists($${EPOCROOT}epoc32/release/winscw/udeb/cmmanager.lib)| \ - exists($${EPOCROOT}epoc32/release/armv5/lib/cmmanager.lib) { + contains(S60_VERSION, 3.1) { + is_using_gnupoc { + LIBS += -lapengine + } else { + LIBS += -lAPEngine + } + } else { DEFINES += SNAP_FUNCTIONALITY_AVAILABLE LIBS += -lcmmanager - exists($$prependEpocroot($$MW_LAYER_PUBLIC_EXPORT_PATH(extendedconnpref.h))) { + !contains(S60_VERSION, 3.2):!contains(S60_VERSION, 5.0) { DEFINES += OCC_FUNCTIONALITY_AVAILABLE LIBS += -lextendedconnpref } - } else { - # Fall back to 3_1 implementation on platforms that do not have cmmanager - is_using_gnupoc { - LIBS += -lapengine - } else { - LIBS += -lAPEngine - } } } diff --git a/src/plugins/gfxdrivers/directfb/directfb.pro b/src/plugins/gfxdrivers/directfb/directfb.pro index 0706f01..d397050 100644 --- a/src/plugins/gfxdrivers/directfb/directfb.pro +++ b/src/plugins/gfxdrivers/directfb/directfb.pro @@ -11,5 +11,5 @@ SOURCES += qdirectfbscreenplugin.cpp QMAKE_CXXFLAGS += $$QT_CFLAGS_DIRECTFB LIBS += $$QT_LIBS_DIRECTFB -DEFINES += $$QT_DEFINES_DIRECTFB QT_DIRECTFB_PLUGIN +DEFINES += $$QT_DEFINES_DIRECTFB contains(gfx-plugins, directfb):DEFINES += QT_QWS_DIRECTFB diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp index d5f0d42..4869eba 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpaintengine.cpp @@ -978,7 +978,7 @@ void QDirectFBPaintEnginePrivate::setCompositionMode(QPainter::CompositionMode m break; case QPainter::CompositionMode_SourceOver: compositionModeStatus &= ~PorterDuff_AlwaysBlend; - surface->SetPorterDuff(surface, DSPD_SRC_OVER); + surface->SetPorterDuff(surface, DSPD_NONE); break; case QPainter::CompositionMode_DestinationOver: surface->SetPorterDuff(surface, DSPD_DST_OVER); diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp index f704432..c0d96d7 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbpixmap.cpp @@ -585,7 +585,6 @@ void QDirectFBPixmapData::invalidate() imageFormat = QImage::Format_Invalid; } -#ifndef QT_DIRECTFB_PLUGIN Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pixmap) { const QPixmapData *data = pixmap.pixmapData(); @@ -594,7 +593,6 @@ Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_pixmap(const QPixmap &pix const QDirectFBPixmapData *dfbData = static_cast<const QDirectFBPixmapData*>(data); return dfbData->directFBSurface(); } -#endif QT_END_NAMESPACE diff --git a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp index cffd4e3..bf6164d 100644 --- a/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp +++ b/src/plugins/gfxdrivers/directfb/qdirectfbscreen.cpp @@ -1790,7 +1790,6 @@ IDirectFBSurface *QDirectFBScreen::subSurfaceForWidget(const QWidget *widget, co } #endif -#ifndef QT_DIRECTFB_PLUGIN Q_GUI_EXPORT IDirectFBSurface *qt_directfb_surface_for_widget(const QWidget *widget, QRect *rect) { return QDirectFBScreen::instance() ? QDirectFBScreen::instance()->surfaceForWidget(widget, rect) : 0; @@ -1808,7 +1807,6 @@ Q_GUI_EXPORT IDirectFBWindow *qt_directfb_window_for_widget(const QWidget *widge } #endif -#endif QT_END_NAMESPACE diff --git a/src/plugins/graphicssystems/graphicssystems.pro b/src/plugins/graphicssystems/graphicssystems.pro index 7a8f4d6..5c99291 100644 --- a/src/plugins/graphicssystems/graphicssystems.pro +++ b/src/plugins/graphicssystems/graphicssystems.pro @@ -9,3 +9,7 @@ contains(QT_CONFIG, shivavg) { # Only works under X11 at present !win32:!embedded:!mac:SUBDIRS += shivavg } + +!win32:!embedded:!mac:!symbian:CONFIG += x11 + +x11:contains(QT_CONFIG, opengles2):contains(QT_CONFIG, egl):SUBDIRS += meego diff --git a/src/plugins/graphicssystems/meego/meego.pro b/src/plugins/graphicssystems/meego/meego.pro new file mode 100644 index 0000000..d750d34 --- /dev/null +++ b/src/plugins/graphicssystems/meego/meego.pro @@ -0,0 +1,13 @@ +TARGET = qmeegographicssystem +include(../../qpluginbase.pri) + +QT += gui opengl + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/graphicssystems + +HEADERS = qmeegographicssystem.h qmeegopixmapdata.h qmeegoextensions.h +SOURCES = qmeegographicssystem.cpp qmeegographicssystem.h qmeegographicssystemplugin.h qmeegographicssystemplugin.cpp qmeegopixmapdata.h qmeegopixmapdata.cpp qmeegoextensions.h qmeegoextensions.cpp + +target.path += $$[QT_INSTALL_PLUGINS]/graphicssystems +INSTALLS += target + diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.cpp b/src/plugins/graphicssystems/meego/qmeegoextensions.cpp new file mode 100644 index 0000000..e7f6439 --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegoextensions.cpp @@ -0,0 +1,129 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmeegoextensions.h" +#include <private/qeglcontext_p.h> +#include <private/qpixmapdata_gl_p.h> + +bool QMeeGoExtensions::initialized = false; +bool QMeeGoExtensions::hasImageShared = false; +bool QMeeGoExtensions::hasSurfaceScaling = false; + +/* Extension funcs */ + +typedef EGLBoolean (EGLAPIENTRY *eglQueryImageNOKFunc)(EGLDisplay, EGLImageKHR, EGLint, EGLint*); +typedef EGLNativeSharedImageTypeNOK (EGLAPIENTRY *eglCreateSharedImageNOKFunc)(EGLDisplay, EGLImageKHR, EGLint*); +typedef EGLBoolean (EGLAPIENTRY *eglDestroySharedImageNOKFunc)(EGLDisplay, EGLNativeSharedImageTypeNOK); +typedef EGLBoolean (EGLAPIENTRY *eglSetSurfaceScalingNOKFunc)(EGLDisplay, EGLSurface, EGLint, EGLint, EGLint, EGLint); + +static eglQueryImageNOKFunc _eglQueryImageNOK = 0; +static eglCreateSharedImageNOKFunc _eglCreateSharedImageNOK = 0; +static eglDestroySharedImageNOKFunc _eglDestroySharedImageNOK = 0; +static eglSetSurfaceScalingNOKFunc _eglSetSurfaceScalingNOK = 0; + +/* Public */ + +void QMeeGoExtensions::ensureInitialized() +{ + if (!initialized) + initialize(); + + initialized = true; +} + +EGLNativeSharedImageTypeNOK QMeeGoExtensions::eglCreateSharedImageNOK(EGLDisplay dpy, EGLImageKHR image, EGLint *props) +{ + if (! hasImageShared) + qFatal("EGL_NOK_image_shared not found but trying to use capability!"); + + return _eglCreateSharedImageNOK(dpy, image, props); +} + +bool QMeeGoExtensions::eglQueryImageNOK(EGLDisplay dpy, EGLImageKHR image, EGLint prop, EGLint *v) +{ + if (! hasImageShared) + qFatal("EGL_NOK_image_shared not found but trying to use capability!"); + + return _eglQueryImageNOK(dpy, image, prop, v); +} + +bool QMeeGoExtensions::eglDestroySharedImageNOK(EGLDisplay dpy, EGLNativeSharedImageTypeNOK img) +{ + if (! hasImageShared) + qFatal("EGL_NOK_image_shared not found but trying to use capability!"); + + return _eglDestroySharedImageNOK(dpy, img); +} + +bool QMeeGoExtensions::eglSetSurfaceScalingNOK(EGLDisplay dpy, EGLSurface surface, int x, int y, int width, int height) +{ + if (! hasSurfaceScaling) + qFatal("EGL_NOK_surface_scaling not found but trying to use capability!"); + + return _eglSetSurfaceScalingNOK(dpy, surface, x, y, width, height); +} + +/* Private */ + +void QMeeGoExtensions::initialize() +{ + QGLContext *ctx = (QGLContext *) QGLContext::currentContext(); + qt_resolve_eglimage_gl_extensions(ctx); + + if (QEgl::hasExtension("EGL_NOK_image_shared")) { + qDebug("MeegoGraphics: found EGL_NOK_image_shared"); + _eglQueryImageNOK = (eglQueryImageNOKFunc) eglGetProcAddress("eglQueryImageNOK"); + _eglCreateSharedImageNOK = (eglCreateSharedImageNOKFunc) eglGetProcAddress("eglCreateSharedImageNOK"); + _eglDestroySharedImageNOK = (eglDestroySharedImageNOKFunc) eglGetProcAddress("eglDestroySharedImageNOK"); + + Q_ASSERT(_eglQueryImageNOK && _eglCreateSharedImageNOK && _eglDestroySharedImageNOK); + hasImageShared = true; + } + + if (QEgl::hasExtension("EGL_NOK_surface_scaling")) { + qDebug("MeegoGraphics: found EGL_NOK_surface_scaling"); + _eglSetSurfaceScalingNOK = (eglSetSurfaceScalingNOKFunc) eglGetProcAddress("eglSetSurfaceScalingNOK"); + + Q_ASSERT(_eglSetSurfaceScalingNOK); + hasSurfaceScaling = true; + } +} + diff --git a/src/plugins/graphicssystems/meego/qmeegoextensions.h b/src/plugins/graphicssystems/meego/qmeegoextensions.h new file mode 100644 index 0000000..ee20bd8 --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegoextensions.h @@ -0,0 +1,88 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MEXTENSIONS_H +#define MEXTENSIONS_H + +#include <private/qgl_p.h> +#include <private/qeglcontext_p.h> +#include <private/qpixmapdata_gl_p.h> +#include <EGL/egl.h> +#include <GLES2/gl2.h> +#include <GLES2/gl2ext.h> + +/* Extensions decls */ + +#ifndef EGL_SHARED_IMAGE_NOK +#define EGL_SHARED_IMAGE_NOK 0x30DA +typedef void* EGLNativeSharedImageTypeNOK; +#endif + +#ifndef EGL_GL_TEXTURE_2D_KHR +#define EGL_GL_TEXTURE_2D_KHR 0x30B1 +#endif + +#ifndef EGL_FIXED_WIDTH_NOK +#define EGL_FIXED_WIDTH_NOK 0x30DB +#define EGL_FIXED_HEIGHT_NOK 0x30DC +#endif + +/* Class */ + +class QMeeGoExtensions +{ +public: + static void ensureInitialized(); + + static EGLNativeSharedImageTypeNOK eglCreateSharedImageNOK(EGLDisplay dpy, EGLImageKHR image, EGLint *props); + static bool eglQueryImageNOK(EGLDisplay dpy, EGLImageKHR image, EGLint prop, EGLint *v); + static bool eglDestroySharedImageNOK(EGLDisplay dpy, EGLNativeSharedImageTypeNOK img); + static bool eglSetSurfaceScalingNOK(EGLDisplay dpy, EGLSurface surface, int x, int y, int width, int height); + +private: + static void initialize(); + + static bool initialized; + static bool hasImageShared; + static bool hasSurfaceScaling; +}; + +#endif diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp new file mode 100644 index 0000000..2a64d49 --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -0,0 +1,247 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QDebug> +#include <private/qpixmap_raster_p.h> +#include <private/qwindowsurface_gl_p.h> +#include <private/qegl_p.h> +#include <private/qglextensions_p.h> +#include <private/qgl_p.h> +#include <private/qimagepixmapcleanuphooks_p.h> +#include <private/qapplication_p.h> +#include <private/qgraphicssystem_runtime_p.h> +#include <private/qimage_p.h> +#include <private/qeglproperties_p.h> +#include <private/qeglcontext_p.h> + +#include "qmeegopixmapdata.h" +#include "qmeegographicssystem.h" +#include "qmeegoextensions.h" + +bool QMeeGoGraphicsSystem::surfaceWasCreated = false; + +QMeeGoGraphicsSystem::QMeeGoGraphicsSystem() +{ + qDebug("Using the meego graphics system"); +} + +QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() +{ + qDebug("Meego graphics system destroyed"); + qt_destroy_gl_share_widget(); +} + +QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const +{ + QMeeGoGraphicsSystem::surfaceWasCreated = true; + QWindowSurface *surface = new QGLWindowSurface(widget); + return surface; +} + +QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const +{ + // Long story short: without this it's possible to hit an + // unitialized paintDevice due to a Qt bug too complex to even + // explain here... not to mention fix without going crazy. + // MDK + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + + return new QRasterPixmapData(type); +} + +QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData *origin) +{ + // If the pixmap is a raster type... + // and if the pixmap pointer matches our mapping... + // create a shared image instead with the given handle. + + if (origin->classId() == QPixmapData::RasterClass) { + QRasterPixmapData *rasterClass = static_cast <QRasterPixmapData *> (origin); + void *rawResource = static_cast <void *> (rasterClass->buffer()->data_ptr()->data); + + if (QMeeGoPixmapData::sharedImagesMap.contains(rawResource)) + return new QMeeGoPixmapData(); + } + + return new QRasterPixmapData(origin->pixelType()); +} + +QPixmapData* QMeeGoGraphicsSystem::wrapPixmapData(QPixmapData *pmd) +{ + QString name = QApplicationPrivate::instance()->graphics_system_name; + if (name == "runtime") { + QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system; + QRuntimePixmapData *rt = new QRuntimePixmapData(rsystem, pmd->pixelType());; + rt->m_data = pmd; + rt->readBackInfo(); + rsystem->m_pixmapDatas << rt; + return rt; + } else + return pmd; +} + +void QMeeGoGraphicsSystem::setSurfaceFixedSize(int /*width*/, int /*height*/) +{ + if (QMeeGoGraphicsSystem::surfaceWasCreated) + qWarning("Trying to set surface fixed size but surface already created!"); + +#ifdef QT_WAS_PATCHED + QEglProperties *properties = new QEglProperties(); + properties->setValue(EGL_FIXED_WIDTH_NOK, width); + properties->setValue(EGL_FIXED_HEIGHT_NOK, height); + QGLContextPrivate::setExtraWindowSurfaceCreationProps(properties); +#endif +} + +void QMeeGoGraphicsSystem::setSurfaceScaling(int x, int y, int width, int height) +{ + QMeeGoExtensions::ensureInitialized(); + QMeeGoExtensions::eglSetSurfaceScalingNOK(QEgl::display(), QEglContext::currentContext(QEgl::OpenGL)->currentSurface, x, y, width, height); +} + +void QMeeGoGraphicsSystem::setTranslucent(bool translucent) +{ + QGLWindowSurface::surfaceFormat.setSampleBuffers(false); + QGLWindowSurface::surfaceFormat.setSamples(0); + QGLWindowSurface::surfaceFormat.setAlpha(translucent); +} + +QPixmapData *QMeeGoGraphicsSystem::pixmapDataFromEGLSharedImage(Qt::HANDLE handle, const QImage &softImage) +{ + if (softImage.format() != QImage::Format_ARGB32_Premultiplied && + softImage.format() != QImage::Format_ARGB32) { + qFatal("For egl shared images, the soft image has to be ARGB32 or ARGB32_Premultiplied"); + return NULL; + } + + if (QMeeGoGraphicsSystem::meeGoRunning()) { + QMeeGoPixmapData *pmd = new QMeeGoPixmapData; + pmd->fromEGLSharedImage(handle, softImage); + return QMeeGoGraphicsSystem::wrapPixmapData(pmd); + } else { + QRasterPixmapData *pmd = new QRasterPixmapData(QPixmapData::PixmapType); + pmd->fromImage(softImage, Qt::NoOpaqueDetection); + + // Make sure that the image was not converted in any way + if (pmd->buffer()->data_ptr()->data != + const_cast<QImage &>(softImage).data_ptr()->data) + qFatal("Iternal misalignment of raster data detected. Prolly a QImage copy fail."); + + QMeeGoPixmapData::registerSharedImage(handle, softImage); + return QMeeGoGraphicsSystem::wrapPixmapData(pmd); + } +} + +void QMeeGoGraphicsSystem::updateEGLSharedImagePixmap(QPixmap *pixmap) +{ + QMeeGoPixmapData *pmd = (QMeeGoPixmapData *) pixmap->pixmapData(); + + // Basic sanity check to make sure this is really a QMeeGoPixmapData... + if (pmd->classId() != QPixmapData::OpenGLClass) + qFatal("Trying to updated EGLSharedImage pixmap but it's not really a shared image pixmap!"); + + pmd->updateFromSoftImage(); +} + +QPixmapData *QMeeGoGraphicsSystem::pixmapDataWithGLTexture(int w, int h) +{ + QGLPixmapData *pmd = new QGLPixmapData(QPixmapData::PixmapType); + pmd->resize(w, h); + return QMeeGoGraphicsSystem::wrapPixmapData(pmd); +} + +bool QMeeGoGraphicsSystem::meeGoRunning() +{ + if (! QApplicationPrivate::instance()) { + qWarning("Application not running just yet... hard to know what system running!"); + return false; + } + + QString name = QApplicationPrivate::instance()->graphics_system_name; + if (name == "runtime") { + QRuntimeGraphicsSystem *rsystem = (QRuntimeGraphicsSystem *) QApplicationPrivate::instance()->graphics_system; + name = rsystem->graphicsSystemName(); + } + + return (name == "meego"); +} + +/* C API */ + +int qt_meego_image_to_egl_shared_image(const QImage &image) +{ + return QMeeGoPixmapData::imageToEGLSharedImage(image); +} + +QPixmapData* qt_meego_pixmapdata_from_egl_shared_image(Qt::HANDLE handle, const QImage &softImage) +{ + return QMeeGoGraphicsSystem::pixmapDataFromEGLSharedImage(handle, softImage); +} + +QPixmapData* qt_meego_pixmapdata_with_gl_texture(int w, int h) +{ + return QMeeGoGraphicsSystem::pixmapDataWithGLTexture(w, h); +} + +bool qt_meego_destroy_egl_shared_image(Qt::HANDLE handle) +{ + return QMeeGoPixmapData::destroyEGLSharedImage(handle); +} + +void qt_meego_set_surface_fixed_size(int width, int height) +{ + QMeeGoGraphicsSystem::setSurfaceFixedSize(width, height); +} + +void qt_meego_set_surface_scaling(int x, int y, int width, int height) +{ + QMeeGoGraphicsSystem::setSurfaceScaling(x, y, width, height); +} + +void qt_meego_set_translucent(bool translucent) +{ + QMeeGoGraphicsSystem::setTranslucent(translucent); +} + +void qt_meego_update_egl_shared_image_pixmap(QPixmap *pixmap) +{ + QMeeGoGraphicsSystem::updateEGLSharedImagePixmap(pixmap); +} diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.h b/src/plugins/graphicssystems/meego/qmeegographicssystem.h new file mode 100644 index 0000000..905f0c3 --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.h @@ -0,0 +1,85 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MGRAPHICSSYSTEM_H +#define MGRAPHICSSYSTEM_H + +#include <private/qgraphicssystem_p.h> + +class QMeeGoGraphicsSystem : public QGraphicsSystem +{ +public: + QMeeGoGraphicsSystem(); + ~QMeeGoGraphicsSystem(); + + virtual QWindowSurface *createWindowSurface(QWidget *widget) const; + virtual QPixmapData *createPixmapData(QPixmapData::PixelType) const; + virtual QPixmapData *createPixmapData(QPixmapData *origin); + + static QPixmapData *wrapPixmapData(QPixmapData *pmd); + static void setSurfaceFixedSize(int width, int height); + static void setSurfaceScaling(int x, int y, int width, int height); + static void setTranslucent(bool translucent); + + static QPixmapData *pixmapDataFromEGLSharedImage(Qt::HANDLE handle, const QImage &softImage); + static QPixmapData *pixmapDataWithGLTexture(int w, int h); + static void updateEGLSharedImagePixmap(QPixmap *pixmap); + +private: + static bool meeGoRunning(); + + static bool surfaceWasCreated; +}; + +/* C api */ + +extern "C" { + Q_DECL_EXPORT int qt_meego_image_to_egl_shared_image(const QImage &image); + Q_DECL_EXPORT QPixmapData* qt_meego_pixmapdata_from_egl_shared_image(Qt::HANDLE handle, const QImage &softImage); + Q_DECL_EXPORT QPixmapData* qt_meego_pixmapdata_with_gl_texture(int w, int h); + Q_DECL_EXPORT void qt_meego_update_egl_shared_image_pixmap(QPixmap *pixmap); + Q_DECL_EXPORT bool qt_meego_destroy_egl_shared_image(Qt::HANDLE handle); + Q_DECL_EXPORT void qt_meego_set_surface_fixed_size(int width, int height); + Q_DECL_EXPORT void qt_meego_set_surface_scaling(int x, int y, int width, int height); + Q_DECL_EXPORT void qt_meego_set_translucent(bool translucent); +} + +#endif diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.cpp new file mode 100644 index 0000000..7c142eb --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.cpp @@ -0,0 +1,58 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include <QDebug> +#include "qmeegographicssystemplugin.h" +#include "qmeegographicssystem.h" + +QStringList QMeeGoGraphicsSystemPlugin::keys() const +{ + QStringList list; + list << "meego"; + return list; +} + +QGraphicsSystem *QMeeGoGraphicsSystemPlugin::create(const QString&) +{ + return new QMeeGoGraphicsSystem; +} + +Q_EXPORT_PLUGIN2(meego, QMeeGoGraphicsSystemPlugin) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.h b/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.h new file mode 100644 index 0000000..336458f --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegographicssystemplugin.h @@ -0,0 +1,54 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MGRAPHICSSYSTEMPLUGIN_H +#define MGRAPHICSSYSTEMPLUGIN_H + +#include <private/qgraphicssystemplugin_p.h> + +class QMeeGoGraphicsSystemPlugin : public QGraphicsSystemPlugin +{ +public: + virtual QStringList keys() const; + virtual QGraphicsSystem *create(const QString&); +}; + +#endif diff --git a/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp new file mode 100644 index 0000000..33611dc --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegopixmapdata.cpp @@ -0,0 +1,206 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#include "qmeegopixmapdata.h" +#include "qmeegoextensions.h" +#include <private/qimage_p.h> +#include <private/qwindowsurface_gl_p.h> +#include <private/qeglcontext_p.h> +#include <private/qapplication_p.h> +#include <private/qgraphicssystem_runtime_p.h> + +static EGLint preserved_image_attribs[] = { EGL_IMAGE_PRESERVED_KHR, EGL_TRUE, EGL_NONE }; + +QHash <void*, QMeeGoImageInfo*> QMeeGoPixmapData::sharedImagesMap; + +/* Public */ + +QMeeGoPixmapData::QMeeGoPixmapData() : QGLPixmapData(QPixmapData::PixmapType) +{ +} + +void QMeeGoPixmapData::fromTexture(GLuint textureId, int w, int h, bool alpha) +{ + resize(w, h); + texture()->id = textureId; + m_hasAlpha = alpha; + softImage = QImage(); +} + +QImage QMeeGoPixmapData::toImage() const +{ + return softImage; +} + +void QMeeGoPixmapData::fromImage(const QImage &image, + Qt::ImageConversionFlags flags) +{ + void *rawResource = static_cast <void *> (((QImage &) image).data_ptr()->data); + + if (sharedImagesMap.contains(rawResource)) { + QMeeGoImageInfo *info = sharedImagesMap.value(rawResource); + fromEGLSharedImage(info->handle, image); + } else { + // This should *never* happen since the graphics system should never + // create a QMeeGoPixmapData for an origin that doesn't contain a raster + // image we know about. But... + qWarning("QMeeGoPixmapData::fromImage called on non-know resource. Falling back..."); + QGLPixmapData::fromImage(image, flags); + } +} + +void QMeeGoPixmapData::fromEGLSharedImage(Qt::HANDLE handle, const QImage &si) +{ + if (si.isNull()) + qFatal("Trying to build pixmap with an empty/null softimage!"); + + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + + QMeeGoExtensions::ensureInitialized(); + + bool textureIsBound = false; + GLuint newTextureId; + GLint newWidth, newHeight; + + glGenTextures(1, &newTextureId); + glBindTexture(GL_TEXTURE_2D, newTextureId); + + glFinish(); + EGLImageKHR image = QEgl::eglCreateImageKHR(QEgl::display(), EGL_NO_CONTEXT, EGL_SHARED_IMAGE_NOK, + (EGLClientBuffer)handle, preserved_image_attribs); + + if (image != EGL_NO_IMAGE_KHR) { + glFinish(); + glEGLImageTargetTexture2DOES(GL_TEXTURE_2D, image); + GLint err = glGetError(); + if (err == GL_NO_ERROR) + textureIsBound = true; + + QMeeGoExtensions::eglQueryImageNOK(QEgl::display(), image, EGL_WIDTH, &newWidth); + QMeeGoExtensions::eglQueryImageNOK(QEgl::display(), image, EGL_HEIGHT, &newHeight); + + QEgl::eglDestroyImageKHR(QEgl::display(), image); + glFinish(); + } + + if (textureIsBound) { + // FIXME Remove this ugly hasAlphaChannel check when Qt lands the NoOpaqueCheck flag fix + // for QGLPixmapData. + fromTexture(newTextureId, newWidth, newHeight, + (si.hasAlphaChannel() && const_cast<QImage &>(si).data_ptr()->checkForAlphaPixels())); + softImage = si; + QMeeGoPixmapData::registerSharedImage(handle, softImage); + } else { + qWarning("Failed to create a texture from a shared image!"); + glDeleteTextures(1, &newTextureId); + } +} + +Qt::HANDLE QMeeGoPixmapData::imageToEGLSharedImage(const QImage &image) +{ + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + + QMeeGoExtensions::ensureInitialized(); + + glFinish(); + QGLPixmapData pixmapData(QPixmapData::PixmapType); + pixmapData.fromImage(image, 0); + GLuint textureId = pixmapData.bind(); + + glFinish(); + EGLImageKHR eglimage = QEgl::eglCreateImageKHR(QEgl::display(), QEglContext::currentContext(QEgl::OpenGL)->context(), + EGL_GL_TEXTURE_2D_KHR, + (EGLClientBuffer) textureId, + preserved_image_attribs); + glFinish(); + + if (eglimage) { + EGLNativeSharedImageTypeNOK handle = QMeeGoExtensions::eglCreateSharedImageNOK(QEgl::display(), eglimage, NULL); + QEgl::eglDestroyImageKHR(QEgl::display(), eglimage); + glFinish(); + return (Qt::HANDLE) handle; + } else { + qWarning("Failed to create shared image from pixmap/texture!"); + return 0; + } +} + +void QMeeGoPixmapData::updateFromSoftImage() +{ + m_dirty = true; + m_source = softImage; + ensureCreated(); + + if (softImage.width() != w || softImage.height() != h) + qWarning("Ooops, looks like softImage changed dimensions since last updated! Corruption ahead?!"); +} + +bool QMeeGoPixmapData::destroyEGLSharedImage(Qt::HANDLE h) +{ + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QMeeGoExtensions::ensureInitialized(); + + QMutableHashIterator <void*, QMeeGoImageInfo*> i(sharedImagesMap); + while (i.hasNext()) { + i.next(); + if (i.value()->handle == h) + i.remove(); + } + + return QMeeGoExtensions::eglDestroySharedImageNOK(QEgl::display(), (EGLNativeSharedImageTypeNOK) h); +} + +void QMeeGoPixmapData::registerSharedImage(Qt::HANDLE handle, const QImage &si) +{ + void *raw = static_cast <void *> (((QImage) si).data_ptr()->data); + QMeeGoImageInfo *info; + + if (! sharedImagesMap.contains(raw)) { + info = new QMeeGoImageInfo; + info->handle = handle; + info->rawFormat = si.format(); + sharedImagesMap.insert(raw, info); + } else { + info = sharedImagesMap.value(raw); + if (info->handle != handle || info->rawFormat != si.format()) + qWarning("Inconsistency detected: overwriting entry in sharedImagesMap but handle/format different"); + } +} diff --git a/src/plugins/graphicssystems/meego/qmeegopixmapdata.h b/src/plugins/graphicssystems/meego/qmeegopixmapdata.h new file mode 100644 index 0000000..8af33bd --- /dev/null +++ b/src/plugins/graphicssystems/meego/qmeegopixmapdata.h @@ -0,0 +1,73 @@ +/**************************************************************************** +** +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the plugins of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:LGPL$ +** No Commercial Usage +** This file contains pre-release code and may not be distributed. +** You may use this file in accordance with the terms and conditions +** contained in the Technology Preview License Agreement accompanying +** this package. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Nokia gives you certain additional +** rights. These rights are described in the Nokia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +** If you have questions regarding the use of this file, please contact +** Nokia at qt-info@nokia.com. +** +** +** +** +** +** +** +** +** $QT_END_LICENSE$ +** +****************************************************************************/ + +#ifndef MPIXMAPDATA_H +#define MPIXMAPDATA_H + +#include <private/qpixmapdata_gl_p.h> + +struct QMeeGoImageInfo +{ + Qt::HANDLE handle; + QImage::Format rawFormat; +}; + +class QMeeGoPixmapData : public QGLPixmapData +{ +public: + QMeeGoPixmapData(); + void fromTexture(GLuint textureId, int w, int h, bool alpha); + + virtual void fromEGLSharedImage(Qt::HANDLE handle, const QImage &softImage); + virtual void fromImage (const QImage &image, Qt::ImageConversionFlags flags); + virtual QImage toImage() const; + virtual void updateFromSoftImage(); + + QImage softImage; + + static QHash <void*, QMeeGoImageInfo*> sharedImagesMap; + + static Qt::HANDLE imageToEGLSharedImage(const QImage &image); + static bool destroyEGLSharedImage(Qt::HANDLE h); + static void registerSharedImage(Qt::HANDLE handle, const QImage &si); +}; + +#endif 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 diff --git a/src/plugins/s60/s60.pro b/src/plugins/s60/s60.pro index 8ae639c..c999fff 100644 --- a/src/plugins/s60/s60.pro +++ b/src/plugins/s60/s60.pro @@ -1,3 +1,11 @@ TEMPLATE = subdirs -symbian:SUBDIRS = 3_1 3_2 5_0 + +symbian { + contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + SUBDIRS += 3_1 3_2 + } + + # 5.0 is used also for Symbian3 and later + SUBDIRS += 5_0 +}
\ No newline at end of file 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 625dd95..d84a85b 100644 --- a/src/qt3support/text/q3richtext.cpp +++ b/src/qt3support/text/q3richtext.cpp @@ -64,7 +64,6 @@ #include "q3stylesheet.h" #include "qtextstream.h" #include <private/qtextengine_p.h> -#include <private/qunicodetables_p.h> #include <stdlib.h> diff --git a/src/s60installs/bwins/QtCoreu.def b/src/s60installs/bwins/QtCoreu.def index 1a79f63..0f66d72 100644 --- a/src/s60installs/bwins/QtCoreu.def +++ b/src/s60installs/bwins/QtCoreu.def @@ -1440,8 +1440,8 @@ EXPORTS ?d_func@QBuffer@@ABEPBVQBufferPrivate@@XZ @ 1439 NONAME ; class QBufferPrivate const * QBuffer::d_func(void) const ?d_func@QCoreApplication@@AAEPAVQCoreApplicationPrivate@@XZ @ 1440 NONAME ; class QCoreApplicationPrivate * QCoreApplication::d_func(void) ?d_func@QCoreApplication@@ABEPBVQCoreApplicationPrivate@@XZ @ 1441 NONAME ; class QCoreApplicationPrivate const * QCoreApplication::d_func(void) const - ?d_func@QDir@@AAEPAVQDirPrivate@@XZ @ 1442 NONAME ; class QDirPrivate * QDir::d_func(void) - ?d_func@QDir@@ABEPBVQDirPrivate@@XZ @ 1443 NONAME ; class QDirPrivate const * QDir::d_func(void) const + ?d_func@QDir@@AAEPAVQDirPrivate@@XZ @ 1442 NONAME ABSENT ; class QDirPrivate * QDir::d_func(void) + ?d_func@QDir@@ABEPBVQDirPrivate@@XZ @ 1443 NONAME ABSENT ; class QDirPrivate const * QDir::d_func(void) const ?d_func@QEventDispatcherSymbian@@AAEPAVQAbstractEventDispatcherPrivate@@XZ @ 1444 NONAME ; class QAbstractEventDispatcherPrivate * QEventDispatcherSymbian::d_func(void) ?d_func@QEventDispatcherSymbian@@ABEPBVQAbstractEventDispatcherPrivate@@XZ @ 1445 NONAME ; class QAbstractEventDispatcherPrivate const * QEventDispatcherSymbian::d_func(void) const ?d_func@QEventLoop@@AAEPAVQEventLoopPrivate@@XZ @ 1446 NONAME ; class QEventLoopPrivate * QEventLoop::d_func(void) diff --git a/src/s60installs/bwins/QtDeclarativeu.def b/src/s60installs/bwins/QtDeclarativeu.def index 50c948a..cf2f325 100644 --- a/src/s60installs/bwins/QtDeclarativeu.def +++ b/src/s60installs/bwins/QtDeclarativeu.def @@ -215,7 +215,7 @@ EXPORTS ?clear@QDeclarativeListReference@@QBE_NXZ @ 214 NONAME ; bool QDeclarativeListReference::clear(void) const ?parentChanged@QDeclarativeItem@@IAEXPAV1@@Z @ 215 NONAME ; void QDeclarativeItem::parentChanged(class QDeclarativeItem *) ?columnNumber@QDeclarativeDebugFileReference@@QBEHXZ @ 216 NONAME ; int QDeclarativeDebugFileReference::columnNumber(void) const - ??0QDeclarativeListModel@@AAE@_NPAVQObject@@@Z @ 217 NONAME ; QDeclarativeListModel::QDeclarativeListModel(bool, class QObject *) + ??0QDeclarativeListModel@@AAE@_NPAVQObject@@@Z @ 217 NONAME ABSENT ; QDeclarativeListModel::QDeclarativeListModel(bool, class QObject *) ?apply@QDeclarativeState@@QAEXPAVQDeclarativeStateGroup@@PAVQDeclarativeTransition@@PAV1@@Z @ 218 NONAME ; void QDeclarativeState::apply(class QDeclarativeStateGroup *, class QDeclarativeTransition *, class QDeclarativeState *) ?isValid@QDeclarativeDomProperty@@QBE_NXZ @ 219 NONAME ; bool QDeclarativeDomProperty::isValid(void) const ?trUtf8@QDeclarativeDebugExpressionQuery@@SA?AVQString@@PBD0@Z @ 220 NONAME ; class QString QDeclarativeDebugExpressionQuery::trUtf8(char const *, char const *) @@ -1639,4 +1639,80 @@ EXPORTS ?baselineOffsetChanged@QDeclarativeItem@@IAEXM@Z @ 1638 NONAME ; void QDeclarativeItem::baselineOffsetChanged(float) ??6QDeclarativeInfo@@QAEAAV0@VQChar@@@Z @ 1639 NONAME ; class QDeclarativeInfo & QDeclarativeInfo::operator<<(class QChar) ?newObjects@QDeclarativeEngineDebug@@IAEXXZ @ 1640 NONAME ; void QDeclarativeEngineDebug::newObjects(void) + ?qt_metacast@QDeclarativePropertyChanges@@UAEPAXPBD@Z @ 1641 NONAME ; void * QDeclarativePropertyChanges::qt_metacast(char const *) + ?actions@QDeclarativePropertyChanges@@UAE?AV?$QList@VQDeclarativeAction@@@@XZ @ 1642 NONAME ; class QList<class QDeclarativeAction> QDeclarativePropertyChanges::actions(void) + ??1QDeclarativePropertyChanges@@UAE@XZ @ 1643 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(void) + ??_EQDeclarativePropertyChanges@@UAE@I@Z @ 1644 NONAME ; QDeclarativePropertyChanges::~QDeclarativePropertyChanges(unsigned int) + ?setObject@QDeclarativePropertyChanges@@QAEXPAVQObject@@@Z @ 1645 NONAME ; void QDeclarativePropertyChanges::setObject(class QObject *) + ?staticMetaObject@QDeclarativePropertyChanges@@2UQMetaObject@@B @ 1646 NONAME ; struct QMetaObject const QDeclarativePropertyChanges::staticMetaObject + ?removeEntryFromRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@@Z @ 1647 NONAME ; bool QDeclarativeState::removeEntryFromRevertList(class QObject *, class QByteArray const &) + ?restoreEntryValues@QDeclarativePropertyChanges@@QBE_NXZ @ 1648 NONAME ; bool QDeclarativePropertyChanges::restoreEntryValues(void) const + ?setRestoreEntryValues@QDeclarativePropertyChanges@@QAEX_N@Z @ 1649 NONAME ; void QDeclarativePropertyChanges::setRestoreEntryValues(bool) + ?changeValue@QDeclarativePropertyChanges@@QAEXABVQByteArray@@ABVQVariant@@@Z @ 1650 NONAME ; void QDeclarativePropertyChanges::changeValue(class QByteArray const &, class QVariant const &) + ?metaObject@QDeclarativePropertyChanges@@UBEPBUQMetaObject@@XZ @ 1651 NONAME ; struct QMetaObject const * QDeclarativePropertyChanges::metaObject(void) const + ?data_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1652 NONAME ; void QDeclarativeItemPrivate::data_clear(class QDeclarativeListProperty<class QObject> *) + ?containsPropertyInRevertList@QDeclarativeState@@QBE_NPAVQObject@@ABVQByteArray@@@Z @ 1653 NONAME ; bool QDeclarativeState::containsPropertyInRevertList(class QObject *, class QByteArray const &) const + ?containsValue@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1654 NONAME ; bool QDeclarativePropertyChanges::containsValue(class QByteArray const &) const + ?bindingInRevertList@QDeclarativeState@@QBEPAVQDeclarativeAbstractBinding@@PAVQObject@@ABVQByteArray@@@Z @ 1655 NONAME ; class QDeclarativeAbstractBinding * QDeclarativeState::bindingInRevertList(class QObject *, class QByteArray const &) const + ?d_func@QDeclarativePropertyChanges@@ABEPBVQDeclarativePropertyChangesPrivate@@XZ @ 1656 NONAME ; class QDeclarativePropertyChangesPrivate const * QDeclarativePropertyChanges::d_func(void) const + ?containsProperty@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1657 NONAME ; bool QDeclarativePropertyChanges::containsProperty(class QByteArray const &) const + ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 1658 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *, int) + ?property@QDeclarativePropertyChanges@@QBE?AVQVariant@@ABVQByteArray@@@Z @ 1659 NONAME ; class QVariant QDeclarativePropertyChanges::property(class QByteArray const &) const + ?containsExpression@QDeclarativePropertyChanges@@QBE_NABVQByteArray@@@Z @ 1660 NONAME ; bool QDeclarativePropertyChanges::containsExpression(class QByteArray const &) const + ?d_func@QDeclarativeStateOperation@@ABEPBVQDeclarativeStateOperationPrivate@@XZ @ 1661 NONAME ; class QDeclarativeStateOperationPrivate const * QDeclarativeStateOperation::d_func(void) const + ?d_func@QDeclarativePropertyChanges@@AAEPAVQDeclarativePropertyChangesPrivate@@XZ @ 1662 NONAME ; class QDeclarativePropertyChangesPrivate * QDeclarativePropertyChanges::d_func(void) + ?state@QDeclarativeStateOperation@@QBEPAVQDeclarativeState@@XZ @ 1663 NONAME ; class QDeclarativeState * QDeclarativeStateOperation::state(void) const + ?value@QDeclarativePropertyChanges@@QBE?AVQVariant@@ABVQByteArray@@@Z @ 1664 NONAME ; class QVariant QDeclarativePropertyChanges::value(class QByteArray const &) const + ?qt_metacall@QDeclarativePropertyChanges@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1665 NONAME ; int QDeclarativePropertyChanges::qt_metacall(enum QMetaObject::Call, int, void * *) + ?trUtf8@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1666 NONAME ; class QString QDeclarativePropertyChanges::trUtf8(char const *, char const *) + ?attachToState@QDeclarativePropertyChanges@@QAEXXZ @ 1667 NONAME ; void QDeclarativePropertyChanges::attachToState(void) + ?changeExpression@QDeclarativePropertyChanges@@QAEXABVQByteArray@@ABVQString@@@Z @ 1668 NONAME ; void QDeclarativePropertyChanges::changeExpression(class QByteArray const &, class QString const &) + ?addEntryToRevertList@QDeclarativeState@@QAEXABVQDeclarativeAction@@@Z @ 1669 NONAME ; void QDeclarativeState::addEntryToRevertList(class QDeclarativeAction const &) + ??0QDeclarativePropertyChanges@@QAE@XZ @ 1670 NONAME ; QDeclarativePropertyChanges::QDeclarativePropertyChanges(void) + ?resources_clear@QDeclarativeItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1671 NONAME ; void QDeclarativeItemPrivate::resources_clear(class QDeclarativeListProperty<class QObject> *) + ?isExplicit@QDeclarativePropertyChanges@@QBE_NXZ @ 1672 NONAME ; bool QDeclarativePropertyChanges::isExplicit(void) const + ?setState@QDeclarativeStateOperation@@QAEXPAVQDeclarativeState@@@Z @ 1673 NONAME ; void QDeclarativeStateOperation::setState(class QDeclarativeState *) + ?detachFromState@QDeclarativePropertyChanges@@QAEXXZ @ 1674 NONAME ; void QDeclarativePropertyChanges::detachFromState(void) + ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0H@Z @ 1675 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *, int) + ?addEntriesToRevertList@QDeclarativeState@@QAEXABV?$QList@VQDeclarativeAction@@@@@Z @ 1676 NONAME ; void QDeclarativeState::addEntriesToRevertList(class QList<class QDeclarativeAction> const &) + ?expression@QDeclarativePropertyChanges@@QBE?AVQString@@ABVQByteArray@@@Z @ 1677 NONAME ; class QString QDeclarativePropertyChanges::expression(class QByteArray const &) const + ?object@QDeclarativePropertyChanges@@QBEPAVQObject@@XZ @ 1678 NONAME ; class QObject * QDeclarativePropertyChanges::object(void) const + ?valueInRevertList@QDeclarativeState@@QBE?AVQVariant@@PAVQObject@@ABVQByteArray@@@Z @ 1679 NONAME ; class QVariant QDeclarativeState::valueInRevertList(class QObject *, class QByteArray const &) const + ?removeAllEntriesFromRevertList@QDeclarativeState@@QAEXPAVQObject@@@Z @ 1680 NONAME ; void QDeclarativeState::removeAllEntriesFromRevertList(class QObject *) + ?d_func@QDeclarativeStateOperation@@AAEPAVQDeclarativeStateOperationPrivate@@XZ @ 1681 NONAME ; class QDeclarativeStateOperationPrivate * QDeclarativeStateOperation::d_func(void) + ?changeValueInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@ABVQVariant@@@Z @ 1682 NONAME ; bool QDeclarativeState::changeValueInRevertList(class QObject *, class QByteArray const &, class QVariant const &) + ?setIsExplicit@QDeclarativePropertyChanges@@QAEX_N@Z @ 1683 NONAME ; void QDeclarativePropertyChanges::setIsExplicit(bool) + ?isStateActive@QDeclarativeState@@QBE_NXZ @ 1684 NONAME ; bool QDeclarativeState::isStateActive(void) const + ?data_count@QDeclarativeItemPrivate@@SAHPAV?$QDeclarativeListProperty@VQObject@@@@@Z @ 1685 NONAME ; int QDeclarativeItemPrivate::data_count(class QDeclarativeListProperty<class QObject> *) + ?removeProperty@QDeclarativePropertyChanges@@QAEXABVQByteArray@@@Z @ 1686 NONAME ; void QDeclarativePropertyChanges::removeProperty(class QByteArray const &) + ?data_at@QDeclarativeItemPrivate@@SAPAVQObject@@PAV?$QDeclarativeListProperty@VQObject@@@@H@Z @ 1687 NONAME ; class QObject * QDeclarativeItemPrivate::data_at(class QDeclarativeListProperty<class QObject> *, int) + ?tr@QDeclarativePropertyChanges@@SA?AVQString@@PBD0@Z @ 1688 NONAME ; class QString QDeclarativePropertyChanges::tr(char const *, char const *) + ?changeBindingInRevertList@QDeclarativeState@@QAE_NPAVQObject@@ABVQByteArray@@PAVQDeclarativeAbstractBinding@@@Z @ 1689 NONAME ; bool QDeclarativeState::changeBindingInRevertList(class QObject *, class QByteArray const &, class QDeclarativeAbstractBinding *) + ?getStaticMetaObject@QDeclarativePropertyChanges@@SAABUQMetaObject@@XZ @ 1690 NONAME ; struct QMetaObject const & QDeclarativePropertyChanges::getStaticMetaObject(void) + ?weakPointer@QDeclarativeAbstractBinding@@QAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1691 NONAME ABSENT ; class QWeakPointer<class QDeclarativeAbstractBinding> QDeclarativeAbstractBinding::weakPointer(void) + ?getStaticMetaObject@QDeclarativeScriptAction@@SAABUQMetaObject@@XZ @ 1692 NONAME ; struct QMetaObject const & QDeclarativeScriptAction::getStaticMetaObject(void) + ?qt_metacall@QDeclarativeScriptAction@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 1693 NONAME ; int QDeclarativeScriptAction::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1QDeclarativeScriptAction@@UAE@XZ @ 1694 NONAME ; QDeclarativeScriptAction::~QDeclarativeScriptAction(void) + ?stateChangeScriptName@QDeclarativeScriptAction@@QBE?AVQString@@XZ @ 1695 NONAME ; class QString QDeclarativeScriptAction::stateChangeScriptName(void) const + ?script@QDeclarativeScriptAction@@QBE?AVQDeclarativeScriptString@@XZ @ 1696 NONAME ; class QDeclarativeScriptString QDeclarativeScriptAction::script(void) const + ?qt_metacast@QDeclarativeScriptAction@@UAEPAXPBD@Z @ 1697 NONAME ; void * QDeclarativeScriptAction::qt_metacast(char const *) + ?tr@QDeclarativeScriptAction@@SA?AVQString@@PBD0@Z @ 1698 NONAME ; class QString QDeclarativeScriptAction::tr(char const *, char const *) + ?setStateChangeScriptName@QDeclarativeScriptAction@@QAEXABVQString@@@Z @ 1699 NONAME ; void QDeclarativeScriptAction::setStateChangeScriptName(class QString const &) + ??_EQDeclarativeScriptAction@@UAE@I@Z @ 1700 NONAME ; QDeclarativeScriptAction::~QDeclarativeScriptAction(unsigned int) + ?d_func@QDeclarativeScriptAction@@ABEPBVQDeclarativeScriptActionPrivate@@XZ @ 1701 NONAME ; class QDeclarativeScriptActionPrivate const * QDeclarativeScriptAction::d_func(void) const + ?weakPointer@QDeclarativeAbstractBinding@@AAE?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@XZ @ 1702 NONAME ; class QWeakPointer<class QDeclarativeAbstractBinding> QDeclarativeAbstractBinding::weakPointer(void) + ?trUtf8@QDeclarativeScriptAction@@SA?AVQString@@PBD0H@Z @ 1703 NONAME ; class QString QDeclarativeScriptAction::trUtf8(char const *, char const *, int) + ?trUtf8@QDeclarativeScriptAction@@SA?AVQString@@PBD0@Z @ 1704 NONAME ; class QString QDeclarativeScriptAction::trUtf8(char const *, char const *) + ?qtAnimation@QDeclarativeScriptAction@@MAEPAVQAbstractAnimation@@XZ @ 1705 NONAME ; class QAbstractAnimation * QDeclarativeScriptAction::qtAnimation(void) + ??0QDeclarativeScriptAction@@QAE@PAVQObject@@@Z @ 1706 NONAME ; QDeclarativeScriptAction::QDeclarativeScriptAction(class QObject *) + ?tr@QDeclarativeScriptAction@@SA?AVQString@@PBD0H@Z @ 1707 NONAME ; class QString QDeclarativeScriptAction::tr(char const *, char const *, int) + ?d_func@QDeclarativeScriptAction@@AAEPAVQDeclarativeScriptActionPrivate@@XZ @ 1708 NONAME ; class QDeclarativeScriptActionPrivate * QDeclarativeScriptAction::d_func(void) + ?transition@QDeclarativeScriptAction@@MAEXAAV?$QList@VQDeclarativeAction@@@@AAV?$QList@VQDeclarativeProperty@@@@W4TransitionDirection@QDeclarativeAbstractAnimation@@@Z @ 1709 NONAME ; void QDeclarativeScriptAction::transition(class QList<class QDeclarativeAction> &, class QList<class QDeclarativeProperty> &, enum QDeclarativeAbstractAnimation::TransitionDirection) + ?staticMetaObject@QDeclarativeScriptAction@@2UQMetaObject@@B @ 1710 NONAME ; struct QMetaObject const QDeclarativeScriptAction::staticMetaObject + ?setScript@QDeclarativeScriptAction@@QAEXABVQDeclarativeScriptString@@@Z @ 1711 NONAME ; void QDeclarativeScriptAction::setScript(class QDeclarativeScriptString const &) + ?metaObject@QDeclarativeScriptAction@@UBEPBUQMetaObject@@XZ @ 1712 NONAME ; struct QMetaObject const * QDeclarativeScriptAction::metaObject(void) const + ?getPointer@QDeclarativeAbstractBinding@@SA?AV?$QWeakPointer@VQDeclarativeAbstractBinding@@@@PAV1@@Z @ 1713 NONAME ; class QWeakPointer<class QDeclarativeAbstractBinding> QDeclarativeAbstractBinding::getPointer(class QDeclarativeAbstractBinding *) + ??0QDeclarativeListModel@@AAE@PBV0@PAVQDeclarativeListModelWorkerAgent@@@Z @ 1714 NONAME ; QDeclarativeListModel::QDeclarativeListModel(class QDeclarativeListModel const *, class QDeclarativeListModelWorkerAgent *) + ?inWorkerThread@QDeclarativeListModel@@ABE_NXZ @ 1715 NONAME ; bool QDeclarativeListModel::inWorkerThread(void) const + ?canMove@QDeclarativeListModel@@ABE_NHHH@Z @ 1716 NONAME ; bool QDeclarativeListModel::canMove(int, int, int) const diff --git a/src/s60installs/bwins/QtGuiu.def b/src/s60installs/bwins/QtGuiu.def index 01630e2..7805dae 100644 --- a/src/s60installs/bwins/QtGuiu.def +++ b/src/s60installs/bwins/QtGuiu.def @@ -2645,7 +2645,7 @@ EXPORTS ?childItems@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2644 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::childItems(void) const ?children@QGraphicsItem@@QBE?AV?$QList@PAVQGraphicsItem@@@@XZ @ 2645 NONAME ; class QList<class QGraphicsItem *> QGraphicsItem::children(void) const ?childrenBoundingRect@QGraphicsItem@@QBE?AVQRectF@@XZ @ 2646 NONAME ; class QRectF QGraphicsItem::childrenBoundingRect(void) const - ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *) + ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@@Z @ 2647 NONAME ABSENT ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *) ?childrenCheckState@QTreeWidgetItem@@ABE?AVQVariant@@H@Z @ 2648 NONAME ; class QVariant QTreeWidgetItem::childrenCheckState(int) const ?childrenClippedToShape@QGraphicsItemPrivate@@QBE_NXZ @ 2649 NONAME ; bool QGraphicsItemPrivate::childrenClippedToShape(void) const ?childrenCollapsible@QSplitter@@QBE_NXZ @ 2650 NONAME ; bool QSplitter::childrenCollapsible(void) const @@ -4078,7 +4078,7 @@ EXPORTS ?editorEvent@QAbstractItemDelegate@@UAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4077 NONAME ; bool QAbstractItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) ?editorEvent@QItemDelegate@@MAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4078 NONAME ; bool QItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) ?editorEvent@QStyledItemDelegate@@MAE_NPAVQEvent@@PAVQAbstractItemModel@@ABVQStyleOptionViewItem@@ABVQModelIndex@@@Z @ 4079 NONAME ; bool QStyledItemDelegate::editorEvent(class QEvent *, class QAbstractItemModel *, class QStyleOptionViewItem const &, class QModelIndex const &) - ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@XZ @ 4080 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(void) const + ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@XZ @ 4080 NONAME ABSENT ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(void) const ?effectiveOpacity@QGraphicsItem@@QBEMXZ @ 4081 NONAME ; float QGraphicsItem::effectiveOpacity(void) const ?effectiveOpacity@QGraphicsItemPrivate@@QBEMXZ @ 4082 NONAME ; float QGraphicsItemPrivate::effectiveOpacity(void) const ?effectiveRectFor@QWidgetPrivate@@QBE?AVQRect@@ABV2@@Z @ 4083 NONAME ; class QRect QWidgetPrivate::effectiveRectFor(class QRect const &) const @@ -12885,4 +12885,11 @@ EXPORTS ??0QGraphicsViewPrivate@@QAE@XZ @ 12884 NONAME ; QGraphicsViewPrivate::QGraphicsViewPrivate(void) ?flushDetachedPixmaps@QPixmapCache@@SAXXZ @ 12885 NONAME ; void QPixmapCache::flushDetachedPixmaps(void) ?replayLastMouseEvent@QGraphicsViewPrivate@@QAEXXZ @ 12886 NONAME ; void QGraphicsViewPrivate::replayLastMouseEvent(void) + ?children_clear@QGraphicsItemPrivate@@SAXPAV?$QDeclarativeListProperty@VQGraphicsObject@@@@@Z @ 12887 NONAME ; void QGraphicsItemPrivate::children_clear(class QDeclarativeListProperty<class QGraphicsObject> *) + ?timeout@QTapAndHoldGesture@@SAHXZ @ 12888 NONAME ; int QTapAndHoldGesture::timeout(void) + ?lastRightBearing@QFontEngine@@IAE?AUQFixed@@ABUQGlyphLayout@@_N@Z @ 12889 NONAME ; struct QFixed QFontEngine::lastRightBearing(struct QGlyphLayout const &, bool) + ?childrenBoundingRectHelper@QGraphicsItemPrivate@@QAEXPAVQTransform@@PAVQRectF@@PAVQGraphicsItem@@@Z @ 12890 NONAME ; void QGraphicsItemPrivate::childrenBoundingRectHelper(class QTransform *, class QRectF *, class QGraphicsItem *) + ?setTimeout@QTapAndHoldGesture@@SAXH@Z @ 12891 NONAME ; void QTapAndHoldGesture::setTimeout(int) + ?qmljsDebugArguments@QApplicationPrivate@@2VQString@@A @ 12892 NONAME ; class QString QApplicationPrivate::qmljsDebugArguments + ?effectiveBoundingRect@QGraphicsItemPrivate@@QBE?AVQRectF@@PAVQGraphicsItem@@@Z @ 12893 NONAME ; class QRectF QGraphicsItemPrivate::effectiveBoundingRect(class QGraphicsItem *) const diff --git a/src/s60installs/bwins/QtOpenGLu.def b/src/s60installs/bwins/QtOpenGLu.def new file mode 100644 index 0000000..fa340e4 --- /dev/null +++ b/src/s60installs/bwins/QtOpenGLu.def @@ -0,0 +1,701 @@ +EXPORTS + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$01$01M@@H@Z @ 1 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<2, 2, float> const *, int) + ?setPaintEnginePrivate@QGLTextureGlyphCache@@QAEXPAVQGL2PaintEngineExPrivate@@@Z @ 2 NONAME ; void QGLTextureGlyphCache::setPaintEnginePrivate(class QGL2PaintEngineExPrivate *) + ??1QGLFormat@@QAE@XZ @ 3 NONAME ; QGLFormat::~QGLFormat(void) + ?setOpacityMode@QGLEngineShaderManager@@QAEXW4OpacityMode@1@@Z @ 4 NONAME ; void QGLEngineShaderManager::setOpacityMode(enum QGLEngineShaderManager::OpacityMode) + ?entryRgb@QGLColormap@@QBEIH@Z @ 5 NONAME ; unsigned int QGLColormap::entryRgb(int) const + ??0QGLFormat@@QAE@ABV0@@Z @ 6 NONAME ; QGLFormat::QGLFormat(class QGLFormat const &) + ?d_func@QGLShader@@AAEPAVQGLShaderPrivate@@XZ @ 7 NONAME ; class QGLShaderPrivate * QGLShader::d_func(void) + ?bindToDynamicTexture@QGLPixelBuffer@@QAE_NI@Z @ 8 NONAME ; bool QGLPixelBuffer::bindToDynamicTexture(unsigned int) + ??0QGLWidget@@QAE@PAVQGLContext@@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z @ 9 NONAME ; QGLWidget::QGLWidget(class QGLContext *, class QWidget *, class QGLWidget const *, class QFlags<enum Qt::WindowType>) + ??_EQGLFormat@@QAE@I@Z @ 10 NONAME ; QGLFormat::~QGLFormat(unsigned int) + ?drawPixmapFragments@QGL2PaintEngineEx@@UAEXPBVPixmapFragment@QPainter@@HABVQPixmap@@V?$QFlags@W4PixmapFragmentHint@QPainter@@@@@Z @ 11 NONAME ; void QGL2PaintEngineEx::drawPixmapFragments(class QPainter::PixmapFragment const *, int, class QPixmap const &, class QFlags<enum QPainter::PixmapFragmentHint>) + ?paintEngine@QGLWidget@@UBEPAVQPaintEngine@@XZ @ 12 NONAME ; class QPaintEngine * QGLWidget::paintEngine(void) const + ?setPreferredPaintEngine@QGL@@YAXW4Type@QPaintEngine@@@Z @ 13 NONAME ; void QGL::setPreferredPaintEngine(enum QPaintEngine::Type) + ?isValid@QGLPixelBuffer@@QBE_NXZ @ 14 NONAME ; bool QGLPixelBuffer::isValid(void) const + ?stereo@QGLFormat@@QBE_NXZ @ 15 NONAME ; bool QGLFormat::stereo(void) const + ?size@QGLPixelBuffer@@QBE?AVQSize@@XZ @ 16 NONAME ; class QSize QGLPixelBuffer::size(void) const + ?qt_gl_transfer_context@@YAPBVQGLContext@@PBV1@@Z @ 17 NONAME ; class QGLContext const * qt_gl_transfer_context(class QGLContext const *) + ?format@QGLContext@@QBE?AVQGLFormat@@XZ @ 18 NONAME ; class QGLFormat QGLContext::format(void) const + ?getStaticMetaObject@QGraphicsShaderEffect@@SAABUQMetaObject@@XZ @ 19 NONAME ; struct QMetaObject const & QGraphicsShaderEffect::getStaticMetaObject(void) + ??1QGLWidget@@UAE@XZ @ 20 NONAME ; QGLWidget::~QGLWidget(void) + ??0QGLPixelBuffer@@QAE@ABVQSize@@ABVQGLFormat@@PAVQGLWidget@@@Z @ 21 NONAME ; QGLPixelBuffer::QGLPixelBuffer(class QSize const &, class QGLFormat const &, class QGLWidget *) + ?isEmpty@QGLColormap@@QBE_NXZ @ 22 NONAME ; bool QGLColormap::isEmpty(void) const + ?setAttributeValue@QGLShaderProgram@@QAEXPBDABVQVector2D@@@Z @ 23 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, class QVector2D const &) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQSize@@@Z @ 24 NONAME ; void QGLShaderProgram::setUniformValue(int, class QSize const &) + ?attachment@QGLFramebufferObjectFormat@@QBE?AW4Attachment@QGLFramebufferObject@@XZ @ 25 NONAME ; enum QGLFramebufferObject::Attachment QGLFramebufferObjectFormat::attachment(void) const + ?setGeometry@QGLWindowSurface@@UAEXABVQRect@@@Z @ 26 NONAME ; void QGLWindowSurface::setGeometry(class QRect const &) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQVector3D@@@Z @ 27 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QVector3D const &) + ?release@QGLShaderProgram@@QAEXXZ @ 28 NONAME ; void QGLShaderProgram::release(void) + ?entryColor@QGLColormap@@QBE?AVQColor@@H@Z @ 29 NONAME ; class QColor QGLColormap::entryColor(int) const + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$02$02M@@@Z @ 30 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<3, 3, float> const &) + ?setCompositionMode@QGLEngineShaderManager@@QAEXW4CompositionMode@QPainter@@@Z @ 31 NONAME ; void QGLEngineShaderManager::setCompositionMode(enum QPainter::CompositionMode) + ?bindTexture@QGLPixelBuffer@@QAEIABVQString@@@Z @ 32 NONAME ; unsigned int QGLPixelBuffer::bindTexture(class QString const &) + ?stencil@QGLFormat@@QBE_NXZ @ 33 NONAME ; bool QGLFormat::stencil(void) const + ?format@QGLPaintDevice@@UBE?AVQGLFormat@@XZ @ 34 NONAME ; class QGLFormat QGLPaintDevice::format(void) const + ?d_func@QGLContext@@AAEPAVQGLContextPrivate@@XZ @ 35 NONAME ; class QGLContextPrivate * QGLContext::d_func(void) + ?bindAttributeLocation@QGLShaderProgram@@QAEXABVQString@@H@Z @ 36 NONAME ; void QGLShaderProgram::bindAttributeLocation(class QString const &, int) + ?depthBufferSize@QGLFormat@@QBEHXZ @ 37 NONAME ; int QGLFormat::depthBufferSize(void) const + ?write@QGLBuffer@@QAEXHPBXH@Z @ 38 NONAME ; void QGLBuffer::write(int, void const *, int) + ?tr@QGraphicsShaderEffect@@SA?AVQString@@PBD0@Z @ 39 NONAME ; class QString QGraphicsShaderEffect::tr(char const *, char const *) + ?currentProgram@QGLEngineShaderManager@@QAEPAVQGLShaderProgram@@XZ @ 40 NONAME ; class QGLShaderProgram * QGLEngineShaderManager::currentProgram(void) + ?isLinked@QGLShaderProgram@@QBE_NXZ @ 41 NONAME ; bool QGLShaderProgram::isLinked(void) const + ?resizeTextureData@QGLTextureGlyphCache@@UAEXHH@Z @ 42 NONAME ; void QGLTextureGlyphCache::resizeTextureData(int, int) + ?device@QGLContext@@QBEPAVQPaintDevice@@XZ @ 43 NONAME ; class QPaintDevice * QGLContext::device(void) const + ?create@QGLContext@@UAE_NPBV1@@Z @ 44 NONAME ; bool QGLContext::create(class QGLContext const *) + ?staticMetaObject@QGLWindowSurface@@2UQMetaObject@@B @ 45 NONAME ; struct QMetaObject const QGLWindowSurface::staticMetaObject + ?staticMetaObject@QGLShader@@2UQMetaObject@@B @ 46 NONAME ; struct QMetaObject const QGLShader::staticMetaObject + ?state@QGL2PaintEngineEx@@QAEPAVQOpenGL2PaintEngineState@@XZ @ 47 NONAME ; class QOpenGL2PaintEngineState * QGL2PaintEngineEx::state(void) + ?setUsagePattern@QGLBuffer@@QAEXW4UsagePattern@1@@Z @ 48 NONAME ; void QGLBuffer::setUsagePattern(enum QGLBuffer::UsagePattern) + ?drawTexture@QGL2PaintEngineEx@@QAE_NABVQRectF@@IABVQSize@@0@Z @ 49 NONAME ; bool QGL2PaintEngineEx::drawTexture(class QRectF const &, unsigned int, class QSize const &, class QRectF const &) + ?qt_metacast@QGLShaderProgram@@UAEPAXPBD@Z @ 50 NONAME ; void * QGLShaderProgram::qt_metacast(char const *) + ?tr@QGLWidget@@SA?AVQString@@PBD0H@Z @ 51 NONAME ; class QString QGLWidget::tr(char const *, char const *, int) + ?fromData@QGLPixmapData@@UAE_NPBEIPBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 52 NONAME ; bool QGLPixmapData::fromData(unsigned char const *, unsigned int, char const *, class QFlags<enum Qt::ImageConversionFlag>) + ?brushOriginChanged@QGL2PaintEngineEx@@UAEXXZ @ 53 NONAME ; void QGL2PaintEngineEx::brushOriginChanged(void) + ?setContext@QGLSharedResourceGuard@@QAEXPBVQGLContext@@@Z @ 54 NONAME ; void QGLSharedResourceGuard::setContext(class QGLContext const *) + ?create@QGLBuffer@@QAE_NXZ @ 55 NONAME ; bool QGLBuffer::create(void) + ?setEntry@QGLColormap@@QAEXHI@Z @ 56 NONAME ; void QGLColormap::setEntry(int, unsigned int) + ?useBlitProgram@QGLEngineShaderManager@@QAEXXZ @ 57 NONAME ; void QGLEngineShaderManager::useBlitProgram(void) + ?paintEngine@QGLPixmapData@@UBEPAVQPaintEngine@@XZ @ 58 NONAME ; class QPaintEngine * QGLPixmapData::paintEngine(void) const + ?qt_destroy_gl_share_widget@@YAXXZ @ 59 NONAME ; void qt_destroy_gl_share_widget(void) + ?updateGL@QGLWidget@@UAEXXZ @ 60 NONAME ; void QGLWidget::updateGL(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$02$02M@@H@Z @ 61 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<3, 3, float> const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQColor@@@Z @ 62 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QColor const &) + ?d_func@QGLCustomShaderStage@@ABEPBVQGLCustomShaderStagePrivate@@XZ @ 63 NONAME ; class QGLCustomShaderStagePrivate const * QGLCustomShaderStage::d_func(void) const + ?link@QGLShaderProgram@@UAE_NXZ @ 64 NONAME ; bool QGLShaderProgram::link(void) + ??0QGLWindowSurface@@QAE@PAVQWidget@@@Z @ 65 NONAME ; QGLWindowSurface::QGLWindowSurface(class QWidget *) + ??9@YA_NABVQGLFormat@@0@Z @ 66 NONAME ; bool operator!=(class QGLFormat const &, class QGLFormat const &) + ?trUtf8@QGLEngineShaderManager@@SA?AVQString@@PBD0H@Z @ 67 NONAME ; class QString QGLEngineShaderManager::trUtf8(char const *, char const *, int) + ?clip@QGL2PaintEngineEx@@UAEXABVQVectorPath@@W4ClipOperation@Qt@@@Z @ 68 NONAME ; void QGL2PaintEngineEx::clip(class QVectorPath const &, enum Qt::ClipOperation) + ?setRgba@QGLFormat@@QAEX_N@Z @ 69 NONAME ; void QGLFormat::setRgba(bool) + ??1QGLGraphicsSystem@@UAE@XZ @ 70 NONAME ; QGLGraphicsSystem::~QGLGraphicsSystem(void) + ?simpleProgram@QGLEngineShaderManager@@QAEPAVQGLShaderProgram@@XZ @ 71 NONAME ; class QGLShaderProgram * QGLEngineShaderManager::simpleProgram(void) + ?generateDynamicTexture@QGLPixelBuffer@@QBEIXZ @ 72 NONAME ; unsigned int QGLPixelBuffer::generateDynamicTexture(void) const + ?metaObject@QGLShaderProgram@@UBEPBUQMetaObject@@XZ @ 73 NONAME ; struct QMetaObject const * QGLShaderProgram::metaObject(void) const + ?usagePattern@QGLBuffer@@QBE?AW4UsagePattern@1@XZ @ 74 NONAME ; enum QGLBuffer::UsagePattern QGLBuffer::usagePattern(void) const + ?setAttributeArray@QGLShaderProgram@@QAEXPBDPBVQVector4D@@H@Z @ 75 NONAME ; void QGLShaderProgram::setAttributeArray(char const *, class QVector4D const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXHI@Z @ 76 NONAME ; void QGLShaderProgram::setUniformValue(int, unsigned int) + ?blitProgram@QGLEngineShaderManager@@QAEPAVQGLShaderProgram@@XZ @ 77 NONAME ; class QGLShaderProgram * QGLEngineShaderManager::blitProgram(void) + ?metaObject@QGLSignalProxy@@UBEPBUQMetaObject@@XZ @ 78 NONAME ; struct QMetaObject const * QGLSignalProxy::metaObject(void) const + ??1QGLShaderProgram@@UAE@XZ @ 79 NONAME ; QGLShaderProgram::~QGLShaderProgram(void) + ?height@QGLTextureGlyphCache@@QBEHXZ @ 80 NONAME ; int QGLTextureGlyphCache::height(void) const + ??_EQGLWindowSurface@@UAE@I@Z @ 81 NONAME ; QGLWindowSurface::~QGLWindowSurface(unsigned int) + ?renderPixmap@QGLWidget@@QAE?AVQPixmap@@HH_N@Z @ 82 NONAME ; class QPixmap QGLWidget::renderPixmap(int, int, bool) + ?read@QGLBuffer@@QAE_NHPAXH@Z @ 83 NONAME ; bool QGLBuffer::read(int, void *, int) + ?qglClearColor@QGLWidget@@QBEXABVQColor@@@Z @ 84 NONAME ; void QGLWidget::qglClearColor(class QColor const &) const + ??0QGLFramebufferObject@@QAE@HHW4Attachment@0@II@Z @ 85 NONAME ; QGLFramebufferObject::QGLFramebufferObject(int, int, enum QGLFramebufferObject::Attachment, unsigned int, unsigned int) + ?penChanged@QGL2PaintEngineEx@@UAEXXZ @ 86 NONAME ; void QGL2PaintEngineEx::penChanged(void) + ??_EQGraphicsShaderEffect@@UAE@I@Z @ 87 NONAME ; QGraphicsShaderEffect::~QGraphicsShaderEffect(unsigned int) + ?doneCurrent@QGLContext@@UAEXXZ @ 88 NONAME ; void QGLContext::doneCurrent(void) + ??_EQGLContext@@UAE@I@Z @ 89 NONAME ; QGLContext::~QGLContext(unsigned int) + ?release@QGLBuffer@@QAEXXZ @ 90 NONAME ; void QGLBuffer::release(void) + ??0QGLPixmapData@@QAE@W4PixelType@QPixmapData@@@Z @ 91 NONAME ; QGLPixmapData::QGLPixmapData(enum QPixmapData::PixelType) + ?texture@QGLPixmapData@@QBEPAVQGLTexture@@XZ @ 92 NONAME ; class QGLTexture * QGLPixmapData::texture(void) const + ?updateGeometry@QGLWindowSurface@@QAEXXZ @ 93 NONAME ; void QGLWindowSurface::updateGeometry(void) + ?windowCreated@QGLContext@@IBE_NXZ @ 94 NONAME ; bool QGLContext::windowCreated(void) const + ?setWindowCreated@QGLContext@@IAEX_N@Z @ 95 NONAME ; void QGLContext::setWindowCreated(bool) + ?uniformLocation@QGLShaderProgram@@QBEHABVQString@@@Z @ 96 NONAME ; int QGLShaderProgram::uniformLocation(class QString const &) const + ?metaObject@QGLWindowSurface@@UBEPBUQMetaObject@@XZ @ 97 NONAME ; struct QMetaObject const * QGLWindowSurface::metaObject(void) const + ?setAttributeBuffer@QGLShaderProgram@@QAEXHIHHH@Z @ 98 NONAME ; void QGLShaderProgram::setAttributeBuffer(int, unsigned int, int, int, int) + ?getProcAddress@QGLContext@@QBEPAXABVQString@@@Z @ 99 NONAME ; void * QGLContext::getProcAddress(class QString const &) const + ?qt_metacall@QGLTextureGlyphCache@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 100 NONAME ; int QGLTextureGlyphCache::qt_metacall(enum QMetaObject::Call, int, void * *) + ??1QGLPixelBuffer@@UAE@XZ @ 101 NONAME ; QGLPixelBuffer::~QGLPixelBuffer(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBVQVector4D@@H@Z @ 102 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QVector4D const *, int) + ?releaseFromDynamicTexture@QGLPixelBuffer@@QAEXXZ @ 103 NONAME ; void QGLPixelBuffer::releaseFromDynamicTexture(void) + ?setUniformsDirty@QGraphicsShaderEffect@@IAEXXZ @ 104 NONAME ; void QGraphicsShaderEffect::setUniformsDirty(void) + ?drawTexture@QGLFramebufferObject@@QAEXABVQPointF@@II@Z @ 105 NONAME ; void QGLFramebufferObject::drawTexture(class QPointF const &, unsigned int, unsigned int) + ??0QGLContext@@QAE@ABVQGLFormat@@@Z @ 106 NONAME ; QGLContext::QGLContext(class QGLFormat const &) + ?geometryOutputVertexCount@QGLShaderProgram@@QBEHXZ @ 107 NONAME ; int QGLShaderProgram::geometryOutputVertexCount(void) const + ?setAccum@QGLFormat@@QAEX_N@Z @ 108 NONAME ; void QGLFormat::setAccum(bool) + ??0QGLSignalProxy@@QAE@XZ @ 109 NONAME ; QGLSignalProxy::QGLSignalProxy(void) + ?isUninitialized@QGLPixmapData@@ABE_NXZ @ 110 NONAME ; bool QGLPixmapData::isUninitialized(void) const + ??0QGLFramebufferObjectFormat@@QAE@XZ @ 111 NONAME ; QGLFramebufferObjectFormat::QGLFramebufferObjectFormat(void) + ??8@YA_NABVQGLFormat@@0@Z @ 112 NONAME ; bool operator==(class QGLFormat const &, class QGLFormat const &) + ?toImage@QGLFramebufferObject@@QBE?AVQImage@@XZ @ 113 NONAME ; class QImage QGLFramebufferObject::toImage(void) const + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$01$02M@@@Z @ 114 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<2, 3, float> const &) + ?useCorrectShaderProg@QGLEngineShaderManager@@QAE_NXZ @ 115 NONAME ; bool QGLEngineShaderManager::useCorrectShaderProg(void) + ?setAlphaBufferSize@QGLFormat@@QAEXH@Z @ 116 NONAME ; void QGLFormat::setAlphaBufferSize(int) + ??0QGLContextResource@@QAE@P6AXPAX@Z@Z @ 117 NONAME ; QGLContextResource::QGLContextResource(void (*)(void *)) + ?tr@QGLEngineShaderManager@@SA?AVQString@@PBD0H@Z @ 118 NONAME ; class QString QGLEngineShaderManager::tr(char const *, char const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQVector4D@@@Z @ 119 NONAME ; void QGLShaderProgram::setUniformValue(int, class QVector4D const &) + ?d_func@QGLContext@@ABEPBVQGLContextPrivate@@XZ @ 120 NONAME ; class QGLContextPrivate const * QGLContext::d_func(void) const + ?setUniformValue@QGLShaderProgram@@QAEXHABVQMatrix4x4@@@Z @ 121 NONAME ; void QGLShaderProgram::setUniformValue(int, class QMatrix4x4 const &) + ?deleteTexture@QGLContext@@QAEXI@Z @ 122 NONAME ; void QGLContext::deleteTexture(unsigned int) + ?setAttributeArray@QGLShaderProgram@@QAEXHPBMHH@Z @ 123 NONAME ; void QGLShaderProgram::setAttributeArray(int, float const *, int, int) + ?bindTexture@QGLWidget@@QAEIABVQImage@@IHV?$QFlags@W4BindOption@QGLContext@@@@@Z @ 124 NONAME ; unsigned int QGLWidget::bindTexture(class QImage const &, unsigned int, int, class QFlags<enum QGLContext::BindOption>) + ?ensureCreated@QGLPixmapData@@ABEXXZ @ 125 NONAME ; void QGLPixmapData::ensureCreated(void) const + ?setSource@QGLCustomShaderStage@@IAEXABVQByteArray@@@Z @ 126 NONAME ; void QGLCustomShaderStage::setSource(class QByteArray const &) + ?trUtf8@QGLTextureGlyphCache@@SA?AVQString@@PBD0@Z @ 127 NONAME ; class QString QGLTextureGlyphCache::trUtf8(char const *, char const *) + ?removeFromPainter@QGLCustomShaderStage@@QAEXPAVQPainter@@@Z @ 128 NONAME ; void QGLCustomShaderStage::removeFromPainter(class QPainter *) + ?qt_metacall@QGLWindowSurface@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 129 NONAME ; int QGLWindowSurface::qt_metacall(enum QMetaObject::Call, int, void * *) + ??0QGLBuffer@@QAE@W4Type@0@@Z @ 130 NONAME ; QGLBuffer::QGLBuffer(enum QGLBuffer::Type) + ?fillColor@QGLPixmapData@@ABE?AVQColor@@XZ @ 131 NONAME ; class QColor QGLPixmapData::fillColor(void) const + ?setSamples@QGLFormat@@QAEXH@Z @ 132 NONAME ; void QGLFormat::setSamples(int) + ?makeCurrent@QGLContext@@UAEXXZ @ 133 NONAME ; void QGLContext::makeCurrent(void) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$03$02M@@@Z @ 134 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<4, 3, float> const &) + ?hasOpenGLShaders@QGLShader@@SA_NV?$QFlags@W4ShaderTypeBit@QGLShader@@@@PBVQGLContext@@@Z @ 135 NONAME ; bool QGLShader::hasOpenGLShaders(class QFlags<enum QGLShader::ShaderTypeBit>, class QGLContext const *) + ?hasComplexGeometry@QGLEngineShaderManager@@QBE_NXZ @ 136 NONAME ; bool QGLEngineShaderManager::hasComplexGeometry(void) const + ?tr@QGLEngineShaderManager@@SA?AVQString@@PBD0@Z @ 137 NONAME ; class QString QGLEngineShaderManager::tr(char const *, char const *) + ??0QGLFramebufferObject@@QAE@ABVQSize@@I@Z @ 138 NONAME ; QGLFramebufferObject::QGLFramebufferObject(class QSize const &, unsigned int) + ?setSrcPixelType@QGLEngineShaderManager@@QAEXW4PixelSrcType@1@@Z @ 139 NONAME ; void QGLEngineShaderManager::setSrcPixelType(enum QGLEngineShaderManager::PixelSrcType) + ?isValid@QGLFramebufferObject@@QBE_NXZ @ 140 NONAME ; bool QGLFramebufferObject::isValid(void) const + ??0QGLFramebufferObject@@QAE@HHABVQGLFramebufferObjectFormat@@@Z @ 141 NONAME ; QGLFramebufferObject::QGLFramebufferObject(int, int, class QGLFramebufferObjectFormat const &) + ?setDirectRendering@QGLFormat@@QAEX_N@Z @ 142 NONAME ; void QGLFormat::setDirectRendering(bool) + ?hasAlphaChannel@QGLPixmapData@@UBE_NXZ @ 143 NONAME ; bool QGLPixmapData::hasAlphaChannel(void) const + ?tr@QGLSignalProxy@@SA?AVQString@@PBD0H@Z @ 144 NONAME ; class QString QGLSignalProxy::tr(char const *, char const *, int) + ?setContext@QGLWidget@@QAEXPAVQGLContext@@PBV2@_N@Z @ 145 NONAME ; void QGLWidget::setContext(class QGLContext *, class QGLContext const *, bool) + ?d_func@QGLPixelBuffer@@ABEPBVQGLPixelBufferPrivate@@XZ @ 146 NONAME ; class QGLPixelBufferPrivate const * QGLPixelBuffer::d_func(void) const + ?getStaticMetaObject@QGLSignalProxy@@SAABUQMetaObject@@XZ @ 147 NONAME ; struct QMetaObject const & QGLSignalProxy::getStaticMetaObject(void) + ?setState@QGL2PaintEngineEx@@UAEXPAVQPainterState@@@Z @ 148 NONAME ; void QGL2PaintEngineEx::setState(class QPainterState *) + ?addShader@QGLShaderProgram@@QAE_NPAVQGLShader@@@Z @ 149 NONAME ; bool QGLShaderProgram::addShader(class QGLShader *) + ?hasOpenGLShaderPrograms@QGLShaderProgram@@SA_NPBVQGLContext@@@Z @ 150 NONAME ; bool QGLShaderProgram::hasOpenGLShaderPrograms(class QGLContext const *) + ?plane@QGLFormat@@QBEHXZ @ 151 NONAME ; int QGLFormat::plane(void) const + ??0QGLFormat@@QAE@XZ @ 152 NONAME ; QGLFormat::QGLFormat(void) + ?renderText@QGLWidget@@QAEXNNNABVQString@@ABVQFont@@H@Z @ 153 NONAME ; void QGLWidget::renderText(double, double, double, class QString const &, class QFont const &, int) + ?setAttributeArray@QGLShaderProgram@@QAEXPBDIPBXHH@Z @ 154 NONAME ; void QGLShaderProgram::setAttributeArray(char const *, unsigned int, void const *, int, int) + ?hasOpenGLFramebufferBlit@QGLFramebufferObject@@SA_NXZ @ 155 NONAME ; bool QGLFramebufferObject::hasOpenGLFramebufferBlit(void) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQVector2D@@@Z @ 156 NONAME ; void QGLShaderProgram::setUniformValue(int, class QVector2D const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBVQVector2D@@H@Z @ 157 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QVector2D const *, int) + ??1QGLContext@@UAE@XZ @ 158 NONAME ; QGLContext::~QGLContext(void) + ?drawTexture@QGLContext@@QAEXABVQRectF@@II@Z @ 159 NONAME ; void QGLContext::drawTexture(class QRectF const &, unsigned int, unsigned int) + ??1QGLCustomShaderStage@@UAE@XZ @ 160 NONAME ; QGLCustomShaderStage::~QGLCustomShaderStage(void) + ?state@QGL2PaintEngineEx@@QBEPBVQOpenGL2PaintEngineState@@XZ @ 161 NONAME ; class QOpenGL2PaintEngineState const * QGL2PaintEngineEx::state(void) const + ?setUniformValue@QGLShaderProgram@@QAEXPBDM@Z @ 162 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float) + ?tr@QGLShaderProgram@@SA?AVQString@@PBD0@Z @ 163 NONAME ; class QString QGLShaderProgram::tr(char const *, char const *) + ?setHasComplexGeometry@QGLEngineShaderManager@@QAEX_N@Z @ 164 NONAME ; void QGLEngineShaderManager::setHasComplexGeometry(bool) + ?devType@QGLPaintDevice@@UBEHXZ @ 165 NONAME ; int QGLPaintDevice::devType(void) const + ?setDepthBufferSize@QGLFormat@@QAEXH@Z @ 166 NONAME ; void QGLFormat::setDepthBufferSize(int) + ?attributeLocation@QGLShaderProgram@@QBEHABVQString@@@Z @ 167 NONAME ; int QGLShaderProgram::attributeLocation(class QString const &) const + ?isSharing@QGLWidget@@QBE_NXZ @ 168 NONAME ; bool QGLWidget::isSharing(void) const + ?brushChanged@QGL2PaintEngineEx@@UAEXXZ @ 169 NONAME ; void QGL2PaintEngineEx::brushChanged(void) + ?bind@QGLShaderProgram@@QAE_NXZ @ 170 NONAME ; bool QGLShaderProgram::bind(void) + ?fill@QGLPixmapData@@UAEXABVQColor@@@Z @ 171 NONAME ; void QGLPixmapData::fill(class QColor const &) + ?staticMetaObject@QGLShaderProgram@@2UQMetaObject@@B @ 172 NONAME ; struct QMetaObject const QGLShaderProgram::staticMetaObject + ?setPlane@QGLFormat@@QAEXH@Z @ 173 NONAME ; void QGLFormat::setPlane(int) + ?setGeometryOutputType@QGLShaderProgram@@QAEXI@Z @ 174 NONAME ; void QGLShaderProgram::setGeometryOutputType(unsigned int) + ?setAccumBufferSize@QGLFormat@@QAEXH@Z @ 175 NONAME ; void QGLFormat::setAccumBufferSize(int) + ?detach@QGLFramebufferObjectFormat@@AAEXXZ @ 176 NONAME ; void QGLFramebufferObjectFormat::detach(void) + ?testOption@QGLFormat@@QBE_NV?$QFlags@W4FormatOption@QGL@@@@@Z @ 177 NONAME ; bool QGLFormat::testOption(class QFlags<enum QGL::FormatOption>) const + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$01$03M@@H@Z @ 178 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<2, 4, float> const *, int) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDABVQColor@@@Z @ 179 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, class QColor const &) + ?devType@QGLPixelBuffer@@MBEHXZ @ 180 NONAME ; int QGLPixelBuffer::devType(void) const + ?doubleBuffer@QGLFormat@@QBE_NXZ @ 181 NONAME ; bool QGLFormat::doubleBuffer(void) const + ?setUniformsDirty@QGLCustomShaderStage@@QAEXXZ @ 182 NONAME ; void QGLCustomShaderStage::setUniformsDirty(void) + ?setAttributeValue@QGLShaderProgram@@QAEXHMM@Z @ 183 NONAME ; void QGLShaderProgram::setAttributeValue(int, float, float) + ?setAttributeArray@QGLShaderProgram@@QAEXPBDPBMHH@Z @ 184 NONAME ; void QGLShaderProgram::setAttributeArray(char const *, float const *, int, int) + ?getStaticMetaObject@QGLEngineShaderManager@@SAABUQMetaObject@@XZ @ 185 NONAME ; struct QMetaObject const & QGLEngineShaderManager::getStaticMetaObject(void) + ?setVersion@QGLFormat@@QAEXHH@Z @ 186 NONAME ; void QGLFormat::setVersion(int, int) + ?grabFrameBuffer@QGLWidget@@QAE?AVQImage@@_N@Z @ 187 NONAME ; class QImage QGLWidget::grabFrameBuffer(bool) + ?hasOpenGL@QGLFormat@@SA_NXZ @ 188 NONAME ; bool QGLFormat::hasOpenGL(void) + ?setInitialized@QGLContext@@IAEX_N@Z @ 189 NONAME ; void QGLContext::setInitialized(bool) + ?copyBackFromRenderFbo@QGLPixmapData@@ABEX_N@Z @ 190 NONAME ; void QGLPixmapData::copyBackFromRenderFbo(bool) const + ??0QGLBuffer@@QAE@ABV0@@Z @ 191 NONAME ; QGLBuffer::QGLBuffer(class QGLBuffer const &) + ?attachment@QGLFramebufferObject@@QBE?AW4Attachment@1@XZ @ 192 NONAME ; enum QGLFramebufferObject::Attachment QGLFramebufferObject::attachment(void) const + ?createCompatiblePixmapData@QGLPixmapData@@UBEPAVQPixmapData@@XZ @ 193 NONAME ; class QPixmapData * QGLPixmapData::createCompatiblePixmapData(void) const + ?detach@QGLFormat@@AAEXXZ @ 194 NONAME ; void QGLFormat::detach(void) + ??9QGLFramebufferObjectFormat@@QBE_NABV0@@Z @ 195 NONAME ; bool QGLFramebufferObjectFormat::operator!=(class QGLFramebufferObjectFormat const &) const + ?endPaint@QGLWindowSurface@@UAEXABVQRegion@@@Z @ 196 NONAME ; void QGLWindowSurface::endPaint(class QRegion const &) + ?findNearest@QGLColormap@@QBEHI@Z @ 197 NONAME ; int QGLColormap::findNearest(unsigned int) const + ?toImage@QGLPixmapData@@UBE?AVQImage@@XZ @ 198 NONAME ; class QImage QGLPixmapData::toImage(void) const + ??_EQGLShader@@UAE@I@Z @ 199 NONAME ; QGLShader::~QGLShader(unsigned int) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBHH@Z @ 200 NONAME ; void QGLShaderProgram::setUniformValueArray(int, int const *, int) + ?d_func@QGLFramebufferObject@@AAEPAVQGLFramebufferObjectPrivate@@XZ @ 201 NONAME ; class QGLFramebufferObjectPrivate * QGLFramebufferObject::d_func(void) + ?trUtf8@QGLWidget@@SA?AVQString@@PBD0H@Z @ 202 NONAME ; class QString QGLWidget::trUtf8(char const *, char const *, int) + ?qt_metacast@QGraphicsShaderEffect@@UAEPAXPBD@Z @ 203 NONAME ; void * QGraphicsShaderEffect::qt_metacast(char const *) + ?init@QGLShaderProgram@@AAE_NXZ @ 204 NONAME ; bool QGLShaderProgram::init(void) + ?doneCurrent@QGLWidget@@QAEXXZ @ 205 NONAME ; void QGLWidget::doneCurrent(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$02$02M@@@Z @ 206 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<3, 3, float> const &) + ?setUniformValue@QGLShaderProgram@@QAEXPBDMMMM@Z @ 207 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float, float, float, float) + ?requestedFormat@QGLContext@@QBE?AVQGLFormat@@XZ @ 208 NONAME ; class QGLFormat QGLContext::requestedFormat(void) const + ?fillTexture@QGLTextureGlyphCache@@UAEXABUCoord@QTextureGlyphCache@@I@Z @ 209 NONAME ; void QGLTextureGlyphCache::fillTexture(struct QTextureGlyphCache::Coord const &, unsigned int) + ?isNativePaintingActive@QGL2PaintEngineEx@@QBE_NXZ @ 210 NONAME ; bool QGL2PaintEngineEx::isNativePaintingActive(void) const + ?accumBufferSize@QGLFormat@@QBEHXZ @ 211 NONAME ; int QGLFormat::accumBufferSize(void) const + ?setAttributeValue@QGLShaderProgram@@QAEXHPBMHH@Z @ 212 NONAME ; void QGLShaderProgram::setAttributeValue(int, float const *, int, int) + ?doubleBuffer@QGLWidget@@QBE_NXZ @ 213 NONAME ; bool QGLWidget::doubleBuffer(void) const + ?bindTexture@QGLContext@@QAEIABVQString@@@Z @ 214 NONAME ; unsigned int QGLContext::bindTexture(class QString const &) + ??0QGLFramebufferObject@@QAE@ABVQSize@@ABVQGLFramebufferObjectFormat@@@Z @ 215 NONAME ; QGLFramebufferObject::QGLFramebufferObject(class QSize const &, class QGLFramebufferObjectFormat const &) + ?bind@QGLFramebufferObject@@QAE_NXZ @ 216 NONAME ; bool QGLFramebufferObject::bind(void) + ?stroke@QGL2PaintEngineEx@@UAEXABVQVectorPath@@ABVQPen@@@Z @ 217 NONAME ; void QGL2PaintEngineEx::stroke(class QVectorPath const &, class QPen const &) + ?format@QGLWidget@@QBE?AVQGLFormat@@XZ @ 218 NONAME ; class QGLFormat QGLWidget::format(void) const + ?qt_metacall@QGLWidget@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 219 NONAME ; int QGLWidget::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQSizeF@@@Z @ 220 NONAME ; void QGLShaderProgram::setUniformValue(int, class QSizeF const &) + ?setGreenBufferSize@QGLFormat@@QAEXH@Z @ 221 NONAME ; void QGLFormat::setGreenBufferSize(int) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDM@Z @ 222 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, float) + ?setAttributeArray@QGLShaderProgram@@QAEXHPBVQVector4D@@H@Z @ 223 NONAME ; void QGLShaderProgram::setAttributeArray(int, class QVector4D const *, int) + ?setValid@QGLContext@@IAEX_N@Z @ 224 NONAME ; void QGLContext::setValid(bool) + ?trUtf8@QGraphicsShaderEffect@@SA?AVQString@@PBD0@Z @ 225 NONAME ; class QString QGraphicsShaderEffect::trUtf8(char const *, char const *) + ?aboutToDestroyContext@QGLSignalProxy@@IAEXPBVQGLContext@@@Z @ 226 NONAME ; void QGLSignalProxy::aboutToDestroyContext(class QGLContext const *) + ??0QGraphicsShaderEffect@@QAE@PAVQObject@@@Z @ 227 NONAME ; QGraphicsShaderEffect::QGraphicsShaderEffect(class QObject *) + ?deviceIsPixmap@QGLContext@@IBE_NXZ @ 228 NONAME ; bool QGLContext::deviceIsPixmap(void) const + ??1QGraphicsShaderEffect@@UAE@XZ @ 229 NONAME ; QGraphicsShaderEffect::~QGraphicsShaderEffect(void) + ??1QGLPaintDevice@@UAE@XZ @ 230 NONAME ; QGLPaintDevice::~QGLPaintDevice(void) + ?setGeometryInputType@QGLShaderProgram@@QAEXI@Z @ 231 NONAME ; void QGLShaderProgram::setGeometryInputType(unsigned int) + ?isValid@QGLPixmapData@@ABE_NXZ @ 232 NONAME ; bool QGLPixmapData::isValid(void) const + ?cleanup@QGLContextResource@@QAEXPBVQGLContext@@PAX@Z @ 233 NONAME ; void QGLContextResource::cleanup(class QGLContext const *, void *) + ?context@QGLWidget@@QBEPBVQGLContext@@XZ @ 234 NONAME ; class QGLContext const * QGLWidget::context(void) const + ?tr@QGLShaderProgram@@SA?AVQString@@PBD0H@Z @ 235 NONAME ; class QString QGLShaderProgram::tr(char const *, char const *, int) + ??0QGLPixelBuffer@@QAE@HHABVQGLFormat@@PAVQGLWidget@@@Z @ 236 NONAME ; QGLPixelBuffer::QGLPixelBuffer(int, int, class QGLFormat const &, class QGLWidget *) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$01$03M@@H@Z @ 237 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<2, 4, float> const *, int) + ?release@QGLFramebufferObject@@QAE_NXZ @ 238 NONAME ; bool QGLFramebufferObject::release(void) + ?chooseContext@QGLContext@@MAE_NPBV1@@Z @ 239 NONAME ; bool QGLContext::chooseContext(class QGLContext const *) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$02$01M@@H@Z @ 240 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<3, 2, float> const *, int) + ?greenBufferSize@QGLFormat@@QBEHXZ @ 241 NONAME ; int QGLFormat::greenBufferSize(void) const + ?detach@QGLColormap@@QAEXXZ @ 242 NONAME ; void QGLColormap::detach(void) + ??0QGLWidget@@QAE@ABVQGLFormat@@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z @ 243 NONAME ; QGLWidget::QGLWidget(class QGLFormat const &, class QWidget *, class QGLWidget const *, class QFlags<enum Qt::WindowType>) + ?allocate@QGLBuffer@@QAEXPBXH@Z @ 244 NONAME ; void QGLBuffer::allocate(void const *, int) + ?setDirty@QGLEngineShaderManager@@QAEXXZ @ 245 NONAME ; void QGLEngineShaderManager::setDirty(void) + ?setCustomStage@QGLEngineShaderManager@@QAEXPAVQGLCustomShaderStage@@@Z @ 246 NONAME ; void QGLEngineShaderManager::setCustomStage(class QGLCustomShaderStage *) + ?programId@QGLShaderProgram@@QBEIXZ @ 247 NONAME ; unsigned int QGLShaderProgram::programId(void) const + ?glyphPadding@QGLTextureGlyphCache@@UBEHXZ @ 248 NONAME ; int QGLTextureGlyphCache::glyphPadding(void) const + ?texture@QGLFramebufferObject@@QBEIXZ @ 249 NONAME ; unsigned int QGLFramebufferObject::texture(void) const + ??0QGLFramebufferObject@@QAE@HHI@Z @ 250 NONAME ; QGLFramebufferObject::QGLFramebufferObject(int, int, unsigned int) + ?size@QGLBuffer@@QBEHXZ @ 251 NONAME ; int QGLBuffer::size(void) const + ?maxGeometryOutputVertices@QGLShaderProgram@@QBEHXZ @ 252 NONAME ; int QGLShaderProgram::maxGeometryOutputVertices(void) const + ?setAttributeBuffer@QGLShaderProgram@@QAEXPBDIHHH@Z @ 253 NONAME ; void QGLShaderProgram::setAttributeBuffer(char const *, unsigned int, int, int, int) + ?setOverlay@QGLFormat@@QAEX_N@Z @ 254 NONAME ; void QGLFormat::setOverlay(bool) + ?beginPaint@QGLWindowSurface@@UAEXABVQRegion@@@Z @ 255 NONAME ; void QGLWindowSurface::beginPaint(class QRegion const &) + ?compileSourceCode@QGLShader@@QAE_NPBD@Z @ 256 NONAME ; bool QGLShader::compileSourceCode(char const *) + ?createWindowSurface@QGLGraphicsSystem@@UBEPAVQWindowSurface@@PAVQWidget@@@Z @ 257 NONAME ; class QWindowSurface * QGLGraphicsSystem::createWindowSurface(class QWidget *) const + ?shaderId@QGLShader@@QBEIXZ @ 258 NONAME ; unsigned int QGLShader::shaderId(void) const + ?ensureActive@QGL2PaintEngineEx@@QAEXXZ @ 259 NONAME ; void QGL2PaintEngineEx::ensureActive(void) + ?qt_metacall@QGLEngineShaderManager@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 260 NONAME ; int QGLEngineShaderManager::qt_metacall(enum QMetaObject::Call, int, void * *) + ?drawTexture@QGLWidget@@QAEXABVQPointF@@II@Z @ 261 NONAME ; void QGLWidget::drawTexture(class QPointF const &, unsigned int, unsigned int) + ?setStencil@QGLFormat@@QAEX_N@Z @ 262 NONAME ; void QGLFormat::setStencil(bool) + ?type@QGL2PaintEngineEx@@UBE?AW4Type@QPaintEngine@@XZ @ 263 NONAME ; enum QPaintEngine::Type QGL2PaintEngineEx::type(void) const + ?compileSourceFile@QGLShader@@QAE_NABVQString@@@Z @ 264 NONAME ; bool QGLShader::compileSourceFile(class QString const &) + ?d_func@QGraphicsShaderEffect@@ABEPBVQGraphicsShaderEffectPrivate@@XZ @ 265 NONAME ; class QGraphicsShaderEffectPrivate const * QGraphicsShaderEffect::d_func(void) const + ?deleteTexture@QGLWidget@@QAEXI@Z @ 266 NONAME ; void QGLWidget::deleteTexture(unsigned int) + ?tr@QGLWindowSurface@@SA?AVQString@@PBD0H@Z @ 267 NONAME ; class QString QGLWindowSurface::tr(char const *, char const *, int) + ?d_func@QGLBuffer@@ABEPBVQGLBufferPrivate@@XZ @ 268 NONAME ; class QGLBufferPrivate const * QGLBuffer::d_func(void) const + ?buffer@QGLWindowSurface@@UAEPAVQImage@@PBVQWidget@@@Z @ 269 NONAME ; class QImage * QGLWindowSurface::buffer(class QWidget const *) + ?texture@QGLTextureGlyphCache@@QBEIXZ @ 270 NONAME ; unsigned int QGLTextureGlyphCache::texture(void) const + ?staticMetaObject@QGraphicsShaderEffect@@2UQMetaObject@@B @ 271 NONAME ; struct QMetaObject const QGraphicsShaderEffect::staticMetaObject + ?uniformLocation@QGLShaderProgram@@QBEHPBD@Z @ 272 NONAME ; int QGLShaderProgram::uniformLocation(char const *) const + ?profile@QGLFormat@@QBE?AW4OpenGLContextProfile@1@XZ @ 273 NONAME ; enum QGLFormat::OpenGLContextProfile QGLFormat::profile(void) const + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$01$03M@@@Z @ 274 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<2, 4, float> const &) + ?bindDefault@QGLFramebufferObject@@SA_NXZ @ 275 NONAME ; bool QGLFramebufferObject::bindDefault(void) + ?internalTextureFormat@QGLFramebufferObjectFormat@@QBEIXZ @ 276 NONAME ; unsigned int QGLFramebufferObjectFormat::internalTextureFormat(void) const + ??4QGLBuffer@@QAEAAV0@ABV0@@Z @ 277 NONAME ; class QGLBuffer & QGLBuffer::operator=(class QGLBuffer const &) + ?bindTexture@QGLWidget@@QAEIABVQImage@@IH@Z @ 278 NONAME ; unsigned int QGLWidget::bindTexture(class QImage const &, unsigned int, int) + ?surfaceFormat@QGLWindowSurface@@2VQGLFormat@@A @ 279 NONAME ; class QGLFormat QGLWindowSurface::surfaceFormat + ??0QGLGraphicsSystem@@QAE@_N@Z @ 280 NONAME ; QGLGraphicsSystem::QGLGraphicsSystem(bool) + ??0QGLShaderProgram@@QAE@PBVQGLContext@@PAVQObject@@@Z @ 281 NONAME ; QGLShaderProgram::QGLShaderProgram(class QGLContext const *, class QObject *) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$03$02M@@H@Z @ 282 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<4, 3, float> const *, int) + ??0QGLShaderProgram@@QAE@PAVQObject@@@Z @ 283 NONAME ; QGLShaderProgram::QGLShaderProgram(class QObject *) + ?qt_metacast@QGLTextureGlyphCache@@UAEPAXPBD@Z @ 284 NONAME ; void * QGLTextureGlyphCache::qt_metacast(char const *) + ?staticMetaObject@QGLEngineShaderManager@@2UQMetaObject@@B @ 285 NONAME ; struct QMetaObject const QGLEngineShaderManager::staticMetaObject + ?setDevice@QGLContext@@IAEXPAVQPaintDevice@@@Z @ 286 NONAME ; void QGLContext::setDevice(class QPaintDevice *) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$02$01M@@H@Z @ 287 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<3, 2, float> const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$03$02M@@@Z @ 288 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<4, 3, float> const &) + ?setAttributeArray@QGLShaderProgram@@QAEXHIPBXHH@Z @ 289 NONAME ; void QGLShaderProgram::setAttributeArray(int, unsigned int, void const *, int, int) + ?tr@QGLTextureGlyphCache@@SA?AVQString@@PBD0H@Z @ 290 NONAME ; class QString QGLTextureGlyphCache::tr(char const *, char const *, int) + ?setDefaultOverlayFormat@QGLFormat@@SAXABV1@@Z @ 291 NONAME ; void QGLFormat::setDefaultOverlayFormat(class QGLFormat const &) + ?qt_gl_share_widget@@YAPAVQGLWidget@@XZ @ 292 NONAME ; class QGLWidget * qt_gl_share_widget(void) + ?initializeOverlayGL@QGLWidget@@MAEXXZ @ 293 NONAME ; void QGLWidget::initializeOverlayGL(void) + ?setUniformValue@QGLShaderProgram@@QAEXHMM@Z @ 294 NONAME ; void QGLShaderProgram::setUniformValue(int, float, float) + ?attributeLocation@QGLShaderProgram@@QBEHPBD@Z @ 295 NONAME ; int QGLShaderProgram::attributeLocation(char const *) const + ?setAttributeArray@QGLShaderProgram@@QAEXPBDPBVQVector3D@@H@Z @ 296 NONAME ; void QGLShaderProgram::setAttributeArray(char const *, class QVector3D const *, int) + ?setInternalTextureFormat@QGLFramebufferObjectFormat@@QAEXI@Z @ 297 NONAME ; void QGLFramebufferObjectFormat::setInternalTextureFormat(unsigned int) + ?glDraw@QGLWidget@@MAEXXZ @ 298 NONAME ; void QGLWidget::glDraw(void) + ?blueBufferSize@QGLFormat@@QBEHXZ @ 299 NONAME ; int QGLFormat::blueBufferSize(void) const + ?createTextureData@QGLTextureGlyphCache@@UAEXHH@Z @ 300 NONAME ; void QGLTextureGlyphCache::createTextureData(int, int) + ?opacityChanged@QGL2PaintEngineEx@@UAEXXZ @ 301 NONAME ; void QGL2PaintEngineEx::opacityChanged(void) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$01$01M@@@Z @ 302 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<2, 2, float> const &) + ?addShaderFromSourceCode@QGLShaderProgram@@QAE_NV?$QFlags@W4ShaderTypeBit@QGLShader@@@@PBD@Z @ 303 NONAME ; bool QGLShaderProgram::addShaderFromSourceCode(class QFlags<enum QGLShader::ShaderTypeBit>, char const *) + ?accum@QGLFormat@@QBE_NXZ @ 304 NONAME ; bool QGLFormat::accum(void) const + ?transformChanged@QGL2PaintEngineEx@@UAEXXZ @ 305 NONAME ; void QGL2PaintEngineEx::transformChanged(void) + ?trUtf8@QGraphicsShaderEffect@@SA?AVQString@@PBD0H@Z @ 306 NONAME ; class QString QGraphicsShaderEffect::trUtf8(char const *, char const *, int) + ?metaObject@QGLWidget@@UBEPBUQMetaObject@@XZ @ 307 NONAME ; struct QMetaObject const * QGLWidget::metaObject(void) const + ?setBlueBufferSize@QGLFormat@@QAEXH@Z @ 308 NONAME ; void QGLFormat::setBlueBufferSize(int) + ?useSimpleProgram@QGLEngineShaderManager@@QAEXXZ @ 309 NONAME ; void QGLEngineShaderManager::useSimpleProgram(void) + ?trUtf8@QGLWidget@@SA?AVQString@@PBD0@Z @ 310 NONAME ; class QString QGLWidget::trUtf8(char const *, char const *) + ??_EQGLPixmapData@@UAE@I@Z @ 311 NONAME ; QGLPixmapData::~QGLPixmapData(unsigned int) + ?setPixelShaderFragment@QGraphicsShaderEffect@@QAEXABVQByteArray@@@Z @ 312 NONAME ; void QGraphicsShaderEffect::setPixelShaderFragment(class QByteArray const &) + ?setAttributeValue@QGLShaderProgram@@QAEXHABVQVector4D@@@Z @ 313 NONAME ; void QGLShaderProgram::setAttributeValue(int, class QVector4D const &) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDMMM@Z @ 314 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, float, float, float) + ??1QGLShader@@UAE@XZ @ 315 NONAME ; QGLShader::~QGLShader(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBIH@Z @ 316 NONAME ; void QGLShaderProgram::setUniformValueArray(int, unsigned int const *, int) + ?fromImage@QGLPixmapData@@UAEXABVQImage@@V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 317 NONAME ; void QGLPixmapData::fromImage(class QImage const &, class QFlags<enum Qt::ImageConversionFlag>) + ?shaderType@QGLShader@@QBE?AV?$QFlags@W4ShaderTypeBit@QGLShader@@@@XZ @ 318 NONAME ; class QFlags<enum QGLShader::ShaderTypeBit> QGLShader::shaderType(void) const + ?reset@QGLContext@@QAEXXZ @ 319 NONAME ; void QGLContext::reset(void) + ??BQGLShareContextScope@@QAEPAVQGLContext@@XZ @ 320 NONAME ; QGLShareContextScope::operator class QGLContext *(void) + ?createPixmapData@QGLGraphicsSystem@@UBEPAVQPixmapData@@W4PixelType@2@@Z @ 321 NONAME ; class QPixmapData * QGLGraphicsSystem::createPixmapData(enum QPixmapData::PixelType) const + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBVQVector3D@@H@Z @ 322 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QVector3D const *, int) + ?paintOverlayGL@QGLWidget@@MAEXXZ @ 323 NONAME ; void QGLWidget::paintOverlayGL(void) + ??6@YA?AVQDebug@@V0@ABVQGLFormat@@@Z @ 324 NONAME ; class QDebug operator<<(class QDebug, class QGLFormat const &) + ?ensureActiveTarget@QGLPaintDevice@@UAEXXZ @ 325 NONAME ; void QGLPaintDevice::ensureActiveTarget(void) + ?swapInterval@QGLFormat@@QBEHXZ @ 326 NONAME ; int QGLFormat::swapInterval(void) const + ?setUniformValue@QGLShaderProgram@@QAEXHM@Z @ 327 NONAME ; void QGLShaderProgram::setUniformValue(int, float) + ?map@QGLBuffer@@QAEPAXW4Access@1@@Z @ 328 NONAME ; void * QGLBuffer::map(enum QGLBuffer::Access) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQTransform@@@Z @ 329 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QTransform const &) + ?shaders@QGLShaderProgram@@QBE?AV?$QList@PAVQGLShader@@@@XZ @ 330 NONAME ; class QList<class QGLShader *> QGLShaderProgram::shaders(void) const + ?drawTexture@QGLPixelBuffer@@QAEXABVQRectF@@II@Z @ 331 NONAME ; void QGLPixelBuffer::drawTexture(class QRectF const &, unsigned int, unsigned int) + ??1QGLSharedResourceGuard@@QAE@XZ @ 332 NONAME ; QGLSharedResourceGuard::~QGLSharedResourceGuard(void) + ?textureCacheLimit@QGLContext@@SAHXZ @ 333 NONAME ; int QGLContext::textureCacheLimit(void) + ??0QGLPaintDevice@@QAE@XZ @ 334 NONAME ; QGLPaintDevice::QGLPaintDevice(void) + ??0QGLColormap@@QAE@ABV0@@Z @ 335 NONAME ; QGLColormap::QGLColormap(class QGLColormap const &) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQSizeF@@@Z @ 336 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QSizeF const &) + ?tr@QGLWindowSurface@@SA?AVQString@@PBD0@Z @ 337 NONAME ; class QString QGLWindowSurface::tr(char const *, char const *) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$03$02M@@H@Z @ 338 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<4, 3, float> const *, int) + ?setAutoBufferSwap@QGLWidget@@IAEX_N@Z @ 339 NONAME ; void QGLWidget::setAutoBufferSwap(bool) + ?isSharing@QGLContext@@QBE_NXZ @ 340 NONAME ; bool QGLContext::isSharing(void) const + ?setAttributeValue@QGLShaderProgram@@QAEXHMMMM@Z @ 341 NONAME ; void QGLShaderProgram::setAttributeValue(int, float, float, float, float) + ?metaObject@QGLEngineShaderManager@@UBEPBUQMetaObject@@XZ @ 342 NONAME ; struct QMetaObject const * QGLEngineShaderManager::metaObject(void) const + ?metaObject@QGraphicsShaderEffect@@UBEPBUQMetaObject@@XZ @ 343 NONAME ; struct QMetaObject const * QGraphicsShaderEffect::metaObject(void) const + ?setSampleBuffers@QGLFormat@@QAEX_N@Z @ 344 NONAME ; void QGLFormat::setSampleBuffers(bool) + ?trUtf8@QGLShader@@SA?AVQString@@PBD0@Z @ 345 NONAME ; class QString QGLShader::trUtf8(char const *, char const *) + ??4QGLFormat@@QAEAAV0@ABV0@@Z @ 346 NONAME ; class QGLFormat & QGLFormat::operator=(class QGLFormat const &) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDABVQVector3D@@@Z @ 347 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, class QVector3D const &) + ??_EQGLSignalProxy@@UAE@I@Z @ 348 NONAME ; QGLSignalProxy::~QGLSignalProxy(unsigned int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQVector4D@@@Z @ 349 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QVector4D const &) + ?setUniformValue@QGLShaderProgram@@QAEXHMMMM@Z @ 350 NONAME ; void QGLShaderProgram::setUniformValue(int, float, float, float, float) + ?generateFontDisplayLists@QGLContext@@IAEXABVQFont@@H@Z @ 351 NONAME ; void QGLContext::generateFontDisplayLists(class QFont const &, int) + ?setAttributeValue@QGLShaderProgram@@QAEXHABVQVector2D@@@Z @ 352 NONAME ; void QGLShaderProgram::setAttributeValue(int, class QVector2D const &) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$02$03M@@@Z @ 353 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<3, 4, float> const &) + ?d_func@QGLShaderProgram@@AAEPAVQGLShaderProgramPrivate@@XZ @ 354 NONAME ; class QGLShaderProgramPrivate * QGLShaderProgram::d_func(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBHH@Z @ 355 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, int const *, int) + ??_EQGL2PaintEngineEx@@UAE@I@Z @ 356 NONAME ; QGL2PaintEngineEx::~QGL2PaintEngineEx(unsigned int) + ??0QGLFramebufferObject@@QAE@ABVQSize@@W4Attachment@0@II@Z @ 357 NONAME ; QGLFramebufferObject::QGLFramebufferObject(class QSize const &, enum QGLFramebufferObject::Attachment, unsigned int, unsigned int) + ??_EQGLEngineShaderManager@@UAE@I@Z @ 358 NONAME ; QGLEngineShaderManager::~QGLEngineShaderManager(unsigned int) + ?d_func@QGLFramebufferObject@@ABEPBVQGLFramebufferObjectPrivate@@XZ @ 359 NONAME ; class QGLFramebufferObjectPrivate const * QGLFramebufferObject::d_func(void) const + ?tr@QGLShader@@SA?AVQString@@PBD0H@Z @ 360 NONAME ; class QString QGLShader::tr(char const *, char const *, int) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBVQVector4D@@H@Z @ 361 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QVector4D const *, int) + ?addShaderFromSourceFile@QGLShaderProgram@@QAE_NV?$QFlags@W4ShaderTypeBit@QGLShader@@@@ABVQString@@@Z @ 362 NONAME ; bool QGLShaderProgram::addShaderFromSourceFile(class QFlags<enum QGLShader::ShaderTypeBit>, class QString const &) + ?copy@QGLPixmapData@@UAEXPBVQPixmapData@@ABVQRect@@@Z @ 363 NONAME ; void QGLPixmapData::copy(class QPixmapData const *, class QRect const &) + ?samples@QGLFramebufferObjectFormat@@QBEHXZ @ 364 NONAME ; int QGLFramebufferObjectFormat::samples(void) const + ?setInactive@QGLCustomShaderStage@@QAEXXZ @ 365 NONAME ; void QGLCustomShaderStage::setInactive(void) + ?extensionFuncs@QGLContextPrivate@@SAAAUQGLExtensionFuncs@@PBVQGLContext@@@Z @ 366 NONAME ; struct QGLExtensionFuncs & QGLContextPrivate::extensionFuncs(class QGLContext const *) + ?value@QGLContextResource@@QAEPAXPBVQGLContext@@@Z @ 367 NONAME ; void * QGLContextResource::value(class QGLContext const *) + ?majorVersion@QGLFormat@@QBEHXZ @ 368 NONAME ; int QGLFormat::majorVersion(void) const + ?rgba@QGLFormat@@QBE_NXZ @ 369 NONAME ; bool QGLFormat::rgba(void) const + ?paintDevice@QGLWindowSurface@@UAEPAVQPaintDevice@@XZ @ 370 NONAME ; class QPaintDevice * QGLWindowSurface::paintDevice(void) + ?setStencilBufferSize@QGLFormat@@QAEXH@Z @ 371 NONAME ; void QGLFormat::setStencilBufferSize(int) + ??1QGLEngineShaderManager@@UAE@XZ @ 372 NONAME ; QGLEngineShaderManager::~QGLEngineShaderManager(void) + ?qt_metacall@QGLShaderProgram@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 373 NONAME ; int QGLShaderProgram::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQVector2D@@@Z @ 374 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QVector2D const &) + ?bind@QGLPixmapData@@QBEI_N@Z @ 375 NONAME ; unsigned int QGLPixmapData::bind(bool) const + ?setDepth@QGLFormat@@QAEX_N@Z @ 376 NONAME ; void QGLFormat::setDepth(bool) + ?paintGL@QGLWidget@@MAEXXZ @ 377 NONAME ; void QGLWidget::paintGL(void) + ??0QGLContext@@QAE@ABVQGLFormat@@PAVQPaintDevice@@@Z @ 378 NONAME ; QGLContext::QGLContext(class QGLFormat const &, class QPaintDevice *) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$02$01M@@@Z @ 379 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<3, 2, float> const &) + ?drawPixmap@QGL2PaintEngineEx@@UAEXABVQRectF@@ABVQPixmap@@0@Z @ 380 NONAME ; void QGL2PaintEngineEx::drawPixmap(class QRectF const &, class QPixmap const &, class QRectF const &) + ?getUniformLocation@QGLEngineShaderManager@@QAEIW4Uniform@1@@Z @ 381 NONAME ; unsigned int QGLEngineShaderManager::getUniformLocation(enum QGLEngineShaderManager::Uniform) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$01$02M@@H@Z @ 382 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<2, 3, float> const *, int) + ??0QGLEngineShaderManager@@QAE@PAVQGLContext@@@Z @ 383 NONAME ; QGLEngineShaderManager::QGLEngineShaderManager(class QGLContext *) + ?deleted@QGLWindowSurface@@AAEXPAVQObject@@@Z @ 384 NONAME ; void QGLWindowSurface::deleted(class QObject *) + ?source@QGLCustomShaderStage@@QBE?AVQByteArray@@XZ @ 385 NONAME ; class QByteArray QGLCustomShaderStage::source(void) const + ?d_func@QGLPixelBuffer@@AAEPAVQGLPixelBufferPrivate@@XZ @ 386 NONAME ; class QGLPixelBufferPrivate * QGLPixelBuffer::d_func(void) + ??4QGLColormap@@QAEAAV0@ABV0@@Z @ 387 NONAME ; class QGLColormap & QGLColormap::operator=(class QGLColormap const &) + ?find@QGLColormap@@QBEHI@Z @ 388 NONAME ; int QGLColormap::find(unsigned int) const + ??1QGLColormap@@QAE@XZ @ 389 NONAME ; QGLColormap::~QGLColormap(void) + ?toImage@QGLPixelBuffer@@QBE?AVQImage@@XZ @ 390 NONAME ; class QImage QGLPixelBuffer::toImage(void) const + ?hasOpenGLOverlays@QGLFormat@@SA_NXZ @ 391 NONAME ; bool QGLFormat::hasOpenGLOverlays(void) + ?setMouseTracking@QGLWidget@@QAEX_N@Z @ 392 NONAME ; void QGLWidget::setMouseTracking(bool) + ?type@QGLBuffer@@QBE?AW4Type@1@XZ @ 393 NONAME ; enum QGLBuffer::Type QGLBuffer::type(void) const + ?fontDisplayListBase@QGLWidget@@IAEHABVQFont@@H@Z @ 394 NONAME ; int QGLWidget::fontDisplayListBase(class QFont const &, int) + ?addShaderFromSourceCode@QGLShaderProgram@@QAE_NV?$QFlags@W4ShaderTypeBit@QGLShader@@@@ABVQByteArray@@@Z @ 395 NONAME ; bool QGLShaderProgram::addShaderFromSourceCode(class QFlags<enum QGLShader::ShaderTypeBit>, class QByteArray const &) + ?bindTexture@QGLContext@@QAEIABVQPixmap@@IH@Z @ 396 NONAME ; unsigned int QGLContext::bindTexture(class QPixmap const &, unsigned int, int) + ?d_func@QGLWidget@@ABEPBVQGLWidgetPrivate@@XZ @ 397 NONAME ; class QGLWidgetPrivate const * QGLWidget::d_func(void) const + ?metric@QGLPaintDevice@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 398 NONAME ; int QGLPaintDevice::metric(enum QPaintDevice::PaintDeviceMetric) const + ?drawTexture@QGLWidget@@QAEXABVQRectF@@II@Z @ 399 NONAME ; void QGLWidget::drawTexture(class QRectF const &, unsigned int, unsigned int) + ?isValid@QGLWidget@@QBE_NXZ @ 400 NONAME ; bool QGLWidget::isValid(void) const + ?shared_null@QGLColormap@@0UQGLColormapData@1@A @ 401 NONAME ; struct QGLColormap::QGLColormapData QGLColormap::shared_null + ?setUniformValue@QGLShaderProgram@@QAEXPBDQAY01M@Z @ 402 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float [2] * const) + ?insert@QGLContextResource@@QAEXPBVQGLContext@@PAX@Z @ 403 NONAME ; void QGLContextResource::insert(class QGLContext const *, void *) + ??0QGLCustomShaderStage@@QAE@XZ @ 404 NONAME ; QGLCustomShaderStage::QGLCustomShaderStage(void) + ?setDefaultFormat@QGLFormat@@SAXABV1@@Z @ 405 NONAME ; void QGLFormat::setDefaultFormat(class QGLFormat const &) + ?sourceCode@QGLShader@@QBE?AVQByteArray@@XZ @ 406 NONAME ; class QByteArray QGLShader::sourceCode(void) const + ??8QGLFramebufferObjectFormat@@QBE_NABV0@@Z @ 407 NONAME ; bool QGLFramebufferObjectFormat::operator==(class QGLFramebufferObjectFormat const &) const + ?detach_helper@QGLColormap@@AAEXXZ @ 408 NONAME ; void QGLColormap::detach_helper(void) + ?setUniformValue@QGLShaderProgram@@QAEXHQAY01M@Z @ 409 NONAME ; void QGLShaderProgram::setUniformValue(int, float [2] * const) + ?compileSourceCode@QGLShader@@QAE_NABVQString@@@Z @ 410 NONAME ; bool QGLShader::compileSourceCode(class QString const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBVQMatrix4x4@@H@Z @ 411 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QMatrix4x4 const *, int) + ?invalidateState@QGL2PaintEngineEx@@QAEXXZ @ 412 NONAME ; void QGL2PaintEngineEx::invalidateState(void) + ?scroll@QGLWindowSurface@@UAE_NABVQRegion@@HH@Z @ 413 NONAME ; bool QGLWindowSurface::scroll(class QRegion const &, int, int) + ??4QGLFramebufferObjectFormat@@QAEAAV0@ABV0@@Z @ 414 NONAME ; class QGLFramebufferObjectFormat & QGLFramebufferObjectFormat::operator=(class QGLFramebufferObjectFormat const &) + ?bindAttributeLocation@QGLShaderProgram@@QAEXABVQByteArray@@H@Z @ 415 NONAME ; void QGLShaderProgram::bindAttributeLocation(class QByteArray const &, int) + ?pixelShaderFragment@QGraphicsShaderEffect@@QBE?AVQByteArray@@XZ @ 416 NONAME ; class QByteArray QGraphicsShaderEffect::pixelShaderFragment(void) const + ?size@QGLColormap@@QBEHXZ @ 417 NONAME ; int QGLColormap::size(void) const + ??0QGLShareContextScope@@QAE@PBVQGLContext@@@Z @ 418 NONAME ; QGLShareContextScope::QGLShareContextScope(class QGLContext const *) + ?removeAllShaders@QGLShaderProgram@@QAEXXZ @ 419 NONAME ; void QGLShaderProgram::removeAllShaders(void) + ??_EQGLShaderProgram@@UAE@I@Z @ 420 NONAME ; QGLShaderProgram::~QGLShaderProgram(unsigned int) + ?pixmapFilter@QGL2PaintEngineEx@@UAEPAVQPixmapFilter@@HPBV2@@Z @ 421 NONAME ; class QPixmapFilter * QGL2PaintEngineEx::pixmapFilter(int, class QPixmapFilter const *) + ?scroll@QGLPixmapData@@UAE_NHHABVQRect@@@Z @ 422 NONAME ; bool QGLPixmapData::scroll(int, int, class QRect const &) + ?contextDestroyed@QGLTextureGlyphCache@@QAEXPBVQGLContext@@@Z @ 423 NONAME ; void QGLTextureGlyphCache::contextDestroyed(class QGLContext const *) + ??0QGLColormap@@QAE@XZ @ 424 NONAME ; QGLColormap::QGLColormap(void) + ?metric@QGLFramebufferObject@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 425 NONAME ; int QGLFramebufferObject::metric(enum QPaintDevice::PaintDeviceMetric) const + ?devType@QGLFramebufferObject@@MBEHXZ @ 426 NONAME ; int QGLFramebufferObject::devType(void) const + ?isValidContext@QGLPixmapData@@QBE_NPBVQGLContext@@@Z @ 427 NONAME ; bool QGLPixmapData::isValidContext(class QGLContext const *) const + ?directRendering@QGLFormat@@QBE_NXZ @ 428 NONAME ; bool QGLFormat::directRendering(void) const + ?metric@QGLPixelBuffer@@MBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 429 NONAME ; int QGLPixelBuffer::metric(enum QPaintDevice::PaintDeviceMetric) const + ??0QGLSharedResourceGuard@@QAE@PBVQGLContext@@@Z @ 430 NONAME ; QGLSharedResourceGuard::QGLSharedResourceGuard(class QGLContext const *) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$01$03M@@@Z @ 431 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<2, 4, float> const &) + ?trUtf8@QGLShaderProgram@@SA?AVQString@@PBD0@Z @ 432 NONAME ; class QString QGLShaderProgram::trUtf8(char const *, char const *) + ?fill@QGL2PaintEngineEx@@UAEXABVQVectorPath@@ABVQBrush@@@Z @ 433 NONAME ; void QGL2PaintEngineEx::fill(class QVectorPath const &, class QBrush const &) + ?disableAttributeArray@QGLShaderProgram@@QAEXPBD@Z @ 434 NONAME ; void QGLShaderProgram::disableAttributeArray(char const *) + ?paintEngine@QGLPixelBuffer@@UBEPAVQPaintEngine@@XZ @ 435 NONAME ; class QPaintEngine * QGLPixelBuffer::paintEngine(void) const + ?qt_metacall@QGLShader@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 436 NONAME ; int QGLShader::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setUniformValue@QGLShaderProgram@@QAEXHMMM@Z @ 437 NONAME ; void QGLShaderProgram::setUniformValue(int, float, float, float) + ??1QGLFramebufferObject@@UAE@XZ @ 438 NONAME ; QGLFramebufferObject::~QGLFramebufferObject(void) + ?minorVersion@QGLFormat@@QBEHXZ @ 439 NONAME ; int QGLFormat::minorVersion(void) const + ?setAttributeValue@QGLShaderProgram@@QAEXHABVQColor@@@Z @ 440 NONAME ; void QGLShaderProgram::setAttributeValue(int, class QColor const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBVQMatrix4x4@@H@Z @ 441 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QMatrix4x4 const *, int) + ?setAttachment@QGLFramebufferObjectFormat@@QAEXW4Attachment@QGLFramebufferObject@@@Z @ 442 NONAME ; void QGLFramebufferObjectFormat::setAttachment(enum QGLFramebufferObject::Attachment) + ?setSwapInterval@QGLFormat@@QAEXH@Z @ 443 NONAME ; void QGLFormat::setSwapInterval(int) + ?event@QGLWidget@@MAE_NPAVQEvent@@@Z @ 444 NONAME ; bool QGLWidget::event(class QEvent *) + ?initializeGL@QGLWidget@@MAEXXZ @ 445 NONAME ; void QGLWidget::initializeGL(void) + ?setAttributeArray@QGLShaderProgram@@QAEXHPBVQVector3D@@H@Z @ 446 NONAME ; void QGLShaderProgram::setAttributeArray(int, class QVector3D const *, int) + ?hijackWindow@QGLWindowSurface@@AAEXPAVQWidget@@@Z @ 447 NONAME ; void QGLWindowSurface::hijackWindow(class QWidget *) + ?d_func@QGLShader@@ABEPBVQGLShaderPrivate@@XZ @ 448 NONAME ; class QGLShaderPrivate const * QGLShader::d_func(void) const + ?setUniformValue@QGLShaderProgram@@QAEXHABVQPointF@@@Z @ 449 NONAME ; void QGLShaderProgram::setUniformValue(int, class QPointF const &) + ?addShaderFromSourceCode@QGLShaderProgram@@QAE_NV?$QFlags@W4ShaderTypeBit@QGLShader@@@@ABVQString@@@Z @ 450 NONAME ; bool QGLShaderProgram::addShaderFromSourceCode(class QFlags<enum QGLShader::ShaderTypeBit>, class QString const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$02$03M@@H@Z @ 451 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<3, 4, float> const *, int) + ?width@QGLTextureGlyphCache@@QBEHXZ @ 452 NONAME ; int QGLTextureGlyphCache::width(void) const + ?setAttributeValue@QGLShaderProgram@@QAEXHM@Z @ 453 NONAME ; void QGLShaderProgram::setAttributeValue(int, float) + ?resizeOverlayGL@QGLWidget@@MAEXHH@Z @ 454 NONAME ; void QGLWidget::resizeOverlayGL(int, int) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$01$02M@@H@Z @ 455 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<2, 3, float> const *, int) + ?bufferId@QGLBuffer@@QBEIXZ @ 456 NONAME ; unsigned int QGLBuffer::bufferId(void) const + ?disableAttributeArray@QGLShaderProgram@@QAEXH@Z @ 457 NONAME ; void QGLShaderProgram::disableAttributeArray(int) + ?end@QGL2PaintEngineEx@@UAE_NXZ @ 458 NONAME ; bool QGL2PaintEngineEx::end(void) + ??0QGL2PaintEngineEx@@QAE@XZ @ 459 NONAME ; QGL2PaintEngineEx::QGL2PaintEngineEx(void) + ?trUtf8@QGLEngineShaderManager@@SA?AVQString@@PBD0@Z @ 460 NONAME ; class QString QGLEngineShaderManager::trUtf8(char const *, char const *) + ??1QGLTextureGlyphCache@@UAE@XZ @ 461 NONAME ; QGLTextureGlyphCache::~QGLTextureGlyphCache(void) + ?context@QGLSharedResourceGuard@@QBEPBVQGLContext@@XZ @ 462 NONAME ; class QGLContext const * QGLSharedResourceGuard::context(void) const + ?resizeEvent@QGLWidget@@MAEXPAVQResizeEvent@@@Z @ 463 NONAME ; void QGLWidget::resizeEvent(class QResizeEvent *) + ?setDoubleBuffer@QGLFormat@@QAEX_N@Z @ 464 NONAME ; void QGLFormat::setDoubleBuffer(bool) + ??1QGLBuffer@@QAE@XZ @ 465 NONAME ; QGLBuffer::~QGLBuffer(void) + ?id@QGLSharedResourceGuard@@QBEIXZ @ 466 NONAME ; unsigned int QGLSharedResourceGuard::id(void) const + ?d_func@QGL2PaintEngineEx@@AAEPAVQGL2PaintEngineExPrivate@@XZ @ 467 NONAME ; class QGL2PaintEngineExPrivate * QGL2PaintEngineEx::d_func(void) + ?resize@QGLPixmapData@@UAEXHH@Z @ 468 NONAME ; void QGLPixmapData::resize(int, int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$01$01M@@@Z @ 469 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<2, 2, float> const &) + ?trUtf8@QGLTextureGlyphCache@@SA?AVQString@@PBD0H@Z @ 470 NONAME ; class QString QGLTextureGlyphCache::trUtf8(char const *, char const *, int) + ?begin@QGL2PaintEngineEx@@UAE_NPAVQPaintDevice@@@Z @ 471 NONAME ; bool QGL2PaintEngineEx::begin(class QPaintDevice *) + ?samples@QGLFormat@@QBEHXZ @ 472 NONAME ; int QGLFormat::samples(void) const + ?setFormat@QGLContext@@QAEXABVQGLFormat@@@Z @ 473 NONAME ; void QGLContext::setFormat(class QGLFormat const &) + ?trUtf8@QGLSignalProxy@@SA?AVQString@@PBD0@Z @ 474 NONAME ; class QString QGLSignalProxy::trUtf8(char const *, char const *) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQVector3D@@@Z @ 475 NONAME ; void QGLShaderProgram::setUniformValue(int, class QVector3D const &) + ?alphaBufferSize@QGLFormat@@QBEHXZ @ 476 NONAME ; int QGLFormat::alphaBufferSize(void) const + ?deleteTexture@QGLPixelBuffer@@QAEXI@Z @ 477 NONAME ; void QGLPixelBuffer::deleteTexture(unsigned int) + ?qt_qgl_paint_engine@@YAPAVQPaintEngine@@XZ @ 478 NONAME ; class QPaintEngine * qt_qgl_paint_engine(void) + ?trUtf8@QGLSignalProxy@@SA?AVQString@@PBD0H@Z @ 479 NONAME ; class QString QGLSignalProxy::trUtf8(char const *, char const *, int) + ??1QGLWindowSurface@@UAE@XZ @ 480 NONAME ; QGLWindowSurface::~QGLWindowSurface(void) + ?bind@QGLBuffer@@QAE_NXZ @ 481 NONAME ; bool QGLBuffer::bind(void) + ?getStaticMetaObject@QGLWidget@@SAABUQMetaObject@@XZ @ 482 NONAME ; struct QMetaObject const & QGLWidget::getStaticMetaObject(void) + ??_EQGLPixelBuffer@@UAE@I@Z @ 483 NONAME ; QGLPixelBuffer::~QGLPixelBuffer(unsigned int) + ?clipEnabledChanged@QGL2PaintEngineEx@@UAEXXZ @ 484 NONAME ; void QGL2PaintEngineEx::clipEnabledChanged(void) + ??_EQGLGraphicsSystem@@UAE@I@Z @ 485 NONAME ; QGLGraphicsSystem::~QGLGraphicsSystem(unsigned int) + ?endNativePainting@QGL2PaintEngineEx@@UAEXXZ @ 486 NONAME ; void QGL2PaintEngineEx::endNativePainting(void) + ?setFormat@QGLWidget@@QAEXABVQGLFormat@@@Z @ 487 NONAME ; void QGLWidget::setFormat(class QGLFormat const &) + ?setOption@QGLFormat@@QAEXV?$QFlags@W4FormatOption@QGL@@@@@Z @ 488 NONAME ; void QGLFormat::setOption(class QFlags<enum QGL::FormatOption>) + ?shaderDestroyed@QGLShaderProgram@@AAEXXZ @ 489 NONAME ; void QGLShaderProgram::shaderDestroyed(void) + ?qt_metacall@QGLSignalProxy@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 490 NONAME ; int QGLSignalProxy::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setId@QGLSharedResourceGuard@@QAEXI@Z @ 491 NONAME ; void QGLSharedResourceGuard::setId(unsigned int) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$03$01M@@@Z @ 492 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<4, 2, float> const &) + ?makeOverlayCurrent@QGLWidget@@QAEXXZ @ 493 NONAME ; void QGLWidget::makeOverlayCurrent(void) + ?setGeometryOutputVertexCount@QGLShaderProgram@@QAEXH@Z @ 494 NONAME ; void QGLShaderProgram::setGeometryOutputVertexCount(int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQSize@@@Z @ 495 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QSize const &) + ?convertToGLFormat@QGLWidget@@SA?AVQImage@@ABV2@@Z @ 496 NONAME ; class QImage QGLWidget::convertToGLFormat(class QImage const &) + ?staticMetaObject@QGLTextureGlyphCache@@2UQMetaObject@@B @ 497 NONAME ; struct QMetaObject const QGLTextureGlyphCache::staticMetaObject + ??_EQGLContextResource@@QAE@I@Z @ 498 NONAME ; QGLContextResource::~QGLContextResource(unsigned int) + ?handle@QGLColormap@@IAEKXZ @ 499 NONAME ; unsigned long QGLColormap::handle(void) + ?isCreated@QGLBuffer@@QBE_NXZ @ 500 NONAME ; bool QGLBuffer::isCreated(void) const + ?setColormap@QGLWidget@@QAEXABVQGLColormap@@@Z @ 501 NONAME ; void QGLWidget::setColormap(class QGLColormap const &) + ?instance@QGLSignalProxy@@SAPAV1@XZ @ 502 NONAME ; class QGLSignalProxy * QGLSignalProxy::instance(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBIH@Z @ 503 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, unsigned int const *, int) + ?isValid@QGLContext@@QBE_NXZ @ 504 NONAME ; bool QGLContext::isValid(void) const + ?currentCtx@QGLContext@@1PAV1@A @ 505 NONAME ; class QGLContext * QGLContext::currentCtx + ?hasOpenGLFramebufferObjects@QGLFramebufferObject@@SA_NXZ @ 506 NONAME ; bool QGLFramebufferObject::hasOpenGLFramebufferObjects(void) + ?compileSourceCode@QGLShader@@QAE_NABVQByteArray@@@Z @ 507 NONAME ; bool QGLShader::compileSourceCode(class QByteArray const &) + ?colormap@QGLWidget@@QBEABVQGLColormap@@XZ @ 508 NONAME ; class QGLColormap const & QGLWidget::colormap(void) const + ?getStaticMetaObject@QGLShaderProgram@@SAABUQMetaObject@@XZ @ 509 NONAME ; struct QMetaObject const & QGLShaderProgram::getStaticMetaObject(void) + ??_EQGLWidget@@UAE@I@Z @ 510 NONAME ; QGLWidget::~QGLWidget(unsigned int) + ?setStereo@QGLFormat@@QAEX_N@Z @ 511 NONAME ; void QGLFormat::setStereo(bool) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDMM@Z @ 512 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, float, float) + ?setAttributeValue@QGLShaderProgram@@QAEXHMMM@Z @ 513 NONAME ; void QGLShaderProgram::setAttributeValue(int, float, float, float) + ?context@QGLWindowSurface@@QBEPAVQGLContext@@XZ @ 514 NONAME ; class QGLContext * QGLWindowSurface::context(void) const + ?d_func@QGLBuffer@@AAEPAVQGLBufferPrivate@@XZ @ 515 NONAME ; class QGLBufferPrivate * QGLBuffer::d_func(void) + ?textureTarget@QGLFramebufferObjectFormat@@QBEIXZ @ 516 NONAME ; unsigned int QGLFramebufferObjectFormat::textureTarget(void) const + ?needsFill@QGLPixmapData@@ABE_NXZ @ 517 NONAME ; bool QGLPixmapData::needsFill(void) const + ??CQGLShareContextScope@@QAEPAVQGLContext@@XZ @ 518 NONAME ; class QGLContext * QGLShareContextScope::operator->(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDH@Z @ 519 NONAME ; void QGLShaderProgram::setUniformValue(char const *, int) + ?release@QGLBuffer@@SAXW4Type@1@@Z @ 520 NONAME ; void QGLBuffer::release(enum QGLBuffer::Type) + ??0QGLWidget@@QAE@PAVQWidget@@PBV0@V?$QFlags@W4WindowType@Qt@@@@@Z @ 521 NONAME ; QGLWidget::QGLWidget(class QWidget *, class QGLWidget const *, class QFlags<enum Qt::WindowType>) + ?stencilBufferSize@QGLFormat@@QBEHXZ @ 522 NONAME ; int QGLFormat::stencilBufferSize(void) const + ?getStaticMetaObject@QGLShader@@SAABUQMetaObject@@XZ @ 523 NONAME ; struct QMetaObject const & QGLShader::getStaticMetaObject(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDMM@Z @ 524 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float, float) + ?log@QGLShader@@QBE?AVQString@@XZ @ 525 NONAME ; class QString QGLShader::log(void) const + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$02$03M@@H@Z @ 526 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<3, 4, float> const *, int) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$03$01M@@H@Z @ 527 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<4, 2, float> const *, int) + ?qt_metacast@QGLWindowSurface@@UAEPAXPBD@Z @ 528 NONAME ; void * QGLWindowSurface::qt_metacast(char const *) + ?autoBufferSwap@QGLWidget@@IBE_NXZ @ 529 NONAME ; bool QGLWidget::autoBufferSwap(void) const + ?size@QGLFramebufferObject@@QBE?AVQSize@@XZ @ 530 NONAME ; class QSize QGLFramebufferObject::size(void) const + ??1QGL2PaintEngineEx@@UAE@XZ @ 531 NONAME ; QGL2PaintEngineEx::~QGL2PaintEngineEx(void) + ?trUtf8@QGLShader@@SA?AVQString@@PBD0H@Z @ 532 NONAME ; class QString QGLShader::trUtf8(char const *, char const *, int) + ?drawTexture@QGLContext@@QAEXABVQPointF@@II@Z @ 533 NONAME ; void QGLContext::drawTexture(class QPointF const &, unsigned int, unsigned int) + ?defaultOverlayFormat@QGLFormat@@SA?AV1@XZ @ 534 NONAME ; class QGLFormat QGLFormat::defaultOverlayFormat(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$02$03M@@@Z @ 535 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<3, 4, float> const &) + ?allocate@QGLBuffer@@QAEXH@Z @ 536 NONAME ; void QGLBuffer::allocate(int) + ?setAttributeArray@QGLShaderProgram@@QAEXPBDPBVQVector2D@@H@Z @ 537 NONAME ; void QGLShaderProgram::setAttributeArray(char const *, class QVector2D const *, int) + ?d_func@QGLShaderProgram@@ABEPBVQGLShaderProgramPrivate@@XZ @ 538 NONAME ; class QGLShaderProgramPrivate const * QGLShaderProgram::d_func(void) const + ?staticMetaObject@QGLSignalProxy@@2UQMetaObject@@B @ 539 NONAME ; struct QMetaObject const QGLSignalProxy::staticMetaObject + ??_EQGLPaintDevice@@UAE@I@Z @ 540 NONAME ; QGLPaintDevice::~QGLPaintDevice(unsigned int) + ?geometryInputType@QGLShaderProgram@@QBEIXZ @ 541 NONAME ; unsigned int QGLShaderProgram::geometryInputType(void) const + ?drawTexture@QGLPixelBuffer@@QAEXABVQPointF@@II@Z @ 542 NONAME ; void QGLPixelBuffer::drawTexture(class QPointF const &, unsigned int, unsigned int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQMatrix4x4@@@Z @ 543 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QMatrix4x4 const &) + ??1QGLFramebufferObjectFormat@@QAE@XZ @ 544 NONAME ; QGLFramebufferObjectFormat::~QGLFramebufferObjectFormat(void) + ?staticMetaObject@QGLWidget@@2UQMetaObject@@B @ 545 NONAME ; struct QMetaObject const QGLWidget::staticMetaObject + ?isCompiled@QGLShader@@QBE_NXZ @ 546 NONAME ; bool QGLShader::isCompiled(void) const + ?setUniformValue@QGLShaderProgram@@QAEXPBDQAY02M@Z @ 547 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float [3] * const) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQPointF@@@Z @ 548 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QPointF const &) + ?getDevice@QGLPaintDevice@@SAPAV1@PAVQPaintDevice@@@Z @ 549 NONAME ; class QGLPaintDevice * QGLPaintDevice::getDevice(class QPaintDevice *) + ?setUniformValue@QGLShaderProgram@@QAEXHQAY02M@Z @ 550 NONAME ; void QGLShaderProgram::setUniformValue(int, float [3] * const) + ?getStaticMetaObject@QGLTextureGlyphCache@@SAABUQMetaObject@@XZ @ 551 NONAME ; struct QMetaObject const & QGLTextureGlyphCache::getStaticMetaObject(void) + ?swapBuffers@QGLContext@@UBEXXZ @ 552 NONAME ; void QGLContext::swapBuffers(void) const + ?renderText@QGLWidget@@QAEXHHABVQString@@ABVQFont@@H@Z @ 553 NONAME ; void QGLWidget::renderText(int, int, class QString const &, class QFont const &, int) + ?defaultFormat@QGLFormat@@SA?AV1@XZ @ 554 NONAME ; class QGLFormat QGLFormat::defaultFormat(void) + ?bindTexture@QGLWidget@@QAEIABVQPixmap@@IH@Z @ 555 NONAME ; unsigned int QGLWidget::bindTexture(class QPixmap const &, unsigned int, int) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQPoint@@@Z @ 556 NONAME ; void QGLShaderProgram::setUniformValue(int, class QPoint const &) + ?bindTexture@QGLContext@@QAEIABVQImage@@IHV?$QFlags@W4BindOption@QGLContext@@@@@Z @ 557 NONAME ; unsigned int QGLContext::bindTexture(class QImage const &, unsigned int, int, class QFlags<enum QGLContext::BindOption>) + ?initialized@QGLContext@@IBE_NXZ @ 558 NONAME ; bool QGLContext::initialized(void) const + ?cleanup@QGLColormap@@CAXPAUQGLColormapData@1@@Z @ 559 NONAME ; void QGLColormap::cleanup(struct QGLColormap::QGLColormapData *) + ??1QGLContextResource@@QAE@XZ @ 560 NONAME ; QGLContextResource::~QGLContextResource(void) + ?bindTexture@QGLWidget@@QAEIABVQPixmap@@IHV?$QFlags@W4BindOption@QGLContext@@@@@Z @ 561 NONAME ; unsigned int QGLWidget::bindTexture(class QPixmap const &, unsigned int, int, class QFlags<enum QGLContext::BindOption>) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$02$01M@@@Z @ 562 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<3, 2, float> const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBMHH@Z @ 563 NONAME ; void QGLShaderProgram::setUniformValueArray(int, float const *, int, int) + ?qt_metacall@QGraphicsShaderEffect@@UAEHW4Call@QMetaObject@@HPAPAX@Z @ 564 NONAME ; int QGraphicsShaderEffect::qt_metacall(enum QMetaObject::Call, int, void * *) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBVQVector2D@@H@Z @ 565 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QVector2D const *, int) + ?beginNativePainting@QGL2PaintEngineEx@@UAEXXZ @ 566 NONAME ; void QGL2PaintEngineEx::beginNativePainting(void) + ?overlayTransparentColor@QGLContext@@QBE?AVQColor@@XZ @ 567 NONAME ; class QColor QGLContext::overlayTransparentColor(void) const + ?endPaint@QGLPaintDevice@@UAEXXZ @ 568 NONAME ; void QGLPaintDevice::endPaint(void) + ?areSharing@QGLContext@@SA_NPBV1@0@Z @ 569 NONAME ; bool QGLContext::areSharing(class QGLContext const *, class QGLContext const *) + ?setSamples@QGLFramebufferObjectFormat@@QAEXH@Z @ 570 NONAME ; void QGLFramebufferObjectFormat::setSamples(int) + ?d_func@QGLCustomShaderStage@@AAEPAVQGLCustomShaderStagePrivate@@XZ @ 571 NONAME ; class QGLCustomShaderStagePrivate * QGLCustomShaderStage::d_func(void) + ?doneCurrent@QGLPixelBuffer@@QAE_NXZ @ 572 NONAME ; bool QGLPixelBuffer::doneCurrent(void) + ?geometryOutputType@QGLShaderProgram@@QBEIXZ @ 573 NONAME ; unsigned int QGLShaderProgram::geometryOutputType(void) const + ?removeShader@QGLShaderProgram@@QAEXPAVQGLShader@@@Z @ 574 NONAME ; void QGLShaderProgram::removeShader(class QGLShader *) + ?setUniformValueArray@QGLShaderProgram@@QAEXHPBV?$QGenericMatrix@$03$01M@@H@Z @ 575 NONAME ; void QGLShaderProgram::setUniformValueArray(int, class QGenericMatrix<4, 2, float> const *, int) + ?setEntries@QGLColormap@@QAEXHPBIH@Z @ 576 NONAME ; void QGLColormap::setEntries(int, unsigned int const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXPBDI@Z @ 577 NONAME ; void QGLShaderProgram::setUniformValue(char const *, unsigned int) + ?d_func@QGL2PaintEngineEx@@ABEPBVQGL2PaintEngineExPrivate@@XZ @ 578 NONAME ; class QGL2PaintEngineExPrivate const * QGL2PaintEngineEx::d_func(void) const + ?removeCustomStage@QGLEngineShaderManager@@QAEXXZ @ 579 NONAME ; void QGLEngineShaderManager::removeCustomStage(void) + ?bindTexture@QGLPixelBuffer@@QAEIABVQImage@@I@Z @ 580 NONAME ; unsigned int QGLPixelBuffer::bindTexture(class QImage const &, unsigned int) + ??_EQGLCustomShaderStage@@UAE@I@Z @ 581 NONAME ; QGLCustomShaderStage::~QGLCustomShaderStage(unsigned int) + ?format@QGLPixelBuffer@@QBE?AVQGLFormat@@XZ @ 582 NONAME ; class QGLFormat QGLPixelBuffer::format(void) const + ?swapBuffers@QGLWidget@@QAEXXZ @ 583 NONAME ; void QGLWidget::swapBuffers(void) + ??_EQGLFramebufferObject@@UAE@I@Z @ 584 NONAME ; QGLFramebufferObject::~QGLFramebufferObject(unsigned int) + ?glDevice@QGLPixmapData@@QBEPAVQGLPaintDevice@@XZ @ 585 NONAME ; class QGLPaintDevice * QGLPixmapData::glDevice(void) const + ?compositionModeChanged@QGL2PaintEngineEx@@UAEXXZ @ 586 NONAME ; void QGL2PaintEngineEx::compositionModeChanged(void) + ?tr@QGLWidget@@SA?AVQString@@PBD0@Z @ 587 NONAME ; class QString QGLWidget::tr(char const *, char const *) + ?setUniforms@QGraphicsShaderEffect@@MAEXPAVQGLShaderProgram@@@Z @ 588 NONAME ; void QGraphicsShaderEffect::setUniforms(class QGLShaderProgram *) + ?drawImage@QGL2PaintEngineEx@@UAEXABVQRectF@@ABVQImage@@0V?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 589 NONAME ; void QGL2PaintEngineEx::drawImage(class QRectF const &, class QImage const &, class QRectF const &, class QFlags<enum Qt::ImageConversionFlag>) + ?flush@QGLWindowSurface@@UAEXPAVQWidget@@ABVQRegion@@ABVQPoint@@@Z @ 590 NONAME ; void QGLWindowSurface::flush(class QWidget *, class QRegion const &, class QPoint const &) + ??0QGLTextureGlyphCache@@QAE@PAVQGLContext@@W4Type@QFontEngineGlyphCache@@ABVQTransform@@@Z @ 591 NONAME ; QGLTextureGlyphCache::QGLTextureGlyphCache(class QGLContext *, enum QFontEngineGlyphCache::Type, class QTransform const &) + ??_EQGLTextureGlyphCache@@UAE@I@Z @ 592 NONAME ; QGLTextureGlyphCache::~QGLTextureGlyphCache(unsigned int) + ??1QGLShareContextScope@@QAE@XZ @ 593 NONAME ; QGLShareContextScope::~QGLShareContextScope(void) + ?alpha@QGLFormat@@QBE_NXZ @ 594 NONAME ; bool QGLFormat::alpha(void) const + ?drawTextItem@QGL2PaintEngineEx@@UAEXABVQPointF@@ABVQTextItem@@@Z @ 595 NONAME ; void QGL2PaintEngineEx::drawTextItem(class QPointF const &, class QTextItem const &) + ?bindTexture@QGLContext@@QAEIABVQPixmap@@IHV?$QFlags@W4BindOption@QGLContext@@@@@Z @ 596 NONAME ; unsigned int QGLContext::bindTexture(class QPixmap const &, unsigned int, int, class QFlags<enum QGLContext::BindOption>) + ?fillImage@QGLPixmapData@@ABE?AVQImage@@ABVQColor@@@Z @ 597 NONAME ; class QImage QGLPixmapData::fillImage(class QColor const &) const + ?renderHintsChanged@QGL2PaintEngineEx@@UAEXXZ @ 598 NONAME ; void QGL2PaintEngineEx::renderHintsChanged(void) + ?trUtf8@QGLShaderProgram@@SA?AVQString@@PBD0H@Z @ 599 NONAME ; class QString QGLShaderProgram::trUtf8(char const *, char const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQTransform@@@Z @ 600 NONAME ; void QGLShaderProgram::setUniformValue(int, class QTransform const &) + ?qt_resolve_eglimage_gl_extensions@@YA_NPAVQGLContext@@@Z @ 601 NONAME ; bool qt_resolve_eglimage_gl_extensions(class QGLContext *) + ?glInit@QGLWidget@@MAEXXZ @ 602 NONAME ; void QGLWidget::glInit(void) + ?setEntry@QGLColormap@@QAEXHABVQColor@@@Z @ 603 NONAME ; void QGLColormap::setEntry(int, class QColor const &) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBVQVector3D@@H@Z @ 604 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QVector3D const *, int) + ??1QGLPixmapData@@UAE@XZ @ 605 NONAME ; QGLPixmapData::~QGLPixmapData(void) + ?log@QGLShaderProgram@@QBE?AVQString@@XZ @ 606 NONAME ; class QString QGLShaderProgram::log(void) const + ?metric@QGLPixmapData@@UBEHW4PaintDeviceMetric@QPaintDevice@@@Z @ 607 NONAME ; int QGLPixmapData::metric(enum QPaintDevice::PaintDeviceMetric) const + ?qglColor@QGLWidget@@QBEXABVQColor@@@Z @ 608 NONAME ; void QGLWidget::qglColor(class QColor const &) const + ??0QGLBuffer@@QAE@XZ @ 609 NONAME ; QGLBuffer::QGLBuffer(void) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDPBMHH@Z @ 610 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, float const *, int, int) + ?handle@QGLFramebufferObject@@QBEIXZ @ 611 NONAME ; unsigned int QGLFramebufferObject::handle(void) const + ?tr@QGLSignalProxy@@SA?AVQString@@PBD0@Z @ 612 NONAME ; class QString QGLSignalProxy::tr(char const *, char const *) + ?hasOverlay@QGLFormat@@QBE_NXZ @ 613 NONAME ; bool QGLFormat::hasOverlay(void) const + ?setSrcPixelType@QGLEngineShaderManager@@QAEXW4BrushStyle@Qt@@@Z @ 614 NONAME ; void QGLEngineShaderManager::setSrcPixelType(enum Qt::BrushStyle) + ?emitAboutToDestroyContext@QGLSignalProxy@@QAEXPBVQGLContext@@@Z @ 615 NONAME ; void QGLSignalProxy::emitAboutToDestroyContext(class QGLContext const *) + ?colorIndex@QGLContext@@IBEIABVQColor@@@Z @ 616 NONAME ; unsigned int QGLContext::colorIndex(class QColor const &) const + ?alphaRequested@QGLPaintDevice@@UBE_NXZ @ 617 NONAME ; bool QGLPaintDevice::alphaRequested(void) const + ?unmap@QGLBuffer@@QAE_NXZ @ 618 NONAME ; bool QGLBuffer::unmap(void) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBMHH@Z @ 619 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, float const *, int, int) + ??0QGLSharedResourceGuard@@QAE@PBVQGLContext@@I@Z @ 620 NONAME ; QGLSharedResourceGuard::QGLSharedResourceGuard(class QGLContext const *, unsigned int) + ?bindAttributeLocation@QGLShaderProgram@@QAEXPBDH@Z @ 621 NONAME ; void QGLShaderProgram::bindAttributeLocation(char const *, int) + ?setUniformValue@QGLShaderProgram@@QAEXHABVQColor@@@Z @ 622 NONAME ; void QGLShaderProgram::setUniformValue(int, class QColor const &) + ?enableAttributeArray@QGLShaderProgram@@QAEXH@Z @ 623 NONAME ; void QGLShaderProgram::enableAttributeArray(int) + ?tr@QGLShader@@SA?AVQString@@PBD0@Z @ 624 NONAME ; class QString QGLShader::tr(char const *, char const *) + ?overlayContext@QGLWidget@@QBEPBVQGLContext@@XZ @ 625 NONAME ; class QGLContext const * QGLWidget::overlayContext(void) const + ?beginPaint@QGLPaintDevice@@UAEXXZ @ 626 NONAME ; void QGLPaintDevice::beginPaint(void) + ?setTextureCacheLimit@QGLContext@@SAXH@Z @ 627 NONAME ; void QGLContext::setTextureCacheLimit(int) + ?setOnPainter@QGLCustomShaderStage@@QAE_NPAVQPainter@@@Z @ 628 NONAME ; bool QGLCustomShaderStage::setOnPainter(class QPainter *) + ?bindTexture@QGLPixelBuffer@@QAEIABVQPixmap@@I@Z @ 629 NONAME ; unsigned int QGLPixelBuffer::bindTexture(class QPixmap const &, unsigned int) + ?resizeGL@QGLWidget@@MAEXHH@Z @ 630 NONAME ; void QGLWidget::resizeGL(int, int) + ?trUtf8@QGLWindowSurface@@SA?AVQString@@PBD0@Z @ 631 NONAME ; class QString QGLWindowSurface::trUtf8(char const *, char const *) + ?qt_metacast@QGLEngineShaderManager@@UAEPAXPBD@Z @ 632 NONAME ; void * QGLEngineShaderManager::qt_metacast(char const *) + ?sampleBuffers@QGLFormat@@QBE_NXZ @ 633 NONAME ; bool QGLFormat::sampleBuffers(void) const + ?trUtf8@QGLWindowSurface@@SA?AVQString@@PBD0H@Z @ 634 NONAME ; class QString QGLWindowSurface::trUtf8(char const *, char const *, int) + ?shaderProgNeedsChangingSlot@QGLEngineShaderManager@@AAEXXZ @ 635 NONAME ; void QGLEngineShaderManager::shaderProgNeedsChangingSlot(void) + ?metaObject@QGLTextureGlyphCache@@UBEPBUQMetaObject@@XZ @ 636 NONAME ; struct QMetaObject const * QGLTextureGlyphCache::metaObject(void) const + ?paintEvent@QGLWidget@@MAEXPAVQPaintEvent@@@Z @ 637 NONAME ; void QGLWidget::paintEvent(class QPaintEvent *) + ?uniformLocation@QGLShaderProgram@@QBEHABVQByteArray@@@Z @ 638 NONAME ; int QGLShaderProgram::uniformLocation(class QByteArray const &) const + ?currentContext@QGLContext@@SAPBV1@XZ @ 639 NONAME ; class QGLContext const * QGLContext::currentContext(void) + ?setUniformValue@QGLShaderProgram@@QAEXHABV?$QGenericMatrix@$01$02M@@@Z @ 640 NONAME ; void QGLShaderProgram::setUniformValue(int, class QGenericMatrix<2, 3, float> const &) + ??0QGLShader@@QAE@V?$QFlags@W4ShaderTypeBit@QGLShader@@@@PAVQObject@@@Z @ 641 NONAME ; QGLShader::QGLShader(class QFlags<enum QGLShader::ShaderTypeBit>, class QObject *) + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$01$01M@@H@Z @ 642 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<2, 2, float> const *, int) + ?drawStaticTextItem@QGL2PaintEngineEx@@UAEXPAVQStaticTextItem@@@Z @ 643 NONAME ; void QGL2PaintEngineEx::drawStaticTextItem(class QStaticTextItem *) + ?metaObject@QGLShader@@UBEPBUQMetaObject@@XZ @ 644 NONAME ; struct QMetaObject const * QGLShader::metaObject(void) const + ?tr@QGLTextureGlyphCache@@SA?AVQString@@PBD0@Z @ 645 NONAME ; class QString QGLTextureGlyphCache::tr(char const *, char const *) + ?drawTexture@QGLFramebufferObject@@QAEXABVQRectF@@II@Z @ 646 NONAME ; void QGLFramebufferObject::drawTexture(class QRectF const &, unsigned int, unsigned int) + ?openGLVersionFlags@QGLFormat@@SA?AV?$QFlags@W4OpenGLVersionFlag@QGLFormat@@@@XZ @ 647 NONAME ; class QFlags<enum QGLFormat::OpenGLVersionFlag> QGLFormat::openGLVersionFlags(void) + ?setRedBufferSize@QGLFormat@@QAEXH@Z @ 648 NONAME ; void QGLFormat::setRedBufferSize(int) + ??0QGLFormat@@QAE@V?$QFlags@W4FormatOption@QGL@@@@H@Z @ 649 NONAME ; QGLFormat::QGLFormat(class QFlags<enum QGL::FormatOption>, int) + ?setMaskType@QGLEngineShaderManager@@QAEXW4MaskType@1@@Z @ 650 NONAME ; void QGLEngineShaderManager::setMaskType(enum QGLEngineShaderManager::MaskType) + ?setUniforms@QGLCustomShaderStage@@UAEXPAVQGLShaderProgram@@@Z @ 651 NONAME ; void QGLCustomShaderStage::setUniforms(class QGLShaderProgram *) + ??0QGLFramebufferObjectFormat@@QAE@ABV0@@Z @ 652 NONAME ; QGLFramebufferObjectFormat::QGLFramebufferObjectFormat(class QGLFramebufferObjectFormat const &) + ?fromFile@QGLPixmapData@@UAE_NABVQString@@PBDV?$QFlags@W4ImageConversionFlag@Qt@@@@@Z @ 653 NONAME ; bool QGLPixmapData::fromFile(class QString const &, char const *, class QFlags<enum Qt::ImageConversionFlag>) + ?qt_metacast@QGLShader@@UAEPAXPBD@Z @ 654 NONAME ; void * QGLShader::qt_metacast(char const *) + ?attributeLocation@QGLShaderProgram@@QBEHABVQByteArray@@@Z @ 655 NONAME ; int QGLShaderProgram::attributeLocation(class QByteArray const &) const + ?bindTexture@QGLContext@@QAEIABVQImage@@IH@Z @ 656 NONAME ; unsigned int QGLContext::bindTexture(class QImage const &, unsigned int, int) + ?optimiseForBrushTransform@QGLEngineShaderManager@@QAEXW4TransformationType@QTransform@@@Z @ 657 NONAME ; void QGLEngineShaderManager::optimiseForBrushTransform(enum QTransform::TransformationType) + ?setAlpha@QGLFormat@@QAEX_N@Z @ 658 NONAME ; void QGLFormat::setAlpha(bool) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDMMMM@Z @ 659 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, float, float, float, float) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABV?$QGenericMatrix@$03$01M@@@Z @ 660 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QGenericMatrix<4, 2, float> const &) + ?blitFramebuffer@QGLFramebufferObject@@SAXPAV1@ABVQRect@@01II@Z @ 661 NONAME ; void QGLFramebufferObject::blitFramebuffer(class QGLFramebufferObject *, class QRect const &, class QGLFramebufferObject *, class QRect const &, unsigned int, unsigned int) + ?d_func@QGraphicsShaderEffect@@AAEPAVQGraphicsShaderEffectPrivate@@XZ @ 662 NONAME ; class QGraphicsShaderEffectPrivate * QGraphicsShaderEffect::d_func(void) + ?d_func@QGLWidget@@AAEPAVQGLWidgetPrivate@@XZ @ 663 NONAME ; class QGLWidgetPrivate * QGLWidget::d_func(void) + ?qt_metacast@QGLSignalProxy@@UAEPAXPBD@Z @ 664 NONAME ; void * QGLSignalProxy::qt_metacast(char const *) + ?createState@QGL2PaintEngineEx@@UBEPAVQPainterState@@PAV2@@Z @ 665 NONAME ; class QPainterState * QGL2PaintEngineEx::createState(class QPainterState *) const + ??0QGLShader@@QAE@V?$QFlags@W4ShaderTypeBit@QGLShader@@@@PBVQGLContext@@PAVQObject@@@Z @ 666 NONAME ; QGLShader::QGLShader(class QFlags<enum QGLShader::ShaderTypeBit>, class QGLContext const *, class QObject *) + ?format@QGLFramebufferObject@@QBE?AVQGLFramebufferObjectFormat@@XZ @ 667 NONAME ; class QGLFramebufferObjectFormat QGLFramebufferObject::format(void) const + ?tr@QGraphicsShaderEffect@@SA?AVQString@@PBD0H@Z @ 668 NONAME ; class QString QGraphicsShaderEffect::tr(char const *, char const *, int) + ?destroy@QGLBuffer@@QAEXXZ @ 669 NONAME ; void QGLBuffer::destroy(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDMMM@Z @ 670 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float, float, float) + ?paintEngine@QGLFramebufferObject@@UBEPAVQPaintEngine@@XZ @ 671 NONAME ; class QPaintEngine * QGLFramebufferObject::paintEngine(void) const + ?setTextureTarget@QGLFramebufferObjectFormat@@QAEXI@Z @ 672 NONAME ; void QGLFramebufferObjectFormat::setTextureTarget(unsigned int) + ?hasOpenGLPbuffers@QGLPixelBuffer@@SA_NXZ @ 673 NONAME ; bool QGLPixelBuffer::hasOpenGLPbuffers(void) + ?handle@QGLPixelBuffer@@QBEKXZ @ 674 NONAME ; unsigned long QGLPixelBuffer::handle(void) const + ?setHandle@QGLColormap@@IAEXK@Z @ 675 NONAME ; void QGLColormap::setHandle(unsigned long) + ?size@QGLPixmapData@@ABE?AVQSize@@XZ @ 676 NONAME ; class QSize QGLPixmapData::size(void) const + ??1QGLSignalProxy@@UAE@XZ @ 677 NONAME ; QGLSignalProxy::~QGLSignalProxy(void) + ?isBound@QGLFramebufferObject@@QBE_NXZ @ 678 NONAME ; bool QGLFramebufferObject::isBound(void) const + ?updateOverlayGL@QGLWidget@@UAEXXZ @ 679 NONAME ; void QGLWidget::updateOverlayGL(void) + ?makeCurrent@QGLPixelBuffer@@QAE_NXZ @ 680 NONAME ; bool QGLPixelBuffer::makeCurrent(void) + ?setUniformValue@QGLShaderProgram@@QAEXPBDQAY03M@Z @ 681 NONAME ; void QGLShaderProgram::setUniformValue(char const *, float [4] * const) + ?draw@QGraphicsShaderEffect@@MAEXPAVQPainter@@@Z @ 682 NONAME ; void QGraphicsShaderEffect::draw(class QPainter *) + ?bindTexture@QGLWidget@@QAEIABVQString@@@Z @ 683 NONAME ; unsigned int QGLWidget::bindTexture(class QString const &) + ?setAttributeValue@QGLShaderProgram@@QAEXPBDABVQVector4D@@@Z @ 684 NONAME ; void QGLShaderProgram::setAttributeValue(char const *, class QVector4D const &) + ?setAttributeArray@QGLShaderProgram@@QAEXHPBVQVector2D@@H@Z @ 685 NONAME ; void QGLShaderProgram::setAttributeArray(int, class QVector2D const *, int) + ?makeCurrent@QGLWidget@@QAEXXZ @ 686 NONAME ; void QGLWidget::makeCurrent(void) + ?setUniformValue@QGLShaderProgram@@QAEXHQAY03M@Z @ 687 NONAME ; void QGLShaderProgram::setUniformValue(int, float [4] * const) + ?setUniformValue@QGLShaderProgram@@QAEXPBDABVQPoint@@@Z @ 688 NONAME ; void QGLShaderProgram::setUniformValue(char const *, class QPoint const &) + ?redBufferSize@QGLFormat@@QBEHXZ @ 689 NONAME ; int QGLFormat::redBufferSize(void) const + ?setUniformValueArray@QGLShaderProgram@@QAEXPBDPBV?$QGenericMatrix@$02$02M@@H@Z @ 690 NONAME ; void QGLShaderProgram::setUniformValueArray(char const *, class QGenericMatrix<3, 3, float> const *, int) + ?setAttributeValue@QGLShaderProgram@@QAEXHABVQVector3D@@@Z @ 691 NONAME ; void QGLShaderProgram::setAttributeValue(int, class QVector3D const &) + ?useFramebufferObjects@QGLPixmapData@@ABE_NXZ @ 692 NONAME ; bool QGLPixmapData::useFramebufferObjects(void) const + ?enableAttributeArray@QGLShaderProgram@@QAEXPBD@Z @ 693 NONAME ; void QGLShaderProgram::enableAttributeArray(char const *) + ?depth@QGLFormat@@QBE_NXZ @ 694 NONAME ; bool QGLFormat::depth(void) const + ?getStaticMetaObject@QGLWindowSurface@@SAABUQMetaObject@@XZ @ 695 NONAME ; struct QMetaObject const & QGLWindowSurface::getStaticMetaObject(void) + ?qt_metacast@QGLWidget@@UAEPAXPBD@Z @ 696 NONAME ; void * QGLWidget::qt_metacast(char const *) + ?setProfile@QGLFormat@@QAEXW4OpenGLContextProfile@1@@Z @ 697 NONAME ; void QGLFormat::setProfile(enum QGLFormat::OpenGLContextProfile) + ?updateDynamicTexture@QGLPixelBuffer@@QBEXI@Z @ 698 NONAME ; void QGLPixelBuffer::updateDynamicTexture(unsigned int) const + ?setUniformValue@QGLShaderProgram@@QAEXHH@Z @ 699 NONAME ; void QGLShaderProgram::setUniformValue(int, int) + diff --git a/src/s60installs/eabi/QtDeclarativeu.def b/src/s60installs/eabi/QtDeclarativeu.def index 2a14abe..11dee4d 100644 --- a/src/s60installs/eabi/QtDeclarativeu.def +++ b/src/s60installs/eabi/QtDeclarativeu.def @@ -552,9 +552,9 @@ EXPORTS _ZN21QDeclarativeListModel6removeEi @ 551 NONAME _ZN21QDeclarativeListModel7flattenEv @ 552 NONAME _ZN21QDeclarativeListModelC1EP7QObject @ 553 NONAME - _ZN21QDeclarativeListModelC1EbP7QObject @ 554 NONAME + _ZN21QDeclarativeListModelC1EbP7QObject @ 554 NONAME ABSENT _ZN21QDeclarativeListModelC2EP7QObject @ 555 NONAME - _ZN21QDeclarativeListModelC2EbP7QObject @ 556 NONAME + _ZN21QDeclarativeListModelC2EbP7QObject @ 556 NONAME ABSENT _ZN21QDeclarativeListModelD0Ev @ 557 NONAME _ZN21QDeclarativeListModelD1Ev @ 558 NONAME _ZN21QDeclarativeListModelD2Ev @ 559 NONAME @@ -1675,4 +1675,76 @@ EXPORTS _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer22QDeclarativeObjectDataE @ 1674 NONAME _ZrsR11QDataStreamRN29QDeclarativeEngineDebugServer26QDeclarativeObjectPropertyE @ 1675 NONAME _ZN23QDeclarativeEngineDebug10newObjectsEv @ 1676 NONAME + _ZN17QDeclarativeState20addEntryToRevertListERK18QDeclarativeAction @ 1677 NONAME + _ZN17QDeclarativeState22addEntriesToRevertListERK5QListI18QDeclarativeActionE @ 1678 NONAME + _ZN17QDeclarativeState23changeValueInRevertListEP7QObjectRK10QByteArrayRK8QVariant @ 1679 NONAME + _ZN17QDeclarativeState25changeBindingInRevertListEP7QObjectRK10QByteArrayP27QDeclarativeAbstractBinding @ 1680 NONAME + _ZN17QDeclarativeState25removeEntryFromRevertListEP7QObjectRK10QByteArray @ 1681 NONAME + _ZN17QDeclarativeState30removeAllEntriesFromRevertListEP7QObject @ 1682 NONAME + _ZN23QDeclarativeItemPrivate10data_clearEP24QDeclarativeListPropertyI7QObjectE @ 1683 NONAME + _ZN23QDeclarativeItemPrivate10data_countEP24QDeclarativeListPropertyI7QObjectE @ 1684 NONAME + _ZN23QDeclarativeItemPrivate15resources_clearEP24QDeclarativeListPropertyI7QObjectE @ 1685 NONAME + _ZN23QDeclarativeItemPrivate7data_atEP24QDeclarativeListPropertyI7QObjectEi @ 1686 NONAME + _ZN26QDeclarativeStateOperation8setStateEP17QDeclarativeState @ 1687 NONAME + _ZN27QDeclarativeAbstractBinding11weakPointerEv @ 1688 NONAME + _ZN27QDeclarativePropertyChanges11changeValueERK10QByteArrayRK8QVariant @ 1689 NONAME + _ZN27QDeclarativePropertyChanges11qt_metacallEN11QMetaObject4CallEiPPv @ 1690 NONAME + _ZN27QDeclarativePropertyChanges11qt_metacastEPKc @ 1691 NONAME + _ZN27QDeclarativePropertyChanges13attachToStateEv @ 1692 NONAME + _ZN27QDeclarativePropertyChanges13setIsExplicitEb @ 1693 NONAME + _ZN27QDeclarativePropertyChanges14removePropertyERK10QByteArray @ 1694 NONAME + _ZN27QDeclarativePropertyChanges15detachFromStateEv @ 1695 NONAME + _ZN27QDeclarativePropertyChanges16changeExpressionERK10QByteArrayRK7QString @ 1696 NONAME + _ZN27QDeclarativePropertyChanges16staticMetaObjectE @ 1697 NONAME DATA 16 + _ZN27QDeclarativePropertyChanges19getStaticMetaObjectEv @ 1698 NONAME + _ZN27QDeclarativePropertyChanges21setRestoreEntryValuesEb @ 1699 NONAME + _ZN27QDeclarativePropertyChanges7actionsEv @ 1700 NONAME + _ZN27QDeclarativePropertyChanges9setObjectEP7QObject @ 1701 NONAME + _ZN27QDeclarativePropertyChangesC1Ev @ 1702 NONAME + _ZN27QDeclarativePropertyChangesC2Ev @ 1703 NONAME + _ZN27QDeclarativePropertyChangesD0Ev @ 1704 NONAME + _ZN27QDeclarativePropertyChangesD1Ev @ 1705 NONAME + _ZN27QDeclarativePropertyChangesD2Ev @ 1706 NONAME + _ZNK17QDeclarativeState13isStateActiveEv @ 1707 NONAME + _ZNK17QDeclarativeState17valueInRevertListEP7QObjectRK10QByteArray @ 1708 NONAME + _ZNK17QDeclarativeState19bindingInRevertListEP7QObjectRK10QByteArray @ 1709 NONAME + _ZNK17QDeclarativeState28containsPropertyInRevertListEP7QObjectRK10QByteArray @ 1710 NONAME + _ZNK26QDeclarativeStateOperation5stateEv @ 1711 NONAME + _ZNK27QDeclarativePropertyChanges10expressionERK10QByteArray @ 1712 NONAME + _ZNK27QDeclarativePropertyChanges10isExplicitEv @ 1713 NONAME + _ZNK27QDeclarativePropertyChanges10metaObjectEv @ 1714 NONAME + _ZNK27QDeclarativePropertyChanges13containsValueERK10QByteArray @ 1715 NONAME + _ZNK27QDeclarativePropertyChanges16containsPropertyERK10QByteArray @ 1716 NONAME + _ZNK27QDeclarativePropertyChanges18containsExpressionERK10QByteArray @ 1717 NONAME + _ZNK27QDeclarativePropertyChanges18restoreEntryValuesEv @ 1718 NONAME + _ZNK27QDeclarativePropertyChanges5valueERK10QByteArray @ 1719 NONAME + _ZNK27QDeclarativePropertyChanges6objectEv @ 1720 NONAME + _ZNK27QDeclarativePropertyChanges8propertyERK10QByteArray @ 1721 NONAME + _ZTI27QDeclarativePropertyChanges @ 1722 NONAME + _ZTV27QDeclarativePropertyChanges @ 1723 NONAME + _ZN24QDeclarativeScriptAction10transitionER5QListI18QDeclarativeActionERS0_I20QDeclarativePropertyEN29QDeclarativeAbstractAnimation19TransitionDirectionE @ 1724 NONAME + _ZN24QDeclarativeScriptAction11qtAnimationEv @ 1725 NONAME + _ZN24QDeclarativeScriptAction11qt_metacallEN11QMetaObject4CallEiPPv @ 1726 NONAME + _ZN24QDeclarativeScriptAction11qt_metacastEPKc @ 1727 NONAME + _ZN24QDeclarativeScriptAction16staticMetaObjectE @ 1728 NONAME DATA 16 + _ZN24QDeclarativeScriptAction19getStaticMetaObjectEv @ 1729 NONAME + _ZN24QDeclarativeScriptAction24setStateChangeScriptNameERK7QString @ 1730 NONAME + _ZN24QDeclarativeScriptAction9setScriptERK24QDeclarativeScriptString @ 1731 NONAME + _ZN24QDeclarativeScriptActionC1EP7QObject @ 1732 NONAME + _ZN24QDeclarativeScriptActionC2EP7QObject @ 1733 NONAME + _ZN24QDeclarativeScriptActionD0Ev @ 1734 NONAME + _ZN24QDeclarativeScriptActionD1Ev @ 1735 NONAME + _ZN24QDeclarativeScriptActionD2Ev @ 1736 NONAME + _ZNK24QDeclarativeScriptAction10metaObjectEv @ 1737 NONAME + _ZNK24QDeclarativeScriptAction21stateChangeScriptNameEv @ 1738 NONAME + _ZNK24QDeclarativeScriptAction6scriptEv @ 1739 NONAME + _ZTI24QDeclarativeScriptAction @ 1740 NONAME + _ZTV24QDeclarativeScriptAction @ 1741 NONAME + _ZThn12_N24QDeclarativeScriptActionD0Ev @ 1742 NONAME + _ZThn12_N24QDeclarativeScriptActionD1Ev @ 1743 NONAME + _ZThn8_N24QDeclarativeScriptActionD0Ev @ 1744 NONAME + _ZThn8_N24QDeclarativeScriptActionD1Ev @ 1745 NONAME + _ZN21QDeclarativeListModelC1EPKS_P32QDeclarativeListModelWorkerAgent @ 1746 NONAME + _ZN21QDeclarativeListModelC2EPKS_P32QDeclarativeListModelWorkerAgent @ 1747 NONAME + _ZNK21QDeclarativeListModel14inWorkerThreadEv @ 1748 NONAME diff --git a/src/s60installs/eabi/QtGuiu.def b/src/s60installs/eabi/QtGuiu.def index c6d9ddb..4442d33 100644 --- a/src/s60installs/eabi/QtGuiu.def +++ b/src/s60installs/eabi/QtGuiu.def @@ -9389,7 +9389,7 @@ EXPORTS _ZNK20QGraphicsItemPrivate19genericMapFromSceneERK7QPointFPK7QWidget @ 9388 NONAME _ZNK20QGraphicsItemPrivate19maybeExtraItemCacheEv @ 9389 NONAME _ZNK20QGraphicsItemPrivate20discardUpdateRequestEbbbb @ 9390 NONAME ABSENT - _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEv @ 9391 NONAME + _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEv @ 9391 NONAME ABSENT _ZNK20QGraphicsItemPrivate22inputMethodQueryHelperEN2Qt16InputMethodQueryE @ 9392 NONAME _ZNK20QGraphicsItemPrivate24combineTransformToParentEP10QTransformPKS0_ @ 9393 NONAME _ZNK20QGraphicsItemPrivate26combineTransformFromParentEP10QTransformPKS0_ @ 9394 NONAME @@ -12092,5 +12092,9 @@ EXPORTS _ZN11QFontEngine16lastRightBearingERK12QGlyphLayoutb @ 12091 NONAME _ZN18QTapAndHoldGesture10setTimeoutEi @ 12092 NONAME _ZN18QTapAndHoldGesture7timeoutEv @ 12093 NONAME - _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12094 NONAME + _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFb @ 12094 NONAME ABSENT + _ZN20QGraphicsItemPrivate14children_clearEP24QDeclarativeListPropertyI15QGraphicsObjectE @ 12095 NONAME + _ZN19QApplicationPrivate19qmljsDebugArgumentsE @ 12096 NONAME DATA 4 + _ZN20QGraphicsItemPrivate26childrenBoundingRectHelperEP10QTransformP6QRectFP13QGraphicsItem @ 12097 NONAME + _ZNK20QGraphicsItemPrivate21effectiveBoundingRectEP13QGraphicsItem @ 12098 NONAME diff --git a/src/s60installs/eabi/QtOpenGLu.def b/src/s60installs/eabi/QtOpenGLu.def new file mode 100644 index 0000000..7ceade4 --- /dev/null +++ b/src/s60installs/eabi/QtOpenGLu.def @@ -0,0 +1,705 @@ +EXPORTS + _Z18qt_gl_share_widgetv @ 1 NONAME + _Z19qt_qgl_paint_enginev @ 2 NONAME + _Z22qt_gl_transfer_contextPK10QGLContext @ 3 NONAME + _Z26qt_destroy_gl_share_widgetv @ 4 NONAME + _Z33qt_resolve_eglimage_gl_extensionsP10QGLContext @ 5 NONAME + _ZN10QGLContext10areSharingEPKS_S1_ @ 6 NONAME + _ZN10QGLContext10currentCtxE @ 7 NONAME DATA 4 + _ZN10QGLContext11bindTextureERK6QImageji @ 8 NONAME + _ZN10QGLContext11bindTextureERK6QImageji6QFlagsINS_10BindOptionEE @ 9 NONAME + _ZN10QGLContext11bindTextureERK7QPixmapji @ 10 NONAME + _ZN10QGLContext11bindTextureERK7QPixmapji6QFlagsINS_10BindOptionEE @ 11 NONAME + _ZN10QGLContext11bindTextureERK7QString @ 12 NONAME + _ZN10QGLContext11doneCurrentEv @ 13 NONAME + _ZN10QGLContext11drawTextureERK6QRectFjj @ 14 NONAME + _ZN10QGLContext11drawTextureERK7QPointFjj @ 15 NONAME + _ZN10QGLContext11makeCurrentEv @ 16 NONAME + _ZN10QGLContext13chooseContextEPKS_ @ 17 NONAME + _ZN10QGLContext13deleteTextureEj @ 18 NONAME + _ZN10QGLContext14currentContextEv @ 19 NONAME + _ZN10QGLContext14setInitializedEb @ 20 NONAME + _ZN10QGLContext16setWindowCreatedEb @ 21 NONAME + _ZN10QGLContext17textureCacheLimitEv @ 22 NONAME + _ZN10QGLContext20setTextureCacheLimitEi @ 23 NONAME + _ZN10QGLContext24generateFontDisplayListsERK5QFonti @ 24 NONAME + _ZN10QGLContext5resetEv @ 25 NONAME + _ZN10QGLContext6createEPKS_ @ 26 NONAME + _ZN10QGLContext8setValidEb @ 27 NONAME + _ZN10QGLContext9setDeviceEP12QPaintDevice @ 28 NONAME + _ZN10QGLContext9setFormatERK9QGLFormat @ 29 NONAME + _ZN10QGLContextC1ERK9QGLFormat @ 30 NONAME + _ZN10QGLContextC1ERK9QGLFormatP12QPaintDevice @ 31 NONAME + _ZN10QGLContextC2ERK9QGLFormat @ 32 NONAME + _ZN10QGLContextC2ERK9QGLFormatP12QPaintDevice @ 33 NONAME + _ZN10QGLContextD0Ev @ 34 NONAME + _ZN10QGLContextD1Ev @ 35 NONAME + _ZN10QGLContextD2Ev @ 36 NONAME + _ZN11QGLColormap10setEntriesEiPKji @ 37 NONAME + _ZN11QGLColormap11shared_nullE @ 38 NONAME DATA 12 + _ZN11QGLColormap13detach_helperEv @ 39 NONAME + _ZN11QGLColormap7cleanupEPNS_15QGLColormapDataE @ 40 NONAME + _ZN11QGLColormap8setEntryEiRK6QColor @ 41 NONAME + _ZN11QGLColormap8setEntryEij @ 42 NONAME + _ZN11QGLColormapC1ERKS_ @ 43 NONAME + _ZN11QGLColormapC1Ev @ 44 NONAME + _ZN11QGLColormapC2ERKS_ @ 45 NONAME + _ZN11QGLColormapC2Ev @ 46 NONAME + _ZN11QGLColormapD1Ev @ 47 NONAME + _ZN11QGLColormapD2Ev @ 48 NONAME + _ZN11QGLColormapaSERKS_ @ 49 NONAME + _ZN13QGLPixmapData4copyEPK11QPixmapDataRK5QRect @ 50 NONAME + _ZN13QGLPixmapData4fillERK6QColor @ 51 NONAME + _ZN13QGLPixmapData6resizeEii @ 52 NONAME + _ZN13QGLPixmapData6scrollEiiRK5QRect @ 53 NONAME + _ZN13QGLPixmapData8fromDataEPKhjPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 54 NONAME + _ZN13QGLPixmapData8fromFileERK7QStringPKc6QFlagsIN2Qt19ImageConversionFlagEE @ 55 NONAME + _ZN13QGLPixmapData9fromImageERK6QImage6QFlagsIN2Qt19ImageConversionFlagEE @ 56 NONAME + _ZN13QGLPixmapDataC1EN11QPixmapData9PixelTypeE @ 57 NONAME + _ZN13QGLPixmapDataC2EN11QPixmapData9PixelTypeE @ 58 NONAME + _ZN13QGLPixmapDataD0Ev @ 59 NONAME + _ZN13QGLPixmapDataD1Ev @ 60 NONAME + _ZN13QGLPixmapDataD2Ev @ 61 NONAME + _ZN14QGLPaintDevice10beginPaintEv @ 62 NONAME + _ZN14QGLPaintDevice18ensureActiveTargetEv @ 63 NONAME + _ZN14QGLPaintDevice8endPaintEv @ 64 NONAME + _ZN14QGLPaintDevice9getDeviceEP12QPaintDevice @ 65 NONAME + _ZN14QGLPaintDeviceC2Ev @ 66 NONAME + _ZN14QGLPaintDeviceD0Ev @ 67 NONAME + _ZN14QGLPaintDeviceD1Ev @ 68 NONAME + _ZN14QGLPaintDeviceD2Ev @ 69 NONAME + _ZN14QGLPixelBuffer11bindTextureERK6QImagej @ 70 NONAME + _ZN14QGLPixelBuffer11bindTextureERK7QPixmapj @ 71 NONAME + _ZN14QGLPixelBuffer11bindTextureERK7QString @ 72 NONAME + _ZN14QGLPixelBuffer11doneCurrentEv @ 73 NONAME + _ZN14QGLPixelBuffer11drawTextureERK6QRectFjj @ 74 NONAME + _ZN14QGLPixelBuffer11drawTextureERK7QPointFjj @ 75 NONAME + _ZN14QGLPixelBuffer11makeCurrentEv @ 76 NONAME + _ZN14QGLPixelBuffer13deleteTextureEj @ 77 NONAME + _ZN14QGLPixelBuffer17hasOpenGLPbuffersEv @ 78 NONAME + _ZN14QGLPixelBuffer20bindToDynamicTextureEj @ 79 NONAME + _ZN14QGLPixelBuffer25releaseFromDynamicTextureEv @ 80 NONAME + _ZN14QGLPixelBufferC1ERK5QSizeRK9QGLFormatP9QGLWidget @ 81 NONAME + _ZN14QGLPixelBufferC1EiiRK9QGLFormatP9QGLWidget @ 82 NONAME + _ZN14QGLPixelBufferC2ERK5QSizeRK9QGLFormatP9QGLWidget @ 83 NONAME + _ZN14QGLPixelBufferC2EiiRK9QGLFormatP9QGLWidget @ 84 NONAME + _ZN14QGLPixelBufferD0Ev @ 85 NONAME + _ZN14QGLPixelBufferD1Ev @ 86 NONAME + _ZN14QGLPixelBufferD2Ev @ 87 NONAME + _ZN14QGLSignalProxy11qt_metacallEN11QMetaObject4CallEiPPv @ 88 NONAME + _ZN14QGLSignalProxy11qt_metacastEPKc @ 89 NONAME + _ZN14QGLSignalProxy16staticMetaObjectE @ 90 NONAME DATA 16 + _ZN14QGLSignalProxy19getStaticMetaObjectEv @ 91 NONAME + _ZN14QGLSignalProxy21aboutToDestroyContextEPK10QGLContext @ 92 NONAME + _ZN14QGLSignalProxy8instanceEv @ 93 NONAME + _ZN16QGLShaderProgram11qt_metacallEN11QMetaObject4CallEiPPv @ 94 NONAME + _ZN16QGLShaderProgram11qt_metacastEPKc @ 95 NONAME + _ZN16QGLShaderProgram12removeShaderEP9QGLShader @ 96 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcPA2_Kf @ 97 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcPA3_Kf @ 98 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcPA4_Kf @ 99 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK10QMatrix4x4 @ 100 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK10QTransform @ 101 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi2ELi2EfE @ 102 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi2ELi3EfE @ 103 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi2ELi4EfE @ 104 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi3ELi2EfE @ 105 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi3ELi3EfE @ 106 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi3ELi4EfE @ 107 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi4ELi2EfE @ 108 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK14QGenericMatrixILi4ELi3EfE @ 109 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK5QSize @ 110 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK6QColor @ 111 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK6QPoint @ 112 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK6QSizeF @ 113 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK7QPointF @ 114 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK9QVector2D @ 115 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK9QVector3D @ 116 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcRK9QVector4D @ 117 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcf @ 118 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcff @ 119 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcfff @ 120 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcffff @ 121 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKci @ 122 NONAME + _ZN16QGLShaderProgram15setUniformValueEPKcj @ 123 NONAME + _ZN16QGLShaderProgram15setUniformValueEiPA2_Kf @ 124 NONAME + _ZN16QGLShaderProgram15setUniformValueEiPA3_Kf @ 125 NONAME + _ZN16QGLShaderProgram15setUniformValueEiPA4_Kf @ 126 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK10QMatrix4x4 @ 127 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK10QTransform @ 128 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi2ELi2EfE @ 129 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi2ELi3EfE @ 130 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi2ELi4EfE @ 131 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi3ELi2EfE @ 132 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi3ELi3EfE @ 133 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi3ELi4EfE @ 134 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi4ELi2EfE @ 135 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK14QGenericMatrixILi4ELi3EfE @ 136 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK5QSize @ 137 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK6QColor @ 138 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK6QPoint @ 139 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK6QSizeF @ 140 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK7QPointF @ 141 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK9QVector2D @ 142 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK9QVector3D @ 143 NONAME + _ZN16QGLShaderProgram15setUniformValueEiRK9QVector4D @ 144 NONAME + _ZN16QGLShaderProgram15setUniformValueEif @ 145 NONAME + _ZN16QGLShaderProgram15setUniformValueEiff @ 146 NONAME + _ZN16QGLShaderProgram15setUniformValueEifff @ 147 NONAME + _ZN16QGLShaderProgram15setUniformValueEiffff @ 148 NONAME + _ZN16QGLShaderProgram15setUniformValueEii @ 149 NONAME + _ZN16QGLShaderProgram15setUniformValueEij @ 150 NONAME + _ZN16QGLShaderProgram15shaderDestroyedEv @ 151 NONAME + _ZN16QGLShaderProgram16removeAllShadersEv @ 152 NONAME + _ZN16QGLShaderProgram16staticMetaObjectE @ 153 NONAME DATA 16 + _ZN16QGLShaderProgram17setAttributeArrayEPKcPK9QVector2Di @ 154 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEPKcPK9QVector3Di @ 155 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEPKcPK9QVector4Di @ 156 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEPKcPKfii @ 157 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEPKcjPKvii @ 158 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEiPK9QVector2Di @ 159 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEiPK9QVector3Di @ 160 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEiPK9QVector4Di @ 161 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEiPKfii @ 162 NONAME + _ZN16QGLShaderProgram17setAttributeArrayEijPKvii @ 163 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcPKfii @ 164 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcRK6QColor @ 165 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcRK9QVector2D @ 166 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcRK9QVector3D @ 167 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcRK9QVector4D @ 168 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcf @ 169 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcff @ 170 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcfff @ 171 NONAME + _ZN16QGLShaderProgram17setAttributeValueEPKcffff @ 172 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiPKfii @ 173 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiRK6QColor @ 174 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiRK9QVector2D @ 175 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiRK9QVector3D @ 176 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiRK9QVector4D @ 177 NONAME + _ZN16QGLShaderProgram17setAttributeValueEif @ 178 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiff @ 179 NONAME + _ZN16QGLShaderProgram17setAttributeValueEifff @ 180 NONAME + _ZN16QGLShaderProgram17setAttributeValueEiffff @ 181 NONAME + _ZN16QGLShaderProgram18setAttributeBufferEPKcjiii @ 182 NONAME + _ZN16QGLShaderProgram18setAttributeBufferEijiii @ 183 NONAME + _ZN16QGLShaderProgram19getStaticMetaObjectEv @ 184 NONAME + _ZN16QGLShaderProgram20enableAttributeArrayEPKc @ 185 NONAME + _ZN16QGLShaderProgram20enableAttributeArrayEi @ 186 NONAME + _ZN16QGLShaderProgram20setGeometryInputTypeEj @ 187 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK10QMatrix4x4i @ 188 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi2ELi2EfEi @ 189 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi2ELi3EfEi @ 190 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi2ELi4EfEi @ 191 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi3ELi2EfEi @ 192 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi3ELi3EfEi @ 193 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi3ELi4EfEi @ 194 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi4ELi2EfEi @ 195 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK14QGenericMatrixILi4ELi3EfEi @ 196 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK9QVector2Di @ 197 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK9QVector3Di @ 198 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPK9QVector4Di @ 199 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPKfii @ 200 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPKii @ 201 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEPKcPKji @ 202 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK10QMatrix4x4i @ 203 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi2ELi2EfEi @ 204 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi2ELi3EfEi @ 205 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi2ELi4EfEi @ 206 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi3ELi2EfEi @ 207 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi3ELi3EfEi @ 208 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi3ELi4EfEi @ 209 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi4ELi2EfEi @ 210 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK14QGenericMatrixILi4ELi3EfEi @ 211 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK9QVector2Di @ 212 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK9QVector3Di @ 213 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPK9QVector4Di @ 214 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPKfii @ 215 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPKii @ 216 NONAME + _ZN16QGLShaderProgram20setUniformValueArrayEiPKji @ 217 NONAME + _ZN16QGLShaderProgram21bindAttributeLocationEPKci @ 218 NONAME + _ZN16QGLShaderProgram21bindAttributeLocationERK10QByteArrayi @ 219 NONAME + _ZN16QGLShaderProgram21bindAttributeLocationERK7QStringi @ 220 NONAME + _ZN16QGLShaderProgram21disableAttributeArrayEPKc @ 221 NONAME + _ZN16QGLShaderProgram21disableAttributeArrayEi @ 222 NONAME + _ZN16QGLShaderProgram21setGeometryOutputTypeEj @ 223 NONAME + _ZN16QGLShaderProgram23addShaderFromSourceCodeE6QFlagsIN9QGLShader13ShaderTypeBitEEPKc @ 224 NONAME + _ZN16QGLShaderProgram23addShaderFromSourceCodeE6QFlagsIN9QGLShader13ShaderTypeBitEERK10QByteArray @ 225 NONAME + _ZN16QGLShaderProgram23addShaderFromSourceCodeE6QFlagsIN9QGLShader13ShaderTypeBitEERK7QString @ 226 NONAME + _ZN16QGLShaderProgram23addShaderFromSourceFileE6QFlagsIN9QGLShader13ShaderTypeBitEERK7QString @ 227 NONAME + _ZN16QGLShaderProgram23hasOpenGLShaderProgramsEPK10QGLContext @ 228 NONAME + _ZN16QGLShaderProgram28setGeometryOutputVertexCountEi @ 229 NONAME + _ZN16QGLShaderProgram4bindEv @ 230 NONAME + _ZN16QGLShaderProgram4initEv @ 231 NONAME + _ZN16QGLShaderProgram4linkEv @ 232 NONAME + _ZN16QGLShaderProgram7releaseEv @ 233 NONAME + _ZN16QGLShaderProgram9addShaderEP9QGLShader @ 234 NONAME + _ZN16QGLShaderProgramC1EP7QObject @ 235 NONAME + _ZN16QGLShaderProgramC1EPK10QGLContextP7QObject @ 236 NONAME + _ZN16QGLShaderProgramC2EP7QObject @ 237 NONAME + _ZN16QGLShaderProgramC2EPK10QGLContextP7QObject @ 238 NONAME + _ZN16QGLShaderProgramD0Ev @ 239 NONAME + _ZN16QGLShaderProgramD1Ev @ 240 NONAME + _ZN16QGLShaderProgramD2Ev @ 241 NONAME + _ZN16QGLWindowSurface10beginPaintERK7QRegion @ 242 NONAME + _ZN16QGLWindowSurface11paintDeviceEv @ 243 NONAME + _ZN16QGLWindowSurface11qt_metacallEN11QMetaObject4CallEiPPv @ 244 NONAME + _ZN16QGLWindowSurface11qt_metacastEPKc @ 245 NONAME + _ZN16QGLWindowSurface11setGeometryERK5QRect @ 246 NONAME + _ZN16QGLWindowSurface12hijackWindowEP7QWidget @ 247 NONAME + _ZN16QGLWindowSurface13surfaceFormatE @ 248 NONAME DATA 4 + _ZN16QGLWindowSurface14updateGeometryEv @ 249 NONAME + _ZN16QGLWindowSurface16staticMetaObjectE @ 250 NONAME DATA 16 + _ZN16QGLWindowSurface19getStaticMetaObjectEv @ 251 NONAME + _ZN16QGLWindowSurface5flushEP7QWidgetRK7QRegionRK6QPoint @ 252 NONAME + _ZN16QGLWindowSurface6bufferEPK7QWidget @ 253 NONAME + _ZN16QGLWindowSurface6scrollERK7QRegionii @ 254 NONAME + _ZN16QGLWindowSurface7deletedEP7QObject @ 255 NONAME + _ZN16QGLWindowSurface8endPaintERK7QRegion @ 256 NONAME + _ZN16QGLWindowSurfaceC1EP7QWidget @ 257 NONAME + _ZN16QGLWindowSurfaceC2EP7QWidget @ 258 NONAME + _ZN16QGLWindowSurfaceD0Ev @ 259 NONAME + _ZN16QGLWindowSurfaceD1Ev @ 260 NONAME + _ZN16QGLWindowSurfaceD2Ev @ 261 NONAME + _ZN17QGL2PaintEngineEx10drawPixmapERK6QRectFRK7QPixmapS2_ @ 262 NONAME + _ZN17QGL2PaintEngineEx10penChangedEv @ 263 NONAME + _ZN17QGL2PaintEngineEx11drawTextureERK6QRectFjRK5QSizeS2_ @ 264 NONAME + _ZN17QGL2PaintEngineEx12brushChangedEv @ 265 NONAME + _ZN17QGL2PaintEngineEx12drawTextItemERK7QPointFRK9QTextItem @ 266 NONAME + _ZN17QGL2PaintEngineEx12ensureActiveEv @ 267 NONAME + _ZN17QGL2PaintEngineEx12pixmapFilterEiPK13QPixmapFilter @ 268 NONAME + _ZN17QGL2PaintEngineEx14opacityChangedEv @ 269 NONAME + _ZN17QGL2PaintEngineEx15invalidateStateEv @ 270 NONAME + _ZN17QGL2PaintEngineEx16transformChangedEv @ 271 NONAME + _ZN17QGL2PaintEngineEx17endNativePaintingEv @ 272 NONAME + _ZN17QGL2PaintEngineEx18brushOriginChangedEv @ 273 NONAME + _ZN17QGL2PaintEngineEx18clipEnabledChangedEv @ 274 NONAME + _ZN17QGL2PaintEngineEx18drawStaticTextItemEP15QStaticTextItem @ 275 NONAME + _ZN17QGL2PaintEngineEx18renderHintsChangedEv @ 276 NONAME + _ZN17QGL2PaintEngineEx19beginNativePaintingEv @ 277 NONAME + _ZN17QGL2PaintEngineEx19drawPixmapFragmentsEPKN8QPainter14PixmapFragmentEiRK7QPixmap6QFlagsINS0_18PixmapFragmentHintEE @ 278 NONAME + _ZN17QGL2PaintEngineEx22compositionModeChangedEv @ 279 NONAME + _ZN17QGL2PaintEngineEx3endEv @ 280 NONAME + _ZN17QGL2PaintEngineEx4clipERK11QVectorPathN2Qt13ClipOperationE @ 281 NONAME + _ZN17QGL2PaintEngineEx4fillERK11QVectorPathRK6QBrush @ 282 NONAME + _ZN17QGL2PaintEngineEx5beginEP12QPaintDevice @ 283 NONAME + _ZN17QGL2PaintEngineEx6strokeERK11QVectorPathRK4QPen @ 284 NONAME + _ZN17QGL2PaintEngineEx8setStateEP13QPainterState @ 285 NONAME + _ZN17QGL2PaintEngineEx9drawImageERK6QRectFRK6QImageS2_6QFlagsIN2Qt19ImageConversionFlagEE @ 286 NONAME + _ZN17QGL2PaintEngineExC1Ev @ 287 NONAME + _ZN17QGL2PaintEngineExC2Ev @ 288 NONAME + _ZN17QGL2PaintEngineExD0Ev @ 289 NONAME + _ZN17QGL2PaintEngineExD1Ev @ 290 NONAME + _ZN17QGL2PaintEngineExD2Ev @ 291 NONAME + _ZN17QGLContextPrivate14extensionFuncsEPK10QGLContext @ 292 NONAME + _ZN17QGLGraphicsSystemC1Eb @ 293 NONAME + _ZN17QGLGraphicsSystemC2Eb @ 294 NONAME + _ZN18QGLContextResource5valueEPK10QGLContext @ 295 NONAME + _ZN18QGLContextResource6insertEPK10QGLContextPv @ 296 NONAME + _ZN18QGLContextResource7cleanupEPK10QGLContextPv @ 297 NONAME + _ZN18QGLContextResourceC1EPFvPvE @ 298 NONAME + _ZN18QGLContextResourceC2EPFvPvE @ 299 NONAME + _ZN18QGLContextResourceD1Ev @ 300 NONAME + _ZN18QGLContextResourceD2Ev @ 301 NONAME + _ZN20QGLCustomShaderStage11setInactiveEv @ 302 NONAME + _ZN20QGLCustomShaderStage12setOnPainterEP8QPainter @ 303 NONAME + _ZN20QGLCustomShaderStage16setUniformsDirtyEv @ 304 NONAME + _ZN20QGLCustomShaderStage17removeFromPainterEP8QPainter @ 305 NONAME + _ZN20QGLCustomShaderStage9setSourceERK10QByteArray @ 306 NONAME + _ZN20QGLCustomShaderStageC1Ev @ 307 NONAME + _ZN20QGLCustomShaderStageC2Ev @ 308 NONAME + _ZN20QGLCustomShaderStageD0Ev @ 309 NONAME + _ZN20QGLCustomShaderStageD1Ev @ 310 NONAME + _ZN20QGLCustomShaderStageD2Ev @ 311 NONAME + _ZN20QGLFramebufferObject11bindDefaultEv @ 312 NONAME + _ZN20QGLFramebufferObject11drawTextureERK6QRectFjj @ 313 NONAME + _ZN20QGLFramebufferObject11drawTextureERK7QPointFjj @ 314 NONAME + _ZN20QGLFramebufferObject15blitFramebufferEPS_RK5QRectS0_S3_jj @ 315 NONAME + _ZN20QGLFramebufferObject24hasOpenGLFramebufferBlitEv @ 316 NONAME + _ZN20QGLFramebufferObject27hasOpenGLFramebufferObjectsEv @ 317 NONAME + _ZN20QGLFramebufferObject4bindEv @ 318 NONAME + _ZN20QGLFramebufferObject7releaseEv @ 319 NONAME + _ZN20QGLFramebufferObjectC1ERK5QSizeNS_10AttachmentEjj @ 320 NONAME + _ZN20QGLFramebufferObjectC1ERK5QSizeRK26QGLFramebufferObjectFormat @ 321 NONAME + _ZN20QGLFramebufferObjectC1ERK5QSizej @ 322 NONAME + _ZN20QGLFramebufferObjectC1EiiNS_10AttachmentEjj @ 323 NONAME + _ZN20QGLFramebufferObjectC1EiiRK26QGLFramebufferObjectFormat @ 324 NONAME + _ZN20QGLFramebufferObjectC1Eiij @ 325 NONAME + _ZN20QGLFramebufferObjectC2ERK5QSizeNS_10AttachmentEjj @ 326 NONAME + _ZN20QGLFramebufferObjectC2ERK5QSizeRK26QGLFramebufferObjectFormat @ 327 NONAME + _ZN20QGLFramebufferObjectC2ERK5QSizej @ 328 NONAME + _ZN20QGLFramebufferObjectC2EiiNS_10AttachmentEjj @ 329 NONAME + _ZN20QGLFramebufferObjectC2EiiRK26QGLFramebufferObjectFormat @ 330 NONAME + _ZN20QGLFramebufferObjectC2Eiij @ 331 NONAME + _ZN20QGLFramebufferObjectD0Ev @ 332 NONAME + _ZN20QGLFramebufferObjectD1Ev @ 333 NONAME + _ZN20QGLFramebufferObjectD2Ev @ 334 NONAME + _ZN20QGLTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj @ 335 NONAME + _ZN20QGLTextureGlyphCache11qt_metacallEN11QMetaObject4CallEiPPv @ 336 NONAME + _ZN20QGLTextureGlyphCache11qt_metacastEPKc @ 337 NONAME + _ZN20QGLTextureGlyphCache16staticMetaObjectE @ 338 NONAME DATA 16 + _ZN20QGLTextureGlyphCache17createTextureDataEii @ 339 NONAME + _ZN20QGLTextureGlyphCache17resizeTextureDataEii @ 340 NONAME + _ZN20QGLTextureGlyphCache19getStaticMetaObjectEv @ 341 NONAME + _ZN20QGLTextureGlyphCacheC1EP10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 342 NONAME + _ZN20QGLTextureGlyphCacheC2EP10QGLContextN21QFontEngineGlyphCache4TypeERK10QTransform @ 343 NONAME + _ZN20QGLTextureGlyphCacheD0Ev @ 344 NONAME + _ZN20QGLTextureGlyphCacheD1Ev @ 345 NONAME + _ZN20QGLTextureGlyphCacheD2Ev @ 346 NONAME + _ZN21QGraphicsShaderEffect11qt_metacallEN11QMetaObject4CallEiPPv @ 347 NONAME + _ZN21QGraphicsShaderEffect11qt_metacastEPKc @ 348 NONAME + _ZN21QGraphicsShaderEffect11setUniformsEP16QGLShaderProgram @ 349 NONAME + _ZN21QGraphicsShaderEffect16setUniformsDirtyEv @ 350 NONAME + _ZN21QGraphicsShaderEffect16staticMetaObjectE @ 351 NONAME DATA 16 + _ZN21QGraphicsShaderEffect19getStaticMetaObjectEv @ 352 NONAME + _ZN21QGraphicsShaderEffect22setPixelShaderFragmentERK10QByteArray @ 353 NONAME + _ZN21QGraphicsShaderEffect4drawEP8QPainter @ 354 NONAME + _ZN21QGraphicsShaderEffectC1EP7QObject @ 355 NONAME + _ZN21QGraphicsShaderEffectC2EP7QObject @ 356 NONAME + _ZN21QGraphicsShaderEffectD0Ev @ 357 NONAME + _ZN21QGraphicsShaderEffectD1Ev @ 358 NONAME + _ZN21QGraphicsShaderEffectD2Ev @ 359 NONAME + _ZN22QGLEngineShaderManager11blitProgramEv @ 360 NONAME + _ZN22QGLEngineShaderManager11qt_metacallEN11QMetaObject4CallEiPPv @ 361 NONAME + _ZN22QGLEngineShaderManager11qt_metacastEPKc @ 362 NONAME + _ZN22QGLEngineShaderManager11setMaskTypeENS_8MaskTypeE @ 363 NONAME + _ZN22QGLEngineShaderManager13simpleProgramEv @ 364 NONAME + _ZN22QGLEngineShaderManager14currentProgramEv @ 365 NONAME + _ZN22QGLEngineShaderManager14setCustomStageEP20QGLCustomShaderStage @ 366 NONAME + _ZN22QGLEngineShaderManager14setOpacityModeENS_11OpacityModeE @ 367 NONAME + _ZN22QGLEngineShaderManager14useBlitProgramEv @ 368 NONAME + _ZN22QGLEngineShaderManager15setSrcPixelTypeEN2Qt10BrushStyleE @ 369 NONAME + _ZN22QGLEngineShaderManager15setSrcPixelTypeENS_12PixelSrcTypeE @ 370 NONAME + _ZN22QGLEngineShaderManager16staticMetaObjectE @ 371 NONAME DATA 16 + _ZN22QGLEngineShaderManager16useSimpleProgramEv @ 372 NONAME + _ZN22QGLEngineShaderManager17removeCustomStageEv @ 373 NONAME + _ZN22QGLEngineShaderManager18getUniformLocationENS_7UniformE @ 374 NONAME + _ZN22QGLEngineShaderManager18setCompositionModeEN8QPainter15CompositionModeE @ 375 NONAME + _ZN22QGLEngineShaderManager19getStaticMetaObjectEv @ 376 NONAME + _ZN22QGLEngineShaderManager20useCorrectShaderProgEv @ 377 NONAME + _ZN22QGLEngineShaderManager25optimiseForBrushTransformEN10QTransform18TransformationTypeE @ 378 NONAME + _ZN22QGLEngineShaderManager8setDirtyEv @ 379 NONAME + _ZN22QGLEngineShaderManagerC1EP10QGLContext @ 380 NONAME + _ZN22QGLEngineShaderManagerC2EP10QGLContext @ 381 NONAME + _ZN22QGLEngineShaderManagerD0Ev @ 382 NONAME + _ZN22QGLEngineShaderManagerD1Ev @ 383 NONAME + _ZN22QGLEngineShaderManagerD2Ev @ 384 NONAME + _ZN22QGLSharedResourceGuard10setContextEPK10QGLContext @ 385 NONAME + _ZN22QGLSharedResourceGuardD1Ev @ 386 NONAME + _ZN22QGLSharedResourceGuardD2Ev @ 387 NONAME + _ZN26QGLFramebufferObjectFormat10setSamplesEi @ 388 NONAME + _ZN26QGLFramebufferObjectFormat13setAttachmentEN20QGLFramebufferObject10AttachmentE @ 389 NONAME + _ZN26QGLFramebufferObjectFormat16setTextureTargetEj @ 390 NONAME + _ZN26QGLFramebufferObjectFormat24setInternalTextureFormatEj @ 391 NONAME + _ZN26QGLFramebufferObjectFormat6detachEv @ 392 NONAME + _ZN26QGLFramebufferObjectFormatC1ERKS_ @ 393 NONAME + _ZN26QGLFramebufferObjectFormatC1Ev @ 394 NONAME + _ZN26QGLFramebufferObjectFormatC2ERKS_ @ 395 NONAME + _ZN26QGLFramebufferObjectFormatC2Ev @ 396 NONAME + _ZN26QGLFramebufferObjectFormatD1Ev @ 397 NONAME + _ZN26QGLFramebufferObjectFormatD2Ev @ 398 NONAME + _ZN26QGLFramebufferObjectFormataSERKS_ @ 399 NONAME + _ZN3QGL23setPreferredPaintEngineEN12QPaintEngine4TypeE @ 400 NONAME + _ZN9QGLBuffer15setUsagePatternENS_12UsagePatternE @ 401 NONAME + _ZN9QGLBuffer3mapENS_6AccessE @ 402 NONAME + _ZN9QGLBuffer4bindEv @ 403 NONAME + _ZN9QGLBuffer4readEiPvi @ 404 NONAME + _ZN9QGLBuffer5unmapEv @ 405 NONAME + _ZN9QGLBuffer5writeEiPKvi @ 406 NONAME + _ZN9QGLBuffer6createEv @ 407 NONAME + _ZN9QGLBuffer7destroyEv @ 408 NONAME + _ZN9QGLBuffer7releaseENS_4TypeE @ 409 NONAME + _ZN9QGLBuffer7releaseEv @ 410 NONAME + _ZN9QGLBuffer8allocateEPKvi @ 411 NONAME + _ZN9QGLBufferC1ENS_4TypeE @ 412 NONAME + _ZN9QGLBufferC1ERKS_ @ 413 NONAME + _ZN9QGLBufferC1Ev @ 414 NONAME + _ZN9QGLBufferC2ENS_4TypeE @ 415 NONAME + _ZN9QGLBufferC2ERKS_ @ 416 NONAME + _ZN9QGLBufferC2Ev @ 417 NONAME + _ZN9QGLBufferD1Ev @ 418 NONAME + _ZN9QGLBufferD2Ev @ 419 NONAME + _ZN9QGLBufferaSERKS_ @ 420 NONAME + _ZN9QGLFormat10setOverlayEb @ 421 NONAME + _ZN9QGLFormat10setProfileENS_20OpenGLContextProfileE @ 422 NONAME + _ZN9QGLFormat10setSamplesEi @ 423 NONAME + _ZN9QGLFormat10setStencilEb @ 424 NONAME + _ZN9QGLFormat10setVersionEii @ 425 NONAME + _ZN9QGLFormat13defaultFormatEv @ 426 NONAME + _ZN9QGLFormat15setDoubleBufferEb @ 427 NONAME + _ZN9QGLFormat15setSwapIntervalEi @ 428 NONAME + _ZN9QGLFormat16setDefaultFormatERKS_ @ 429 NONAME + _ZN9QGLFormat16setRedBufferSizeEi @ 430 NONAME + _ZN9QGLFormat16setSampleBuffersEb @ 431 NONAME + _ZN9QGLFormat17hasOpenGLOverlaysEv @ 432 NONAME + _ZN9QGLFormat17setBlueBufferSizeEi @ 433 NONAME + _ZN9QGLFormat18openGLVersionFlagsEv @ 434 NONAME + _ZN9QGLFormat18setAccumBufferSizeEi @ 435 NONAME + _ZN9QGLFormat18setAlphaBufferSizeEi @ 436 NONAME + _ZN9QGLFormat18setDepthBufferSizeEi @ 437 NONAME + _ZN9QGLFormat18setDirectRenderingEb @ 438 NONAME + _ZN9QGLFormat18setGreenBufferSizeEi @ 439 NONAME + _ZN9QGLFormat20defaultOverlayFormatEv @ 440 NONAME + _ZN9QGLFormat20setStencilBufferSizeEi @ 441 NONAME + _ZN9QGLFormat23setDefaultOverlayFormatERKS_ @ 442 NONAME + _ZN9QGLFormat6detachEv @ 443 NONAME + _ZN9QGLFormat7setRgbaEb @ 444 NONAME + _ZN9QGLFormat8setAccumEb @ 445 NONAME + _ZN9QGLFormat8setAlphaEb @ 446 NONAME + _ZN9QGLFormat8setDepthEb @ 447 NONAME + _ZN9QGLFormat8setPlaneEi @ 448 NONAME + _ZN9QGLFormat9hasOpenGLEv @ 449 NONAME + _ZN9QGLFormat9setOptionE6QFlagsIN3QGL12FormatOptionEE @ 450 NONAME + _ZN9QGLFormat9setStereoEb @ 451 NONAME + _ZN9QGLFormatC1E6QFlagsIN3QGL12FormatOptionEEi @ 452 NONAME + _ZN9QGLFormatC1ERKS_ @ 453 NONAME + _ZN9QGLFormatC1Ev @ 454 NONAME + _ZN9QGLFormatC2E6QFlagsIN3QGL12FormatOptionEEi @ 455 NONAME + _ZN9QGLFormatC2ERKS_ @ 456 NONAME + _ZN9QGLFormatC2Ev @ 457 NONAME + _ZN9QGLFormatD1Ev @ 458 NONAME + _ZN9QGLFormatD2Ev @ 459 NONAME + _ZN9QGLFormataSERKS_ @ 460 NONAME + _ZN9QGLShader11qt_metacallEN11QMetaObject4CallEiPPv @ 461 NONAME + _ZN9QGLShader11qt_metacastEPKc @ 462 NONAME + _ZN9QGLShader16hasOpenGLShadersE6QFlagsINS_13ShaderTypeBitEEPK10QGLContext @ 463 NONAME + _ZN9QGLShader16staticMetaObjectE @ 464 NONAME DATA 16 + _ZN9QGLShader17compileSourceCodeEPKc @ 465 NONAME + _ZN9QGLShader17compileSourceCodeERK10QByteArray @ 466 NONAME + _ZN9QGLShader17compileSourceCodeERK7QString @ 467 NONAME + _ZN9QGLShader17compileSourceFileERK7QString @ 468 NONAME + _ZN9QGLShader19getStaticMetaObjectEv @ 469 NONAME + _ZN9QGLShaderC1E6QFlagsINS_13ShaderTypeBitEEP7QObject @ 470 NONAME + _ZN9QGLShaderC1E6QFlagsINS_13ShaderTypeBitEEPK10QGLContextP7QObject @ 471 NONAME + _ZN9QGLShaderC2E6QFlagsINS_13ShaderTypeBitEEP7QObject @ 472 NONAME + _ZN9QGLShaderC2E6QFlagsINS_13ShaderTypeBitEEPK10QGLContextP7QObject @ 473 NONAME + _ZN9QGLShaderD0Ev @ 474 NONAME + _ZN9QGLShaderD1Ev @ 475 NONAME + _ZN9QGLShaderD2Ev @ 476 NONAME + _ZN9QGLWidget10paintEventEP11QPaintEvent @ 477 NONAME + _ZN9QGLWidget10renderTextEdddRK7QStringRK5QFonti @ 478 NONAME + _ZN9QGLWidget10renderTextEiiRK7QStringRK5QFonti @ 479 NONAME + _ZN9QGLWidget10setContextEP10QGLContextPKS0_b @ 480 NONAME + _ZN9QGLWidget11bindTextureERK6QImageji @ 481 NONAME + _ZN9QGLWidget11bindTextureERK6QImageji6QFlagsIN10QGLContext10BindOptionEE @ 482 NONAME + _ZN9QGLWidget11bindTextureERK7QPixmapji @ 483 NONAME + _ZN9QGLWidget11bindTextureERK7QPixmapji6QFlagsIN10QGLContext10BindOptionEE @ 484 NONAME + _ZN9QGLWidget11bindTextureERK7QString @ 485 NONAME + _ZN9QGLWidget11doneCurrentEv @ 486 NONAME + _ZN9QGLWidget11drawTextureERK6QRectFjj @ 487 NONAME + _ZN9QGLWidget11drawTextureERK7QPointFjj @ 488 NONAME + _ZN9QGLWidget11makeCurrentEv @ 489 NONAME + _ZN9QGLWidget11qt_metacallEN11QMetaObject4CallEiPPv @ 490 NONAME + _ZN9QGLWidget11qt_metacastEPKc @ 491 NONAME + _ZN9QGLWidget11resizeEventEP12QResizeEvent @ 492 NONAME + _ZN9QGLWidget11setColormapERK11QGLColormap @ 493 NONAME + _ZN9QGLWidget11swapBuffersEv @ 494 NONAME + _ZN9QGLWidget12initializeGLEv @ 495 NONAME + _ZN9QGLWidget12renderPixmapEiib @ 496 NONAME + _ZN9QGLWidget13deleteTextureEj @ 497 NONAME + _ZN9QGLWidget14paintOverlayGLEv @ 498 NONAME + _ZN9QGLWidget15grabFrameBufferEb @ 499 NONAME + _ZN9QGLWidget15resizeOverlayGLEii @ 500 NONAME + _ZN9QGLWidget15updateOverlayGLEv @ 501 NONAME + _ZN9QGLWidget16setMouseTrackingEb @ 502 NONAME + _ZN9QGLWidget16staticMetaObjectE @ 503 NONAME DATA 16 + _ZN9QGLWidget17convertToGLFormatERK6QImage @ 504 NONAME + _ZN9QGLWidget17setAutoBufferSwapEb @ 505 NONAME + _ZN9QGLWidget18makeOverlayCurrentEv @ 506 NONAME + _ZN9QGLWidget19fontDisplayListBaseERK5QFonti @ 507 NONAME + _ZN9QGLWidget19getStaticMetaObjectEv @ 508 NONAME + _ZN9QGLWidget19initializeOverlayGLEv @ 509 NONAME + _ZN9QGLWidget5eventEP6QEvent @ 510 NONAME + _ZN9QGLWidget6glDrawEv @ 511 NONAME + _ZN9QGLWidget6glInitEv @ 512 NONAME + _ZN9QGLWidget7paintGLEv @ 513 NONAME + _ZN9QGLWidget8resizeGLEii @ 514 NONAME + _ZN9QGLWidget8updateGLEv @ 515 NONAME + _ZN9QGLWidget9setFormatERK9QGLFormat @ 516 NONAME + _ZN9QGLWidgetC1EP10QGLContextP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 517 NONAME + _ZN9QGLWidgetC1EP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 518 NONAME + _ZN9QGLWidgetC1ERK9QGLFormatP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 519 NONAME + _ZN9QGLWidgetC2EP10QGLContextP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 520 NONAME + _ZN9QGLWidgetC2EP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 521 NONAME + _ZN9QGLWidgetC2ERK9QGLFormatP7QWidgetPKS_6QFlagsIN2Qt10WindowTypeEE @ 522 NONAME + _ZN9QGLWidgetD0Ev @ 523 NONAME + _ZN9QGLWidgetD1Ev @ 524 NONAME + _ZN9QGLWidgetD2Ev @ 525 NONAME + _ZNK10QGLContext10colorIndexERK6QColor @ 526 NONAME + _ZNK10QGLContext11initializedEv @ 527 NONAME + _ZNK10QGLContext11swapBuffersEv @ 528 NONAME + _ZNK10QGLContext13windowCreatedEv @ 529 NONAME + _ZNK10QGLContext14deviceIsPixmapEv @ 530 NONAME + _ZNK10QGLContext14getProcAddressERK7QString @ 531 NONAME + _ZNK10QGLContext15requestedFormatEv @ 532 NONAME + _ZNK10QGLContext23overlayTransparentColorEv @ 533 NONAME + _ZNK10QGLContext6deviceEv @ 534 NONAME + _ZNK10QGLContext6formatEv @ 535 NONAME + _ZNK10QGLContext7isValidEv @ 536 NONAME + _ZNK10QGLContext9isSharingEv @ 537 NONAME + _ZNK11QGLColormap10entryColorEi @ 538 NONAME + _ZNK11QGLColormap11findNearestEj @ 539 NONAME + _ZNK11QGLColormap4findEj @ 540 NONAME + _ZNK11QGLColormap4sizeEv @ 541 NONAME + _ZNK11QGLColormap7isEmptyEv @ 542 NONAME + _ZNK11QGLColormap8entryRgbEi @ 543 NONAME + _ZNK13QGLPixmapData11paintEngineEv @ 544 NONAME + _ZNK13QGLPixmapData13ensureCreatedEv @ 545 NONAME + _ZNK13QGLPixmapData14isValidContextEPK10QGLContext @ 546 NONAME + _ZNK13QGLPixmapData15hasAlphaChannelEv @ 547 NONAME + _ZNK13QGLPixmapData21copyBackFromRenderFboEb @ 548 NONAME + _ZNK13QGLPixmapData21useFramebufferObjectsEv @ 549 NONAME + _ZNK13QGLPixmapData26createCompatiblePixmapDataEv @ 550 NONAME + _ZNK13QGLPixmapData4bindEb @ 551 NONAME + _ZNK13QGLPixmapData6metricEN12QPaintDevice17PaintDeviceMetricE @ 552 NONAME + _ZNK13QGLPixmapData7isValidEv @ 553 NONAME + _ZNK13QGLPixmapData7textureEv @ 554 NONAME + _ZNK13QGLPixmapData7toImageEv @ 555 NONAME + _ZNK13QGLPixmapData8glDeviceEv @ 556 NONAME + _ZNK13QGLPixmapData9fillImageERK6QColor @ 557 NONAME + _ZNK14QGLPaintDevice14alphaRequestedEv @ 558 NONAME + _ZNK14QGLPaintDevice6formatEv @ 559 NONAME + _ZNK14QGLPaintDevice6metricEN12QPaintDevice17PaintDeviceMetricE @ 560 NONAME + _ZNK14QGLPixelBuffer11paintEngineEv @ 561 NONAME + _ZNK14QGLPixelBuffer20updateDynamicTextureEj @ 562 NONAME + _ZNK14QGLPixelBuffer22generateDynamicTextureEv @ 563 NONAME + _ZNK14QGLPixelBuffer4sizeEv @ 564 NONAME + _ZNK14QGLPixelBuffer6formatEv @ 565 NONAME + _ZNK14QGLPixelBuffer6handleEv @ 566 NONAME + _ZNK14QGLPixelBuffer6metricEN12QPaintDevice17PaintDeviceMetricE @ 567 NONAME + _ZNK14QGLPixelBuffer7isValidEv @ 568 NONAME + _ZNK14QGLPixelBuffer7toImageEv @ 569 NONAME + _ZNK14QGLSignalProxy10metaObjectEv @ 570 NONAME + _ZNK16QGLShaderProgram10metaObjectEv @ 571 NONAME + _ZNK16QGLShaderProgram15uniformLocationEPKc @ 572 NONAME + _ZNK16QGLShaderProgram15uniformLocationERK10QByteArray @ 573 NONAME + _ZNK16QGLShaderProgram15uniformLocationERK7QString @ 574 NONAME + _ZNK16QGLShaderProgram17attributeLocationEPKc @ 575 NONAME + _ZNK16QGLShaderProgram17attributeLocationERK10QByteArray @ 576 NONAME + _ZNK16QGLShaderProgram17attributeLocationERK7QString @ 577 NONAME + _ZNK16QGLShaderProgram17geometryInputTypeEv @ 578 NONAME + _ZNK16QGLShaderProgram18geometryOutputTypeEv @ 579 NONAME + _ZNK16QGLShaderProgram25geometryOutputVertexCountEv @ 580 NONAME + _ZNK16QGLShaderProgram25maxGeometryOutputVerticesEv @ 581 NONAME + _ZNK16QGLShaderProgram3logEv @ 582 NONAME + _ZNK16QGLShaderProgram7shadersEv @ 583 NONAME + _ZNK16QGLShaderProgram8isLinkedEv @ 584 NONAME + _ZNK16QGLShaderProgram9programIdEv @ 585 NONAME + _ZNK16QGLWindowSurface10metaObjectEv @ 586 NONAME + _ZNK16QGLWindowSurface7contextEv @ 587 NONAME + _ZNK17QGL2PaintEngineEx11createStateEP13QPainterState @ 588 NONAME + _ZNK17QGL2PaintEngineEx22isNativePaintingActiveEv @ 589 NONAME + _ZNK17QGLGraphicsSystem16createPixmapDataEN11QPixmapData9PixelTypeE @ 590 NONAME + _ZNK17QGLGraphicsSystem19createWindowSurfaceEP7QWidget @ 591 NONAME + _ZNK20QGLCustomShaderStage6sourceEv @ 592 NONAME + _ZNK20QGLFramebufferObject10attachmentEv @ 593 NONAME + _ZNK20QGLFramebufferObject11paintEngineEv @ 594 NONAME + _ZNK20QGLFramebufferObject4sizeEv @ 595 NONAME + _ZNK20QGLFramebufferObject6formatEv @ 596 NONAME + _ZNK20QGLFramebufferObject6handleEv @ 597 NONAME + _ZNK20QGLFramebufferObject6metricEN12QPaintDevice17PaintDeviceMetricE @ 598 NONAME + _ZNK20QGLFramebufferObject7isBoundEv @ 599 NONAME + _ZNK20QGLFramebufferObject7isValidEv @ 600 NONAME + _ZNK20QGLFramebufferObject7textureEv @ 601 NONAME + _ZNK20QGLFramebufferObject7toImageEv @ 602 NONAME + _ZNK20QGLTextureGlyphCache10metaObjectEv @ 603 NONAME + _ZNK20QGLTextureGlyphCache12glyphPaddingEv @ 604 NONAME + _ZNK21QGraphicsShaderEffect10metaObjectEv @ 605 NONAME + _ZNK21QGraphicsShaderEffect19pixelShaderFragmentEv @ 606 NONAME + _ZNK22QGLEngineShaderManager10metaObjectEv @ 607 NONAME + _ZNK26QGLFramebufferObjectFormat10attachmentEv @ 608 NONAME + _ZNK26QGLFramebufferObjectFormat13textureTargetEv @ 609 NONAME + _ZNK26QGLFramebufferObjectFormat21internalTextureFormatEv @ 610 NONAME + _ZNK26QGLFramebufferObjectFormat7samplesEv @ 611 NONAME + _ZNK26QGLFramebufferObjectFormateqERKS_ @ 612 NONAME + _ZNK26QGLFramebufferObjectFormatneERKS_ @ 613 NONAME + _ZNK9QGLBuffer12usagePatternEv @ 614 NONAME + _ZNK9QGLBuffer4sizeEv @ 615 NONAME + _ZNK9QGLBuffer4typeEv @ 616 NONAME + _ZNK9QGLBuffer8bufferIdEv @ 617 NONAME + _ZNK9QGLBuffer9isCreatedEv @ 618 NONAME + _ZNK9QGLFormat10testOptionE6QFlagsIN3QGL12FormatOptionEE @ 619 NONAME + _ZNK9QGLFormat12majorVersionEv @ 620 NONAME + _ZNK9QGLFormat12minorVersionEv @ 621 NONAME + _ZNK9QGLFormat12swapIntervalEv @ 622 NONAME + _ZNK9QGLFormat13redBufferSizeEv @ 623 NONAME + _ZNK9QGLFormat14blueBufferSizeEv @ 624 NONAME + _ZNK9QGLFormat15accumBufferSizeEv @ 625 NONAME + _ZNK9QGLFormat15alphaBufferSizeEv @ 626 NONAME + _ZNK9QGLFormat15depthBufferSizeEv @ 627 NONAME + _ZNK9QGLFormat15greenBufferSizeEv @ 628 NONAME + _ZNK9QGLFormat17stencilBufferSizeEv @ 629 NONAME + _ZNK9QGLFormat5planeEv @ 630 NONAME + _ZNK9QGLFormat7profileEv @ 631 NONAME + _ZNK9QGLFormat7samplesEv @ 632 NONAME + _ZNK9QGLShader10isCompiledEv @ 633 NONAME + _ZNK9QGLShader10metaObjectEv @ 634 NONAME + _ZNK9QGLShader10shaderTypeEv @ 635 NONAME + _ZNK9QGLShader10sourceCodeEv @ 636 NONAME + _ZNK9QGLShader3logEv @ 637 NONAME + _ZNK9QGLShader8shaderIdEv @ 638 NONAME + _ZNK9QGLWidget10metaObjectEv @ 639 NONAME + _ZNK9QGLWidget11paintEngineEv @ 640 NONAME + _ZNK9QGLWidget12doubleBufferEv @ 641 NONAME + _ZNK9QGLWidget13qglClearColorERK6QColor @ 642 NONAME + _ZNK9QGLWidget14autoBufferSwapEv @ 643 NONAME + _ZNK9QGLWidget14overlayContextEv @ 644 NONAME + _ZNK9QGLWidget6formatEv @ 645 NONAME + _ZNK9QGLWidget7contextEv @ 646 NONAME + _ZNK9QGLWidget7isValidEv @ 647 NONAME + _ZNK9QGLWidget8colormapEv @ 648 NONAME + _ZNK9QGLWidget8qglColorERK6QColor @ 649 NONAME + _ZNK9QGLWidget9isSharingEv @ 650 NONAME + _ZTI10QGLContext @ 651 NONAME + _ZTI13QGLPixmapData @ 652 NONAME + _ZTI14QGLPaintDevice @ 653 NONAME + _ZTI14QGLPixelBuffer @ 654 NONAME + _ZTI14QGLSignalProxy @ 655 NONAME + _ZTI16QGLShaderProgram @ 656 NONAME + _ZTI16QGLWindowSurface @ 657 NONAME + _ZTI17QGL2PaintEngineEx @ 658 NONAME + _ZTI17QGLGraphicsSystem @ 659 NONAME + _ZTI20QGLCustomShaderStage @ 660 NONAME + _ZTI20QGLFramebufferObject @ 661 NONAME + _ZTI20QGLTextureGlyphCache @ 662 NONAME + _ZTI21QGraphicsShaderEffect @ 663 NONAME + _ZTI22QGLEngineShaderManager @ 664 NONAME + _ZTI9QGLShader @ 665 NONAME + _ZTI9QGLWidget @ 666 NONAME + _ZTV10QGLContext @ 667 NONAME + _ZTV13QGLPixmapData @ 668 NONAME + _ZTV14QGLPaintDevice @ 669 NONAME + _ZTV14QGLPixelBuffer @ 670 NONAME + _ZTV14QGLSignalProxy @ 671 NONAME + _ZTV16QGLShaderProgram @ 672 NONAME + _ZTV16QGLWindowSurface @ 673 NONAME + _ZTV17QGL2PaintEngineEx @ 674 NONAME + _ZTV17QGLGraphicsSystem @ 675 NONAME + _ZTV20QGLCustomShaderStage @ 676 NONAME + _ZTV20QGLFramebufferObject @ 677 NONAME + _ZTV20QGLTextureGlyphCache @ 678 NONAME + _ZTV21QGraphicsShaderEffect @ 679 NONAME + _ZTV22QGLEngineShaderManager @ 680 NONAME + _ZTV9QGLShader @ 681 NONAME + _ZTV9QGLWidget @ 682 NONAME + _ZThn8_N16QGLWindowSurface10beginPaintERK7QRegion @ 683 NONAME + _ZThn8_N16QGLWindowSurface11paintDeviceEv @ 684 NONAME + _ZThn8_N16QGLWindowSurface11setGeometryERK5QRect @ 685 NONAME + _ZThn8_N16QGLWindowSurface5flushEP7QWidgetRK7QRegionRK6QPoint @ 686 NONAME + _ZThn8_N16QGLWindowSurface6bufferEPK7QWidget @ 687 NONAME + _ZThn8_N16QGLWindowSurface6scrollERK7QRegionii @ 688 NONAME + _ZThn8_N16QGLWindowSurface8endPaintERK7QRegion @ 689 NONAME + _ZThn8_N16QGLWindowSurfaceD0Ev @ 690 NONAME + _ZThn8_N16QGLWindowSurfaceD1Ev @ 691 NONAME + _ZThn8_N20QGLTextureGlyphCache11fillTextureERKN18QTextureGlyphCache5CoordEj @ 692 NONAME + _ZThn8_N20QGLTextureGlyphCache17createTextureDataEii @ 693 NONAME + _ZThn8_N20QGLTextureGlyphCache17resizeTextureDataEii @ 694 NONAME + _ZThn8_N20QGLTextureGlyphCacheD0Ev @ 695 NONAME + _ZThn8_N20QGLTextureGlyphCacheD1Ev @ 696 NONAME + _ZThn8_N9QGLWidgetD0Ev @ 697 NONAME + _ZThn8_N9QGLWidgetD1Ev @ 698 NONAME + _ZThn8_NK20QGLTextureGlyphCache12glyphPaddingEv @ 699 NONAME + _ZThn8_NK9QGLWidget11paintEngineEv @ 700 NONAME + _ZeqRK9QGLFormatS1_ @ 701 NONAME + _Zls6QDebugRK9QGLFormat @ 702 NONAME + _ZneRK9QGLFormatS1_ @ 703 NONAME + diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 9e1d582..1f622c0 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -65,26 +65,36 @@ symbian: { bearerStubZ = $${PWD}/qsymbianbearer.qtplugin } - qts60plugindeployment = \ - "IF package(0x20022E6D)" \ - " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ - " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ - "ELSEIF package(0x1028315F)" \ - " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ - " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ - "ELSEIF package(0x102752AE)" \ - " \"$$pluginLocations/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \ - " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ - "ELSEIF package(0x102032BE)" \ - " \"$$pluginLocations/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \ - " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_1.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ - "ELSE" \ - " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ - " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ - "ENDIF" \ - " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\" - qtlibraries.pkg_postrules += qts60plugindeployment + contains(S60_VERSION, 3.1)|contains(S60_VERSION, 3.2)|contains(S60_VERSION, 5.0) { + qts60plugindeployment = \ + "IF package(0x20022E6D)" \ + " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ELSEIF package(0x1028315F)" \ + " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ELSEIF package(0x102752AE)" \ + " \"$$pluginLocations/qts60plugin_3_2$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_2$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_2.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ELSEIF package(0x102032BE)" \ + " \"$$pluginLocations/qts60plugin_3_1$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_3_1$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}_3_1.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ELSE" \ + " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" \ + " \"$$bearerPluginLocation/qsymbianbearer$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qsymbianbearer$${QT_LIBINFIX}.dll\"" \ + "ENDIF" \ + " \"$$bearerStubZ\" - \"c:$$replace(QT_PLUGINS_BASE_DIR,/,\\)\\bearer\\qsymbianbearer$${QT_LIBINFIX}.qtplugin\" + } else { + # No need to deploy plugins for older platform versions when building on Symbian3 or later + qts60plugindeployment = \ + " \"$$pluginLocations/qts60plugin_5_0$${QT_LIBINFIX}.dll\" - \"c:\\sys\\bin\\qts60plugin_5_0$${QT_LIBINFIX}.dll\"" + bearer_plugin.sources = $$QT_BUILD_TREE/plugins/bearer/qsymbianbearer$${QT_LIBINFIX}.dll + bearer_plugin.path = c:$$QT_PLUGINS_BASE_DIR/bearer + DEPLOYMENT += bearer_plugin + } + + qtlibraries.pkg_postrules += qts60plugindeployment qtlibraries.path = c:/sys/bin diff --git a/src/script/api/qscriptcontext.cpp b/src/script/api/qscriptcontext.cpp index abaf5f9..64610c7 100644 --- a/src/script/api/qscriptcontext.cpp +++ b/src/script/api/qscriptcontext.cpp @@ -480,7 +480,7 @@ QScriptValue QScriptContext::activationObject() const If \a activation is not an object, this function does nothing. \note For a context corresponding to a JavaScript function, this is only - guarenteed to work if there was an QScriptEngineAgent active on the + guaranteed to work if there was an QScriptEngineAgent active on the engine while the function was evaluated. */ void QScriptContext::setActivationObject(const QScriptValue &activation) diff --git a/src/testlib/qbenchmark.cpp b/src/testlib/qbenchmark.cpp index c88ecb0..c92a88a 100644 --- a/src/testlib/qbenchmark.cpp +++ b/src/testlib/qbenchmark.cpp @@ -165,7 +165,7 @@ void QBenchmarkTestMethodData::setResult( } // Test the result directly without calling the measurer if the minimum time - // has been specifed on the command line with -minimumvalue. + // has been specified on the command line with -minimumvalue. else if (QBenchmarkGlobalData::current->walltimeMinimum != -1) accepted = (value > QBenchmarkGlobalData::current->walltimeMinimum); else |