From 16e0eb3c5238d358e0db3d6b3d83ac14b5550e92 Mon Sep 17 00:00:00 2001 From: lrknox Date: Mon, 12 Jun 2017 17:04:41 -0500 Subject: Moved libdynlib* plugin test libraries to noist_LT_LIBRARIES with added flag '-rpath /nowhere' to stop them being installed while keeping them from linking with libhdf5, etc. Incremented version to 1.8.19-pre1 and ran bin/release to create tar and zip files for testing. --- README.txt | 2 +- c++/Makefile.in | 5 +- c++/examples/Makefile.in | 5 +- c++/src/Makefile.in | 5 +- c++/src/cpp_doc_config | 2 +- c++/test/Makefile.in | 5 +- config/cmake/scripts/HDF5config.cmake | 2 +- config/conclude.am | 5 +- configure | 22 ++--- configure.ac | 2 +- examples/Makefile.in | 5 +- fortran/Makefile.in | 5 +- fortran/examples/Makefile.in | 5 +- fortran/src/Makefile.in | 5 +- fortran/test/Makefile.in | 5 +- fortran/testpar/Makefile.in | 5 +- hl/Makefile.in | 5 +- hl/c++/Makefile.in | 5 +- hl/c++/examples/Makefile.in | 5 +- hl/c++/src/Makefile.in | 5 +- hl/c++/test/Makefile.in | 5 +- hl/examples/Makefile.in | 5 +- hl/fortran/Makefile.in | 5 +- hl/fortran/examples/Makefile.in | 5 +- hl/fortran/src/Makefile.in | 5 +- hl/fortran/test/Makefile.in | 5 +- hl/src/Makefile.in | 5 +- hl/test/Makefile.in | 5 +- hl/tools/Makefile.in | 5 +- hl/tools/gif2h5/Makefile.in | 5 +- release_docs/RELEASE.txt | 2 +- src/H5public.h | 4 +- src/Makefile.in | 5 +- test/Makefile.am | 19 ++-- test/Makefile.in | 159 ++++++++++++---------------------- testpar/Makefile.in | 5 +- tools/Makefile.in | 5 +- tools/h5copy/Makefile.in | 5 +- tools/h5diff/Makefile.am | 6 +- tools/h5diff/Makefile.in | 139 ++++++++++++----------------- tools/h5dump/Makefile.am | 7 +- tools/h5dump/Makefile.in | 140 ++++++++++++------------------ tools/h5import/Makefile.in | 5 +- tools/h5jam/Makefile.in | 5 +- tools/h5ls/Makefile.am | 7 +- tools/h5ls/Makefile.in | 142 ++++++++++++------------------ tools/h5repack/Makefile.am | 9 +- tools/h5repack/Makefile.in | 139 ++++++++++++----------------- tools/h5stat/Makefile.in | 5 +- tools/lib/Makefile.in | 5 +- tools/misc/Makefile.in | 5 +- tools/perform/Makefile.in | 5 +- 52 files changed, 340 insertions(+), 638 deletions(-) diff --git a/README.txt b/README.txt index 45be0f2..72316f2 100644 --- a/README.txt +++ b/README.txt @@ -1,4 +1,4 @@ -HDF5 version 1.8.19-pre1 released on 2017-06-07 +HDF5 version 1.8.19-pre2 released on 2017-06-12 Please refer to the release_docs/INSTALL file for installation instructions. ------------------------------------------------------------------------------ diff --git a/c++/Makefile.in b/c++/Makefile.in index f6e5df0..33edf77 100644 --- a/c++/Makefile.in +++ b/c++/Makefile.in @@ -674,12 +674,10 @@ DIST_SUBDIRS = src test examples LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1181,7 +1179,6 @@ check-clean :: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1189,7 +1186,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/c++/examples/Makefile.in b/c++/examples/Makefile.in index d819404..c280200 100644 --- a/c++/examples/Makefile.in +++ b/c++/examples/Makefile.in @@ -654,12 +654,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1134,7 +1132,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1142,7 +1139,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/c++/src/Makefile.in b/c++/src/Makefile.in index f2961a4..2a4b0bd 100644 --- a/c++/src/Makefile.in +++ b/c++/src/Makefile.in @@ -750,12 +750,10 @@ CXX_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1342,7 +1340,6 @@ mostlyclean-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1350,7 +1347,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/c++/src/cpp_doc_config b/c++/src/cpp_doc_config index 3f6e39c..c7a7be9 100644 --- a/c++/src/cpp_doc_config +++ b/c++/src/cpp_doc_config @@ -49,7 +49,7 @@ PROJECT_NAME = "HDF5 C++ API" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "1.8.19-pre1, currently under development" +PROJECT_NUMBER = "1.8.19-pre2, currently under development" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/c++/test/Makefile.in b/c++/test/Makefile.in index d528314..35dfe0e 100644 --- a/c++/test/Makefile.in +++ b/c++/test/Makefile.in @@ -692,12 +692,10 @@ CXX_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1188,7 +1186,6 @@ mostlyclean-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1196,7 +1193,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/config/cmake/scripts/HDF5config.cmake b/config/cmake/scripts/HDF5config.cmake index fb1b90f..7526f28 100755 --- a/config/cmake/scripts/HDF5config.cmake +++ b/config/cmake/scripts/HDF5config.cmake @@ -38,7 +38,7 @@ cmake_minimum_required (VERSION 3.2.2 FATAL_ERROR) ############################################################################## set (CTEST_SOURCE_VERSION "1.8.19") -set (CTEST_SOURCE_VERSEXT "-pre1") +set (CTEST_SOURCE_VERSEXT "-pre2") ############################################################################## # handle input parameters to script. diff --git a/config/conclude.am b/config/conclude.am index ea8bdfc..617c371 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -23,12 +23,10 @@ # be built at certain times. LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) TESTS = $(TEST_PROG) $(TEST_SCRIPT) $(EXTRA_TEST) -dyndir=$(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) @@ -36,7 +34,6 @@ AM_SH_LOG_FLAGS = # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -44,7 +41,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/configure b/configure index 0267cfe..f710d7d 100755 --- a/configure +++ b/configure @@ -1,7 +1,7 @@ #! /bin/sh # From configure.ac Id. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for HDF5 1.8.19-pre1. +# Generated by GNU Autoconf 2.69 for HDF5 1.8.19-pre2. # # Report bugs to . # @@ -591,8 +591,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='HDF5' PACKAGE_TARNAME='hdf5' -PACKAGE_VERSION='1.8.19-pre1' -PACKAGE_STRING='HDF5 1.8.19-pre1' +PACKAGE_VERSION='1.8.19-pre2' +PACKAGE_STRING='HDF5 1.8.19-pre2' PACKAGE_BUGREPORT='help@hdfgroup.org' PACKAGE_URL='' @@ -1476,7 +1476,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures HDF5 1.8.19-pre1 to adapt to many kinds of systems. +\`configure' configures HDF5 1.8.19-pre2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1546,7 +1546,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of HDF5 1.8.19-pre1:";; + short | recursive ) echo "Configuration of HDF5 1.8.19-pre2:";; esac cat <<\_ACEOF @@ -1741,7 +1741,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -HDF5 configure 1.8.19-pre1 +HDF5 configure 1.8.19-pre2 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2678,7 +2678,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by HDF5 $as_me 1.8.19-pre1, which was +It was created by HDF5 $as_me 1.8.19-pre2, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -3549,7 +3549,7 @@ fi # Define the identity of the package. PACKAGE='hdf5' - VERSION='1.8.19-pre1' + VERSION='1.8.19-pre2' cat >>confdefs.h <<_ACEOF @@ -29295,7 +29295,7 @@ Usage: $0 [OPTIONS] Report bugs to ." lt_cl_version="\ -HDF5 config.lt 1.8.19-pre1 +HDF5 config.lt 1.8.19-pre2 configured by $0, generated by GNU Autoconf 2.69. Copyright (C) 2011 Free Software Foundation, Inc. @@ -31330,7 +31330,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by HDF5 $as_me 1.8.19-pre1, which was +This file was extended by HDF5 $as_me 1.8.19-pre2, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -31396,7 +31396,7 @@ _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -HDF5 config.status 1.8.19-pre1 +HDF5 config.status 1.8.19-pre2 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff --git a/configure.ac b/configure.ac index 7cf82ba..34771b3 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ AC_PREREQ([2.69]) ## NOTE: Do not forget to change the version number here when we do a ## release!!! ## -AC_INIT([HDF5], [1.8.19-pre1], [help@hdfgroup.org]) +AC_INIT([HDF5], [1.8.19-pre2], [help@hdfgroup.org]) AC_CONFIG_SRCDIR([src/H5.c]) AC_CONFIG_HEADERS([src/H5config.h]) diff --git a/examples/Makefile.in b/examples/Makefile.in index 79ccc89..54b469b 100644 --- a/examples/Makefile.in +++ b/examples/Makefile.in @@ -665,12 +665,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1164,7 +1162,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1172,7 +1169,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/fortran/Makefile.in b/fortran/Makefile.in index 86d9da6..7ca97bc 100644 --- a/fortran/Makefile.in +++ b/fortran/Makefile.in @@ -683,12 +683,10 @@ DIST_SUBDIRS = src test testpar examples LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1190,7 +1188,6 @@ check-clean :: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1198,7 +1195,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/fortran/examples/Makefile.in b/fortran/examples/Makefile.in index 3e0acbc..557ce0a 100644 --- a/fortran/examples/Makefile.in +++ b/fortran/examples/Makefile.in @@ -666,12 +666,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1155,7 +1153,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1163,7 +1160,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/fortran/src/Makefile.in b/fortran/src/Makefile.in index 0494278..253b957 100644 --- a/fortran/src/Makefile.in +++ b/fortran/src/Makefile.in @@ -835,12 +835,10 @@ FORTRAN_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1487,7 +1485,6 @@ HDF5mpio.lo: $(srcdir)/H5FDmpioff.f90 H5f90global.lo H5_ff$(F_STATUS).lo # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1495,7 +1492,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/fortran/test/Makefile.in b/fortran/test/Makefile.in index f10240d..7abb947 100644 --- a/fortran/test/Makefile.in +++ b/fortran/test/Makefile.in @@ -799,12 +799,10 @@ FORTRAN_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1463,7 +1461,6 @@ fflush2.chkexe_: fflush1.chkexe_ # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1471,7 +1468,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/fortran/testpar/Makefile.in b/fortran/testpar/Makefile.in index deeea8d..bb47e48 100644 --- a/fortran/testpar/Makefile.in +++ b/fortran/testpar/Makefile.in @@ -686,12 +686,10 @@ FORTRAN_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1135,7 +1133,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1143,7 +1140,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/Makefile.in b/hl/Makefile.in index 7257abe..6631d6a 100644 --- a/hl/Makefile.in +++ b/hl/Makefile.in @@ -680,12 +680,10 @@ DIST_SUBDIRS = src test tools c++ fortran examples LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1191,7 +1189,6 @@ build-check-clean: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1199,7 +1196,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/c++/Makefile.in b/hl/c++/Makefile.in index b62507f..50012af 100644 --- a/hl/c++/Makefile.in +++ b/hl/c++/Makefile.in @@ -674,12 +674,10 @@ DIST_SUBDIRS = src test examples LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1181,7 +1179,6 @@ check-clean :: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1189,7 +1186,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/c++/examples/Makefile.in b/hl/c++/examples/Makefile.in index 37ce68c..eb86020 100644 --- a/hl/c++/examples/Makefile.in +++ b/hl/c++/examples/Makefile.in @@ -644,12 +644,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1099,7 +1097,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1107,7 +1104,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/c++/src/Makefile.in b/hl/c++/src/Makefile.in index cd0fe7a..a11a82f 100644 --- a/hl/c++/src/Makefile.in +++ b/hl/c++/src/Makefile.in @@ -717,12 +717,10 @@ include_HEADERS = H5PacketTable.h LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1232,7 +1230,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1240,7 +1237,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/c++/test/Makefile.in b/hl/c++/test/Makefile.in index 177f103..f4e6e54 100644 --- a/hl/c++/test/Makefile.in +++ b/hl/c++/test/Makefile.in @@ -683,12 +683,10 @@ CXX_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1155,7 +1153,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1163,7 +1160,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/examples/Makefile.in b/hl/examples/Makefile.in index 9562b29..ab1de2c 100644 --- a/hl/examples/Makefile.in +++ b/hl/examples/Makefile.in @@ -659,12 +659,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1138,7 +1136,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1146,7 +1143,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/fortran/Makefile.in b/hl/fortran/Makefile.in index e478a34..317267d 100644 --- a/hl/fortran/Makefile.in +++ b/hl/fortran/Makefile.in @@ -678,12 +678,10 @@ DIST_SUBDIRS = src test examples LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1185,7 +1183,6 @@ check-clean :: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1193,7 +1190,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/fortran/examples/Makefile.in b/hl/fortran/examples/Makefile.in index 18c43d3..75f304e 100644 --- a/hl/fortran/examples/Makefile.in +++ b/hl/fortran/examples/Makefile.in @@ -652,12 +652,10 @@ CLEANFILES = $(EXAMPLE_PROG) $(EXAMPLE_PROG_PARA) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1103,7 +1101,6 @@ installcheck-local: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1111,7 +1108,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/fortran/src/Makefile.in b/hl/fortran/src/Makefile.in index 62cfdf0..b7f5b39 100644 --- a/hl/fortran/src/Makefile.in +++ b/hl/fortran/src/Makefile.in @@ -738,12 +738,10 @@ libhdf5hl_fortran_la_LIBADD = $(LIBH5_HL) $(LIBH5F) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1280,7 +1278,6 @@ H5TBff.lo: $(srcdir)/H5TBff.f90 # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1288,7 +1285,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/fortran/test/Makefile.in b/hl/fortran/test/Makefile.in index bcb4b3c..80ae4e2 100644 --- a/hl/fortran/test/Makefile.in +++ b/hl/fortran/test/Makefile.in @@ -701,12 +701,10 @@ FORTRAN_API = yes LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1190,7 +1188,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1198,7 +1195,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/src/Makefile.in b/hl/src/Makefile.in index f49844d..d2bfd0a 100644 --- a/hl/src/Makefile.in +++ b/hl/src/Makefile.in @@ -715,12 +715,10 @@ include_HEADERS = hdf5_hl.h H5DOpublic.h H5IMpublic.h H5LTpublic.h H5TBpublic.h LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1237,7 +1235,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1245,7 +1242,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/test/Makefile.in b/hl/test/Makefile.in index c9544d7..5a76793 100644 --- a/hl/test/Makefile.in +++ b/hl/test/Makefile.in @@ -735,12 +735,10 @@ test_packet_SOURCES = test_packet.c test_packet_vlen.c LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1297,7 +1295,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1305,7 +1302,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/tools/Makefile.in b/hl/tools/Makefile.in index 0589b49..cb5bc37 100644 --- a/hl/tools/Makefile.in +++ b/hl/tools/Makefile.in @@ -676,12 +676,10 @@ SUBDIRS = gif2h5 LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1167,7 +1165,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1175,7 +1172,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/hl/tools/gif2h5/Makefile.in b/hl/tools/gif2h5/Makefile.in index dd7a691..0d75863 100644 --- a/hl/tools/gif2h5/Makefile.in +++ b/hl/tools/gif2h5/Makefile.in @@ -701,12 +701,10 @@ LDADD = $(LIBH5_HL) $(LIBH5TOOLS) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1237,7 +1235,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1245,7 +1242,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/release_docs/RELEASE.txt b/release_docs/RELEASE.txt index 9378bc4..27bfdda 100644 --- a/release_docs/RELEASE.txt +++ b/release_docs/RELEASE.txt @@ -1,4 +1,4 @@ -HDF5 version 1.8.19-pre1 released on 2017-06-07 +HDF5 version 1.8.19-pre2 released on 2017-06-12 ================================================================================ INTRODUCTION diff --git a/src/H5public.h b/src/H5public.h index a335034..38f1933 100644 --- a/src/H5public.h +++ b/src/H5public.h @@ -93,9 +93,9 @@ extern "C" { #define H5_VERS_MAJOR 1 /* For major interface/format changes */ #define H5_VERS_MINOR 8 /* For minor interface/format changes */ #define H5_VERS_RELEASE 19 /* For tweaks, bug-fixes, or development */ -#define H5_VERS_SUBRELEASE "pre1" /* For pre-releases like snap0 */ +#define H5_VERS_SUBRELEASE "pre2" /* For pre-releases like snap0 */ /* Empty string for real releases. */ -#define H5_VERS_INFO "HDF5 library version: 1.8.19-pre1" /* Full version string */ +#define H5_VERS_INFO "HDF5 library version: 1.8.19-pre2" /* Full version string */ #define H5check() H5check_version(H5_VERS_MAJOR,H5_VERS_MINOR, \ H5_VERS_RELEASE) diff --git a/src/Makefile.in b/src/Makefile.in index 06e169f..2c5e55f 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -853,12 +853,10 @@ settings_DATA = libhdf5.settings LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1729,7 +1727,6 @@ trace: $(libhdf5_la_SOURCES) # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1737,7 +1734,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/test/Makefile.am b/test/Makefile.am index 30721bd..4ce7a87 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -73,21 +73,18 @@ if BUILD_ALL_CONDITIONAL noinst_PROGRAMS=$(BUILD_ALL_PROGS) endif -# The libh5test library provides common support code for the tests. -noinst_LTLIBRARIES=libh5test.la - if HAVE_SHARED_CONDITIONAL # The libdynlib1, libdynlib2, libdynlib3, and libdynlib4 library for testing plugin module plugin.c. # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la + noinst_LTLIBRARIES=libh5test.la libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la libdynlib1_la_SOURCES=dynlib1.c libdynlib2_la_SOURCES=dynlib2.c libdynlib3_la_SOURCES=dynlib3.c libdynlib4_la_SOURCES=dynlib4.c - libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libdynlib1.la: $(libdynlib1_la_OBJECTS) $(libdynlib1_la_DEPENDENCIES) $(EXTRA_libdynlib1_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib1_la_LINK) $(am_libdynlib1_la_rpath) $(libdynlib1_la_OBJECTS) $(libdynlib1_la_LIBADD) @@ -100,9 +97,9 @@ libdynlib3.la: $(libdynlib3_la_OBJECTS) $(libdynlib3_la_DEPENDENCIES) $(EXTRA_li libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* +else + # The libh5test library provides common support code for the tests. + noinst_LTLIBRARIES=libh5test.la endif libh5test_la_SOURCES=h5test.c testframe.c cache_common.c diff --git a/test/Makefile.in b/test/Makefile.in index 2bf0ef7..5650484 100644 --- a/test/Makefile.in +++ b/test/Makefile.in @@ -125,35 +125,7 @@ CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = testcheck_version.sh testerror.sh H5srcdir_str.h \ testlibinfo.sh testlinks_env.sh test_plugin.sh CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(dyndir)" -LTLIBRARIES = $(dyn_LTLIBRARIES) $(noinst_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) libdynlib1_la_LIBADD = am__libdynlib1_la_SOURCES_DIST = dynlib1.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_OBJECTS = dynlib1.lo @@ -165,8 +137,7 @@ am__v_lt_1 = libdynlib1_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdynlib1_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib1_la_rpath = libdynlib2_la_LIBADD = am__libdynlib2_la_SOURCES_DIST = dynlib2.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_OBJECTS = dynlib2.lo @@ -174,8 +145,7 @@ libdynlib2_la_OBJECTS = $(am_libdynlib2_la_OBJECTS) libdynlib2_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdynlib2_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib2_la_rpath = libdynlib3_la_LIBADD = am__libdynlib3_la_SOURCES_DIST = dynlib3.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_OBJECTS = dynlib3.lo @@ -183,8 +153,7 @@ libdynlib3_la_OBJECTS = $(am_libdynlib3_la_OBJECTS) libdynlib3_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdynlib3_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib3_la_rpath = libdynlib4_la_LIBADD = am__libdynlib4_la_SOURCES_DIST = dynlib4.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib4_la_OBJECTS = dynlib4.lo @@ -192,11 +161,12 @@ libdynlib4_la_OBJECTS = $(am_libdynlib4_la_OBJECTS) libdynlib4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(libdynlib4_la_LDFLAGS) $(LDFLAGS) -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib4_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlib4_la_rpath = libh5test_la_LIBADD = am_libh5test_la_OBJECTS = h5test.lo testframe.lo cache_common.lo libh5test_la_OBJECTS = $(am_libh5test_la_OBJECTS) +@HAVE_SHARED_CONDITIONAL_FALSE@am_libh5test_la_rpath = +@HAVE_SHARED_CONDITIONAL_TRUE@am_libh5test_la_rpath = am__EXEEXT_1 = testhdf5$(EXEEXT) lheap$(EXEEXT) ohdr$(EXEEXT) \ stab$(EXEEXT) gheap$(EXEEXT) cache$(EXEEXT) cache_api$(EXEEXT) \ pool$(EXEEXT) accum$(EXEEXT) hyperslab$(EXEEXT) \ @@ -622,6 +592,33 @@ am__tty_colors = { \ std=''; \ fi; \ } +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* @@ -1119,21 +1116,16 @@ BUILD_ALL_PROGS = gen_bad_ohdr gen_bogus gen_cross gen_deflate gen_filters gen_i gen_noencoder gen_nullspace gen_udlinks space_overflow gen_sizes_lheap \ gen_file_image - -# The libh5test library provides common support code for the tests. -noinst_LTLIBRARIES = libh5test.la -@HAVE_SHARED_CONDITIONAL_TRUE@dyn_LTLIBRARIES = libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la +@HAVE_SHARED_CONDITIONAL_FALSE@noinst_LTLIBRARIES = libh5test.la +@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libh5test.la libdynlib1.la libdynlib2.la libdynlib3.la libdynlib4.la @HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_SOURCES = dynlib1.c @HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_SOURCES = dynlib2.c @HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_SOURCES = dynlib3.c @HAVE_SHARED_CONDITIONAL_TRUE@libdynlib4_la_SOURCES = dynlib4.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib1_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib2_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib3_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlib4_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libh5test_la_SOURCES = h5test.c testframe.c cache_common.c # Use libhd5test.la to compile all of the tests @@ -1164,12 +1156,10 @@ DISTCLEANFILES = testerror.sh testlibinfo.sh testcheck_version.sh testlinks_env. LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1224,41 +1214,6 @@ testlinks_env.sh: $(top_builddir)/config.status $(srcdir)/testlinks_env.sh.in test_plugin.sh: $(top_builddir)/config.status $(srcdir)/test_plugin.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-dynLTLIBRARIES: $(dyn_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(dyndir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dyndir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dyndir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dyndir)"; \ - } - -uninstall-dynLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dyndir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dyndir)/$$f"; \ - done - -clean-dynLTLIBRARIES: - -test -z "$(dyn_LTLIBRARIES)" || rm -f $(dyn_LTLIBRARIES) - @list='$(dyn_LTLIBRARIES)'; \ - locs=`for p in $$list; do echo $$p; done | \ - sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ - sort -u`; \ - test -z "$$locs" || { \ - echo rm -f $${locs}; \ - rm -f $${locs}; \ - } - clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ @@ -1283,7 +1238,7 @@ clean-noinstLTLIBRARIES: @HAVE_SHARED_CONDITIONAL_FALSE@ $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) $(LIBS) libh5test.la: $(libh5test_la_OBJECTS) $(libh5test_la_DEPENDENCIES) $(EXTRA_libh5test_la_DEPENDENCIES) - $(AM_V_CCLD)$(LINK) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS) + $(AM_V_CCLD)$(LINK) $(am_libh5test_la_rpath) $(libh5test_la_OBJECTS) $(libh5test_la_LIBADD) $(LIBS) clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ @@ -2272,9 +2227,6 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: - for dir in "$(DESTDIR)$(dyndir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-am install-exec: install-exec-am install-data: install-data-am @@ -2311,9 +2263,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-checkPROGRAMS clean-dynLTLIBRARIES clean-generic \ - clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ - mostlyclean-am +clean-am: clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -2333,7 +2284,7 @@ info: info-am info-am: -install-data-am: install-dynLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -2379,26 +2330,24 @@ ps: ps-am ps-am: -uninstall-am: uninstall-dynLTLIBRARIES +uninstall-am: .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-checkPROGRAMS clean-dynLTLIBRARIES \ - clean-generic clean-libtool clean-noinstLTLIBRARIES \ - clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ - distclean-compile distclean-generic distclean-libtool \ - distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-dynLTLIBRARIES install-exec \ + check-am clean clean-checkPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES clean-noinstPROGRAMS cscopelist-am \ + ctags ctags-am distclean distclean-compile distclean-generic \ + distclean-libtool distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ - pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ - uninstall-dynLTLIBRARIES + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am .PRECIOUS: Makefile @@ -2428,6 +2377,7 @@ help: @HAVE_SHARED_CONDITIONAL_TRUE@libdynlib4.la: $(libdynlib4_la_OBJECTS) $(libdynlib4_la_DEPENDENCIES) $(EXTRA_libdynlib4_la_DEPENDENCIES) @HAVE_SHARED_CONDITIONAL_TRUE@ $(AM_V_CCLD)$(libdynlib4_la_LINK) $(am_libdynlib4_la_rpath) $(libdynlib4_la_OBJECTS) $(libdynlib4_la_LIBADD) +@HAVE_SHARED_CONDITIONAL_FALSE@ # The libh5test library provides common support code for the tests. # Additional target for running timing test timings _timings: testmeta @@ -2443,7 +2393,6 @@ flush2.chkexe_: flush1.chkexe_ # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -2451,7 +2400,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/testpar/Makefile.in b/testpar/Makefile.in index 7ef18e7..116df37 100644 --- a/testpar/Makefile.in +++ b/testpar/Makefile.in @@ -723,12 +723,10 @@ LDADD = $(LIBH5TEST) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1237,7 +1235,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1245,7 +1242,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/Makefile.in b/tools/Makefile.in index 877984e..f0fe67c 100644 --- a/tools/Makefile.in +++ b/tools/Makefile.in @@ -679,12 +679,10 @@ SUBDIRS = lib h5diff h5ls h5dump misc h5import h5repack h5jam h5copy h5stat \ LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1170,7 +1168,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1178,7 +1175,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5copy/Makefile.in b/tools/h5copy/Makefile.in index f6b7dac..55b4584 100644 --- a/tools/h5copy/Makefile.in +++ b/tools/h5copy/Makefile.in @@ -698,12 +698,10 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1231,7 +1229,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1239,7 +1236,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5diff/Makefile.am b/tools/h5diff/Makefile.am index 337261a..4b153d5 100644 --- a/tools/h5diff/Makefile.am +++ b/tools/h5diff/Makefile.am @@ -58,14 +58,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibdiff.la + noinst_LTLIBRARIES=libdynlibdiff.la libdynlibdiff_la_SOURCES=dynlib_diff.c - libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libdynlibdiff.la: $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_DEPENDENCIES) $(EXTRA_libdynlibdiff_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibdiff_la_LINK) $(am_libdynlibdiff_la_rpath) $(libdynlibdiff_la_OBJECTS) $(libdynlibdiff_la_LIBADD) -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* endif # Temporary files. *.h5 are generated by h5diff. They should diff --git a/tools/h5diff/Makefile.in b/tools/h5diff/Makefile.in index cea2023..37aeb26 100644 --- a/tools/h5diff/Makefile.in +++ b/tools/h5diff/Makefile.in @@ -119,35 +119,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5diff_plugin.sh testh5diff.sh testph5diff.sh CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(dyn_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) libdynlibdiff_la_LIBADD = am__libdynlibdiff_la_SOURCES_DIST = dynlib_diff.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdiff_la_OBJECTS = \ @@ -161,9 +133,9 @@ libdynlibdiff_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdynlibdiff_la_LDFLAGS) $(LDFLAGS) \ -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdiff_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdiff_la_rpath = @BUILD_PARALLEL_CONDITIONAL_TRUE@am__EXEEXT_1 = ph5diff$(EXEEXT) +am__installdirs = "$(DESTDIR)$(bindir)" am__EXEEXT_2 = h5diffgentest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_h5diff_OBJECTS = h5diff_main.$(OBJEXT) h5diff_common.$(OBJEXT) @@ -265,6 +237,33 @@ am__tty_colors = { \ std=''; \ fi; \ } +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* @@ -692,8 +691,6 @@ TRACE = perl $(top_srcdir)/bin/trace # .chkexe files are used to mark tests that have run successfully. # .chklog files are output from those tests. # *.clog and *.clog2 are from the MPE option. -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* # Temporary files. *.h5 are generated by h5diff. They should # be copied to the testfiles/ directory if update is required @@ -722,9 +719,9 @@ h5diffgentest_SOURCES = h5diffgentest.c # Programs depend on the main HDF5 library and tools library LDADD = $(LIBH5TOOLS) $(LIBHDF5) -@HAVE_SHARED_CONDITIONAL_TRUE@dyn_LTLIBRARIES = libdynlibdiff.la +@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libdynlibdiff.la @HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdiff_la_SOURCES = dynlib_diff.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdiff_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere DISTCLEANFILES = h5diff_plugin.sh # Automake needs to be taught how to build lib, dyn, progs, and tests targets. @@ -735,12 +732,10 @@ DISTCLEANFILES = h5diff_plugin.sh LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -789,33 +784,9 @@ testh5diff.sh: $(top_builddir)/config.status $(srcdir)/testh5diff.sh.in testph5diff.sh: $(top_builddir)/config.status $(srcdir)/testph5diff.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-dynLTLIBRARIES: $(dyn_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(dyndir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dyndir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dyndir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dyndir)"; \ - } - -uninstall-dynLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dyndir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dyndir)/$$f"; \ - done - -clean-dynLTLIBRARIES: - -test -z "$(dyn_LTLIBRARIES)" || rm -f $(dyn_LTLIBRARIES) - @list='$(dyn_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -1176,7 +1147,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: - for dir in "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1215,8 +1186,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-dynLTLIBRARIES \ - clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1236,7 +1207,7 @@ info: info-am info-am: -install-data-am: install-dynLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -1282,26 +1253,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dynLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-dynLTLIBRARIES clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-dynLTLIBRARIES install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dynLTLIBRARIES + clean-generic clean-libtool clean-noinstLTLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile @@ -1324,7 +1294,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1332,7 +1301,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5dump/Makefile.am b/tools/h5dump/Makefile.am index 98e1d1d..bac0f73 100644 --- a/tools/h5dump/Makefile.am +++ b/tools/h5dump/Makefile.am @@ -48,15 +48,12 @@ h5dump_SOURCES=h5dump.c h5dump_ddl.c h5dump_xml.c if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibdump.la + noinst_LTLIBRARIES=libdynlibdump.la libdynlibdump_la_SOURCES=dynlib_dump.c - libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libdynlibdump.la: $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_DEPENDENCIES) $(EXTRA_libdynlibdump_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibdump_la_LINK) $(am_libdynlibdump_la_rpath) $(libdynlibdump_la_OBJECTS) $(libdynlibdump_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* endif # Temporary files. *.h5 are generated by h5dumpgentest. They should diff --git a/tools/h5dump/Makefile.in b/tools/h5dump/Makefile.in index 8a42296..82b6011 100644 --- a/tools/h5dump/Makefile.in +++ b/tools/h5dump/Makefile.in @@ -120,35 +120,7 @@ CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5dump_plugin.sh testh5dump.sh testh5dumppbits.sh \ testh5dumpxml.sh CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(dyn_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) libdynlibdump_la_LIBADD = am__libdynlibdump_la_SOURCES_DIST = dynlib_dump.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdump_la_OBJECTS = \ @@ -162,8 +134,8 @@ libdynlibdump_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdynlibdump_la_LDFLAGS) $(LDFLAGS) \ -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdump_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibdump_la_rpath = +am__installdirs = "$(DESTDIR)$(bindir)" am__EXEEXT_1 = h5dumpgentest$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) binread_SOURCES = binread.c @@ -266,6 +238,33 @@ am__tty_colors = { \ std=''; \ fi; \ } +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* @@ -695,9 +694,6 @@ TRACE = perl $(top_srcdir)/bin/trace # .chklog files are output from those tests. # *.clog and *.clog2 are from the MPE option. -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* - # Temporary files. *.h5 are generated by h5dumpgentest. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin @@ -717,9 +713,9 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) # Source files for the program h5dump_SOURCES = h5dump.c h5dump_ddl.c h5dump_xml.c -@HAVE_SHARED_CONDITIONAL_TRUE@dyn_LTLIBRARIES = libdynlibdump.la +@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libdynlibdump.la @HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdump_la_SOURCES = dynlib_dump.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibdump_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere DISTCLEANFILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh # Automake needs to be taught how to build lib, dyn, progs, and tests targets. @@ -730,12 +726,10 @@ DISTCLEANFILES = testh5dump.sh testh5dumppbits.sh testh5dumpxml.sh LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -786,33 +780,9 @@ testh5dumppbits.sh: $(top_builddir)/config.status $(srcdir)/testh5dumppbits.sh.i testh5dumpxml.sh: $(top_builddir)/config.status $(srcdir)/testh5dumpxml.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-dynLTLIBRARIES: $(dyn_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(dyndir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dyndir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dyndir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dyndir)"; \ - } - -uninstall-dynLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dyndir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dyndir)/$$f"; \ - done - -clean-dynLTLIBRARIES: - -test -z "$(dyn_LTLIBRARIES)" || rm -f $(dyn_LTLIBRARIES) - @list='$(dyn_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -1174,7 +1144,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: - for dir in "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1213,8 +1183,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-dynLTLIBRARIES \ - clean-generic clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1234,7 +1204,7 @@ info: info-am info-am: -install-data-am: install-dynLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -1280,26 +1250,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dynLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-dynLTLIBRARIES clean-generic clean-libtool cscopelist-am \ - ctags ctags-am distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-dynLTLIBRARIES install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dynLTLIBRARIES + clean-generic clean-libtool clean-noinstLTLIBRARIES \ + cscopelist-am ctags ctags-am distclean distclean-compile \ + distclean-generic distclean-libtool distclean-tags distdir dvi \ + dvi-am html html-am info info-am install install-am \ + install-binPROGRAMS install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ + mostlyclean-local pdf pdf-am ps ps-am recheck tags tags-am \ + uninstall uninstall-am uninstall-binPROGRAMS .PRECIOUS: Makefile @@ -1322,7 +1291,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1330,7 +1298,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5import/Makefile.in b/tools/h5import/Makefile.in index fc9b4ff..f41f144 100644 --- a/tools/h5import/Makefile.in +++ b/tools/h5import/Makefile.in @@ -695,12 +695,10 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1228,7 +1226,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1236,7 +1233,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5jam/Makefile.in b/tools/h5jam/Makefile.in index d069943..33510b9 100644 --- a/tools/h5jam/Makefile.in +++ b/tools/h5jam/Makefile.in @@ -707,12 +707,10 @@ DISTCLEANFILES = testh5jam.sh LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1249,7 +1247,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1257,7 +1254,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5ls/Makefile.am b/tools/h5ls/Makefile.am index 1084215..e257fbd 100644 --- a/tools/h5ls/Makefile.am +++ b/tools/h5ls/Makefile.am @@ -42,15 +42,12 @@ LDADD=$(LIBH5TOOLS) $(LIBHDF5) if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibls.la + noinst_LTLIBRARIES=libdynlibls.la libdynlibls_la_SOURCES=dynlib_ls.c - libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libdynlibls.la: $(libdynlibls_la_OBJECTS) $(libdynlibls_la_DEPENDENCIES) $(EXTRA_libdynlibls_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibls_la_LINK) $(am_libdynlibls_la_rpath) $(libdynlibls_la_OBJECTS) $(libdynlibls_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* endif DISTCLEANFILES=h5ls_plugin.sh diff --git a/tools/h5ls/Makefile.in b/tools/h5ls/Makefile.in index 9479c7e..96224e4 100644 --- a/tools/h5ls/Makefile.in +++ b/tools/h5ls/Makefile.in @@ -118,35 +118,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5ls_plugin.sh testh5ls.sh CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(dyn_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) libdynlibls_la_LIBADD = am__libdynlibls_la_SOURCES_DIST = dynlib_ls.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibls_la_OBJECTS = \ @@ -160,8 +132,8 @@ libdynlibls_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdynlibls_la_LDFLAGS) $(LDFLAGS) -o \ $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibls_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibls_la_rpath = +am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) h5ls_SOURCES = h5ls.c h5ls_OBJECTS = h5ls.$(OBJEXT) @@ -252,6 +224,33 @@ am__tty_colors = { \ std=''; \ fi; \ } +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* @@ -689,12 +688,9 @@ h5ls_LDFLAGS = $(LT_STATIC_EXEC) $(AM_LDFLAGS) # All programs depend on the hdf5 and h5tools libraries LDADD = $(LIBH5TOOLS) $(LIBHDF5) -@HAVE_SHARED_CONDITIONAL_TRUE@dyn_LTLIBRARIES = libdynlibls.la +@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libdynlibls.la @HAVE_SHARED_CONDITIONAL_TRUE@libdynlibls_la_SOURCES = dynlib_ls.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibls_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere DISTCLEANFILES = h5ls_plugin.sh # Automake needs to be taught how to build lib, dyn, progs, and tests targets. @@ -705,12 +701,10 @@ DISTCLEANFILES = h5ls_plugin.sh LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -757,33 +751,9 @@ h5ls_plugin.sh: $(top_builddir)/config.status $(srcdir)/h5ls_plugin.sh.in testh5ls.sh: $(top_builddir)/config.status $(srcdir)/testh5ls.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-dynLTLIBRARIES: $(dyn_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(dyndir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dyndir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dyndir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dyndir)"; \ - } - -uninstall-dynLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dyndir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dyndir)/$$f"; \ - done - -clean-dynLTLIBRARIES: - -test -z "$(dyn_LTLIBRARIES)" || rm -f $(dyn_LTLIBRARIES) - @list='$(dyn_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -1117,7 +1087,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: - for dir in "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1156,8 +1126,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-dynLTLIBRARIES clean-generic \ - clean-libtool mostlyclean-am +clean-am: clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) @@ -1177,7 +1147,7 @@ info: info-am info-am: -install-data-am: install-dynLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -1223,26 +1193,25 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dynLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ - check-am clean clean-binPROGRAMS clean-dynLTLIBRARIES \ - clean-generic clean-libtool cscopelist-am ctags ctags-am \ - distclean distclean-compile distclean-generic \ - distclean-libtool distclean-tags distdir dvi dvi-am html \ - html-am info info-am install install-am install-binPROGRAMS \ - install-data install-data-am install-dvi install-dvi-am \ - install-dynLTLIBRARIES install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dynLTLIBRARIES + check-am clean clean-binPROGRAMS clean-generic clean-libtool \ + clean-noinstLTLIBRARIES cscopelist-am ctags ctags-am distclean \ + distclean-compile distclean-generic distclean-libtool \ + distclean-tags distdir dvi dvi-am html html-am info info-am \ + install install-am install-binPROGRAMS install-data \ + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS .PRECIOUS: Makefile @@ -1265,7 +1234,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1273,7 +1241,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5repack/Makefile.am b/tools/h5repack/Makefile.am index 59a98b8..0277919 100644 --- a/tools/h5repack/Makefile.am +++ b/tools/h5repack/Makefile.am @@ -61,19 +61,16 @@ h5repack.sh.chkexe_: h5repacktst.chkexe_ if HAVE_SHARED_CONDITIONAL # Build it as shared library if configure is enabled for shared library. - dyn_LTLIBRARIES=libdynlibadd.la libdynlibvers.la + noinst_LTLIBRARIES=libdynlibadd.la libdynlibvers.la libdynlibadd_la_SOURCES=dynlib_rpk.c libdynlibvers_la_SOURCES=dynlib_vrpk.c - libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic - libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic + libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere + libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere libdynlibadd.la: $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_DEPENDENCIES) $(EXTRA_libdynlibadd_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibadd_la_LINK) $(am_libdynlibadd_la_rpath) $(libdynlibadd_la_OBJECTS) $(libdynlibadd_la_LIBADD) libdynlibvers.la: $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_DEPENDENCIES) $(EXTRA_libdynlibvers_la_DEPENDENCIES) $(AM_V_CCLD)$(libdynlibvers_la_LINK) $(am_libdynlibvers_la_rpath) $(libdynlibvers_la_OBJECTS) $(libdynlibvers_la_LIBADD) - -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* endif # Temporary files. *.h5 are generated by h5repack. They should diff --git a/tools/h5repack/Makefile.in b/tools/h5repack/Makefile.in index 34873e5..38367d9 100644 --- a/tools/h5repack/Makefile.in +++ b/tools/h5repack/Makefile.in @@ -120,35 +120,7 @@ mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs CONFIG_HEADER = $(top_builddir)/src/H5config.h CONFIG_CLEAN_FILES = h5repack.sh h5repack_plugin.sh CONFIG_CLEAN_VPATH_FILES = -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)" -LTLIBRARIES = $(dyn_LTLIBRARIES) +LTLIBRARIES = $(noinst_LTLIBRARIES) libdynlibadd_la_LIBADD = am__libdynlibadd_la_SOURCES_DIST = dynlib_rpk.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_OBJECTS = \ @@ -162,8 +134,7 @@ libdynlibadd_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdynlibadd_la_LDFLAGS) $(LDFLAGS) \ -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibadd_la_rpath = libdynlibvers_la_LIBADD = am__libdynlibvers_la_SOURCES_DIST = dynlib_vrpk.c @HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibvers_la_OBJECTS = \ @@ -173,8 +144,8 @@ libdynlibvers_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libdynlibvers_la_LDFLAGS) $(LDFLAGS) \ -o $@ -@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibvers_la_rpath = -rpath \ -@HAVE_SHARED_CONDITIONAL_TRUE@ $(dyndir) +@HAVE_SHARED_CONDITIONAL_TRUE@am_libdynlibvers_la_rpath = +am__installdirs = "$(DESTDIR)$(bindir)" am__EXEEXT_1 = h5repacktst$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am__objects_1 = h5repack.$(OBJEXT) h5repack_copy.$(OBJEXT) \ @@ -285,6 +256,33 @@ am__tty_colors = { \ std=''; \ fi; \ } +am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; +am__vpath_adj = case $$p in \ + $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ + *) f=$$p;; \ + esac; +am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; +am__install_max = 40 +am__nobase_strip_setup = \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` +am__nobase_strip = \ + for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" +am__nobase_list = $(am__nobase_strip_setup); \ + for p in $$list; do echo "$$p $$p"; done | \ + sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ + $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ + if (++n[$$2] == $(am__install_max)) \ + { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ + END { for (dir in files) print dir, files[dir] }' +am__base_list = \ + sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ + sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' +am__uninstall_files_from_dir = { \ + test -z "$$files" \ + || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ + || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ + $(am__cd) "$$dir" && rm -f $$files; }; \ + } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* @@ -713,9 +711,6 @@ TRACE = perl $(top_srcdir)/bin/trace # .chklog files are output from those tests. # *.clog and *.clog2 are from the MPE option. -#install-exec-hook: -# $(RM) $(DESTDIR)$(libdir)/*dynlib* - # Temporary files. *.h5 are generated by h5repack. They should # copied to the testfiles/ directory if update is required. CHECK_CLEANFILES = *.chkexe *.chklog *.clog *.clog2 *.h5 *.bin \ @@ -741,11 +736,11 @@ COMMON_SOURCES = h5repack.c h5repack_copy.c h5repack_filters.c \ h5repack_SOURCES = $(COMMON_SOURCES) h5repack_main.c h5repacktst_SOURCES = $(COMMON_SOURCES) h5repacktst.c testh5repack_detect_szip_SOURCES = testh5repack_detect_szip.c -@HAVE_SHARED_CONDITIONAL_TRUE@dyn_LTLIBRARIES = libdynlibadd.la libdynlibvers.la +@HAVE_SHARED_CONDITIONAL_TRUE@noinst_LTLIBRARIES = libdynlibadd.la libdynlibvers.la @HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_SOURCES = dynlib_rpk.c @HAVE_SHARED_CONDITIONAL_TRUE@libdynlibvers_la_SOURCES = dynlib_vrpk.c -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibadd_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere +@HAVE_SHARED_CONDITIONAL_TRUE@libdynlibvers_la_LDFLAGS = -avoid-version -module -shared -export-dynamic -rpath /nowhere DISTCLEANFILES = h5repack.sh h5repack_plugin.sh # Automake needs to be taught how to build lib, dyn, progs, and tests targets. @@ -756,12 +751,10 @@ DISTCLEANFILES = h5repack.sh h5repack_plugin.sh LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -808,33 +801,9 @@ h5repack.sh: $(top_builddir)/config.status $(srcdir)/h5repack.sh.in h5repack_plugin.sh: $(top_builddir)/config.status $(srcdir)/h5repack_plugin.sh.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ -install-dynLTLIBRARIES: $(dyn_LTLIBRARIES) - @$(NORMAL_INSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - list2=; for p in $$list; do \ - if test -f $$p; then \ - list2="$$list2 $$p"; \ - else :; fi; \ - done; \ - test -z "$$list2" || { \ - echo " $(MKDIR_P) '$(DESTDIR)$(dyndir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(dyndir)" || exit 1; \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(dyndir)'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(dyndir)"; \ - } - -uninstall-dynLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(dyn_LTLIBRARIES)'; test -n "$(dyndir)" || list=; \ - for p in $$list; do \ - $(am__strip_dir) \ - echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(dyndir)/$$f'"; \ - $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(dyndir)/$$f"; \ - done - -clean-dynLTLIBRARIES: - -test -z "$(dyn_LTLIBRARIES)" || rm -f $(dyn_LTLIBRARIES) - @list='$(dyn_LTLIBRARIES)'; \ +clean-noinstLTLIBRARIES: + -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) + @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ @@ -1214,7 +1183,7 @@ check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) all-local installdirs: - for dir in "$(DESTDIR)$(dyndir)" "$(DESTDIR)$(bindir)"; do \ + for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am @@ -1253,8 +1222,8 @@ maintainer-clean-generic: @echo "it deletes files that may require special tools to rebuild." clean: clean-am -clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-dynLTLIBRARIES \ - clean-generic clean-libtool clean-noinstPROGRAMS \ +clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ + clean-libtool clean-noinstLTLIBRARIES clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am @@ -1275,7 +1244,7 @@ info: info-am info-am: -install-data-am: install-dynLTLIBRARIES +install-data-am: install-dvi: install-dvi-am @@ -1321,27 +1290,26 @@ ps: ps-am ps-am: -uninstall-am: uninstall-binPROGRAMS uninstall-dynLTLIBRARIES +uninstall-am: uninstall-binPROGRAMS .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am all-local check check-TESTS \ check-am clean clean-binPROGRAMS clean-checkPROGRAMS \ - clean-dynLTLIBRARIES clean-generic clean-libtool \ + clean-generic clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ - install-data-am install-dvi install-dvi-am \ - install-dynLTLIBRARIES install-exec install-exec-am \ - install-html install-html-am install-info install-info-am \ - install-man install-pdf install-pdf-am install-ps \ - install-ps-am install-strip installcheck installcheck-am \ - installdirs maintainer-clean maintainer-clean-generic \ - mostlyclean mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \ - recheck tags tags-am uninstall uninstall-am \ - uninstall-binPROGRAMS uninstall-dynLTLIBRARIES + install-data-am install-dvi install-dvi-am install-exec \ + install-exec-am install-html install-html-am install-info \ + install-info-am install-man install-pdf install-pdf-am \ + install-ps install-ps-am install-strip installcheck \ + installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-compile \ + mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \ + pdf-am ps ps-am recheck tags tags-am uninstall uninstall-am \ + uninstall-binPROGRAMS .PRECIOUS: Makefile @@ -1369,7 +1337,6 @@ h5repack.sh.chkexe_: h5repacktst.chkexe_ # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1377,7 +1344,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/h5stat/Makefile.in b/tools/h5stat/Makefile.in index 5220f4f..6a54005 100644 --- a/tools/h5stat/Makefile.in +++ b/tools/h5stat/Makefile.in @@ -706,12 +706,10 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1277,7 +1275,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1285,7 +1282,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/lib/Makefile.in b/tools/lib/Makefile.in index 62fa41d..3d8d642 100644 --- a/tools/lib/Makefile.in +++ b/tools/lib/Makefile.in @@ -684,12 +684,10 @@ LDADD = libh5tools.la $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1173,7 +1171,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1181,7 +1178,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/misc/Makefile.in b/tools/misc/Makefile.in index 049171b..ede947b 100644 --- a/tools/misc/Makefile.in +++ b/tools/misc/Makefile.in @@ -738,12 +738,10 @@ LDADD = $(LIBH5TOOLS) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1351,7 +1349,6 @@ h5redeploy: h5redeploy.in # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1359,7 +1356,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ diff --git a/tools/perform/Makefile.in b/tools/perform/Makefile.in index a59f3b0..92a5b94 100644 --- a/tools/perform/Makefile.in +++ b/tools/perform/Makefile.in @@ -745,12 +745,10 @@ perf_meta_LDADD = $(LIBH5TEST) $(LIBHDF5) LIB = $(lib_LIBRARIES) $(lib_LTLIBRARIES) $(noinst_LIBRARIES) \ $(noinst_LTLIBRARIES) $(check_LIBRARIES) $(check_LTLIBRARIES) $(EXTRA_LIB) -DYN = $(dyn_LTLIBRARIES) PROGS = $(bin_PROGRAMS) $(bin_SCRIPTS) $(noinst_PROGRAMS) $(noinst_SCRIPTS) \ $(EXTRA_PROG) chk_TESTS = $(check_PROGRAMS) $(check_SCRIPTS) $(EXTRA_TEST) -dyndir = $(libdir) TEST_EXTENSIONS = .sh SH_LOG_COMPILER = $(SHELL) AM_SH_LOG_FLAGS = @@ -1344,7 +1342,6 @@ help: # lib/progs/tests targets recurse into subdirectories. build-* targets # build files in this directory. -build-dyn: $(DYN) build-lib: $(LIB) build-progs: $(LIB) $(PROGS) build-tests: $(LIB) $(PROGS) $(chk_TESTS) @@ -1352,7 +1349,7 @@ build-tests: $(LIB) $(PROGS) $(chk_TESTS) # General rule for recursive building targets. # BUILT_SOURCES contain targets that need to be built before anything else # in the directory (e.g., for Fortran type detection) -lib dyn progs tests check-s check-p :: $(BUILT_SOURCES) +lib progs tests check-s check-p :: $(BUILT_SOURCES) @$(MAKE) $(AM_MAKEFLAGS) build-$@ || exit 1; @for d in X $(SUBDIRS); do \ if test $$d != X && test $$d != .; then \ -- cgit v0.12 ) + return; + m_maxRotation = r; + emit maximumRotationChanged(); + } + + enum Axis { NoDrag=0x00, XAxis=0x01, YAxis=0x02, XandYAxis=0x03 }; + Axis axis() const { return m_axis; } + void setAxis(Axis a) { + if (a == m_axis) + return; + m_axis = a; + emit dragAxisChanged(); + } + + qreal xmin() const { return m_xmin; } + void setXmin(qreal x) { + if (x == m_xmin) + return; + m_xmin = x; + emit minimumXChanged(); + } + qreal xmax() const { return m_xmax; } + void setXmax(qreal x) { + if (x == m_xmax) + return; + m_xmax = x; + emit maximumXChanged(); + } + qreal ymin() const { return m_ymin; } + void setYmin(qreal y) { + if (y == m_ymin) + return; + m_ymin = y; + emit minimumYChanged(); + } + qreal ymax() const { return m_ymax; } + void setYmax(qreal y) { + if (y == m_ymax) + return; + m_ymax = y; + emit maximumYChanged(); + } + + bool active() const { return m_active; } + void setActive(bool a) { + if (a == m_active) + return; + m_active = a; + emit activeChanged(); + } + +signals: + void targetChanged(); + void minimumScaleChanged(); + void maximumScaleChanged(); + void minimumRotationChanged(); + void maximumRotationChanged(); + void dragAxisChanged(); + void minimumXChanged(); + void maximumXChanged(); + void minimumYChanged(); + void maximumYChanged(); + void activeChanged(); + +private: + QGraphicsObject *m_target; + qreal m_minScale; + qreal m_maxScale; + qreal m_minRotation; + qreal m_maxRotation; + Axis m_axis; + qreal m_xmin; + qreal m_xmax; + qreal m_ymin; + qreal m_ymax; + bool m_active; +}; + +class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject +{ + Q_OBJECT + + Q_PROPERTY(QPointF center READ center) + Q_PROPERTY(QPointF startCenter READ startCenter) + Q_PROPERTY(QPointF lastCenter READ lastCenter) + Q_PROPERTY(qreal scale READ scale) + Q_PROPERTY(qreal lastScale READ lastScale) + Q_PROPERTY(qreal angle READ angle) + Q_PROPERTY(qreal lastAngle READ lastAngle) + Q_PROPERTY(qreal rotation READ rotation) + Q_PROPERTY(QPointF point1 READ point1) + Q_PROPERTY(QPointF startPoint1 READ startPoint1) + Q_PROPERTY(QPointF point2 READ point2) + Q_PROPERTY(QPointF startPoint2 READ startPoint2) + Q_PROPERTY(bool accepted READ accepted WRITE setAccepted) + +public: + QDeclarativePinchEvent(QPointF c, qreal s, qreal a, qreal r) + : QObject(), m_center(c), m_scale(s), m_angle(a), m_rotation(r) {} + + QPointF center() const { return m_center; } + QPointF startCenter() const { return m_startCenter; } + void setStartCenter(QPointF c) { m_startCenter = c; } + QPointF lastCenter() const { return m_lastCenter; } + void setLastCenter(QPointF c) { m_lastCenter = c; } + qreal scale() const { return m_scale; } + qreal lastScale() const { return m_lastScale; } + void setLastScale(qreal s) { m_lastScale = s; } + qreal angle() const { return m_angle; } + qreal lastAngle() const { return m_lastAngle; } + void setLastAngle(qreal a) { m_lastAngle = a; } + qreal rotation() const { return m_rotation; } + QPointF point1() const { return m_point1; } + void setPoint1(QPointF p) { m_point1 = p; } + QPointF startPoint1() const { return m_startPoint1; } + void setStartPoint1(QPointF p) { m_startPoint1 = p; } + QPointF point2() const { return m_point2; } + void setPoint2(QPointF p) { m_point2 = p; } + QPointF startPoint2() const { return m_startPoint2; } + void setStartPoint2(QPointF p) { m_startPoint2 = p; } + + bool accepted() const { return m_accepted; } + void setAccepted(bool a) { m_accepted = a; } + +private: + QPointF m_center; + QPointF m_startCenter; + QPointF m_lastCenter; + qreal m_scale; + qreal m_lastScale; + qreal m_angle; + qreal m_lastAngle; + qreal m_rotation; + QPointF m_point1; + QPointF m_point2; + QPointF m_startPoint1; + QPointF m_startPoint2; + bool m_accepted; +}; + + +class QDeclarativeMouseEvent; +class QDeclarativePinchAreaPrivate; +class Q_AUTOTEST_EXPORT QDeclarativePinchArea : public QDeclarativeItem +{ + Q_OBJECT + + Q_PROPERTY(bool enabled READ isEnabled WRITE setEnabled NOTIFY enabledChanged) + Q_PROPERTY(QDeclarativePinch *pinch READ pinch CONSTANT) + +public: + QDeclarativePinchArea(QDeclarativeItem *parent=0); + ~QDeclarativePinchArea(); + + bool isEnabled() const; + void setEnabled(bool); + + QDeclarativePinch *pinch(); + +Q_SIGNALS: + void enabledChanged(); + void pinchStarted(QDeclarativePinchEvent *pinch); + void pinchChanged(QDeclarativePinchEvent *pinch); + void pinchFinished(QDeclarativePinchEvent *pinch); + +protected: + void mousePressEvent(QGraphicsSceneMouseEvent *event); + void mouseReleaseEvent(QGraphicsSceneMouseEvent *event); + void mouseMoveEvent(QGraphicsSceneMouseEvent *event); + bool sceneEvent(QEvent *); + bool sendMouseEvent(QGraphicsSceneMouseEvent *event); + bool sceneEventFilter(QGraphicsItem *i, QEvent *e); + bool event(QEvent *); + + virtual void geometryChanged(const QRectF &newGeometry, + const QRectF &oldGeometry); + virtual QVariant itemChange(GraphicsItemChange change, const QVariant& value); + +private: + void updatePinch(); + void handlePress(); + void handleRelease(); + +private: + Q_DISABLE_COPY(QDeclarativePinchArea) + Q_DECLARE_PRIVATE_D(QGraphicsItem::d_ptr.data(), QDeclarativePinchArea) +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QDeclarativePinch) +QML_DECLARE_TYPE(QDeclarativePinchEvent) +QML_DECLARE_TYPE(QDeclarativePinchArea) + +QT_END_HEADER + +#endif // QDECLARATIVEPINCHAREA_H diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h new file mode 100644 index 0000000..b1cdf68 --- /dev/null +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p_p.h @@ -0,0 +1,109 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEPINCHAREA_P_H +#define QDECLARATIVEPINCHAREA_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists purely as an +// implementation detail. This header file may change from version to +// version without notice, or even be removed. +// +// We mean it. +// + +#include +#include +#include +#include +#include "qdeclarativeitem_p.h" + +QT_BEGIN_NAMESPACE + +class QDeclarativePinch; +class QDeclarativePinchAreaPrivate : public QDeclarativeItemPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativePinchArea) +public: + QDeclarativePinchAreaPrivate() + : absorb(true), stealMouse(false), inPinch(false) + , pinchRejected(false), pinch(0) + { + } + + ~QDeclarativePinchAreaPrivate(); + + void init() + { + Q_Q(QDeclarativePinchArea); + q->setAcceptedMouseButtons(Qt::LeftButton); + q->setAcceptTouchEvents(true); + q->setFiltersChildEvents(true); + } + + bool absorb : 1; + bool stealMouse : 1; + bool inPinch : 1; + bool pinchRejected : 1; + QDeclarativePinch *pinch; + QPointF sceneStartPoint1; + QPointF sceneStartPoint2; + QPointF lastPoint1; + QPointF lastPoint2; + qreal pinchStartDist; + qreal pinchStartScale; + qreal pinchLastScale; + qreal pinchStartRotation; + qreal pinchStartAngle; + qreal pinchLastAngle; + QPointF sceneStartCenter; + QPointF pinchStartCenter; + QPointF sceneLastCenter; + QPointF pinchStartPos; + QList touchPoints; +}; + +QT_END_NAMESPACE + +#endif // QDECLARATIVEPINCHAREA_P_H diff --git a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml new file mode 100644 index 0000000..f39ea06 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml @@ -0,0 +1,46 @@ +import QtQuick 1.1 +Rectangle { + id: whiteRect + property variant center + property real scale + width: 240; height: 320 + color: "white" + Rectangle { + id: blackRect + objectName: "blackrect" + color: "black" + y: 50 + x: 50 + width: 100 + height: 100 + opacity: (whiteRect.width-blackRect.x+whiteRect.height-blackRect.y-199)/200 + Text { text: blackRect.opacity} + PinchArea { + id: pincharea + objectName: "pincharea" + anchors.fill: parent + pinch.target: blackRect + pinch.dragAxis: Drag.XandYAxis + pinch.minimumX: 0 + pinch.maximumX: whiteRect.width-blackRect.width + pinch.minimumY: 0 + pinch.maximumY: whiteRect.height-blackRect.height + pinch.minimumScale: 1.0 + pinch.maximumScale: 2.0 + pinch.minimumRotation: 0.0 + pinch.maximumRotation: 90.0 + onPinchStarted: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + onPinchChanged: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + onPinchFinished: { + whiteRect.center = pinch.center + whiteRect.scale = pinch.scale + } + } + } + } diff --git a/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro new file mode 100644 index 0000000..2c13644 --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/qdeclarativepincharea.pro @@ -0,0 +1,16 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativepincharea.cpp + +symbian: { + importFiles.sources = data + importFiles.path = . + DEPLOYMENT = importFiles +} else { + DEFINES += SRCDIR=\\\"$$PWD\\\" +} + +CONFIG += parallel_test + diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp new file mode 100644 index 0000000..d1015fc --- /dev/null +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp @@ -0,0 +1,315 @@ +/**************************************************************************** +** +** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** All rights reserved. +** Contact: Nokia Corporation (qt-info@nokia.com) +** +** This file is part of the test suite 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 +#include +#include +#include +#include +#include + +#ifdef Q_OS_SYMBIAN +// In Symbian OS test data is located in applications private dir +#define SRCDIR "." +#endif + +class tst_QDeclarativePinchArea: public QObject +{ + Q_OBJECT +private slots: + void pinchProperties(); + void scale(); + void pan(); + +private: + QDeclarativeView *createView(); +}; + +void tst_QDeclarativePinchArea::pinchProperties() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QVERIFY(canvas->rootObject() != 0); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + QVERIFY(blackRect == pinch->target()); + QDeclarativeItem *rootItem = qobject_cast(canvas->rootObject()); + QVERIFY(rootItem != 0); + QSignalSpy targetSpy(pinch, SIGNAL(targetChanged())); + pinch->setTarget(rootItem); + QCOMPARE(targetSpy.count(),1); + pinch->setTarget(rootItem); + QCOMPARE(targetSpy.count(),1); + + // axis + QCOMPARE(pinch->axis(), QDeclarativePinch::XandYAxis); + QSignalSpy axisSpy(pinch, SIGNAL(dragAxisChanged())); + pinch->setAxis(QDeclarativePinch::XAxis); + QCOMPARE(pinch->axis(), QDeclarativePinch::XAxis); + QCOMPARE(axisSpy.count(),1); + pinch->setAxis(QDeclarativePinch::XAxis); + QCOMPARE(axisSpy.count(),1); + + // minimum and maximum drag properties + QSignalSpy xminSpy(pinch, SIGNAL(minimumXChanged())); + QSignalSpy xmaxSpy(pinch, SIGNAL(maximumXChanged())); + QSignalSpy yminSpy(pinch, SIGNAL(minimumYChanged())); + QSignalSpy ymaxSpy(pinch, SIGNAL(maximumYChanged())); + + QCOMPARE(pinch->xmin(), 0.0); + QCOMPARE(pinch->xmax(), rootItem->width()-blackRect->width()); + QCOMPARE(pinch->ymin(), 0.0); + QCOMPARE(pinch->ymax(), rootItem->height()-blackRect->height()); + + pinch->setXmin(10); + pinch->setXmax(10); + pinch->setYmin(10); + pinch->setYmax(10); + + QCOMPARE(pinch->xmin(), 10.0); + QCOMPARE(pinch->xmax(), 10.0); + QCOMPARE(pinch->ymin(), 10.0); + QCOMPARE(pinch->ymax(), 10.0); + + QCOMPARE(xminSpy.count(),1); + QCOMPARE(xmaxSpy.count(),1); + QCOMPARE(yminSpy.count(),1); + QCOMPARE(ymaxSpy.count(),1); + + pinch->setXmin(10); + pinch->setXmax(10); + pinch->setYmin(10); + pinch->setYmax(10); + + QCOMPARE(xminSpy.count(),1); + QCOMPARE(xmaxSpy.count(),1); + QCOMPARE(yminSpy.count(),1); + QCOMPARE(ymaxSpy.count(),1); + + // minimum and maximum scale properties + QSignalSpy scaleMinSpy(pinch, SIGNAL(minimumScaleChanged())); + QSignalSpy scaleMaxSpy(pinch, SIGNAL(maximumScaleChanged())); + + QCOMPARE(pinch->minimumScale(), 1.0); + QCOMPARE(pinch->maximumScale(), 2.0); + + pinch->setMinimumScale(0.5); + pinch->setMaximumScale(1.5); + + QCOMPARE(pinch->minimumScale(), 0.5); + QCOMPARE(pinch->maximumScale(), 1.5); + + QCOMPARE(scaleMinSpy.count(),1); + QCOMPARE(scaleMaxSpy.count(),1); + + pinch->setMinimumScale(0.5); + pinch->setMaximumScale(1.5); + + QCOMPARE(scaleMinSpy.count(),1); + QCOMPARE(scaleMaxSpy.count(),1); + + // minimum and maximum rotation properties + QSignalSpy rotMinSpy(pinch, SIGNAL(minimumRotationChanged())); + QSignalSpy rotMaxSpy(pinch, SIGNAL(maximumRotationChanged())); + + QCOMPARE(pinch->minimumRotation(), 0.0); + QCOMPARE(pinch->maximumRotation(), 90.0); + + pinch->setMinimumRotation(-90.0); + pinch->setMaximumRotation(45.0); + + QCOMPARE(pinch->minimumRotation(), -90.0); + QCOMPARE(pinch->maximumRotation(), 45.0); + + QCOMPARE(rotMinSpy.count(),1); + QCOMPARE(rotMaxSpy.count(),1); + + pinch->setMinimumRotation(-90.0); + pinch->setMaximumRotation(45.0); + + QCOMPARE(rotMinSpy.count(),1); + QCOMPARE(rotMaxSpy.count(),1); + + delete canvas; +} + +QTouchEvent::TouchPoint makeTouchPoint(int id, QPoint p, QGraphicsView *v, QGraphicsItem *i) +{ + QTouchEvent::TouchPoint touchPoint(id); + touchPoint.setPos(i->mapFromScene(p)); + touchPoint.setScreenPos(v->mapToGlobal(p)); + touchPoint.setScenePos(p); + return touchPoint; +} + +void tst_QDeclarativePinchArea::scale() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QTest::qWaitForWindowShown(canvas); + QVERIFY(canvas->rootObject() != 0); + qApp->processEvents(); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + QDeclarativeItem *root = qobject_cast(canvas->rootObject()); + QVERIFY(root != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + + QWidget *vp = canvas->viewport(); + + QPoint p1(80, 80); + QPoint p2(100, 100); + + QTest::touchEvent(vp).press(0, p1); + QTest::touchEvent(vp).stationary(0).press(1, p2); + p1 -= QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.0); + + p1 -= QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.5); + QCOMPARE(root->property("center").toPointF(), QPointF(90, 90)); + QCOMPARE(blackRect->scale(), 1.5); + + // scale beyond bound + p1 -= QPoint(50,50); + p2 += QPoint(50,50); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(blackRect->scale(), 2.0); + + QTest::touchEvent(vp).release(0, p1).release(1, p2); + + delete canvas; +} + +void tst_QDeclarativePinchArea::pan() +{ + QDeclarativeView *canvas = createView(); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/pinchproperties.qml")); + canvas->show(); + canvas->setFocus(); + QTest::qWaitForWindowShown(canvas); + QVERIFY(canvas->rootObject() != 0); + qApp->processEvents(); + + QDeclarativePinchArea *pinchArea = canvas->rootObject()->findChild("pincharea"); + QDeclarativePinch *pinch = pinchArea->pinch(); + QVERIFY(pinchArea != 0); + QVERIFY(pinch != 0); + + QDeclarativeItem *root = qobject_cast(canvas->rootObject()); + QVERIFY(root != 0); + + // target + QDeclarativeItem *blackRect = canvas->rootObject()->findChild("blackrect"); + QVERIFY(blackRect != 0); + + QWidget *vp = canvas->viewport(); + + QPoint p1(80, 80); + QPoint p2(100, 100); + + QTest::touchEvent(vp).press(0, p1); + QTest::touchEvent(vp).stationary(0).press(1, p2); + p1 += QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("scale").toReal(), 1.0); + + p1 += QPoint(10,10); + p2 += QPoint(10,10); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(root->property("center").toPointF(), QPointF(110, 110)); + + QCOMPARE(blackRect->x(), 60.0); + QCOMPARE(blackRect->y(), 60.0); + + // pan x beyond bound + p1 += QPoint(100,100); + p2 += QPoint(100,100); + QTest::touchEvent(vp).move(0, p1).move(1, p2); + + QCOMPARE(blackRect->x(), 140.0); + QCOMPARE(blackRect->y(), 160.0); + + QTest::touchEvent(vp).release(0, p1).release(1, p2); + + delete canvas; +} + +QDeclarativeView *tst_QDeclarativePinchArea::createView() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->viewport()->setAttribute(Qt::WA_AcceptTouchEvents); + canvas->setFixedSize(240,320); + + return canvas; +} + +QTEST_MAIN(tst_QDeclarativePinchArea) + +#include "tst_qdeclarativepincharea.moc" -- cgit v0.12 From 031ab2136c632d582a324941798be9e37825d287 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 29 Nov 2010 11:01:46 +1000 Subject: Allow resizing Flickable content about a center point. Useful for zooming via pinch, for example. Task-number: QTBUG-15148 Reviewed-by: Aaron Kennedy --- .../graphicsitems/qdeclarativeflickable.cpp | 54 ++++++++++++++++++++++ .../graphicsitems/qdeclarativeflickable_p.h | 4 ++ .../qdeclarativeflickable/data/resize.qml | 27 +++++++++++ .../tst_qdeclarativeflickable.cpp | 54 ++++++++++++++++++++++ 4 files changed, 139 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativeflickable/data/resize.qml diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index 377f3b5..b13d82b 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -1269,6 +1269,60 @@ void QDeclarativeFlickable::setContentHeight(qreal h) d->updateBeginningEnd(); } +/*! + \qmlmethod Flickable::resizeContent(real width, real height, QPointF center) + \preliminary + + Resizes the content to \a width x \a height about \a center. + + \bold {This method was added in QtQuick 1.1.} + + This does not scale the contents of the Flickable - it only resizes the \l contentWidth + and \l contentHeight. + + Resizing the content may result in the content being positioned outside + the bounds of the Flickable. Calling \l returnToBounds() will + move the content back within legal bounds. +*/ +void QDeclarativeFlickable::resizeContent(qreal w, qreal h, QPointF center) +{ + Q_D(QDeclarativeFlickable); + if (w != d->hData.viewSize) { + qreal oldSize = d->hData.viewSize; + setContentWidth(w); + if (center.x() != 0) { + qreal pos = center.x() * w / oldSize; + setContentX(contentX() + pos - center.x()); + } + } + if (h != d->vData.viewSize) { + qreal oldSize = d->vData.viewSize; + setContentHeight(h); + if (center.y() != 0) { + qreal pos = center.y() * h / oldSize; + setContentY(contentY() + pos - center.y()); + } + } +} + +/*! + \qmlmethod Flickable::returnToBounds() + \preliminary + + Ensures the content is within legal bounds. + + \bold {This method was added in QtQuick 1.1.} + + This may be called to ensure that the content is within legal bounds + after manually positioning the content. +*/ +void QDeclarativeFlickable::returnToBounds() +{ + Q_D(QDeclarativeFlickable); + d->fixupX(); + d->fixupY(); +} + qreal QDeclarativeFlickable::vWidth() const { Q_D(const QDeclarativeFlickable); diff --git a/src/declarative/graphicsitems/qdeclarativeflickable_p.h b/src/declarative/graphicsitems/qdeclarativeflickable_p.h index 6e4d8ed..ece2db7 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable_p.h +++ b/src/declarative/graphicsitems/qdeclarativeflickable_p.h @@ -149,6 +149,10 @@ public: FlickableDirection flickableDirection() const; void setFlickableDirection(FlickableDirection); + //XXX Added in QtQuick 1.1 + Q_INVOKABLE void resizeContent(qreal w, qreal h, QPointF center); + Q_INVOKABLE void returnToBounds(); + Q_SIGNALS: void contentWidthChanged(); void contentHeightChanged(); diff --git a/tests/auto/declarative/qdeclarativeflickable/data/resize.qml b/tests/auto/declarative/qdeclarativeflickable/data/resize.qml new file mode 100644 index 0000000..e2abb99 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeflickable/data/resize.qml @@ -0,0 +1,27 @@ +import QtQuick 1.1 + +Rectangle { + function resizeContent() { + flick.resizeContent(600, 600, Qt.point(100, 100)) + } + function returnToBounds() { + flick.returnToBounds() + } + width: 400 + height: 360 + color: "gray" + + Flickable { + id: flick + objectName: "flick" + anchors.fill: parent + contentWidth: 300 + contentHeight: 300 + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "red" + } + } +} diff --git a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp index 25edb36..c1564bc 100644 --- a/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp +++ b/tests/auto/declarative/qdeclarativeflickable/tst_qdeclarativeflickable.cpp @@ -46,6 +46,7 @@ #include #include #include +#include "../../../shared/util.h" #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -69,6 +70,8 @@ private slots: void pressDelay(); void flickableDirection(); void qgraphicswidget(); + void resizeContent(); + void returnToBounds(); private: QDeclarativeEngine engine; @@ -277,6 +280,57 @@ void tst_qdeclarativeflickable::qgraphicswidget() QVERIFY(widget); } +// QtQuick 1.1 +void tst_qdeclarativeflickable::resizeContent() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/resize.qml")); + QDeclarativeItem *root = qobject_cast(c.create()); + QDeclarativeFlickable *obj = findItem(root, "flick"); + + QVERIFY(obj != 0); + QCOMPARE(obj->contentX(), 0.); + QCOMPARE(obj->contentY(), 0.); + QCOMPARE(obj->contentWidth(), 300.); + QCOMPARE(obj->contentHeight(), 300.); + + QMetaObject::invokeMethod(root, "resizeContent"); + + QCOMPARE(obj->contentX(), 100.); + QCOMPARE(obj->contentY(), 100.); + QCOMPARE(obj->contentWidth(), 600.); + QCOMPARE(obj->contentHeight(), 600.); + + delete root; +} + +// QtQuick 1.1 +void tst_qdeclarativeflickable::returnToBounds() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/resize.qml")); + QDeclarativeItem *root = qobject_cast(c.create()); + QDeclarativeFlickable *obj = findItem(root, "flick"); + + QVERIFY(obj != 0); + QCOMPARE(obj->contentX(), 0.); + QCOMPARE(obj->contentY(), 0.); + QCOMPARE(obj->contentWidth(), 300.); + QCOMPARE(obj->contentHeight(), 300.); + + obj->setContentX(100); + obj->setContentY(400); + QTRY_COMPARE(obj->contentX(), 100.); + QTRY_COMPARE(obj->contentY(), 400.); + + QMetaObject::invokeMethod(root, "returnToBounds"); + + QTRY_COMPARE(obj->contentX(), 0.); + QTRY_COMPARE(obj->contentY(), 0.); + + delete root; +} + template T *tst_qdeclarativeflickable::findItem(QGraphicsObject *parent, const QString &objectName) { -- cgit v0.12 From 6258fc281f5b66b2634b81a2633b117165cea7ef Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 29 Nov 2010 11:03:31 +1000 Subject: Add an example of using PinchArea. Task-number: QTBUG-15491 --- .../touchinteraction/pincharea/flickresize.qml | 50 +++++++++++++++++++++ .../touchinteraction/pincharea/qt-logo.jpg | Bin 0 -> 40886 bytes 2 files changed, 50 insertions(+) create mode 100644 examples/declarative/touchinteraction/pincharea/flickresize.qml create mode 100644 examples/declarative/touchinteraction/pincharea/qt-logo.jpg diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml new file mode 100644 index 0000000..8034e29 --- /dev/null +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -0,0 +1,50 @@ +import QtQuick 1.1 + +Rectangle { + width: 640 + height: 360 + color: "gray" + + Flickable { + id: flick + anchors.fill: parent + contentWidth: 500 + contentHeight: 500 + + PinchArea { + width: Math.max(flick.contentWidth, flick.width) + height: Math.max(flick.contentHeight, flick.height) + onPinchChanged: { + // adjust content pos due to drag + flick.contentX += pinch.lastCenter.x - pinch.center.x + flick.contentY += pinch.lastCenter.y - pinch.center.y + + // resize content + var scale = 1.0 + pinch.scale - pinch.lastScale + flick.resizeContent(flick.contentWidth * scale, flick.contentHeight * scale, pinch.center) + } + + onPinchFinished: { + // Move its content within bounds. + flick.returnToBounds() + } + + Rectangle { + width: flick.contentWidth + height: flick.contentHeight + color: "white" + Image { + anchors.fill: parent + source: "qt-logo.jpg" + MouseArea { + anchors.fill: parent + onDoubleClicked: { + flick.contentWidth = 500 + flick.contentHeight = 500 + } + } + } + } + } + } +} diff --git a/examples/declarative/touchinteraction/pincharea/qt-logo.jpg b/examples/declarative/touchinteraction/pincharea/qt-logo.jpg new file mode 100644 index 0000000..4014b46 Binary files /dev/null and b/examples/declarative/touchinteraction/pincharea/qt-logo.jpg differ -- cgit v0.12 From b02cf26c0c236679439826cb8093f6dd6d3b2fec Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 3 Dec 2010 16:20:58 +1000 Subject: borderImage should not support setting sourceSize SIGNAL sourceSizeChanged is properly called. Setting the sourceSize for borderImage in QML returns a warning. Auto tests were added to check that sourceSize remains consistent. Reviewed-by: Joona Petrell --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 10 ++++++++++ src/declarative/graphicsitems/qdeclarativeborderimage_p.h | 2 ++ .../qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index c770a85..0bf09ad 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -246,6 +246,12 @@ void QDeclarativeBorderImage::setSource(const QUrl &url) load(); } +void QDeclarativeBorderImage::setSourceSize(const QSize& size) +{ + Q_UNUSED(size); + qmlInfo(this) << "Setting sourceSize for borderImage not supported"; +} + void QDeclarativeBorderImage::load() { Q_D(QDeclarativeBorderImage); @@ -315,6 +321,7 @@ void QDeclarativeBorderImage::load() d->progress = 1.0; emit statusChanged(d->status); emit progressChanged(d->progress); + requestFinished(); update(); } } @@ -475,6 +482,9 @@ void QDeclarativeBorderImage::requestFinished() setImplicitWidth(impsize.width()); setImplicitHeight(impsize.height()); + if (d->sourcesize.width() != d->pix.width() || d->sourcesize.height() != d->pix.height()) + emit sourceSizeChanged(); + d->progress = 1.0; emit statusChanged(d->status); emit progressChanged(1.0); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h index 9944cbe..7cf24f2 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h @@ -80,6 +80,8 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); + void setSourceSize(const QSize&); + Q_SIGNALS: void horizontalTileModeChanged(); void verticalTileModeChanged(); diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index 2f00f60..5478145 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -153,6 +153,8 @@ void tst_qdeclarativeborderimage::imageSource() QTRY_VERIFY(obj->status() == QDeclarativeBorderImage::Ready); QCOMPARE(obj->width(), 120.); QCOMPARE(obj->height(), 120.); + QCOMPARE(obj->sourceSize().width(), 120); + QCOMPARE(obj->sourceSize().height(), 120); QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch); QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch); } else { @@ -192,6 +194,8 @@ void tst_qdeclarativeborderimage::resized() QVERIFY(obj != 0); QCOMPARE(obj->width(), 300.); QCOMPARE(obj->height(), 300.); + QCOMPARE(obj->sourceSize().width(), 120); + QCOMPARE(obj->sourceSize().height(), 120); QCOMPARE(obj->horizontalTileMode(), QDeclarativeBorderImage::Stretch); QCOMPARE(obj->verticalTileMode(), QDeclarativeBorderImage::Stretch); -- cgit v0.12 From 8eab49de0548363b18c6e2c7b4ff4a8b722992d6 Mon Sep 17 00:00:00 2001 From: Leena Gunda Date: Thu, 9 Dec 2010 11:24:24 +0530 Subject: Fix ConnMan bearer plugin to use new net.connman service name. --- src/plugins/bearer/connman/qconnmanengine.cpp | 247 ++----------------- src/plugins/bearer/connman/qconnmanengine.h | 11 +- .../bearer/connman/qconnmanservice_linux.cpp | 271 +-------------------- .../bearer/connman/qconnmanservice_linux_p.h | 76 +----- 4 files changed, 20 insertions(+), 585 deletions(-) diff --git a/src/plugins/bearer/connman/qconnmanengine.cpp b/src/plugins/bearer/connman/qconnmanengine.cpp index 7f3501e..5b12b1e 100644 --- a/src/plugins/bearer/connman/qconnmanengine.cpp +++ b/src/plugins/bearer/connman/qconnmanengine.cpp @@ -88,19 +88,10 @@ void QConnmanEngine::initialize() connect(tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant))); + } - foreach(const QString devicePath,tech->getDevices()) { - QConnmanDeviceInterface *dev; - dev = new QConnmanDeviceInterface(devicePath); - if(!deviceMap.value(techPath).contains(devicePath)) { - connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant))); - deviceMap.insert(techPath,QStringList() << devicePath); - foreach(const QString network,dev->getNetworks()) { - serviceNetworks.insert(getServiceForNetwork(network),network); - } - } - } + foreach(const QString servPath, connmanManager->getServices()) { + addServiceConfiguration(servPath); } // Get current list of access points. @@ -110,7 +101,6 @@ void QConnmanEngine::initialize() QList QConnmanEngine::getConfigurations() { QMutexLocker locker(&mutex); - getNetworkListing(); QList fetchedConfigurations; QNetworkConfigurationPrivate* cpPriv = 0; @@ -133,21 +123,6 @@ QList QConnmanEngine::getConfigurations() return fetchedConfigurations; } -void QConnmanEngine::getNetworkListing() -{ - QMutexLocker locker(&mutex); - QMapIterator i(deviceMap); - while(i.hasNext()) { - i.next(); - QConnmanDeviceInterface dev(i.value().at(0)); - if(dev.isValid()) { - foreach(const QString network,dev.getNetworks()) { - addNetworkConfiguration(network); - } - } - } -} - void QConnmanEngine::doRequestUpdate() { connmanManager->requestScan(""); @@ -225,7 +200,7 @@ void QConnmanEngine::requestUpdate() QString QConnmanEngine::serviceFromId(const QString &id) { QMutexLocker locker(&mutex); - foreach(const QString service, serviceNetworks.keys()) { + foreach(const QString service, serviceNetworks) { if (id == QString::number(qHash(service))) return service; } @@ -330,24 +305,6 @@ QNetworkConfigurationPrivatePointer QConnmanEngine::defaultConfiguration() return QNetworkConfigurationPrivatePointer(); } - -QString QConnmanEngine::getServiceForNetwork(const QString &netPath) -{ - QMutexLocker locker(&mutex); - QConnmanNetworkInterface network(netPath, this); - foreach(QString service,connmanManager->getServices()) { - - QString devicePath = netPath.section("/",5,5); - - QConnmanServiceInterface serv(service,this); - if(serv.getName() == network.getName() - && network.getSignalStrength() == serv.getSignalStrength()) { - return service; - } - } - return QString(); -} - void QConnmanEngine::propertyChangedContext(const QString &path,const QString &item, const QDBusVariant &value) { Q_UNUSED(path); @@ -399,86 +356,19 @@ void QConnmanEngine::servicePropertyChangedContext(const QString &path,const QSt } } -void QConnmanEngine::networkPropertyChangedContext(const QString &/*path*/,const QString &/*item*/, const QDBusVariant &/*value*/) -{ - QMutexLocker locker(&mutex); -} - -void QConnmanEngine::devicePropertyChangedContext(const QString &devpath,const QString &item,const QDBusVariant &value) +void QConnmanEngine::technologyPropertyChangedContext(const QString & path, const QString &item, const QDBusVariant &value) { - QMutexLocker locker(&mutex); - if(item == "Networks") { - - QConnmanNetworkInterface network(devpath, this); + if(item == "State") { + if(value.variant().toString() == "offline") { + QConnmanTechnologyInterface tech(path); + disconnect(&tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), + this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant))); - QDBusArgument arg = qvariant_cast(value.variant()); - QStringList remainingNetworks = qdbus_cast(arg); - QString devicetype; - QMapIterator i(deviceMap); - while(i.hasNext()) { - i.next(); - if(i.value().contains(devpath)) { - devicetype = i.key().section("/",-1); - } - } - - QStringList oldnetworks = knownNetworks[devicetype]; - - if(remainingNetworks.count() > oldnetworks.count()) { - foreach(const QString netPath, remainingNetworks) { - if(!oldnetworks.contains(netPath)) { - addNetworkConfiguration(netPath); - } - } - } else { - foreach(const QString netPath, oldnetworks) { - QString servicePath = serviceNetworks.key(netPath); - if(!remainingNetworks.contains(netPath)) { - if(servicePath.isEmpty()) { - removeConfiguration(QString::number(qHash(netPath))); - } else { - removeConfiguration(QString::number(qHash(servicePath))); - } - knownNetworks[devicetype].removeAll(netPath); - } - } + technologies.remove(path); } } } -void QConnmanEngine::technologyPropertyChangedContext(const QString & path, const QString &item, const QDBusVariant &value) -{ - if(item == "Devices") { - QDBusArgument arg = qvariant_cast(value.variant()); - QStringList list = qdbus_cast(arg); - } - if(item == "State") { - - if(value.variant().toString() == "available") { - QConnmanTechnologyInterface tech(connmanManager->getPathForTechnology(path)); - foreach(const QString devPath, tech.getDevices()) { - - if(!deviceMap.value(path).contains(devPath)) { - QConnmanDeviceInterface *dev; - dev = new QConnmanDeviceInterface(devPath,this); - connect(dev,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(devicePropertyChangedContext(QString,QString,QDBusVariant))); - deviceMap.insert(path,QStringList() << devPath); - } - } - } - if(value.variant().toString() == "offline") { - deviceMap.remove(path); - QConnmanTechnologyInterface tech(path); - disconnect(&tech,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(technologyPropertyChangedContext(QString,QString,QDBusVariant))); - - technologies.remove(path); - getNetworkListing(); - } - } -} - void QConnmanEngine::configurationChange(const QString &id) { QMutexLocker locker(&mutex); @@ -513,8 +403,8 @@ void QConnmanEngine::configurationChange(const QString &id) locker.unlock(); emit configurationChanged(ptr); locker.relock(); - } + locker.unlock(); emit updateCompleted(); } @@ -622,12 +512,7 @@ void QConnmanEngine::removeConfiguration(const QString &id) disconnect(&serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant))); - QString netPath = serviceNetworks.value(service); - serviceNetworks.remove(service); - - QConnmanServiceInterface network(netPath); - disconnect(&network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant))); + serviceNetworks.removeOne(service); QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(id); locker.unlock(); @@ -641,20 +526,11 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) QMutexLocker locker(&mutex); QConnmanServiceInterface *serv; serv = new QConnmanServiceInterface(servicePath); - const QString netPath = serviceNetworks.value(servicePath); - - QConnmanNetworkInterface *network; - network = new QConnmanNetworkInterface(netPath, this); - const QString id = QString::number(qHash(servicePath)); if (!accessPointConfigurations.contains(id)) { - QConnmanDeviceInterface device(netPath.section("/",0,5),this); - - serviceNetworks.insert(servicePath,netPath); - - knownNetworks[device.getType()].append(netPath); + serviceNetworks.append(servicePath); connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant))); @@ -693,15 +569,12 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) cpPriv->purpose = QNetworkConfiguration::PrivatePurpose; } - connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant))); - cpPriv->state = getStateForService(servicePath); QNetworkConfigurationPrivatePointer ptr(cpPriv); accessPointConfigurations.insert(ptr->id, ptr); foundConfigurations.append(cpPriv); - configInterfaces[cpPriv->id] = device.getInterface(); + configInterfaces[cpPriv->id] = serv->getInterface(); locker.unlock(); emit configurationAdded(ptr); @@ -710,96 +583,6 @@ void QConnmanEngine::addServiceConfiguration(const QString &servicePath) } } -void QConnmanEngine::addNetworkConfiguration(const QString &networkPath) -{ - QMutexLocker locker(&mutex); - if(networkPath.isNull()) - return; - - QConnmanNetworkInterface *network; - network = new QConnmanNetworkInterface(networkPath, this); - QString servicePath = getServiceForNetwork(networkPath); - QConnmanServiceInterface *serv; - - QString id; - QConnmanDeviceInterface device(networkPath.section("/",0,5),this); - - if(servicePath.isEmpty()) { - id = QString::number(qHash(networkPath)); - serv = 0; - } else { - id = QString::number(qHash(servicePath)); - serv = new QConnmanServiceInterface(servicePath,this); - connect(serv,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(servicePropertyChangedContext(QString,QString, QDBusVariant))); - } - - if (!id.isEmpty() && !accessPointConfigurations.contains(id)) { - - knownNetworks[device.getType()].append(networkPath); - - serviceNetworks.insert(servicePath,networkPath); - - connect(network,SIGNAL(propertyChangedContext(QString,QString,QDBusVariant)), - this,SLOT(networkPropertyChangedContext(QString,QString, QDBusVariant))); - - QNetworkConfigurationPrivate* cpPriv = new QNetworkConfigurationPrivate(); - - QString networkName = network->getName(); - - if(networkName.isEmpty()) - networkName = "Hidden Network"; - - QNetworkConfiguration::BearerType bearerType; - - if(servicePath.isEmpty()) { - QString devicePath = networkPath.section("/",0,5); - - QConnmanDeviceInterface device(devicePath,this); - bearerType = typeToBearer(device.getType()); - } else { - if(serv->getType() == "cellular") { - bearerType = ofonoTechToBearerType("cellular"); - if(servicePath.isEmpty()) { - networkName = serv->getName(); - } - cpPriv->roamingSupported = isRoamingAllowed(servicePath); - } else { - bearerType = typeToBearer(serv->getType()); - } - } - - cpPriv->name = networkName; - cpPriv->isValid = true; - cpPriv->id = id; - cpPriv->type = QNetworkConfiguration::InternetAccessPoint; - cpPriv->bearerType = bearerType; - - if(network->getWifiSecurity() == "none") { - cpPriv->purpose = QNetworkConfiguration::PublicPurpose; - } else { - cpPriv->purpose = QNetworkConfiguration::PrivatePurpose; - } - - if(servicePath.isEmpty()) - cpPriv->state = QNetworkConfiguration::Undefined; - else - cpPriv->state = getStateForService(servicePath); - - QNetworkConfigurationPrivatePointer ptr(cpPriv); - accessPointConfigurations.insert(ptr->id, ptr); - foundConfigurations.append(cpPriv); - configInterfaces[cpPriv->id] = device.getInterface(); - - locker.unlock(); - emit configurationAdded(ptr); - locker.relock(); - emit updateCompleted(); - } /*else { - qDebug() << "Not added~~~~~~~~~~~"; - }*/ -} - bool QConnmanEngine::requiresPolling() const { return false; diff --git a/src/plugins/bearer/connman/qconnmanengine.h b/src/plugins/bearer/connman/qconnmanengine.h index 2a2308f..55067d8 100644 --- a/src/plugins/bearer/connman/qconnmanengine.h +++ b/src/plugins/bearer/connman/qconnmanengine.h @@ -103,8 +103,6 @@ private Q_SLOTS: void doRequestUpdate(); void servicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &); - void networkPropertyChangedContext(const QString &,const QString &,const QDBusVariant &); - void devicePropertyChangedContext(const QString &,const QString &,const QDBusVariant &); void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); void technologyPropertyChangedContext(const QString &,const QString &, const QDBusVariant &); @@ -113,10 +111,6 @@ private: QList foundConfigurations; - void getNetworkListing(); - - QString getServiceForNetwork(const QString &network); - QString serviceFromId(const QString &id); QString networkFromId(const QString &id); @@ -125,15 +119,12 @@ private: void removeConfiguration(const QString &servicePath); void addServiceConfiguration(const QString &servicePath); - void addNetworkConfiguration(const QString &worknetPath); QDateTime activeTime; QMap technologies; // techpath, tech interface QMap configInterfaces; // id, interface name - QMap knownNetworks; //device path, net paths list - QMap deviceMap; //tech path, device path - QMap serviceNetworks; //service, network + QList serviceNetworks; //servpath QNetworkConfiguration::BearerType ofonoTechToBearerType(const QString &type); bool isRoamingAllowed(const QString &context); diff --git a/src/plugins/bearer/connman/qconnmanservice_linux.cpp b/src/plugins/bearer/connman/qconnmanservice_linux.cpp index 0545422..092bea9 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux.cpp +++ b/src/plugins/bearer/connman/qconnmanservice_linux.cpp @@ -317,126 +317,8 @@ QString QConnmanManagerInterface::getPathForTechnology(const QString &name) return ""; } -QConnmanNetworkInterface::QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent) - : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), - dbusPathName, - CONNMAN_NETWORK_INTERFACE, - QDBusConnection::systemBus(), parent) -{ -} - -QConnmanNetworkInterface::~QConnmanNetworkInterface() -{ -} - -void QConnmanNetworkInterface::connectNotify(const char *signal) -{ - if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { - if(!connection().connect(QLatin1String(CONNMAN_SERVICE), - this->path(), - QLatin1String(CONNMAN_NETWORK_INTERFACE), - QLatin1String("PropertyChanged"), - this,SIGNAL(propertyChanged(QString,QDBusVariant)))) { - qWarning() << "network properties not connected"; - } - } - if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { - QConnmanDBusHelper *helper; - helper = new QConnmanDBusHelper(this); - - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), - this->path(), - QLatin1String(CONNMAN_NETWORK_INTERFACE), - QLatin1String("PropertyChanged"), - helper,SLOT(propertyChanged(QString,QDBusVariant))); - - QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), - this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection); - } -} - -void QConnmanNetworkInterface::disconnectNotify(const char *signal) -{ - if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { - - } -} - -QVariantMap QConnmanNetworkInterface::getProperties() -{ - QDBusReply reply = this->call(QLatin1String("GetProperties")); - return reply.value(); -} - -QVariant QConnmanNetworkInterface::getProperty(const QString &property) -{ - QVariant var; - QVariantMap map = getProperties(); - if (map.contains(property)) { - var = map.value(property); - } - return var; -} - -//properties - -QString QConnmanNetworkInterface::getAddress() -{ - QVariant var = getProperty("Address"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getName() -{ - QVariant var = getProperty("Name"); - return qdbus_cast(var); -} - -bool QConnmanNetworkInterface::isConnected() -{ - QVariant var = getProperty("Connected"); - return qdbus_cast(var); -} - -quint8 QConnmanNetworkInterface::getSignalStrength() -{ - QVariant var = getProperty("Strength"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getDevice() -{ - QVariant var = getProperty("Device"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getWifiSsid() -{ - QVariant var = getProperty("WiFi.SSID"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getWifiMode() -{ - QVariant var = getProperty("WiFi.Mode"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getWifiSecurity() -{ - QVariant var = getProperty("WiFi.Security"); - return qdbus_cast(var); -} - -QString QConnmanNetworkInterface::getWifiPassphrase() -{ - QVariant var = getProperty("WiFi.Passphrase"); - return qdbus_cast(var); -} - ////////////////////////// - QConnmanProfileInterface::QConnmanProfileInterface(const QString &dbusPathName,QObject *parent) : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), dbusPathName, @@ -503,6 +385,7 @@ QStringList QConnmanProfileInterface::getServices() return qdbus_cast(var); } + /////////////////////////// QConnmanServiceInterface::QConnmanServiceInterface(const QString &dbusPathName,QObject *parent) : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), @@ -910,13 +793,6 @@ QString QConnmanTechnologyInterface::getType() } -QStringList QConnmanTechnologyInterface::getDevices() -{ - QVariant var = getProperty("Devices"); - return qdbus_cast(var); -} - - ////////////////////////////////// QConnmanAgentInterface::QConnmanAgentInterface(const QString &dbusPathName, QObject *parent) : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), @@ -994,151 +870,8 @@ quint64 QConnmanCounterInterface::getTimeOnline() return 0; } -///////////////////////////////////////// -QConnmanDeviceInterface::QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent) - : QDBusAbstractInterface(QLatin1String(CONNMAN_SERVICE), - dbusPathName, - CONNMAN_DEVICE_INTERFACE, - QDBusConnection::systemBus(), parent) -{ -} - -QConnmanDeviceInterface::~QConnmanDeviceInterface() -{ -} - -void QConnmanDeviceInterface::connectNotify(const char *signal) -{ - if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QDBusVariant))) { - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), - this->path(), - QLatin1String(CONNMAN_DEVICE_INTERFACE), - QLatin1String("PropertyChanged"), - this,SIGNAL(propertyChanged(QString,QDBusVariant))); - - } - if (QLatin1String(signal) == SIGNAL(propertyChangedContext(QString,QString,QDBusVariant))) { - QConnmanDBusHelper *helper; - helper = new QConnmanDBusHelper(this); - - dbusConnection.connect(QLatin1String(CONNMAN_SERVICE), - this->path(), - QLatin1String(CONNMAN_DEVICE_INTERFACE), - QLatin1String("PropertyChanged"), - helper,SLOT(propertyChanged(QString,QDBusVariant))); - - QObject::connect(helper,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), - this,SIGNAL(propertyChangedContext(const QString &,const QString &,const QDBusVariant &)), Qt::UniqueConnection); - } -} - -void QConnmanDeviceInterface::disconnectNotify(const char *signal) -{ - if (QLatin1String(signal) == SIGNAL(propertyChanged(QString,QVariant))) { - - } -} - -QVariantMap QConnmanDeviceInterface::getProperties() -{ - QDBusReply reply = this->call(QLatin1String("GetProperties")); - return reply.value(); -} - -bool QConnmanDeviceInterface::setProperty(const QString &name, const QDBusVariant &value) -{ - QDBusMessage reply = this->call(QLatin1String("SetProperty"),name, qVariantFromValue(value)); - return true; -} - -void QConnmanDeviceInterface::scan() -{ - QDBusReply reply = this->call(QLatin1String("ProposeScan")); - if(!reply.isValid()) { - qDebug() << reply.error().message(); - } -} - -QVariant QConnmanDeviceInterface::getProperty(const QString &property) -{ - QVariant var; - QVariantMap map = getProperties(); - if (map.contains(property)) { - var = map.value(property); - } - return var; -} - -//properties -QString QConnmanDeviceInterface::getAddress() -{ - QVariant var = getProperty("Address"); - return qdbus_cast(var); -} - -QString QConnmanDeviceInterface::getName() -{ - QVariant var = getProperty("Name"); - return qdbus_cast(var); -} - -QString QConnmanDeviceInterface::getType() -{ - QVariant var = getProperty("Type"); - return qdbus_cast(var); -} - -QString QConnmanDeviceInterface::getInterface() -{ - QVariant var = getProperty("Interface"); - return qdbus_cast(var); -} - -bool QConnmanDeviceInterface::isPowered() -{ - QVariant var = getProperty("Powered"); - return qdbus_cast(var); -} - -quint16 QConnmanDeviceInterface::getScanInterval() -{ - QVariant var = getProperty("ScanInterval"); - return qdbus_cast(var); -} - -bool QConnmanDeviceInterface::setScanInterval(const QString & interval) -{ -// QList args; -// args << qVariantFromValue(name) -// << value.variant(); - -// QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args); - - return setProperty("ScanInterval", QDBusVariant(interval)); -} - -bool QConnmanDeviceInterface::isScanning() -{ - QVariant var = getProperty("Scanning"); - return qdbus_cast(var); -} - -QStringList QConnmanDeviceInterface::getNetworks() -{ - QVariant var = getProperty("Networks"); - return qdbus_cast(var); -} - -bool QConnmanDeviceInterface::setEnabled(bool powered) -{ - QList args; - args << qVariantFromValue(QString("Powered")) - << qVariantFromValue(QDBusVariant(powered)); - - QDBusMessage reply = this->callWithArgumentList(QDBus::AutoDetect,QLatin1String("SetProperty"),args); - return true; -} +///////////////////////////////////////// QConnmanDBusHelper::QConnmanDBusHelper(QObject * parent) : QObject(parent) { diff --git a/src/plugins/bearer/connman/qconnmanservice_linux_p.h b/src/plugins/bearer/connman/qconnmanservice_linux_p.h index 6e6b702..9615b33 100644 --- a/src/plugins/bearer/connman/qconnmanservice_linux_p.h +++ b/src/plugins/bearer/connman/qconnmanservice_linux_p.h @@ -70,8 +70,8 @@ #ifndef __CONNMAN_DBUS_H -#define CONNMAN_SERVICE "org.moblin.connman" -#define CONNMAN_PATH "/org/moblin/connman" +#define CONNMAN_SERVICE "net.connman" +#define CONNMAN_PATH "/net/connman" #define CONNMAN_DEBUG_INTERFACE CONNMAN_SERVICE ".Debug" #define CONNMAN_ERROR_INTERFACE CONNMAN_SERVICE ".Error" @@ -84,8 +84,6 @@ #define CONNMAN_TASK_INTERFACE CONNMAN_SERVICE ".Task" #define CONNMAN_PROFILE_INTERFACE CONNMAN_SERVICE ".Profile" #define CONNMAN_SERVICE_INTERFACE CONNMAN_SERVICE ".Service" -#define CONNMAN_DEVICE_INTERFACE CONNMAN_SERVICE ".Device" -#define CONNMAN_NETWORK_INTERFACE CONNMAN_SERVICE ".Network" #define CONNMAN_PROVIDER_INTERFACE CONNMAN_SERVICE ".Provider" #define CONNMAN_TECHNOLOGY_INTERFACE CONNMAN_SERVICE ".Technology" #endif @@ -151,38 +149,6 @@ protected: QVariant getProperty(const QString &); }; - -class QConnmanNetworkInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - QConnmanNetworkInterface(const QString &dbusPathName, QObject *parent = 0); - ~QConnmanNetworkInterface(); - - QVariantMap getProperties(); - - //properties - QString getAddress(); - QString getName(); - bool isConnected(); - quint8 getSignalStrength(); - QString getDevice(); - QString getWifiSsid(); - QString getWifiMode(); - QString getWifiSecurity(); - QString getWifiPassphrase(); - -Q_SIGNALS: - void propertyChanged(const QString &, const QDBusVariant &value); - void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); -protected: - void connectNotify(const char *signal); - void disconnectNotify(const char *signal); - QVariant getProperty(const QString &); -}; - class QConnmanProfileInterfacePrivate; class QConnmanProfileInterface : public QDBusAbstractInterface { @@ -287,8 +253,6 @@ public: QString getName(); QString getType(); - QStringList getDevices(); - Q_SIGNALS: void propertyChanged(const QString &, const QDBusVariant &value); void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); @@ -337,42 +301,6 @@ private: QConnmanCounterInterfacePrivate *d; }; -class QConnmanDeviceInterface : public QDBusAbstractInterface -{ - Q_OBJECT - -public: - - QConnmanDeviceInterface(const QString &dbusPathName,QObject *parent = 0); - ~QConnmanDeviceInterface(); - - QVariantMap getProperties(); - void scan(); - -//properties - QString getAddress(); - QString getName(); - QString getType(); - QString getInterface(); - bool isPowered(); - quint16 getScanInterval(); - bool setScanInterval(const QString &interval); - - bool isScanning(); - QStringList getNetworks(); - bool setEnabled(bool powered); - bool setProperty(const QString &name, const QDBusVariant &value); - -Q_SIGNALS: - void propertyChanged(const QString &, const QDBusVariant &value); - void propertyChangedContext(const QString &,const QString &,const QDBusVariant &); -protected: - void connectNotify(const char *signal); - void disconnectNotify(const char *signal); - QVariant getProperty(const QString &); - -}; - class QConnmanDBusHelper: public QObject, protected QDBusContext { Q_OBJECT -- cgit v0.12 From ad68c845e3e368dc4235e64b54e15a9ee886b078 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 9 Dec 2010 14:25:16 +0200 Subject: QLabel wraps text at fixed lengths There are multiple problems with text wrapping and dialogs. First, teh CBA height was assumed to be zero, or fetch from previous layout, which caused the dialog to be half under the CBA. Now, CBA height is always asked from AVKON metrics, since asking it from actual component might fail (or produce incorrect results) due to that the component is not created yet (or might still have previous layout active). Additionally, qinputDialog label is now having a size policy to restrict its growing out of dialog borders. Task-number: QT-4354 Reviewed-by: Janne Koskinen --- src/gui/dialogs/qdialog.cpp | 13 ++++++------- src/gui/dialogs/qinputdialog.cpp | 2 ++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index fbdc522..16ea045 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -901,15 +901,13 @@ bool QDialog::symbianAdjustedPosition() QPoint p; const bool doS60Positioning = !(isFullScreen()||isMaximized()); if (doS60Positioning) { + QPoint oldPos = pos(); // naive way to deduce screen orientation if (S60->screenHeightInPixels > S60->screenWidthInPixels) { int cbaHeight; - const CEikButtonGroupContainer* bgContainer = S60->buttonGroupContainer(); - if (!bgContainer) { - cbaHeight = 0; - } else { - cbaHeight = qt_TSize2QSize(bgContainer->Size()).height(); - } + TRect rect; + AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EControlPane, rect); + cbaHeight = rect.Height(); p.setY(S60->screenHeightInPixels - height() - cbaHeight); p.setX(0); } else { @@ -939,7 +937,8 @@ bool QDialog::symbianAdjustedPosition() p.setX(qMax(0,S60->screenWidthInPixels - width())); } } - move(p); + if (oldPos != p || p.y() < 0) + move(p); } return doS60Positioning; #else diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp index ce27bd3..a29376a 100644 --- a/src/gui/dialogs/qinputdialog.cpp +++ b/src/gui/dialogs/qinputdialog.cpp @@ -234,6 +234,8 @@ void QInputDialogPrivate::ensureLayout() //we want to let the input dialog grow to available size on Symbian. #ifndef Q_OS_SYMBIAN mainLayout->setSizeConstraint(QLayout::SetMinAndMaxSize); +#else + label->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding); #endif mainLayout->addWidget(label); mainLayout->addWidget(inputWidget); -- cgit v0.12 From 61a5cc5fcde2de0c3639e20104ff58ca91cf793b Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Thu, 9 Dec 2010 14:31:10 +0100 Subject: QmlDebugger: avoid deferring properties when compiling in a debug environment Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativecompiler.cpp | 6 +- .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 97 +++++++++++++++++++++- 2 files changed, 100 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4749bf8..b375b27 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -65,6 +65,7 @@ #include "private/qdeclarativebinding_p.h" #include "private/qdeclarativecompiledbindings_p.h" #include "private/qdeclarativeglobalscriptclass_p.h" +#include "private/qdeclarativedebugservice_p.h" #include #include @@ -754,7 +755,10 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) QList customProps; // Fetch the list of deferred properties - QStringList deferredList = deferredProperties(obj); + QStringList deferredList; + if (!QDeclarativeDebugService::isDebuggingEnabled()) { + deferredList = deferredProperties(obj); + } // Must do id property first. This is to ensure that the id given to any // id reference created matches the order in which the objects are diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 53471bf..20a3fa6 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -114,6 +114,7 @@ private slots: void tst_QDeclarativeDebugPropertyReference(); void setMethodBody(); + void queryObjectTree(); }; QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context) @@ -308,6 +309,34 @@ void tst_QDeclarativeDebug::initTestCase() "function myMethodIndirect() { myMethod(3); }\n" "}"; + // and a fourth to test states + qml << "import QtQuick 1.0\n" + "Rectangle {\n" + "id:rootRect\n" + "width:100\n" + "states: [\n" + "State {\n" + "name:\"state1\"\n" + "PropertyChanges {\n" + "target:rootRect\n" + "width:200\n" + "}\n" + "}\n" + "]\n" + "transitions: [\n" + "Transition {\n" + "from:\"*\"\n" + "to:\"state1\"\n" + "PropertyAnimation {\n" + "target:rootRect\n" + "property:\"width\"\n" + "duration:100\n" + "}\n" + "}\n" + "]\n" + "}\n" + ; + for (int i=0; iobjectName()); - QCOMPARE(context.objects().count(), 3); // 3 qml component objects created for context in main() + QCOMPARE(context.objects().count(), 4); // 4 qml component objects created for context in main() // root context query sends only root object data - it doesn't fill in // the children or property info QCOMPARE(context.objects()[0].properties().count(), 0); QCOMPARE(context.objects()[0].children().count(), 0); - QCOMPARE(context.contexts().count(), 4); + QCOMPARE(context.contexts().count(), 5); QVERIFY(context.contexts()[0].debugId() >= 0); QCOMPARE(context.contexts()[0].name(), QString("tst_QDeclarativeDebug_childContext")); @@ -897,6 +926,70 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } +void tst_QDeclarativeDebug::queryObjectTree() +{ + const int sourceIndex = 3; + + // Check if states/transitions are initialized when fetching root item + QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); + waitForQuery(q_engines); + + QDeclarativeDebugRootContextQuery *q_context = m_dbg->queryRootContexts(q_engines->engines()[0].debugId(), this); + waitForQuery(q_context); + + QVERIFY(q_context->rootContext().objects().count() > sourceIndex); + QDeclarativeDebugObjectReference rootObject = q_context->rootContext().objects()[sourceIndex]; + + QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObjectRecursive(rootObject, this); + waitForQuery(q_obj); + + QDeclarativeDebugObjectReference obj = q_obj->object(); + + delete q_engines; + delete q_context; + delete q_obj; + + QVERIFY(obj.debugId() != -1); + QVERIFY(obj.children().count() >= 2); + + + + // check state + QDeclarativeDebugObjectReference state = obj.children()[0]; + QCOMPARE(state.className(), QString("State")); + QVERIFY(state.children().count() > 0); + + QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QVERIFY(propertyChange.debugId() != -1); + + QDeclarativeDebugPropertyReference propertyChangeTarget = findProperty(propertyChange.properties(),"target"); + QCOMPARE(propertyChangeTarget.objectDebugId(), propertyChange.debugId()); + + QDeclarativeDebugObjectReference targetReference = qvariant_cast(propertyChangeTarget.value()); + QVERIFY(targetReference.debugId() != -1); + + + + // check transition + QDeclarativeDebugObjectReference transition = obj.children()[1]; + QCOMPARE(transition.className(), QString("Transition")); + QCOMPARE(findProperty(transition.properties(),"from").value().toString(), QString("*")); + QCOMPARE(findProperty(transition.properties(),"to").value(), findProperty(state.properties(),"name").value()); + QVERIFY(transition.children().count() > 0); + + QDeclarativeDebugObjectReference animation = transition.children()[0]; + QVERIFY(animation.debugId() != -1); + + QDeclarativeDebugPropertyReference animationTarget = findProperty(animation.properties(),"target"); + QCOMPARE(animationTarget.objectDebugId(), animation.debugId()); + + targetReference = qvariant_cast(animationTarget.value()); + QVERIFY(targetReference.debugId() != -1); + + QCOMPARE(findProperty(animation.properties(),"property").value().toString(), QString("width")); + QCOMPARE(findProperty(animation.properties(),"duration").value().toInt(), 100); +} + int main(int argc, char *argv[]) { int _argc = argc + 1; -- cgit v0.12 From f2eca0c0380a0e06ccc7f98c8d112549ac9fa085 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 10 Dec 2010 11:24:49 +1000 Subject: Add 'mirror' property to Image element. Setting mirror to true will horizontally invert an image. This feature is part of the task to support RTL in QML (see QTBUG-11042). Task-number: QTBUG-15878 Reviewed-by: Joona Petrell --- .../graphicsitems/qdeclarativeanimatedimage.cpp | 12 ++- .../graphicsitems/qdeclarativeborderimage.cpp | 19 ++++ .../graphicsitems/qdeclarativeimage.cpp | 103 +++++++++++---------- .../graphicsitems/qdeclarativeimagebase.cpp | 20 ++++ .../graphicsitems/qdeclarativeimagebase_p.h | 5 + .../graphicsitems/qdeclarativeimagebase_p_p.h | 4 +- .../qdeclarativeanimatedimage/data/hearts.gif | Bin 0 -> 6524 bytes .../qdeclarativeanimatedimage/data/hearts.qml | 6 ++ .../tst_qdeclarativeanimatedimage.cpp | 103 +++++++++++++++++++++ .../qdeclarativeborderimage/data/heart200.png | Bin 0 -> 7943 bytes .../tst_qdeclarativeborderimage.cpp | 34 +++++++ .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 86 +++++++++++++++++ 12 files changed, 343 insertions(+), 49 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif create mode 100644 tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml create mode 100644 tests/auto/declarative/qdeclarativeborderimage/data/heart200.png diff --git a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp index 12a820f..abdfdfa 100644 --- a/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeanimatedimage.cpp @@ -86,6 +86,16 @@ QT_BEGIN_NAMESPACE \sa BorderImage, Image */ +/*! + \qmlproperty bool AnimatedImage::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + QDeclarativeAnimatedImage::QDeclarativeAnimatedImage(QDeclarativeItem *parent) : QDeclarativeImage(*(new QDeclarativeAnimatedImagePrivate), parent) { @@ -126,7 +136,7 @@ void QDeclarativeAnimatedImage::setPaused(bool pause) \qmlproperty bool AnimatedImage::playing This property holds whether the animated image is playing. - By defaults, this property is true, meaning that the animation + By default, this property is true, meaning that the animation will start playing immediately. */ bool QDeclarativeAnimatedImage::isPlaying() const diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index 0bf09ad..a25074a 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -200,6 +200,16 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() */ /*! + \qmlproperty bool BorderImage::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + +/*! \qmlproperty url BorderImage::source This property holds the URL that refers to the source image. @@ -534,8 +544,15 @@ void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem bool oldAA = p->testRenderHint(QPainter::Antialiasing); bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); + QTransform oldTransform; if (d->smooth) p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + if (d->mirror) { + oldTransform = p->transform(); + QTransform mirror; + mirror.translate(d->width(), 0).scale(-1, 1.0); + p->setWorldTransform(mirror * oldTransform); + } const QDeclarativeScaleGrid *border = d->getScaleGrid(); int left = border->left(); @@ -561,6 +578,8 @@ void QDeclarativeBorderImage::paint(QPainter *p, const QStyleOptionGraphicsItem p->setRenderHint(QPainter::Antialiasing, oldAA); p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); } + if (d->mirror) + p->setWorldTransform(oldTransform); } QT_END_NAMESPACE diff --git a/src/declarative/graphicsitems/qdeclarativeimage.cpp b/src/declarative/graphicsitems/qdeclarativeimage.cpp index e07292b..68a1ecb 100644 --- a/src/declarative/graphicsitems/qdeclarativeimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimage.cpp @@ -467,84 +467,93 @@ QRectF QDeclarativeImage::boundingRect() const to make sure that they aren't cached at the expense of small 'ui element' images. */ +/*! + \qmlproperty bool Image::mirror + \since Quick 1.1 + + This property holds whether the image should be horizontally inverted + (effectively displaying a mirrored image). + + The default value is false. +*/ + + void QDeclarativeImage::paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *) { Q_D(QDeclarativeImage); if (d->pix.pixmap().isNull() ) return; - bool oldAA = p->testRenderHint(QPainter::Antialiasing); - bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); - if (d->smooth) - p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + int drawWidth = width(); + int drawHeight = height(); + bool doClip = false; + QTransform transform; + qreal widthScale = width() / qreal(d->pix.width()); + qreal heightScale = height() / qreal(d->pix.height()); if (width() != d->pix.width() || height() != d->pix.height()) { if (d->fillMode >= Tile) { - if (d->fillMode == Tile) { - p->drawTiledPixmap(QRectF(0,0,width(),height()), d->pix); - } else { - qreal widthScale = width() / qreal(d->pix.width()); - qreal heightScale = height() / qreal(d->pix.height()); - - QTransform scale; - if (d->fillMode == TileVertically) { - scale.scale(widthScale, 1.0); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawTiledPixmap(QRectF(0,0,d->pix.width(),height()), d->pix); - p->setWorldTransform(old); - } else { - scale.scale(1.0, heightScale); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawTiledPixmap(QRectF(0,0,width(),d->pix.height()), d->pix); - p->setWorldTransform(old); - } + if (d->fillMode == TileVertically) { + transform.scale(widthScale, 1.0); + drawWidth = d->pix.width(); + } else if (d->fillMode == TileHorizontally) { + transform.scale(1.0, heightScale); + drawHeight = d->pix.height(); } } else { - qreal widthScale = width() / qreal(d->pix.width()); - qreal heightScale = height() / qreal(d->pix.height()); - - QTransform scale; - if (d->fillMode == PreserveAspectFit) { if (widthScale <= heightScale) { heightScale = widthScale; - scale.translate(0, (height() - heightScale * d->pix.height()) / 2); + transform.translate(0, (height() - heightScale * d->pix.height()) / 2); } else if(heightScale < widthScale) { widthScale = heightScale; - scale.translate((width() - widthScale * d->pix.width()) / 2, 0); + transform.translate((width() - widthScale * d->pix.width()) / 2, 0); } } else if (d->fillMode == PreserveAspectCrop) { if (widthScale < heightScale) { widthScale = heightScale; - scale.translate((width() - widthScale * d->pix.width()) / 2, 0); + transform.translate((width() - widthScale * d->pix.width()) / 2, 0); } else if(heightScale < widthScale) { heightScale = widthScale; - scale.translate(0, (height() - heightScale * d->pix.height()) / 2); + transform.translate(0, (height() - heightScale * d->pix.height()) / 2); } } - if (clip()) { - p->save(); - p->setClipRect(QRectF(0, 0, d->mWidth, d->mHeight), Qt::IntersectClip); - } - scale.scale(widthScale, heightScale); - QTransform old = p->transform(); - p->setWorldTransform(scale * old); - p->drawPixmap(0, 0, d->pix); - p->setWorldTransform(old); - if (clip()) { - p->restore(); - } + transform.scale(widthScale, heightScale); + drawWidth = d->pix.width(); + drawHeight = d->pix.height(); + doClip = clip(); } - } else { - p->drawPixmap(0, 0, d->pix); } + QTransform oldTransform; + bool oldAA = p->testRenderHint(QPainter::Antialiasing); + bool oldSmooth = p->testRenderHint(QPainter::SmoothPixmapTransform); + if (d->smooth) + p->setRenderHints(QPainter::Antialiasing | QPainter::SmoothPixmapTransform, d->smooth); + if (doClip) { + p->save(); + p->setClipRect(QRectF(0, 0, d->mWidth, d->mHeight), Qt::IntersectClip); + } + if (d->mirror) + transform.translate(drawWidth, 0).scale(-1.0, 1.0); + if (!transform.isIdentity()) { + oldTransform = p->transform(); + p->setWorldTransform(transform * oldTransform); + } + + if (d->fillMode >= Tile) + p->drawTiledPixmap(QRectF(0, 0, drawWidth, drawHeight), d->pix); + else + p->drawPixmap(QRectF(0, 0, drawWidth, drawHeight), d->pix, QRectF(0, 0, drawWidth, drawHeight)); + if (d->smooth) { p->setRenderHint(QPainter::Antialiasing, oldAA); p->setRenderHint(QPainter::SmoothPixmapTransform, oldSmooth); } + if (doClip) + p->restore(); + if (!transform.isIdentity()) + p->setWorldTransform(oldTransform); } void QDeclarativeImage::pixmapChange() diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp index 37b0734..c745635 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase.cpp +++ b/src/declarative/graphicsitems/qdeclarativeimagebase.cpp @@ -146,6 +146,26 @@ void QDeclarativeImageBase::setCached(bool cached) load(); } +void QDeclarativeImageBase::setMirror(bool mirror) +{ + Q_D(QDeclarativeImageBase); + if (mirror == d->mirror) + return; + + d->mirror = mirror; + + if (isComponentComplete()) + update(); + + emit mirrorChanged(); +} + +bool QDeclarativeImageBase::mirror() const +{ + Q_D(const QDeclarativeImageBase); + return d->mirror; +} + void QDeclarativeImageBase::load() { Q_D(QDeclarativeImageBase); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h index d25f7c3..b6e55ec 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p.h @@ -60,6 +60,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeImageBase : public QDeclarativeItem Q_PROPERTY(bool asynchronous READ asynchronous WRITE setAsynchronous NOTIFY asynchronousChanged) Q_PROPERTY(bool cached READ cached WRITE setCached NOTIFY cachedChanged) // ### VERSIONING: Only in QtQuick 1.1 Q_PROPERTY(QSize sourceSize READ sourceSize WRITE setSourceSize NOTIFY sourceSizeChanged) + Q_PROPERTY(bool mirror READ mirror WRITE setMirror NOTIFY mirrorChanged) // ### VERSIONING: Only in QtQuick 1.1 public: ~QDeclarativeImageBase(); @@ -79,6 +80,9 @@ public: virtual void setSourceSize(const QSize&); QSize sourceSize() const; + virtual void setMirror(bool mirror); + bool mirror() const; + Q_SIGNALS: void sourceChanged(const QUrl &); void sourceSizeChanged(); @@ -86,6 +90,7 @@ Q_SIGNALS: void progressChanged(qreal progress); void asynchronousChanged(); void cachedChanged(); + void mirrorChanged(); protected: virtual void load(); diff --git a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h index a539649..950914f 100644 --- a/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeimagebase_p_p.h @@ -71,7 +71,8 @@ public: progress(0.0), explicitSourceSize(false), async(false), - cached(true) + cached(true), + mirror(false) { QGraphicsItemPrivate::flags = QGraphicsItemPrivate::flags & ~QGraphicsItem::ItemHasNoContents; } @@ -84,6 +85,7 @@ public: bool explicitSourceSize : 1; bool async : 1; bool cached : 1; + bool mirror: 1; }; QT_END_NAMESPACE diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif new file mode 100644 index 0000000..cfb55f2 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.gif differ diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml new file mode 100644 index 0000000..8729dd2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeanimatedimage/data/hearts.qml @@ -0,0 +1,6 @@ +import QtQuick 1.0 + +AnimatedImage { + source: "hearts.gif" + playing: false +} diff --git a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp index 8cbe813..bd701e7 100644 --- a/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp +++ b/tests/auto/declarative/qdeclarativeanimatedimage/tst_qdeclarativeanimatedimage.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "../shared/testhttpserver.h" #include "../../../shared/util.h" @@ -66,13 +67,28 @@ private slots: void stopped(); void setFrame(); void frameCount(); + void mirror_running(); + void mirror_notRunning(); + void mirror_notRunning_data(); void remote(); void remote_data(); void sourceSize(); void sourceSizeReadOnly(); void invalidSource(); + +private: + QPixmap grabScene(QGraphicsScene *scene, int width, int height); }; +QPixmap tst_qdeclarativeanimatedimage::grabScene(QGraphicsScene *scene, int width, int height) +{ + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene->render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + return screenshot; +} + void tst_qdeclarativeanimatedimage::play() { QDeclarativeEngine engine; @@ -132,6 +148,93 @@ void tst_qdeclarativeanimatedimage::frameCount() delete anim; } +void tst_qdeclarativeanimatedimage::mirror_running() +{ + // test where mirror is set to true after animation has started + + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/hearts.qml")); + QDeclarativeAnimatedImage *anim = qobject_cast(component.create()); + QVERIFY(anim); + + QGraphicsScene scene; + int width = anim->property("width").toInt(); + int height = anim->property("height").toInt(); + scene.addItem(qobject_cast(anim)); + + QCOMPARE(anim->currentFrame(), 0); + QPixmap frame0 = grabScene(&scene, width, height); + anim->setCurrentFrame(1); + QPixmap frame1 = grabScene(&scene, width, height); + + anim->setCurrentFrame(0); + + QSignalSpy spy(anim, SIGNAL(frameChanged())); + anim->setPlaying(true); + + QTRY_VERIFY(spy.count() == 1); spy.clear(); + anim->setProperty("mirror", true); + + QCOMPARE(anim->currentFrame(), 1); + QPixmap frame1_flipped = grabScene(&scene, width, height); + + QTRY_VERIFY(spy.count() == 1); spy.clear(); + QCOMPARE(anim->currentFrame(), 0); // animation only has 2 frames, should cycle back to first + QPixmap frame0_flipped = grabScene(&scene, width, height); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap frame0_expected = frame0.transformed(transform); + QPixmap frame1_expected = frame1.transformed(transform); + + QCOMPARE(frame0_flipped, frame0_expected); + QCOMPARE(frame1_flipped, frame1_expected); +} + +void tst_qdeclarativeanimatedimage::mirror_notRunning() +{ + QFETCH(QUrl, fileUrl); + + QDeclarativeEngine engine; + QDeclarativeComponent component(&engine, fileUrl); + QDeclarativeAnimatedImage *anim = qobject_cast(component.create()); + QVERIFY(anim); + + QGraphicsScene scene; + int width = anim->property("width").toInt(); + int height = anim->property("height").toInt(); + scene.addItem(qobject_cast(anim)); + QPixmap screenshot = grabScene(&scene, width, height); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap expected = screenshot.transformed(transform); + + int frame = anim->currentFrame(); + bool playing = anim->isPlaying(); + bool paused = anim->isPlaying(); + + anim->setProperty("mirror", true); + screenshot = grabScene(&scene, width, height); + + QCOMPARE(screenshot, expected); + + // mirroring should not change the current frame or playing status + QCOMPARE(anim->currentFrame(), frame); + QCOMPARE(anim->isPlaying(), playing); + QCOMPARE(anim->isPaused(), paused); + + delete anim; +} + +void tst_qdeclarativeanimatedimage::mirror_notRunning_data() +{ + QTest::addColumn("fileUrl"); + + QTest::newRow("paused") << QUrl::fromLocalFile(SRCDIR "/data/stickmanpause.qml"); + QTest::newRow("stopped") << QUrl::fromLocalFile(SRCDIR "/data/stickmanstopped.qml"); +} + void tst_qdeclarativeanimatedimage::remote() { QFETCH(QString, fileName); diff --git a/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png b/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png new file mode 100644 index 0000000..5a31ae8 Binary files /dev/null and b/tests/auto/declarative/qdeclarativeborderimage/data/heart200.png differ diff --git a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp index 5478145..c22cde2 100644 --- a/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp +++ b/tests/auto/declarative/qdeclarativeborderimage/tst_qdeclarativeborderimage.cpp @@ -43,6 +43,8 @@ #include #include #include +#include +#include #include #include @@ -77,6 +79,7 @@ private slots: void clearSource(); void resized(); void smooth(); + void mirror(); void tileModes(); void sciSource(); void sciSource_data(); @@ -218,6 +221,37 @@ void tst_qdeclarativeborderimage::smooth() delete obj; } +void tst_qdeclarativeborderimage::mirror() +{ + QString componentStr = "import QtQuick 1.0\nBorderImage { source: \"" SRCDIR "/data/heart200.png\"; smooth: true; width: 300; height: 300; border { top: 50; right: 50; bottom: 50; left: 50 } }"; + QDeclarativeComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); + QDeclarativeBorderImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + + int width = obj->property("width").toInt(); + int height = obj->property("height").toInt(); + + QGraphicsScene scene; + scene.addItem(qobject_cast(obj)); + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + QPixmap expected = screenshot.transformed(transform); + + obj->setProperty("mirror", true); + p_screenshot.fillRect(QRect(0, 0, width, height), Qt::white); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QCOMPARE(screenshot, expected); + + delete obj; +} + void tst_qdeclarativeborderimage::tileModes() { { diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index c811f62..27c7964 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -79,6 +79,8 @@ private slots: void resized(); void preserveAspectRatio(); void smooth(); + void mirror(); + void mirror_data(); void svg(); void geometry(); void geometry_data(); @@ -270,6 +272,90 @@ void tst_qdeclarativeimage::smooth() delete obj; } +void tst_qdeclarativeimage::mirror() +{ + QFETCH(int, fillMode); + + qreal width = 300; + qreal height = 250; + + QString src = QUrl::fromLocalFile(SRCDIR "/data/heart200.png").toString(); + QString componentStr = "import QtQuick 1.0\nImage { source: \"" + src + "\"; }"; + + QDeclarativeComponent component(&engine); + component.setData(componentStr.toLatin1(), QUrl::fromLocalFile("")); + QDeclarativeImage *obj = qobject_cast(component.create()); + QVERIFY(obj != 0); + + obj->setProperty("width", width); + obj->setProperty("height", height); + obj->setFillMode((QDeclarativeImage::FillMode)fillMode); + obj->setProperty("mirror", true); + + QGraphicsScene scene; + scene.addItem(qobject_cast(obj)); + QPixmap screenshot(width, height); + screenshot.fill(); + QPainter p_screenshot(&screenshot); + scene.render(&p_screenshot, QRect(0, 0, width, height), QRect(0, 0, width, height)); + + QPixmap srcPixmap; + QVERIFY(srcPixmap.load(SRCDIR "/data/heart200.png")); + + QPixmap expected(width, height); + expected.fill(); + QPainter p_e(&expected); + QTransform transform; + transform.translate(width, 0).scale(-1, 1.0); + p_e.setTransform(transform); + + switch (fillMode) { + case QDeclarativeImage::Stretch: + p_e.drawPixmap(QRect(0, 0, width, height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + case QDeclarativeImage::PreserveAspectFit: + p_e.drawPixmap(QRect(25, 0, width / (width/height), height), srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + case QDeclarativeImage::PreserveAspectCrop: + { + qreal ratio = width/srcPixmap.width(); // width is the longer side + QRect rect(0, 0, srcPixmap.width()*ratio, srcPixmap.height()*ratio); + rect.moveCenter(QRect(0, 0, width, height).center()); + p_e.drawPixmap(rect, srcPixmap, QRect(0, 0, srcPixmap.width(), srcPixmap.height())); + break; + } + case QDeclarativeImage::Tile: + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + case QDeclarativeImage::TileVertically: + transform.scale(width / srcPixmap.width(), 1.0); + p_e.setTransform(transform); + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + case QDeclarativeImage::TileHorizontally: + transform.scale(1.0, height / srcPixmap.height()); + p_e.setTransform(transform); + p_e.drawTiledPixmap(QRect(0, 0, width, height), srcPixmap); + break; + } + + QCOMPARE(screenshot, expected); + + delete obj; +} + +void tst_qdeclarativeimage::mirror_data() +{ + QTest::addColumn("fillMode"); + + QTest::newRow("Stretch") << int(QDeclarativeImage::Stretch); + QTest::newRow("PreserveAspectFit") << int(QDeclarativeImage::PreserveAspectFit); + QTest::newRow("PreserveAspectCrop") << int(QDeclarativeImage::PreserveAspectCrop); + QTest::newRow("Tile") << int(QDeclarativeImage::Tile); + QTest::newRow("TileVertically") << int(QDeclarativeImage::TileVertically); + QTest::newRow("TileHorizontally") << int(QDeclarativeImage::TileHorizontally); +} + void tst_qdeclarativeimage::svg() { QString src = QUrl::fromLocalFile(SRCDIR "/data/heart.svg").toString(); -- cgit v0.12 From a32728ce8cf4fa1d1dc1001b1fadc66e9c86e025 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 10 Dec 2010 13:03:59 +1000 Subject: The sourceSize property for borderImage should be read only Trying the sourceSize property from QML should emit a read-only warning. Task-number: QTBUG-15703 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 6 ------ src/declarative/graphicsitems/qdeclarativeborderimage_p.h | 6 ++++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index a25074a..d9ba2bd 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -256,12 +256,6 @@ void QDeclarativeBorderImage::setSource(const QUrl &url) load(); } -void QDeclarativeBorderImage::setSourceSize(const QSize& size) -{ - Q_UNUSED(size); - qmlInfo(this) << "Setting sourceSize for borderImage not supported"; -} - void QDeclarativeBorderImage::load() { Q_D(QDeclarativeBorderImage); diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h index 7cf24f2..d9db0ac 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage_p.h +++ b/src/declarative/graphicsitems/qdeclarativeborderimage_p.h @@ -63,6 +63,9 @@ class Q_AUTOTEST_EXPORT QDeclarativeBorderImage : public QDeclarativeImageBase Q_PROPERTY(TileMode horizontalTileMode READ horizontalTileMode WRITE setHorizontalTileMode NOTIFY horizontalTileModeChanged) Q_PROPERTY(TileMode verticalTileMode READ verticalTileMode WRITE setVerticalTileMode NOTIFY verticalTileModeChanged) + // read-only for BorderImage + Q_PROPERTY(QSize sourceSize READ sourceSize NOTIFY sourceSizeChanged) + public: QDeclarativeBorderImage(QDeclarativeItem *parent=0); ~QDeclarativeBorderImage(); @@ -80,11 +83,10 @@ public: void paint(QPainter *, const QStyleOptionGraphicsItem *, QWidget *); void setSource(const QUrl &url); - void setSourceSize(const QSize&); - Q_SIGNALS: void horizontalTileModeChanged(); void verticalTileModeChanged(); + void sourceSizeChanged(); protected: virtual void load(); -- cgit v0.12 From 5710cc981ae39a018d4c30b2c77f6623713a5bf1 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Fri, 10 Dec 2010 13:19:03 +1000 Subject: KeyNavigation skips disabled or invisible items When using KeyNavigation, if the "visible" or "enabled" property of the item set in the KeyNavigation handler is false, an attempt will be made to skip this item and setFocus to the following item. Task-number: QTBUG-15862 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeitem.cpp | 46 ++++++++++--- src/declarative/graphicsitems/qdeclarativeitem_p.h | 1 + .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 79 ++++++++++++++++++++++ 3 files changed, 118 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 9d6fe12..cf12688 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -444,6 +444,11 @@ void QDeclarativeItemKeyFilter::componentComplete() \c KeyNavigation.BeforeItem allows the event to be used for key navigation before the item, rather than after. + If item to which the focus is switching is not enabled or visible, an attempt will + be made to skip this item and focus on the next. This is possible if there are + a chain of items with the same KeyNavigation handler. If multiple items in a row are not enabled + or visible, they will also be skipped. + \sa {Keys}{Keys attached property} */ @@ -452,10 +457,12 @@ void QDeclarativeItemKeyFilter::componentComplete() \qmlproperty Item KeyNavigation::right \qmlproperty Item KeyNavigation::up \qmlproperty Item KeyNavigation::down + \qmlproperty Item KeyNavigation::tab + \qmlproperty Item KeyNavigation::backtab These properties hold the item to assign focus to - when Key_Left, Key_Right, Key_Up or Key_Down are - pressed. + when Key_Left, Key_Right, Key_Up, Key_Down, Key_Tab or Key_BackTab + are pressed. */ QDeclarativeKeyNavigationAttached::QDeclarativeKeyNavigationAttached(QObject *parent) @@ -603,37 +610,37 @@ void QDeclarativeKeyNavigationAttached::keyPressed(QKeyEvent *event, bool post) switch(event->key()) { case Qt::Key_Left: if (d->left) { - d->left->setFocus(true); + setFocusNavigation(d->left, "left"); event->accept(); } break; case Qt::Key_Right: if (d->right) { - d->right->setFocus(true); + setFocusNavigation(d->right, "right"); event->accept(); } break; case Qt::Key_Up: if (d->up) { - d->up->setFocus(true); + setFocusNavigation(d->up, "up"); event->accept(); } break; case Qt::Key_Down: if (d->down) { - d->down->setFocus(true); + setFocusNavigation(d->down, "down"); event->accept(); } break; case Qt::Key_Tab: if (d->tab) { - d->tab->setFocus(true); + setFocusNavigation(d->tab, "tab"); event->accept(); } break; case Qt::Key_Backtab: if (d->backtab) { - d->backtab->setFocus(true); + setFocusNavigation(d->backtab, "backtab"); event->accept(); } break; @@ -692,6 +699,29 @@ void QDeclarativeKeyNavigationAttached::keyReleased(QKeyEvent *event, bool post) if (!event->isAccepted()) QDeclarativeItemKeyFilter::keyReleased(event, post); } +void QDeclarativeKeyNavigationAttached::setFocusNavigation(QDeclarativeItem *currentItem, const char *dir) +{ + QDeclarativeItem *initialItem = currentItem; + bool isNextItem = false; + do { + isNextItem = false; + if (currentItem->isVisible() && currentItem->isEnabled()) { + currentItem->setFocus(true); + } else { + QObject *attached = + qmlAttachedPropertiesObject(currentItem, false); + if (attached) { + QDeclarativeItem *tempItem = qvariant_cast(attached->property(dir)); + if (tempItem) { + currentItem = tempItem; + isNextItem = true; + } + } + } + } + while (currentItem != initialItem && isNextItem); +} + /*! \qmlclass Keys QDeclarativeKeysAttached \ingroup qml-basic-interaction-elements diff --git a/src/declarative/graphicsitems/qdeclarativeitem_p.h b/src/declarative/graphicsitems/qdeclarativeitem_p.h index d8635b9..402554b 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem_p.h +++ b/src/declarative/graphicsitems/qdeclarativeitem_p.h @@ -411,6 +411,7 @@ Q_SIGNALS: private: virtual void keyPressed(QKeyEvent *event, bool post); virtual void keyReleased(QKeyEvent *event, bool post); + void setFocusNavigation(QDeclarativeItem *currentItem, const char *dir); }; class QDeclarativeKeysAttachedPrivate : public QObjectPrivate diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 711bf00..9587254 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -65,6 +65,7 @@ private slots: void keys(); void keysProcessingOrder(); void keyNavigation(); + void keyNavigation_skipNotVisible(); void smooth(); void clip(); void mapCoordinates(); @@ -450,6 +451,84 @@ void tst_QDeclarativeItem::keyNavigation() delete canvas; } +void tst_QDeclarativeItem::keyNavigation_skipNotVisible() +{ + QDeclarativeView *canvas = new QDeclarativeView(0); + canvas->setFixedSize(240,320); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/keynavigationtest.qml")); + canvas->show(); + qApp->processEvents(); + + QEvent wa(QEvent::WindowActivate); + QApplication::sendEvent(canvas, &wa); + QFocusEvent fe(QEvent::FocusIn); + QApplication::sendEvent(canvas, &fe); + + QDeclarativeItem *item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // Set item 2 to not visible + item = findItem(canvas->rootObject(), "item2"); + QVERIFY(item); + item->setVisible(false); + QVERIFY(!item->isVisible()); + + // right + QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // tab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item3"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // backtab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + //Set item 3 to not visible + item = findItem(canvas->rootObject(), "item3"); + QVERIFY(item); + item->setVisible(false); + QVERIFY(!item->isVisible()); + + // tab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Tab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item4"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + // backtab + key = QKeyEvent(QEvent::KeyPress, Qt::Key_Backtab, Qt::NoModifier, "", false, 1); + QApplication::sendEvent(canvas, &key); + QVERIFY(key.isAccepted()); + + item = findItem(canvas->rootObject(), "item1"); + QVERIFY(item); + QVERIFY(item->hasActiveFocus()); + + delete canvas; +} + void tst_QDeclarativeItem::smooth() { QDeclarativeComponent component(&engine); -- cgit v0.12 From 9d8dac4e4509795b6af8a5885f6e9f1a3ccbaa06 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 10 Dec 2010 11:12:23 +0200 Subject: QDateTimeEdit is not showing correctly when resizes in symbian The problem boils down to using large square area for QDateTime widget (which is more or less a date-aware combobox). Style tries to make the combobox button as wide as it is tall, and as button is as tall as the combobox frame, it steals the whole square widget for itself. To fix this, we now limit the combobox button height to be no more than fourth of the total width of the widget. Thus, in normal, non-resized case, button is, as tall as the frame, but as widget is made larger, button stops to grow after reaching quarter of width of the widget. Task-number: QT-4312 Reviewed-by: Janne Koskinen --- src/gui/styles/qs60style.cpp | 38 ++++++++++++++++---------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 2f09529..3c715b7 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -104,11 +104,11 @@ const int QS60StylePrivate::m_numberOfLayouts = const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { // *** generated pixel metrics *** -{5,0,-909,0,0,2,0,0,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106}, -{5,0,-909,0,0,1,0,0,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, -{7,0,-909,0,0,2,0,0,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,0,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,0,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} +{5,0,-909,0,0,2,0,2,-1,7,12,22,15,15,7,198,-909,-909,-909,20,13,2,0,0,21,7,18,30,3,3,1,-909,-909,0,1,0,0,12,20,15,15,18,18,1,115,18,0,-909,-909,-909,-909,0,0,16,2,-909,0,0,-909,16,-909,-909,-909,-909,32,18,55,24,55,4,4,4,9,13,-909,5,51,11,5,0,3,3,6,8,3,3,-909,2,-909,-909,-909,-909,5,5,3,1,106}, +{5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, +{7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, +{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} // *** End of generated data *** }; @@ -1071,11 +1071,11 @@ void QS60Style::drawComplexControl(ComplexControl control, const QStyleOptionCom // Button frame QStyleOptionFrame buttonOption; buttonOption.QStyleOption::operator=(*cmb); - const int maxHeight = cmbxFrame.height(); - const int maxWidth = cmbxFrame.width() - cmbxEditField.width(); + const int maxButtonSide = cmbxFrame.width() - cmbxEditField.width(); + const int newTop = cmbxEditField.center().y() - maxButtonSide / 2; const int topLeftPoint = direction ? - (cmbxEditField.right() + 1) : (cmbxEditField.left() + 1 - maxWidth); - const QRect buttonRect(topLeftPoint, cmbxEditField.top(), maxWidth, maxHeight); + (cmbxEditField.right() + 1) : (cmbxEditField.left() + 1 - maxButtonSide); + const QRect buttonRect(topLeftPoint, newTop, maxButtonSide, maxButtonSide); buttonOption.rect = buttonRect; buttonOption.state = cmb->state; drawPrimitive(PE_PanelButtonCommand, &buttonOption, painter, widget); @@ -2884,30 +2884,24 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple ret = cmb->rect; const int width = cmb->rect.width(); const int height = cmb->rect.height(); - const int buttonIconSize = QS60StylePrivate::pixelMetric(PM_ButtonIconSize); const int buttonMargin = cmb->frame ? 2 : 0; // lets use spinbox frame here as well, as no combobox specific value available. const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0; - const int buttonWidth = qMax(cmb->rect.height(), buttonIconSize); - + const int buttonMinSize = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin; QSize buttonSize; - buttonSize.setWidth(buttonWidth + 2 * buttonMargin); - buttonSize.setHeight(qMax(8, (cmb->rect.height() >> 1) - frameThickness)); //buttons should be squares + //allow button to grow to one fourth of the frame height, if the frame is really tall + buttonSize.setHeight(qMin(height, qMax(width / 4, buttonMinSize))); + buttonSize.setWidth(buttonSize.height()); buttonSize = buttonSize.expandedTo(QApplication::globalStrut()); switch (scontrol) { case SC_ComboBoxArrow: { - const int xposMod = cmb->rect.x() + width - buttonMargin - buttonWidth; + const int xposMod = cmb->rect.x() + width - buttonMargin - buttonSize.width(); const int ypos = cmb->rect.y(); - ret.setRect(xposMod, ypos + buttonMargin, buttonWidth, height - 2 * buttonMargin); + ret.setRect(xposMod, ypos + buttonMargin, buttonSize.width(), height - 2 * buttonMargin); } break; case SC_ComboBoxEditField: { - const int withFrameX = cmb->rect.x() + width - frameThickness - buttonSize.width(); - ret = QRect( - frameThickness, - frameThickness, - withFrameX - frameThickness, - height - 2 * frameThickness); + ret = QRect(0, 0, cmb->rect.x() + width - buttonSize.width(), height); } break; case SC_ComboBoxListBoxPopup: { -- cgit v0.12 From f2ab8acd583941dcd673c627ff03d25e519e1f6b Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Fri, 10 Dec 2010 11:34:45 +0200 Subject: Fix whitespace in qs60style.cpp Reviewed-by: TrustMe --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 3c715b7..56d2d19 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -2889,7 +2889,7 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple const int frameThickness = cmb->frame ? pixelMetric(PM_SpinBoxFrameWidth, cmb, widget) : 0; const int buttonMinSize = QS60StylePrivate::pixelMetric(PM_ButtonIconSize) + 2 * buttonMargin; QSize buttonSize; - //allow button to grow to one fourth of the frame height, if the frame is really tall + //allow button to grow to one fourth of the frame height, if the frame is really tall buttonSize.setHeight(qMin(height, qMax(width / 4, buttonMinSize))); buttonSize.setWidth(buttonSize.height()); buttonSize = buttonSize.expandedTo(QApplication::globalStrut()); -- cgit v0.12 From 6541562252cecd102788257022d3cf159954cae8 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Fri, 10 Dec 2010 11:47:43 +0100 Subject: QmlDebugger: Instantiation of deferred objects moved to the debugger engine Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativecompiler.cpp | 6 +----- src/declarative/qml/qdeclarativeenginedebug.cpp | 22 ++++++++++++++++------ src/declarative/qml/qdeclarativeenginedebug_p.h | 1 + 3 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b375b27..4749bf8 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -65,7 +65,6 @@ #include "private/qdeclarativebinding_p.h" #include "private/qdeclarativecompiledbindings_p.h" #include "private/qdeclarativeglobalscriptclass_p.h" -#include "private/qdeclarativedebugservice_p.h" #include #include @@ -755,10 +754,7 @@ bool QDeclarativeCompiler::buildObject(Object *obj, const BindingContext &ctxt) QList customProps; // Fetch the list of deferred properties - QStringList deferredList; - if (!QDeclarativeDebugService::isDebuggingEnabled()) { - deferredList = deferredProperties(obj); - } + QStringList deferredList = deferredProperties(obj); // Must do id property first. This is to ensure that the id given to any // id reference created matches the order in which the objects are diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index bffe681..5f338db 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -192,11 +192,6 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, { message << objectData(object); - // Some children aren't added to an object until particular properties are read - // - e.g. child state objects aren't added until the 'states' property is read - - // but this should only affect internal objects that aren't shown by the - // debugger anyway. - QObjectList children = object->children(); int childrenCount = children.count(); @@ -257,6 +252,18 @@ void QDeclarativeEngineDebugServer::buildObjectDump(QDataStream &message, message << fakeProperties[ii]; } +void QDeclarativeEngineDebugServer::prepareDeferredObjects(QObject *obj) +{ + qmlExecuteDeferred(obj); + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + QObject *child = children.at(ii); + prepareDeferredObjects(child); + } + +} + void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDeclarativeContext *ctxt) { QDeclarativeContextData *p = QDeclarativeContextData::get(ctxt); @@ -393,8 +400,11 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) QDataStream rs(&reply, QIODevice::WriteOnly); rs << QByteArray("FETCH_OBJECT_R") << queryId; - if (object) + if (object) { + if (recurse) + prepareDeferredObjects(object); buildObjectDump(rs, object, recurse, dumpProperties); + } sendMessage(reply); } else if (type == "WATCH_OBJECT") { diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index 97b8121..dc8bc85 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -105,6 +105,7 @@ private Q_SLOTS: void propertyChanged(int id, int objectId, const QMetaProperty &property, const QVariant &value); private: + void prepareDeferredObjects(QObject *); void buildObjectList(QDataStream &, QDeclarativeContext *); void buildObjectDump(QDataStream &, QObject *, bool, bool); QDeclarativeObjectData objectData(QObject *); -- cgit v0.12 From 891d0c143b33c6e2e16af322652e4d7bccca2292 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 10 Dec 2010 14:57:03 +0100 Subject: Doc: Added a note about the Public Suffix List. Added at the request of Peter Hartmann and Legal. --- doc/src/legal/3rdparty.qdoc | 81 ++++++++++++++++++++++++++++----------------- 1 file changed, 51 insertions(+), 30 deletions(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 8b3d5f2..9cc83a6 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -683,36 +683,57 @@ THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + \hr - jquery 1.4.2.js Copyright 2010 John Resig - This software is dual licensed under the MIT or GPL version 2 licenses. - Nokia has used the software herein under the MIT license. - - jquery includes Sizzle.js Copyright 2010 The Dojo Foundaton and is - licensed under the MIT, BSD and GPL licenses. Nokia has used this - software herein under the MIT license. - - The MIT License - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - - + jquery 1.4.2.js Copyright 2010 John Resig + This software is dual licensed under the MIT or GPL version 2 licenses. + Nokia has used the software herein under the MIT license. + + jquery includes Sizzle.js Copyright 2010 The Dojo Foundaton and is + licensed under the MIT, BSD and GPL licenses. Nokia has used this + software herein under the MIT license. + + The MIT License + + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + + + \section1 The Public Suffix List + + \e{The Public Suffix List is an initiative of the Mozilla Project, but is + maintained as a community resource. It is available for use in any + software, but was originally created to meet the needs of browser + manufacturers. It allows browsers to, for example:} + \list + \o \e{Avoid privacy-damaging "supercookies" being set for high-level + domain name suffixes} + \o \e{Highlight the most important part of a domain name in the user + interface} + \o \e{Accurately sort history entries by site} + \endlist + -- quoted from \l{publicsuffix.org}. + + The public suffix list is used inside Qt to avoid such "supercookies" + mentioned above being set in the cookie jar supported by Qt (by the + QNetworkCookieJar class). + + See \c src/network/access/qnetworkcookiejartlds_p.h.INFO for more + information about how the list is used. */ -- cgit v0.12 From 3006bdd1eab665d3a0e666975246d2fb20b578af Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Mon, 13 Dec 2010 09:34:04 +1000 Subject: Adding documentation for borderImage Documentation describing the read-only behaviour of property sourceSize Task-number: QTBUG-15703 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeborderimage.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp index d9ba2bd..63b2b9a 100644 --- a/src/declarative/graphicsitems/qdeclarativeborderimage.cpp +++ b/src/declarative/graphicsitems/qdeclarativeborderimage.cpp @@ -236,6 +236,16 @@ QDeclarativeBorderImage::~QDeclarativeBorderImage() \sa QDeclarativeImageProvider */ + +/*! + \qmlproperty QSize BorderImage::sourceSize + + This property holds the actual width and height of the loaded image. + + In BorderImage, this property is read-only. + + \sa Image::sourceSize +*/ void QDeclarativeBorderImage::setSource(const QUrl &url) { Q_D(QDeclarativeBorderImage); -- cgit v0.12 From 409f60f0f6fd2c2bad6125d0463c812ba1b1180a Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 13 Dec 2010 15:34:23 +1000 Subject: Document TextInput property maximumLength Task-number: Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativetextinput.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 0deacf8..2fb7ace 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -361,6 +361,14 @@ void QDeclarativeTextInput::setReadOnly(bool ro) emit readOnlyChanged(ro); } +/*! + \qmlproperty int TextInput::maximumLength + The maximum permitted length of the text in the TextInput. + + If the text is too long, it is truncated at the limit. + + By default, this property contains a value of 32767. +*/ int QDeclarativeTextInput::maxLength() const { Q_D(const QDeclarativeTextInput); -- cgit v0.12 From b3666a5ac8ee295adc86d8d20f5452eaad3063aa Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 13 Dec 2010 17:05:45 +1000 Subject: Revert "Add mirroring-positioners.qml example" that was accidentally pushed This reverts commit 18b940539d0633f30ae055feedb48aeb15969814. --- .../positioners/mirroring-positioners.qml | 70 ---------------------- 1 file changed, 70 deletions(-) delete mode 100644 examples/declarative/positioners/mirroring-positioners.qml diff --git a/examples/declarative/positioners/mirroring-positioners.qml b/examples/declarative/positioners/mirroring-positioners.qml deleted file mode 100644 index 0db95dd..0000000 --- a/examples/declarative/positioners/mirroring-positioners.qml +++ /dev/null @@ -1,70 +0,0 @@ -import QtQuick 1.0 - -Rectangle { - width: column.width+10 - height: column.height+10 - property bool arabic: false - Column { - id: column - spacing: 10 - anchors.centerIn: parent - Text { - text: "Row" - anchors.horizontalCenter: parent.horizontalCenter - } - Row { - flow: arabic ? Row.RightToLeft : Row.LeftToRight - spacing: 10 - Repeater { - model: 4 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Text { - text: "Grid" - anchors.horizontalCenter: parent.horizontalCenter - } - Grid { - flow: arabic ? Grid.RightToLeft : Grid.LeftToRight - spacing: 10; columns: 4 - Repeater { - model: 11 - Loader { - property int value: index - sourceComponent: delegate - } - } - } - Rectangle { - height: 50; width: parent.width - color: mouseArea.pressed ? "black" : "gray" - Text { - text: arabic ? "RTL" : "LTR" - color: "white" - font.pixelSize: 20 - anchors.centerIn: parent - } - MouseArea { - id: mouseArea - onClicked: arabic = !arabic - anchors.fill: parent - } - } - } - Component { - id: delegate - Rectangle { - width: 50; height: 50 - color: Qt.rgba(0.8/(parent.value+1),0.8/(parent.value+1),0.8/(parent.value+1),1.0) - Text { - text: parent.parent.value+1 - color: "white" - font.pixelSize: 20 - anchors.centerIn: parent - } - } - } -} -- cgit v0.12 From 6160f8541e4d7cb66de7680b5fb439fb757c59dd Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 13 Dec 2010 10:28:42 +0200 Subject: Symbian specific input methods should use 'Text' mode as default case Currently default case is 'lower'. It makes more sense to set the default as 'Text', as it is natural default case for most text entries. Task-number: QTBUG-10311 Reviewed-by: Miikka Heikkinen --- src/gui/inputmethod/qcoefepinputcontext_s60.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp index 4a1b9b9..5e8a2e1 100644 --- a/src/gui/inputmethod/qcoefepinputcontext_s60.cpp +++ b/src/gui/inputmethod/qcoefepinputcontext_s60.cpp @@ -89,7 +89,7 @@ QCoeFepInputContext::QCoeFepInputContext(QObject *parent) m_fepState->SetFlags(EAknEditorFlagDefault); m_fepState->SetDefaultInputMode( EAknEditorTextInputMode ); m_fepState->SetPermittedInputModes( EAknEditorAllInputModes ); - m_fepState->SetDefaultCase( EAknEditorLowerCase ); + m_fepState->SetDefaultCase( EAknEditorTextCase ); m_fepState->SetPermittedCases( EAknEditorAllCaseModes ); m_fepState->SetSpecialCharacterTableResourceId(R_AVKON_SPECIAL_CHARACTER_TABLE_DIALOG); m_fepState->SetNumericKeymap( EAknEditorStandardNumberModeKeymap ); -- cgit v0.12 From 7618adbd60f0aaeac63a1ac65e733fc8962a1cd9 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Mon, 13 Dec 2010 13:26:56 +0100 Subject: QmlDebugger: setting bindings in states Reviewied-by: Kai Koehne --- src/declarative/qml/qdeclarativeenginedebug.cpp | 110 +++++++++++++++++---- src/declarative/qml/qdeclarativeenginedebug_p.h | 5 + .../qdeclarativedebug/tst_qdeclarativedebug.cpp | 101 ++++++++++++++++++- 3 files changed, 196 insertions(+), 20 deletions(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 5f338db..4d6e50c 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -52,6 +52,7 @@ #include "private/qdeclarativevaluetype_p.h" #include "private/qdeclarativevmemetaobject_p.h" #include "private/qdeclarativeexpression_p.h" +#include "private/qdeclarativepropertychanges_p.h" #include #include @@ -304,6 +305,35 @@ void QDeclarativeEngineDebugServer::buildObjectList(QDataStream &message, QDecla } } +void QDeclarativeEngineDebugServer::buildStatesList(QDeclarativeContext *ctxt, bool cleanList=false) +{ + if (cleanList) + m_allStates.clear(); + + QDeclarativeContextPrivate *ctxtPriv = QDeclarativeContextPrivate::get(ctxt); + for (int ii = 0; ii < ctxtPriv->instances.count(); ++ii) { + buildStatesList(ctxtPriv->instances.at(ii)); + } + + QDeclarativeContextData *child = QDeclarativeContextData::get(ctxt)->childContexts; + while (child) { + buildStatesList(child->asQDeclarativeContext()); + child = child->nextChild; + } +} + +void QDeclarativeEngineDebugServer::buildStatesList(QObject *obj) +{ + if (QDeclarativeState *state = dynamic_cast(obj)) { + m_allStates.append(state); + } + + QObjectList children = obj->children(); + for (int ii = 0; ii < children.count(); ++ii) { + buildStatesList(children.at(ii)); + } +} + QDeclarativeEngineDebugServer::QDeclarativeObjectData QDeclarativeEngineDebugServer::objectData(QObject *object) { @@ -382,8 +412,10 @@ void QDeclarativeEngineDebugServer::messageReceived(const QByteArray &message) QDataStream rs(&reply, QIODevice::WriteOnly); rs << QByteArray("LIST_OBJECTS_R") << queryId; - if (engine) + if (engine) { buildObjectList(rs, engine->rootContext()); + buildStatesList(engine->rootContext(), true); + } sendMessage(reply); } else if (type == "FETCH_OBJECT") { @@ -504,26 +536,66 @@ void QDeclarativeEngineDebugServer::setBinding(int objectId, { QObject *object = objectForId(objectId); QDeclarativeContext *context = qmlContext(object); + QByteArray propertyNameArray = propertyName.toUtf8(); if (object && context) { - QDeclarativeProperty property(object, propertyName, context); - if (isLiteralValue) { - property.write(expression); - } else if (hasValidSignal(object, propertyName)) { - QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); - QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); - declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber()); - } else if (property.isProperty()) { - QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); - binding->setTarget(property); - binding->setNotifyOnValueChanged(true); - QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); - if (oldBinding) - oldBinding->destroy(); - binding->update(); + if (property.isValid()) { + + bool inBaseState = true; + + foreach(QWeakPointer statePointer, m_allStates) { + if (QDeclarativeState *state = statePointer.data()) { + // here we assume that the revert list on itself defines the base state + if ( state->isStateActive() && state->containsPropertyInRevertList(object, propertyNameArray) ) { + inBaseState = false; + + QDeclarativeBinding *newBinding = 0; + if (!isLiteralValue) { + newBinding = new QDeclarativeBinding(expression.toString(), object, context); + newBinding->setTarget(property); + newBinding->setNotifyOnValueChanged(true); + } + + state->changeBindingInRevertList(object,propertyNameArray, newBinding); + + if (isLiteralValue) + state->changeValueInRevertList(object, propertyNameArray, expression); + } + } + } + + if (inBaseState) { + if (isLiteralValue) { + property.write(expression); + } else if (hasValidSignal(object, propertyName)) { + QDeclarativeExpression *declarativeExpression = new QDeclarativeExpression(context, object, expression.toString()); + QDeclarativeExpression *oldExpression = QDeclarativePropertyPrivate::setSignalExpression(property, declarativeExpression); + declarativeExpression->setSourceLocation(oldExpression->sourceFile(), oldExpression->lineNumber()); + } else if (property.isProperty()) { + QDeclarativeBinding *binding = new QDeclarativeBinding(expression.toString(), object, context); + binding->setTarget(property); + binding->setNotifyOnValueChanged(true); + QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, binding); + if (oldBinding) + oldBinding->destroy(); + binding->update(); + } else { + qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + } + } + } else { - qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + // not a valid property + if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + if (isLiteralValue) { + propertyChanges->changeValue(propertyName.toUtf8(),expression); + } else { + propertyChanges->changeExpression(propertyName.toUtf8(),expression.toString()); + } + } else { + qWarning() << "QDeclarativeEngineDebugServer::setBinding: unable to set property" << propertyName << "on object" << object; + } } } } @@ -546,6 +618,10 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr property.reset(); } } + } else { + if (QDeclarativePropertyChanges *propertyChanges = dynamic_cast(object)) { + propertyChanges->removeProperty(propertyName.toUtf8()); + } } } } diff --git a/src/declarative/qml/qdeclarativeenginedebug_p.h b/src/declarative/qml/qdeclarativeenginedebug_p.h index dc8bc85..65eb1ff 100644 --- a/src/declarative/qml/qdeclarativeenginedebug_p.h +++ b/src/declarative/qml/qdeclarativeenginedebug_p.h @@ -57,6 +57,7 @@ #include #include +#include QT_BEGIN_NAMESPACE @@ -64,6 +65,7 @@ class QDeclarativeEngine; class QDeclarativeContext; class QDeclarativeWatcher; class QDataStream; +class QDeclarativeState; class QDeclarativeEngineDebugServer : public QDeclarativeDebugService { @@ -108,6 +110,8 @@ private: void prepareDeferredObjects(QObject *); void buildObjectList(QDataStream &, QDeclarativeContext *); void buildObjectDump(QDataStream &, QObject *, bool, bool); + void buildStatesList(QDeclarativeContext *, bool); + void buildStatesList(QObject *obj); QDeclarativeObjectData objectData(QObject *); QDeclarativeObjectProperty propertyData(QObject *, int); QVariant valueContents(const QVariant &defaultValue) const; @@ -117,6 +121,7 @@ private: QList m_engines; QDeclarativeWatcher *m_watch; + QList > m_allStates; }; Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator<<(QDataStream &, const QDeclarativeEngineDebugServer::QDeclarativeObjectData &); Q_DECLARATIVE_PRIVATE_EXPORT QDataStream &operator>>(QDataStream &, QDeclarativeEngineDebugServer::QDeclarativeObjectData &); diff --git a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp index 20a3fa6..fac32d7 100644 --- a/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp +++ b/tests/auto/declarative/qdeclarativedebug/tst_qdeclarativedebug.cpp @@ -72,7 +72,7 @@ class tst_QDeclarativeDebug : public QObject Q_OBJECT private: - QDeclarativeDebugObjectReference findRootObject(int context = 0); + QDeclarativeDebugObjectReference findRootObject(int context = 0, bool recursive = false); QDeclarativeDebugPropertyReference findProperty(const QList &props, const QString &name) const; void waitForQuery(QDeclarativeDebugQuery *query); @@ -115,9 +115,10 @@ private slots: void setMethodBody(); void queryObjectTree(); + void setBindingInStates(); }; -QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context) +QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int context, bool recursive) { QDeclarativeDebugEnginesQuery *q_engines = m_dbg->queryAvailableEngines(this); waitForQuery(q_engines); @@ -129,7 +130,9 @@ QDeclarativeDebugObjectReference tst_QDeclarativeDebug::findRootObject(int conte if (q_context->rootContext().objects().count() == 0) return QDeclarativeDebugObjectReference(); - QDeclarativeDebugObjectQuery *q_obj = m_dbg->queryObject(q_context->rootContext().objects()[context], this); + QDeclarativeDebugObjectQuery *q_obj = recursive ? + m_dbg->queryObjectRecursive(q_context->rootContext().objects()[context], this) : + m_dbg->queryObject(q_context->rootContext().objects()[context], this); waitForQuery(q_obj); QDeclarativeDebugObjectReference result = q_obj->object(); @@ -926,6 +929,98 @@ void tst_QDeclarativeDebug::tst_QDeclarativeDebugPropertyReference() compareProperties(r, ref); } +void tst_QDeclarativeDebug::setBindingInStates() +{ + // Check if changing bindings of propertychanges works + + const int sourceIndex = 3; + + QDeclarativeDebugObjectReference obj = findRootObject(sourceIndex); + + QVERIFY(obj.debugId() != -1); + QVERIFY(obj.children().count() >= 2); + + // We are going to switch state a couple of times, we need to get rid of the transition before + QDeclarativeDebugExpressionQuery *q_deleteTransition = m_dbg->queryExpressionResult(obj.debugId(),QString("transitions = []"),this); + waitForQuery(q_deleteTransition); + delete q_deleteTransition; + + + // check initial value of the property that is changing + QDeclarativeDebugExpressionQuery *q_setState; + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),200); + + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"\""),this); + waitForQuery(q_setState); + delete q_setState; + + + obj = findRootObject(sourceIndex, true); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),100); + + + // change the binding + QDeclarativeDebugObjectReference state = obj.children()[0]; + QCOMPARE(state.className(), QString("State")); + QVERIFY(state.children().count() > 0); + + QDeclarativeDebugObjectReference propertyChange = state.children()[0]; + QVERIFY(propertyChange.debugId() != -1); + + QVERIFY( m_dbg->setBindingForObject(propertyChange.debugId(), "width",QVariant(300),true) ); + + // check properties changed in state + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),100); + + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),300); + + // check changing properties of base state from within a state + QVERIFY(m_dbg->setBindingForObject(obj.debugId(),"width","height*2",false)); + QVERIFY(m_dbg->setBindingForObject(obj.debugId(),"height","200",true)); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(),300); + + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 400); + + // reset binding while in a state + q_setState = m_dbg->queryExpressionResult(obj.debugId(),QString("state=\"state1\""),this); + waitForQuery(q_setState); + delete q_setState; + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300); + + m_dbg->resetBindingForObject(propertyChange.debugId(), "width"); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 400); + + // re-add binding + m_dbg->setBindingForObject(propertyChange.debugId(), "width", "300", true); + + obj = findRootObject(sourceIndex); + QCOMPARE(findProperty(obj.properties(),"width").value().toInt(), 300); +} + void tst_QDeclarativeDebug::queryObjectTree() { const int sourceIndex = 3; -- cgit v0.12 From 0af1f5508e165f3b494ab236cb1cdf1b0edcffa5 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 13 Dec 2010 11:29:22 +0100 Subject: Fixes text jitter in QtQuick components when using the virtual keyboard QGraphicsView::mapFromScene() returns a QRect instead of a QRectF. Thus, we were prematurely rounding the micro focus rectangle coordinates in QGraphicsView::inputMethodQuery(). (The Qt::ImMicroFocus query returns a QRectF from QGraphicsScene, which is the result of querying QDeclarativeTextEdit and mapping it to the scene.) Auto-test included. Reviewed-by: leo Reviewed-by: bnilsen Task-number: QTCOMPONENTS-288 Task-number: QTBUG-16063 --- src/gui/graphicsview/qgraphicsview.cpp | 2 +- tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 39 ++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp index a566c8e..2acea8a 100644 --- a/src/gui/graphicsview/qgraphicsview.cpp +++ b/src/gui/graphicsview/qgraphicsview.cpp @@ -2494,7 +2494,7 @@ QVariant QGraphicsView::inputMethodQuery(Qt::InputMethodQuery query) const QVariant value = d->scene->inputMethodQuery(query); if (value.type() == QVariant::RectF) - value = mapFromScene(value.toRectF()).boundingRect(); + value = d->mapRectFromScene(value.toRectF()); else if (value.type() == QVariant::PointF) value = mapFromScene(value.toPointF()); else if (value.type() == QVariant::Rect) diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index 0a9633f..e1fbaee 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -246,6 +246,7 @@ private slots: void QTBUG_4151_clipAndIgnore(); void QTBUG_5859_exposedRect(); void QTBUG_7438_cursor(); + void QTBUG_16063_microFocusRect(); public slots: void dummySlot() {} @@ -4450,5 +4451,43 @@ void tst_QGraphicsView::QTBUG_7438_cursor() #endif } +class IMItem : public QGraphicsRectItem +{ +public: + IMItem(QGraphicsItem *parent = 0): + QGraphicsRectItem(mf.adjusted(-5, -5, 5, 5), parent) + { + setFlag(QGraphicsItem::ItemIsFocusable, true); + setFlag(QGraphicsItem::ItemAcceptsInputMethod, true); + } + + QVariant inputMethodQuery(Qt::InputMethodQuery query) const + { + return mf; + } + + static QRectF mf; +}; + +QRectF IMItem::mf(1.5, 1.6, 10, 10); + +void tst_QGraphicsView::QTBUG_16063_microFocusRect() +{ + QGraphicsScene scene; + IMItem *item = new IMItem(); + scene.addItem(item); + + QGraphicsView view(&scene); + + view.setFixedSize(40, 40); + view.show(); + QTest::qWaitForWindowShown(&view); + + scene.setFocusItem(item); + view.setFocus(); + QRectF mfv = view.inputMethodQuery(Qt::ImMicroFocus).toRectF(); + QCOMPARE(mfv, QRectF(13.5, 13.6, 10, 10)); +} + QTEST_MAIN(tst_QGraphicsView) #include "tst_qgraphicsview.moc" -- cgit v0.12 From 177d6865c65719c7c6ffdb6c8fd1e7c3e049e1e1 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 13 Dec 2010 16:03:20 +0100 Subject: Added \ingroup for the overview pages and \group page. --- doc/src/declarative/anchor-layout.qdoc | 5 +- doc/src/declarative/animation.qdoc | 34 ++++---- doc/src/declarative/basictypes.qdoc | 18 ++-- doc/src/declarative/declarativeui.qdoc | 124 ++++++++++++++-------------- doc/src/declarative/dynamicobjects.qdoc | 24 +++--- doc/src/declarative/extending.qdoc | 25 +++--- doc/src/declarative/focus.qdoc | 2 + doc/src/declarative/integrating.qdoc | 11 +-- doc/src/declarative/network.qdoc | 3 +- doc/src/declarative/positioners.qdoc | 5 ++ doc/src/declarative/propertybinding.qdoc | 30 ++++--- doc/src/declarative/qdeclarativei18n.qdoc | 1 + doc/src/declarative/qdeclarativemodels.qdoc | 44 +++++----- doc/src/declarative/qdeclarativestates.qdoc | 42 +++++----- doc/src/declarative/qtbinding.qdoc | 1 + doc/src/overviews.qdoc | 28 ++++++- 16 files changed, 229 insertions(+), 168 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index b77ce36..2435e4e 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -28,13 +28,16 @@ /*! \page qml-anchor-layout.html \target anchor-layout +\contentspage QML Features +\previouspage Using QML Positioner and Repeater Items +\nextpage Using QML Positioner and Repeater Items \title Anchor-based Layout in QML In addition to the more traditional \l Grid, \l Row, and \l Column, QML also provides a way to layout items using the concept of \e anchors. Each item can be thought of as having a set of 7 invisible "anchor lines": \l {Item::anchors.left}{left}, \l {Item::anchors.horizontalCenter}{horizontalCenter}, -\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top}, +\l {Item::anchors.right}{right}, \l {Item::anchors.top}{top}, \l {Item::anchors.verticalCenter}{verticalCenter}, \l {Item::anchors.baseline}{baseline}, and \l {Item::anchors.bottom}{bottom}. diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 208a1c4..708f412 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -27,6 +27,8 @@ /*! \page qdeclarativeanimation.html +\ingroup qml-features +\contentspage QML Features \title QML Animation @@ -80,7 +82,7 @@ States}{state changes} These methods are demonstrated below. Notice these examples use PropertyAnimation, which is one of several QML elements that can be used to -create an animation. See the \l {Animation Elements} section further below for +create an animation. See the \l {Animation Elements} section further below for details. @@ -92,7 +94,7 @@ source} using the \e Animation \bold on \e Property syntax. Here is a \l Rectangle whose movement is animated using this method: \snippet doc/src/snippets/declarative/animation-propertyvaluesource.qml 0 - + This applies a PropertyAnimation to the \l Rectangle's \c x and \c y properties to animate from their current values (i.e. zero) to 50, over 1000 milliseconds. The animation starts as soon as the \l Rectangle is loaded. To animate from @@ -141,7 +143,7 @@ demonstration of behavioral animations. An animation can be created within a signal handler to be triggered when the signal is received. For example: - + \snippet doc/src/snippets/declarative/animation-signalhandler.qml 0 The PropertyAnimation is triggered when the MouseArea is clicked, animating the @@ -156,8 +158,8 @@ The \l {PropertyAnimation::}{to} property is also required to specify the new \section2 Standalone Animations Animations can also be created as ordinary QML objects that are not bound to -any particular objects and properties. Here is an example, using a -PropertyAnimation object. The animation is explicitly started when the +any particular objects and properties. Here is an example, using a +PropertyAnimation object. The animation is explicitly started when the \l Rectangle is clicked: \snippet doc/src/snippets/declarative/animation-standalone.qml 0 @@ -187,10 +189,10 @@ object and add it to an item's \l {Item::}{transitions} property. An example: The PropertyChanges object in the \e moved state defines that when the \l Rectangle is in this state, its position should be changed -to (50, 50). When the \l Rectangle changes to the \e moved state, the +to (50, 50). When the \l Rectangle changes to the \e moved state, the \l Transition will be triggered, and the transition's \l PropertyAnimation will animate the changes in the \c x and \c y properties to their new values. -The animation will not be applied at any time other than during the state +The animation will not be applied at any time other than during the state change. Notice the example does not set any \l {PropertyAnimation::}{from} and \l @@ -231,13 +233,13 @@ It can also define the number of \l {Animation::}{loops} for an animation. PropertyAnimation is the most basic animation element for animating a property. It can be used to animate \c real, \c int, \c color, \c rect, \c point, \c size, and \c vector3d properties. It is inherited by NumberAnimation, ColorAnimation, -RotationAnimation and Vector3dAnimation: NumberAnimation provides a more -efficient implementation for animating \c real and \c int properties, and -Vector3dAnimation does the same for \c vector3d properties. ColorAnimation -and RotationAnimation provide more specific attributes for animating color -and rotation changes. +RotationAnimation and Vector3dAnimation: NumberAnimation provides a more +efficient implementation for animating \c real and \c int properties, and +Vector3dAnimation does the same for \c vector3d properties. ColorAnimation +and RotationAnimation provide more specific attributes for animating color +and rotation changes. -A ColorAnimation allows color values for the \l {ColorAnimation::}{from} +A ColorAnimation allows color values for the \l {ColorAnimation::}{from} and \l {ColorAnimation::}{to} properties. The following animates the rectangle's \l {Rectangle::}{color} property: @@ -251,10 +253,10 @@ animates the rectangle's \l {Item::rotation} property: In addition, the following specialized animation elements are available: \list -\o SmoothedAnimation: a specialized NumberAnimation that provides smooth +\o SmoothedAnimation: a specialized NumberAnimation that provides smooth changes in animation when the target value changes -\o SpringAnimation: provides a spring-like animation with specialized -attributes such as \l {SpringAnimation::}{mass}, +\o SpringAnimation: provides a spring-like animation with specialized +attributes such as \l {SpringAnimation::}{mass}, \l{SpringAnimation::}{damping} and \l{SpringAnimation::}{epsilon} \o ParentAnimation: used for animating a parent change (see ParentChange) \o AnchorAnimation: used for animating an anchor change (see AnchorChanges) diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 034b7d1..0277ccb 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -27,12 +27,14 @@ /*! \page qdeclarativebasictypes.html + \ingroup qml-features + \contentspage QML Features \title QML Basic Types QML has a set of primitive types, as listed below, that are used throughout the \l {QML Elements}. - Some of these types can also be used for defining + Some of these types can also be used for defining \c property values in QML. See \l{Writing QML Components: Properties, Methods and Signals} for the list of types that can be used for \c property values. @@ -43,7 +45,7 @@ \qmlbasictype int \ingroup qmlbasictypes - \brief An integer is a whole number, e.g. 0, 10, or -20. + \brief An integer is a whole number, e.g. 0, 10, or -20. An integer is a whole number, e.g. 0, 10, or -20. The possible \c int values range from around -2000000000 to around 2000000000, @@ -117,7 +119,7 @@ \qmlbasictype url \ingroup qmlbasictypes - \brief A URL is a resource locator, like a file name. + \brief A URL is a resource locator, like a file name. A URL is a resource locator, like a file name. It can be either absolute, e.g. "http://qt.nokia.com", or relative, e.g. @@ -198,7 +200,7 @@ /*! \qmlbasictype size \ingroup qmlbasictypes - + \brief A size type has width and height attributes A \c size type has \c width and \c height attributes. @@ -237,7 +239,7 @@ For example, to read the \l {Item::childrenRect.x}{Item::childrenRect} \c rect property: \qml - Rectangle { + Rectangle { width: childrenRect.width height: childrenRect.height @@ -273,7 +275,7 @@ MyDatePicker { minDate: "2000-01-01"; maxDate: "2020-12-31" } \endqml - To read a date value returned from a C++ extension class, use + To read a date value returned from a C++ extension class, use \l{QML:Qt::formatDate()}{Qt.formatDate()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}. \sa {QML Basic Types} @@ -292,7 +294,7 @@ MyTimePicker { time: "14:22:15" } \endqml - To read a time value returned from a C++ extension class, use + To read a time value returned from a C++ extension class, use \l{QML:Qt::formatTime()}{Qt.formatTime()} and \l{QML:Qt::formatDateTime()}{Qt.formatDateTime()}. \sa {QML Basic Types} @@ -493,7 +495,7 @@ \qml Text { horizontalAlignment: "AlignRight" } \endqml - + or as \c {.}: \qml Text { horizontalAlignment: Text.AlignRight } diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 41b9952..b17d178 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -31,12 +31,12 @@ \ingroup qt-gui-concepts \brief Qt Quick provides a declarative framework for building highly -dynamic, custom user interfaces. +dynamic user interfaces. \section1 Introduction Qt Quick is a collection of technologies that are designed to help -developers create the kind of intuitive, modern-looking, fluid user +developers create the kind of intuitive, modern, fluid user interfaces that are increasingly used on mobile phones, media players, set-top boxes and other portable devices. @@ -45,7 +45,7 @@ language for describing user interfaces and a language runtime. A collection of C++ APIs is used to integrate these high level features with classic Qt applications. -\section2 QML, Elements and the Qt Declarative Module +\section2 QML User interfaces and their behavior are described using QML, an extension to \l{About JavaScript}{JavaScript} that lets developers and designers @@ -55,64 +55,62 @@ graphical and behavioral building blocks that can be combined together in \l{QML Documents}{QML documents} to build components ranging in complexity from simple buttons and sliders, to complete Internet-enabled applications. -QML improves the integration between JavaScript and Qt's existing -QObject-based type system, adds support for automatic -\l{Property Binding}{property bindings} and provides -\l{Network Transparency}{network transparency} at the language level. +\section2 Qt Declarative Module -The Qt Declarative module implements the interface between the QML language -and the elements available to it. It also provides a C++ API that can be -used to load and interact with QML files from within Qt applications. +The Qt Declarative module provides a C++ API that is for interacting with QML files from within Qt applications. The module allows the programmer to build applications' backend logic using Qt. -Qt Quick builds on \l{QML for Qt programmers}{Qt's existing strengths}. -QML can be be used to incrementally extend an existing application or -to build completely new applications. QML is fully -\l{Extending QML in C++}{extensible from C++} through the Qt Declarative -Module. +QML and the Qt Declarative Module separate the frontend UI logic from the backend logic. \section1 Getting Started \list -\o \l{What's new in Qt Quick} -\o \l{Introduction to the QML language} -\o \l{QML for Qt Programmers} +\o \l{Intro to Qt Quick}{Introduction to Qt Quick} +\o \l{Introduction to the QML language}{Introduction to the QML Language} +\o \l{QML for Qt Programmers}{QML Programming for Qt Programmers} \o \l{Getting Started Programming with QML} -\o \l{Intro to Qt Quick} +\o \l{What's new in Qt Quick}{What's New in the Qt Quick Release} \endlist -\list -\o \l{QML Tutorial}{Tutorial: "Hello World"} -\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"} -\o \l{QML Examples and Demos} -\endlist - -\section1 QML Concepts +\section1 QML Features \list -\o \l{QML Documents} \o \l{Property Binding} -\o \l{Anchor-based Layout in QML} -\o \l{Writing QML Components: Properties, Methods and Signals} -\o \l{QML Scope} -\o \l{QML Modules} +\o \l{Using QML Positioner and Repeater Items}{Component Layouts} +\o \l{Anchor-based Layout in QML}{Anchor Layout} +\o \l{Writing QML Components: Properties, Methods and Signals}{Reusable Components} +\o \l{Text Handling} +\o \l{Keyboard Focus in QML}{Keyboard Focus} +\o \l{Mouse Events} +\o \l{QML States} {States} +\o \l{QML Animation}{Animation and Transitions} +\o \l{QML Basic Types}{QML Basic Data Types} +\o \l{QML Data Models}{Structuring Data with Models} +\o \l{Presenting Data with QML}{Presenting Data with Views} +\o \l{Affine Transformations} +\o \l{Dynamic Object Management in QML}{Dynamic Object Management} +\o \l{Network Transparency}{Resource Loading} +\o \l{Extending QML in C++}{Extending QML Functionalities using C++} +\o \l{Using QML in C++ Applications} +\o \l{Integrating QML with existing Qt UI code}{Integrating QML Code with Existing Qt UI Code} +\o \l{Signals and Slots Event System} +\o \l{QML Internationalization}{Internationalization} +\o \l{Graphical Effects} \endlist -\section1 User Interaction +\section1 QML Add-Ons \list -\o \l{Keyboard Focus in QML} -\o \l{QML States} -\o \l{QML Animation} +\o \l{Qt WebKit} +\o \l{Mobility QML bindings} \endlist -\section1 Handling Data +\section1 Qt Quick Tools \list -\o \l{QML Basic Types}{QML Basic Data Types} -\o \l{Using QML Positioner and Repeater Items} -\o \l{QML Data Models} -\o \l{Presenting Data with QML} -\o \l{Network Transparency} +\o \l{Debugging QML} +\o \l{QML Viewer} +\o \l{QML Performance} +\o \l{Developing Qt Quick Applications}{Developing with Qt Creator} \endlist \section1 Architecture @@ -120,39 +118,45 @@ Module. \list \o \l{Qt Declarative UI Runtime} \o \l{Integrating JavaScript} -\o \l{Dynamic Object Management in QML} -\endlist - -\section1 Using QML with C++ - -\list -\o \l{Qt Declarative UI Runtime} -\o \l{Using QML in C++ Applications} -\o \l{Integrating QML with existing Qt UI code} -\o \l{Tutorial: Writing QML extensions with C++} -\o \l{Extending QML in C++} +\o \l{QML Scope} +\o \l{QML Modules} +\o \l{QML Documents} +\o \l{QML Global Object} +\o \l{QML Security} +\o \l{Qt Declarative Module} \endlist \section1 Reference \list \o \l{QML Elements} -\o \l{QML Basic Types} -\o \l{QML Global Object} -\o \l{QML Internationalization} -\o \l{QML Security} \o \l{Qt Declarative Module} -\o \l{Debugging QML} -\o \l{QML Viewer} -\o \l{QML Performance} +\o \l{QML Basic Types}{QML Data Types} \o \l{QML Coding Conventions} +\o \l{Qt Creator Manual} +\o \l{Programming with Qt} +\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility Documentation} \endlist -\section1 Online Examples +\section1 Examples \list +\o \l{QML Tutorial}{"Hello World" Tutorial} +\o \l{Getting Started Programming with QML} +\o \l{QML Advanced Tutorial}{Tutorial: "Same Game"} +\o \l{Tutorial: Writing QML extensions with C++} +\o \l{QML Examples and Demos} + \o Forum Nokia: \l{http://wiki.forum.nokia.com/index.php/Qt_Quick_examples_for_porting}{Qt Quick examples for porting} \endlist + +\section1 Best Practices + +\list +\o \l{QML Best Practices: Data Types}{Using Data Types in QML} +\o \l{QML Best Practices: Coding Conventions}{Coding Tips} +\o \l{Geir's screen size document} +\endlist */ diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index fcc9fd4..1e43166 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -27,11 +27,13 @@ /*! \page qdeclarativedynamicobjects.html +\ingroup qml-features +\contentspage {QML Features} \title Dynamic Object Management in QML -QML provides a number of ways to dynamically create and manage QML objects. +QML provides a number of ways to dynamically create and manage QML objects. The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements -all support dynamic object management. Objects can also be created and managed +all support dynamic object management. Objects can also be created and managed from C++, and this is the preferred method for hybrid QML/C++ applications (see \l{Using QML in C++ Applications}). @@ -45,20 +47,20 @@ of the concepts discussed on this page. \section1 Creating Objects Dynamically -There are two ways to create objects dynamically from JavaScript. You can either call +There are two ways to create objects dynamically from JavaScript. You can either call \l {QML:Qt::createComponent()}{Qt.createComponent()} to dynamically create a \l Component object, or use \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} to create an item from a string of QML. -Creating a component is better if you have an existing component defined in a \c .qml +Creating a component is better if you have an existing component defined in a \c .qml file, and you want to dynamically create instances of that component. Otherwise, -creating an item from a string of QML is useful when the item QML itself is generated +creating an item from a string of QML is useful when the item QML itself is generated at runtime. \section2 Creating a Component dynamically -To dynamically load a component defined in a QML file, call the -\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}. +To dynamically load a component defined in a QML file, call the +\l {QML:Qt::createComponent()}{Qt.createComponent()} function on the \l{QML Global Object}. This function takes the URL of the QML file as its only argument and creates a \l Component object from this URL. @@ -88,14 +90,14 @@ in case the QML file is loaded over a network and thus is not ready immediately. \codeline \snippet doc/src/snippets/declarative/componentCreation.js finishCreation -If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation() +If you are certain the QML file to be loaded is a local file, you could omit the \c finishCreation() function and call \l {Component::createObject()}{createObject()} immediately: \snippet doc/src/snippets/declarative/componentCreation.js func \snippet doc/src/snippets/declarative/componentCreation.js local \snippet doc/src/snippets/declarative/componentCreation.js func-end -Notice in both instances, \l {Component::createObject()}{createObject()} is called with +Notice in both instances, \l {Component::createObject()}{createObject()} is called with \c appWindow passed as an argument so that the created object will become a child of the \c appWindow item in \c main.qml. Otherwise, the new item will not appear in the scene. @@ -156,7 +158,7 @@ items that you did not dynamically create yourself. Items can be deleted using the \c destroy() method. This method has an optional argument (which defaults to 0) that specifies the approximate delay in milliseconds -before the object is to be destroyed. +before the object is to be destroyed. Here is an example. The \c application.qml creates five instances of the \c SelfDestroyingRect.qml component. Each instance runs a NumberAnimation, and when the animation has finished, calls @@ -188,7 +190,7 @@ Item { } \endqml -This would result in an error, since items can only be dynamically +This would result in an error, since items can only be dynamically destroyed if they were dynamically created. Objects created with \l{QML:Qt::createQmlObject()}{Qt.createQmlObject()} diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index e23ca91..e61447a 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -27,6 +27,8 @@ /*! \page qml-extending.html +\ingroup qml-features +\contentspage QML Features \title Extending QML in C++ The QML syntax declaratively describes how to construct an in-memory object @@ -360,28 +362,28 @@ pointers to invalid objects. QML makes the following guarentees: \list \o An object assigned to a QObject (or QObject-derived) pointer property will be -valid at the time of assignment. +valid at the time of assignment. -Following assignment, it is the responsibility of the class to subsequently guard +Following assignment, it is the responsibility of the class to subsequently guard this pointer, either through a class specific method or the generic QPointer class. -\o An object assigned to a QVariant will be valid at the time of assignment. +\o An object assigned to a QVariant will be valid at the time of assignment. -When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar -typed QVariant. It is the responsibility of the class to guard the pointer. A -general rule when writing a class that uses QVariant properties is to check the -type of the QVariant when it is set and if the type is not handled by your class, +When assigning an object to a QVariant property, QML will always use a QMetaType::QObjectStar +typed QVariant. It is the responsibility of the class to guard the pointer. A +general rule when writing a class that uses QVariant properties is to check the +type of the QVariant when it is set and if the type is not handled by your class, reset it to an invalid variant. -\o An object assigned to a QObject (or QObject-derived) list property will be -valid at the time of assignment. +\o An object assigned to a QObject (or QObject-derived) list property will be +valid at the time of assignment. -Following assignment, it is the responsibility of the class to subsequently guard +Following assignment, it is the responsibility of the class to subsequently guard this pointer, either through a class specific method or the generic QPointer class. \endlist Elements should assume that any QML assigned object can be deleted at any time, and -respond accordingly. If documented as such an element need not continue to work in +respond accordingly. If documented as such an element need not continue to work in this situation, but it must not crash. \section1 Signal Support @@ -637,6 +639,7 @@ public: /*! \page qml-extending-types.html +\ingroup qml-features \title Writing QML Components: Properties, Methods and Signals One of the key concepts in QML is the ability to define your own QML components that suit diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index ae72c3c..3da60f1 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -28,6 +28,8 @@ /*! \target qmlfocus \page qdeclarativefocus.html +\ingroup qml-features +\contentspage QML Features \title Keyboard Focus in QML When a key is pressed or released, a key event is generated and delivered to the diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc index 7028585..23235d7 100644 --- a/doc/src/declarative/integrating.qdoc +++ b/doc/src/declarative/integrating.qdoc @@ -27,6 +27,7 @@ /*! \page qml-integration.html +\ingroup qml-features \title Integrating QML with existing Qt UI code There are a number of ways to integrate QML into QWidget-based UI applications, @@ -37,8 +38,8 @@ depending on the characteristics of your existing UI code. If you have an existing QWidget-based UI, QML widgets can be integrated into it using QDeclarativeView. QDeclarativeView is a subclass of QWidget so you -can add it to your user interface like any other QWidget. Use -QDeclarativeView::setSource() to load a QML file into the view, then add the +can add it to your user interface like any other QWidget. Use +QDeclarativeView::setSource() to load a QML file into the view, then add the view to your UI: \code @@ -52,7 +53,7 @@ layout->addWidget(qmlView); The one drawback to this approach is that QDeclarativeView is slower to initialize and uses more memory than a QWidget, and creating large numbers of QDeclarativeView -objects may lead to performance degradation. If this is the case, it may be +objects may lead to performance degradation. If this is the case, it may be better to rewrite your widgets in QML, and load the widgets from a main QML widget instead of using QDeclarativeView. @@ -70,7 +71,7 @@ of simple and dynamic elements. If you have an existing UI based on the \l{Graphics View Framework}, you can integrate QML widgets directly into your QGraphicsScene. Use QDeclarativeComponent to create a QGraphicsObject from a QML file, and -place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or +place the graphics object into your scene using \l{QGraphicsScene::addItem()}, or reparent it to an item already in the \l{QGraphicsScene}. For example: @@ -95,7 +96,7 @@ of QML UIs: \section2 Loading QGraphicsWidget objects in QML -An alternative approach is to expose your existing QGraphicsWidget objects to +An alternative approach is to expose your existing QGraphicsWidget objects to QML and construct your scene in QML instead. See the \l {declarative-cppextensions-qgraphicslayouts.html}{graphics layouts example} which shows how to expose Qt's graphics layout classes to QML in order to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout. diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index a19ca6b..4354f9d 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -27,6 +27,7 @@ /*! \page qdeclarativenetwork.html +\ingroup qml-features \title Network Transparency QML supports network transparency by using URLs (rather than file names) for all @@ -57,7 +58,7 @@ Network transparency is supported throughout QML, for example: Even QML types themselves can be on the network - if the \l {QML Viewer} is used to load \tt http://example.com/mystuff/Hello.qml and that content refers to a type "World", the engine will load \tt http://example.com/mystuff/qmldir and resolve the type just as it would for a local file. -For example if the qmldir file contains the line "World World.qml", it will load +For example if the qmldir file contains the line "World World.qml", it will load \tt http://example.com/mystuff/World.qml Any other resources that \tt Hello.qml referred to, usually by a relative URL, would similarly be loaded from the network. diff --git a/doc/src/declarative/positioners.qdoc b/doc/src/declarative/positioners.qdoc index 9265732..7faac03 100644 --- a/doc/src/declarative/positioners.qdoc +++ b/doc/src/declarative/positioners.qdoc @@ -27,8 +27,13 @@ /*! \page qml-positioners.html +\ingroup qml-features +\previouspage Property Binding +\nextpage Anchor-based Layout in QML +\contentspage QML Features \title Using QML Positioner and Repeater Items + \section1 Introduction Positioner items are container items that manage the positions and sizes of diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 3bf85de..92cf874 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -27,15 +27,21 @@ /*! \page propertybinding.html +\ingroup qml-features +\contentspage QML Features +\previouspage QML Features +\nextpage Using QML Positioner and Repeater Items \title Property Binding + +\section1 Introduction Property binding is a declarative way of specifying the value of a property. Binding allows a property's value to be expressed as an JavaScript expression that defines the value relative -to other property values or data accessible in the application. The property value is +to other property values or data accessible in the application. The property value is automatically kept up to date if the other properties or data values change. -Property bindings are created implicitly in QML whenever a property is assigned an JavaScript -expression. The following QML uses two property bindings to connect the size of the rectangle +Property bindings are created implicitly in QML whenever a property is assigned a JavaScript +expression. The following QML code uses two property bindings to connect the size of the rectangle to that of \c otherItem. \code @@ -45,9 +51,9 @@ Rectangle { } \endcode -QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be +QML extends a standards compliant JavaScript engine, so any valid JavaScript expression can be used as a property binding. Bindings can access object properties, make function calls and even -use builtin JavaScript objects like \e {Date} and \e {Math}. Assigning a constant value to a +use built-in JavaScript objects like \c {Date} and \c {Math}. Assigning a constant value to a property can even be thought of as a binding - after all, a constant is a valid JavaScript expression! Here are some examples of more complex bindings: @@ -71,10 +77,10 @@ function. \section1 Changing Bindings -The \l PropertyChanges element can be used within a state change to modify the bindings on -properties. +The \l PropertyChanges element can be used within a state change to modify the bindings on +properties. -This example modifies the \l Rectangle's width property binding to be \c {otherItem.height} +This example modifies the \l Rectangle's width property binding to be \c {otherItem.height} when in the "square" state. When it returns to its default state, width's original property binding will have been restored. @@ -97,7 +103,7 @@ Rectangle { \section1 Effects of Property Assignment in JavaScript -Assigning a property value from JavaScript does \e not create a property binding. +Assigning a property value from JavaScript does \i not create a property binding. For example: \code @@ -110,10 +116,10 @@ Rectangle { \endcode Instead of creating a property binding, this simply sets the \c width of the \l Rectangle -to the value of \c other.width at the time the JavaScript code is invoked. See +to the value of \c other.width at the time the JavaScript code is invoked. See \l {Property Assignment vs Property Binding} for more details. -Also note that assigning a value to a property that is currently bound will remove the binding. +Also note that assigning a value to a property that is currently bound will remove the previous binding. A property can only have one value at a time, and if any code explicitly sets this value, the binding is removed. The \l Rectangle in the example below will have a width of 13, regardless of the \c otherItem's width. @@ -135,7 +141,7 @@ although it is possible to set up a \l Binding object (shown below). \section1 Binding Element The implicit binding syntax shown previously is easy to use and works perfectly for most uses -of bindings. In some advanced cases, it is necessary to create bindings explicitly using the +of bindings. In some advanced cases, it is necessary to create bindings explicitly using the \l Binding element. For example, to bind a property exposed from C++ (\c system.brightness) to a value diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc index 0d5fbcc..fac1e55 100644 --- a/doc/src/declarative/qdeclarativei18n.qdoc +++ b/doc/src/declarative/qdeclarativei18n.qdoc @@ -27,6 +27,7 @@ /*! \page qdeclarativei18n.html +\ingroup qml-features \title QML Internationalization \section1 Overview diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index e11cd56..fdae0bb 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -27,10 +27,12 @@ /*! \page qdeclarativemodels.html +\ingroup qml-features +\contentspage QML Features \target qmlmodels \title QML Data Models -QML items such as ListView, GridView and \l Repeater require Data Models +QML items such as ListView, GridView and \l Repeater require Data Models that provide the data to be displayed. These items typically require a \e delegate component that creates an instance for each item in the model. Models may be static, or @@ -38,7 +40,7 @@ have items modified, inserted, removed or moved dynamically. Data is provided to the delegate via named data roles which the delegate may bind to. Here is a ListModel with two roles, \e type and \e age, -and a ListView with a delegate that binds to these roles to display their +and a ListView with a delegate that binds to these roles to display their values: \snippet doc/src/snippets/declarative/qml-data-models/listmodel-listview.qml document @@ -48,7 +50,7 @@ properties, the roles can be accessed with the qualified \e model name instead. For example, if a \l Text element had \e type or \e age properties, the text in the above example would display those property values instead of the \e type and \e age values from the model item. In this case, the properties could have been referenced as -\c model.type and \c model.age instead to ensure the delegate displays the +\c model.type and \c model.age instead to ensure the delegate displays the property values from the model item. A special \e index role containing the index of the item in the model @@ -125,10 +127,10 @@ be used to display an RSS feed. \section2 VisualItemModel -VisualItemModel allows QML items to be provided as a model. +VisualItemModel allows QML items to be provided as a model. This model contains both the data and delegate; the child items of a -VisualItemModel provide the contents of the delegate. The model +VisualItemModel provide the contents of the delegate. The model does not provide any roles. \code @@ -165,7 +167,7 @@ models. A model may be a simple QStringList, which provides the contents of the list via the \e modelData role. -Here is a ListView with a delegate that references its model item's +Here is a ListView with a delegate that references its model item's value using the \c modelData role: \snippet examples/declarative/modelviews/stringlistmodel/view.qml 0 @@ -184,7 +186,7 @@ the model by calling QDeclarativeContext::setContextProperty() again. \section2 QList -A list of QObject* values can also be used as a model. A QList provides +A list of QObject* values can also be used as a model. A QList provides the properties of the objects in the list as roles. The following application creates a \c DataObject class that with @@ -205,7 +207,7 @@ the ListView delegate: \snippet examples/declarative/modelviews/objectlistmodel/view.qml 0 -Note the use of the fully qualified access to the \c color property. +Note the use of the fully qualified access to the \c color property. The properties of the object are not replicated in the \c model object, since they are easily available via the \c modelData object. @@ -221,10 +223,10 @@ the model by calling QDeclarativeContext::setContextProperty() again. A model can be defined by subclassing QAbstractItemModel. This is the best approach if you have a more complex model that cannot be supported -by the other approaches. A QAbstractItemModel can also automatically +by the other approaches. A QAbstractItemModel can also automatically notify a QML view when the model data has changed. -The roles of a QAbstractItemModel subclass can be exposed to QML by calling +The roles of a QAbstractItemModel subclass can be exposed to QML by calling QAbstractItemModel::setRoleNames(). The default role names set by Qt are: \table @@ -244,9 +246,9 @@ that has \e type and \e size roles. It calls QAbstractItemModel::setRoleNames() role names for accessing the properties via QML: \snippet examples/declarative/modelviews/abstractitemmodel/model.h 0 -\dots +\dots \snippet examples/declarative/modelviews/abstractitemmodel/model.h 1 -\dots +\dots \snippet examples/declarative/modelviews/abstractitemmodel/model.h 2 \codeline \snippet examples/declarative/modelviews/abstractitemmodel/model.cpp 0 @@ -261,14 +263,14 @@ roles: QML views are automatically updated when the model changes. Remember the model must follow the standard rules for model changes and notify the view when -the model has changed by using QAbstractItemModel::dataChanged(), +the model has changed by using QAbstractItemModel::dataChanged(), QAbstractItemModel::beginInsertRows(), etc. See the \l {Model subclassing reference} for more information. The complete example is available in Qt's \l {declarative/modelviews/abstractitemmodel}{examples/declarative/modelviews/abstractitemmodel} directory. QAbstractItemModel presents a hierarchy of tables, but the views currently provided by QML -can only display list data. +can only display list data. In order to display child lists of a hierarchical model the VisualDataModel element provides several properties and functions for use with models of type QAbstractItemModel: @@ -283,14 +285,14 @@ with models of type QAbstractItemModel: \section2 Exposing C++ data models to QML -The above examples use QDeclarativeContext::setContextProperty() to set -model values directly in QML components. An alternative to this is to -register the C++ model class as a QML type from a QML C++ plugin using -QDeclarativeExtensionPlugin. This would allow the model classes to be +The above examples use QDeclarativeContext::setContextProperty() to set +model values directly in QML components. An alternative to this is to +register the C++ model class as a QML type from a QML C++ plugin using +QDeclarativeExtensionPlugin. This would allow the model classes to be created directly as elements within QML: \table -\row +\row \o \code @@ -299,7 +301,7 @@ class MyModelPlugin : public QDeclarativeExtensionPlugin public: void registerTypes(const char *uri) { - qmlRegisterType(uri, 1, 0, + qmlRegisterType(uri, 1, 0, "MyModel"); } } @@ -466,6 +468,8 @@ updated, and that \e{value} holds the new value. /*! \page qml-presenting-data.html +\ingroup qml-features +\contentspage QML Features \title Presenting Data with QML \section1 Introduction diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index b663d43..f378ce6 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -27,6 +27,8 @@ /*! \page qdeclarativestates.html +\ingroup qml-features +\contentspage QML Features \target qmlstates \title QML States @@ -36,9 +38,9 @@ User interfaces are designed to present different interface configurations in different scenarios, or to modify their appearances in response to user interaction. Often, there are a set of changes that are made concurrently, such that the interface could be seen to be internally changing from one \e state to -another. +another. -This applies generally to interface elements regardless of their complexity. +This applies generally to interface elements regardless of their complexity. A photo viewer may initially present images in a grid, and when an image is clicked, change to a "detailed" state where the individual image is expanded and the interface is changed to present new options for image editing. On the @@ -47,7 +49,7 @@ other end of the scale, when a simple button is pressed, it may change to a appearance. In QML, any object can change between different \e states to apply sets of -changes that modify the properties of relevant items. Each \e state could +changes that modify the properties of relevant items. Each \e state could present a different configuration that could, for example: \list @@ -83,10 +85,10 @@ within the MouseArea changes the state to the "moved" state, thus moving the \l Rectangle. \snippet doc/src/snippets/declarative/states.qml 0 - + The \l State item defines all the changes to be made in the new state. It -could specify additional properties to be changed, or create additional -PropertyChanges for other objects. It can also modify the properties of other +could specify additional properties to be changed, or create additional +PropertyChanges for other objects. It can also modify the properties of other objects, not just the object that owns the state. For example: \qml @@ -96,13 +98,13 @@ Rectangle { State { name: "moved" PropertyChanges { target: myRect; x: 50; y: 50; color: "blue" } - PropertyChanges { target: someOtherItem; width: 1000 } + PropertyChanges { target: someOtherItem; width: 1000 } } ] } \endqml -As a convenience, if an item only has one state, its \l {Item::}{states} +As a convenience, if an item only has one state, its \l {Item::}{states} property can be defined as a single \l State, without the square-brace list syntax: @@ -115,7 +117,7 @@ Item { } \endqml -A \l State is not limited to performing modifications on property values. It +A \l State is not limited to performing modifications on property values. It can also: \list @@ -125,8 +127,8 @@ can also: \o Modify anchor values using AnchorChanges \endlist -The \l {declarative/animation/states}{States and Transitions example} -demonstrates how to declare a basic set of states and apply animated +The \l {declarative/animation/states}{States and Transitions example} +demonstrates how to declare a basic set of states and apply animated transitions between them. @@ -136,15 +138,15 @@ Of course, the \l Rectangle in the example above could have simply been moved by setting its position to (50, 50) in the mouse area's \c onClicked handler. However, aside from enabling batched property changes, one of the features of QML states is the ability of an item to revert to its \e {default state}. -The default state contains all of an item's initial property values before +The default state contains all of an item's initial property values before they were modified in a state change. For example, suppose the \l Rectangle should move to (50,50) when the mouse is -pressed, and then move back to its original position when the mouse is +pressed, and then move back to its original position when the mouse is released. This can be achieved by using the \l {State::}{when} property, like this: -\qml +\qml Rectangle { ... @@ -158,7 +160,7 @@ Rectangle { ... } } -\endqml +\endqml The \l {State::}{when} property is set to an expression that evaluates to \c true when the item should be set to that state. When the mouse is pressed, @@ -169,7 +171,7 @@ Alternatively, an item can be explicitly set to its default state by setting its \l {Item::}{state} property to an empty string (""). For example, instead of using the \l {State::}{when} property, the above code could be changed to: -\qml +\qml Rectangle { ... @@ -184,10 +186,10 @@ Rectangle { ... } } -\endqml +\endqml Obviously it makes sense to use the \l {State::}{when} property when possible -as it provides a simpler (and a better, more declarative) solution than +as it provides a simpler (and a better, more declarative) solution than assigning the state from signal handlers. @@ -210,14 +212,14 @@ Rectangle { states: [ ... ] - + transitions: [ Transition { NumberAnimation { properties: "x,y"; duration: 500 } } ] } -\endqml +\endqml This \l Transition defines that if any \c x or \c y properties have changed during a state change within this item, their values should be animated over 500 diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 71f41bc..347fd94 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -27,6 +27,7 @@ /*! \page qtbinding.html +\ingroup qml-features \target qtbinding \title Using QML in C++ Applications diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index b9bd3b4..3bb7aec 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -43,7 +43,7 @@ web-enabled applications for desktop, mobile, and embedded operating systems. This page contains links to articles and overviews explaining key components and techniuqes used in Qt development. - + \generatelist {related} */ @@ -112,7 +112,7 @@ \ingroup technology-apis \ingroup best-practices \ingroup qt-basic-concepts - + These pages document Qt's API's for using SQL database systems in Qt applications. @@ -133,7 +133,7 @@ \generatelist{related} */ -/*! +/*! \group licensing \title Qt Licenses and Credits @@ -146,3 +146,25 @@ \generatelist {related} */ + +/*! + \group qml-best-practices + \title QML Best Practices Guides + + \brief QML Programming Best Practices Guides + + These documents provide guidelines and best practices for using QML and Qt + to solve specific technical problems. + + \generatelist {related} +*/ +/*! + \group qml-features + \title QML Features + + \brief Features of the QML Language + + These are overviews of the many features of the QML Language. + + \generatelist {related} +*/ -- cgit v0.12 From d108279da20ad84e0d662a905bc12e00c1011d50 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 13 Dec 2010 18:24:10 +0100 Subject: Added JavaScript Reserved Word link into resource file. Task-number: QTBUG-16071 --- doc/src/external-resources.qdoc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/src/external-resources.qdoc b/doc/src/external-resources.qdoc index 9bc3b1c..c02556f 100644 --- a/doc/src/external-resources.qdoc +++ b/doc/src/external-resources.qdoc @@ -453,3 +453,9 @@ \externalpage http://www.libusb.org/ \title libusb */ + +/*! + \externalpage https://developer.mozilla.org/en/JavaScript/Reference/Reserved_Words + \title JavaScript Reserved Words +*/ + -- cgit v0.12 From 284211ccbd2cbdfea46cdf4b8628a1a967271985 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 14 Dec 2010 10:26:39 +0100 Subject: Prevent ::flush from being called on QGLWindowSurface if no painting happened. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 2527 Reviewed-by: Harald Fernengel Reviewed-by: Samuel Rødal --- src/opengl/qwindowsurface_gl.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index f64b93c..6749826 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -267,6 +267,7 @@ struct QGLWindowSurfacePrivate int tried_pb : 1; int destructive_swap_buffers : 1; int geometry_updated : 1; + int did_paint : 1; QGLContext *ctx; @@ -330,6 +331,7 @@ QGLWindowSurface::QGLWindowSurface(QWidget *window) d_ptr->glDevice.d = d_ptr; d_ptr->q_ptr = this; d_ptr->geometry_updated = false; + d_ptr->did_paint = false; } QGLWindowSurface::~QGLWindowSurface() @@ -461,6 +463,8 @@ void QGLWindowSurface::beginPaint(const QRegion &) glClearColor(0.0, 0.0, 0.0, 0.0); glClear(clearFlags); } + + d_ptr->did_paint = true; } void QGLWindowSurface::endPaint(const QRegion &rgn) @@ -513,6 +517,13 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & if (d_ptr->geometry_updated) return; + // did_paint is set to true in ::beginPaint. ::beginPaint means that we + // at least cleared the background (= painted something). In EGL API it's a + // mistakte to call swapBuffers if nothing was painted. This check protects + // the flush func from being executed if it's for nothing. + if (! d_ptr->did_paint) + return; + QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); Q_ASSERT(parent); @@ -736,6 +747,8 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & ctx->swapBuffers(); else glFlush(); + + d_ptr->did_paint = false; } -- cgit v0.12 From 4d93a606ea0438be8062fda82baf639a9ced78ba Mon Sep 17 00:00:00 2001 From: Harald Fernengel Date: Tue, 14 Dec 2010 10:28:26 +0100 Subject: Trivial: Fix coding style Fix coding style of merge request --- src/opengl/qwindowsurface_gl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 6749826..7dc7dc7 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -521,7 +521,7 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & // at least cleared the background (= painted something). In EGL API it's a // mistakte to call swapBuffers if nothing was painted. This check protects // the flush func from being executed if it's for nothing. - if (! d_ptr->did_paint) + if (!d_ptr->did_paint) return; QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); -- cgit v0.12 From e864a530a5c48459c433518ff6ad893f33ec93d8 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 14 Dec 2010 10:57:11 +0100 Subject: Fix failing tst_QGraphicsView::QTBUG_16063_microFocusRect auto-test This ammends commit 0af1f5508e165f3b494ab236cb1cdf1b0edcffa5. Reviewed-by: trust me --- tests/auto/qgraphicsview/tst_qgraphicsview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp index e1fbaee..e259177 100644 --- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp +++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp @@ -4455,7 +4455,7 @@ class IMItem : public QGraphicsRectItem { public: IMItem(QGraphicsItem *parent = 0): - QGraphicsRectItem(mf.adjusted(-5, -5, 5, 5), parent) + QGraphicsRectItem(QRectF(0, 0, 20, 20), parent) { setFlag(QGraphicsItem::ItemIsFocusable, true); setFlag(QGraphicsItem::ItemAcceptsInputMethod, true); @@ -4486,7 +4486,7 @@ void tst_QGraphicsView::QTBUG_16063_microFocusRect() scene.setFocusItem(item); view.setFocus(); QRectF mfv = view.inputMethodQuery(Qt::ImMicroFocus).toRectF(); - QCOMPARE(mfv, QRectF(13.5, 13.6, 10, 10)); + QCOMPARE(mfv, IMItem::mf.translated(-view.mapToScene(view.sceneRect().toRect()).boundingRect().topLeft())); } QTEST_MAIN(tst_QGraphicsView) -- cgit v0.12 From 3778c3f5208f3db99d6b23a2a3c4abf1fe2ec64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 14 Dec 2010 11:46:57 +0100 Subject: Make sure that d->init() is called from both ctors. QGraphicsLayout uses the protected ctor that did not call d->init(), so all its subclasses was potentially suffering from this. Task-number: QTBUG-15333 Reviewed-by: John Tapsell --- src/gui/graphicsview/qgraphicslayoutitem.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index df13039..b11dc9e 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -129,7 +129,6 @@ void QGraphicsLayoutItemPrivate::init() { sizeHintCacheDirty = true; sizeHintWithConstraintCacheDirty = true; - sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); } /*! @@ -400,6 +399,7 @@ QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLay { Q_D(QGraphicsLayoutItem); d->init(); + sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); d->q_ptr = this; } @@ -410,6 +410,7 @@ QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItemPrivate &dd) : d_ptr(&dd) { Q_D(QGraphicsLayoutItem); + d->init(); d->q_ptr = this; } -- cgit v0.12 From 542fe69cdeff81acb8f986ff4606043613345dc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan-Arve=20S=C3=A6ther?= Date: Tue, 14 Dec 2010 13:03:43 +0100 Subject: Fix to commit 3778c3f5208f3db99d6b23a2a3c4abf1fe2ec64f This is what could happen if you go to lunch before comitting. --- src/gui/graphicsview/qgraphicslayoutitem.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicslayoutitem.cpp b/src/gui/graphicsview/qgraphicslayoutitem.cpp index b11dc9e..0a24aae 100644 --- a/src/gui/graphicsview/qgraphicslayoutitem.cpp +++ b/src/gui/graphicsview/qgraphicslayoutitem.cpp @@ -399,7 +399,7 @@ QGraphicsLayoutItem::QGraphicsLayoutItem(QGraphicsLayoutItem *parent, bool isLay { Q_D(QGraphicsLayoutItem); d->init(); - sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); + d->sizePolicy = QSizePolicy(QSizePolicy::Preferred, QSizePolicy::Preferred); d->q_ptr = this; } -- cgit v0.12 From 0727539b89898544047d32e63633790fa0c44b5a Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 14 Dec 2010 14:03:08 +0100 Subject: Don't delete FBO when resetting glyph cache When the glyph cache is cleared because the max texture size has been exceeded, we shouldn't delete the fbo as this is only created in setContext() and will thus not be recreated. All subsequent resizing of the cache will fail. Task-number: QT-3971 Reviewed-by: Samuel --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 66445cd..1b879c3 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -83,13 +83,9 @@ void QGLTextureGlyphCache::clear() if (ctx) { QGLShareContextScope scope(ctx); - if (!ctx->d_ptr->workaround_brokenFBOReadBack) - glDeleteFramebuffers(1, &m_fbo); - if (m_width || m_height) glDeleteTextures(1, &m_texture); - m_fbo = 0; m_texture = 0; m_width = 0; m_height = 0; @@ -105,6 +101,13 @@ void QGLTextureGlyphCache::clear() QGLTextureGlyphCache::~QGLTextureGlyphCache() { + if (ctx) { + QGLShareContextScope scope(ctx); + + if (!ctx->d_ptr->workaround_brokenFBOReadBack) + glDeleteFramebuffers(1, &m_fbo); + } + clear(); } -- cgit v0.12 From 7b608475fb40c790fba5c618be51a92fd9d5ca92 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 14 Dec 2010 15:39:53 +0100 Subject: Doc: Added QML Syntax overview page. Modified landing page. QML Syntax is to provide essential QML and JavaScript language info. Task-number:#QTBUG-16071 --- doc/src/declarative/declarativeui.qdoc | 29 +++--- doc/src/declarative/qmlsyntax.qdoc | 158 +++++++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+), 13 deletions(-) create mode 100644 doc/src/declarative/qmlsyntax.qdoc diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index b17d178..771a421 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -65,15 +65,17 @@ QML and the Qt Declarative Module separate the frontend UI logic from the backen \list \o \l{Intro to Qt Quick}{Introduction to Qt Quick} -\o \l{Introduction to the QML language}{Introduction to the QML Language} \o \l{QML for Qt Programmers}{QML Programming for Qt Programmers} \o \l{Getting Started Programming with QML} + \o \l{What's new in Qt Quick}{What's New in the Qt Quick Release} +\o \l{QML Examples and Demos} \endlist \section1 QML Features \list +\o \l{QML Syntax} \o \l{Property Binding} \o \l{Using QML Positioner and Repeater Items}{Component Layouts} \o \l{Anchor-based Layout in QML}{Anchor Layout} @@ -113,6 +115,19 @@ QML and the Qt Declarative Module separate the frontend UI logic from the backen \o \l{Developing Qt Quick Applications}{Developing with Qt Creator} \endlist +\section1 Reference + +\list +\o \l{Introduction to the QML language}{QML Syntax} +\o \l{QML Elements} +\o \l{Qt Declarative Module} +\o \l{QML Basic Types}{QML Data Types} +\o \l{QML Coding Conventions} +\o \l{Qt Creator Manual} +\o \l{Programming with Qt} +\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility Documentation} +\endlist + \section1 Architecture \list @@ -126,18 +141,6 @@ QML and the Qt Declarative Module separate the frontend UI logic from the backen \o \l{Qt Declarative Module} \endlist -\section1 Reference - -\list -\o \l{QML Elements} -\o \l{Qt Declarative Module} -\o \l{QML Basic Types}{QML Data Types} -\o \l{QML Coding Conventions} -\o \l{Qt Creator Manual} -\o \l{Programming with Qt} -\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/index.html}{Qt Mobility Documentation} -\endlist - \section1 Examples \list diff --git a/doc/src/declarative/qmlsyntax.qdoc b/doc/src/declarative/qmlsyntax.qdoc new file mode 100644 index 0000000..4ff2437 --- /dev/null +++ b/doc/src/declarative/qmlsyntax.qdoc @@ -0,0 +1,158 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page qmlsyntax.html +\title QML Syntax +\ingroup QML Features +\previouspage QML Features +\contentspage QML Features + +\tableofcontents + +QML is a declarative language designed to describe the user interface of a +program: both what it looks like, and how it behaves. In QML, a user +interface is specified as a tree of objects with properties. + +This introduction is meant for those with little or no programming +experience. JavaScript is used as a scripting language in QML, so you may want +to learn a bit more about it (\l{Javascript Guide}) before diving +deeper into QML. It's also helpful to have a basic understanding of other web +technologies like HTML and CSS, but it's not required. + +\section1 Basic QML Syntax + +QML looks like this: + +\code +import QtQuick 1.0 + +Rectangle { + width: 200 + height: 200 + color: "blue" + + Image { + source: "pics/logo.png" + anchors.centerIn: parent + } +} +\endcode + +Objects are specified by their type, followed by a pair of braces. Object +types always begin with a capital letter. In the above example, there are +two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify +information about the object, such as its properties. + +Properties are specified as \c {property: value}. In the above example, we +can see the Image has a property named \c source, which has been assigned the +value \c "pics/logo.png". The property and its value are separated by a colon. + +Properties can be specified one-per-line: + +\code +Rectangle { + width: 100 + height: 100 +} +\endcode + +or you can put multiple properties on a single line: + +\code +Rectangle { width: 100; height: 100 } +\endcode + +When multiple property/value pairs are specified on a single line, they +must be separated by a semicolon. + +The \c import statement imports the \c Qt \l{QML Modules}{module}, which contains all of the +standard \l {QML Elements}. Without this import statement, the \l Rectangle +and \l Image elements would not be available. + +\section1 Expressions + +In addition to assigning values to properties, you can also assign +expressions written in JavaScript. + +\code +Rotation { + angle: 360 * 3 +} +\endcode + +These expressions can include references to other objects and properties, in which case +a \e binding is established: when the value of the expression changes, the property the +expression has been assigned to is automatically updated to that value. + +\code +Item { + Text { + id: text1 + text: "Hello World" + } + Text { + id: text2 + text: text1.text + } +} +\endcode + +In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed, +\c text2 is automatically changed to the same value. + +Note that to refer to other objects, we use their \e id values. (See below for more +information on the \e id property.) + +\section1 QML Comments + +Commenting in QML is similar to JavaScript. +\list +\o Single line comments start with // and finish at the end of the line. +\o Multiline comments start with /* and finish with *\/ +\endlist + +\snippet doc/src/snippets/declarative/comments.qml 0 + +Comments are ignored by the engine. They are useful for explaining what you +are doing; for referring back to at a later date, or for others reading +your QML files. + +Comments can also be used to prevent the execution of code, which is +sometimes useful for tracking down problems. + +\code +Text { + text: "Hello world!" + //opacity: 0.5 +} +\endcode + +In the above example, the Text object will have normal opacity, since the +line opacity: 0.5 has been turned into a comment. + +*/ -- cgit v0.12 From 380a85758b673563b2912b413bbcfce49fc564b7 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Tue, 14 Dec 2010 15:56:30 +0100 Subject: Added an entry for QML Architecture in the overviews page. This is for adding architecture information in the documentation. Task-number: QTBUG-16071 --- doc/src/overviews.qdoc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index 3bb7aec..5c48a33 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -168,3 +168,13 @@ \generatelist {related} */ +/*! + \group qml-architecture + \title QML Architecture + + \brief QML Architecture + + These are overviews of the architecture of QML and Qt Declarative Module. + + \generatelist {related} +*/ -- cgit v0.12 From c031e5808ee406277a5401c69801e5c6e2ebfaea Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 15 Dec 2010 14:16:36 +1000 Subject: Fix invalid configurations being added to bearermonitor list. --- examples/network/bearermonitor/bearermonitor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/network/bearermonitor/bearermonitor.cpp b/examples/network/bearermonitor/bearermonitor.cpp index 75ffb01..bfa3d1f 100644 --- a/examples/network/bearermonitor/bearermonitor.cpp +++ b/examples/network/bearermonitor/bearermonitor.cpp @@ -226,7 +226,7 @@ void BearerMonitor::updateConfigurations() if (defaultConfiguration.type() == QNetworkConfiguration::ServiceNetwork) updateSnapConfiguration(defaultItem, defaultConfiguration); - } else { + } else if (defaultConfiguration.isValid()) { configurationAdded(defaultConfiguration); } -- cgit v0.12 From c9faf2defa9fa3209e44e8a5c1ae2da8e630d379 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 8 Dec 2010 17:48:14 +1000 Subject: Ensure that DBus is connected before all uses. In early system startup applications may try to use ICD before it is contactable. Ensure that the connection to ICD is established before all calls are made. If ICD is still not contactable QDBusServiceWatcher is used to monitor registration of the com.nokia.icd2 address and reconnection is attempted once ICD is started. Task-number: Maemo 199755 --- src/plugins/bearer/icd/qicdengine.cpp | 93 ++++++++++++++++++++++++++++++----- src/plugins/bearer/icd/qicdengine.h | 6 +++ 2 files changed, 88 insertions(+), 11 deletions(-) diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index bdf4e2e..a5a183b 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -229,7 +229,7 @@ void IapMonitor::iapRemoved(const QString &iap_id) /******************************************************************************/ QIcdEngine::QIcdEngine(QObject *parent) -: QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0), +: QBearerEngine(parent), iapMonitor(0), m_dbusInterface(0), m_icdServiceWatcher(0), firstUpdate(true), m_scanGoingOn(false) { } @@ -248,9 +248,10 @@ QNetworkConfigurationManager::Capabilities QIcdEngine::capabilities() const QNetworkConfigurationManager::NetworkSessionRequired; } -void QIcdEngine::initialize() +bool QIcdEngine::ensureDBusConnection() { - QMutexLocker locker(&mutex); + if (m_dbusInterface) + return true; // Setup DBus Interface for ICD m_dbusInterface = new QDBusInterface(ICD_DBUS_API_INTERFACE, @@ -259,9 +260,22 @@ void QIcdEngine::initialize() QDBusConnection::systemBus(), this); - // abort if cannot connect to DBus. - if (!m_dbusInterface->isValid()) - return; + if (!m_dbusInterface->isValid()) { + delete m_dbusInterface; + m_dbusInterface = 0; + + if (!m_icdServiceWatcher) { + m_icdServiceWatcher = new QDBusServiceWatcher(ICD_DBUS_API_INTERFACE, + QDBusConnection::systemBus(), + QDBusServiceWatcher::WatchForOwnerChange, + this); + + connect(m_icdServiceWatcher, SIGNAL(serviceOwnerChanged(QString,QString,QString)), + this, SLOT(icdServiceOwnerChanged(QString,QString,QString))); + } + + return false; + } connect(&m_scanTimer, SIGNAL(timeout()), this, SLOT(finishAsyncConfigurationUpdate())); m_scanTimer.setSingleShot(true); @@ -289,6 +303,19 @@ void QIcdEngine::initialize() doRequestUpdate(); getIcdInitialState(); + + return true; +} + +void QIcdEngine::initialize() +{ + QMutexLocker locker(&mutex); + + if (!ensureDBusConnection()) { + locker.unlock(); + emit updateCompleted(); + locker.relock(); + } } static inline QString network_attrs_to_security(uint network_attrs) @@ -792,6 +819,9 @@ QNetworkConfigurationPrivatePointer QIcdEngine::defaultConfiguration() { QMutexLocker locker(&mutex); + if (!ensureDBusConnection()) + return QNetworkConfigurationPrivatePointer(); + // Here we just return [ANY] request to icd and let the icd decide which IAP to connect. return userChoiceConfigurations.value(OSSO_IAP_ANY); } @@ -933,13 +963,52 @@ void QIcdEngine::connectionStateSignalsSlot(QDBusMessage msg) locker.relock(); } +void QIcdEngine::icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner, + const QString &newOwner) +{ + QMutexLocker locker(&mutex); + + if (newOwner.isEmpty()) { + // Disconnected from ICD, remove all configurations + cleanup(); + delete iapMonitor; + iapMonitor = 0; + delete m_dbusInterface; + m_dbusInterface = 0; + + QMutableHashIterator i(accessPointConfigurations); + while (i.hasNext()) { + i.next(); + + QNetworkConfigurationPrivatePointer ptr = i.value(); + i.remove(); + + locker.unlock(); + emit configurationRemoved(ptr); + locker.relock(); + } + + userChoiceConfigurations.clear(); + } else { + // Connected to ICD ensure connection. + ensureDBusConnection(); + } +} + void QIcdEngine::requestUpdate() { QMutexLocker locker(&mutex); - if (m_scanGoingOn) { + if (!ensureDBusConnection()) { + locker.unlock(); + emit updateCompleted(); + locker.relock(); return; } + + if (m_scanGoingOn) + return; + m_scanGoingOn = true; m_dbusInterface->connection().connect(ICD_DBUS_API_INTERFACE, @@ -956,14 +1025,16 @@ void QIcdEngine::requestUpdate() void QIcdEngine::cancelAsyncConfigurationUpdate() { - if (!m_scanGoingOn) { + if (!ensureDBusConnection()) return; - } + + if (!m_scanGoingOn) + return; + m_scanGoingOn = false; - if (m_scanTimer.isActive()) { + if (m_scanTimer.isActive()) m_scanTimer.stop(); - } m_dbusInterface->connection().disconnect(ICD_DBUS_API_INTERFACE, ICD_DBUS_API_PATH, diff --git a/src/plugins/bearer/icd/qicdengine.h b/src/plugins/bearer/icd/qicdengine.h index d528f15..d5b4fb3 100644 --- a/src/plugins/bearer/icd/qicdengine.h +++ b/src/plugins/bearer/icd/qicdengine.h @@ -53,6 +53,7 @@ QT_BEGIN_NAMESPACE class QNetworkConfigurationPrivate; class IapMonitor; class QDBusInterface; +class QDBusServiceWatcher; inline QNetworkConfiguration::BearerType bearerTypeFromIapType(const QString &iapType) { @@ -147,12 +148,15 @@ private Q_SLOTS: void finishAsyncConfigurationUpdate(); void asyncUpdateConfigurationsSlot(QDBusMessage msg); void connectionStateSignalsSlot(QDBusMessage msg); + void icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner, + const QString &newOwner); private: void startListeningStateSignalsForAllConnections(); void doRequestUpdate(QList scanned = QList()); void cancelAsyncConfigurationUpdate(); void getIcdInitialState(); + bool ensureDBusConnection(); private: IapMonitor *iapMonitor; @@ -162,6 +166,8 @@ private: QStringList m_typesToBeScanned; QList m_scanResult; + QDBusServiceWatcher *m_icdServiceWatcher; + bool firstUpdate; bool m_scanGoingOn; }; -- cgit v0.12 From e75980a322ea1088e1c6bf60259b8ba853d32444 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Wed, 15 Dec 2010 15:30:43 +1000 Subject: Fix possible null pointer dereference. When parsing a new connection an access point with the same SSID may not have been previously seen. Task-number: QTBUG-15276 --- src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp index 554f9b7..f93b605 100644 --- a/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp +++ b/src/plugins/bearer/networkmanager/qnetworkmanagerengine.cpp @@ -743,9 +743,11 @@ QNetworkConfigurationPrivate *QNetworkManagerEngine::parseConnection(const QStri QNetworkConfigurationPrivatePointer ptr = accessPointConfigurations.take(accessPointId); - mutex.unlock(); - emit configurationRemoved(ptr); - mutex.lock(); + if (ptr) { + mutex.unlock(); + emit configurationRemoved(ptr); + mutex.lock(); + } } break; } -- cgit v0.12 From 27de60f2f6047cb3f698825af96e569fde04ef06 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Wed, 15 Dec 2010 17:06:25 +1000 Subject: Add extra type of embedded license. Marketing needs this for commercial customers. Reviewed-by: Trust Me --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index 7141880..aa8d047 100755 --- a/configure +++ b/configure @@ -480,7 +480,7 @@ elif [ $COMMERCIAL_USER = "yes" ]; then # Qt All-OS LICENSE_EXTENSION="-ALLOS" ;; - 8M,* | KM,* | S9,* | SC,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*) + 8M,* | KM,* | S9,* | SC,* | SM,* | SU,* | SW,* | X9,* | XC,* | XU,* | XW,*) # Qt for Embedded Linux LICENSE_EXTENSION="-EMBEDDED" ;; -- cgit v0.12 From 915a31420c4f8d04c82103e3dd4d33b468a9334d Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 15 Dec 2010 11:44:19 +0200 Subject: Resize event for QDesktopWidget was sent too early Some recent changes had caused a change in events sent from avkon to QSymbianControl, causing QDesktopWidget to be get resize event before the client area of application was correct. Moved the resize event sending from HandleStatusPaneSizeChange to HandleResourceChange (case KEikDynamicLayoutVariantSwitch). Task-number: QTBUG-16095 Reviewed-by: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 81fa4e6..6db1fa8 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -667,9 +667,6 @@ void QSymbianControl::HandleStatusPaneSizeChange() { QS60MainAppUi *s60AppUi = static_cast(S60->appUi()); s60AppUi->HandleStatusPaneSizeChange(); - // Send resize event to trigger desktopwidget workAreaResized signal - QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); - QApplication::sendEvent(qt_desktopWidget, &e); } #endif @@ -1310,6 +1307,9 @@ void QSymbianControl::HandleResourceChange(int resourceType) case KEikDynamicLayoutVariantSwitch: { handleClientAreaChange(); + // Send resize event to trigger desktopwidget workAreaResized signal + QResizeEvent e(qt_desktopWidget->size(), qt_desktopWidget->size()); + QApplication::sendEvent(qt_desktopWidget, &e); break; } #endif -- cgit v0.12 From e0aa9897bc2d04054cc65dbe3452bee2ed2eacd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 15 Dec 2010 12:41:08 +0100 Subject: Prevent crash in drawhelper code when the cpu has MMXEXT but no SSE. We can't use the qdrawhelper_sse.cpp or qdrawhelper_sse3dnow.cpp when SSE is not run-time detected, as those are compiled with -msse and MMXEXT is just a subset of SSE. The compiler might choose to use an instruction not in the subset, causing a crash at run-time. Task-number: QTBUG-15693 Reviewed-by: Thiago Macieira --- src/gui/painting/qdrawhelper.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 024a69d..62af212 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -7711,17 +7711,6 @@ void qInitDrawhelperAsm() } #endif #endif // SSE -#if defined(QT_HAVE_MMXEXT) && defined(QT_HAVE_SSE) - } else if (features & MMXEXT) { - qt_memfill32 = qt_memfill32_sse; - qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse; -# ifdef QT_HAVE_3DNOW - if (features & MMX3DNOW) { - qt_memfill32 = qt_memfill32_sse3dnow; - qDrawHelper[QImage::Format_RGB16].bitmapBlit = qt_bitmapblit16_sse3dnow; - } -# endif // 3DNOW -#endif // MMXEXT } #ifdef QT_HAVE_MMX if (features & MMX) { -- cgit v0.12 From 21b1b5a9af95af10b281176564f14cafa2339006 Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 11 Dec 2010 00:03:14 +0100 Subject: Improve performance of clipping to a scaled QRectF Clipping to a scaled QRectF was so far hitting the slow code path in the raster paintengine that generates clip spans for every line. This is not needed as we also clip translated QRectF's to integer rects. This patch does the same for scaled rectangles and ensures the clipping really happens at the closest pixel boundary. Reviewed-by: Samuel --- src/gui/painting/qpaintengine_raster.cpp | 33 ++++++++++++++++++++++---------- src/gui/painting/qpaintengine_raster_p.h | 2 ++ 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 89202ac..4d06c9f 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1212,7 +1212,7 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) // There are some cases that are not supported by clip(QRect) if (op != Qt::UniteClip && (op != Qt::IntersectClip || !s->clip || s->clip->hasRectClip || s->clip->hasRegionClip)) { - if (s->matrix.type() <= QTransform::TxTranslate + if (s->matrix.type() <= QTransform::TxScale && ((path.shape() == QVectorPath::RectangleHint) || (isRect(points, path.elementCount()) && (!types || (types[0] == QPainterPath::MoveToElement @@ -1224,8 +1224,8 @@ void QRasterPaintEngine::clip(const QVectorPath &path, Qt::ClipOperation op) #endif QRectF r(points[0], points[1], points[4]-points[0], points[5]-points[1]); - clip(r.toRect(), op); - return; + if (setClipRectInDeviceCoords(s->matrix.mapRect(r).toRect(), op)) + return; } } @@ -1286,7 +1286,6 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) qDebug() << "QRasterPaintEngine::clip(): " << rect << op; #endif - Q_D(QRasterPaintEngine); QRasterPaintEngineState *s = state(); if (op == Qt::NoClip) { @@ -1296,11 +1295,23 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) QPaintEngineEx::clip(rect, op); return; - } else if (op == Qt::ReplaceClip || s->clip == 0) { + } else if (!setClipRectInDeviceCoords(s->matrix.mapRect(rect), op)) { + QPaintEngineEx::clip(rect, op); + return; + } +} + + +bool QRasterPaintEngine::setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op) +{ + Q_D(QRasterPaintEngine); + QRect clipRect = r & d->deviceRect; + QRasterPaintEngineState *s = state(); + + if (op == Qt::ReplaceClip || s->clip == 0) { // No current clip, hence we intersect with sysclip and be // done with it... - QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect; QRegion clipRegion = systemClip(); QClipData *clip = new QClipData(d->rasterBuffer->height()); @@ -1316,12 +1327,11 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) s->clip->enabled = true; s->flags.has_clip_ownership = true; - } else { // intersect clip with current clip + } else if (op == Qt::IntersectClip){ // intersect clip with current clip QClipData *base = s->clip; Q_ASSERT(base); if (base->hasRectClip || base->hasRegionClip) { - QRect clipRect = s->matrix.mapRect(rect) & d->deviceRect; if (!s->flags.has_clip_ownership) { s->clip = new QClipData(d->rasterBuffer->height()); s->flags.has_clip_ownership = true; @@ -1332,11 +1342,14 @@ void QRasterPaintEngine::clip(const QRect &rect, Qt::ClipOperation op) s->clip->setClipRegion(base->clipRegion & clipRect); s->clip->enabled = true; } else { - QPaintEngineEx::clip(rect, op); - return; + return false; } + } else { + return false; } + qrasterpaintengine_dirty_clip(d, s); + return true; } diff --git a/src/gui/painting/qpaintengine_raster_p.h b/src/gui/painting/qpaintengine_raster_p.h index 1016f8d..7d4d3b6 100644 --- a/src/gui/painting/qpaintengine_raster_p.h +++ b/src/gui/painting/qpaintengine_raster_p.h @@ -266,6 +266,8 @@ private: void drawGlyphsS60(const QPointF &p, const QTextItemInt &ti); #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE + bool setClipRectInDeviceCoords(const QRect &r, Qt::ClipOperation op); + inline void ensureBrush(const QBrush &brush) { if (!qbrush_fast_equals(state()->lastBrush, brush) || (brush.style() != Qt::NoBrush && state()->fillFlags)) updateBrush(brush); -- cgit v0.12 From d8990fbd132fc9e456c55a624eeb709088b0b819 Mon Sep 17 00:00:00 2001 From: Paul Labedan Date: Tue, 7 Dec 2010 12:25:23 +0100 Subject: Remove warning about null cursor handle on S60 while handle is valid --- src/gui/kernel/qcursor_s60.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qcursor_s60.cpp b/src/gui/kernel/qcursor_s60.cpp index 68e079e..6369f25 100644 --- a/src/gui/kernel/qcursor_s60.cpp +++ b/src/gui/kernel/qcursor_s60.cpp @@ -472,9 +472,9 @@ void qt_symbian_setWindowGroupCursor(const QCursor &cursor, RWindowTreeNode &nod if (handle) { RWsPointerCursor *pcurs = reinterpret_cast (handle); node.SetCustomPointerCursor(*pcurs); - } + } else #ifdef Q_SYMBIAN_HAS_SYSTEM_CURSORS - else { + { TInt shape = qt_symbian_translate_cursor_shape(cursor.shape()); node.SetPointerCursor(shape); } -- cgit v0.12 From 3e7adcb80a86748608d5517413301cd2b1b8df78 Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Wed, 15 Dec 2010 16:42:05 +0100 Subject: Check for null-pointer to avoid a crash in textedit demo. Task-number: QTBUG-16125 Reviewed-by: trustme --- demos/textedit/textedit.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/demos/textedit/textedit.cpp b/demos/textedit/textedit.cpp index 165c97c..9fa1949 100644 --- a/demos/textedit/textedit.cpp +++ b/demos/textedit/textedit.cpp @@ -262,7 +262,8 @@ void TextEdit::setupEditActions() tb->addAction(a); menu->addAction(a); #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); + if (const QMimeData *md = QApplication::clipboard()->mimeData()) + actionPaste->setEnabled(md->hasText()); #endif } @@ -681,7 +682,8 @@ void TextEdit::cursorPositionChanged() void TextEdit::clipboardDataChanged() { #ifndef QT_NO_CLIPBOARD - actionPaste->setEnabled(QApplication::clipboard()->mimeData()->hasText()); + if (const QMimeData *md = QApplication::clipboard()->mimeData()) + actionPaste->setEnabled(md->hasText()); #endif } -- cgit v0.12 From cb51c2157f870a5c83ae6d9435ec4b1004392bc9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 13 Dec 2010 22:26:39 +0100 Subject: Don't need to set FD_CLOEXEC since qt_safe_* will have done that. Reviewed-By: Trust Me --- src/network/socket/qnativesocketengine_unix.cpp | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/network/socket/qnativesocketengine_unix.cpp b/src/network/socket/qnativesocketengine_unix.cpp index f6bfbac..021acd0 100644 --- a/src/network/socket/qnativesocketengine_unix.cpp +++ b/src/network/socket/qnativesocketengine_unix.cpp @@ -202,9 +202,6 @@ bool QNativeSocketEnginePrivate::createNewSocket(QAbstractSocket::SocketType soc return false; } - // Ensure that the socket is closed on exec*(). - ::fcntl(socket, F_SETFD, FD_CLOEXEC); - socketDescriptor = socket; return true; } @@ -565,16 +562,6 @@ int QNativeSocketEnginePrivate::nativeAccept() #else int acceptedDescriptor = qt_safe_accept(socketDescriptor, 0, 0); #endif - //check if we have valid descriptor at all - if(acceptedDescriptor > 0) { - // Ensure that the socket is closed on exec*() - ::fcntl(acceptedDescriptor, F_SETFD, FD_CLOEXEC); - } -#ifdef Q_OS_SYMBIAN - else { - qWarning("QNativeSocketEnginePrivate::nativeAccept() - acceptedDescriptor <= 0"); - } -#endif return acceptedDescriptor; } -- cgit v0.12 From e1955231478df8990cf8b1f80438abf957c5d6f2 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Tue, 14 Dec 2010 11:25:32 +0100 Subject: Add a warning about trying to release a timer ID that isn't active Reviewed-By: Trust Me --- src/corelib/kernel/qeventdispatcher_unix.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/corelib/kernel/qeventdispatcher_unix.cpp b/src/corelib/kernel/qeventdispatcher_unix.cpp index f50994c..b2ccc68 100644 --- a/src/corelib/kernel/qeventdispatcher_unix.cpp +++ b/src/corelib/kernel/qeventdispatcher_unix.cpp @@ -501,6 +501,7 @@ bool QTimerInfoList::unregisterTimer(int timerId) } } // id not found + qWarning("Application asked to unregister timer 0x%x which is not registered in this thread. Fix application.", timerId); return false; } -- cgit v0.12 From 038927f1208ff346cbe8d2cfefbd39808ffb5711 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Dec 2010 18:48:05 +0100 Subject: Autotest: Add some comments about this obscure test. More information, see commit d9bf386d917c64ad5d8f11f9daadf82b2be9d531 (old qt-history) and old TT task 90183. Reviewed-By: Trust Me --- tests/auto/qprocess/tst_qprocess.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/auto/qprocess/tst_qprocess.cpp b/tests/auto/qprocess/tst_qprocess.cpp index fd310f4..13f1d26 100644 --- a/tests/auto/qprocess/tst_qprocess.cpp +++ b/tests/auto/qprocess/tst_qprocess.cpp @@ -1999,11 +1999,15 @@ void tst_QProcess::spaceInName() void tst_QProcess::lockupsInStartDetached() { #if !defined(Q_OS_SYMBIAN) - // What exactly is this call supposed to achieve anyway? + // Check that QProcess doesn't cause a lock up at this program's + // exit if a thread was started and we tried to run a program that + // doesn't exist. Before Qt 4.2, this used to lock up on Unix due + // to calling ::exit instead of ::_exit if execve failed. + QHostInfo::lookupHost(QString("something.invalid"), 0, 0); -#endif QProcess::execute("yjhbrty"); QProcess::startDetached("yjhbrty"); +#endif } //----------------------------------------------------------------------------- -- cgit v0.12 From 7b0809edf975f3226b43d3b43b5fe8035298fde9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Dec 2010 18:48:48 +0100 Subject: ICC: Don't print warning 1259 since it's too annoying. ICC 12 keeps outputting this when you copy a type of larger size to a smaller, or from int to float. --- mkspecs/linux-icc/qmake.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/linux-icc/qmake.conf b/mkspecs/linux-icc/qmake.conf index af56a9a..ba707e23 100644 --- a/mkspecs/linux-icc/qmake.conf +++ b/mkspecs/linux-icc/qmake.conf @@ -23,7 +23,7 @@ QMAKE_YACC = yacc QMAKE_YACCFLAGS = -d QMAKE_CFLAGS = -falign-stack=maintain-16-byte QMAKE_CFLAGS_DEPS = -M -QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125 +QMAKE_CFLAGS_WARN_ON = -w1 -Wcheck -wd654,1572,411,873,1125,2259 QMAKE_CFLAGS_WARN_OFF = -w QMAKE_CFLAGS_RELEASE = -O2 -falign-functions=16 -ansi-alias -fstrict-aliasing QMAKE_CFLAGS_DEBUG = -O0 -g -- cgit v0.12 From 981a83d7832e8cd1ee7bcd42dfaba62f0b04f2c1 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 15 Dec 2010 18:53:57 +0100 Subject: Suppress a warning about killing a timer that isn't active. The timer was active, but it got killed by ~QObject. The QObject d-pointer is deleted after the timers (as is expected), which means that the QBasicTimer destructors in QAbstractItemViewPrivate are run after the timers are already gone. Reviewed-by: Trust Me --- src/gui/itemviews/qabstractitemview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index acc8deb..177b088 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -595,6 +595,8 @@ QAbstractItemView::QAbstractItemView(QAbstractItemViewPrivate &dd, QWidget *pare */ QAbstractItemView::~QAbstractItemView() { + // stop this timer here before ~QObject + d_func()->delayedReset.stop(); } /*! -- cgit v0.12 From fa57982fadab625fb022d32f690ef05427920581 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 16 Dec 2010 11:30:17 +0100 Subject: QmlDebugger: Fix runtime warnings about unregistered metatypes Check whether the type of a property is known to the metatype system before trying to read from it. That avoids lots of runtime warnings e.g. for the QSequentialGroup::currentAnimation property, which type QAbstractAnimation * isn't registered by default via qRegisterMetaType<>(). Reviewed-by: Christiaan Janssen Task-number: QTCREATORBUG-2853 --- src/declarative/qml/qdeclarativeenginedebug.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index bffe681..e54f7d6 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -146,7 +146,10 @@ QDeclarativeEngineDebugServer::propertyData(QObject *obj, int propIdx) if (binding) rv.binding = binding->expression(); - QVariant value = prop.read(obj); + QVariant value; + if (prop.userType() != 0) { + value = prop.read(obj); + } rv.value = valueContents(value); if (QDeclarativeValueTypeFactory::isValueType(prop.userType())) { -- cgit v0.12 From d1139664012718f9bbf54e283ef7c370d98c48a8 Mon Sep 17 00:00:00 2001 From: Christiaan Janssen Date: Thu, 16 Dec 2010 12:33:21 +0100 Subject: QmlDebugger: reset properties to default value Reviewed-by: Kai Koehne --- src/declarative/qml/qdeclarativeenginedebug.cpp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/declarative/qml/qdeclarativeenginedebug.cpp b/src/declarative/qml/qdeclarativeenginedebug.cpp index 4d6e50c..6c013de 100644 --- a/src/declarative/qml/qdeclarativeenginedebug.cpp +++ b/src/declarative/qml/qdeclarativeenginedebug.cpp @@ -613,9 +613,25 @@ void QDeclarativeEngineDebugServer::resetBinding(int objectId, const QString &pr QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::setBinding(property, 0); if (oldBinding) oldBinding->destroy(); + } + if (property.isResettable()) { + // Note: this will reset the property in any case, without regard to states + // Right now almost no QDeclarativeItem has reset methods for its properties (with the + // notable exception of QDeclarativeAnchors), so this is not a big issue + // later on, setBinding does take states into account + property.reset(); } else { - if (property.isResettable()) { - property.reset(); + // overwrite with default value + if (QDeclarativeType *objType = QDeclarativeMetaType::qmlType(object->metaObject())) { + if (QObject *emptyObject = objType->create()) { + if (emptyObject->property(propertyName.toLatin1()).isValid()) { + QVariant defaultValue = QDeclarativeProperty(emptyObject, propertyName).read(); + if (defaultValue.isValid()) { + setBinding(objectId, propertyName, defaultValue, true); + } + } + delete emptyObject; + } } } } else { -- cgit v0.12 From c70b1afe694b0d32ece6b639b1e4d10501df8bb0 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Thu, 16 Dec 2010 13:41:28 +0200 Subject: Remove support for automatic tactile feedback from QS60Style Currently QS60Style loads automatically a plugin to support tactile feedback for styled applications. However, there is no control over this, so applications cannot remove the automatic support, if they'd like to use Mobility APIs to control the feedback themselves. In order to avoid this, remove tactile feedback plugin from style. Lets see if we can later put this back with optional enable/disable flag. Task-number: QTBUG-16151 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 3 - src/gui/styles/qs60style_feedbackinterface_p.h | 50 -------------- src/gui/styles/qs60style_p.h | 4 -- src/gui/styles/qs60style_s60.cpp | 24 +------ src/plugins/s60/feedback/feedback.pro | 18 ----- src/plugins/s60/feedback/qtactileFeedback.h | 54 --------------- src/plugins/s60/feedback/qtactileFeedback_s60.cpp | 83 ----------------------- src/plugins/s60/s60.pro | 4 -- src/s60installs/qt.iby | 5 -- src/s60installs/s60installs.pro | 6 -- 10 files changed, 1 insertion(+), 250 deletions(-) delete mode 100644 src/gui/styles/qs60style_feedbackinterface_p.h delete mode 100644 src/plugins/s60/feedback/feedback.pro delete mode 100644 src/plugins/s60/feedback/qtactileFeedback.h delete mode 100644 src/plugins/s60/feedback/qtactileFeedback_s60.cpp diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 56d2d19..040ca4f 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -3464,9 +3464,6 @@ bool QS60Style::eventFilter(QObject *object, QEvent *event) if (d->m_pressedWidget) d->m_pressedWidget->update(); -#ifdef Q_WS_S60 - d->touchFeedback(event, w); -#endif } break; } diff --git a/src/gui/styles/qs60style_feedbackinterface_p.h b/src/gui/styles/qs60style_feedbackinterface_p.h deleted file mode 100644 index 81fcdc3..0000000 --- a/src/gui/styles/qs60style_feedbackinterface_p.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** -** -** 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 QtGui 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$ -** -****************************************************************************/ - -#include - -class TactileFeedbackInterface : public QObject -{ - public: - virtual void touchFeedback(QEvent *event, const QWidget *widget) = 0; -}; - -Q_DECLARE_INTERFACE(TactileFeedbackInterface, "com.trolltech.Qt.TactileFeedbackInterface/1.0") diff --git a/src/gui/styles/qs60style_p.h b/src/gui/styles/qs60style_p.h index db4285d..721fbd9 100644 --- a/src/gui/styles/qs60style_p.h +++ b/src/gui/styles/qs60style_p.h @@ -387,7 +387,6 @@ private: //data members class QFocusFrame; class QProgressBar; class QS60StyleAnimation; -class TactileFeedbackInterface; // Private class #ifdef Q_OS_SYMBIAN @@ -576,8 +575,6 @@ public: void stopAnimation(QS60StyleEnums::SkinParts animation); static QS60StyleAnimation* animationDefinition(QS60StyleEnums::SkinParts part); static void removeAnimations(); - //No support for tactile feedback in emulated style - void touchFeedback(QEvent *event, const QWidget *widget); #endif @@ -632,7 +629,6 @@ private: #ifdef Q_WS_S60 //list of progress bars having animation running QList m_bars; - TactileFeedbackInterface *m_feedbackPlugin; #endif }; diff --git a/src/gui/styles/qs60style_s60.cpp b/src/gui/styles/qs60style_s60.cpp index 92f53ff..4e3f5da 100644 --- a/src/gui/styles/qs60style_s60.cpp +++ b/src/gui/styles/qs60style_s60.cpp @@ -50,10 +50,6 @@ #include "qapplication.h" #include "qsettings.h" -#include "qpluginloader.h" -#include "qlibraryinfo.h" -#include "private/qs60style_feedbackinterface_p.h" - #include #include #include @@ -1221,25 +1217,13 @@ void QS60StylePrivate::setActiveLayout() Q_GLOBAL_STATIC(QList, m_animations) -QS60StylePrivate::QS60StylePrivate() : m_feedbackPlugin(0) +QS60StylePrivate::QS60StylePrivate() { //Animation defaults need to be created when style is instantiated QS60StyleAnimation* progressBarAnimation = new QS60StyleAnimation(QS60StyleEnums::SP_QgnGrafBarWaitAnim, 7, 100); m_animations()->append(progressBarAnimation); // No need to set active layout, if dynamic metrics API is available setActiveLayout(); - - //Tactile feedback plugin is only available for touch devices. - if (isTouchSupported()) { - QString pluginsPath = QLibraryInfo::location(QLibraryInfo::PluginsPath); - pluginsPath += QLatin1String("/feedback/qtactilefeedback.dll"); - - // Create plugin loader - QPluginLoader pluginLoader(pluginsPath); - // Load plugin and store pointer to the plugin implementation - if (pluginLoader.load()) - m_feedbackPlugin = qobject_cast(pluginLoader.instance()); - } } void QS60StylePrivate::removeAnimations() @@ -1529,12 +1513,6 @@ void QS60StylePrivate::stopAnimation(QS60StyleEnums::SkinParts animationPart) } } -void QS60StylePrivate::touchFeedback(QEvent *event, const QWidget *widget) -{ - if (m_feedbackPlugin) - m_feedbackPlugin->touchFeedback(event, widget); -} - QVariant QS60StyleModeSpecifics::themeDefinition( QS60StyleEnums::ThemeDefinitions definition, QS60StyleEnums::SkinParts part) { diff --git a/src/plugins/s60/feedback/feedback.pro b/src/plugins/s60/feedback/feedback.pro deleted file mode 100644 index 5e577ec..0000000 --- a/src/plugins/s60/feedback/feedback.pro +++ /dev/null @@ -1,18 +0,0 @@ -include(../../qpluginbase.pri) - -TARGET = qtactilefeedback$${QT_LIBINFIX} - -QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/s60/feedback - -INCLUDEPATH += $$APP_LAYER_SYSTEMINCLUDE - -!contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - HEADERS += qtactileFeedback.h - SOURCES += qtactileFeedback_s60.cpp - - LIBS += -ltouchfeedback -} - -load(data_caging_paths) - -TARGET.UID3=0x200315B4 diff --git a/src/plugins/s60/feedback/qtactileFeedback.h b/src/plugins/s60/feedback/qtactileFeedback.h deleted file mode 100644 index 7c4cc29..0000000 --- a/src/plugins/s60/feedback/qtactileFeedback.h +++ /dev/null @@ -1,54 +0,0 @@ -/**************************************************************************** -** -** 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 QtGui 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$ -** -****************************************************************************/ - -#include -#include - -#include "private/qs60style_feedbackinterface_p.h" - -class QTactileFeedback : public TactileFeedbackInterface -{ - Q_OBJECT - Q_INTERFACES(TactileFeedbackInterface) - - public: - void touchFeedback(QEvent *event, const QWidget *widget); - }; diff --git a/src/plugins/s60/feedback/qtactileFeedback_s60.cpp b/src/plugins/s60/feedback/qtactileFeedback_s60.cpp deleted file mode 100644 index c2f1d34..0000000 --- a/src/plugins/s60/feedback/qtactileFeedback_s60.cpp +++ /dev/null @@ -1,83 +0,0 @@ -/**************************************************************************** -** -** 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 QtGui 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$ -** -****************************************************************************/ - -#include -#include -#include -#include - -#include -#include "qtactileFeedback.h" - -#include - -void QTactileFeedback::touchFeedback(QEvent *event, const QWidget *widget) -{ - //Lets share the global instance for touch feedback (you are NOT allowed to try and delete it!). - MTouchFeedback* feedback = MTouchFeedback::Instance(); - - //If the widget itself is not handling focus, try to use focusProxy widget. - const QWidget *w = ((widget->focusPolicy() == Qt::NoFocus) && (widget->focusProxy())) ? widget->focusProxy() : widget; - - //Only give tactile feedback for enabled widgets that take focus. - if (feedback && w && w->isEnabled() && w->isWidgetType() && w->isVisible()) { - //Scrollbars are 'special' that they don't take focus (nor they have focusProxy), yet we'd like to have tactile feedback for them - if (w->focusPolicy() == Qt::NoFocus) - if (!qobject_cast(w)) - return; - - //Don't give tactile feedback for widgets that are outside topmost dialog. - QWidget *dialog = QApplication::activeModalWidget(); - if (dialog) { - QList allChildren = dialog->findChildren(); - if (!allChildren.contains(w)) - return; - } - - //Widget specific tactile feedback. - if (qobject_cast(w) || qobject_cast(w)) - feedback->InstantFeedback(ETouchFeedbackSensitive); - else - feedback->InstantFeedback(ETouchFeedbackBasic); - } -} - -Q_EXPORT_PLUGIN2("feedback", QTactileFeedback); diff --git a/src/plugins/s60/s60.pro b/src/plugins/s60/s60.pro index 1ddf326..c999fff 100644 --- a/src/plugins/s60/s60.pro +++ b/src/plugins/s60/s60.pro @@ -6,10 +6,6 @@ symbian { SUBDIRS += 3_1 3_2 } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - SUBDIRS += feedback - } - # 5.0 is used also for Symbian3 and later SUBDIRS += 5_0 } \ No newline at end of file diff --git a/src/s60installs/qt.iby b/src/s60installs/qt.iby index 2b3be0a..4afbf05 100644 --- a/src/s60installs/qt.iby +++ b/src/s60installs/qt.iby @@ -60,8 +60,6 @@ file=ABI_DIR\BUILD_DIR\qsymbianbearer.dll SHARED_LIB_DIR\qsymbianbearer.dll // so don't bother including those plugins file=ABI_DIR\BUILD_DIR\qts60plugin_5_0.dll SHARED_LIB_DIR\qts60plugin_5_0.dll -file=ABI_DIR\BUILD_DIR\qtactilefeedback.dll SHARED_LIB_DIR\qtactilefeedback.dll - S60_APP_RESOURCE(s60main) // imageformats stubs @@ -107,9 +105,6 @@ data=\epoc32\data\z\resource\qt\plugins\graphicssystems\qglgraphicssystem.qtplug // bearer stub data=\epoc32\data\z\resource\qt\plugins\bearer\qsymbianbearer.qtplugin resource\qt\plugins\bearer\qsymbianbearer.qtplugin -// feedback -data=\epoc32\data\z\resource\qt\plugins\feedback\qtactilefeedback.qtplugin resource\qt\plugins\feedback\qtactilefeedback.qtplugin - // Stub sis file data=ZSYSTEM\install\qt_stub.sis System\Install\qt_stub.sis data=ZSYSTEM\install\qtwebkit_stub.sis System\Install\qtwebkit_stub.sis diff --git a/src/s60installs/s60installs.pro b/src/s60installs/s60installs.pro index 5a435cd..be7ed97 100644 --- a/src/s60installs/s60installs.pro +++ b/src/s60installs/s60installs.pro @@ -87,12 +87,6 @@ symbian: { DEPLOYMENT += bearer_plugin } - !contains(S60_VERSION, 3.1):!contains(S60_VERSION, 3.2) { - feedback_plugin.sources = $$QT_BUILD_TREE/plugins/s60/feedback/qtactilefeedback$${QT_LIBINFIX}.dll - feedback_plugin.path = c:$$QT_PLUGINS_BASE_DIR/feedback - DEPLOYMENT += feedback_plugin - } - qtlibraries.pkg_postrules += qts60plugindeployment qtlibraries.path = c:/sys/bin -- cgit v0.12 From 6f9642572c392536c07a52037e4c1de587489c49 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Thu, 16 Dec 2010 13:21:22 +0100 Subject: Add work around for bug when painting w/glTexSubImage into large texture It seems that copying small rectangles from glTexSubImage2D into a texture which is 2048x2048 is busted on some SGX drivers, even though the driver reports 2048 as the maximum texture size. This caused text to turn into flickering garbage once the texture glyph cache had grown to its max size (e.g. when painting very many Chinese glyphs.) To work around the problem, we hardcore the maximum texture height to 1024 on this driver so that the texture glyph cache is reset whenever that size is exceeded. Task-number: QT-3971 Done-with: Samuel --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 5 ++++- src/opengl/qgl.cpp | 1 + src/opengl/qgl_egl.cpp | 2 ++ src/opengl/qgl_p.h | 1 + 4 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 1b879c3..ba311c3 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -323,6 +323,9 @@ int QGLTextureGlyphCache::maxTextureWidth() const int QGLTextureGlyphCache::maxTextureHeight() const { - return ctx->d_ptr->maxTextureSize(); + if (ctx->d_ptr->workaround_brokenTexSubImage) + return qMin(1024, ctx->d_ptr->maxTextureSize()); + else + return ctx->d_ptr->maxTextureSize(); } QT_END_NAMESPACE diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 18f1203..9bf879a 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -1706,6 +1706,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) active_engine = 0; workaround_needsFullClearOnEveryFrame = false; workaround_brokenFBOReadBack = false; + workaround_brokenTexSubImage = false; workaroundsCached = false; workaround_brokenTextureFromPixmap = false; diff --git a/src/opengl/qgl_egl.cpp b/src/opengl/qgl_egl.cpp index 8902099..6f9e39c 100644 --- a/src/opengl/qgl_egl.cpp +++ b/src/opengl/qgl_egl.cpp @@ -204,6 +204,8 @@ void QGLContext::makeCurrent() const char *egl_version = eglQueryString(d->eglContext->display(), EGL_VERSION); if (egl_version && strstr(egl_version, "1.3")) d->workaround_brokenFBOReadBack = true; + else if (egl_version && strstr(egl_version, "1.4")) + d->workaround_brokenTexSubImage = true; } } } diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index b46d428..bf830ba 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -401,6 +401,7 @@ public: // workarounds for driver/hw bugs on different platforms uint workaround_needsFullClearOnEveryFrame : 1; uint workaround_brokenFBOReadBack : 1; + uint workaround_brokenTexSubImage : 1; uint workaroundsCached : 1; uint workaround_brokenTextureFromPixmap : 1; -- cgit v0.12 From ab8a9e77d877fd53eaec8dca1eeca619a4ba81d6 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 16 Dec 2010 12:57:06 +0200 Subject: Avoid duplicate resize event No need to have two resize events in queue for same widget, so do not post a new one if one is already pending in QSymbianControl::SizeChanged(). Reviewed-by: Sami Merila --- src/gui/kernel/qapplication_s60.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 6db1fa8..181fcc7 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1174,8 +1174,10 @@ void QSymbianControl::SizeChanged() if (!slowResize && tlwExtra) tlwExtra->inTopLevelResize = false; } else { - QResizeEvent *e = new QResizeEvent(newSize, oldSize); - QApplication::postEvent(qwidget, e); + if (!qwidget->testAttribute(Qt::WA_PendingResizeEvent)) { + QResizeEvent *e = new QResizeEvent(newSize, oldSize); + QApplication::postEvent(qwidget, e); + } } } -- cgit v0.12 From f0347c8c0c37bd90dcaefb8f4b669096f7eb66b5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 16 Dec 2010 15:23:51 +0200 Subject: Improved orientation change autotest The test wasn't even compiling anymore, so fixed that. Also added additional orientation change and an available geometry check after each orientation change. Reviewed-by: Sami Merila --- .../orientationchange/orientationchange.pro | 1 + .../orientationchange/tst_orientationchange.cpp | 43 ++++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/tests/auto/symbian/orientationchange/orientationchange.pro b/tests/auto/symbian/orientationchange/orientationchange.pro index 08b34f9..98aa2ad 100644 --- a/tests/auto/symbian/orientationchange/orientationchange.pro +++ b/tests/auto/symbian/orientationchange/orientationchange.pro @@ -4,4 +4,5 @@ SOURCES += tst_orientationchange.cpp symbian { INCLUDEPATH += $$MW_LAYER_SYSTEMINCLUDE + LIBS += -lcone -leikcore -lavkon # Screen orientation } diff --git a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp index eb3709d..2ac2f7f 100644 --- a/tests/auto/symbian/orientationchange/tst_orientationchange.cpp +++ b/tests/auto/symbian/orientationchange/tst_orientationchange.cpp @@ -45,6 +45,8 @@ #include #include +#include +#include class tst_orientationchange : public QObject { @@ -151,6 +153,47 @@ void tst_orientationchange::resizeEventOnOrientationChange() } QCOMPARE(normalWidget->resizeEventCount, 0); + QDesktopWidget desktop; + QRect qtAvail = desktop.availableGeometry(normalWidget); + TRect clientRect = static_cast(CCoeEnv::Static()-> AppUi())->ClientRect(); + QRect symbianAvail = qt_TRect2QRect(clientRect); + QCOMPARE(qtAvail, symbianAvail); + + // Switch orientation back to original + orientation = orientation == CAknAppUi::EAppUiOrientationPortrait + ? CAknAppUi::EAppUiOrientationLandscape + : CAknAppUi::EAppUiOrientationPortrait; + + + fullScreenWidget->reset(); + maximizedWidget->reset(); + normalWidget->reset(); + + TRAP(err, appUi->SetOrientationL(orientation)); + + QCoreApplication::sendPostedEvents(); + QCoreApplication::sendPostedEvents(); + + // setOrientationL is not guaranteed to change orientation + // (if emulator configured to support just portrait or landscape, then + // setOrientationL call shouldn't do anything). + // So let's ensure that we do not get resize event twice. + + QVERIFY(fullScreenWidget->resizeEventCount <= 1); + if (fullScreenWidget->resizeEventCount) { + QCOMPARE(fullScreenWidget->size(), fullScreenWidget->resizeEventSize); + } + QVERIFY(maximizedWidget->resizeEventCount <= 1); + if (fullScreenWidget->resizeEventCount) { + QCOMPARE(maximizedWidget->size(), maximizedWidget->resizeEventSize); + } + QCOMPARE(normalWidget->resizeEventCount, 0); + + qtAvail = desktop.availableGeometry(normalWidget); + clientRect = static_cast(CCoeEnv::Static()-> AppUi())->ClientRect(); + symbianAvail = qt_TRect2QRect(clientRect); + QCOMPARE(qtAvail, symbianAvail); + TRAP(err, appUi->SetOrientationL(CAknAppUi::EAppUiOrientationUnspecified)); delete normalWidget; -- cgit v0.12 From 7857e0cf4673fb0defab5af9c60d0c2dea93e55c Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Wed, 15 Dec 2010 18:55:48 +0100 Subject: Doc: typo fixed in doc/src/declarative/extending.qdoc Reviewed-by: TrustMe --- doc/src/declarative/extending.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index e23ca91..748ec6c 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -461,7 +461,7 @@ constructing an animation object and manually setting the animation's "target" property, a property value source can be assigned directly to a property of any type and automatically set up this association. -The example shown here is rather contrived: the \c announcment property of the +The example shown here is rather contrived: the \c announcement property of the \c BirthdayParty object is a string that is printed every time it is assigned and the \c HappyBirthdaySong value source generates the lyrics of the song "Happy Birthday". -- cgit v0.12 From 632016368e26ba06d7d09740a8a1805f4ea911f1 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 17 Dec 2010 15:24:30 +1000 Subject: Update test bitmaps for QDeclarativeImage::svg() autotest on Linux Task-number: Reviewed-by: Martin Jones --- .../declarative/qdeclarativeimage/data/heart.png | Bin 12424 -> 12577 bytes .../declarative/qdeclarativeimage/data/heart200.png | Bin 7943 -> 8063 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart.png b/tests/auto/declarative/qdeclarativeimage/data/heart.png index ff93f6c..abe97fe 100644 Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart.png and b/tests/auto/declarative/qdeclarativeimage/data/heart.png differ diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200.png b/tests/auto/declarative/qdeclarativeimage/data/heart200.png index 5a31ae8..7fbb13c 100644 Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart200.png and b/tests/auto/declarative/qdeclarativeimage/data/heart200.png differ -- cgit v0.12 From c54443507edf98832c67d727746ae4a130a14571 Mon Sep 17 00:00:00 2001 From: Yann Bodson Date: Fri, 17 Dec 2010 15:55:50 +1000 Subject: Support for justification in Text and TextEdit elements. Task-number: QTBUG-13242 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativetext.cpp | 11 +++++++---- src/declarative/graphicsitems/qdeclarativetext_p.h | 3 ++- .../graphicsitems/qdeclarativetextedit.cpp | 1 + .../graphicsitems/qdeclarativetextedit_p.h | 3 ++- .../qdeclarativetext/align/data-MAC/justify.0.png | Bin 0 -> 7233 bytes .../qdeclarativetext/align/data-MAC/justify.qml | 11 +++++++++++ .../qmlvisual/qdeclarativetext/align/justify.qml | 22 +++++++++++++++++++++ .../qdeclarativetextedit/data-MAC/justify.0.png | Bin 0 -> 7233 bytes .../qdeclarativetextedit/data-MAC/justify.qml | 11 +++++++++++ .../qmlvisual/qdeclarativetextedit/justify.qml | 22 +++++++++++++++++++++ 10 files changed, 78 insertions(+), 6 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml diff --git a/src/declarative/graphicsitems/qdeclarativetext.cpp b/src/declarative/graphicsitems/qdeclarativetext.cpp index 303b21c..cf11be6 100644 --- a/src/declarative/graphicsitems/qdeclarativetext.cpp +++ b/src/declarative/graphicsitems/qdeclarativetext.cpp @@ -297,6 +297,8 @@ QSize QDeclarativeTextPrivate::setupTextLayout() lineWidth = q->width(); QTextOption textOption = layout.textOption(); + if (hAlign == QDeclarativeText::AlignJustify) + textOption.setAlignment(Qt::Alignment(hAlign)); textOption.setWrapMode(QTextOption::WrapMode(wrapMode)); layout.setTextOption(textOption); @@ -325,7 +327,7 @@ QSize QDeclarativeTextPrivate::setupTextLayout() height += line.height(); if (!cacheAllTextAsImage) { - if (hAlign == QDeclarativeText::AlignLeft) { + if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) { x = 0; } else if (hAlign == QDeclarativeText::AlignRight) { x = layoutWidth - line.naturalTextWidth(); @@ -351,7 +353,7 @@ QPixmap QDeclarativeTextPrivate::textLayoutImage(bool drawStyle) qreal x = 0; for (int i = 0; i < layout.lineCount(); ++i) { QTextLine line = layout.lineAt(i); - if (hAlign == QDeclarativeText::AlignLeft) { + if ((hAlign == QDeclarativeText::AlignLeft) || (hAlign == QDeclarativeText::AlignJustify)) { x = 0; } else if (hAlign == QDeclarativeText::AlignRight) { x = size.width() - line.naturalTextWidth(); @@ -898,8 +900,8 @@ void QDeclarativeText::setStyleColor(const QColor &color) Sets the horizontal and vertical alignment of the text within the Text items width and height. By default, the text is top-left aligned. - The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight and - \c Text.AlignHCenter. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom + The valid values for \c horizontalAlignment are \c Text.AlignLeft, \c Text.AlignRight, \c Text.AlignHCenter and + \c Text.AlignJustify. The valid values for \c verticalAlignment are \c Text.AlignTop, \c Text.AlignBottom and \c Text.AlignVCenter. Note that for a single line of text, the size of the text is the area of the text. In this common case, @@ -1117,6 +1119,7 @@ QRectF QDeclarativeText::boundingRect() const switch (d->hAlign) { case AlignLeft: + case AlignJustify: x = 0; break; case AlignRight: diff --git a/src/declarative/graphicsitems/qdeclarativetext_p.h b/src/declarative/graphicsitems/qdeclarativetext_p.h index 51434d5..49bff14 100644 --- a/src/declarative/graphicsitems/qdeclarativetext_p.h +++ b/src/declarative/graphicsitems/qdeclarativetext_p.h @@ -82,7 +82,8 @@ public: enum HAlignment { AlignLeft = Qt::AlignLeft, AlignRight = Qt::AlignRight, - AlignHCenter = Qt::AlignHCenter }; + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify }; // ### VERSIONING: Only in QtQuick 1.1 enum VAlignment { AlignTop = Qt::AlignTop, AlignBottom = Qt::AlignBottom, AlignVCenter = Qt::AlignVCenter }; diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index e05f4e4..f37fa62 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -442,6 +442,7 @@ void QDeclarativeTextEdit::setSelectedTextColor(const QColor &color) \o TextEdit.AlignLeft (default) \o TextEdit.AlignRight \o TextEdit.AlignHCenter + \o TextEdit.AlignJustify \endlist Valid values for \c verticalAlignment are: diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 68fde3d..7f12c85 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -97,7 +97,8 @@ public: enum HAlignment { AlignLeft = Qt::AlignLeft, AlignRight = Qt::AlignRight, - AlignHCenter = Qt::AlignHCenter + AlignHCenter = Qt::AlignHCenter, + AlignJustify = Qt::AlignJustify // ### VERSIONING: Only in QtQuick 1.1 }; enum VAlignment { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png new file mode 100644 index 0000000..74c6934 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml new file mode 100644 index 0000000..e4dbeb1 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/data-MAC/justify.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "justify.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml new file mode 100644 index 0000000..c3a7aaa --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetext/align/justify.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 +import "../../shared" 1.0 + +Rectangle { + width: 450 + height: 250 + + TestText { + anchors.fill: parent + anchors { leftMargin: 10; rightMargin: 10; topMargin:10; bottomMargin: 10 } + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignJustify + + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a aliquet massa. Integer id velit a nibh imperdiet sagittis. Cras fringilla enim non nulla porta bibendum. Integer risus urna, hendrerit non interdum ut, dapibus id velit. Nullam fermentum viverra pellentesque. In molestie scelerisque lorem molestie ultrices. Curabitur dolor arcu, tristique in sodales in, varius sed diam. Quisque magna velit, tincidunt sed ullamcorper sit amet, ornare adipiscing ligula. In hac habitasse platea dictumst. Ut tincidunt urna vel mauris fermentum ornare quis a ligula. Suspendisse cursus volutpat sapien eget cursus." + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: "red" + } + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png new file mode 100644 index 0000000..74c6934 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml new file mode 100644 index 0000000..e4dbeb1 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-MAC/justify.qml @@ -0,0 +1,11 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "justify.0.png" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml new file mode 100644 index 0000000..4aeb58c --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/justify.qml @@ -0,0 +1,22 @@ +import QtQuick 1.0 +import "../shared" 1.0 + +Rectangle { + width: 450 + height: 250 + + TestTextEdit { + anchors.fill: parent + anchors { leftMargin: 10; rightMargin: 10; topMargin:10; bottomMargin: 10 } + wrapMode: Text.Wrap + horizontalAlignment: Text.AlignJustify + + text: "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Proin a aliquet massa. Integer id velit a nibh imperdiet sagittis. Cras fringilla enim non nulla porta bibendum. Integer risus urna, hendrerit non interdum ut, dapibus id velit. Nullam fermentum viverra pellentesque. In molestie scelerisque lorem molestie ultrices. Curabitur dolor arcu, tristique in sodales in, varius sed diam. Quisque magna velit, tincidunt sed ullamcorper sit amet, ornare adipiscing ligula. In hac habitasse platea dictumst. Ut tincidunt urna vel mauris fermentum ornare quis a ligula. Suspendisse cursus volutpat sapien eget cursus." + + Rectangle { + anchors.fill: parent + color: "transparent" + border.color: "red" + } + } +} -- cgit v0.12 From e0abcb2ff7a3044305580659f9a432a9630a5943 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 17 Dec 2010 16:18:03 +1000 Subject: Fix QDeclarativeState::reset() autotest Current state reset mechanism does not really work for Text elements as the keeping implicit correct would require relayouting of text twice (See bug QTBUG-15118). Changed QDeclarativeState reset autotest to use Image element instead of Text element until the issue has been fixed. Task-number: Reviewed-by: Yann Bodson --- tests/auto/declarative/qdeclarativestates/data/image.png | Bin 0 -> 173 bytes tests/auto/declarative/qdeclarativestates/data/reset.qml | 9 ++++----- .../qdeclarativestates/tst_qdeclarativestates.cpp | 13 ++++++------- 3 files changed, 10 insertions(+), 12 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativestates/data/image.png diff --git a/tests/auto/declarative/qdeclarativestates/data/image.png b/tests/auto/declarative/qdeclarativestates/data/image.png new file mode 100644 index 0000000..ed1833c Binary files /dev/null and b/tests/auto/declarative/qdeclarativestates/data/image.png differ diff --git a/tests/auto/declarative/qdeclarativestates/data/reset.qml b/tests/auto/declarative/qdeclarativestates/data/reset.qml index 8799c97..a140ffa 100644 --- a/tests/auto/declarative/qdeclarativestates/data/reset.qml +++ b/tests/auto/declarative/qdeclarativestates/data/reset.qml @@ -3,17 +3,16 @@ import QtQuick 1.0 Rectangle { width: 640 height: 480 - Text { - id: theText + Image { + id: image width: 40 - wrapMode: Text.WordWrap - text: "a text string that is longer than 40 pixels" + source: "image.png" } states: State { name: "state1" PropertyChanges { - target: theText + target: image width: undefined } } diff --git a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp index b8409a5..870842c 100644 --- a/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp +++ b/tests/auto/declarative/qdeclarativestates/tst_qdeclarativestates.cpp @@ -44,7 +44,6 @@ #include #include #include -#include #include #include #include @@ -1126,15 +1125,15 @@ void tst_qdeclarativestates::reset() QDeclarativeRectangle *rect = qobject_cast(c.create()); QVERIFY(rect != 0); - QDeclarativeText *text = rect->findChild(); - QVERIFY(text != 0); - QCOMPARE(text->width(), qreal(40.)); - QVERIFY(text->width() < text->height()); + QDeclarativeImage *image = rect->findChild(); + QVERIFY(image != 0); + QCOMPARE(image->width(), qreal(40.)); + QCOMPARE(image->height(), qreal(20.)); QDeclarativeItemPrivate::get(rect)->setState("state1"); - QVERIFY(text->width() > 41); - QVERIFY(text->width() > text->height()); + QCOMPARE(image->width(), 20.0); + QCOMPARE(image->height(), qreal(20.)); } void tst_qdeclarativestates::illegalObjectCreation() -- cgit v0.12 From cdd9209590f9c970ea6f9e0c734f0729610ede2a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 14 Dec 2010 08:54:25 +1000 Subject: Optimization for photoviewer demo. --- demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml index 856a2c7..6248745 100644 --- a/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml +++ b/demos/declarative/photoviewer/PhotoViewerCore/PhotoDelegate.qml @@ -61,7 +61,7 @@ Package { BorderImage { anchors { - fill: border.visible ? border : placeHolder + fill: originalImage.status == Image.Ready ? border : placeHolder leftMargin: -6; topMargin: -6; rightMargin: -8; bottomMargin: -8 } source: 'images/box-shadow.png'; smooth: true -- cgit v0.12 From 139ecc0e74af2795faa55cfd532aeb10c631049e Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 14 Dec 2010 10:20:57 +1000 Subject: Optimize construction of QDeclarativeProperty in state operations. Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativestate.cpp | 2 +- .../util/qdeclarativestateoperations.cpp | 63 ++++++++++++---------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 3915485..6925e03 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -66,7 +66,7 @@ QDeclarativeAction::QDeclarativeAction() QDeclarativeAction::QDeclarativeAction(QObject *target, const QString &propertyName, const QVariant &value) : restore(true), actionDone(false), reverseEvent(false), deletableToBinding(false), - property(target, propertyName), toValue(value), + property(target, propertyName, qmlEngine(target)), toValue(value), fromBinding(0), event(0), specifiedObject(target), specifiedProperty(propertyName) { diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index d1d7822..82360b2 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -367,16 +367,18 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() a.event = this; actions << a; + QDeclarativeContext *ctxt = qmlContext(this); + if (d->xString.isValid()) { bool ok = false; QString script = d->xString.value.script(); qreal x = script.toFloat(&ok); if (ok) { - QDeclarativeAction xa(d->target, QLatin1String("x"), x); + QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, x); actions << xa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"), ctxt)); QDeclarativeAction xa; xa.property = newBinding->property(); xa.toBinding = newBinding; @@ -391,11 +393,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->yString.value.script(); qreal y = script.toFloat(&ok); if (ok) { - QDeclarativeAction ya(d->target, QLatin1String("y"), y); + QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, y); actions << ya; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"), ctxt)); QDeclarativeAction ya; ya.property = newBinding->property(); ya.toBinding = newBinding; @@ -410,11 +412,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->scaleString.value.script(); qreal scale = script.toFloat(&ok); if (ok) { - QDeclarativeAction sa(d->target, QLatin1String("scale"), scale); + QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, scale); actions << sa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"), ctxt)); QDeclarativeAction sa; sa.property = newBinding->property(); sa.toBinding = newBinding; @@ -429,11 +431,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->rotationString.value.script(); qreal rotation = script.toFloat(&ok); if (ok) { - QDeclarativeAction ra(d->target, QLatin1String("rotation"), rotation); + QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, rotation); actions << ra; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"), ctxt)); QDeclarativeAction ra; ra.property = newBinding->property(); ra.toBinding = newBinding; @@ -448,11 +450,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->widthString.value.script(); qreal width = script.toFloat(&ok); if (ok) { - QDeclarativeAction wa(d->target, QLatin1String("width"), width); + QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, width); actions << wa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"), ctxt)); QDeclarativeAction wa; wa.property = newBinding->property(); wa.toBinding = newBinding; @@ -467,11 +469,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QString script = d->heightString.value.script(); qreal height = script.toFloat(&ok); if (ok) { - QDeclarativeAction ha(d->target, QLatin1String("height"), height); + QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, height); actions << ha; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, qmlContext(this)); - newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"))); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"), ctxt)); QDeclarativeAction ha; ha.property = newBinding->property(); ha.toBinding = newBinding; @@ -1075,32 +1077,34 @@ QDeclarativeAnchorChanges::ActionList QDeclarativeAnchorChanges::actions() d->vCenterProp = QDeclarativeProperty(d->target, QLatin1String("anchors.verticalCenter")); d->baselineProp = QDeclarativeProperty(d->target, QLatin1String("anchors.baseline")); + QDeclarativeContext *ctxt = qmlContext(this); + if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::LeftAnchor) { - d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, qmlContext(this)); + d->leftBinding = new QDeclarativeBinding(d->anchorSet->d_func()->leftScript.script(), d->target, ctxt); d->leftBinding->setTarget(d->leftProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::RightAnchor) { - d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, qmlContext(this)); + d->rightBinding = new QDeclarativeBinding(d->anchorSet->d_func()->rightScript.script(), d->target, ctxt); d->rightBinding->setTarget(d->rightProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::HCenterAnchor) { - d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, qmlContext(this)); + d->hCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->hCenterScript.script(), d->target, ctxt); d->hCenterBinding->setTarget(d->hCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::TopAnchor) { - d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, qmlContext(this)); + d->topBinding = new QDeclarativeBinding(d->anchorSet->d_func()->topScript.script(), d->target, ctxt); d->topBinding->setTarget(d->topProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BottomAnchor) { - d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, qmlContext(this)); + d->bottomBinding = new QDeclarativeBinding(d->anchorSet->d_func()->bottomScript.script(), d->target, ctxt); d->bottomBinding->setTarget(d->bottomProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::VCenterAnchor) { - d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, qmlContext(this)); + d->vCenterBinding = new QDeclarativeBinding(d->anchorSet->d_func()->vCenterScript.script(), d->target, ctxt); d->vCenterBinding->setTarget(d->vCenterProp); } if (d->anchorSet->d_func()->usedAnchors & QDeclarativeAnchors::BaselineAnchor) { - d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, qmlContext(this)); + d->baselineBinding = new QDeclarativeBinding(d->anchorSet->d_func()->baselineScript.script(), d->target, ctxt); d->baselineBinding->setTarget(d->baselineProp); } @@ -1380,24 +1384,25 @@ QList QDeclarativeAnchorChanges::additionalActions() bool vChange = combined & QDeclarativeAnchors::Vertical_Mask; if (d->target) { + QDeclarativeContext *ctxt = qmlContext(this); QDeclarativeAction a; if (hChange && d->fromX != d->toX) { - a.property = QDeclarativeProperty(d->target, QLatin1String("x")); + a.property = QDeclarativeProperty(d->target, QLatin1String("x"), ctxt); a.toValue = d->toX; extra << a; } if (vChange && d->fromY != d->toY) { - a.property = QDeclarativeProperty(d->target, QLatin1String("y")); + a.property = QDeclarativeProperty(d->target, QLatin1String("y"), ctxt); a.toValue = d->toY; extra << a; } if (hChange && d->fromWidth != d->toWidth) { - a.property = QDeclarativeProperty(d->target, QLatin1String("width")); + a.property = QDeclarativeProperty(d->target, QLatin1String("width"), ctxt); a.toValue = d->toWidth; extra << a; } if (vChange && d->fromHeight != d->toHeight) { - a.property = QDeclarativeProperty(d->target, QLatin1String("height")); + a.property = QDeclarativeProperty(d->target, QLatin1String("height"), ctxt); a.toValue = d->toHeight; extra << a; } -- cgit v0.12 From 488e616b50707e5b37162e6d0cfc71a1ffdf9bef Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 15 Dec 2010 12:08:13 +1000 Subject: Rewrite/cache bindings created by PropertyChanges. This provides a significant optimization for initial evaluation of bindings specified in a PropertyChanges. Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativebinding.cpp | 14 +++++++++++ src/declarative/qml/qdeclarativebinding_p.h | 3 +++ src/declarative/qml/qdeclarativecompiler.cpp | 29 ++++++++++++++++++++++ src/declarative/qml/qdeclarativecompiler_p.h | 1 + src/declarative/qml/qdeclarativecontext_p.h | 1 - src/declarative/qml/qdeclarativecustomparser.cpp | 9 +++++++ src/declarative/qml/qdeclarativecustomparser_p.h | 3 +++ .../util/qdeclarativepropertychanges.cpp | 26 ++++++++++++++++--- 8 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 309d372..1ead6ce 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -46,6 +46,7 @@ #include "qdeclarativecontext.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativecontext_p.h" +#include "private/qdeclarativecompiler_p.h" #include "private/qdeclarativedata_p.h" #include "private/qdeclarativestringconverters_p.h" #include "private/qdeclarativestate_p_p.h" @@ -233,6 +234,19 @@ QDeclarativeBinding::QDeclarativeBinding(void *data, QDeclarativeRefCount *rc, Q setNotifyOnValueChanged(true); } +QDeclarativeBinding * +QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeContext *ctxt, + const QString &url, int lineNumber, QObject *parent) +{ + QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); + + QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); + QDeclarativeCompiledData *cdata = 0; + if (engine && ctxtdata && !ctxtdata->url.isEmpty()) + cdata = engine->typeLoader.get(ctxtdata->url)->compiledData(); + return cdata ? new QDeclarativeBinding((void*)cdata->datas.at(id).constData(), cdata, obj, ctxtdata, url, lineNumber, parent) : 0; +} + QDeclarativeBinding::QDeclarativeBinding(const QString &str, QObject *obj, QDeclarativeContext *ctxt, QObject *parent) : QDeclarativeExpression(QDeclarativeContextData::get(ctxt), obj, str, *new QDeclarativeBindingPrivate) diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 7823a3d..787a3b9 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -162,6 +162,9 @@ public: virtual void update(QDeclarativePropertyPrivate::WriteFlags flags); virtual QString expression() const; + typedef int Identifier; + static QDeclarativeBinding *createBinding(Identifier, QObject *, QDeclarativeContext *, const QString &, int, QObject *parent=0); + public Q_SLOTS: void update() { update(QDeclarativePropertyPrivate::DontRemoveBinding); } diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4749bf8..4f4ad3f 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2262,6 +2262,35 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) con return qmltype->metaObject(); } +// similar to logic of completeComponentBuild, but also sticks data +// into datas at the end +int QDeclarativeCompiler::rewriteBinding(const QString& expression, const QByteArray& name) +{ + QDeclarativeRewrite::RewriteBinding rewriteBinding; + rewriteBinding.setName('$' + name); + bool isSharable = false; + QString rewrite = rewriteBinding(expression, 0, &isSharable); + + quint32 length = rewrite.length(); + quint32 pc; + + if (isSharable) { + pc = output->cachedClosures.count(); + pc |= 0x80000000; + output->cachedClosures.append(0); + } else { + pc = output->cachedPrograms.length(); + output->cachedPrograms.append(0); + } + + QByteArray compiledData = + QByteArray((const char *)&pc, sizeof(quint32)) + + QByteArray((const char *)&length, sizeof(quint32)) + + QByteArray((const char *)rewrite.constData(), + rewrite.length() * sizeof(QChar)); + + return output->indexForByteArray(compiledData); +} // Ensures that the dynamic meta specification on obj is valid bool QDeclarativeCompiler::checkDynamicMeta(QDeclarativeParser::Object *obj) diff --git a/src/declarative/qml/qdeclarativecompiler_p.h b/src/declarative/qml/qdeclarativecompiler_p.h index 7d76ad9..bface8f 100644 --- a/src/declarative/qml/qdeclarativecompiler_p.h +++ b/src/declarative/qml/qdeclarativecompiler_p.h @@ -161,6 +161,7 @@ public: int evaluateEnum(const QByteArray& script) const; // for QDeclarativeCustomParser::evaluateEnum const QMetaObject *resolveType(const QByteArray& name) const; // for QDeclarativeCustomParser::resolveType + int rewriteBinding(const QString& expression, const QByteArray& name); // for QDeclarativeCustomParser::rewriteBinding private: static void reset(QDeclarativeCompiledData *); diff --git a/src/declarative/qml/qdeclarativecontext_p.h b/src/declarative/qml/qdeclarativecontext_p.h index 6c14feb..6b71381 100644 --- a/src/declarative/qml/qdeclarativecontext_p.h +++ b/src/declarative/qml/qdeclarativecontext_p.h @@ -77,7 +77,6 @@ class QDeclarativeEngine; class QDeclarativeExpression; class QDeclarativeExpressionPrivate; class QDeclarativeAbstractExpression; -class QDeclarativeBinding_Id; class QDeclarativeCompiledBindings; class QDeclarativeContextData; diff --git a/src/declarative/qml/qdeclarativecustomparser.cpp b/src/declarative/qml/qdeclarativecustomparser.cpp index 97a6a00..58ffc56 100644 --- a/src/declarative/qml/qdeclarativecustomparser.cpp +++ b/src/declarative/qml/qdeclarativecustomparser.cpp @@ -304,5 +304,14 @@ const QMetaObject *QDeclarativeCustomParser::resolveType(const QByteArray& name) return compiler->resolveType(name); } +/*! + Rewrites \a expression and returns an identifier that can be + used to construct the binding later. \a name + is used as the name of the rewritten function. +*/ +QDeclarativeBinding::Identifier QDeclarativeCustomParser::rewriteBinding(const QString& expression, const QByteArray& name) +{ + return compiler->rewriteBinding(expression, name); +} QT_END_NAMESPACE diff --git a/src/declarative/qml/qdeclarativecustomparser_p.h b/src/declarative/qml/qdeclarativecustomparser_p.h index c3f9dd2..9b419c2 100644 --- a/src/declarative/qml/qdeclarativecustomparser_p.h +++ b/src/declarative/qml/qdeclarativecustomparser_p.h @@ -56,6 +56,7 @@ #include "private/qdeclarativemetatype_p.h" #include "qdeclarativeerror.h" #include "private/qdeclarativeparser_p.h" +#include "private/qdeclarativebinding_p.h" #include #include @@ -140,6 +141,8 @@ protected: const QMetaObject *resolveType(const QByteArray&) const; + QDeclarativeBinding::Identifier rewriteBinding(const QString&, const QByteArray&); + private: QList exceptions; QDeclarativeCompiler *compiler; diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 8d01b80..400803e 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -42,6 +42,9 @@ #include "private/qdeclarativepropertychanges_p.h" #include "private/qdeclarativeopenmetaobject_p.h" +#include "private/qdeclarativerewrite_p.h" +#include "private/qdeclarativeengine_p.h" +#include "private/qdeclarativecompiler_p.h" #include #include @@ -219,6 +222,7 @@ public: QList > properties; QList > expressions; + QList ids; QList signalReplacements; QDeclarativeProperty property(const QByteArray &); @@ -267,6 +271,7 @@ QDeclarativePropertyChangesParser::compile(const QList(data.at(ii).second); QVariant var; bool isScript = v.isScript(); + QDeclarativeBinding::Identifier id; switch(v.type()) { case QDeclarativeParser::Variant::Boolean: var = QVariant(v.asBoolean()); @@ -280,10 +285,17 @@ QDeclarativePropertyChangesParser::compile(const QList> name; ds >> isScript; ds >> data; + if (isScript) + ds >> id; QDeclarativeProperty prop = property(name); //### better way to check for signal property? if (prop.type() & QDeclarativeProperty::SignalProperty) { @@ -323,6 +338,7 @@ void QDeclarativePropertyChangesPrivate::decode() if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); expressions << qMakePair(name, expression); + ids << id; } else { properties << qMakePair(name, data); } @@ -452,10 +468,14 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.toValue = d->expressions.at(ii).second->evaluate(); } else { QDeclarativeExpression *e = d->expressions.at(ii).second; - QDeclarativeBinding *newBinding = - new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); + + QDeclarativeBinding::Identifier id = d->ids.at(ii); + QDeclarativeBinding *newBinding = QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()); + if (!newBinding) { + newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); + newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); + } newBinding->setTarget(prop); - newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); a.toBinding = newBinding; a.deletableToBinding = true; } -- cgit v0.12 From 24b8dcee5bd51784c341acc708ce3985d85d430a Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Thu, 16 Dec 2010 14:54:28 +1000 Subject: ParentChange optimizations. The QDeclarativeScriptStrings used for the properties are unlikely to change, so we immediately attempt to convert to a real value, rather than converting every time actions() is called. Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- .../util/qdeclarativestateoperations.cpp | 77 ++++++++++++---------- 1 file changed, 41 insertions(+), 36 deletions(-) diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 82360b2..b606ff3 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -83,6 +83,13 @@ public: QDeclarativeNullableValue scaleString; QDeclarativeNullableValue rotationString; + QDeclarativeNullableValue x; + QDeclarativeNullableValue y; + QDeclarativeNullableValue width; + QDeclarativeNullableValue height; + QDeclarativeNullableValue scale; + QDeclarativeNullableValue rotation; + void doChange(QDeclarativeItem *targetParent, QDeclarativeItem *stackBefore = 0); }; @@ -213,10 +220,21 @@ QDeclarativeScriptString QDeclarativeParentChange::x() const return d->xString.value; } +void tryReal(QDeclarativeNullableValue &value, const QString &string) +{ + bool ok = false; + qreal realValue = string.toFloat(&ok); + if (ok) + value = realValue; + else + value.invalidate(); +} + void QDeclarativeParentChange::setX(QDeclarativeScriptString x) { Q_D(QDeclarativeParentChange); d->xString = x; + tryReal(d->x, x.script()); } bool QDeclarativeParentChange::xIsSet() const @@ -235,6 +253,7 @@ void QDeclarativeParentChange::setY(QDeclarativeScriptString y) { Q_D(QDeclarativeParentChange); d->yString = y; + tryReal(d->y, y.script()); } bool QDeclarativeParentChange::yIsSet() const @@ -253,6 +272,7 @@ void QDeclarativeParentChange::setWidth(QDeclarativeScriptString width) { Q_D(QDeclarativeParentChange); d->widthString = width; + tryReal(d->width, width.script()); } bool QDeclarativeParentChange::widthIsSet() const @@ -271,6 +291,7 @@ void QDeclarativeParentChange::setHeight(QDeclarativeScriptString height) { Q_D(QDeclarativeParentChange); d->heightString = height; + tryReal(d->height, height.script()); } bool QDeclarativeParentChange::heightIsSet() const @@ -289,6 +310,7 @@ void QDeclarativeParentChange::setScale(QDeclarativeScriptString scale) { Q_D(QDeclarativeParentChange); d->scaleString = scale; + tryReal(d->scale, scale.script()); } bool QDeclarativeParentChange::scaleIsSet() const @@ -307,6 +329,7 @@ void QDeclarativeParentChange::setRotation(QDeclarativeScriptString rotation) { Q_D(QDeclarativeParentChange); d->rotationString = rotation; + tryReal(d->rotation, rotation.script()); } bool QDeclarativeParentChange::rotationIsSet() const @@ -370,14 +393,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() QDeclarativeContext *ctxt = qmlContext(this); if (d->xString.isValid()) { - bool ok = false; - QString script = d->xString.value.script(); - qreal x = script.toFloat(&ok); - if (ok) { - QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, x); + if (d->x.isValid()) { + QDeclarativeAction xa(d->target, QLatin1String("x"), ctxt, d->x.value); actions << xa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->xString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("x"), ctxt)); QDeclarativeAction xa; xa.property = newBinding->property(); @@ -389,14 +409,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->yString.isValid()) { - bool ok = false; - QString script = d->yString.value.script(); - qreal y = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, y); + if (d->y.isValid()) { + QDeclarativeAction ya(d->target, QLatin1String("y"), ctxt, d->y.value); actions << ya; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->yString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("y"), ctxt)); QDeclarativeAction ya; ya.property = newBinding->property(); @@ -408,14 +425,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->scaleString.isValid()) { - bool ok = false; - QString script = d->scaleString.value.script(); - qreal scale = script.toFloat(&ok); - if (ok) { - QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, scale); + if (d->scale.isValid()) { + QDeclarativeAction sa(d->target, QLatin1String("scale"), ctxt, d->scale.value); actions << sa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->scaleString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("scale"), ctxt)); QDeclarativeAction sa; sa.property = newBinding->property(); @@ -427,14 +441,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->rotationString.isValid()) { - bool ok = false; - QString script = d->rotationString.value.script(); - qreal rotation = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, rotation); + if (d->rotation.isValid()) { + QDeclarativeAction ra(d->target, QLatin1String("rotation"), ctxt, d->rotation.value); actions << ra; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->rotationString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("rotation"), ctxt)); QDeclarativeAction ra; ra.property = newBinding->property(); @@ -446,14 +457,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->widthString.isValid()) { - bool ok = false; - QString script = d->widthString.value.script(); - qreal width = script.toFloat(&ok); - if (ok) { - QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, width); + if (d->width.isValid()) { + QDeclarativeAction wa(d->target, QLatin1String("width"), ctxt, d->width.value); actions << wa; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->widthString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("width"), ctxt)); QDeclarativeAction wa; wa.property = newBinding->property(); @@ -465,14 +473,11 @@ QDeclarativeStateOperation::ActionList QDeclarativeParentChange::actions() } if (d->heightString.isValid()) { - bool ok = false; - QString script = d->heightString.value.script(); - qreal height = script.toFloat(&ok); - if (ok) { - QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, height); + if (d->height.isValid()) { + QDeclarativeAction ha(d->target, QLatin1String("height"), ctxt, d->height.value); actions << ha; } else { - QDeclarativeBinding *newBinding = new QDeclarativeBinding(script, d->target, ctxt); + QDeclarativeBinding *newBinding = new QDeclarativeBinding(d->heightString.value.script(), d->target, ctxt); newBinding->setTarget(QDeclarativeProperty(d->target, QLatin1String("height"), ctxt)); QDeclarativeAction ha; ha.property = newBinding->property(); -- cgit v0.12 From 9536b35d63716e88482baeed34d11509ed724606 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Fri, 17 Dec 2010 16:32:24 +1000 Subject: Fix PropertyChange's binding rewriting for 'dot' properties. For cases like PropertyChanges { font.pixelSize: myPixelSize } it was attempting to rewrite the function name as font.pixelSize, which is not syntactically correct. We now rewrite the function name as pixelSize. --- src/declarative/qml/qdeclarativecompiler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index 4f4ad3f..b2b0990 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -2267,7 +2267,7 @@ const QMetaObject *QDeclarativeCompiler::resolveType(const QByteArray& name) con int QDeclarativeCompiler::rewriteBinding(const QString& expression, const QByteArray& name) { QDeclarativeRewrite::RewriteBinding rewriteBinding; - rewriteBinding.setName('$' + name); + rewriteBinding.setName('$' + name.mid(name.lastIndexOf('.') + 1)); bool isSharable = false; QString rewrite = rewriteBinding(expression, 0, &isSharable); -- cgit v0.12 From 84456ce081fa3c2e2f10b5162c70566f98124b0f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 18 Nov 2010 10:32:36 +0100 Subject: QDeclarativeDebug: Rename member variable 'client' points to the QDeclarativeDebugConnection object, so better name it 'connection' then. Reviewed-by: Christiaan Janssen --- .../debugger/qdeclarativedebugclient.cpp | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/declarative/debugger/qdeclarativedebugclient.cpp b/src/declarative/debugger/qdeclarativedebugclient.cpp index f5c5751..204ca4f 100644 --- a/src/declarative/debugger/qdeclarativedebugclient.cpp +++ b/src/declarative/debugger/qdeclarativedebugclient.cpp @@ -61,7 +61,7 @@ public: QDeclarativeDebugClientPrivate(); QString name; - QDeclarativeDebugConnection *client; + QDeclarativeDebugConnection *connection; }; class QDeclarativeDebugConnectionPrivate : public QObject @@ -202,7 +202,7 @@ QDeclarativeDebugConnection::~QDeclarativeDebugConnection() { QHash::iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { - iter.value()->d_func()->client = 0; + iter.value()->d_func()->connection = 0; iter.value()->statusChanged(QDeclarativeDebugClient::NotConnected); } } @@ -213,7 +213,7 @@ bool QDeclarativeDebugConnection::isConnected() const } QDeclarativeDebugClientPrivate::QDeclarativeDebugClientPrivate() -: client(0) +: connection(0) { } @@ -223,26 +223,26 @@ QDeclarativeDebugClient::QDeclarativeDebugClient(const QString &name, { Q_D(QDeclarativeDebugClient); d->name = name; - d->client = parent; + d->connection = parent; - if (!d->client) + if (!d->connection) return; - if (d->client->d->plugins.contains(name)) { + if (d->connection->d->plugins.contains(name)) { qWarning() << "QDeclarativeDebugClient: Conflicting plugin name" << name; - d->client = 0; + d->connection = 0; } else { - d->client->d->plugins.insert(name, this); - d->client->d->advertisePlugins(); + d->connection->d->plugins.insert(name, this); + d->connection->d->advertisePlugins(); } } QDeclarativeDebugClient::~QDeclarativeDebugClient() { Q_D(const QDeclarativeDebugClient); - if (d->client && d->client->d) { - d->client->d->plugins.remove(d->name); - d->client->d->advertisePlugins(); + if (d->connection && d->connection->d) { + d->connection->d->plugins.remove(d->name); + d->connection->d->advertisePlugins(); } } @@ -255,12 +255,12 @@ QString QDeclarativeDebugClient::name() const QDeclarativeDebugClient::Status QDeclarativeDebugClient::status() const { Q_D(const QDeclarativeDebugClient); - if (!d->client - || !d->client->isConnected() - || !d->client->d->gotHello) + if (!d->connection + || !d->connection->isConnected() + || !d->connection->d->gotHello) return NotConnected; - if (d->client->d->serverPlugins.contains(d->name)) + if (d->connection->d->serverPlugins.contains(d->name)) return Enabled; return Unavailable; @@ -275,8 +275,8 @@ void QDeclarativeDebugClient::sendMessage(const QByteArray &message) QPacket pack; pack << d->name << message; - d->client->d->protocol->send(pack); - d->client->d->q->flush(); + d->connection->d->protocol->send(pack); + d->connection->d->q->flush(); } void QDeclarativeDebugClient::statusChanged(Status) -- cgit v0.12 From 5d251ef253065d68967ae3263b3cf7f1d93d7a00 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 18 Nov 2010 14:54:24 +0100 Subject: QDeclarativeDebug: Decouple QDDServer, QDDService classes Move QDeclarativeDebugServer class into it's own files and make the classes less interdependent. --- src/declarative/debugger/debugger.pri | 7 +- .../debugger/qdeclarativedebugserver.cpp | 366 +++++++++++++++++++++ .../debugger/qdeclarativedebugserver_p.h | 89 +++++ .../debugger/qdeclarativedebugservice.cpp | 319 +----------------- .../debugger/qdeclarativedebugservice_p_p.h | 71 ++++ 5 files changed, 541 insertions(+), 311 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebugserver.cpp create mode 100644 src/declarative/debugger/qdeclarativedebugserver_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugservice_p_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 25f7687..144d896 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -7,13 +7,16 @@ SOURCES += \ $$PWD/qdeclarativedebugclient.cpp \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ - $$PWD/qdeclarativedebughelper.cpp + $$PWD/qdeclarativedebughelper.cpp \ + $$PWD/qdeclarativedebugserver.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ $$PWD/qpacketprotocol_p.h \ $$PWD/qdeclarativedebugservice_p.h \ + $$PWD/qdeclarativedebugservice_p_p.h \ $$PWD/qdeclarativedebugclient_p.h \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ - $$PWD/qdeclarativedebughelper_p.h + $$PWD/qdeclarativedebughelper_p.h \ + $$PWD/qdeclarativedebugserver_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp new file mode 100644 index 0000000..4bb4e2c --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -0,0 +1,366 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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$ +** +****************************************************************************/ + +#include "private/qdeclarativedebugserver_p.h" +#include "private/qdeclarativedebugservice_p.h" +#include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativeengine_p.h" + +#include "private/qpacketprotocol_p.h" + +#include + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +/* + QDeclarativeDebug Protocol (Version 1): + + handshake: + 1. Client sends + "QDeclarativeDebugServer" 0 version pluginNames + version: an int representing the highest protocol version the client knows + pluginNames: plugins available on client side + 2. Server sends + "QDeclarativeDebugClient" 0 version pluginNames + version: an int representing the highest protocol version the client & server know + pluginNames: plugins available on server side. plugins both in the client and server message are enabled. + client plugin advertisement + 1. Client sends + "QDeclarativeDebugServer" 1 pluginNames + server plugin advertisement + 1. Server sends + "QDeclarativeDebugClient" 1 pluginNames + plugin communication: + Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. + */ + +const int protocolVersion = 1; + + +class QDeclarativeDebugServerPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeDebugServer) +public: + QDeclarativeDebugServerPrivate(); + + void advertisePlugins(); + + int port; + QTcpSocket *connection; + QPacketProtocol *protocol; + QHash plugins; + QStringList clientPlugins; + QTcpServer *tcpServer; + bool gotHello; +}; + +QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() +: connection(0), protocol(0), gotHello(false) +{ +} + +void QDeclarativeDebugServerPrivate::advertisePlugins() +{ + if (!connection + || connection->state() != QTcpSocket::ConnectedState + || !gotHello) + return; + + QPacket pack; + pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); + protocol->send(pack); + connection->flush(); +} + +void QDeclarativeDebugServer::listen() +{ + Q_D(QDeclarativeDebugServer); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + +void QDeclarativeDebugServer::waitForConnection() +{ + Q_D(QDeclarativeDebugServer); + d->tcpServer->waitForNewConnection(-1); +} + +void QDeclarativeDebugServer::newConnection() +{ + Q_D(QDeclarativeDebugServer); + + if (d->connection) { + qWarning("QDeclarativeDebugServer error: another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->connection = d->tcpServer->nextPendingConnection(); + d->connection->setParent(this); + d->protocol = new QPacketProtocol(d->connection, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + +bool QDeclarativeDebugServer::hasDebuggingClient() const +{ + Q_D(const QDeclarativeDebugServer); + return d->connection + && (d->connection->state() == QTcpSocket::ConnectedState) + && d->gotHello; +} + +QDeclarativeDebugServer *QDeclarativeDebugServer::instance() +{ + static bool commandLineTested = false; + static QDeclarativeDebugServer *server = 0; + + if (!commandLineTested) { + commandLineTested = true; + +#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL + QApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); + // ### remove port definition when protocol is changed + int port = 0; + bool block = false; + bool ok = false; + + // format: qmljsdebugger=port:3768[,block] + if (!appD->qmljsDebugArgumentsString().isEmpty()) { + if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { + const QString message = + QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Debugging has not been enabled.").arg( + appD->qmljsDebugArgumentsString()); + qWarning("%s", qPrintable(message)); + return 0; + } + + if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { + int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); + port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); + } + block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); + + if (ok) { + server = new QDeclarativeDebugServer(port); + server->listen(); + if (block) { + server->waitForConnection(); + } + } else { + qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " + "Format is -qmljsdebugger=port:[,block]").arg( + appD->qmljsDebugArgumentsString()).toAscii().constData()); + } + } +#endif + } + + return server; +} + +QDeclarativeDebugServer::QDeclarativeDebugServer(int port) +: QObject(*(new QDeclarativeDebugServerPrivate)) +{ + Q_D(QDeclarativeDebugServer); + d->port = port; +} + +void QDeclarativeDebugServer::readyRead() +{ + Q_D(QDeclarativeDebugServer); + + if (!d->gotHello) { + QPacket hello = d->protocol->read(); + + QString name; + int op; + hello >> name >> op; + + if (name != QLatin1String("QDeclarativeDebugServer") + || op != 0) { + qWarning("QDeclarativeDebugServer: Invalid hello message"); + QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + d->protocol->deleteLater(); + d->protocol = 0; + d->connection->deleteLater(); + d->connection = 0; + return; + } + + int version; + hello >> version >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(iter.key())) + newStatus = QDeclarativeDebugService::Enabled; + iter.value()->d_func()->status = newStatus; + iter.value()->statusChanged(newStatus); + } + + QPacket helloAnswer; + helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); + d->protocol->send(helloAnswer); + d->connection->flush(); + + d->gotHello = true; + qWarning("QDeclarativeDebugServer: Connection established"); + } + + QString debugServer(QLatin1String("QDeclarativeDebugServer")); + + while (d->protocol->packetsAvailable()) { + QPacket pack = d->protocol->read(); + + QString name; + pack >> name; + + if (name == debugServer) { + int op = -1; + pack >> op; + + if (op == 1) { + // Service Discovery + QStringList oldClientPlugins = d->clientPlugins; + pack >> d->clientPlugins; + + QHash::Iterator iter = d->plugins.begin(); + for (; iter != d->plugins.end(); ++iter) { + const QString pluginName = iter.key(); + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(pluginName)) + newStatus = QDeclarativeDebugService::Enabled; + + if (oldClientPlugins.contains(pluginName) + != d->clientPlugins.contains(pluginName)) { + iter.value()->d_func()->status = newStatus; + iter.value()->statusChanged(newStatus); + } + } + } else { + qWarning("QDeclarativeDebugServer: Invalid control message %d", op); + } + } else { + QByteArray message; + pack >> message; + + QHash::Iterator iter = + d->plugins.find(name); + if (iter == d->plugins.end()) { + qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name; + } else { + (*iter)->messageReceived(message); + } + } + } +} + + +QList QDeclarativeDebugServer::services() const +{ + const Q_D(QDeclarativeDebugServer); + return d->plugins.values(); +} + +QStringList QDeclarativeDebugServer::serviceNames() const +{ + const Q_D(QDeclarativeDebugServer); + return d->plugins.keys(); +} + +bool QDeclarativeDebugServer::addService(QDeclarativeDebugService *service) +{ + Q_D(QDeclarativeDebugServer); + if (!service || d->plugins.contains(service->name())) + return false; + + d->plugins.insert(service->name(), service); + d->advertisePlugins(); + + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; + if (d->clientPlugins.contains(service->name())) + newStatus = QDeclarativeDebugService::Enabled; + service->d_func()->status = newStatus; + service->statusChanged(newStatus); + return true; +} + +bool QDeclarativeDebugServer::removeService(QDeclarativeDebugService *service) +{ + Q_D(QDeclarativeDebugServer); + if (!service || !d->plugins.contains(service->name())) + return false; + + d->plugins.remove(service->name()); + d->advertisePlugins(); + + QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::NotConnected; + service->d_func()->server = 0; + service->d_func()->status = newStatus; + service->statusChanged(newStatus); + return true; +} + +void QDeclarativeDebugServer::sendMessage(QDeclarativeDebugService *service, + const QByteArray &message) +{ + Q_D(QDeclarativeDebugServer); + QPacket pack; + pack << service->name() << message; + d->protocol->send(pack); + d->connection->flush(); +} + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h new file mode 100644 index 0000000..6840d63 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEDEBUGSERVER_H +#define QDECLARATIVEDEBUGSERVER_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugService; + +class QDeclarativeDebugServerPrivate; +class QDeclarativeDebugServer : public QObject +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugServer) + Q_DISABLE_COPY(QDeclarativeDebugServer) +public: + static QDeclarativeDebugServer *instance(); + void listen(); + void waitForConnection(); + bool hasDebuggingClient() const; + + QList services() const; + QStringList serviceNames() const; + + bool addService(QDeclarativeDebugService *service); + bool removeService(QDeclarativeDebugService *service); + + void sendMessage(QDeclarativeDebugService *service, const QByteArray &message); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + friend class QDeclarativeDebugService; + friend class QDeclarativeDebugServicePrivate; + QDeclarativeDebugServer(int); +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_H diff --git a/src/declarative/debugger/qdeclarativedebugservice.cpp b/src/declarative/debugger/qdeclarativedebugservice.cpp index 849df73..9d321da 100644 --- a/src/declarative/debugger/qdeclarativedebugservice.cpp +++ b/src/declarative/debugger/qdeclarativedebugservice.cpp @@ -40,301 +40,14 @@ ****************************************************************************/ #include "private/qdeclarativedebugservice_p.h" +#include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativedebugserver_p.h" -#include "private/qpacketprotocol_p.h" -#include "private/qdeclarativeengine_p.h" - -#include -#include -#include -#include - -#include -#include -#include +#include +#include QT_BEGIN_NAMESPACE -/* - QDeclarativeDebug Protocol (Version 1): - - handshake: - 1. Client sends - "QDeclarativeDebugServer" 0 version pluginNames - version: an int representing the highest protocol version the client knows - pluginNames: plugins available on client side - 2. Server sends - "QDeclarativeDebugClient" 0 version pluginNames - version: an int representing the highest protocol version the client & server know - pluginNames: plugins available on server side. plugins both in the client and server message are enabled. - client plugin advertisement - 1. Client sends - "QDeclarativeDebugServer" 1 pluginNames - server plugin advertisement - 1. Server sends - "QDeclarativeDebugClient" 1 pluginNames - plugin communication: - Everything send with a header different to "QDeclarativeDebugServer" is sent to the appropriate plugin. - */ - -const int protocolVersion = 1; - -class QDeclarativeDebugServerPrivate; -class QDeclarativeDebugServer : public QObject -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugServer) - Q_DISABLE_COPY(QDeclarativeDebugServer) -public: - static QDeclarativeDebugServer *instance(); - void listen(); - void waitForConnection(); - bool hasDebuggingClient() const; - -private Q_SLOTS: - void readyRead(); - void newConnection(); - -private: - friend class QDeclarativeDebugService; - friend class QDeclarativeDebugServicePrivate; - QDeclarativeDebugServer(int); -}; - -class QDeclarativeDebugServerPrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeDebugServer) -public: - QDeclarativeDebugServerPrivate(); - - void advertisePlugins(); - - int port; - QTcpSocket *connection; - QPacketProtocol *protocol; - QHash plugins; - QStringList clientPlugins; - QTcpServer *tcpServer; - bool gotHello; -}; - -class QDeclarativeDebugServicePrivate : public QObjectPrivate -{ - Q_DECLARE_PUBLIC(QDeclarativeDebugService) -public: - QDeclarativeDebugServicePrivate(); - - QString name; - QDeclarativeDebugServer *server; -}; - -QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() -: connection(0), protocol(0), gotHello(false) -{ -} - -void QDeclarativeDebugServerPrivate::advertisePlugins() -{ - if (!connection - || connection->state() != QTcpSocket::ConnectedState - || !gotHello) - return; - - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); - protocol->send(pack); - connection->flush(); -} - -void QDeclarativeDebugServer::listen() -{ - Q_D(QDeclarativeDebugServer); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServer::waitForConnection() -{ - Q_D(QDeclarativeDebugServer); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServer::newConnection() -{ - Q_D(QDeclarativeDebugServer); - - if (d->connection) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; - } - - d->connection = d->tcpServer->nextPendingConnection(); - d->connection->setParent(this); - d->protocol = new QPacketProtocol(d->connection, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); -} - -bool QDeclarativeDebugServer::hasDebuggingClient() const -{ - Q_D(const QDeclarativeDebugServer); - return d->connection - && (d->connection->state() == QTcpSocket::ConnectedState) - && d->gotHello; -} - -QDeclarativeDebugServer *QDeclarativeDebugServer::instance() -{ - static bool commandLineTested = false; - static QDeclarativeDebugServer *server = 0; - - if (!commandLineTested) { - commandLineTested = true; - -#ifndef QDECLARATIVE_NO_DEBUG_PROTOCOL - QApplicationPrivate *appD = static_cast(QObjectPrivate::get(qApp)); - // ### remove port definition when protocol is changed - int port = 0; - bool block = false; - bool ok = false; - - // format: qmljsdebugger=port:3768[,block] - if (!appD->qmljsDebugArgumentsString().isEmpty()) { - if (!QDeclarativeEnginePrivate::qml_debugging_enabled) { - qWarning() << QString::fromLatin1("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " - "Debugging has not been enabled.").arg( - appD->qmljsDebugArgumentsString()).toAscii().constData(); - return 0; - } - - if (appD->qmljsDebugArgumentsString().indexOf(QLatin1String("port:")) == 0) { - int separatorIndex = appD->qmljsDebugArgumentsString().indexOf(QLatin1Char(',')); - port = appD->qmljsDebugArgumentsString().mid(5, separatorIndex - 5).toInt(&ok); - } - block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); - - if (ok) { - server = new QDeclarativeDebugServer(port); - server->listen(); - if (block) { - server->waitForConnection(); - } - } else { - const QString message = - QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " - "Format is -qmljsdebugger=port:[,block]"). - arg(appD->qmljsDebugArgumentsString()); - qWarning("%s", qPrintable(message)); - } - } -#endif - } - - return server; -} - -QDeclarativeDebugServer::QDeclarativeDebugServer(int port) -: QObject(*(new QDeclarativeDebugServerPrivate)) -{ - Q_D(QDeclarativeDebugServer); - d->port = port; -} - -void QDeclarativeDebugServer::readyRead() -{ - Q_D(QDeclarativeDebugServer); - - if (!d->gotHello) { - QPacket hello = d->protocol->read(); - - QString name; - int op; - hello >> name >> op; - - if (name != QLatin1String("QDeclarativeDebugServer") - || op != 0) { - qWarning("QDeclarativeDebugServer: Invalid hello message"); - QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - d->protocol->deleteLater(); - d->protocol = 0; - d->connection->deleteLater(); - d->connection = 0; - return; - } - - int version; - hello >> version >> d->clientPlugins; - - QHash::Iterator iter = d->plugins.begin(); - for (; iter != d->plugins.end(); ++iter) { - QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; - if (d->clientPlugins.contains(iter.key())) - newStatus = QDeclarativeDebugService::Enabled; - iter.value()->statusChanged(newStatus); - } - - QPacket helloAnswer; - helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); - d->protocol->send(helloAnswer); - d->connection->flush(); - - d->gotHello = true; - qWarning("QDeclarativeDebugServer: Connection established"); - } - - QString debugServer(QLatin1String("QDeclarativeDebugServer")); - - while (d->protocol->packetsAvailable()) { - QPacket pack = d->protocol->read(); - - QString name; - pack >> name; - - if (name == debugServer) { - int op = -1; - pack >> op; - - if (op == 1) { - // Service Discovery - QStringList oldClientPlugins = d->clientPlugins; - pack >> d->clientPlugins; - - QHash::Iterator iter = d->plugins.begin(); - for (; iter != d->plugins.end(); ++iter) { - const QString pluginName = iter.key(); - QDeclarativeDebugService::Status newStatus = QDeclarativeDebugService::Unavailable; - if (d->clientPlugins.contains(pluginName)) - newStatus = QDeclarativeDebugService::Enabled; - - if (oldClientPlugins.contains(pluginName) - != d->clientPlugins.contains(pluginName)) { - iter.value()->statusChanged(newStatus); - } - } - } else { - qWarning("QDeclarativeDebugServer: Invalid control message %d", op); - } - } else { - QByteArray message; - pack >> message; - - QHash::Iterator iter = - d->plugins.find(name); - if (iter == d->plugins.end()) { - qWarning() << "QDeclarativeDebugServer: Message received for missing plugin" << name; - } else { - (*iter)->messageReceived(message); - } - } - } -} - QDeclarativeDebugServicePrivate::QDeclarativeDebugServicePrivate() : server(0) { @@ -346,16 +59,16 @@ QDeclarativeDebugService::QDeclarativeDebugService(const QString &name, QObject Q_D(QDeclarativeDebugService); d->name = name; d->server = QDeclarativeDebugServer::instance(); + d->status = QDeclarativeDebugService::NotConnected; if (!d->server) return; - if (d->server->d_func()->plugins.contains(name)) { + if (d->server->serviceNames().contains(name)) { qWarning() << "QDeclarativeDebugService: Conflicting plugin name" << name; d->server = 0; } else { - d->server->d_func()->plugins.insert(name, this); - d->server->d_func()->advertisePlugins(); + d->server->addService(this); } } @@ -363,8 +76,7 @@ QDeclarativeDebugService::~QDeclarativeDebugService() { Q_D(const QDeclarativeDebugService); if (d->server) { - d->server->d_func()->plugins.remove(d->name); - d->server->d_func()->advertisePlugins(); + d->server->removeService(this); } } @@ -377,13 +89,7 @@ QString QDeclarativeDebugService::name() const QDeclarativeDebugService::Status QDeclarativeDebugService::status() const { Q_D(const QDeclarativeDebugService); - if (!d->server - || !d->server->hasDebuggingClient()) - return NotConnected; - if (d->server->d_func()->clientPlugins.contains(d->name)) - return Enabled; - - return Unavailable; + return d->status; } namespace { @@ -500,10 +206,7 @@ void QDeclarativeDebugService::sendMessage(const QByteArray &message) if (status() != Enabled) return; - QPacket pack; - pack << d->name << message; - d->server->d_func()->protocol->send(pack); - d->server->d_func()->connection->flush(); + d->server->sendMessage(this, message); } void QDeclarativeDebugService::statusChanged(Status) @@ -515,5 +218,3 @@ void QDeclarativeDebugService::messageReceived(const QByteArray &) } QT_END_NAMESPACE - -#include diff --git a/src/declarative/debugger/qdeclarativedebugservice_p_p.h b/src/declarative/debugger/qdeclarativedebugservice_p_p.h new file mode 100644 index 0000000..d2c8dda --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservice_p_p.h @@ -0,0 +1,71 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEDEBUGSERVICE_P_H +#define QDECLARATIVEDEBUGSERVICE_P_H + +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServer; + +class QDeclarativeDebugServicePrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeDebugService) +public: + QDeclarativeDebugServicePrivate(); + + QString name; + QDeclarativeDebugServer *server; + QDeclarativeDebugService::Status status; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVICE_P_H -- cgit v0.12 From 5336e1838a95d97d34863b668ff797582c226e79 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Wed, 24 Nov 2010 19:50:09 +0100 Subject: QDeclarativeDebug: Move networking code out of QDeclarativeDebugServer Move socket handling code out of QDeclarativeDebugServer into a QDeclarativeDebugServer(Tcp)Connection class. Reviewed-by: Christiaan Janssen --- src/declarative/debugger/debugger.pri | 8 +- .../debugger/qdeclarativedebugserver.cpp | 131 ++++++----------- .../debugger/qdeclarativedebugserver_p.h | 13 +- .../debugger/qdeclarativedebugserverconnection_p.h | 68 +++++++++ .../debugger/qdeclarativedebugserverplugin_p.h | 0 .../qdeclarativedebugservertcpconnection.cpp | 163 +++++++++++++++++++++ .../qdeclarativedebugservertcpconnection_p.h | 86 +++++++++++ src/declarative/debugger/qpacketprotocol.cpp | 8 + src/declarative/debugger/qpacketprotocol_p.h | 1 + 9 files changed, 383 insertions(+), 95 deletions(-) create mode 100644 src/declarative/debugger/qdeclarativedebugserverconnection_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugserverplugin_p.h create mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp create mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 144d896..e7354dc 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -8,7 +8,8 @@ SOURCES += \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ - $$PWD/qdeclarativedebugserver.cpp + $$PWD/qdeclarativedebugserver.cpp \ + $$PWD/qdeclarativedebugservertcpconnection.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -19,4 +20,7 @@ HEADERS += \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ $$PWD/qdeclarativedebughelper_p.h \ - $$PWD/qdeclarativedebugserver_p.h + $$PWD/qdeclarativedebugserverplugin_p.h \ + $$PWD/qdeclarativedebugserver_p.h \ + $$PWD/qdeclarativedebugservertcpconnection_p.h \ + debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 4bb4e2c..6085e3e 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -42,15 +42,11 @@ #include "private/qdeclarativedebugserver_p.h" #include "private/qdeclarativedebugservice_p.h" #include "private/qdeclarativedebugservice_p_p.h" +#include "private/qdeclarativedebugservertcpconnection_p.h" #include "private/qdeclarativeengine_p.h" -#include "private/qpacketprotocol_p.h" - #include -#include -#include - #include #include @@ -89,73 +85,36 @@ public: void advertisePlugins(); - int port; - QTcpSocket *connection; - QPacketProtocol *protocol; + QDeclarativeDebugServerConnection *connection; QHash plugins; QStringList clientPlugins; - QTcpServer *tcpServer; bool gotHello; }; -QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() -: connection(0), protocol(0), gotHello(false) +QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : + connection(0), + gotHello(false) { } void QDeclarativeDebugServerPrivate::advertisePlugins() { - if (!connection - || connection->state() != QTcpSocket::ConnectedState - || !gotHello) + if (!gotHello) return; - QPacket pack; - pack << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); - protocol->send(pack); - connection->flush(); -} - -void QDeclarativeDebugServer::listen() -{ - Q_D(QDeclarativeDebugServer); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServer::waitForConnection() -{ - Q_D(QDeclarativeDebugServer); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServer::newConnection() -{ - Q_D(QDeclarativeDebugServer); - - if (d->connection) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; + QByteArray message; + { + QDataStream out(&message, QIODevice::WriteOnly); + out << QString(QLatin1String("QDeclarativeDebugClient")) << 1 << plugins.keys(); } - - d->connection = d->tcpServer->nextPendingConnection(); - d->connection->setParent(this); - d->protocol = new QPacketProtocol(d->connection, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); + connection->send(message); } bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); return d->connection - && (d->connection->state() == QTcpSocket::ConnectedState) + && d->connection->isConnected() && d->gotHello; } @@ -192,11 +151,17 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() block = appD->qmljsDebugArgumentsString().contains(QLatin1String("block")); if (ok) { - server = new QDeclarativeDebugServer(port); - server->listen(); + server = new QDeclarativeDebugServer(); + + QDeclarativeDebugServerTcpConnection *tcpConnection + = new QDeclarativeDebugServerTcpConnection(port, server); + + tcpConnection->listen(); if (block) { - server->waitForConnection(); + tcpConnection->waitForConnection(); } + + server->d_func()->connection = tcpConnection; } else { qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( @@ -209,37 +174,31 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() return server; } -QDeclarativeDebugServer::QDeclarativeDebugServer(int port) +QDeclarativeDebugServer::QDeclarativeDebugServer() : QObject(*(new QDeclarativeDebugServerPrivate)) { - Q_D(QDeclarativeDebugServer); - d->port = port; } -void QDeclarativeDebugServer::readyRead() +void QDeclarativeDebugServer::receiveMessage(const QByteArray &message) { Q_D(QDeclarativeDebugServer); + QDataStream in(message); if (!d->gotHello) { - QPacket hello = d->protocol->read(); QString name; int op; - hello >> name >> op; + in >> name >> op; if (name != QLatin1String("QDeclarativeDebugServer") || op != 0) { qWarning("QDeclarativeDebugServer: Invalid hello message"); - QObject::disconnect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); - d->protocol->deleteLater(); - d->protocol = 0; - d->connection->deleteLater(); - d->connection = 0; + d->connection->disconnect(); return; } int version; - hello >> version >> d->clientPlugins; + in >> version >> d->clientPlugins; QHash::Iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { @@ -250,31 +209,30 @@ void QDeclarativeDebugServer::readyRead() iter.value()->statusChanged(newStatus); } - QPacket helloAnswer; - helloAnswer << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); - d->protocol->send(helloAnswer); - d->connection->flush(); + QByteArray helloAnswer; + { + QDataStream out(&helloAnswer, QIODevice::WriteOnly); + out << QString(QLatin1String("QDeclarativeDebugClient")) << 0 << protocolVersion << d->plugins.keys(); + } + d->connection->send(helloAnswer); d->gotHello = true; qWarning("QDeclarativeDebugServer: Connection established"); - } + } else { - QString debugServer(QLatin1String("QDeclarativeDebugServer")); - - while (d->protocol->packetsAvailable()) { - QPacket pack = d->protocol->read(); + QString debugServer(QLatin1String("QDeclarativeDebugServer")); QString name; - pack >> name; + in >> name; if (name == debugServer) { int op = -1; - pack >> op; + in >> op; if (op == 1) { // Service Discovery QStringList oldClientPlugins = d->clientPlugins; - pack >> d->clientPlugins; + in >> d->clientPlugins; QHash::Iterator iter = d->plugins.begin(); for (; iter != d->plugins.end(); ++iter) { @@ -294,7 +252,7 @@ void QDeclarativeDebugServer::readyRead() } } else { QByteArray message; - pack >> message; + in >> message; QHash::Iterator iter = d->plugins.find(name); @@ -307,7 +265,6 @@ void QDeclarativeDebugServer::readyRead() } } - QList QDeclarativeDebugServer::services() const { const Q_D(QDeclarativeDebugServer); @@ -357,10 +314,12 @@ void QDeclarativeDebugServer::sendMessage(QDeclarativeDebugService *service, const QByteArray &message) { Q_D(QDeclarativeDebugServer); - QPacket pack; - pack << service->name() << message; - d->protocol->send(pack); - d->connection->flush(); + QByteArray msg; + { + QDataStream out(&msg, QIODevice::WriteOnly); + out << service->name() << message; + } + d->connection->send(msg); } QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h index 6840d63..93ab10b 100644 --- a/src/declarative/debugger/qdeclarativedebugserver_p.h +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -43,6 +43,7 @@ #define QDECLARATIVEDEBUGSERVER_H #include +#include QT_BEGIN_HEADER @@ -60,8 +61,9 @@ class QDeclarativeDebugServer : public QObject Q_DISABLE_COPY(QDeclarativeDebugServer) public: static QDeclarativeDebugServer *instance(); - void listen(); - void waitForConnection(); + + void setConnection(QDeclarativeDebugServerConnection *connection); + bool hasDebuggingClient() const; QList services() const; @@ -71,15 +73,12 @@ public: bool removeService(QDeclarativeDebugService *service); void sendMessage(QDeclarativeDebugService *service, const QByteArray &message); - -private Q_SLOTS: - void readyRead(); - void newConnection(); + void receiveMessage(const QByteArray &message); private: friend class QDeclarativeDebugService; friend class QDeclarativeDebugServicePrivate; - QDeclarativeDebugServer(int); + QDeclarativeDebugServer(); }; QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h new file mode 100644 index 0000000..4175126 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEDEBUGSERVERCONNECTION_H +#define QDECLARATIVEDEBUGSERVERCONNECTION_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeDebugServerConnection +{ +public: + QDeclarativeDebugServerConnection() {} + virtual ~QDeclarativeDebugServerConnection() {} + + virtual bool isConnected() const = 0; + virtual void send(const QByteArray &message) = 0; + virtual void disconnect() = 0; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVERCONNECTION_H diff --git a/src/declarative/debugger/qdeclarativedebugserverplugin_p.h b/src/declarative/debugger/qdeclarativedebugserverplugin_p.h new file mode 100644 index 0000000..e69de29 diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp new file mode 100644 index 0000000..223c875 --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp @@ -0,0 +1,163 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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$ +** +****************************************************************************/ + +#include "qdeclarativedebugservertcpconnection_p.h" + +#include "qdeclarativedebugserver_p.h" +#include "private/qpacketprotocol_p.h" + +#include +#include + + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServerTcpConnectionPrivate { +public: + QDeclarativeDebugServerTcpConnectionPrivate(); + + int port; + QTcpSocket *socket; + QPacketProtocol *protocol; + QTcpServer *tcpServer; + + QDeclarativeDebugServer *debugServer; +}; + +QDeclarativeDebugServerTcpConnectionPrivate::QDeclarativeDebugServerTcpConnectionPrivate() : + port(0), + socket(0), + protocol(0), + tcpServer(0), + debugServer(0) +{ +} + +QDeclarativeDebugServerTcpConnection::QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server) : + QObject(server), + d_ptr(new QDeclarativeDebugServerTcpConnectionPrivate) +{ + Q_D(QDeclarativeDebugServerTcpConnection); + d->port = port; + d->debugServer = server; +} + +QDeclarativeDebugServerTcpConnection::~QDeclarativeDebugServerTcpConnection() +{ + delete d_ptr; +} + +bool QDeclarativeDebugServerTcpConnection::isConnected() const +{ + Q_D(const QDeclarativeDebugServerTcpConnection); + return d->socket && d->socket->state() == QTcpSocket::ConnectedState; +} + +void QDeclarativeDebugServerTcpConnection::send(const QByteArray &message) +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + if (!isConnected()) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + d->socket->flush(); +} + +void QDeclarativeDebugServerTcpConnection::disconnect() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + delete d->protocol; + d->protocol = 0; + delete d->socket; + d->socket = 0; +} + +void QDeclarativeDebugServerTcpConnection::listen() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + +void QDeclarativeDebugServerTcpConnection::waitForConnection() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + d->tcpServer->waitForNewConnection(-1); +} + +void QDeclarativeDebugServerTcpConnection::readyRead() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +void QDeclarativeDebugServerTcpConnection::newConnection() +{ + Q_D(QDeclarativeDebugServerTcpConnection); + + if (d->socket) { + qWarning("QDeclarativeDebugServer error: another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->socket = d->tcpServer->nextPendingConnection(); + d->socket->setParent(this); + d->protocol = new QPacketProtocol(d->socket, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + + +QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h new file mode 100644 index 0000000..f1c749ef --- /dev/null +++ b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h @@ -0,0 +1,86 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEDEBUGSERVERTCPCONNECTION_H +#define QDECLARATIVEDEBUGSERVERTCPCONNECTION_H + +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +#include + +class QDeclarativeDebugServer; +class QDeclarativeDebugServerTcpConnectionPrivate; +class QDeclarativeDebugServerTcpConnection : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QDeclarativeDebugServerTcpConnection) + Q_DISABLE_COPY(QDeclarativeDebugServerTcpConnection) + +public: + QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server); + ~QDeclarativeDebugServerTcpConnection(); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + + void listen(); + void waitForConnection(); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + QDeclarativeDebugServerTcpConnectionPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +QT_END_HEADER + +#endif // QDECLARATIVEDEBUGSERVERTCPCONNECTION_H diff --git a/src/declarative/debugger/qpacketprotocol.cpp b/src/declarative/debugger/qpacketprotocol.cpp index c2f7709..ad1e767 100644 --- a/src/declarative/debugger/qpacketprotocol.cpp +++ b/src/declarative/debugger/qpacketprotocol.cpp @@ -452,6 +452,14 @@ bool QPacket::isEmpty() const } /*! + Returns raw packet data. + */ +QByteArray QPacket::data() const +{ + return b; +} + +/*! Clears data in the packet. This is useful for reusing one writable packet. For example \code diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index d153833..99fded5 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -98,6 +98,7 @@ public: void clear(); bool isEmpty() const; + QByteArray data() const; protected: friend class QPacketProtocol; -- cgit v0.12 From 21016c3b28674029a2a205da38f54e362e3635b9 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 26 Nov 2010 16:22:47 +0100 Subject: QDeclarativeDebug: Move Tcp server to separate plugin Reviewed-by: Christiaan Janssen --- src/declarative/debugger/debugger.pri | 4 +- .../debugger/qdeclarativedebugserver.cpp | 50 +++++- .../debugger/qdeclarativedebugserver_p.h | 2 +- .../debugger/qdeclarativedebugserverconnection_p.h | 9 +- .../qdeclarativedebugservertcpconnection.cpp | 163 ------------------- .../qdeclarativedebugservertcpconnection_p.h | 86 ---------- src/declarative/debugger/qpacketprotocol_p.h | 4 +- src/plugins/plugins.pro | 3 +- src/plugins/qmldebugging/qmldebugging.pro | 4 + .../tcpserver/qtcpserverconnection.cpp | 173 +++++++++++++++++++++ .../qmldebugging/tcpserver/qtcpserverconnection.h | 84 ++++++++++ src/plugins/qmldebugging/tcpserver/tcpserver.pro | 18 +++ 12 files changed, 334 insertions(+), 266 deletions(-) delete mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp delete mode 100644 src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h create mode 100644 src/plugins/qmldebugging/qmldebugging.pro create mode 100644 src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp create mode 100644 src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h create mode 100644 src/plugins/qmldebugging/tcpserver/tcpserver.pro diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index e7354dc..9152677 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -8,8 +8,7 @@ SOURCES += \ $$PWD/qdeclarativedebug.cpp \ $$PWD/qdeclarativedebugtrace.cpp \ $$PWD/qdeclarativedebughelper.cpp \ - $$PWD/qdeclarativedebugserver.cpp \ - $$PWD/qdeclarativedebugservertcpconnection.cpp + $$PWD/qdeclarativedebugserver.cpp HEADERS += \ $$PWD/qdeclarativedebuggerstatus_p.h \ @@ -22,5 +21,4 @@ HEADERS += \ $$PWD/qdeclarativedebughelper_p.h \ $$PWD/qdeclarativedebugserverplugin_p.h \ $$PWD/qdeclarativedebugserver_p.h \ - $$PWD/qdeclarativedebugservertcpconnection_p.h \ debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserver.cpp b/src/declarative/debugger/qdeclarativedebugserver.cpp index 6085e3e..a269984 100644 --- a/src/declarative/debugger/qdeclarativedebugserver.cpp +++ b/src/declarative/debugger/qdeclarativedebugserver.cpp @@ -42,9 +42,10 @@ #include "private/qdeclarativedebugserver_p.h" #include "private/qdeclarativedebugservice_p.h" #include "private/qdeclarativedebugservice_p_p.h" -#include "private/qdeclarativedebugservertcpconnection_p.h" #include "private/qdeclarativeengine_p.h" +#include +#include #include #include @@ -89,6 +90,8 @@ public: QHash plugins; QStringList clientPlugins; bool gotHello; + + static QDeclarativeDebugServerConnection *loadConnectionPlugin(); }; QDeclarativeDebugServerPrivate::QDeclarativeDebugServerPrivate() : @@ -110,6 +113,36 @@ void QDeclarativeDebugServerPrivate::advertisePlugins() connection->send(message); } +QDeclarativeDebugServerConnection *QDeclarativeDebugServerPrivate::loadConnectionPlugin() +{ + QStringList pluginCandidates; + const QStringList paths = QCoreApplication::libraryPaths(); + foreach (const QString &libPath, paths) { + const QDir dir(libPath + QLatin1String("/qmldebugging")); + if (dir.exists()) { + QStringList plugins(dir.entryList(QDir::Files)); + foreach (const QString &pluginPath, plugins) { + pluginCandidates << dir.absoluteFilePath(pluginPath); + } + } + } + + foreach (const QString &pluginPath, pluginCandidates) { + QPluginLoader loader(pluginPath); + if (!loader.load()) { + continue; + } + QDeclarativeDebugServerConnection *connection = 0; + if (QObject *instance = loader.instance()) + connection = qobject_cast(instance); + + if (connection) + return connection; + loader.unload(); + } + return 0; +} + bool QDeclarativeDebugServer::hasDebuggingClient() const { Q_D(const QDeclarativeDebugServer); @@ -153,15 +186,18 @@ QDeclarativeDebugServer *QDeclarativeDebugServer::instance() if (ok) { server = new QDeclarativeDebugServer(); - QDeclarativeDebugServerTcpConnection *tcpConnection - = new QDeclarativeDebugServerTcpConnection(port, server); + QDeclarativeDebugServerConnection *connection + = QDeclarativeDebugServerPrivate::loadConnectionPlugin(); + if (connection) { + server->d_func()->connection = connection; - tcpConnection->listen(); - if (block) { - tcpConnection->waitForConnection(); + connection->setServer(server); + connection->setPort(port, block); + } else { + qWarning() << QString::fromAscii("QDeclarativeDebugServer: Ignoring\"-qmljsdebugger=%1\". " + "Remote debugger plugin has not been found.").arg(appD->qmljsDebugArgumentsString()); } - server->d_func()->connection = tcpConnection; } else { qWarning(QString::fromAscii("QDeclarativeDebugServer: Ignoring \"-qmljsdebugger=%1\". " "Format is -qmljsdebugger=port:[,block]").arg( diff --git a/src/declarative/debugger/qdeclarativedebugserver_p.h b/src/declarative/debugger/qdeclarativedebugserver_p.h index 93ab10b..ec3e60f 100644 --- a/src/declarative/debugger/qdeclarativedebugserver_p.h +++ b/src/declarative/debugger/qdeclarativedebugserver_p.h @@ -54,7 +54,7 @@ QT_MODULE(Declarative) class QDeclarativeDebugService; class QDeclarativeDebugServerPrivate; -class QDeclarativeDebugServer : public QObject +class Q_DECLARATIVE_EXPORT QDeclarativeDebugServer : public QObject { Q_OBJECT Q_DECLARE_PRIVATE(QDeclarativeDebugServer) diff --git a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h index 4175126..631da74 100644 --- a/src/declarative/debugger/qdeclarativedebugserverconnection_p.h +++ b/src/declarative/debugger/qdeclarativedebugserverconnection_p.h @@ -42,7 +42,7 @@ #ifndef QDECLARATIVEDEBUGSERVERCONNECTION_H #define QDECLARATIVEDEBUGSERVERCONNECTION_H -#include +#include QT_BEGIN_HEADER @@ -50,17 +50,22 @@ QT_BEGIN_NAMESPACE QT_MODULE(Declarative) -class QDeclarativeDebugServerConnection +class QDeclarativeDebugServer; +class Q_DECLARATIVE_EXPORT QDeclarativeDebugServerConnection { public: QDeclarativeDebugServerConnection() {} virtual ~QDeclarativeDebugServerConnection() {} + virtual void setServer(QDeclarativeDebugServer *server) = 0; + virtual void setPort(int port, bool bock) = 0; virtual bool isConnected() const = 0; virtual void send(const QByteArray &message) = 0; virtual void disconnect() = 0; }; +Q_DECLARE_INTERFACE(QDeclarativeDebugServerConnection, "com.trolltech.Qt.QDeclarativeDebugServerConnection/1.0") + QT_END_NAMESPACE QT_END_HEADER diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp b/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp deleted file mode 100644 index 223c875..0000000 --- a/src/declarative/debugger/qdeclarativedebugservertcpconnection.cpp +++ /dev/null @@ -1,163 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative 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$ -** -****************************************************************************/ - -#include "qdeclarativedebugservertcpconnection_p.h" - -#include "qdeclarativedebugserver_p.h" -#include "private/qpacketprotocol_p.h" - -#include -#include - - -QT_BEGIN_NAMESPACE - -class QDeclarativeDebugServerTcpConnectionPrivate { -public: - QDeclarativeDebugServerTcpConnectionPrivate(); - - int port; - QTcpSocket *socket; - QPacketProtocol *protocol; - QTcpServer *tcpServer; - - QDeclarativeDebugServer *debugServer; -}; - -QDeclarativeDebugServerTcpConnectionPrivate::QDeclarativeDebugServerTcpConnectionPrivate() : - port(0), - socket(0), - protocol(0), - tcpServer(0), - debugServer(0) -{ -} - -QDeclarativeDebugServerTcpConnection::QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server) : - QObject(server), - d_ptr(new QDeclarativeDebugServerTcpConnectionPrivate) -{ - Q_D(QDeclarativeDebugServerTcpConnection); - d->port = port; - d->debugServer = server; -} - -QDeclarativeDebugServerTcpConnection::~QDeclarativeDebugServerTcpConnection() -{ - delete d_ptr; -} - -bool QDeclarativeDebugServerTcpConnection::isConnected() const -{ - Q_D(const QDeclarativeDebugServerTcpConnection); - return d->socket && d->socket->state() == QTcpSocket::ConnectedState; -} - -void QDeclarativeDebugServerTcpConnection::send(const QByteArray &message) -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - if (!isConnected()) - return; - - QPacket pack; - pack.writeRawData(message.data(), message.length()); - - d->protocol->send(pack); - d->socket->flush(); -} - -void QDeclarativeDebugServerTcpConnection::disconnect() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - delete d->protocol; - d->protocol = 0; - delete d->socket; - d->socket = 0; -} - -void QDeclarativeDebugServerTcpConnection::listen() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - d->tcpServer = new QTcpServer(this); - QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); - if (d->tcpServer->listen(QHostAddress::Any, d->port)) - qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); - else - qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); -} - -void QDeclarativeDebugServerTcpConnection::waitForConnection() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - d->tcpServer->waitForNewConnection(-1); -} - -void QDeclarativeDebugServerTcpConnection::readyRead() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - QPacket packet = d->protocol->read(); - - QByteArray content = packet.data(); - d->debugServer->receiveMessage(content); -} - -void QDeclarativeDebugServerTcpConnection::newConnection() -{ - Q_D(QDeclarativeDebugServerTcpConnection); - - if (d->socket) { - qWarning("QDeclarativeDebugServer error: another client is already connected"); - QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); - delete faultyConnection; - return; - } - - d->socket = d->tcpServer->nextPendingConnection(); - d->socket->setParent(this); - d->protocol = new QPacketProtocol(d->socket, this); - QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); -} - - -QT_END_NAMESPACE diff --git a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h b/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h deleted file mode 100644 index f1c749ef..0000000 --- a/src/declarative/debugger/qdeclarativedebugservertcpconnection_p.h +++ /dev/null @@ -1,86 +0,0 @@ -/**************************************************************************** -** -** 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 QtDeclarative 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 QDECLARATIVEDEBUGSERVERTCPCONNECTION_H -#define QDECLARATIVEDEBUGSERVERTCPCONNECTION_H - -#include - -QT_BEGIN_HEADER - -QT_BEGIN_NAMESPACE - -QT_MODULE(Declarative) - -#include - -class QDeclarativeDebugServer; -class QDeclarativeDebugServerTcpConnectionPrivate; -class QDeclarativeDebugServerTcpConnection : public QObject, public QDeclarativeDebugServerConnection -{ - Q_OBJECT - Q_DECLARE_PRIVATE(QDeclarativeDebugServerTcpConnection) - Q_DISABLE_COPY(QDeclarativeDebugServerTcpConnection) - -public: - QDeclarativeDebugServerTcpConnection(int port, QDeclarativeDebugServer *server); - ~QDeclarativeDebugServerTcpConnection(); - - bool isConnected() const; - void send(const QByteArray &message); - void disconnect(); - - void listen(); - void waitForConnection(); - -private Q_SLOTS: - void readyRead(); - void newConnection(); - -private: - QDeclarativeDebugServerTcpConnectionPrivate *d_ptr; -}; - -QT_END_NAMESPACE - -QT_END_HEADER - -#endif // QDECLARATIVEDEBUGSERVERTCPCONNECTION_H diff --git a/src/declarative/debugger/qpacketprotocol_p.h b/src/declarative/debugger/qpacketprotocol_p.h index 99fded5..1c69cdd 100644 --- a/src/declarative/debugger/qpacketprotocol_p.h +++ b/src/declarative/debugger/qpacketprotocol_p.h @@ -59,7 +59,7 @@ class QPacket; class QPacketAutoSend; class QPacketProtocolPrivate; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacketProtocol : public QObject +class Q_DECLARATIVE_EXPORT QPacketProtocol : public QObject { Q_OBJECT public: @@ -89,7 +89,7 @@ private: }; -class Q_DECLARATIVE_PRIVATE_EXPORT QPacket : public QDataStream +class Q_DECLARATIVE_EXPORT QPacket : public QDataStream { public: QPacket(); diff --git a/src/plugins/plugins.pro b/src/plugins/plugins.pro index 722979d..07825d9 100644 --- a/src/plugins/plugins.pro +++ b/src/plugins/plugins.pro @@ -14,5 +14,4 @@ embedded:SUBDIRS *= gfxdrivers decorations mousedrivers kbddrivers symbian:SUBDIRS += s60 contains(QT_CONFIG, phonon): SUBDIRS *= phonon contains(QT_CONFIG, multimedia): SUBDIRS *= audio - - +contains(QT_CONFIG, declarative): SUBDIRS *= qmldebugging diff --git a/src/plugins/qmldebugging/qmldebugging.pro b/src/plugins/qmldebugging/qmldebugging.pro new file mode 100644 index 0000000..01cf1a9 --- /dev/null +++ b/src/plugins/qmldebugging/qmldebugging.pro @@ -0,0 +1,4 @@ +TEMPLATE = subdirs + +SUBDIRS = tcpserver + diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp new file mode 100644 index 0000000..69c1ef5 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.cpp @@ -0,0 +1,173 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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$ +** +****************************************************************************/ + +#include "qtcpserverconnection.h" + +#include +#include + +#include +#include + +QT_BEGIN_NAMESPACE + +class QTcpServerConnectionPrivate { +public: + QTcpServerConnectionPrivate(); + + int port; + QTcpSocket *socket; + QPacketProtocol *protocol; + QTcpServer *tcpServer; + + QDeclarativeDebugServer *debugServer; +}; + +QTcpServerConnectionPrivate::QTcpServerConnectionPrivate() : + port(0), + socket(0), + protocol(0), + tcpServer(0), + debugServer(0) +{ +} + +QTcpServerConnection::QTcpServerConnection() : + d_ptr(new QTcpServerConnectionPrivate) +{ + +} + +QTcpServerConnection::~QTcpServerConnection() +{ + delete d_ptr; +} + +void QTcpServerConnection::setServer(QDeclarativeDebugServer *server) +{ + Q_D(QTcpServerConnection); + d->debugServer = server; +} + +bool QTcpServerConnection::isConnected() const +{ + Q_D(const QTcpServerConnection); + return d->socket && d->socket->state() == QTcpSocket::ConnectedState; +} + +void QTcpServerConnection::send(const QByteArray &message) +{ + Q_D(QTcpServerConnection); + + if (!isConnected()) + return; + + QPacket pack; + pack.writeRawData(message.data(), message.length()); + + d->protocol->send(pack); + d->socket->flush(); +} + +void QTcpServerConnection::disconnect() +{ + Q_D(QTcpServerConnection); + + delete d->protocol; + d->protocol = 0; + delete d->socket; + d->socket = 0; +} + +void QTcpServerConnection::setPort(int port, bool block) +{ + Q_D(QTcpServerConnection); + d->port = port; + + listen(); + if (block) + d->tcpServer->waitForNewConnection(-1); +} + +void QTcpServerConnection::listen() +{ + Q_D(QTcpServerConnection); + + d->tcpServer = new QTcpServer(this); + QObject::connect(d->tcpServer, SIGNAL(newConnection()), this, SLOT(newConnection())); + if (d->tcpServer->listen(QHostAddress::Any, d->port)) + qWarning("QDeclarativeDebugServer: Waiting for connection on port %d...", d->port); + else + qWarning("QDeclarativeDebugServer: Unable to listen on port %d", d->port); +} + + +void QTcpServerConnection::readyRead() +{ + Q_D(QTcpServerConnection); + QPacket packet = d->protocol->read(); + + QByteArray content = packet.data(); + d->debugServer->receiveMessage(content); +} + +void QTcpServerConnection::newConnection() +{ + Q_D(QTcpServerConnection); + + if (d->socket) { + qWarning("QDeclarativeDebugServer: Another client is already connected"); + QTcpSocket *faultyConnection = d->tcpServer->nextPendingConnection(); + delete faultyConnection; + return; + } + + d->socket = d->tcpServer->nextPendingConnection(); + d->socket->setParent(this); + d->protocol = new QPacketProtocol(d->socket, this); + QObject::connect(d->protocol, SIGNAL(readyRead()), this, SLOT(readyRead())); +} + + +Q_EXPORT_PLUGIN2(tcpserver, QTcpServerConnection) + +QT_END_NAMESPACE + diff --git a/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h new file mode 100644 index 0000000..a6e17e6 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/qtcpserverconnection.h @@ -0,0 +1,84 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QTCPSERVERCONNECTION_H +#define QTCPSERVERCONNECTION_H + +#include +#include + +QT_BEGIN_NAMESPACE + +class QDeclarativeDebugServer; +class QTcpServerConnectionPrivate; +class QTcpServerConnection : public QObject, public QDeclarativeDebugServerConnection +{ + Q_OBJECT + Q_DECLARE_PRIVATE(QTcpServerConnection) + Q_DISABLE_COPY(QTcpServerConnection) + Q_INTERFACES(QDeclarativeDebugServerConnection) + + +public: + QTcpServerConnection(); + ~QTcpServerConnection(); + + void setServer(QDeclarativeDebugServer *server); + void setPort(int port, bool bock); + + bool isConnected() const; + void send(const QByteArray &message); + void disconnect(); + + void listen(); + void waitForConnection(); + +private Q_SLOTS: + void readyRead(); + void newConnection(); + +private: + QTcpServerConnectionPrivate *d_ptr; +}; + +QT_END_NAMESPACE + +#endif // QTCPSERVERCONNECTION_H diff --git a/src/plugins/qmldebugging/tcpserver/tcpserver.pro b/src/plugins/qmldebugging/tcpserver/tcpserver.pro new file mode 100644 index 0000000..e90fb34 --- /dev/null +++ b/src/plugins/qmldebugging/tcpserver/tcpserver.pro @@ -0,0 +1,18 @@ +TARGET = tcpserver +QT += declarative network + +include(../../qpluginbase.pri) + +QTDIR_build:DESTDIR = $$QT_BUILD_TREE/plugins/qmldebugging +QTDIR_build:REQUIRES += "contains(QT_CONFIG, declarative)" + +SOURCES += \ + qtcpserverconnection.cpp + +HEADERS += \ + qtcpserverconnection.h + +target.path += $$[QT_INSTALL_PLUGINS]/qmldebugging +INSTALLS += target + +symbian:TARGET.UID3=0x20031E90 \ No newline at end of file -- cgit v0.12 From 35ae0b8146bca7a61203ee347654aed27951439c Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 9 Dec 2010 13:06:08 +0100 Subject: QDeclarativeDebug: Include debugger plugin in qmlviewer.sis Developers that want to debug qml on their device have to now install qmlviewer.sis. Reviewed-by: Christiaan Janssen --- tools/qml/qml.pro | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tools/qml/qml.pro b/tools/qml/qml.pro index bdac6e3..9b07ebe 100644 --- a/tools/qml/qml.pro +++ b/tools/qml/qml.pro @@ -43,6 +43,11 @@ symbian { contains(QT_CONFIG, s60): { LIBS += -lavkon -lcone } + + # Deploy plugin for remote debugging + qmldebuggingplugin.sources = $$QT_BUILD_TREE/plugins/qmldebugging/tcpserver$${QT_LIBINFIX}.dll + qmldebuggingplugin.path = c:$$QT_PLUGINS_BASE_DIR/qmldebugging + DEPLOYMENT += qmldebuggingplugin } mac { QMAKE_INFO_PLIST=Info_mac.plist -- cgit v0.12 From 80eb3ebbfe24738163532494e8866ac20fd1b0e4 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 16 Dec 2010 16:03:13 +0200 Subject: Fix incorrect file name case for OpenGL libraries in symbian.conf. To support linux builds, file names must be cased correctly. Task-number: QT-4375 Reviewed-by: Miikka Heikkinen --- mkspecs/common/symbian/symbian.conf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mkspecs/common/symbian/symbian.conf b/mkspecs/common/symbian/symbian.conf index 707335c..00cf0d7 100644 --- a/mkspecs/common/symbian/symbian.conf +++ b/mkspecs/common/symbian/symbian.conf @@ -70,12 +70,12 @@ QMAKE_LIBS_CORE = $$QMAKE_LIBS -lefsrv -lhal -lbafl QMAKE_LIBS_GUI = $$QMAKE_LIBS_CORE -lfbscli -lbitgdi -lgdi -lws32 -lapgrfx -lcone -leikcore -lmediaclientaudio -lapparc -lcentralrepository QMAKE_LIBS_NETWORK = QMAKE_LIBS_EGL = -llibEGL -QMAKE_LIBS_OPENGL = -llibglesv2 +QMAKE_LIBS_OPENGL = -llibGLESv2 QMAKE_LIBS_OPENGL_ES1 = -llibGLESv1_CM -QMAKE_LIBS_OPENGL_ES2 = -llibglesv2 -QMAKE_LIBS_OPENGL_QT = -llibglesv2 -lcone -lws32 +QMAKE_LIBS_OPENGL_ES2 = -llibGLESv2 +QMAKE_LIBS_OPENGL_QT = -llibGLESv2 -lcone -lws32 QMAKE_LIBS_OPENGL_ES1_QT = -llibGLESv1_CM -lcone -lws32 -QMAKE_LIBS_OPENGL_ES2_QT = -llibglesv2 -lcone -lws32 +QMAKE_LIBS_OPENGL_ES2_QT = -llibGLESv2 -lcone -lws32 QMAKE_LIBS_OPENVG = -llibOpenVG -lfbscli -lbitgdi -lgdi QMAKE_LIBS_THREAD = -llibpthread QMAKE_LIBS_COMPAT = -- cgit v0.12 From 3290135e88bd8a01e20842c9d1cdca5fe569bf62 Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Thu, 16 Dec 2010 14:39:15 +0100 Subject: Symbian compile fix armv5 complained that the call to QChar::category() was ambiguous, because there is a version taking an uint, and a version taking ushort as argument. Reviewed-by: Christiaan Janssen --- src/script/bridge/qscriptdeclarativeclass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/script/bridge/qscriptdeclarativeclass.cpp b/src/script/bridge/qscriptdeclarativeclass.cpp index 92248a0..13736bc 100644 --- a/src/script/bridge/qscriptdeclarativeclass.cpp +++ b/src/script/bridge/qscriptdeclarativeclass.cpp @@ -473,7 +473,7 @@ bool QScriptDeclarativeClass::startsWithUpper(const Identifier &identifier) JSC::UString::Rep *r = (JSC::UString::Rep *)identifier; if (r->size() < 1) return false; - return QChar::category(r->data()[0]) == QChar::Letter_Uppercase; + return QChar::category((ushort)(r->data()[0])) == QChar::Letter_Uppercase; } quint32 QScriptDeclarativeClass::toArrayIndex(const Identifier &identifier, bool *ok) -- cgit v0.12 From d238b0ba236da4c3c33c0707d8dd6f5e5903d6c0 Mon Sep 17 00:00:00 2001 From: Ville Pernu Date: Fri, 17 Dec 2010 11:08:53 +0200 Subject: Fix waitForOpened not working with already active configuration When an active QNetworkConfiguration is already in use (e.g. browser already open), the QNetworkSession::waitForOpened() did not work properly. Changed one if-statement in the function to adapt to the scenario. Reviewed-by: Perttu Pohjonen Task-number: QTBUG-565 --- src/network/bearer/qnetworksession.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/network/bearer/qnetworksession.cpp b/src/network/bearer/qnetworksession.cpp index 226c3c5..db1a37c 100644 --- a/src/network/bearer/qnetworksession.cpp +++ b/src/network/bearer/qnetworksession.cpp @@ -310,8 +310,9 @@ bool QNetworkSession::waitForOpened(int msecs) if (d->isOpen) return true; - if (d->state != Connecting) + if (!(d->state == Connecting || d->state == Connected)) { return false; + } QEventLoop* loop = new QEventLoop(this); QObject::connect(d, SIGNAL(quitPendingWaitsForOpened()), -- cgit v0.12 From b54efea2e97baac1d9442e829be2d6fb322c5085 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 17 Dec 2010 11:37:52 +0200 Subject: Use relative include instead of absolute in default qmake.conf Absolute include path breaks QtP releases which copy mkspecs under epoc32 and do not necessarily have the sources available in the original absolute path and can't patch the paths either at installation time. Task-number: QTBUG-16172 Reviewed-by: Oswald Buddenhagen --- tools/configure/configureapp.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index c967dad..915a56d 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -3267,8 +3267,14 @@ void Configure::generateConfigfiles() if (qmakeConfFile.open(QFile::WriteOnly | QFile::Text)) { QTextStream qmakeConfStream; qmakeConfStream.setDevice(&qmakeConfFile); + // While QMAKESPEC_ORIGINAL being relative or absolute doesn't matter for the + // primary use of this variable by qmake to identify the original mkspec, the + // variable is also used for few special cases where the absolute path is required. + // Conversely, the include of the original qmake.conf must be done using relative path, + // as some Qt binary deployments are done in a manner that doesn't allow for patching + // the paths at the installation time. qmakeConfStream << "QMAKESPEC_ORIGINAL=" << pltSpec << endl << endl; - qmakeConfStream << "include(" << pltSpec << "/qmake.conf)" << endl; + qmakeConfStream << "include(" << "../" << spec << "/qmake.conf)" << endl << endl; qmakeConfStream.flush(); qmakeConfFile.close(); } -- cgit v0.12 From 90c77df38c8168991ae69776a45aa4d08466f541 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 14:13:46 +0100 Subject: Whitespace fixes. --- doc/src/template/style/style.css | 1086 +++++++++++----------- tools/qdoc3/test/qt-html-default-styles.qdocconf | 2 +- 2 files changed, 534 insertions(+), 554 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index d623bd4..4f9e26c 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -1,6 +1,6 @@ @media screen { - + /* basic elements */ html { @@ -20,7 +20,7 @@ fieldset, img { border: 0; - max-width:100%; + max-width:100%; } address, caption, cite, code, dfn, em, strong, th, var, optgroup { @@ -60,10 +60,10 @@ { vertical-align: baseline; } - tt, .qmlreadonly span, .qmldefault span - { - word-spacing:5px; - } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:5px; + } legend { color: #000000; @@ -88,7 +88,7 @@ font-style: italic; } - /* adding Qt theme */ + /* adding Qt theme */ html { /* background-color: #e5e5e5;*/ @@ -117,9 +117,9 @@ pre { border: 1px solid #DDDDDD; - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; margin: 0 20px 10px 10px; padding: 20px 15px 20px 20px; overflow-x: auto; @@ -135,14 +135,14 @@ font-size: 11px; margin-bottom: 25px; } - pre.highlightedCode { - display: block; - overflow:hidden; - } + pre.highlightedCode { + display: block; + overflow:hidden; + } thead { margin-top: 5px; - font:600 12px/1.2 Arial; + font:600 12px/1.2 Arial; } th { @@ -155,11 +155,11 @@ padding: 3px 15px 3px 20px; } tr.odd td:hover, tr.even td:hover {} - - td.rightAlign - { + + td.rightAlign + { padding: 3px 5px 3px 10px; - } + } table tr.odd { border-left: 1px solid #E6E6E6; @@ -228,10 +228,10 @@ { font-size: 13px; } - .red - { - color:red; - } + .red + { + color:red; + } /* end font style elements */ /* global settings*/ @@ -255,7 +255,7 @@ clear: both; visibility: hidden; } - + /* end global settings*/ /* header elements */ .header @@ -295,7 +295,7 @@ color: #4c0033; text-decoration: underline; } - + #nav-topright { height: 70px; @@ -428,10 +428,10 @@ { font-variant: normal; } - .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover - { - text-decoration:none; - } + .shortCut-topleft-inactive span a:hover, .shortCut-topleft-active a:hover + { + text-decoration:none; + } #shortCut { padding-top: 10px; @@ -461,9 +461,9 @@ color: #44a51c; } - - -/* end header elements */ + + +/* end header elements */ /* content and sidebar elements */ .wrapper { @@ -514,17 +514,15 @@ background: url(../images/page.png) no-repeat 100% -60px; overflow: hidden; } - .navTop{ - float:right; - display:block; - padding-right:15px; + .navTop{ + float:right; + display:block; + padding-right:15px; + } - } - - -/* end content and sidebar elements */ +/* end content and sidebar elements */ /* sidebar elements */ .sidebar { @@ -553,9 +551,9 @@ .sidebar .search form { background: url(../images/sprites-combined.png) no-repeat -6px -348px; - height:21px; - padding:2px 0 0 5px; - width:167px; + height:21px; + padding:2px 0 0 5px; + width:167px; } .sidebar .search form input#pageType @@ -613,10 +611,10 @@ .sidebar .box .list { display: block; - max-height:200px; - min-height:120px; - overflow-y:auto; - overflow-x:none; + max-height:200px; + min-height:120px; + overflow-y:auto; + overflow-x:none; } .list li a:hover { @@ -624,9 +622,9 @@ } .sidebar .box ul { - padding-bottom:5px; - padding-left:10px; - padding-top:5px; + padding-bottom:5px; + padding-left:10px; + padding-top:5px; } .sidebar .box ul li { @@ -638,143 +636,143 @@ { background: url(../images/box_bg.png) repeat-x 0 bottom; } - .sidebar .box ul li.noMatch + .sidebar .box ul li.noMatch { background: none; - color:#FF2A00; - font-style:italic; + color:#FF2A00; + font-style:italic; } - .sidebar .box ul li.hit + .sidebar .box ul li.hit { background: none; - color:#AAD2F0; - font-style:italic; - } - .sidebar .search form input.loading - { - background:url("../images/spinner.gif") no-repeat scroll right center transparent; - } - - .sidebar .search form { - _height: 23px; - _width: 169px; - } - - #resultdialog { - display: none; - position: absolute; - *left: 30px; - _left: 0; - *top: 35px; - _top: 30px; - _zoom: 1; - background-color: #fff; - border: 1px solid #666; - z-index: 4; - margin-top: 5px; - _margin: 0 0 0 -20px; - padding: 10px; - width: 30%; - _width: 196px; - height: 250px; - overflow: auto; - -webkit-border-radius: .5em; - -moz-border-radius: .5em; - border-radius: .5em; - -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); - font-size: 11px; - } - - #resultdialog a - { + color:#AAD2F0; + font-style:italic; + } + .sidebar .search form input.loading + { + background:url("../images/spinner.gif") no-repeat scroll right center transparent; + } + + .sidebar .search form { + _height: 23px; + _width: 169px; + } + + #resultdialog { + display: none; + position: absolute; + *left: 30px; + _left: 0; + *top: 35px; + _top: 30px; + _zoom: 1; + background-color: #fff; + border: 1px solid #666; + z-index: 4; + margin-top: 5px; + _margin: 0 0 0 -20px; + padding: 10px; + width: 30%; + _width: 196px; + height: 250px; + overflow: auto; + -webkit-border-radius: .5em; + -moz-border-radius: .5em; + border-radius: .5em; + -webkit-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + -moz-box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + box-shadow: 0 4px 6px 0 rgba(0,0,0,.2); + font-size: 11px; + } + + #resultdialog a + { color: #00732f; - } - - #resultdialog.active { - display: block; - } - - .narrow #resultdialog { - width: 60%; - _width: 360px; - } - - .narrow #resultdialog.active { - right: 10px; - *left: auto; - _left: auto; - _right: -20px; - } - - - #resultdialog #resultclose { - float: right; - } - - #resultdialog p, - #resultdialog ul { - clear: both; - margin: 3px 0; - } - - p#searchcount span { - display: none; - } - - p#searchcount.all span#resultcount, - p#searchcount.api span#apicount, - p#searchcount.article span#articlecount, - p#searchcount.example span#examplecount { - display: inline; - } - - #resultlist li { - display: none; - } - - #resultlist.api li.api, - #resultlist.article li.article, - #resultlist.example li.example, - #resultlist.all li { - display: block; - } - - #resultlinks.api a#showapiresults, - #resultlinks.api a#showapiresults:hover, - #resultlinks.article a#showarticleresults, - #resultlinks.article a#showarticleresults:hover, - #resultlinks.example a#showexampleresults, - #resultlinks.example a#showexampleresults:hover, - #resultlinks.all a#showallresults, - #resultlinks.all a#showallresults:hover { - color: #B0ADAB; - } - .floatingResult{ - z-index:1; - position:relative; - padding-top:0px; - background-color:white; - border:solid 1px black; - height:250px; - width:600px; - overflow-x:hidden; - overflow-y:auto; - } - - .floatingResult:hover{ - display:block; - } - .floatingResult:hover{ - } - + } + + #resultdialog.active { + display: block; + } + + .narrow #resultdialog { + width: 60%; + _width: 360px; + } + + .narrow #resultdialog.active { + right: 10px; + *left: auto; + _left: auto; + _right: -20px; + } + + + #resultdialog #resultclose { + float: right; + } + + #resultdialog p, + #resultdialog ul { + clear: both; + margin: 3px 0; + } + + p#searchcount span { + display: none; + } + + p#searchcount.all span#resultcount, + p#searchcount.api span#apicount, + p#searchcount.article span#articlecount, + p#searchcount.example span#examplecount { + display: inline; + } + + #resultlist li { + display: none; + } + + #resultlist.api li.api, + #resultlist.article li.article, + #resultlist.example li.example, + #resultlist.all li { + display: block; + } + + #resultlinks.api a#showapiresults, + #resultlinks.api a#showapiresults:hover, + #resultlinks.article a#showarticleresults, + #resultlinks.article a#showarticleresults:hover, + #resultlinks.example a#showexampleresults, + #resultlinks.example a#showexampleresults:hover, + #resultlinks.all a#showallresults, + #resultlinks.all a#showallresults:hover { + color: #B0ADAB; + } + .floatingResult{ + z-index:1; + position:relative; + padding-top:0px; + background-color:white; + border:solid 1px black; + height:250px; + width:600px; + overflow-x:hidden; + overflow-y:auto; + } + + .floatingResult:hover{ + display:block; + } + .floatingResult:hover{ + } + /* end sidebar elements */ /* content elements */ .wrap { margin: 0 5px 0 208px; - overflow: visible; + overflow: visible; } @@ -784,7 +782,7 @@ { background-color: #fafafa; border-bottom: 1px solid #d1d1d1; - height: 20px; + height: 20px; position: relative; } .wrap .toolbar .toolblock @@ -870,7 +868,7 @@ .wrap .content { padding: 30px; - word-wrap:break-word; + word-wrap:break-word; } .wrap .breadcrumb ul @@ -902,29 +900,29 @@ - .wrap .content ol li { - background:none; - font:normal 10pt/1.2 Verdana; + .wrap .content ol li { + background:none; + font:normal 10pt/1.2 Verdana; - margin-bottom:10px; - margin-left:12px; - /*list-style-type:disc;*/ - } + margin-bottom:10px; + margin-left:12px; + /*list-style-type:disc;*/ + } .wrap .content ol li { - background:none; - margin-bottom: 10px; - padding-left:0px; - margin-left:52px; + background:none; + margin-bottom: 10px; + padding-left:0px; + margin-left:52px; } - + .wrap .content li { background: url(../images/bullet_sq.png) no-repeat 0 5px; font: normal 400 10pt/1.2 Verdana; - margin-bottom: 10px; - padding-left:12px; + margin-bottom: 10px; + padding-left:12px; } .content li:hover {} @@ -935,16 +933,16 @@ } .wrap .content h2 { - font:600 16px/1.2 Arial; - margin-top:15px; - width:100%; + font:600 16px/1.2 Arial; + margin-top:15px; + width:100%; } .wrap .content h3 { font: bold 14px/1.2 Arial; - font:600 16px/1.2 Arial; - margin-top:15px; - width:100%; + font:600 16px/1.2 Arial; + margin-top:15px; + width:100%; } .wrap .content p { @@ -954,25 +952,25 @@ .wrap .content table p { line-height: 20px; - } + } .wrap .content ul { padding-left: 25px; padding-top: 10px; } - .wrap .content ul img { - vertical-align:middle; - } + .wrap .content ul img { + vertical-align:middle; + } a:hover { color: #4c0033; text-decoration: underline; } - descr p a + descr p a { text-decoration: underline; } - + .descr p a:visited { text-decoration: underline; @@ -993,56 +991,56 @@ color: #00732F; text-decoration: underline; } - .alphaChar{ - width:95%; - background-color:#F6F6F6; - border:1px solid #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - font-size:12pt; - padding-left:10px; - margin-top:10px; - margin-bottom:10px; - } - .flowList{ - /*vertical-align:top;*/ - /*margin:20px auto;*/ - - column-count:3; - -webkit-column-count:3; - -moz-column-count:3; + .alphaChar{ + width:95%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; + } + .flowList{ + /*vertical-align:top;*/ + /*margin:20px auto;*/ + + column-count:3; + -webkit-column-count:3; + -moz-column-count:3; /* - column-width:100%; - -webkit-column-width:200px; - -col-column-width:200px; + column-width:100%; + -webkit-column-width:200px; + -col-column-width:200px; */ - column-gap:41px; - -webkit-column-gap:41px; - -moz-column-gap:41px; - - column-rule: 1px dashed #ccc; - -webkit-column-rule: 1px dashed #ccc; - -moz-column-rule: 1px dashed #ccc; - } - - .flowList dl{ - } - .flowList dd{ - /*display:inline-block;*/ - margin-left:10px; - min-width:250px; - line-height: 1.5; - min-width:100%; - min-height:15px; - } - - .flowList dd a{ - } - - .wrap .content .flowList p{ - padding:0px; - } + column-gap:41px; + -webkit-column-gap:41px; + -moz-column-gap:41px; + + column-rule: 1px dashed #ccc; + -webkit-column-rule: 1px dashed #ccc; + -moz-column-rule: 1px dashed #ccc; + } + + .flowList dl{ + } + .flowList dd{ + /*display:inline-block;*/ + margin-left:10px; + min-width:250px; + line-height: 1.5; + min-width:100%; + min-height:15px; + } + + .flowList dd a{ + } + + .wrap .content .flowList p{ + padding:0px; + } .content .alignedsummary { @@ -1092,7 +1090,7 @@ background-color: #e6e7e8; z-index: 4; } - #feedcloseX + #feedcloseX { display: inline; padding: 5px 5px 0 0; @@ -1110,25 +1108,25 @@ height: 120px; margin: 0px 25px 10px 15px; } - #noteHead - { - font-weight:bold; - padding:10px 10px 10px 20px; - } + #noteHead + { + font-weight:bold; + padding:10px 10px 10px 20px; + } #feedsubmit { display: inline; float: right; margin: 4px 32px 0 0; } - - .note - { - font-size:7pt; - padding-bottom:3px; - padding-left:20px; - } - + + .note + { + font-size:7pt; + padding-bottom:3px; + padding-left:20px; + } + #blurpage { display: none; @@ -1160,67 +1158,67 @@ font: bold 12px/1.2 Arial; } - .generic{ - } - .generic td{ - /* padding:5px;*/ - } - .generic .alphaChar{ - margin-top:5px; - } - - .generic .odd .alphaChar{ + .generic{ + } + .generic td{ + /* padding:5px;*/ + } + .generic .alphaChar{ + margin-top:5px; + } + + .generic .odd .alphaChar{ background-color: #F6F6F6; - } - - .generic .even .alphaChar{ + } + + .generic .even .alphaChar{ background-color: #FFFFFF; - } - - .alignedsummary{} - .propsummary{} - .memItemLeft{} - .memItemRight{ - padding:3px 15px 3px 0; - } - .bottomAlign{} - .highlightedCode - { - margin:10px; - } - .LegaleseLeft{} - .valuelist{} - .annotated td{ - padding: 3px 5px 3px 5px; - } - .obsolete{} - .compat{} - .flags{} - .qmlsummary{} - .qmlitem{} - .qmlproto{} - .qmlname{} - .qmlreadonly{} - .qmldefault{} - .qmldoc{} - .qt-style{} - .redFont{} - code{} - + } + + .alignedsummary{} + .propsummary{} + .memItemLeft{} + .memItemRight{ + padding:3px 15px 3px 0; + } + .bottomAlign{} + .highlightedCode + { + margin:10px; + } + .LegaleseLeft{} + .valuelist{} + .annotated td{ + padding: 3px 5px 3px 5px; + } + .obsolete{} + .compat{} + .flags{} + .qmlsummary{} + .qmlitem{} + .qmlproto{} + .qmlname{} + .qmlreadonly{} + .qmldefault{} + .qmldoc{} + .qt-style{} + .redFont{} + code{} + .wrap .content .toc ul { padding-left: 0px; } - .wrap .content .toc h3{ - border-bottom:0px; - margin-top:0px; - } - - .wrap .content .toc h3 a:hover{ - color:#00732F; - text-decoration:none; - } + .wrap .content .toc h3{ + border-bottom:0px; + margin-top:0px; + } + + .wrap .content .toc h3 a:hover{ + color:#00732F; + text-decoration:none; + } .wrap .content .toc .level2 @@ -1258,56 +1256,55 @@ } h3.fn, span.fn { - -moz-border-radius:7px 7px 7px 7px; - -webkit-border-radius:7px 7px 7px 7px; - border-radius:7px 7px 7px 7px; + -moz-border-radius:7px 7px 7px 7px; + -webkit-border-radius:7px 7px 7px 7px; + border-radius:7px 7px 7px 7px; background-color: #F6F6F6; border-width: 1px; border-style: solid; border-color: #E6E6E6; font-weight: bold; - word-spacing:3px; - padding:3px 5px; - } - - .functionIndex { - font-size:12pt; - word-spacing:10px; - margin-bottom:10px; - background-color: #F6F6F6; - border-width: 1px; - border-style: solid; - border-color: #E6E6E6; - -moz-border-radius: 7px 7px 7px 7px; - -webkit-border-radius: 7px 7px 7px 7px; - border-radius: 7px 7px 7px 7px; - width:100%; - } - - .centerAlign - { - text-align:center; - } - - .rightAlign - { - text-align:right; - } - - - .leftAlign - { - text-align:left; - } - - .topAlign{ - vertical-align:top - } - - .functionIndex a{ - display:inline-block; - } - + word-spacing:3px; + padding:3px 5px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + width:100%; + } + + .centerAlign + { + text-align:center; + } + + .rightAlign + { + text-align:right; + } + + .leftAlign + { + text-align:left; + } + + .topAlign{ + vertical-align:top + } + + .functionIndex a{ + display:inline-block; + } + /* end content elements */ /* footer elements */ @@ -1324,7 +1321,7 @@ .small { font: normal 9px/1 Verdana; - } + } /* end footer elements */ @@ -1334,7 +1331,7 @@ .indexbox { width: 100%; - display:inline-block; + display:inline-block; } .indexboxcont @@ -1354,7 +1351,7 @@ .indexboxcont .section { display: inline-block; - width: 49%; + width: 49%; *width:42%; _width:42%; padding:0 2% 0 1%; @@ -1364,7 +1361,7 @@ .indexboxcont .indexIcon { - width: 11%; + width: 11%; *width:18%; _width:18%; overflow:hidden; @@ -1383,8 +1380,8 @@ .indexboxcont .sectionlist { display: inline-block; - vertical-align:top; - width: 32.5%; + vertical-align:top; + width: 32.5%; padding: 0; } .indexboxcont .sectionlist ul @@ -1413,17 +1410,16 @@ color: #00732f; text-decoration: none; } - - .indexbox .indexIcon { - width: 11%; - } - + .indexbox .indexIcon { + width: 11%; + } + .indexbox .indexIcon span { display: block; } - + .indexbox.guide .indexIcon span { width: 96px; @@ -1431,7 +1427,7 @@ background: url(../images/sprites-combined.png) no-repeat -5px -376px; padding: 0; } - + .indexbox.tools .indexIcon span { width: 115px; @@ -1447,56 +1443,55 @@ clear: both; visibility: hidden; } - + /* start of creator spec*/ - .creator - { - margin-left:0px; - margin-right:0px; - padding-left:0px; - padding-right:0px; - } - .creator .wrap .content ol li { - list-style-type:decimal; - - } + .creator + { + margin-left:0px; + margin-right:0px; + padding-left:0px; + padding-right:0px; + } + .creator .wrap .content ol li { + list-style-type:decimal; + } .creator .header .icon, - .creator .feedback, - .creator .t_button, .creator .feedback, - .creator #feedbackBox, - .creator #feedback, - .creator #blurpage, - /*.creator .indexbox .indexIcon span,*/ - .creator .wrapper .hd, -/* .creator .indexbox .indexIcon,*/ - .creator .header #nav-logo, - .creator #offlinemenu, - .creator #offlinesearch, - .creator .header #nav-topright, + .creator .t_button, + .creator .feedback, + .creator #feedbackBox, + .creator #feedback, + .creator #blurpage, + /* .creator .indexbox .indexIcon span,*/ + .creator .wrapper .hd, + /* .creator .indexbox .indexIcon,*/ + .creator .header #nav-logo, + .creator #offlinemenu, + .creator #offlinesearch, + .creator .header #nav-topright, .creator .header #shortCut , - .creator .wrapper .hd, + .creator .wrapper .hd, .creator .wrapper .ft, - .creator .sidebar, - .creator .wrap .feedback + .creator .sidebar, + .creator .wrap .feedback { - display:none; + display:none; } - - body.creator + + body.creator { - background: none; + background: none; font: normal 13px/1.2 Verdana; color: #363534; - background-color: #FAFAFA; + background-color: #FAFAFA; } - .wrap .content ol li { - - } + .wrap .content ol li { + + } .creator .header, .creator .footer, .creator .wrapper @@ -1505,16 +1500,15 @@ margin: 0px; } - .creator .wrapper + .creator .wrapper { - position:relative; - top:5px; + position:relative; + top:5px; } .creator .wrapper .bd - { - - background:#FFFFFF; - } + { + background:#FFFFFF; + } .creator .header, .footer @@ -1532,81 +1526,76 @@ .creator .header .qtref span { - background:none; - } - + background:none; + } - - .creator .footer + .creator .footer { - border-top:1px solid #E5E5E5; + border-top:1px solid #E5E5E5; height: 50px; - margin:0px; - padding:10px; + margin:0px; + padding:10px; } - - .creator .footer p - { - text-align:justify; - max-width:900px; - } - - .creator .wrap + + .creator .footer p { + text-align:justify; + max-width:900px; + } + .creator .wrap + { padding:0 5px 0 5px; - margin: 0px; + margin: 0px; } .creator .wrap .toolbar { - - - border-bottom:1px solid #E5E5E5; - /*width:100%;*/ - margin-left:-5px; - margin-right:-5px; - } + border-bottom:1px solid #E5E5E5; + /*width:100%;*/ + margin-left:-5px; + margin-right:-5px; + } .creator .wrap .breadcrumb ul li a { /* color: #363534;*/ color: #00732F; - } - + } + .creator .wrap .content { padding: 0px; - word-wrap:break-word; + word-wrap:break-word; } - - .creator .wrap .content ol li { - background:none; - font: inherit; + + .creator .wrap .content ol li { + background:none; + font: inherit; padding-left: 0px; - } - - .creator .wrap .content .descr ol li { - margin-left: 45px; + } + .creator .wrap .content .descr ol li { + margin-left: 45px; } + .creator .content .alignedsummary { margin: 5px; - width:100%; - } - .creator .generic{ - max-width:75%; - } - .creator .generic td{ - /*padding:0;*/ - } + width:100%; + } + .creator .generic{ + max-width:75%; + } + .creator .generic td{ + /*padding:0;*/ + } .creator .indexboxbar { - border-bottom:1px solid #E5E5E5; + border-bottom:1px solid #E5E5E5; margin-bottom: 25px; - background: none; + background: none; } - - + + .creator .header { @@ -1616,17 +1605,9 @@ background-color: #ffffff; padding: 10px 0 5px 0; overflow: visible; - border-bottom: solid #E5E5E5 1px; - z-index:1; - - - - - - - - - /* position:fixed;*/ + border-bottom: solid #E5E5E5 1px; + z-index:1; + /* position:fixed;*/ } @@ -1645,17 +1626,17 @@ .creator .header .qtref:visited { color: #00732F; - } + } .creator .header .qtref:hover { color: #00732F; - text-decoration:none; - } + text-decoration:none; + } .creator .header .qtref span { background-image: none; text-indent: 0; - text-decoration:none; + text-decoration:none; } @@ -1666,7 +1647,7 @@ .creator .wrap .toolbar { display:block; - padding-top:0px; + padding-top:0px; } @@ -1682,80 +1663,80 @@ .creator .wrap .breadcrumb ul li.last a { /*color: #363534;*/ } - - .creator #narrowmenu ul - { - border-bottom:solid 1px #E5E5E5; - border-left:solid 1px #E5E5E5; - border-right:solid 1px #E5E5E5; - } + + .creator #narrowmenu ul + { + border-bottom:solid 1px #E5E5E5; + border-left:solid 1px #E5E5E5; + border-right:solid 1px #E5E5E5; + } .creator #narrowmenu li ul { margin-top:-15px; - } + } + + .creator .toc { + margin:10px 20px 10px 10px; + } - .creator .toc { - margin:10px 20px 10px 10px; - } - - .creator #narrowsearch, .creator #narrowmenu{ - display:none; - } + .creator #narrowsearch, .creator #narrowmenu{ + display:none; + } /* end of creator spec*/ - - .item { - float: left; - position: relative; - width: 100%; - overflow: hidden; - } - - - .item .primary { - margin-right: 220px; - position: relative; - } - - .item hr { - margin-left: -220px; - } - - .item .secondary { - float: right; - width: 200px; - position: relative; - } - - .item .cols { - clear: both; - display: block; - } - - .item .cols .col { - float: left; - margin-left: 1.5%; - } - - .item .cols .col.first { - margin-left: 0; - } - - .item .cols.two .col { - width: 45%; - } - - .item .box { - margin: 0 0 10px 0; - } - - .item .box h3 { - margin: 0 0 10px 0; - } - - .cols.unclear { - clear:none; - } + + .item { + float: left; + position: relative; + width: 100%; + overflow: hidden; + } + + + .item .primary { + margin-right: 220px; + position: relative; + } + + .item hr { + margin-left: -220px; + } + + .item .secondary { + float: right; + width: 200px; + position: relative; + } + + .item .cols { + clear: both; + display: block; + } + + .item .cols .col { + float: left; + margin-left: 1.5%; + } + + .item .cols .col.first { + margin-left: 0; + } + + .item .cols.two .col { + width: 45%; + } + + .item .box { + margin: 0 0 10px 0; + } + + .item .box h3 { + margin: 0 0 10px 0; + } + + .cols.unclear { + clear:none; + } } /* end of screen media */ @@ -1773,8 +1754,7 @@ { background: none; display: block; - width: 100%; margin: 0; float: none; - + width: 100%; margin: 0; float: none; } } /* end of print media */ diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index c9c02ea..623e4a9 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -19,7 +19,7 @@ extraimages.HTML = qt-logo.png \ bullet_up.png \ horBar.png \ sprites-combined.png - + # Include the style sheets and scripts used. HTML.headerstyles = \ -- cgit v0.12 From 26e9a288886978a8f38e9385d8d6011fdbfbebe7 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:38:39 +0100 Subject: Doc: Fixed broken links. --- doc/src/development/developing-with-qt.qdoc | 8 +++----- doc/src/index.qdoc | 10 +++++----- doc/src/overviews.qdoc | 4 ++-- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/doc/src/development/developing-with-qt.qdoc b/doc/src/development/developing-with-qt.qdoc index 6793abd..72073e8 100644 --- a/doc/src/development/developing-with-qt.qdoc +++ b/doc/src/development/developing-with-qt.qdoc @@ -28,7 +28,7 @@ /*! \page developing-with-qt.html - \title Cross-platform & Platform-specific Development + \title Cross-Platform and Platform-Specific Development Qt allows you to write advanced applications and UIs once, and deploy them across desktop and embedded operating systems without rewriting the source code. The top section of this page provides an overview of the tools and @@ -37,7 +37,7 @@ links to documents that describe platform-specific features provided by Qt, and discuss issues related to particular platforms and environments. - \section1 Cross-platform Development with Qt + \section1 Cross-Platform Development with Qt Qt is provided with a set of build tools to help developers automate the process of building and installing Qt applications. @@ -68,7 +68,7 @@ \endlist \endtable - \section1 Platform-specific Development with Qt + \section1 Platform-Specific Development with Qt These documents describe platform-specific features provided by Qt, and discuss issues related to particular platforms and environments. @@ -110,6 +110,4 @@ \o Collections of notes about Qt implementations on different window systems. \endlist \endtable - - */ diff --git a/doc/src/index.qdoc b/doc/src/index.qdoc index aefbea1..4aec230 100644 --- a/doc/src/index.qdoc +++ b/doc/src/index.qdoc @@ -72,11 +72,11 @@ \enddiv \div {sectionlist tricol} \list - \o \l{qt-basic-concepts.html}{Programming with Qt} - \o \l{qt-gui-concepts.html}{UI Design with Qt} - \o \l{developing-with-qt.html}{Cross-platform and Platform-specific} - \o \l{technology-apis.html}{Qt and Key Technologies} - \o \l{best-practices.html}{Best Practices Guides} + \o \l{Programming with Qt} + \o \l{UI Design with Qt} + \o \l{Cross-Platform and Platform-Specific Development} + \o \l{Qt and Key Technologies} + \o \l{Best Practice Guides} \endlist \enddiv \div {sectionlist} diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index b9bd3b4..a411aa2 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -122,9 +122,9 @@ /*! \group best-practices - \title Best Practices Guides + \title Best Practice Guides - \brief How-To Guides and Best Practices + \brief How-To and Best Practice Guides These documents provide guidelines and best practices for using Qt to solve specific technical problems. They are listed -- cgit v0.12 From 144ea56ae4c76cba0e89dc78356df2cac3783ef5 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:40:45 +0100 Subject: Doc: Fixed whitespace. --- doc/src/template/style/style.css | 75 ++++++++-------------------------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/doc/src/template/style/style.css b/doc/src/template/style/style.css index 4f9e26c..451d6bf 100755 --- a/doc/src/template/style/style.css +++ b/doc/src/template/style/style.css @@ -2,7 +2,7 @@ { /* basic elements */ - html + html { color: #000000; background: #FFFFFF; @@ -210,8 +210,6 @@ { color: black } - - /* end basic elements */ /* font style elements */ @@ -255,8 +253,8 @@ clear: both; visibility: hidden; } - /* end global settings*/ + /* header elements */ .header { @@ -341,7 +339,6 @@ background-position: -2px -117px; } - #nav-topright li.nav-topright-dev a { width: 30px; @@ -416,7 +413,6 @@ overflow: hidden; } - .shortCut-topleft-inactive { padding-left: 3px; @@ -460,10 +456,8 @@ { color: #44a51c; } - - - /* end header elements */ + /* content and sidebar elements */ .wrapper { @@ -477,9 +471,6 @@ overflow: hidden; } - - - .wrapper .hd span { height: 15px; @@ -493,9 +484,6 @@ position: relative; } - - - .wrapper .ft { padding-left: 216px; @@ -504,9 +492,6 @@ overflow: hidden; } - - - .wrapper .ft span { height: 15px; @@ -519,10 +504,8 @@ display:block; padding-right:15px; } - - - /* end content and sidebar elements */ + /* sidebar elements */ .sidebar { @@ -532,11 +515,6 @@ font-size: 11px; } - - - - - .sidebar .searchlabel { padding: 0 0 2px 17px; @@ -766,8 +744,8 @@ } .floatingResult:hover{ } - /* end sidebar elements */ + /* content elements */ .wrap { @@ -775,9 +753,6 @@ overflow: visible; } - - - .wrap .toolbar { background-color: #fafafa; @@ -864,7 +839,6 @@ color: #00732F; } - .wrap .content { padding: 30px; @@ -897,9 +871,6 @@ margin-left: 0; } - - - .wrap .content ol li { background:none; font:normal 10pt/1.2 Verdana; @@ -1304,11 +1275,10 @@ .functionIndex a{ display:inline-block; } - /* end content elements */ -/* footer elements */ - .footer +/* footer elements */ + .footer { min-height: 100px; color: #797775; @@ -1318,15 +1288,12 @@ background-color: #E6E7E8; margin: 0; } - .small + .small { font: normal 9px/1 Verdana; } /* end footer elements */ - - - /* start index box */ .indexbox { @@ -1356,8 +1323,7 @@ _width:42%; padding:0 2% 0 1%; vertical-align:top; - -} + } .indexboxcont .indexIcon { @@ -1365,12 +1331,11 @@ *width:18%; _width:18%; overflow:hidden; + } -} - -.indexboxcont .section { - float: left; -} + .indexboxcont .section { + float: left; + } .indexboxcont .section p { @@ -1511,7 +1476,7 @@ } - .creator .header, .footer + .creator .header, .footer { display: block; clear: both; @@ -1595,8 +1560,6 @@ background: none; } - - .creator .header { width: 100%; @@ -1610,7 +1573,6 @@ /* position:fixed;*/ } - .creator .header .content { } @@ -1639,19 +1601,12 @@ text-decoration:none; } - - - - - .creator .wrap .toolbar { display:block; padding-top:0px; } - - .creator .wrap .breadcrumb ul li { font-weight: normal; } @@ -1675,7 +1630,6 @@ margin-top:-15px; } - .creator .toc { margin:10px 20px 10px 10px; } @@ -1692,7 +1646,6 @@ overflow: hidden; } - .item .primary { margin-right: 220px; position: relative; -- cgit v0.12 From ca56f3a1797d735048fcb8b1e2b4aede75db8f89 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:45:08 +0100 Subject: Updated the offline template to use a new offline style sheet. --- doc/src/template/style/offline.css | 662 +++++++++++++++++++++++ tools/qdoc3/test/qt-html-default-styles.qdocconf | 6 +- tools/qdoc3/test/qt-html-templates.qdocconf | 21 +- 3 files changed, 672 insertions(+), 17 deletions(-) create mode 100644 doc/src/template/style/offline.css diff --git a/doc/src/template/style/offline.css b/doc/src/template/style/offline.css new file mode 100644 index 0000000..4a10d0a --- /dev/null +++ b/doc/src/template/style/offline.css @@ -0,0 +1,662 @@ +@media screen +{ + +/* basic elements */ + html + { + color: #000000; + background: #FFFFFF; + } + table + { + border-collapse: collapse; + border-spacing: 0; + } + fieldset, img + { + border: 0; + max-width:100%; + } + address, caption, cite, code, dfn, em, strong, th, var, optgroup + { + font-style: inherit; + font-weight: inherit; + } + del, ins + { + text-decoration: none; + } + li + { + list-style: none; + } + ol li + { + list-style: decimal; + } + caption, th + { + text-align: left; + } + h1, h2, h3, h4, h5, h6 + { + font-size: 100%; + } + q:before, q:after + { + content: ''; + } + abbr, acronym + { + border: 0; + font-variant: normal; + } + sup, sub + { + vertical-align: baseline; + } + tt, .qmlreadonly span, .qmldefault span + { + word-spacing:0.5em; + } + legend + { + color: #000000; + } + strong + { + font-weight: bold; + } + em + { + font-style: italic; + } + + /* adding Qt theme */ + body + { + margin-left: 0.5em; + margin-right: 0.5em + } + a + { + color: #00732F; + text-decoration: none; + } + hr + { + background-color: #E6E6E6; + border: 1px solid #E6E6E6; + height: 1px; + width: 100%; + text-align: left; + margin: 1.5em 0 1.5em 0; + } + + pre + { + border: 1px solid #DDDDDD; + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; + border-radius: 0.7em 0.7em 0.7em 0.7em; + margin: 0 1.5em 1em 1em; + padding: 1em 1em 1em 1em; + overflow-x: auto; + } + table, pre + { + -moz-border-radius: 0.7em 0.7em 0.7em 0.7em; + -webkit-border-radius: 0.7em 0.7em 0.7em 0.7em; + border-radius: 0.7em 0.7em 0.7em 0.7em; + background-color: #F6F6F6; + border: 1px solid #E6E6E6; + border-collapse: separate; + font-size: 110%; + margin-bottom: 2.5em; + } + pre { + font-size: 90%; + display: block; + overflow:hidden; + } + thead + { + margin-top: 0.5em; + font-weight: bold + } + th + { + padding: 0.5em 1.5em 0.5em 1.5em; + background-color: #E1E1E1; + border-left: 1px solid #E6E6E6; + } + td + { + padding: 0.25em 1.5em 0.25em 2em; + } + + td.rightAlign + { + padding: 0.25em 0.5em 0.25em 1em; + } + table tr.odd + { + border-left: 1px solid #E6E6E6; + background-color: #F6F6F6; + color: #66666E; + } + table tr.even + { + border-left: 1px solid #E6E6E6; + background-color: #ffffff; + color: #66666E; + } + + div.float-left + { + float: left; margin-right: 2em + } + div.float-right + { + float: right; margin-left: 2em + } + + span.comment + { + color: #008B00; + } + span.string, span.char + { + color: #000084; + } + span.number + { + color: #a46200; + } + span.operator + { + color: black; + } + span.keyword + { + color: #840000; + } + span.name + { + color: black + } +/* end basic elements */ + +/* font style elements */ + .heading + { + font-weight: bold; + font-size: 160%; + } + .subtitle + { + font-size: 130% + } + .small-subtitle + { + font-size: 130% + } + .red + { + color:red; + } +/* end font style elements */ + +/* global settings*/ + .header, .footer + { + display: block; + clear: both; + overflow: hidden; + } +/* end global settings*/ + +/* header elements */ + .header .qtref + { + color: #00732F; + font-weight: bold; + font-size: 180%; + } + + .header .content + { + margin-bottom: 0.5em + } + + .naviNextPrevious + { + display: none + } + .header .breadcrumb + { + font-size: 90%; + padding: 0.5em 0 0.5em 1em; + margin: 0; + background-color: #fafafa; + height: 1.35em; + border-bottom: 1px solid #d1d1d1; + } + + .header .breadcrumb ul + { + margin: 0; + padding: 0; + } + + .header .content + { + word-wrap: break-word; + } + + .header .breadcrumb ul li + { + float: left; + background: url(../images/breadcrumb.png) no-repeat 0 3px; + padding-left: 1.5em; + margin-left: 1.5em; + } + + .header .breadcrumb ul li.last + { + font-weight: normal; + } + + .header .breadcrumb ul li a + { + color: #00732F; + } + + .header .breadcrumb ul li.first + { + background-image: none; + padding-left: 0; + margin-left: 0; + } + + .header .content ol li { + background: none; + margin-bottom: 1.0em; + margin-left: 1.2em; + padding-left: 0 + } + + .header .content li + { + background: url(../images/bullet_sq.png) no-repeat 0 5px; + margin-bottom: 1em; + padding-left: 1.2em; + } + +/* end header elements */ + +/* content elements */ + .content h1 + { + font-weight: bold; + font-size: 180% + } + + .content h2 + { + font-weight: bold; + font-size: 160%; + width: 100%; + } + .content h3 + { + font-weight: bold; + font-size: 1.4em; + width: 100%; + } + .content table p + { + margin: 0 + } + .content ul + { + padding-left: 2.5em; + } + .content li + { + padding-top: 0.25em; + padding-bottom: 0.25em; + } + .content ul img { + vertical-align: middle; + } + + .content a:visited + { + color: #4c0033; + text-decoration: none; + } + + .content a:visited:hover + { + color: #4c0033; + text-decoration: underline; + } + + a:hover + { + color: #4c0033; + text-decoration: underline; + } + descr p a + { + text-decoration: underline; + } + + .descr p a:visited + { + text-decoration: underline; + } + + .alphaChar{ + width:95%; + background-color:#F6F6F6; + border:1px solid #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + font-size:12pt; + padding-left:10px; + margin-top:10px; + margin-bottom:10px; + } + .flowList{ + /*vertical-align:top;*/ + /*margin:20px auto;*/ + + column-count:3; + -webkit-column-count:3; + -moz-column-count:3; +/* + column-width:100%; + -webkit-column-width:200px; + -col-column-width:200px; +*/ + column-gap:41px; + -webkit-column-gap:41px; + -moz-column-gap:41px; + + column-rule: 1px dashed #ccc; + -webkit-column-rule: 1px dashed #ccc; + -moz-column-rule: 1px dashed #ccc; + } + + .flowList dl{ + } + .flowList dd{ + /*display:inline-block;*/ + margin-left:10px; + min-width:250px; + line-height: 1.5; + min-width:100%; + min-height:15px; + } + + .flowList dd a{ + } + + .content .flowList p{ + padding:0px; + } + + .content .alignedsummary + { + margin: 15px; + } + + + .qmltype + { + text-align: center; + font-size: 160%; + } + .qmlreadonly + { + padding-left: 5px; + float: right; + color: #254117; + } + + .qmldefault + { + padding-left: 5px; + float: right; + color: red; + } + + .qmldoc + { + } + + .generic .alphaChar{ + margin-top:5px; + } + + .generic .odd .alphaChar{ + background-color: #F6F6F6; + } + + .generic .even .alphaChar{ + background-color: #FFFFFF; + } + + .memItemRight{ + padding: 0.25em 1.5em 0.25em 0; + } + .highlightedCode + { + margin: 1.0em; + } + .annotated td { + padding: 0.25em 0.5em 0.25em 0.5em; + } + + .header .content .toc ul + { + padding-left: 0px; + } + + .content .toc h3 { + border-bottom: 0px; + margin-top: 0px; + } + + .content .toc h3 a:hover { + color: #00732F; + text-decoration: none; + } + + .content .toc .level2 + { + margin-left: 1.5em; + } + + .content .toc .level3 + { + margin-left: 3.0em; + } + + .content ul li + { + background: url(../images/bullet_sq.png) no-repeat 0 0.7em; + padding-left: 1em + } + + .content .toc li + { + background: url(../images/bullet_dn.png) no-repeat 0 5px; + padding-left: 1em + } + + .relpage + { + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + border: 1px solid #DDDDDD; + padding: 25px 25px; + clear: both; + } + .relpage ul + { + float: none; + padding: 1.5em; + } + + h3.fn, span.fn + { + -moz-border-radius:7px 7px 7px 7px; + -webkit-border-radius:7px 7px 7px 7px; + border-radius:7px 7px 7px 7px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + font-weight: bold; + word-spacing:3px; + padding:3px 5px; + } + + .functionIndex { + font-size:12pt; + word-spacing:10px; + margin-bottom:10px; + background-color: #F6F6F6; + border-width: 1px; + border-style: solid; + border-color: #E6E6E6; + -moz-border-radius: 7px 7px 7px 7px; + -webkit-border-radius: 7px 7px 7px 7px; + border-radius: 7px 7px 7px 7px; + width:100%; + } + + .centerAlign + { + text-align:center; + } + + .rightAlign + { + text-align:right; + } + + .leftAlign + { + text-align:left; + } + + .topAlign{ + vertical-align:top + } + + .functionIndex a{ + display:inline-block; + } + +/* end content elements */ +/* footer elements */ + + .footer + { + color: #393735; + font-size: 0.75em; + text-align: center; + padding-top: 1.5em; + padding-bottom: 1em; + background-color: #E6E7E8; + margin: 0; + } + .footer p + { + margin: 0.25em + } + .small + { + font-size: 0.75em; + } +/* end footer elements */ + + .item { + float: left; + position: relative; + width: 100%; + overflow: hidden; + } + + + .item .primary { + margin-right: 220px; + position: relative; + } + + .item hr { + margin-left: -220px; + } + + .item .secondary { + float: right; + width: 200px; + position: relative; + } + + .item .cols { + clear: both; + display: block; + } + + .item .cols .col { + float: left; + margin-left: 1.5%; + } + + .item .cols .col.first { + margin-left: 0; + } + + .item .cols.two .col { + width: 45%; + } + + .item .box { + margin: 0 0 10px 0; + } + + .item .box h3 { + margin: 0 0 10px 0; + } + + .cols.unclear { + clear:none; + } +} + +/* end of screen media */ + +/* start of print media */ + +@media print +{ + input, textarea, .header, .footer, .toolbar, .feedback, .wrapper .hd, .wrapper .bd .sidebar, .wrapper .ft, #feedbackBox, #blurpage, .toc, .breadcrumb, .toolbar, .floatingResult + { + display: none; + background: none; + } + .content + { + background: none; + display: block; + width: 100%; margin: 0; float: none; + } +} +/* end of print media */ diff --git a/tools/qdoc3/test/qt-html-default-styles.qdocconf b/tools/qdoc3/test/qt-html-default-styles.qdocconf index 623e4a9..d37ef5d 100644 --- a/tools/qdoc3/test/qt-html-default-styles.qdocconf +++ b/tools/qdoc3/test/qt-html-default-styles.qdocconf @@ -4,7 +4,7 @@ HTML.templatedir = $QT_SOURCE_TREE/doc/src/template -HTML.stylesheets = style/style.css +HTML.stylesheets = style/offline.css HTML.scripts = @@ -23,10 +23,10 @@ extraimages.HTML = qt-logo.png \ # Include the style sheets and scripts used. HTML.headerstyles = \ - " \n" + " \n" HTML.headerscripts = HTML.endheader = \ "\n" \ - "\n" + "\n" diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 8241fa0..12588f9 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -1,26 +1,19 @@ include(qt-html-default-styles.qdocconf) HTML.postheader = \ - "
\n" \ + "
\n" \ "
\n" \ - "
\n" \ - " Home\n" \ - "
\n" \ " Qt Reference Documentation\n" \ "
\n" \ - "
\n" \ - "
\n" \ - "
\n" \ - "
    \n" \ - "
  • Home
  • \n" \ - " \n" + "
    \n" \ + "
      \n" \ + "
    • Home
    • \n" \ + " \n" HTML.postpostheader = \ - "
    \n" \ - "
    \n" \ - "
\n" \ + " \n" \ "
\n" \ - "
\n" \ + "
\n" \ "
\n" HTML.footer = \ -- cgit v0.12 From 02c548c7a38c627b12e84ff164a406cc478f8658 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Fri, 17 Dec 2010 20:46:11 +0100 Subject: Removed obsolete configuration options. --- tools/qdoc3/htmlgenerator.cpp | 6 ------ tools/qdoc3/htmlgenerator.h | 4 ---- 2 files changed, 10 deletions(-) diff --git a/tools/qdoc3/htmlgenerator.cpp b/tools/qdoc3/htmlgenerator.cpp index 948a7d6..ebc2713 100644 --- a/tools/qdoc3/htmlgenerator.cpp +++ b/tools/qdoc3/htmlgenerator.cpp @@ -270,12 +270,6 @@ void HtmlGenerator::initializeGenerator(const Config &config) postPostHeader = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_POSTPOSTHEADER); - creatorPostHeader = config.getString(HtmlGenerator::format() + - Config::dot + - HTMLGENERATOR_CREATORPOSTHEADER); - creatorPostPostHeader = config.getString(HtmlGenerator::format() + - Config::dot + - HTMLGENERATOR_CREATORPOSTPOSTHEADER); footer = config.getString(HtmlGenerator::format() + Config::dot + HTMLGENERATOR_FOOTER); diff --git a/tools/qdoc3/htmlgenerator.h b/tools/qdoc3/htmlgenerator.h index 8b5c50b..f5d2427 100644 --- a/tools/qdoc3/htmlgenerator.h +++ b/tools/qdoc3/htmlgenerator.h @@ -269,8 +269,6 @@ class HtmlGenerator : public PageGenerator QString endHeader; QString postHeader; QString postPostHeader; - QString creatorPostHeader; - QString creatorPostPostHeader; QString footer; QString address; bool pleaseGenerateMacRef; @@ -309,8 +307,6 @@ class HtmlGenerator : public PageGenerator #define HTMLGENERATOR_GENERATEMACREFS "generatemacrefs" // ### document me #define HTMLGENERATOR_POSTHEADER "postheader" #define HTMLGENERATOR_POSTPOSTHEADER "postpostheader" -#define HTMLGENERATOR_CREATORPOSTHEADER "postheader" -#define HTMLGENERATOR_CREATORPOSTPOSTHEADER "postpostheader" QT_END_NAMESPACE -- cgit v0.12 From 184458394b344947bea1852ab88561dc60db6038 Mon Sep 17 00:00:00 2001 From: Aaron McCarthy Date: Mon, 20 Dec 2010 10:32:54 +1000 Subject: Quiet unused parameter warnings. --- src/plugins/bearer/icd/qicdengine.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/bearer/icd/qicdengine.cpp b/src/plugins/bearer/icd/qicdengine.cpp index a5a183b..96827f3 100644 --- a/src/plugins/bearer/icd/qicdengine.cpp +++ b/src/plugins/bearer/icd/qicdengine.cpp @@ -966,6 +966,9 @@ void QIcdEngine::connectionStateSignalsSlot(QDBusMessage msg) void QIcdEngine::icdServiceOwnerChanged(const QString &serviceName, const QString &oldOwner, const QString &newOwner) { + Q_UNUSED(serviceName); + Q_UNUSED(oldOwner); + QMutexLocker locker(&mutex); if (newOwner.isEmpty()) { -- cgit v0.12 From 3fe6eab1e6e451457b9c060b6b643b86d3f82557 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Dec 2010 12:07:22 +1000 Subject: Fix spelling in declarative autotests Task-number: Reviewed-by: Martin Jones --- .../qdeclarativeecmascript/data/nonExistantAttachedObject.qml | 5 ----- .../qdeclarativeecmascript/data/nonExistentAttachedObject.qml | 5 +++++ .../qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 8 ++++---- .../qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp | 2 +- .../declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp | 6 +++--- 5 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml deleted file mode 100644 index f9585db..0000000 --- a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistantAttachedObject.qml +++ /dev/null @@ -1,5 +0,0 @@ -import Qt.test 1.0 - -MyQmlObject { - stringProperty: MyQmlContainer.prop -} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml new file mode 100644 index 0000000..f9585db --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/nonExistentAttachedObject.qml @@ -0,0 +1,5 @@ +import Qt.test 1.0 + +MyQmlObject { + stringProperty: MyQmlContainer.prop +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 77fab91..4228bc4 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -105,7 +105,7 @@ private slots: void constantsOverrideBindings(); void outerBindingOverridesInnerBinding(); void aliasPropertyAndBinding(); - void nonExistantAttachedObject(); + void nonExistentAttachedObject(); void scope(); void signalParameterTypes(); void objectsCompareAsEqual(); @@ -643,7 +643,7 @@ void tst_qdeclarativeecmascript::attachedProperties() void tst_qdeclarativeecmascript::enums() { - // Existant enums + // Existent enums { QDeclarativeComponent component(&engine, TEST_FILE("enums.1.qml")); QObject *object = component.create(); @@ -785,9 +785,9 @@ Access a non-existent attached object. Tests for a regression where this used to crash. */ -void tst_qdeclarativeecmascript::nonExistantAttachedObject() +void tst_qdeclarativeecmascript::nonExistentAttachedObject() { - QDeclarativeComponent component(&engine, TEST_FILE("nonExistantAttachedObject.qml")); + QDeclarativeComponent component(&engine, TEST_FILE("nonExistentAttachedObject.qml")); QString warning = component.url().toString() + ":4: Unable to assign [undefined] to QString stringProperty"; QTest::ignoreMessage(QtWarningMsg, qPrintable(warning)); diff --git a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp index 4470d65..304ce61 100644 --- a/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp +++ b/tests/auto/declarative/qdeclarativeinstruction/tst_qdeclarativeinstruction.cpp @@ -512,7 +512,7 @@ void tst_qdeclarativeinstruction::dump() { QDeclarativeInstruction i; i.line = 50; - i.type = (QDeclarativeInstruction::Type)(1234); // Non-existant + i.type = (QDeclarativeInstruction::Type)(1234); // Non-existent data->bytecode << i; } diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 50463b7..6410853 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -947,7 +947,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("value", QVariant(13)); QCOMPARE(object->property("valueAlias").toInt(), 13); - // Write throught alias + // Write through alias object->setProperty("valueAlias", QVariant(19)); QCOMPARE(object->property("valueAlias").toInt(), 19); QCOMPARE(object->property("value").toInt(), 19); @@ -1109,7 +1109,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("rectProperty", QVariant(QRect(33, 12, 99, 100))); QCOMPARE(object->property("valueAlias").toRect(), QRect(33, 12, 99, 100)); - // Write throught alias + // Write through alias object->setProperty("valueAlias", QVariant(QRect(3, 3, 4, 9))); QCOMPARE(object->property("valueAlias").toRect(), QRect(3, 3, 4, 9)); QCOMPARE(object->property("rectProperty").toRect(), QRect(3, 3, 4, 9)); @@ -1129,7 +1129,7 @@ void tst_qdeclarativelanguage::aliasProperties() object->setProperty("rectProperty", QVariant(QRect(33, 8, 102, 111))); QCOMPARE(object->property("aliasProperty").toInt(), 33); - // Write throught alias + // Write through alias object->setProperty("aliasProperty", QVariant(4)); QCOMPARE(object->property("aliasProperty").toInt(), 4); QCOMPARE(object->property("rectProperty").toRect(), QRect(4, 8, 102, 111)); -- cgit v0.12 From 95b0418a7ee7aee9658fd19b363e73d583af0b04 Mon Sep 17 00:00:00 2001 From: Damian Jansen Date: Mon, 20 Dec 2010 13:09:48 +1000 Subject: Fix deployment of minehunt for Symbian Task: QT-4298 --- demos/declarative/minehunt/minehunt.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/minehunt/minehunt.pro b/demos/declarative/minehunt/minehunt.pro index 8a7fdc5..5929ecf 100644 --- a/demos/declarative/minehunt/minehunt.pro +++ b/demos/declarative/minehunt/minehunt.pro @@ -18,6 +18,6 @@ symbian:{ TARGET.EPOCHEAPSIZE = 0x20000 0x2000000 include($$QT_SOURCE_TREE/demos/symbianpkgrules.pri) qmlminehuntfiles.sources = MinehuntCore minehunt.qml - DEPLOYMENT = qmlminehuntfiles + DEPLOYMENT += qmlminehuntfiles } -- cgit v0.12 From 0aeebdc851682d2afd63494ddeafa4e745ad2b72 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 20 Dec 2010 14:30:09 +1000 Subject: Update docs on importing javascript files --- doc/src/declarative/javascriptblocks.qdoc | 4 +++- doc/src/declarative/modules.qdoc | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/src/declarative/javascriptblocks.qdoc b/doc/src/declarative/javascriptblocks.qdoc index 155bd6e..68cb392 100644 --- a/doc/src/declarative/javascriptblocks.qdoc +++ b/doc/src/declarative/javascriptblocks.qdoc @@ -99,7 +99,9 @@ resource, the component's \l {QDeclarativeComponent::status()}{status} is set to Imported JavaScript files are always qualified using the "as" keyword. The qualifier for JavaScript files must be unique, so there is always a one-to-one -mapping between qualifiers and JavaScript files. +mapping between qualifiers and JavaScript files. (This also means qualifiers cannot +be named the same as built-in JavaScript objects such as \c Date and \c Math). + \section2 Code-Behind Implementation Files diff --git a/doc/src/declarative/modules.qdoc b/doc/src/declarative/modules.qdoc index 011eb63..bf9f5fd 100644 --- a/doc/src/declarative/modules.qdoc +++ b/doc/src/declarative/modules.qdoc @@ -216,6 +216,8 @@ JavaScript files must always be imported with a named import: } \endqml +The qualifier ("MyScript" in the above example) must be unique within the QML document. +Unlike ordinary modules, multiple scripts cannot be imported into the same namespace. \section1 Writing a qmldir file -- cgit v0.12 From 327169a6a3fb0bac258cb878019734211a707cce Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 20 Dec 2010 14:30:27 +1000 Subject: Don't truncate image:// url strings prematurely Url fragments and queries were being removed from the image ids passed to QDeclarativeImageProvider. Task-number: QTBUG-16195 Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeengine.cpp | 12 ++++-- src/declarative/qml/qdeclarativeimageprovider.cpp | 16 ++++++-- .../tst_qdeclarativeimageprovider.cpp | 46 ++++++++++++++++++++-- 3 files changed, 62 insertions(+), 12 deletions(-) diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 201e675..cf3ea42 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -760,8 +760,10 @@ QImage QDeclarativeEnginePrivate::getImageFromProvider(const QUrl &url, QSize *s QImage image; QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); - if (provider) - image = provider->requestImage(url.path().mid(1), size, req_size); + if (provider) { + QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1); + image = provider->requestImage(imageId, size, req_size); + } return image; } @@ -771,8 +773,10 @@ QPixmap QDeclarativeEnginePrivate::getPixmapFromProvider(const QUrl &url, QSize QPixmap pixmap; QSharedPointer provider = imageProviders.value(url.host()); locker.unlock(); - if (provider) - pixmap = provider->requestPixmap(url.path().mid(1), size, req_size); + if (provider) { + QString imageId = url.toString(QUrl::RemoveScheme | QUrl::RemoveAuthority).mid(1); + pixmap = provider->requestPixmap(imageId, size, req_size); + } return pixmap; } diff --git a/src/declarative/qml/qdeclarativeimageprovider.cpp b/src/declarative/qml/qdeclarativeimageprovider.cpp index ef31be7..e3da645 100644 --- a/src/declarative/qml/qdeclarativeimageprovider.cpp +++ b/src/declarative/qml/qdeclarativeimageprovider.cpp @@ -182,13 +182,17 @@ QDeclarativeImageProvider::ImageType QDeclarativeImageProvider::imageType() cons Implement this method to return the image with \a id. The default implementation returns an empty image. + The \a id is the requested image source, with the "image:" scheme and + provider identifier removed. For example, if the image \l{Image::}{source} + was "image://myprovider/icons/home", the given \a id would be "icons/home". + The \a requestedSize corresponds to the \l {Image::sourceSize} requested by an Image element. If \a requestedSize is a valid size, the image returned should be of that size. In all cases, \a size must be set to the original size of the image. This - is used to set the \l {Item::}{width} and \l {Item::}{height} of image - elements that should be automatically sized to the loaded image. + is used to set the \l {Item::}{width} and \l {Item::}{height} of the + relevant \l Image if these values have not been set explicitly. \note this method may be called by multiple threads, so ensure the implementation of this method is reentrant. @@ -207,13 +211,17 @@ QImage QDeclarativeImageProvider::requestImage(const QString &id, QSize *size, c Implement this method to return the pixmap with \a id. The default implementation returns an empty pixmap. + The \a id is the requested image source, with the "image:" scheme and + provider identifier removed. For example, if the image \l{Image::}{source} + was "image://myprovider/icons/home", the given \a id would be "icons/home". + The \a requestedSize corresponds to the \l {Image::sourceSize} requested by an Image element. If \a requestedSize is a valid size, the image returned should be of that size. In all cases, \a size must be set to the original size of the image. This - is used to set the \l {Item::}{width} and \l {Item::}{height} of image - elements that should be automatically sized to the loaded image. + is used to set the \l {Item::}{width} and \l {Item::}{height} of the + relevant \l Image if these values have not been set explicitly. */ QPixmap QDeclarativeImageProvider::requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) { diff --git a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp index cd12e3a..5b214e6 100644 --- a/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp +++ b/tests/auto/declarative/qdeclarativeimageprovider/tst_qdeclarativeimageprovider.cpp @@ -100,6 +100,8 @@ public: QImage requestImage(const QString &id, QSize *size, const QSize& requestedSize) { + lastImageId = id; + if (id == QLatin1String("no-such-file.png")) return QImage(); @@ -114,6 +116,7 @@ public: } bool *deleteWatch; + QString lastImageId; }; Q_DECLARE_METATYPE(TestQImageProvider*); @@ -134,6 +137,8 @@ public: QPixmap requestPixmap(const QString &id, QSize *size, const QSize& requestedSize) { + lastImageId = id; + if (id == QLatin1String("no-such-file.png")) return QPixmap(); @@ -148,6 +153,7 @@ public: } bool *deleteWatch; + QString lastImageId; }; Q_DECLARE_METATYPE(TestQPixmapProvider*); @@ -164,22 +170,49 @@ QString tst_qdeclarativeimageprovider::newImageFileName() const void tst_qdeclarativeimageprovider::fillRequestTestsData(const QString &id) { QTest::addColumn("source"); + QTest::addColumn("imageId"); QTest::addColumn("properties"); QTest::addColumn("size"); QTest::addColumn("error"); - QTest::newRow(QTest::toString(id + " exists")) << newImageFileName() << "" << QSize(100,100) << ""; - QTest::newRow(QTest::toString(id + " scaled")) << newImageFileName() << "sourceSize: \"80x30\"" << QSize(80,30) << ""; + QString fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " simple test")) + << "image://test/" + fileName << fileName << "" << QSize(100,100) << ""; + + fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " url with no id")) + << "image://test/" + fileName << "" + fileName << "" << QSize(100,100) << ""; + + fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " url with path")) + << "image://test/test/path" + fileName << "test/path" + fileName << "" << QSize(100,100) << ""; + + fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " url with fragment")) + << "image://test/faq.html?#question13" + fileName << "faq.html?#question13" + fileName << "" << QSize(100,100) << ""; - QTest::newRow(QTest::toString(id + " missing")) << "image://test/no-such-file.png" << "" << QSize() + fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " url with query")) + << "image://test/cgi-bin/drawgraph.cgi?type=pie&color=green" + fileName << "cgi-bin/drawgraph.cgi?type=pie&color=green" + fileName + << "" << QSize(100,100) << ""; + + fileName = newImageFileName(); + QTest::newRow(QTest::toString(id + " scaled image")) + << "image://test/" + fileName << fileName << "sourceSize: \"80x30\"" << QSize(80,30) << ""; + + QTest::newRow(QTest::toString(id + " missing")) + << "image://test/no-such-file.png" << "no-such-file.png" << "" << QSize(100,100) << "file::2:1: QML Image: Failed to get image from provider: image://test/no-such-file.png"; - QTest::newRow(QTest::toString(id + " unknown provider")) << "image://bogus/exists.png" << "" << QSize() + + QTest::newRow(QTest::toString(id + " unknown provider")) + << "image://bogus/exists.png" << "" << "" << QSize() << "file::2:1: QML Image: Failed to get image from provider: image://bogus/exists.png"; } void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvider *provider) { QFETCH(QString, source); + QFETCH(QString, imageId); QFETCH(QString, properties); QFETCH(QSize, size); QFETCH(QString, error); @@ -210,6 +243,11 @@ void tst_qdeclarativeimageprovider::runTest(bool async, QDeclarativeImageProvide QTRY_VERIFY(obj->status() == QDeclarativeImage::Ready); else QVERIFY(obj->status() == QDeclarativeImage::Ready); + if (QByteArray(QTest::currentDataTag()).startsWith("qimage")) + QCOMPARE(static_cast(provider)->lastImageId, imageId); + else + QCOMPARE(static_cast(provider)->lastImageId, imageId); + QCOMPARE(obj->width(), qreal(size.width())); QCOMPARE(obj->height(), qreal(size.height())); QCOMPARE(obj->pixmap().width(), size.width()); -- cgit v0.12 From ee4a2417950dc9b411660fa229908619eff956a2 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 20 Dec 2010 15:42:52 +1000 Subject: Add copyright header --- .../touchinteraction/pincharea/flickresize.qml | 40 ++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml index 8034e29..8f29d6d 100644 --- a/examples/declarative/touchinteraction/pincharea/flickresize.qml +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -1,3 +1,43 @@ +/**************************************************************************** +** +** 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 examples of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + import QtQuick 1.1 Rectangle { -- cgit v0.12 From 28973e50710cfcd96da037cdad7f46700221c185 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Mon, 20 Dec 2010 15:50:41 +1000 Subject: Make it clear which security updates are needed for Visual Studio 2005. As well as Service Pack 1, the compiler also needs four additional security updates in order to work correctly with Qt's pre-built binary package. Task-number: QTBUG-7633 Reviewed-by: Toby Tomkins --- doc/src/getting-started/installation.qdoc | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/src/getting-started/installation.qdoc b/doc/src/getting-started/installation.qdoc index a68310c..5b009cd 100644 --- a/doc/src/getting-started/installation.qdoc +++ b/doc/src/getting-started/installation.qdoc @@ -963,6 +963,7 @@ We hope you will enjoy using Qt. first install the Visual Studio Service Pack 1 available \l{http://www.microsoft.com/downloads/details.aspx?FamilyId=BB4A75AB-E2D4-4C96-B39D-37BAF6B5B1DC&displaylang=en}{here} to avoid runtime conflicts. + Additionally, you must use the Check for Updates feature in the Help menu of the Visual Studio 2005 IDE to apply at least the following security updates: KB937061, KB971023, KB971090, KB973673. If you are using a source edition of Qt, you must first install Perl so that the syncqt script invoked by configure can be executed. You can download -- cgit v0.12 From 95e64de1827f9b2bae829d40756f7142c56c460f Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Dec 2010 15:44:25 +1000 Subject: Update test bitmaps for QDeclarativeImage::svg() autotest on Windows Task-number: Reviewed-by: Martin Jones --- .../qdeclarativeimage/data/heart-win32.png | Bin 12457 -> 12621 bytes .../qdeclarativeimage/data/heart200-win32.png | Bin 7939 -> 8062 bytes 2 files changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png index 5992e79..351da13 100644 Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png and b/tests/auto/declarative/qdeclarativeimage/data/heart-win32.png differ diff --git a/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png index 19b20a8..4976ff9 100644 Binary files a/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png and b/tests/auto/declarative/qdeclarativeimage/data/heart200-win32.png differ -- cgit v0.12 From 197ec350e4014330851a013501c6dde3068ac26f Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 20 Dec 2010 17:07:34 +1000 Subject: Setting TextInput.cursorPosition outside bounds crashed. Check bounds in TextInput and TextEdit. Task-number: QTBUG-16188 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 2 ++ src/declarative/graphicsitems/qdeclarativetextinput.cpp | 2 ++ .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 13 +++++++++++++ .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 13 +++++++++++++ 4 files changed, 30 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index e05f4e4..4e16d24 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -643,6 +643,8 @@ int QDeclarativeTextEdit::cursorPosition() const void QDeclarativeTextEdit::setCursorPosition(int pos) { Q_D(QDeclarativeTextEdit); + if (pos < 0 || pos > d->text.length()) + return; QTextCursor cursor = d->control->textCursor(); if (cursor.position() == pos) return; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index df103de..521e4ab 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -437,6 +437,8 @@ int QDeclarativeTextInput::cursorPosition() const void QDeclarativeTextInput::setCursorPosition(int cp) { Q_D(QDeclarativeTextInput); + if (cp < 0 || cp > d->control->text().length()) + return; d->control->moveCursor(cp); } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index a7971cc..c7a51f7 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -652,6 +652,19 @@ void tst_qdeclarativetextedit::selection() QVERIFY(textEditObject->selectionEnd() == 0); QVERIFY(textEditObject->selectedText().isNull()); + // Verify invalid positions are ignored. + textEditObject->setCursorPosition(-1); + QVERIFY(textEditObject->cursorPosition() == 0); + QVERIFY(textEditObject->selectionStart() == 0); + QVERIFY(textEditObject->selectionEnd() == 0); + QVERIFY(textEditObject->selectedText().isNull()); + + textEditObject->setCursorPosition(textEditObject->text().count()+1); + QVERIFY(textEditObject->cursorPosition() == 0); + QVERIFY(textEditObject->selectionStart() == 0); + QVERIFY(textEditObject->selectionEnd() == 0); + QVERIFY(textEditObject->selectedText().isNull()); + //Test selection for(int i=0; i<= testStr.size(); i++) { textEditObject->select(0,i); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 76e0102..7b2310a 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -354,6 +354,19 @@ void tst_qdeclarativetextinput::selection() QVERIFY(textinputObject->selectionEnd() == 0); QVERIFY(textinputObject->selectedText().isNull()); + // Verify invalid positions are ignored. + textinputObject->setCursorPosition(-1); + QVERIFY(textinputObject->cursorPosition() == 0); + QVERIFY(textinputObject->selectionStart() == 0); + QVERIFY(textinputObject->selectionEnd() == 0); + QVERIFY(textinputObject->selectedText().isNull()); + + textinputObject->setCursorPosition(textinputObject->text().count()+1); + QVERIFY(textinputObject->cursorPosition() == 0); + QVERIFY(textinputObject->selectionStart() == 0); + QVERIFY(textinputObject->selectionEnd() == 0); + QVERIFY(textinputObject->selectedText().isNull()); + //Test selection for(int i=0; i<= testStr.size(); i++) { textinputObject->select(0,i); -- cgit v0.12 From 6b37f71b318445a338c4afe5ba8a5ccaff573518 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 20 Dec 2010 17:04:41 +1000 Subject: Update Minehunt demo warning message The message was talking about a C++ plugin when the demo is nowadays in a form of a standalone executable. Task-number: Reviewed-by: Bea Lam --- demos/declarative/minehunt/minehunt.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/demos/declarative/minehunt/minehunt.qml b/demos/declarative/minehunt/minehunt.qml index eb67b06..88ecd6d 100644 --- a/demos/declarative/minehunt/minehunt.qml +++ b/demos/declarative/minehunt/minehunt.qml @@ -104,7 +104,7 @@ Item { anchors.centerIn: parent; width: parent.width - 20 horizontalAlignment: Text.AlignHCenter wrapMode: Text.WordWrap - text: "Minehunt will not run properly if the C++ plugin is not compiled.\n\nPlease see README." + text: "Minehunt demo has to be compiled to run.\n\nPlease see README." color: "white"; font.bold: true; font.pixelSize: 14 visible: tiles == undefined } -- cgit v0.12 From de72670c620e1193fa875bf1a4adee553700bacb Mon Sep 17 00:00:00 2001 From: Ville Pernu Date: Mon, 20 Dec 2010 09:57:24 +0200 Subject: QNAM HTTP: Fix missing error() signal During download, if a QAbstractSocket::RemoteHostClosedError occurs, the error handling is deferred to _q_disconnected() slot. However, the error message is not saved for the function, and thus the _q_disconnected only emits a finished-signal. We now store an unhandled error into a private member. It is handled and reset by the _q_disconnected (or more specifically, allDone-function). Also, an additional check is made that there are no simultaneous HTTP errors. If a HTTP error exists, any socket errors are suppressed. Task-Number: QT-3494 Reviewed-By: Markus Goetz --- src/network/access/qhttpnetworkconnectionchannel.cpp | 20 +++++++++++++++++++- src/network/access/qhttpnetworkconnectionchannel_p.h | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index c8caad4..c4471eb 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -66,6 +66,7 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel() , bytesTotal(0) , resendCurrent(false) , lastStatus(0) + , unhandledError(QNetworkReply::NoError) , pendingEncrypt(false) , reconnectAttempts(2) , authMethod(QAuthenticatorPrivate::None) @@ -642,7 +643,23 @@ void QHttpNetworkConnectionChannel::allDone() // slot connected to it. The socket will not fire readyRead signal, if we are already // in the slot connected to readyRead if (emitFinished) - QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection); + { + // Check whether _q_error was invoked previously and if it left a socket + // error unhandled AND that there are no http errors. + // In case there are both socket errors and http errors, the socket error is suppressed. + // Http errors are handled in the QNetworkAccessHttpBackend. + if(unhandledError != QNetworkReply::NoError && reply->statusCode() == 200) { + QString errorString = connection->d_func()->errorDetail(unhandledError, socket, socket->errorString()); + qRegisterMetaType("QNetworkReply::NetworkError"); + QMetaObject::invokeMethod(reply, "finishedWithError", + Qt::QueuedConnection, + Q_ARG(QNetworkReply::NetworkError, unhandledError), + Q_ARG(QString, errorString)); + } else { + QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection); + } + unhandledError = QNetworkReply::NoError; // Reset the value + } // reset the reconnection attempts after we receive a complete reply. // in case of failures, each channel will attempt two reconnects before emitting error. reconnectAttempts = 2; @@ -964,6 +981,7 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket errorCode = QNetworkReply::RemoteHostClosedError; } } else { + unhandledError = QNetworkReply::RemoteHostClosedError; return; } break; diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index fd18042..e1d42fb 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -105,6 +105,7 @@ public: qint64 bytesTotal; bool resendCurrent; int lastStatus; // last status received on this channel + QNetworkReply::NetworkError unhandledError; // Stored code of an unhandled error. bool pendingEncrypt; // for https (send after encrypted) int reconnectAttempts; // maximum 2 reconnection attempts QAuthenticatorPrivate::Method authMethod; -- cgit v0.12 From d491aee7887331e6b1207e647f4d2ee3f43efacd Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 20 Dec 2010 10:41:18 +0100 Subject: Added BSD license to snippet code. --- doc/src/snippets/declarative/focus/focusColumn.qml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml index eb59309..9b761dd 100644 --- a/doc/src/snippets/declarative/focus/focusColumn.qml +++ b/doc/src/snippets/declarative/focus/focusColumn.qml @@ -1,3 +1,42 @@ +/**************************************************************************** +** +** 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 FOO module of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 1.0 Rectangle { -- cgit v0.12 From d9dbdb1afde441c8ab87f42b4a5e0e29ad54480c Mon Sep 17 00:00:00 2001 From: Denis Dzyubenko Date: Mon, 20 Dec 2010 14:05:53 +0100 Subject: Fixed QStatusBar not to repaint itself too early When the toplevel containing a statusbar is initially shown, QStatusBar will repaint itself way too early - repaint() is called from the LayoutRequest event causing a whole window repaint before the window was resized to the proper size. This caused Qt Creator to paint itself in small size in a maximized window on its startup. Task-number: QTBUG-14547 Reviewed-by: Olivier Goffart --- src/gui/widgets/qstatusbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qstatusbar.cpp b/src/gui/widgets/qstatusbar.cpp index c88d2a1..c60913e 100644 --- a/src/gui/widgets/qstatusbar.cpp +++ b/src/gui/widgets/qstatusbar.cpp @@ -575,7 +575,7 @@ void QStatusBar::reformat() d->savedStrut = maxH; vbox->addSpacing(2); d->box->activate(); - repaint(); + update(); } /*! -- cgit v0.12 From 382b359f2c014d8ce353845579508a8c54410c7f Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 20 Dec 2010 16:08:57 +0100 Subject: Fixed handling of indented snippet markers. Refactored the code to remove namespace macros and snippet markers. --- tools/qdoc3/quoter.cpp | 56 +++++++++++++++++++++++--------------------------- tools/qdoc3/quoter.h | 1 + 2 files changed, 27 insertions(+), 30 deletions(-) diff --git a/tools/qdoc3/quoter.cpp b/tools/qdoc3/quoter.cpp index 84c6fb1..8e08e9a 100644 --- a/tools/qdoc3/quoter.cpp +++ b/tools/qdoc3/quoter.cpp @@ -248,21 +248,8 @@ QString Quoter::quoteSnippet(const Location &docLocation, const QString &identif } return t; } - // Remove special macros to support Qt namespacing. - if (line.startsWith("QT_BEGIN_NAMESPACE")) { - getLine(); - } else if (line.startsWith("QT_END_NAMESPACE")) { - getLine(); - t += QLatin1Char('\n'); - } else if (!line.startsWith(comment)) { - // Ordinary code - t += getLine(); - } else { - // Normal comments - if (line.contains(QLatin1Char('\n'))) - t += QLatin1Char('\n'); - getLine(); - } + + t += removeSpecialLines(line, comment); } failedAtEnd(docLocation, QString("snippet (%1)").arg(delimiter)); return t; @@ -277,21 +264,7 @@ QString Quoter::quoteTo( const Location& docLocation, const QString& command, if ( pattern.isEmpty() ) { while ( !plainLines.isEmpty() ) { QString line = plainLines.first(); - // Remove special macros to support Qt namespacing. - if (line.startsWith("QT_BEGIN_NAMESPACE")) { - getLine(); - } else if (line.startsWith("QT_END_NAMESPACE")) { - getLine(); - t += QLatin1Char('\n'); - } else if (!line.startsWith(comment)) - // Ordinary code - t += getLine(); - else { - // Normal comments - if (line.contains(QLatin1Char('\n'))) - t += QLatin1Char('\n'); - getLine(); - } + t += removeSpecialLines(line, comment); } } else { while ( !plainLines.isEmpty() ) { @@ -369,4 +342,27 @@ QString Quoter::commentForCode() const return commentHash.value(suffix, "//!"); } +QString Quoter::removeSpecialLines(const QString &line, const QString &comment) +{ + QString t; + + // Remove special macros to support Qt namespacing. + QString trimmed = line.trimmed(); + if (trimmed.startsWith("QT_BEGIN_NAMESPACE")) { + getLine(); + } else if (trimmed.startsWith("QT_END_NAMESPACE")) { + getLine(); + t += QLatin1Char('\n'); + } else if (!trimmed.startsWith(comment)) { + // Ordinary code + t += getLine(); + } else { + // Comments + if (line.contains(QLatin1Char('\n'))) + t += QLatin1Char('\n'); + getLine(); + } + return t; +} + QT_END_NAMESPACE diff --git a/tools/qdoc3/quoter.h b/tools/qdoc3/quoter.h index d984194..e1728d1 100644 --- a/tools/qdoc3/quoter.h +++ b/tools/qdoc3/quoter.h @@ -75,6 +75,7 @@ private: bool match( const Location& docLocation, const QString& pattern, const QString& line ); QString commentForCode() const; + QString removeSpecialLines(const QString &line, const QString &comment); bool silent; bool validRegExp; -- cgit v0.12 From 401e43aa33a3c1a914f4280190a9d514a6fe0918 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 20 Dec 2010 16:15:25 +0100 Subject: Adding two QML Best Practice guides. Task-number: QTBUG-15757 --- .../qmlbestpractices/qmlbestpractices-coding.qdoc | 94 ++++++++++++++++++++++ .../qmlbestpractices-datatypes.qdoc | 49 +++++++++++ 2 files changed, 143 insertions(+) create mode 100644 doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc create mode 100644 doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc new file mode 100644 index 0000000..6c83c80 --- /dev/null +++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-coding.qdoc @@ -0,0 +1,94 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! + \page qml-best-practices-coding.html + \ingroup qml-best-practices + \contentspage QML Best Practices Guides + \previouspage QML Best Practices Guides + \startpage QML Best Practices Guides + \title QML Best Practices: Coding Conventions + + \brief QML Coding Conventions and Importing Files + + There are many different ways to code using QML. These are a set of + guidelines to help your code look better and consistent. + + \section1 Coding Conventions + + The official QML Coding Conventions may be found at + \l {QML Coding Conventions}. This is the recommended convention that will be + used throughout the QML documentation. + + In addition, Qt's official code style may be found at the \l {Qt Coding Style}. + + \section1 Importing Files into QML + + To import items such as directories, use the "import" keyword, similar to + the way the \c {import QtQuick 1.0} statement is used. + + \qml + import QtQuick 1.0 + import QtWebKit 1.0 + import "subdirectory" + import "script.js" + \endqml + + To facilitate the importation of QML components, it is best to begin the QML + file with an uppercase character. This way, the user can simply declare the + component using the file name as the component name. For example, if a QML + component is in a file named \c Button.qml, then the user may import the + component by declaring a \c {Button {}}. Note that this method only works if + the QML files are in the same directory. + + \qml + import QtQuick 1.0 + + Rectangle { + width: 50; height: 50 + + Button {} //Button is defined in Button.qml in the same directory + } + \endqml + + It is also possible to import QML files which have file names that begin in + lower case or files in a different directory by using a \c qmldir file. + + A \c qmldir file tells your QML application which QML components, plugins, + or directories to import. The \c qmldir file must reside in an imported + directory. + + \code + //A very simple qmldir file + + Button ./custom.qml //a QML component called Button in the file custom.qml + plugin FilePlugin ./plugins //a plugin called FileDialog in the plugins directory + \endcode + + By using the \c qmldir file, users may import any QML file and assign any + valid QML component name to the component. +*/ diff --git a/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc new file mode 100644 index 0000000..0f6d74b --- /dev/null +++ b/doc/src/howtos/qmlbestpractices/qmlbestpractices-datatypes.qdoc @@ -0,0 +1,49 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ +/*! + \page qml-best-practices-datatypes.html + \ingroup qml-best-practices + \contentspage QML Best Practices Guides + \previouspage QML Best Practices Guides + \startpage QML Best Practices Guides + \title QML Best Practices: Data Types + + \brief Using Basic Data Types and Custom Types in QML + + QML supports many basic data types, Qt data types, and custom data types. + + \section1 Basic Data Types + + \section1 Qt Data Types + + \section1 Exporting Qt Types to QML + + Programmers may create C++ data structures and expose them to QML, making + data accessible from QML. + + \section2 Using QStringLists in QML +*/ -- cgit v0.12 From 215748d3be876ffec5d72f2d1dfcce56bb7a5937 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 20 Dec 2010 17:38:05 +0200 Subject: Fix using QFileDialog statics in Symbian. Trying to access files outside C:/data with QFileDialog static functions either paniced or simply threw an exception depending on what you were trying to do exactly. To fix this, QFileDialog static functions now will default to QDir::rootPath() if the path specified by user is invalid. Task-number: QTBUG-16204 Reviewed-by: Janne Koskinen --- src/gui/dialogs/qfiledialog_symbian.cpp | 69 ++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 28 deletions(-) diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index 1f70305..d82ce2b 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -119,36 +119,49 @@ static QString launchSymbianDialog(const QString dialogCaption, const QString st { QString selection; #if defined(Q_WS_S60) && defined(SYMBIAN_VERSION_SYMBIAN3) - QT_TRAP_THROWING( - TFileName startFolder; - if (!startDirectory.isEmpty()) { - QString dir = QDir::toNativeSeparators(startDirectory); + TFileName startFolder; + if (!startDirectory.isEmpty()) { + QString dir = QDir::toNativeSeparators(QFileDialogPrivate::workingDirectory(startDirectory)); + startFolder = qt_QString2TPtrC(dir); + } + TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal| + AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage| + AknCommonDialogsDynMem::EMemoryTypePhone; + + TPtrC titlePtr(qt_QString2TPtrC(dialogCaption)); + TFileName target; + bool select = false; + int tryCount = 2; + while (tryCount--) { + TInt err(KErrNone); + TRAP(err, + if (dialogMode == DialogOpen) { + CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter; + CleanupStack::PushL(extensionFilter); + extensionFilter->setFilter(filter); + select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target, + startFolder, NULL, NULL, titlePtr, extensionFilter); + CleanupStack::Pop(extensionFilter); + } else if (dialogMode == DialogSave) { + select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target, + startFolder, NULL, NULL, titlePtr); + } else if (dialogMode == DialogFolder) { + select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder, + 0, 0, titlePtr, NULL, NULL); + } + ); + + if (err == KErrNone) { + tryCount = 0; + } else { + // Symbian native file dialog doesn't allow accessing files outside C:/Data + // It will always leave in that case, so default into QDir::rootPath() in error cases. + QString dir = QDir::toNativeSeparators(QDir::rootPath()); startFolder = qt_QString2TPtrC(dir); } - TInt types = AknCommonDialogsDynMem::EMemoryTypeMMCExternal| - AknCommonDialogsDynMem::EMemoryTypeInternalMassStorage| - AknCommonDialogsDynMem::EMemoryTypePhone; - - TPtrC titlePtr(qt_QString2TPtrC(dialogCaption)); - TFileName target; - bool select = false; - if (dialogMode == DialogOpen) { - CExtensionFilter* extensionFilter = new (ELeave) CExtensionFilter; - CleanupStack::PushL(extensionFilter); - extensionFilter->setFilter(filter); - select = AknCommonDialogsDynMem::RunSelectDlgLD(types, target, - startFolder, NULL, NULL, titlePtr, extensionFilter); - CleanupStack::Pop(extensionFilter); - } else if (dialogMode == DialogSave) { - select = AknCommonDialogsDynMem::RunSaveDlgLD(types, target, - startFolder, NULL, NULL, titlePtr); - } else if (dialogMode == DialogFolder) { - select = AknCommonDialogsDynMem::RunFolderSelectDlgLD(types, target, startFolder, - 0, 0, titlePtr, NULL, NULL); - } - if (select) - selection.append(qt_TDesC2QString(target)); - ); + } + if (select) + selection.append(qt_TDesC2QString(target)); #endif return selection; } -- cgit v0.12 From e8d42e5861bdfd6acec3bf1ccc8d55b09b1cc573 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 20 Dec 2010 17:53:57 +0200 Subject: Remove few compile warnings Reviewed-by: Janne Koskinen --- src/gui/dialogs/qfiledialog_symbian.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/dialogs/qfiledialog_symbian.cpp b/src/gui/dialogs/qfiledialog_symbian.cpp index d82ce2b..1fc5f5e 100644 --- a/src/gui/dialogs/qfiledialog_symbian.cpp +++ b/src/gui/dialogs/qfiledialog_symbian.cpp @@ -64,7 +64,7 @@ public: filterList.clear(); if (filter.left(2) == QLatin1String("*.")) { //Filter has only extensions - filterList << filter.split(" "); + filterList << filter.split(QLatin1String(" ")); return; } else { //Extensions are in parenthesis and there may be several filters @@ -75,7 +75,7 @@ public: return; } } - QRegExp rx("\\(([^\\)]*)\\)"); + QRegExp rx(QLatin1String("\\(([^\\)]*)\\)")); int pos = 0; while ((pos = rx.indexIn(filter, pos)) != -1) { filterList << rx.cap(1).split(QLatin1String(" ")); -- cgit v0.12 From 7747e8864db4518e35d5a472cec37697b85b3b15 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 20 Dec 2010 16:02:33 +0000 Subject: runonphone: Check that the device->config is valid before dereferencing it In some occasions (encountered on OS X), this can be null for some devices. Merge-request: 834 Reviewed-by: Shane Kearns --- tools/runonphone/serenum_unix.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp index db6375e..f65497e 100644 --- a/tools/runonphone/serenum_unix.cpp +++ b/tools/runonphone/serenum_unix.cpp @@ -82,7 +82,7 @@ QList enumerateSerialPorts(int loglevel) for (struct usb_bus *bus = usb_get_busses(); bus; bus = bus->next) { for (struct usb_device *device = bus->devices; device; device = device->next) { - for (int n = 0; n < device->descriptor.bNumConfigurations; ++n) { + for (int n = 0; n < device->descriptor.bNumConfigurations && device->config; ++n) { struct usb_config_descriptor &usbConfig =device->config[n]; QList usableInterfaces; for (int m = 0; m < usbConfig.bNumInterfaces; ++m) { -- cgit v0.12 From 11ea9609129205cd08dc5fbeb889cc60f4f84f65 Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 20 Dec 2010 16:02:37 +0000 Subject: reword: Make the USB serial device enumeration work on OS X, too Tested on OS X Snow Leopard with libusb-0.1.12. The devices are named /dev/cu.usbmodem, where the opaque id doesn't seem to be available via the current libusb interface, but finding it would require usage of native OS X APIs. The interface number is available at least, and searching for cu\.usbmodem.* as a regexp finds the right devices as long as not too many devices are connected. Merge-request: 834 Reviewed-by: Shane Kearns --- tools/runonphone/serenum_unix.cpp | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp index f65497e..93d8c67 100644 --- a/tools/runonphone/serenum_unix.cpp +++ b/tools/runonphone/serenum_unix.cpp @@ -158,6 +158,10 @@ QList enumerateSerialPorts(int loglevel) << "device" << device->filename << "interface" << descriptor.bInterfaceNumber; } +#ifdef Q_OS_MAC + eligibleInterfaces << QString("^cu\\.usbmodem.*%1$") + .arg(QString("%1").arg(descriptor.bInterfaceNumber, 1, 16).toUpper()); +#else // ### manufacturer and product strings are only readable as root :( if (!manufacturerString.isEmpty() && !productString.isEmpty()) { eligibleInterfaces << QString("usb-%1_%2-if%3") @@ -167,6 +171,7 @@ QList enumerateSerialPorts(int loglevel) } else { eligibleInterfaces << QString("if%1").arg(i, 2, 16, QChar('0')); // fix! } +#endif eligibleInterfacesInfo << InterfaceInfo(manufacturerString, productString, device->descriptor.idVendor, device->descriptor.idProduct); } } @@ -179,14 +184,24 @@ QList enumerateSerialPorts(int loglevel) if (loglevel > 1) qDebug() << " searching for interfaces:" << eligibleInterfaces; +#ifdef Q_OS_MAC + QDir dir("/dev/"); + bool allowAny = false; +#else QDir dir("/dev/serial/by-id/"); - foreach (const QFileInfo &info, dir.entryInfoList()) { + bool allowAny = eligibleInterfaces.isEmpty(); +#endif + foreach (const QFileInfo &info, dir.entryInfoList(QDir::System)) { if (!info.isDir()) { - bool usable = eligibleInterfaces.isEmpty(); + bool usable = allowAny; + QString friendlyName = info.fileName(); foreach (const QString &iface, eligibleInterfaces) { - if (info.fileName().contains(iface)) { + if (info.fileName().contains(QRegExp(iface))) { if (loglevel > 1) qDebug() << " found device file:" << info.fileName() << endl; +#ifdef Q_OS_MAC + friendlyName = eligibleInterfacesInfo[eligibleInterfaces.indexOf(iface)].product; +#endif usable = true; break; } @@ -195,7 +210,7 @@ QList enumerateSerialPorts(int loglevel) continue; SerialPortId id; - id.friendlyName = info.fileName(); + id.friendlyName = friendlyName; id.portName = info.canonicalFilePath(); list << id; } -- cgit v0.12 From d6a7931c5a2b90c0c276a1367135c9dc4e7532cd Mon Sep 17 00:00:00 2001 From: Martin Storsjo Date: Mon, 20 Dec 2010 16:02:42 +0000 Subject: runonphone: Only print the modprobe instructions on linux Merge-request: 834 Reviewed-by: Shane Kearns --- tools/runonphone/serenum_unix.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/runonphone/serenum_unix.cpp b/tools/runonphone/serenum_unix.cpp index 93d8c67..86e797b 100644 --- a/tools/runonphone/serenum_unix.cpp +++ b/tools/runonphone/serenum_unix.cpp @@ -223,11 +223,15 @@ QList enumerateSerialPorts(int loglevel) << iface.manufacturer << "Product:" << iface.product +#ifdef Q_OS_LINUX << endl << " Load generic driver using:" << QString("sudo modprobe usbserial vendor=0x%1 product=0x%2") .arg(iface.manufacturerid, 4, 16, QChar('0')) .arg(iface.productid, 4, 16, QChar('0')); +#else + ; +#endif } } return list; -- cgit v0.12 From 9b0ad342cc888bd4291c84f63fe485bfbfdc3ce0 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 20 Dec 2010 17:29:06 +0100 Subject: Re-organized the Qt Quick page. Changed titles and links. Task-number: QTBUG-16071 --- doc/src/declarative/anchor-layout.qdoc | 4 +- doc/src/declarative/animation.qdoc | 4 +- doc/src/declarative/basicelements.qdoc | 37 ++ doc/src/declarative/basictypes.qdoc | 4 +- doc/src/declarative/declarativeui.qdoc | 40 +- doc/src/declarative/dynamicobjects.qdoc | 4 +- doc/src/declarative/extending-tutorial.qdoc | 48 +- doc/src/declarative/extending.qdoc | 472 +------------------ doc/src/declarative/focus.qdoc | 5 +- doc/src/declarative/graphicaleffects.qdoc | 36 ++ doc/src/declarative/integrating.qdoc | 8 +- doc/src/declarative/mouseevents.qdoc | 52 +++ doc/src/declarative/network.qdoc | 3 + doc/src/declarative/propertybinding.qdoc | 177 +++++++- doc/src/declarative/qdeclarativei18n.qdoc | 3 + doc/src/declarative/qdeclarativemodels.qdoc | 88 +--- doc/src/declarative/qdeclarativestates.qdoc | 2 + doc/src/declarative/qmlevents.qdoc | 37 ++ doc/src/declarative/qmlreusablecomponents.qdoc | 497 +++++++++++++++++++++ doc/src/declarative/qmlruntime.qdoc | 42 +- doc/src/declarative/qmlsyntax.qdoc | 7 +- doc/src/declarative/qmltexthandling.qdoc | 55 +++ doc/src/declarative/qmlviewer.qdoc | 60 +-- doc/src/declarative/qmlviews.qdoc | 111 +++++ doc/src/declarative/qmlwebkit.qdoc | 47 ++ doc/src/declarative/qtbinding.qdoc | 17 +- doc/src/declarative/qtprogrammers.qdoc | 3 +- doc/src/examples/qml-examples.qdoc | 28 +- doc/src/getting-started/gettingstartedqml.qdoc | 2 +- doc/src/overviews.qdoc | 29 +- doc/src/qt-webpages.qdoc | 16 + .../ui-components/tabwidget/TabWidget.qml | 2 +- .../graphicsitems/qdeclarativeflipable.cpp | 14 +- src/declarative/qml/qdeclarativecomponent.cpp | 52 +-- src/declarative/qml/qdeclarativecontext.cpp | 46 +- src/declarative/util/qdeclarativeanimation.cpp | 170 +++---- src/declarative/util/qdeclarativebehavior.cpp | 6 +- .../util/qdeclarativesmoothedanimation.cpp | 12 +- .../util/qdeclarativespringanimation.cpp | 20 +- src/declarative/util/qdeclarativetransition.cpp | 24 +- src/declarative/util/qdeclarativeview.cpp | 12 +- 41 files changed, 1428 insertions(+), 868 deletions(-) create mode 100644 doc/src/declarative/basicelements.qdoc create mode 100644 doc/src/declarative/graphicaleffects.qdoc create mode 100644 doc/src/declarative/mouseevents.qdoc create mode 100644 doc/src/declarative/qmlevents.qdoc create mode 100644 doc/src/declarative/qmlreusablecomponents.qdoc create mode 100644 doc/src/declarative/qmltexthandling.qdoc create mode 100644 doc/src/declarative/qmlviews.qdoc create mode 100644 doc/src/declarative/qmlwebkit.qdoc diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 4953b22..11acbad 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -29,8 +29,8 @@ \page qml-anchor-layout.html \target anchor-layout \contentspage QML Features -\previouspage Using QML Positioner and Repeater Items -\nextpage Using QML Positioner and Repeater Items +\previouspage {Using QML Positioner and Repeater Items}{Component Layouts} +\nextpage {QML Mouse Events}{Mouse Events} \title Anchor-based Layout in QML \section1 Overview diff --git a/doc/src/declarative/animation.qdoc b/doc/src/declarative/animation.qdoc index 708f412..099f02d 100644 --- a/doc/src/declarative/animation.qdoc +++ b/doc/src/declarative/animation.qdoc @@ -29,7 +29,9 @@ \page qdeclarativeanimation.html \ingroup qml-features \contentspage QML Features -\title QML Animation +\previouspage {QML States}{States} +\nextpage {QML Data Models}{Structuring Data with Models} +\title QML Animation and Transitions In QML, animations are created by applying animation objects to object property diff --git a/doc/src/declarative/basicelements.qdoc b/doc/src/declarative/basicelements.qdoc new file mode 100644 index 0000000..d0c16b6 --- /dev/null +++ b/doc/src/declarative/basicelements.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! + \page qmlbasicelements.html + \ingroup qml-features + \contentspage QML Features + \previouspage {QML Basic Types}{Data Types} + \nextpage {Using QML Positioner and Repeater Items}{Component Layouts} + + \title QML Basic Elements + +*/ diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 0277ccb..59772c5 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -29,13 +29,15 @@ \page qdeclarativebasictypes.html \ingroup qml-features \contentspage QML Features + \previouspage {Property Binding} + \nextpage {QML Basic Elements}{Basic Elements} \title QML Basic Types QML has a set of primitive types, as listed below, that are used throughout the \l {QML Elements}. Some of these types can also be used for defining - \c property values in QML. See \l{Writing QML Components: Properties, Methods and Signals} for the + \c property values in QML. See \l{Importing Reusable Components} for the list of types that can be used for \c property values. \annotatedlist qmlbasictypes diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 771a421..473cbdd 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -77,42 +77,41 @@ QML and the Qt Declarative Module separate the frontend UI logic from the backen \list \o \l{QML Syntax} \o \l{Property Binding} +\o \l{QML Basic Types}{Data Types} +\o \l{QML Basic Elements}{Basic Elements} \o \l{Using QML Positioner and Repeater Items}{Component Layouts} -\o \l{Anchor-based Layout in QML}{Anchor Layout} -\o \l{Writing QML Components: Properties, Methods and Signals}{Reusable Components} -\o \l{Text Handling} -\o \l{Keyboard Focus in QML}{Keyboard Focus} +\o \l{Anchor-based Layout in QML}{Layouts using Anchors} \o \l{Mouse Events} -\o \l{QML States} {States} -\o \l{QML Animation}{Animation and Transitions} -\o \l{QML Basic Types}{QML Basic Data Types} +\o \l{QML Text Handling and Validators}{Text Handling and Validators} +\o \l{Keyboard Focus in QML}{Keyboard Focus} +\o \l{Importing Reusable Components} +\o \l{QML States}{States} +\o \l{QML Animation and Transitions}{Animation and Transitions} \o \l{QML Data Models}{Structuring Data with Models} -\o \l{Presenting Data with QML}{Presenting Data with Views} -\o \l{Affine Transformations} +\o \l{Presenting Data with Views} +\o \l{Extending QML Functionalities using C++} +\o \l{Using QML Bindings in C++ Applications} +\o \l{Integrating QML Code with Existing Qt UI Code} +\o \l{QML Signal and Handler Event System}{Signal and Handler Event System} \o \l{Dynamic Object Management in QML}{Dynamic Object Management} -\o \l{Network Transparency}{Resource Loading} -\o \l{Extending QML in C++}{Extending QML Functionalities using C++} -\o \l{Using QML in C++ Applications} -\o \l{Integrating QML with existing Qt UI code}{Integrating QML Code with Existing Qt UI Code} -\o \l{Signals and Slots Event System} +\o \l{Network Transparency}{Loading Resources in QML} \o \l{QML Internationalization}{Internationalization} -\o \l{Graphical Effects} +\o \l{QML Graphical Effects}{Graphical Effects} \endlist \section1 QML Add-Ons \list -\o \l{Qt WebKit} -\o \l{Mobility QML bindings} +\o \l{QtWebKit QML Module} +\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins} \endlist \section1 Qt Quick Tools \list \o \l{Debugging QML} +\o \l{Developing Qt Quick Applications with Creator}{Developing with Qt Creator} \o \l{QML Viewer} -\o \l{QML Performance} -\o \l{Developing Qt Quick Applications}{Developing with Qt Creator} \endlist \section1 Reference @@ -160,6 +159,9 @@ examples for porting} \list \o \l{QML Best Practices: Data Types}{Using Data Types in QML} \o \l{QML Best Practices: Coding Conventions}{Coding Tips} +\o \l{QML Performance}{Performance Tips} +\omit \o \l{Geir's screen size document} +\endomit \endlist */ diff --git a/doc/src/declarative/dynamicobjects.qdoc b/doc/src/declarative/dynamicobjects.qdoc index 1e43166..e5077ba 100644 --- a/doc/src/declarative/dynamicobjects.qdoc +++ b/doc/src/declarative/dynamicobjects.qdoc @@ -29,13 +29,15 @@ \page qdeclarativedynamicobjects.html \ingroup qml-features \contentspage {QML Features} +\previouspage {QML Signal and Handler Event System}{Signal and Handler Event System} +\nextpage {Network Transparency}{Loading Resources in QML} \title Dynamic Object Management in QML QML provides a number of ways to dynamically create and manage QML objects. The \l{Loader}, \l{Repeater}, \l{ListView}, \l{GridView} and \l{PathView} elements all support dynamic object management. Objects can also be created and managed from C++, and this is the preferred method for hybrid QML/C++ applications -(see \l{Using QML in C++ Applications}). +(see \l{Using QML Bindings in C++ Applications}). QML also supports the dynamic creation of objects from within JavaScript code. This is useful if the existing QML elements do not fit the needs of your diff --git a/doc/src/declarative/extending-tutorial.qdoc b/doc/src/declarative/extending-tutorial.qdoc index c998c5c..25be0f9 100644 --- a/doc/src/declarative/extending-tutorial.qdoc +++ b/doc/src/declarative/extending-tutorial.qdoc @@ -33,7 +33,7 @@ The Qt Declarative module provides a set of APIs for extending QML through C++ extensions. You can write extensions to add your own QML types, extend existing Qt types, or call C/C++ functions that are not accessible from ordinary QML code. -This tutorial shows how to write a QML extension using C++ that includes +This tutorial shows how to write a QML extension using C++ that includes core QML features, including properties, signals and bindings. It also shows how extensions can be deployed through plugins. @@ -67,18 +67,18 @@ like network programming that are not accessible through built-in QML features. In this tutorial, we will show how to use the C++ classes in the Qt Declarative module to extend QML. The end result will be a simple Pie Chart display implemented by -several custom QML types connected together through QML features like bindings and +several custom QML types connected together through QML features like bindings and signals, and made available to the QML runtime through a plugin. To begin with, let's create a new QML type called "PieChart" that has two properties: a name and a color. We will make it available in a \l {Modules}{module} called "Charts", with -a module version of 1.0. +a module version of 1.0. We want this \c PieChart type to be usable from QML like this: \code import Charts 1.0 - + PieChart { width: 100; height: 100 name: "A simple pie chart" @@ -99,16 +99,16 @@ Here is our \c PieChart class, defined in \c piechart.h: \snippet declarative/tutorials/extending/chapter1-basics/piechart.h 0 -The class inherits from QDeclarativeItem because we want to override +The class inherits from QDeclarativeItem because we want to override QDeclarativeItem::paint() in order to draw. If the class just represented some data type and was not an item that actually needed to be displayed, it could simply inherit -from QObject. Or, if we want to extend the functionality of an existing QObject-based +from QObject. Or, if we want to extend the functionality of an existing QObject-based class, it could inherit from that class instead. The \c PieChart class defines the two properties, \c name and \c color, with the Q_PROPERTY macro, -and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp -simply sets and returns the \c m_name and \c m_color values as appropriate, and -implements \c paint() to draw a simple pie chart. It also turns off the +and overrides QDeclarativeItem::paint(). The class implementation in \c piechart.cpp +simply sets and returns the \c m_name and \c m_color values as appropriate, and +implements \c paint() to draw a simple pie chart. It also turns off the QGraphicsItem::ItemHasNoContents flag to enable painting: \snippet declarative/tutorials/extending/chapter1-basics/piechart.cpp 0 @@ -150,19 +150,19 @@ Try it yourself with the code in Qt's \c examples/tutorials/extending/chapter1-b At the moment, the \c app.qml is run from within a C++ application. This may seem odd if you're used to running QML files with the \l {QML Viewer}. -Later on, we'll show how to create a plugin so that you can run \c app.qml using the +Later on, we'll show how to create a plugin so that you can run \c app.qml using the \l {QML Viewer} instead. */ /*! -\title Chapter 2: Connecting to C++ Methods and Signals +\title Chapter 2: Connecting to C++ Methods and Signals \example declarative/tutorials/extending/chapter2-methods Suppose we want \c PieChart to have a "clearChart()" method that erases the -chart and then emits a "chartCleared" signal. Our \c app.qml would be able +chart and then emits a "chartCleared" signal. Our \c app.qml would be able to call \c clearChart() and receive \c chartCleared() signals like this: \snippet declarative/tutorials/extending/chapter2-methods/app.qml 0 @@ -210,7 +210,7 @@ Property bindings is a powerful feature of QML that allows values of different elements to be synchronized automatically. It uses signals to notify and update other elements' values when property values are changed. -Let's enable property bindings for the \c color property. That means +Let's enable property bindings for the \c color property. That means if we have code like this: \snippet declarative/tutorials/extending/chapter3-bindings/app.qml 0 @@ -224,7 +224,7 @@ updates to the same value. When the window is clicked, the \c onClicked handler in the MouseArea changes the color of \c chartA, thereby changing both charts to the color blue. -It's easy to enable property binding for the \c color property. +It's easy to enable property binding for the \c color property. We add a \l{Qt's Property System}{NOTIFY} feature to its Q_PROPERTY() declaration to indicate that a "colorChanged" signal is emitted whenever the value changes. @@ -244,7 +244,7 @@ It's important for \c setColor() to check that the color value has actually chan before emitting \c colorChanged(). This ensures the signal is not emitted unnecessarily and also prevents loops when other elements respond to the value change. -The use of bindings is essential to QML. You should always add NOTIFY +The use of bindings is essential to QML. You should always add NOTIFY signals for properties if they are able to be implemented, so that your properties can be used in bindings. Properties that cannot be bound cannot be automatically updated and cannot be used as flexibly in QML. Also, since @@ -299,7 +299,7 @@ listed in the \l{Adding Properties} documentation, which includes the following: If we want to create a property whose type is not supported by QML by default, we need to register the type with QML. -For example, let's replace the use of the \c property with a type called +For example, let's replace the use of the \c property with a type called "PieSlice" that has a \c color property. Instead of assigning a color, we assign an \c PieSlice value which itself contains a \c color: @@ -358,10 +358,10 @@ have a \c slices property that accepts a list of \c PieSlice items: \image extending-tutorial-chapter5.png To do this, we replace the \c pieSlice property in \c PieChart with a \c slices property, -declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the +declared as a QDeclarativeListProperty type. The QDeclarativeListProperty class enables the creation of list properties in QML extensions. We replace the \c pieSlice() -function with a \c slices() function that returns a list of slices, and add -an internal \c append_slice() function (discussed below). We also use a QList to +function with a \c slices() function that returns a list of slices, and add +an internal \c append_slice() function (discussed below). We also use a QList to store the internal list of slices as \c m_slices: \snippet declarative/tutorials/extending/chapter5-listproperties/piechart.h 0 @@ -409,7 +409,7 @@ To create a plugin library, we need: \list \o A plugin class that registers our QML types -\o A project file that describes the plugin +\o A project file that describes the plugin \o A \l{Writing a qmldir file}{qmldir} file that tells the QML engine to load the plugin \endlist @@ -468,8 +468,9 @@ In this tutorial, we've shown the basic steps for creating a QML extension: \endlist -The \l {Extending QML in C++} reference documentation shows other useful features that can be added to -QML extensions. For example, we could use \l{Default Property}{default properties} to allow +The \l {Extending QML Functionalities using C++} reference documentation shows +other useful features that can be added to QML extensions. For example, we +could use \l{Default Property}{default properties} to allow slices to be added without using the \c slices property: \code @@ -489,7 +490,8 @@ Or randomly add and remove slices from time to time using \l{Property Value Sour \endcode -See the \l{Extending QML in C++}{reference documentation} for more information. +See the \l{Extending QML Functionalities using C++} reference documentation +for more information. */ diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 51b52b0..d3f1521 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -29,7 +29,9 @@ \page qml-extending.html \ingroup qml-features \contentspage QML Features -\title Extending QML in C++ +\previouspage {Presenting Data with Views} +\nextpage {Using QML Bindings in C++ Applications} +\title Extending QML Functionalities using C++ The QML syntax declaratively describes how to construct an in-memory object tree. In Qt, QML is mainly used to describe a visual scene graph, but it is @@ -431,7 +433,7 @@ onChanged, regardless of the name used for the NOTIFY signal in C++. We recommend using Changed() for the NOTIFY signal in C++. -See also \l {Writing QML Components: Properties, Methods and Signals} +See also \l {Importing Reusable Components} \section1 Methods @@ -637,469 +639,3 @@ public: */ -/*! -\page qml-extending-types.html -\ingroup qml-features -\title Writing QML Components: Properties, Methods and Signals - -One of the key concepts in QML is the ability to define your own QML components that suit -the purposes of your application. The standard \l {QML Elements} provide the essential components -for creating a QML application; beyond these, you can write your own custom components that can -be created and reused, without the use of C++. - -Components are the building blocks of a QML project. When writing a QML application, whether -large or small, it is best to separate QML code into smaller components that perform specific -sets of operations, instead of creating mammoth QML files with large, combined functionality -that is more difficult to manage and may contain duplicated code. - - -\section1 Defining New Components - -A component is a reusable type with a well-defined interface, built entirely in QML. -Any snippet of QML code can become a component, by placing the code in a file ".qml" where - is the new component name, beginning with an uppercase letter. These QML files automatically -become available as new QML element types to other QML components and applications in the same directory. - -For example, one of the simplest and most common components you can build in QML is a -button-type component. Below, we implement this component as a \l Rectangle with a clickable -\l MouseArea, in a file named \c Button.qml: - -\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0 - -Now this component can be reused by another file within the same directory. Since the file is -named \c Button.qml, the component is referred to as \c Button: - -\table -\row -\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0 -\o \image qml-extending-types.png -\endtable - -The root object in \c Button.qml defines the attributes that are available to users of the -\c Button component. In this case, the root object is a \l Rectangle, so any properties, methods -and signals of \l Rectangle are made available, allowing \c application.qml to -customize the \c width, \c height, \c radius and \c color properties of \c Button objects. - - -If \c Button.qml was not in the same directory, \c application.qml would need to load it as a -\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}. -Also, note the letter case of the component file name is significant on some (notably UNIX) -filesystems. It is recommended the file name case matches the case of the QML component name -exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the -QML component will be deployed. - -To write a useful component, it is generally necessary to provide it with custom attributes that store and -communicate specific data. This is achieved by adding the following attributes to your components: - -\list -\o \bold Properties that can be accessed externally to modify an object (for example, \l Item has - \l {Item::}{width} and \l {Item::}{height} properties) and used in \l {Property Binding} -\o \bold Methods of JavaScript code can be invoked internally or externally (for example, - \l Animation has a \l {Animation::}{start()} method) -\o \bold Signals to notify other objects when an event has occurred (for example, MouseArea has a - \c clicked signal) -\endlist - -The following sections show how these attributes can be added to QML components. - - -\section1 Adding Properties - -A property is a value of a QML component that can be read and modified by other objects. For -example, a \l Rectangle component has \l {Item::}{width}, \l {Item::}{height} and \l -{Rectangle::}{color} properties. Significantly, properties be used with \l {Property Binding}, where -a property value is automatically updated using the value of another property. - -The syntax for defining a new property is: - -\code -[default] property [: defaultValue] -\endcode - -A \c property declaration can appear anywhere within a QML component definition, but it is customary -to place it at the top. A component cannot declare more than one property with the same name. (It is -possible to have a property name that is the same as an existing property in a type, but this is not -recommended as the existing property becomes hidden and inaccessible.) - -Below is an example. The \c ImageViewer component has defined a \c string type property named -\c currentImage, and its initial value is "default-image.png". This property is used to set the image -displayed in the child \l Image object. Another file, \c application.qml, can create -an \c ImageViewer object and read or modify the \c currentImage value: - -\table -\row -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0 -\endtable - -It is optional for a property to have a default value. The default value is a convenient shortcut, and is -behaviorally identical to doing it in two steps, like this: - -\qml -// Use default value -property int myProperty: 10 - -// Longer, but behaviorally identical -property int myProperty -myProperty: 10 -\endqml - - -\section2 Supported property types - -All QML properties are typed. The examples above show properties with \c int and \c string types; -notice that the type of the property must be declared. The type is used to determine the property -behavior, and how the property is defined in C++. - -A number of property types are supported by default. These are listed in the table below, -with their default values and the corresponding C++ type: - -\table -\header \o QML Type Name \o Default value \o C++ Type Name -\row \o int \o 0 \o int -\row \o bool \o \c false \o bool -\row \o double \o 0.0 \o double -\row \o real \o 0.0 \o double -\row \o string \o "" (empty string) \o QString -\row \o url \o "" (empty url) \o QUrl -\row \o color \o #000000 (black) \o QColor -\row \o date \o \c undefined \o QDateTime -\row \o variant \o \c undefined \o QVariant -\endtable - -QML object types can also be used as property types. This includes -\l {Defining new QML elements}{custom QML types} implemented in C++. Such properties are -defined like this: - -\qml -property Item itemProperty -property QtObject objectProperty -property MyCustomType customProperty -\endqml - -Such object-type properties default to an \c undefined value. - -\l{list}{List properties} are created with the \c list syntax, and default to an empty -list: - -\qml -property list listOfItems -\endqml - -Note that list properties cannot be modified like ordinary JavaScript -arrays. See the \l {list}{list type documentation} for details. - -For details about accessing and manipulating QML properties from C++, see \l {Using QML with C++}. - - -\section2 Property change signals - -Adding a \c property to an item automatically adds a \e {value changed} -signal handler to the item. To connect to this signal, use a \l {Signal Handlers}{signal handler} -named with the \c onChanged syntax, using upper case for the first letter of the -property name. - -For example, the following \c onMyNumberChanged signal handler is automatically called whenever the -\c myNumber property changes: - -\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0 - - -\section2 Default properties - -The optional \c default attribute for a property marks it as the \e {default property} -for a type. This allows other items to specify the default property's value -as child elements. For example, the \l Item element's default property is its -\l{Item::children}{children} property. This allows the children of an \l Item -to be set like this: - -\qml -Item { - Rectangle {} - Rectangle {} -} -\endqml - -If the \l{Item::children}{children} property was not the default property for -\l Item, its value would have to be set like this instead: - -\qml -Item { - children: [ - Rectangle {} - Rectangle {} - ] -} -\endqml - -See the \l{declarative/ui-components/tabwidget}{TabWidget} example for a -demonstration of using default properties. - -Specifying a default property overrides any existing default property (for -example, any default property inherited from a parent item). Using the -\c default attribute twice in the same type block is an error. - - -\section2 Property aliases - -Property aliases are a more advanced form of property declaration. Unlike a -property definition, which allocates a new, unique storage space for the -property, a property alias connects the newly declared property (called the -aliasing property) as a direct reference to an existing property (the aliased property). Read -operations on the aliasing property act as read operations on the aliased -property, and write operations on the aliasing property as write operations on -the aliased property. - -A property alias declaration looks a lot like an ordinary property definition: -\code - [default] property alias : -\endcode - -As the aliasing property has the same type as the aliased property, an explicit -type is omitted, and the special "alias" keyword is used. Instead of a default -value, a property alias includes a compulsory alias reference. The alias -reference is used to locate the aliased property. While similar to a property -binding, the alias reference syntax is highly restricted. - -An alias reference takes one of the following forms: -\code - . - -\endcode - -where must refer to an object id within the same component as the type -declaring the alias, and, optionally, refers to a property on that object. - -For example, below is a \c Button.qml component with a \c buttonText aliased property which is -connected to the child Text object's \c text property: - -\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0 - -The following code would create a \c Button with a defined text string for the -child \l Text object: - -\qml -Button { buttonText: "This is a button" } -\endqml - -Here, modifying \c buttonText directly modifies the \c textItem.text value; it does not -change some other value that then updates \c textItem.text. - -In this case, the use of aliased properties is essential. If \c buttonText was not an alias, -changing its value would not actually change the displayed text at all, as -\l {Property Binding}{property bindings} are not bi-directional: the \c buttonText value would -change when \c textItem.text changes, but not the other way around. - -Aliased properties are also useful for allowing external objects to directly modify and -access child objects in a component. For example, here is a modified version of the \c ImageViewer -component shown \l {Adding Properties}{earlier} on this page. The \c currentImage property has -been changed to an alias to the child \l Image object: - -\table -\row -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0 -\endtable - -Instead of being limited to setting the \l Image source, \c application.qml can now directly -access and modify the child \l Image object and its properties. - -Obviously, exposing child objects in this manner should be done with care, as it allows external -objects to modify them freely. However, this use of aliased properties can be quite useful in -particular situations, such as for the \l {declarative/ui-components/tabwidget}{TabWidget} -example, where new tab items are actually parented to a child object that displays the current tab. - - -\section3 Considerations for property aliases - -Aliases are only activated once the component specifying them is completed. The -most obvious consequence of this is that the component itself cannot generally -use the aliased property directly during creation. For example, this will not work: - -\code - // Does NOT work - property alias buttonText: textItem.text - buttonText: "Some text" // buttonText is not yet defined when this value is set -\endcode - -A second, much less significant, consequence of the delayed activation of -aliases is that an alias reference cannot refer to another aliasing property -declared within the same component. This will not work: - -\code - // Does NOT work - id: root - property alias buttonText: textItem.text - property alias buttonText2: root.buttonText -\endcode - -At the time the component is created, the \c buttonText value has not yet been assigned, -so \c root.buttonText would refer to an undefined value. (From outside the component, -however, aliasing properties appear as regular Qt properties and consequently can be -used in alias references.) - -It is possible for an aliased property to have the same name as an existing property. For example, -the following component has a \c color alias property, named the same as the built-in -\l {Rectangle::color} property: - -\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0 - -Any objects that use this component and refer to its \c color property will be -referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally, -however, the rectangle can correctly set this property to "red" and refer to the actual defined -property rather than the alias. - - -\section1 Adding Methods - -A QML component can define methods of JavaScript code. These methods can be invoked -either internally or by other objects. - -The syntax for defining a method is: - -\code -function ([[, ...]]) { } -\endcode - -This declaration may appear anywhere within a type body, but it is customary to -include it at the top. Attempting to declare two methods or signals with the -same name in the same type block is an error. However, a new method may reuse -the name of an existing method on the type. (This should be done with caution, -as the existing method may be hidden and become inaccessible.) - -Unlike \l{Adding Signals}{signals}, method parameter types do not have to be declared as they -default to the \c variant type. The body of the method is written in JavaScript and may access -the parameters by name. - -Here is an example of a component with a \c say() method that accepts a single \c text argument: - -\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0 - -A method can be connected to a signal so that it is automatically invoked whenever the signal -is emitted. See \l {Connecting signals to methods and other signals} below. - -Also see \l {Integrating JavaScript} for more information on using JavaScript with QML. - - -\section1 Adding Signals - -Signals provide a way to notify other objects when an event has occurred. For example, the MouseArea -\c clicked signal notifies other objects that the mouse has been clicked within the area. - -The syntax for defining a new signal is: - -\code -signal [([ [, ...]])] -\endcode - -This declaration may appear anywhere within a type body, but it is customary to -include it at the top. Attempting to declare two signals or methods with the -same name in the same type block is an error. However, a new signal may reuse -the name of an existing signal on the type. (This should be done with caution, -as the existing signal may be hidden and become inaccessible.) - -Here are three examples of signal declarations: - -\code -Item { - signal clicked - signal hovered() - signal performAction(string action, variant actionArgument) -} -\endcode - -If the signal has no parameters, the "()" brackets are optional. If parameters are used, the -parameter types must be declared, as for the \c string and \c variant arguments for the \c -performAction signal above; the allowed parameter types are the same as those listed in the \l -{Adding Properties} section on this page. - -Adding a signal to an item automatically adds a \l {Signal Handlers}{signal handler} as well. -The signal hander is named \c on, with the first letter of the signal being upper -cased. The above example item would now have the following signal handlers: - -\list -\o onClicked -\o onHovered -\o onPerformAction -\endlist - -To emit a signal, simply invoke it in the same way as a method. Below left, when the \l MouseArea is -clicked, it emits the parent \c buttonClicked signal by invoking \c rect.buttonClicked(). The -signal is received by \c application.qml through an \c onButtonClicked signal handler: - -\table -\row -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0 -\endtable - -If the signal has parameters, they are accessible by parameter name in the signal handler. -In the example below, \c buttonClicked is emitted with \c xPos and \c yPos parameters instead: - -\table -\row -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0 -\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0 -\endtable - - -\section2 Connecting signals to methods and other signals - -Signal objects have a \c connect() method that can be used to a connect a signal to a method or -another signal. When a signal is connected to a method, the method is automatically invoked -whenever the signal is emitted. (In Qt terminology, the method is a \e slot that is connected -to the \e signal; all methods defined in QML are created as Qt slots.) This enables a signal -to be received by a method instead of a \l {Signal Handlers}{signal handler}. - -For example, the \c application.qml above could be rewritten as: - -\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0 - -The \c myMethod() method will be called whenever the \c buttonClicked signal is received. - -In many cases it is sufficient to receive signals through signal handlers rather than using -the \c connect() function; the above example does not provide any improvements over using a -simple \c onButtonClicked handler. However, if you are \l{Dynamic Object Management in QML}{creating objects dynamically}, -or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find the -\c connect() method useful. For example, the component below creates three \c Button -objects dynamically, and connects the \c buttonClicked signal of each object to the -\c myMethod() function: - -\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0 - -In the same way, you could connect a signal to methods defined in a dynamically -created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}. - -There is also a corresponding \c disconnect() method for removing connected signals. The following -code removes the connection created in \c application.qml above: - -\qml -// application.qml -Item { - ... - - function removeSignal() { - button.clicked.disconnect(item.myMethod) - } -} -\endqml - - -\section3 Forwarding signals - -The \c connect() method can also connect a signal to other signals. This has the effect -of "forwarding" a signal: it is automatically emitted whenever the relevant signal is emitted. For -example, the MouseArea \c onClicked handler in \c Button.qml above could have been replaced with -a call to \c connect(): - -\qml -MouseArea { - anchors.fill: parent - Component.onCompleted: clicked.connect(item.buttonClicked) -} -\endqml - -Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will -automatically be emitted as well. - -*/ diff --git a/doc/src/declarative/focus.qdoc b/doc/src/declarative/focus.qdoc index 3da60f1..be1000e 100644 --- a/doc/src/declarative/focus.qdoc +++ b/doc/src/declarative/focus.qdoc @@ -30,11 +30,14 @@ \page qdeclarativefocus.html \ingroup qml-features \contentspage QML Features +\previouspage {QML Text Handling and Validators}{Text Handling and Validators} +\nextpage {Importing Reusable Components} + \title Keyboard Focus in QML When a key is pressed or released, a key event is generated and delivered to the focused QML \l Item. To facilitate the construction of reusable components -and to address some of the cases unique to fluid user interfaces, the QML items add a +and to address some of the cases unique to fluid user interfaces, the QML items add aged \e scope based extension to Qt's traditional keyboard focus model. \tableofcontents diff --git a/doc/src/declarative/graphicaleffects.qdoc b/doc/src/declarative/graphicaleffects.qdoc new file mode 100644 index 0000000..b5ef601 --- /dev/null +++ b/doc/src/declarative/graphicaleffects.qdoc @@ -0,0 +1,36 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page qmlgraphicaleffects.html +\ingroup qml-features +\contentspage QML Features +\previouspage {QML Internationalization}{Internationalization} +\nextpage {QML Features} +\title QML Graphical Effects + +*/ diff --git a/doc/src/declarative/integrating.qdoc b/doc/src/declarative/integrating.qdoc index 23235d7..caba2cd 100644 --- a/doc/src/declarative/integrating.qdoc +++ b/doc/src/declarative/integrating.qdoc @@ -28,7 +28,10 @@ /*! \page qml-integration.html \ingroup qml-features -\title Integrating QML with existing Qt UI code +\previouspage {Using QML Bindings in C++ Applications} +\nextpage {QML Signal and Handler Event System} +\contentspage QML Features +\title Integrating QML Code with Existing Qt UI Code There are a number of ways to integrate QML into QWidget-based UI applications, depending on the characteristics of your existing UI code. @@ -102,6 +105,7 @@ which shows how to expose Qt's graphics layout classes to QML in order to use QGraphicsWidget with classes like QGraphicsLinearLayout and QGraphicsGridLayout. To expose your existing QGraphicsWidget classes to QML, use \l {qmlRegisterType()}. -See \l{Extending QML in C++} for further information on using C++ types in QML. +See \l{Extending QML Functionalities using C++} for further information on +how to use C++ types in QML. */ diff --git a/doc/src/declarative/mouseevents.qdoc b/doc/src/declarative/mouseevents.qdoc new file mode 100644 index 0000000..f6512a7 --- /dev/null +++ b/doc/src/declarative/mouseevents.qdoc @@ -0,0 +1,52 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page mouseevents.html +\title QML Mouse Events +\ingroup QML Features +\previouspage {Anchor-based Layout in QML}{Layouts using Anchors} +\nextpage {QML Text Handling and Validators}{Text Handling and Validators} +\contentspage QML Features + +\tableofcontents + +\section1 Introduction + +\section1 Mouse Events + +\list +\o \l{MouseArea} Element +\o \l{MouseEvent} Object +\endlist + +\section1 Mouse Event Handling +go over the slots and signals feature (without the C++) + +To learn more about QML's event system, please read the \l {QML Signal and Handler Event System} document. + +*/ diff --git a/doc/src/declarative/network.qdoc b/doc/src/declarative/network.qdoc index 4354f9d..3348eb8 100644 --- a/doc/src/declarative/network.qdoc +++ b/doc/src/declarative/network.qdoc @@ -28,6 +28,9 @@ /*! \page qdeclarativenetwork.html \ingroup qml-features +\previouspage {Dynamic Object Management in QML}{Dynamic Object Management} +\nextpage {QML Internationalization}{Internationalization} +\contentspage QML Features \title Network Transparency QML supports network transparency by using URLs (rather than file names) for all diff --git a/doc/src/declarative/propertybinding.qdoc b/doc/src/declarative/propertybinding.qdoc index 92cf874..6f7c40a 100644 --- a/doc/src/declarative/propertybinding.qdoc +++ b/doc/src/declarative/propertybinding.qdoc @@ -29,12 +29,179 @@ \page propertybinding.html \ingroup qml-features \contentspage QML Features -\previouspage QML Features -\nextpage Using QML Positioner and Repeater Items +\previouspage QML Syntax +\nextpage {QML Basic Types}{Data Types} \title Property Binding +\section1 Properties -\section1 Introduction +QML property rules coincide with many of JavaScript's property rules. +Properties begin with a lowercase letter (with the exception of +\l{Attached Properties}). \l {JavaScript Reserved Words}{JavaScript reserved words} +are not valid property names. + +\section1 Property types + +QML supports properties of many types (see \l{QML Basic Types}). The basic types +include int, real, bool, string, color, and lists. + +\code +Item { + x: 10.5 // a 'real' property + ... + state: "details" // a 'string' property + focus: true // a 'bool' property +} +\endcode + +QML properties are \i type-safe. That is, properties only allow you to assign +a value that matches the property type. For example, the \c x property of item is a real, and if you try to assign +a string to it you will get an error. + +\badcode +Item { + property real value: "hello" // illegal! +} +\endcode + +\section1 The \c id Property + +Each object can be given a special unique property called an \c id. No other object within the +same QML component (see \l{QML Documents}) can have the same \c id value. Assigning an id enables the object +to be referred to by other objects and scripts. + +The first Rectangle element below has an \c id, "myRect". The second Rectangle element defines its +own width by referring to \tt myRect.width, which means it will have the same \tt width +value as the first Rectangle element. + +\code +Item { + Rectangle { + id: myRect + width: 100 + height: 100 + } + Rectangle { + width: myRect.width + height: 200 + } +} +\endcode + +Note that an \c id must begin with a lower-case letter or an underscore. The \c id cannot contain characters other than letters, numbers, underscores, and \l {JavaScript Reserved Words}{JavaScript reserved words}. + + +\section1 List properties + +List properties look like this: + +\code +Item { + children: [ + Image {}, + Text {} + ] +} +\endcode + +The list is enclosed in square brackets, with a comma separating the +list elements. In cases where you are only assigning a single item to a +list, you can omit the square brackets: + +\code +Image { + children: Rectangle {} +} +\endcode + +Items in the list can be accessed by the \c index. See the \l{list}{list type} documentation +for more details about list properties and their available operations. + + +\section1 Default Properties + +Each object type can specify one of its list or object properties as its default property. +If a property has been declared as the default property, the property tag can be omitted. + +For example this code: +\code +State { + changes: [ + PropertyChanges {}, + PropertyChanges {} + ] +} +\endcode + +can be simplified to: + +\code +State { + PropertyChanges {} + PropertyChanges {} +} +\endcode + +because \c changes is the default property of the \c State type. + +\section1 Grouped Properties +\target dot properties + +In some cases properties form a logical group and use a 'dot' or grouped notation +to show this. + +Grouped properties can be written like this: +\qml +Text { + font.pixelSize: 12 + font.bold: true +} +\endqml + +or like this: +\qml +Text { + font { pixelSize: 12; bold: true } +} +\endqml + +In the element documentation grouped properties are shown using the 'dot' notation. + +\section1 Attached Properties +\target attached-properties + +Some objects attach properties to another object. Attached Properties +are of the form \c {Type.property} where \c Type is the type of the +element that attaches \c property. + +For example: +\code +Component { + id: myDelegate + Text { + text: "Hello" + color: ListView.isCurrentItem ? "red" : "blue" + } +} +ListView { + delegate: myDelegate +} +\endcode + +The \l ListView element attaches the \c ListView.isCurrentItem property +to each delegate it creates. + +Another example of attached properties is the \l Keys element which +attaches properties for handling key presses to +any visual Item, for example: + +\code +Item { + focus: true + Keys.onSelectPressed: console.log("Selected") +} +\endcode +\section1 Property Binding Property binding is a declarative way of specifying the value of a property. Binding allows a property's value to be expressed as an JavaScript expression that defines the value relative to other property values or data accessible in the application. The property value is @@ -103,7 +270,7 @@ Rectangle { \section1 Effects of Property Assignment in JavaScript -Assigning a property value from JavaScript does \i not create a property binding. +Assigning a property value from JavaScript does \e not create a property binding. For example: \code @@ -153,7 +320,5 @@ Binding { value: slider.value } \endqml - - */ diff --git a/doc/src/declarative/qdeclarativei18n.qdoc b/doc/src/declarative/qdeclarativei18n.qdoc index fac1e55..cd4ccf0 100644 --- a/doc/src/declarative/qdeclarativei18n.qdoc +++ b/doc/src/declarative/qdeclarativei18n.qdoc @@ -28,6 +28,9 @@ /*! \page qdeclarativei18n.html \ingroup qml-features +\contentspage QML Features +\previouspage {Network Transparency}{Loading Resources in QML} +\nextpage {QML Graphical Effects}{Graphical Effects} \title QML Internationalization \section1 Overview diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index 0be29e1..e1a425f 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -29,6 +29,8 @@ \page qdeclarativemodels.html \ingroup qml-features \contentspage QML Features +\previouspage {QML Animation and Transitions}{Animation and Transitions} +\nextpage {Presenting Data with Views} \target qmlmodels \title QML Data Models @@ -70,7 +72,8 @@ QML provides several types of data models among the built-in set of QML elements. In addition, models can be created with C++ and then made available to QML components. -The views used to access data models are described in \l{Presenting Data with QML}. +The views used to access data models are described in the +\l{Presenting Data with Views} overview. The use of positioner items to arrange items from a model is covered in \l{Using QML Positioner and Repeater Items}. @@ -465,86 +468,3 @@ a function in the model, e.g.: updated, and that \e{value} holds the new value. */ - -/*! -\page qml-presenting-data.html -\ingroup qml-features -\contentspage QML Features -\title Presenting Data with QML - -\section1 Introduction - -Qt Quick contains a set of standard items that can be used to present data in a -number of different ways. For simple user interfaces, -\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used -in combination with -\l{Using QML Positioner and Repeater Items#Positioners}{Positioners} -to obtain pieces of data and arrange them in a user interface. However, when -large quantities of data are involved, it is often better to use models with -the standard views since these contain many built-in display and navigation -features. - -\section1 Views - -Views are scrolling containers for collections of items. They are feature-rich, -supporting many of the use cases found in typical applications, and can be -customized to meet requirements on style and behavior. - -A set of standard views are provided in the basic set of Qt Quick -graphical elements: - -\list -\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list -\o \l{#GridView}{GridView} arranges items in a grid within the available space -\o \l{#PathView}{PathView} arranges items on a path -\endlist - -Unlike these items, \l WebView is not a fully-featured view item, and needs -to be combined with a \l Flickable item to create a view that performs like -a Web browser. - -\section2 ListView - -\l ListView shows a classic list of items with horizontal or vertical placing -of items. - -\div{float-right} -\inlineimage qml-listview-snippet.png -\enddiv - -The following example shows a minimal ListView displaying a sequence of -numbers (using an \l{QML Data Models#An Integer}{integer as a model}). -A simple delegate is used to define an items for each piece of data in the -model. - -\clearfloat -\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document - - - -\section2 GridView - -\l GridView displays items in a grid like an file manager's icon view. - -\section2 PathView - -\l PathView displays items on a path, where the selection remains in -the same place and the items move around it. - -\section1 Decorating Views - -\section2 Headers and Footers - -\section2 Sections - -\section2 Navigation - -In traditional user interfaces, views can be scrolled using standard -controls, such as scroll bars and arrow buttons. In some situations, it -is also possible to drag the view directly by pressing and holding a -mouse button while moving the cursor. In touch-based user interfaces, -this dragging action is often complemented with a flicking action, where -scrolling continues after the user has stopped touching the view. - -\section1 Further Reading -*/ diff --git a/doc/src/declarative/qdeclarativestates.qdoc b/doc/src/declarative/qdeclarativestates.qdoc index f378ce6..3266bae 100644 --- a/doc/src/declarative/qdeclarativestates.qdoc +++ b/doc/src/declarative/qdeclarativestates.qdoc @@ -29,6 +29,8 @@ \page qdeclarativestates.html \ingroup qml-features \contentspage QML Features +\previouspage {Importing Reusable Components} +\nextpage {QML Animation and Transitions}{Animation and Transitions} \target qmlstates \title QML States diff --git a/doc/src/declarative/qmlevents.qdoc b/doc/src/declarative/qmlevents.qdoc new file mode 100644 index 0000000..3c1c8df --- /dev/null +++ b/doc/src/declarative/qmlevents.qdoc @@ -0,0 +1,37 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! + \page qmlevents.html + \ingroup qml-features + \contentspage QML Features + \previouspage {Integrating QML Code with Existing Qt UI Code} + \nextpage {Dynamic Object Management in QML}{Dynamic Object Management} + + \title QML Signal and Handler Event System + +*/ diff --git a/doc/src/declarative/qmlreusablecomponents.qdoc b/doc/src/declarative/qmlreusablecomponents.qdoc new file mode 100644 index 0000000..78865a1 --- /dev/null +++ b/doc/src/declarative/qmlreusablecomponents.qdoc @@ -0,0 +1,497 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page qmlreusablecomponents.html +\ingroup qml-features +\previouspage {Keyboard Focus in QML}{Keyboard Focus} +\nextpage {QML States}{States} +\contentspage QML Features + +\title Importing Reusable Components + +One of the key concepts in QML is the ability to define your own QML components that suit +the purposes of your application. The standard \l {QML Elements} provide the essential components +for creating a QML application; beyond these, you can write your own custom components that can +be created and reused, without the use of C++. + +Components are the building blocks of a QML project. When writing a QML application, whether +large or small, it is best to separate QML code into smaller components that perform specific +sets of operations, instead of creating mammoth QML files with large, combined functionality +that is more difficult to manage and may contain duplicated code. + + +\section1 Defining New Components + +A component is a reusable type with a well-defined interface, built entirely in QML. +Any snippet of QML code can become a component, by placing the code in a file ".qml" where + is the new component name, beginning with an uppercase letter. These QML files automatically +become available as new QML element types to other QML components and applications in the same directory. + +For example, one of the simplest and most common components you can build in QML is a +button-type component. Below, we implement this component as a \l Rectangle with a clickable +\l MouseArea, in a file named \c Button.qml: + +\snippet doc/src/snippets/declarative/qml-extending-types/components/Button.qml 0 + +Now this component can be reused by another file within the same directory. Since the file is +named \c Button.qml, the component is referred to as \c Button: + +\table +\row +\o \snippet doc/src/snippets/declarative/qml-extending-types/components/application.qml 0 +\o \image qml-extending-types.png +\endtable + +The root object in \c Button.qml defines the attributes that are available to users of the +\c Button component. In this case, the root object is a \l Rectangle, so any properties, methods +and signals of \l Rectangle are made available, allowing \c application.qml to +customize the \c width, \c height, \c radius and \c color properties of \c Button objects. + + +If \c Button.qml was not in the same directory, \c application.qml would need to load it as a +\l {Modules}{module} from a specific filesystem path or \l{QDeclarativeExtensionPlugin}{plugin}. +Also, note the letter case of the component file name is significant on some (notably UNIX) +filesystems. It is recommended the file name case matches the case of the QML component name +exactly - for example, \c Box.qml and not \c BoX.qml - regardless of the platform to which the +QML component will be deployed. + +To write a useful component, it is generally necessary to provide it with custom attributes that store and +communicate specific data. This is achieved by adding the following attributes to your components: + +\list +\o \bold Properties that can be accessed externally to modify an object (for example, \l Item has + \l {Item::}{width} and \l {Item::}{height} properties) and used in \l {Property Binding} +\o \bold Methods of JavaScript code can be invoked internally or externally (for example, + \l Animation has a \l {Animation::}{start()} method) +\o \bold Signals to notify other objects when an event has occurred (for example, MouseArea has a + \c clicked signal) +\endlist + +The following sections show how these attributes can be added to QML components. + + +\section1 Adding Properties + +A property is a value of a QML component that can be read and modified by other objects. For +example, a \l Rectangle component has \l {Item::}{width}, \l {Item::}{height} and \l +{Rectangle::}{color} properties. Significantly, properties be used with \l {Property Binding}, where +a property value is automatically updated using the value of another property. + +The syntax for defining a new property is: + +\code +[default] property [: defaultValue] +\endcode + +A \c property declaration can appear anywhere within a QML component definition, but it is customary +to place it at the top. A component cannot declare more than one property with the same name. (It is +possible to have a property name that is the same as an existing property in a type, but this is not +recommended as the existing property becomes hidden and inaccessible.) + +Below is an example. The \c ImageViewer component has defined a \c string type property named +\c currentImage, and its initial value is "default-image.png". This property is used to set the image +displayed in the child \l Image object. Another file, \c application.qml, can create +an \c ImageViewer object and read or modify the \c currentImage value: + +\table +\row +\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/ImageViewer.qml 0 +\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/application.qml 0 +\endtable + +It is optional for a property to have a default value. The default value is a convenient shortcut, and is +behaviorally identical to doing it in two steps, like this: + +\qml +// Use default value +property int myProperty: 10 + +// Longer, but behaviorally identical +property int myProperty +myProperty: 10 +\endqml + + +\section2 Supported property types + +All QML properties are typed. The examples above show properties with \c int and \c string types; +notice that the type of the property must be declared. The type is used to determine the property +behavior, and how the property is defined in C++. + +A number of property types are supported by default. These are listed in the table below, +with their default values and the corresponding C++ type: + +\table +\header \o QML Type Name \o Default value \o C++ Type Name +\row \o int \o 0 \o int +\row \o bool \o \c false \o bool +\row \o double \o 0.0 \o double +\row \o real \o 0.0 \o double +\row \o string \o "" (empty string) \o QString +\row \o url \o "" (empty url) \o QUrl +\row \o color \o #000000 (black) \o QColor +\row \o date \o \c undefined \o QDateTime +\row \o variant \o \c undefined \o QVariant +\endtable + +QML object types can also be used as property types. This includes +\l {Defining new QML elements}{custom QML types} implemented in C++. Such properties are +defined like this: + +\qml +property Item itemProperty +property QtObject objectProperty +property MyCustomType customProperty +\endqml + +Such object-type properties default to an \c undefined value. + +\l{list}{List properties} are created with the \c list syntax, and default to an empty +list: + +\qml +property list listOfItems +\endqml + +Note that list properties cannot be modified like ordinary JavaScript +arrays. See the \l {list}{list type documentation} for details. + +For details about accessing and manipulating QML properties from C++, see \l {Using QML Bindings in C++ Applications}. + + +\section2 Property change signals + +Adding a \c property to an item automatically adds a \e {value changed} +signal handler to the item. To connect to this signal, use a \l {Signal Handlers}{signal handler} +named with the \c onChanged syntax, using upper case for the first letter of the +property name. + +For example, the following \c onMyNumberChanged signal handler is automatically called whenever the +\c myNumber property changes: + +\snippet doc/src/snippets/declarative/qml-extending-types/properties/property-signals.qml 0 + + +\section2 Default properties + +The optional \c default attribute for a property marks it as the \e {default property} +for a type. This allows other items to specify the default property's value +as child elements. For example, the \l Item element's default property is its +\l{Item::children}{children} property. This allows the children of an \l Item +to be set like this: + +\qml +Item { + Rectangle {} + Rectangle {} +} +\endqml + +If the \l{Item::children}{children} property was not the default property for +\l Item, its value would have to be set like this instead: + +\qml +Item { + children: [ + Rectangle {} + Rectangle {} + ] +} +\endqml + +See the \l{declarative/ui-components/tabwidget}{TabWidget} example for a +demonstration of using default properties. + +Specifying a default property overrides any existing default property (for +example, any default property inherited from a parent item). Using the +\c default attribute twice in the same type block is an error. + + +\section2 Property aliases + +Property aliases are a more advanced form of property declaration. Unlike a +property definition, which allocates a new, unique storage space for the +property, a property alias connects the newly declared property (called the +aliasing property) as a direct reference to an existing property (the aliased property). Read +operations on the aliasing property act as read operations on the aliased +property, and write operations on the aliasing property as write operations on +the aliased property. + +A property alias declaration looks a lot like an ordinary property definition: +\code + [default] property alias : +\endcode + +As the aliasing property has the same type as the aliased property, an explicit +type is omitted, and the special "alias" keyword is used. Instead of a default +value, a property alias includes a compulsory alias reference. The alias +reference is used to locate the aliased property. While similar to a property +binding, the alias reference syntax is highly restricted. + +An alias reference takes one of the following forms: +\code + . + +\endcode + +where must refer to an object id within the same component as the type +declaring the alias, and, optionally, refers to a property on that object. + +For example, below is a \c Button.qml component with a \c buttonText aliased property which is +connected to the child Text object's \c text property: + +\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias.qml 0 + +The following code would create a \c Button with a defined text string for the +child \l Text object: + +\qml +Button { buttonText: "This is a button" } +\endqml + +Here, modifying \c buttonText directly modifies the \c textItem.text value; it does not +change some other value that then updates \c textItem.text. + +In this case, the use of aliased properties is essential. If \c buttonText was not an alias, +changing its value would not actually change the displayed text at all, as +\l {Property Binding}{property bindings} are not bi-directional: the \c buttonText value would +change when \c textItem.text changes, but not the other way around. + +Aliased properties are also useful for allowing external objects to directly modify and +access child objects in a component. For example, here is a modified version of the \c ImageViewer +component shown \l {Adding Properties}{earlier} on this page. The \c currentImage property has +been changed to an alias to the child \l Image object: + +\table +\row +\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/ImageViewer.qml 0 +\o \snippet doc/src/snippets/declarative/qml-extending-types/properties/alias/application.qml 0 +\endtable + +Instead of being limited to setting the \l Image source, \c application.qml can now directly +access and modify the child \l Image object and its properties. + +Obviously, exposing child objects in this manner should be done with care, as it allows external +objects to modify them freely. However, this use of aliased properties can be quite useful in +particular situations, such as for the \l {declarative/ui-components/tabwidget}{TabWidget} +example, where new tab items are actually parented to a child object that displays the current tab. + + +\section3 Considerations for property aliases + +Aliases are only activated once the component specifying them is completed. The +most obvious consequence of this is that the component itself cannot generally +use the aliased property directly during creation. For example, this will not work: + +\code + // Does NOT work + property alias buttonText: textItem.text + buttonText: "Some text" // buttonText is not yet defined when this value is set +\endcode + +A second, much less significant, consequence of the delayed activation of +aliases is that an alias reference cannot refer to another aliasing property +declared within the same component. This will not work: + +\code + // Does NOT work + id: root + property alias buttonText: textItem.text + property alias buttonText2: root.buttonText +\endcode + +At the time the component is created, the \c buttonText value has not yet been assigned, +so \c root.buttonText would refer to an undefined value. (From outside the component, +however, aliasing properties appear as regular Qt properties and consequently can be +used in alias references.) + +It is possible for an aliased property to have the same name as an existing property. For example, +the following component has a \c color alias property, named the same as the built-in +\l {Rectangle::color} property: + +\snippet doc/src/snippets/declarative/qml-extending-types/properties/alias-override.qml 0 + +Any objects that use this component and refer to its \c color property will be +referring to the alias rather than the ordinary \l {Rectangle::color} property. Internally, +however, the rectangle can correctly set this property to "red" and refer to the actual defined +property rather than the alias. + + +\section1 Adding Methods + +A QML component can define methods of JavaScript code. These methods can be invoked +either internally or by other objects. + +The syntax for defining a method is: + +\code +function ([[, ...]]) { } +\endcode + +This declaration may appear anywhere within a type body, but it is customary to +include it at the top. Attempting to declare two methods or signals with the +same name in the same type block is an error. However, a new method may reuse +the name of an existing method on the type. (This should be done with caution, +as the existing method may be hidden and become inaccessible.) + +Unlike \l{Adding Signals}{signals}, method parameter types do not have to be declared as they +default to the \c variant type. The body of the method is written in JavaScript and may access +the parameters by name. + +Here is an example of a component with a \c say() method that accepts a single \c text argument: + +\snippet doc/src/snippets/declarative/qml-extending-types/methods/app.qml 0 + +A method can be connected to a signal so that it is automatically invoked whenever the signal +is emitted. See \l {Connecting signals to methods and other signals} below. + +Also see \l {Integrating JavaScript} for more information on using JavaScript with QML. + + +\section1 Adding Signals + +Signals provide a way to notify other objects when an event has occurred. For example, the MouseArea +\c clicked signal notifies other objects that the mouse has been clicked within the area. + +The syntax for defining a new signal is: + +\code +signal [([ [, ...]])] +\endcode + +This declaration may appear anywhere within a type body, but it is customary to +include it at the top. Attempting to declare two signals or methods with the +same name in the same type block is an error. However, a new signal may reuse +the name of an existing signal on the type. (This should be done with caution, +as the existing signal may be hidden and become inaccessible.) + +Here are three examples of signal declarations: + +\code +Item { + signal clicked + signal hovered() + signal performAction(string action, variant actionArgument) +} +\endcode + +If the signal has no parameters, the "()" brackets are optional. If parameters are used, the +parameter types must be declared, as for the \c string and \c variant arguments for the \c +performAction signal above; the allowed parameter types are the same as those listed in the \l +{Adding Properties} section on this page. + +Adding a signal to an item automatically adds a \l {Signal Handlers}{signal handler} as well. +The signal hander is named \c on, with the first letter of the signal being upper +cased. The above example item would now have the following signal handlers: + +\list +\o onClicked +\o onHovered +\o onPerformAction +\endlist + +To emit a signal, simply invoke it in the same way as a method. Below left, when the \l MouseArea is +clicked, it emits the parent \c buttonClicked signal by invoking \c rect.buttonClicked(). The +signal is received by \c application.qml through an \c onButtonClicked signal handler: + +\table +\row +\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/basic.qml 0 +\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/no-parameters.qml 0 +\endtable + +If the signal has parameters, they are accessible by parameter name in the signal handler. +In the example below, \c buttonClicked is emitted with \c xPos and \c yPos parameters instead: + +\table +\row +\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/Button.qml 0 +\o \snippet doc/src/snippets/declarative/qml-extending-types/signals/parameters.qml 0 +\endtable + + +\section2 Connecting signals to methods and other signals + +Signal objects have a \c connect() method that can be used to a connect a signal to a method or +another signal. When a signal is connected to a method, the method is automatically invoked +whenever the signal is emitted. (In Qt terminology, the method is a \e slot that is connected +to the \e signal; all methods defined in QML are created as Qt slots.) This enables a signal +to be received by a method instead of a \l {Signal Handlers}{signal handler}. + +For example, the \c application.qml above could be rewritten as: + +\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectslots.qml 0 + +The \c myMethod() method will be called whenever the \c buttonClicked signal is received. + +In many cases it is sufficient to receive signals through signal handlers rather than using +the \c connect() function; the above example does not provide any improvements over using a +simple \c onButtonClicked handler. However, if you are \l{Dynamic Object Management in QML}{creating objects dynamically}, +or \l {Integrating JavaScript}{integrating JavaScript code}, then you will find the +\c connect() method useful. For example, the component below creates three \c Button +objects dynamically, and connects the \c buttonClicked signal of each object to the +\c myMethod() function: + +\snippet doc/src/snippets/declarative/qml-extending-types/signals/connectdynamic.qml 0 + +In the same way, you could connect a signal to methods defined in a dynamically +created object, or \l {Receiving QML Signals in JavaScript}{connect a signal to a JavaScript method}. + +There is also a corresponding \c disconnect() method for removing connected signals. The following +code removes the connection created in \c application.qml above: + +\qml +// application.qml +Item { + ... + + function removeSignal() { + button.clicked.disconnect(item.myMethod) + } +} +\endqml + + +\section3 Forwarding signals + +The \c connect() method can also connect a signal to other signals. This has the effect +of "forwarding" a signal: it is automatically emitted whenever the relevant signal is emitted. For +example, the MouseArea \c onClicked handler in \c Button.qml above could have been replaced with +a call to \c connect(): + +\qml +MouseArea { + anchors.fill: parent + Component.onCompleted: clicked.connect(item.buttonClicked) +} +\endqml + +Whenever the \l MouseArea \c clicked signal is emitted, the \c rect.buttonClicked signal will +automatically be emitted as well. + +*/ diff --git a/doc/src/declarative/qmlruntime.qdoc b/doc/src/declarative/qmlruntime.qdoc index dfc0ad9..7a59959 100644 --- a/doc/src/declarative/qmlruntime.qdoc +++ b/doc/src/declarative/qmlruntime.qdoc @@ -29,13 +29,13 @@ \page qmlruntime.html \title Qt Declarative UI Runtime -QML documents are loaded and executed by the QML runtime. This includes the +QML documents are loaded and executed by the QML runtime. This includes the Declarative UI engine along with the built-in QML elements and plugin modules, and it also provides access to third-party QML elements and modules. -Applications that use QML need to invoke the QML runtime in order to -execute QML documents. This can be done by creating a QDeclarativeView -or a QDeclarativeEngine, as described below. In addition, the Declarative UI +Applications that use QML need to invoke the QML runtime in order to +execute QML documents. This can be done by creating a QDeclarativeView +or a QDeclarativeEngine, as described below. In addition, the Declarative UI package includes the \QQV tool, which loads \c .qml files. This tool is useful for developing and testing QML code without the need to write a C++ application to load the QML runtime. @@ -44,7 +44,7 @@ a C++ application to load the QML runtime. \section1 Deploying QML-based applications -To deploy an application that uses QML, the QML runtime must be invoked by +To deploy an application that uses QML, the QML runtime must be invoked by the application. This is done by writing a Qt C++ application that loads the QDeclarativeEngine by either: @@ -61,12 +61,12 @@ For example, if there is a QML file, \c application.qml, like this: \qml import QtQuick 1.0 - + Rectangle { width: 100; height: 100; color: "red" } \endqml It can be loaded in a Qt application's \c main.cpp file like this: - + \code #include #include @@ -82,10 +82,10 @@ It can be loaded in a Qt application's \c main.cpp file like this: return app.exec(); } \endcode - -This creates a QWidget-based view that displays the contents of + +This creates a QWidget-based view that displays the contents of \c application.qml. - + The application's \c .pro \l{qmake Project Files}{project file} must specify the \c declarative module for the \c QT variable. For example: @@ -97,36 +97,36 @@ the \c declarative module for the \c QT variable. For example: \section2 Creating a QDeclarativeEngine directly - -If \c application.qml does not have any graphical components, or if it is + +If \c application.qml does not have any graphical components, or if it is preferred to avoid QDeclarativeView for other reasons, the QDeclarativeEngine can be constructed directly instead. In this case, \c application.qml is loaded as a QDeclarativeComponent instance rather than placed into a view: \code #include - #include + #include #include #include int main(int argc, char *argv[]) { QApplication app(argc, argv); - + QDeclarativeEngine engine; QDeclarativeContext *objectContext = new QDeclarativeContext(engine.rootContext()); - + QDeclarativeComponent component(&engine, "application.qml"); QObject *object = component.create(objectContext); - + // ... delete object and objectContext when necessary - + return app.exec(); } \endcode -See \l {Using QML in C++ Applications} for more information about using -QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well +See \l {Using QML Bindings in C++ Applications} for more information about using +QDeclarativeEngine, QDeclarativeContext and QDeclarativeComponent, as well as details on including QML files through \l{The Qt Resource System}{Qt's Resource system}. @@ -135,8 +135,8 @@ as details on including QML files through \l{The Qt Resource System}{Qt's Resour The Declarative UI package includes a QML runtime tool, the \QQV, which loads and displays QML documents. This is useful during the application development -phase for prototyping QML-based applications without writing your own C++ -applications to invoke the QML runtime. +phase for prototyping QML-based applications without writing your own C++ +applications to invoke the QML runtime. See the \l{QML Viewer} documentation for more details. diff --git a/doc/src/declarative/qmlsyntax.qdoc b/doc/src/declarative/qmlsyntax.qdoc index 4ff2437..908b924 100644 --- a/doc/src/declarative/qmlsyntax.qdoc +++ b/doc/src/declarative/qmlsyntax.qdoc @@ -30,6 +30,7 @@ \title QML Syntax \ingroup QML Features \previouspage QML Features +\nextpage Property Binding \contentspage QML Features \tableofcontents @@ -38,11 +39,9 @@ QML is a declarative language designed to describe the user interface of a program: both what it looks like, and how it behaves. In QML, a user interface is specified as a tree of objects with properties. -This introduction is meant for those with little or no programming -experience. JavaScript is used as a scripting language in QML, so you may want +JavaScript is used as a scripting language in QML, so you may want to learn a bit more about it (\l{Javascript Guide}) before diving -deeper into QML. It's also helpful to have a basic understanding of other web -technologies like HTML and CSS, but it's not required. +deeper into QML. \section1 Basic QML Syntax diff --git a/doc/src/declarative/qmltexthandling.qdoc b/doc/src/declarative/qmltexthandling.qdoc new file mode 100644 index 0000000..c5a6bc9 --- /dev/null +++ b/doc/src/declarative/qmltexthandling.qdoc @@ -0,0 +1,55 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page texthandling.html +\title QML Text Handling and Validators +\ingroup QML Features +\previouspage {QML Mouse Events}{Mouse Events} +\nextpage {Keyboard Focus in QML}{Keyboard Focus} +\contentspage QML Features + +\tableofcontents + +\section1 Introduction + +\section1 Text Elements + +\list +\o \l{Text} +\o \l{TextInput} +\o \l{TextEdit} +\endlist + +\section1 Validators +\list +\o \l{IntValidator} +\o \l{DoubleValidator} +\o \l{RegExpValidator} +\endlist + +*/ diff --git a/doc/src/declarative/qmlviewer.qdoc b/doc/src/declarative/qmlviewer.qdoc index 82f1fec..551b20c 100644 --- a/doc/src/declarative/qmlviewer.qdoc +++ b/doc/src/declarative/qmlviewer.qdoc @@ -31,34 +31,34 @@ \title QML Viewer \ingroup qttools -The Declarative UI package includes \QQV, a tool for loading QML documents that -makes it easy to quickly develop and debug QML applications. It invokes the QML -runtime to load QML documents and also includes additional features useful for +The Declarative UI package includes \QQV, a tool for loading QML documents that +makes it easy to quickly develop and debug QML applications. It invokes the QML +runtime to load QML documents and also includes additional features useful for the development of QML-based applications. -The QML Viewer is a tool for testing and developing QML applications. It is -\e not intended for use in a production environment and should not be used for the +The QML Viewer is a tool for testing and developing QML applications. It is +\e not intended for use in a production environment and should not be used for the deployment of QML applications. In those cases, the QML runtime should be invoked from a Qt application instead; see \l {Qt Declarative UI Runtime} for more information. The viewer is located at \c QTDIR/bin/qmlviewer. To load a \c .qml file -with the viewer, run the viewer and select the file to be opened, or provide the +with the viewer, run the viewer and select the file to be opened, or provide the file path on the command line: \code qmlviewer myqmlfile.qml \endcode - + On Mac OS X, the QML Viewer application is named "QMLViewer" instead. You -can launch the viewer by opening the QMLViewer application from the Finder, or +can launch the viewer by opening the QMLViewer application from the Finder, or from the command line: \code QMLViewer.app/Contents/MacOS/QMLViewer myqmlfile.qml \endcode -The QML Viewer has a number of configuration options involving features such as +The QML Viewer has a number of configuration options involving features such as fullscreen display, module import path configurations, video recording of QML animations, and OpenGL support. @@ -68,7 +68,7 @@ To see the configuration options, run \c qmlviewer with the \c -help argument. \section1 Adding module import paths Additional module import paths can be provided using the \c -I flag. -For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates +For example, the \l{declarative/cppextensions/plugins}{QML plugins example} creates a C++ plugin identified as \c com.nokia.TimeExample. Since this has a namespaced identifier, the viewer has to be run with the \c -I flag from the example's base directory: @@ -87,16 +87,16 @@ the path is explicitly added. \section1 Loading translation files -When the QML Viewer loads a QML file, it installs a translation file from a -"i18n" subdirectory relative to that initial file. This directory should contain +When the QML Viewer loads a QML file, it installs a translation file from a +"i18n" subdirectory relative to that initial file. This directory should contain translation files named "qml_.qm", where is a two-letter ISO 639 language, such as "qml_fr.qm", optionally followed by an underscore and an uppercase two-letter ISO 3166 country code, such as "qml_fr_FR.qm" or -"qml_fr_CA.qm". +"qml_fr_CA.qm". Such files can be created using \l {Qt Linguist}. -The actual translation file that is loaded depends on the system locale. +The actual translation file that is loaded depends on the system locale. Additionally, the viewer will load any translation files specified on the command line via the \c -translation option. @@ -110,7 +110,7 @@ shows how JavaScript code in QML files can be made to use translatable strings. Often, QML applications are prototyped with fake data that is later replaced by real data sources from C++ plugins. QML Viewer assists in this aspect by loading fake data into the application context: it looks for a directory named -"dummydata" in the same directory as the target QML file, and any \c .qml +"dummydata" in the same directory as the target QML file, and any \c .qml files in that directory are loaded as QML objects and bound to the root context as properties named after the files. @@ -124,7 +124,7 @@ ListView { width: 200; height: 300 model: lottoNumbers delegate: Text { text: number } -} +} \endqml If within the document's directory, there is a "dummydata" directory which @@ -146,30 +146,30 @@ Child properties are included when loaded from dummy data. The following documen refers to a \c clock.time property: \qml -import QtQuick 1.0 +import QtQuick 1.0 Text { text: clock.time } \endqml - + The text value could be filled by a \c dummydata/clock.qml file with a \c time property in the root context: \qml -import QtQuick 1.0 +import QtQuick 1.0 QtObject { property int time: 54321 } \endqml To replace this with real data, you can simply bind the real data object to the root context in C++ using QDeclarativeContext::setContextProperty(). This -is detailed in \l {Using QML in C++ Applications}. +is detailed in \l {Using QML Bindings in C++ Applications}. \section1 Using the \c runtime object QML applications that are loaded with the QML Viewer have access to a special -\c runtime property on the root context. This property provides additional +\c runtime property on the root context. This property provides additional information about the application's runtime environment through the following properties: \table -\row +\row \o \c runtime.isActiveWindow @@ -177,9 +177,9 @@ information about the application's runtime environment through the following pr window on the system. It is useful for "pausing" an application, particularly animations, when the QML Viewer loses focus or moves to the background. -For example, the following animation is only played when the QML Viewer is +For example, the following animation is only played when the QML Viewer is the active window: - + \qml Rectangle { width: 200; height: 200 @@ -197,9 +197,9 @@ Rectangle { \o \c runtime.orientation \o This property indicates the current orientation of the QML Viewer. On the -N900 platform and most S60 5.0-based or newer Symbian devices, this property -automatically updates to reflect the device's actual orientation; on other platforms, -this indicates the orientation currently selected in the QML Viewer's +N900 platform and most S60 5.0-based or newer Symbian devices, this property +automatically updates to reflect the device's actual orientation; on other platforms, +this indicates the orientation currently selected in the QML Viewer's \e {Settings -> Properties} menu. The \c orientation value can be one of the following: \list @@ -210,7 +210,7 @@ this indicates the orientation currently selected in the QML Viewer's \endlist When the viewer's orientation changes, the appearance of the loaded QML document -does not change unless it has been set to respond to changes in +does not change unless it has been set to respond to changes in \c runtime.orientation. For example, the following Rectangle changes its aspect ratio depending on the orientation of the QML Viewer: @@ -218,12 +218,12 @@ aspect ratio depending on the orientation of the QML Viewer: Rectangle { id: window width: 640; height: 480 - + states: State { name: "landscape" PropertyChanges { target: window; width: 480; height: 640 } } - state: (runtime.orientation == Orientation.Landscape + state: (runtime.orientation == Orientation.Landscape || runtime.orientation == Orientation.LandscapeInverted) ? 'landscape' : '' } \endqml diff --git a/doc/src/declarative/qmlviews.qdoc b/doc/src/declarative/qmlviews.qdoc new file mode 100644 index 0000000..3f74214 --- /dev/null +++ b/doc/src/declarative/qmlviews.qdoc @@ -0,0 +1,111 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! +\page qml-views.html +\ingroup qml-features +\contentspage QML Features +\previouspage {QML Data Models}{Structuring Data with Models} +\nextpage {Extending QML Functionalities using C++} +\title Presenting Data with Views + +\section1 Introduction + +Qt Quick contains a set of standard items that can be used to present data in a +number of different ways. For simple user interfaces, +\l{Using QML Positioner and Repeater Items#Repeaters}{Repeaters} can be used +in combination with +\l{Using QML Positioner and Repeater Items#Positioners}{Positioners} +to obtain pieces of data and arrange them in a user interface. However, when +large quantities of data are involved, it is often better to use models with +the standard views since these contain many built-in display and navigation +features. + +\section1 Views + +Views are scrolling containers for collections of items. They are feature-rich, +supporting many of the use cases found in typical applications, and can be +customized to meet requirements on style and behavior. + +A set of standard views are provided in the basic set of Qt Quick +graphical elements: + +\list +\o \l{#ListView}{ListView} arranges items in a horizontal or vertical list +\o \l{#GridView}{GridView} arranges items in a grid within the available space +\o \l{#PathView}{PathView} arranges items on a path +\endlist + +Unlike these items, \l WebView is not a fully-featured view item, and needs +to be combined with a \l Flickable item to create a view that performs like +a Web browser. + +\section2 ListView + +\l ListView shows a classic list of items with horizontal or vertical placing +of items. + +\beginfloatright +\inlineimage qml-listview-snippet.png +\endfloat + +The following example shows a minimal ListView displaying a sequence of +numbers (using an \l{QML Data Models#An Integer}{integer as a model}). +A simple delegate is used to define an items for each piece of data in the +model. + +\clearfloat +\snippet doc/src/snippets/declarative/listview/listview-snippet.qml document + + + +\section2 GridView + +\l GridView displays items in a grid like an file manager's icon view. + +\section2 PathView + +\l PathView displays items on a path, where the selection remains in +the same place and the items move around it. + +\section1 Decorating Views + +\section2 Headers and Footers + +\section2 Sections + +\section2 Navigation + +In traditional user interfaces, views can be scrolled using standard +controls, such as scroll bars and arrow buttons. In some situations, it +is also possible to drag the view directly by pressing and holding a +mouse button while moving the cursor. In touch-based user interfaces, +this dragging action is often complemented with a flicking action, where +scrolling continues after the user has stopped touching the view. + +\section1 Further Reading +*/ diff --git a/doc/src/declarative/qmlwebkit.qdoc b/doc/src/declarative/qmlwebkit.qdoc new file mode 100644 index 0000000..0f4e86b --- /dev/null +++ b/doc/src/declarative/qmlwebkit.qdoc @@ -0,0 +1,47 @@ +/**************************************************************************** +** +** 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$ +** 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 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$ +** +****************************************************************************/ + +/*! + \page qmlwebkit.html + + \title QtWebKit QML Module + + Qt WebKit QML + + \section1 WebKit QML Elements + \list + \o \l WebView + \o \l FlickableWebView + \endlist + + \section1 Content + + \section1 Usage Ideas + + \section1 Other Suggestions + +*/ diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 0a66226..a7aacdb 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -28,10 +28,12 @@ /*! \page qtbinding.html \ingroup qml-features -\target qtbinding -\title Using QML in C++ Applications +\previouspage {Extending QML Functionalities using C++} +\nextpage {Integrating QML Code with Existing Qt UI Code} +\contentspage QML Features +\title Using QML Bindings in C++ Applications -QML is designed to be easily extensible from C++. The classes in the +QML is designed to be easily extensible to and from C++. The classes in the Qt Declarative module allow QML components to be loaded and manipulated from C++, and through Qt's \l{The Meta-Object System}{meta-object system}, QML and C++ objects can easily communicate through Qt signals and slots. In addition, QML plugins can be written to create @@ -86,7 +88,7 @@ delete rectangleInstance; QML documents can also be loaded using QDeclarativeView. This class provides a convenient QWidget-based view for embedding QML components into QGraphicsView-based applications. (For other -methods of integrating QML into QWidget-based applications, see \l {Integrating QML with existing Qt +methods of integrating QML into QWidget-based applications, see \l {Integrating QML Code with existing Qt UI code}.) @@ -254,8 +256,8 @@ Note that custom C++ types do not have to inherit from QDeclarativeItem; this is a displayable item. If the item is not displayable, it can simply inherit from QObject. For more information on defining new QML elements, see the \l {Tutorial: Writing QML extensions with C++} -{Writing QML extensions with C++} tutorial and the \l {Extending QML in C++} reference -documentation. +{Writing QML extensions with C++} tutorial and the +\l {Extending QML Functionalities using C++} reference documentation. @@ -485,7 +487,8 @@ can be registered using qmlRegisterUncreatableType(). To be accessible from QML must begin with a capital letter. See the \l {Tutorial: Writing QML extensions with C++}{Writing QML extensions with C++} tutorial and -the \l {Extending QML in C++} reference documentation for more information. +the \l {Extending QML Functionalities using C++} reference documentation for +more information. \section2 Automatic type conversion from strings diff --git a/doc/src/declarative/qtprogrammers.qdoc b/doc/src/declarative/qtprogrammers.qdoc index 0c14093..1746c31 100644 --- a/doc/src/declarative/qtprogrammers.qdoc +++ b/doc/src/declarative/qtprogrammers.qdoc @@ -48,7 +48,8 @@ QML provides direct access to the following concepts from Qt: \o Qt models - used directly in data binding (QAbstractItemModel) \endlist -Qt knowledge is \e required for \l {Extending QML in C++}, and also for \l{Integrating QML with existing Qt UI code}. +Qt knowledge is \e required for \l {Extending QML Functionalities using C++}, +and also for \l{Integrating QML Code with existing Qt UI code}. \section1 QML Items compared with QWidgets diff --git a/doc/src/examples/qml-examples.qdoc b/doc/src/examples/qml-examples.qdoc index 0834527..9dad84a 100644 --- a/doc/src/examples/qml-examples.qdoc +++ b/doc/src/examples/qml-examples.qdoc @@ -29,7 +29,7 @@ \title Animation: Basics Example \example declarative/animation/basics - This example shows how to create and combine \l{QML Animation}{animations} in QML. + This example shows how to create and combine \l{QML Animation and Transitions}{animations} in QML. \table \row @@ -50,16 +50,16 @@ \title Animation: Behavior Examples \example declarative/animation/behaviors - This example shows how to use QML behaviors. + This example shows how to use QML behaviors. \image qml-behaviors-example.png */ /*! - \title Animation: Easing Example + \title Animation: Easing Example \example declarative/animation/easing - This example shows the different easing modes available for \l{QML Animation}{animations}. + This example shows the different easing modes available for \l{QML Animation and Transitions}{animations}. \image qml-easing-example.png */ @@ -122,9 +122,9 @@ \page declarative-cppextensions-reference.html \title C++ Extensions: Reference examples - These examples show how QML can be extended from C++ in various ways. - - The code for these examples is used throughout the \l {Extending QML in C++} reference + These examples show how QML can be extended from C++ in various ways. + + The code for these examples is used throughout the \l {Extending QML Functionalities using C++} reference documentation, which highlights the main principles demonstrated in each example. Furthermore, here are additional pages that discuss each example in detail: @@ -160,7 +160,7 @@ \title LayoutItem Example \example declarative/cppextensions/qgraphicslayouts/layoutitem - This example show how to use the LayoutItem element to integrate QML items into an existing + This example show how to use the LayoutItem element to integrate QML items into an existing \l{Graphics View Framework}{Graphics View}-based application. \image qml-layoutitem-example.png @@ -169,7 +169,7 @@ \title QGraphicsGridLayout Example \example declarative/cppextensions/qgraphicslayouts/qgraphicsgridlayout - This example shows how to use QGraphicsGridLayout to lay out QML items. This is + This example shows how to use QGraphicsGridLayout to lay out QML items. This is useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with QML. @@ -179,10 +179,10 @@ \title QGraphicsLinearLayout Example \example declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout - This example shows how to use QGraphicsLinearLayout to lay out QML items. This is + This example shows how to use QGraphicsLinearLayout to lay out QML items. This is useful if you need to integrate Qt \l{Graphics View Framework}{Graphics View} layouts with QML. - + \image qml-qgraphicslinearlayout-example.png */ /*! @@ -198,7 +198,7 @@ \o \l{declarative/cppextensions/qgraphicslayouts/qgraphicslinearlayout}{QGraphicsLinearLayout} \endlist - Also see \l {Integrating QML with existing Qt UI code} for information on using QML + Also see \l {Integrating QML Code with Existing Qt UI Code} for information on using QML in Qt applications that use the Graphics View framework or ordinary QWidget-based views. */ @@ -215,7 +215,7 @@ \title C++ Extensions: Image Provider Example \example declarative/cppextensions/imageprovider - This examples shows how to use QDeclarativeImageProvider to serve images + This examples shows how to use QDeclarativeImageProvider to serve images to QML image elements. \image qml-imageprovider-example.png @@ -525,7 +525,7 @@ \example declarative/toys/clocks This example displays a set of clocks with different times for different cities. - Each clock is created by combining \l Image elements with \l Rotation transforms + Each clock is created by combining \l Image elements with \l Rotation transforms and \l SpringAnimation behaviors. \image qml-clocks-example.png diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index e3977bb..d2fc4ea 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -631,7 +631,7 @@ Now that we have our text editor layout, we may now implement the text editor functionalities in C++. Using QML with C++ enables us to create our application logic using Qt. We can create a QML context in a C++ application using the - \l {Using QML in C++ Applications}{Qt's Declarative} classes and display the QML + \l {Using QML Bindings in C++ Applications}{Qt's Declarative} classes and display the QML elements using a Graphics Scene. Alternatively, we can export our C++ code into a plugin that the \l {QML Viewer}{qmlviewer} tool can read. For our application, we shall implement the load and save functions in C++ and export it as a plugin. diff --git a/doc/src/overviews.qdoc b/doc/src/overviews.qdoc index 5c48a33..96805d0 100644 --- a/doc/src/overviews.qdoc +++ b/doc/src/overviews.qdoc @@ -164,9 +164,32 @@ \brief Features of the QML Language - These are overviews of the many features of the QML Language. - - \generatelist {related} + These are overviews of the many features of the QML language. + + \list + \o \l{QML Syntax} + \o \l{Property Binding} + \o \l{QML Basic Types}{Data Types} + \o \l{QML Basic Elements}{Basic Elements} + \o \l{Using QML Positioner and Repeater Items}{Component Layouts} + \o \l{Anchor-based Layout in QML}{Layouts using Anchors} + \o \l{Mouse Events} + \o \l{QML Text Handling and Validators}{Text Handling and Validators} + \o \l{Keyboard Focus in QML}{Keyboard Focus} + \o \l{Importing Reusable Components} + \o \l{QML States}{States} + \o \l{QML Animation and Transitions}{Animation and Transitions} + \o \l{QML Data Models}{Structuring Data with Models} + \o \l{Presenting Data with Views} + \o \l{Extending QML Functionalities using C++} + \o \l{Using QML Bindings in C++ Applications} + \o \l{Integrating QML Code with Existing Qt UI Code} + \o \l{QML Signal and Handler Event System}{Signal and Handler Event System} + \o \l{Dynamic Object Management in QML}{Dynamic Object Management} + \o \l{Network Transparency}{Loading Resources in QML} + \o \l{QML Internationalization}{Internationalization} + \o \l{QML Graphical Effects}{Graphical Effects} + \endlist */ /*! \group qml-architecture diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index 0a03157..516f2c5 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -244,3 +244,19 @@ \externalpage http://labs.qt.nokia.com \title Qt Labs */ + +/*! + \externalpage http://doc.qt.nokia.com/qtcreator-snapshot/index.html + \title Qt Creator Manual +*/ + +/*! + \externalpage http://doc.qt.nokia.com/qtcreator-snapshot/creator-qml-application.html + \title Developing Qt Quick Applications with Creator +*/ + +/*! + \externalpage http://qt.gitorious.org/qt/pages/QtCodingStyle + \title Qt Coding Style +*/ + diff --git a/examples/declarative/ui-components/tabwidget/TabWidget.qml b/examples/declarative/ui-components/tabwidget/TabWidget.qml index 2a74c46..c8f5711 100644 --- a/examples/declarative/ui-components/tabwidget/TabWidget.qml +++ b/examples/declarative/ui-components/tabwidget/TabWidget.qml @@ -45,7 +45,7 @@ Item { // Setting the default property to stack.children means any child items // of the TabWidget are actually added to the 'stack' item's children. - // See the "Writing QML Components: Properties, Methods and Signals" + // See the "Property Binding" // documentation for details on default properties. default property alias content: stack.children diff --git a/src/declarative/graphicsitems/qdeclarativeflipable.cpp b/src/declarative/graphicsitems/qdeclarativeflipable.cpp index f118a85..48b6ba0 100644 --- a/src/declarative/graphicsitems/qdeclarativeflipable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflipable.cpp @@ -86,13 +86,13 @@ public: The following example shows a Flipable item that flips whenever it is clicked, rotating about the y-axis. - This flipable item has a \c flipped boolean property that is toggled - whenever the MouseArea within the flipable is clicked. When - \c flipped is true, the item changes to the "back" state; in this + This flipable item has a \c flipped boolean property that is toggled + whenever the MouseArea within the flipable is clicked. When + \c flipped is true, the item changes to the "back" state; in this state, the \c angle of the \l Rotation item is changed to 180 degrees to produce the flipping effect. When \c flipped is false, the - item reverts to the default state, in which the \c angle value is 0. - + item reverts to the default state, in which the \c angle value is 0. + \snippet doc/src/snippets/declarative/flipable/flipable.qml 0 \image flipable.gif @@ -103,8 +103,8 @@ public: its old and new values. See \l {QML States} for details on state changes and the default - state, and \l {QML Animation} for more information on how animations - work within transitions. + state, and \l {QML Animation and Transitions} for more information on how + animations work within transitions. \sa {declarative/ui-components/flipable}{Flipable example} */ diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 77fc925..edc7b2a 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -135,7 +135,7 @@ class QByteArray; } \endcode - \sa {Using QML in C++ Applications}, {Integrating QML with existing Qt UI code} + \sa {Using QML Bindings in C++ Applications}, {Integrating QML Code with Existing Qt UI Code} */ /*! @@ -157,7 +157,7 @@ class QByteArray; \snippet doc/src/snippets/declarative/component.qml 0 - Notice that while a \l Rectangle by itself would be automatically + Notice that while a \l Rectangle by itself would be automatically rendered and displayed, this is not the case for the above rectangle because it is defined inside a \c Component. The component encapsulates the QML elements within, as if they were defined in a separate QML @@ -227,7 +227,7 @@ class QByteArray; /*! \enum QDeclarativeComponent::Status - + Specifies the loading status of the QDeclarativeComponent. \value Null This QDeclarativeComponent has no data. Call loadUrl() or setData() to add QML content. @@ -279,8 +279,8 @@ void QDeclarativeComponentPrivate::clear() typeData->release(); typeData = 0; } - - if (cc) { + + if (cc) { cc->release(); cc = 0; } @@ -436,12 +436,12 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const Q } /*! - Create a QDeclarativeComponent from the given \a fileName and give it the specified + Create a QDeclarativeComponent from the given \a fileName and give it the specified \a parent and \a engine. \sa loadUrl() */ -QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QString &fileName, +QDeclarativeComponent::QDeclarativeComponent(QDeclarativeEngine *engine, const QString &fileName, QObject *parent) : QObject(*(new QDeclarativeComponentPrivate), parent) { @@ -480,7 +480,7 @@ void QDeclarativeComponent::setData(const QByteArray &data, const QUrl &url) d->url = url; QDeclarativeTypeData *typeData = QDeclarativeEnginePrivate::get(d->engine)->typeLoader.get(data, url); - + if (typeData->isCompleteOrError()) { d->fromTypeData(typeData); } else { @@ -615,7 +615,7 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q /*! \qmlmethod object Component::createObject(Item parent) - Creates and returns an object instance of this component that will have the given + Creates and returns an object instance of this component that will have the given \a parent. Returns null if object creation fails. The object will be created in the same context as the one in which the component @@ -623,8 +623,8 @@ QDeclarativeComponent::QDeclarativeComponent(QDeclarativeComponentPrivate &dd, Q which were not created in QML. If you wish to create an object without setting a parent, specify \c null for - the \a parent value. Note that if the returned object is to be displayed, you - must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent} + the \a parent value. Note that if the returned object is to be displayed, you + must provide a valid \a parent value or set the returned object's \l{Item::parent}{parent} property, or else the object will not be visible. Dynamically created instances can be deleted with the \c destroy() method. @@ -669,7 +669,7 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent) } } - if (needParent) + if (needParent) qWarning("QDeclarativeComponent: Created graphical object was not placed in the graphics scene."); } completeCreate(); @@ -682,7 +682,7 @@ QScriptValue QDeclarativeComponent::createObject(QObject* parent) /*! Create an object instance from this component. Returns 0 if creation failed. \a context specifies the context within which to create the object - instance. + instance. If \a context is 0 (the default), it will create the instance in the engine' s \l {QDeclarativeEngine::rootContext()}{root context}. @@ -699,7 +699,7 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context) return rv; } -QObject *QDeclarativeComponentPrivate::create(QDeclarativeContextData *context, +QObject *QDeclarativeComponentPrivate::create(QDeclarativeContextData *context, const QBitField &bindings) { if (!context) @@ -712,21 +712,21 @@ QObject *QDeclarativeComponentPrivate::create(QDeclarativeContextData *context, /*! This method provides more advanced control over component instance creation. - In general, programmers should use QDeclarativeComponent::create() to create a + In general, programmers should use QDeclarativeComponent::create() to create a component. Create an object instance from this component. Returns 0 if creation failed. \a context specifies the context within which to create the object - instance. + instance. When QDeclarativeComponent constructs an instance, it occurs in three steps: \list 1 \i The object hierarchy is created, and constant values are assigned. \i Property bindings are evaluated for the the first time. \i If applicable, QDeclarativeParserStatus::componentComplete() is called on objects. - \endlist + \endlist QDeclarativeComponent::beginCreate() differs from QDeclarativeComponent::create() in that it - only performs step 1. QDeclarativeComponent::completeCreate() must be called to + only performs step 1. QDeclarativeComponent::completeCreate() must be called to complete steps 2 and 3. This breaking point is sometimes useful when using attached properties to @@ -777,7 +777,7 @@ QDeclarativeComponentPrivate::beginCreate(QDeclarativeContextData *context, cons return begin(context, creationContext, cc, start, count, &state, 0, bindings); } -QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentContext, +QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentContext, QDeclarativeContextData *componentCreationContext, QDeclarativeCompiledData *component, int start, int count, ConstructionState *state, QList *errors, @@ -789,7 +789,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon Q_ASSERT(!isRoot || state); // Either this isn't a root component, or a state data must be provided Q_ASSERT((state != 0) ^ (errors != 0)); // One of state or errors (but not both) must be provided - if (isRoot) + if (isRoot) QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Creating); QDeclarativeContextData *ctxt = new QDeclarativeContextData; @@ -798,7 +798,7 @@ QObject * QDeclarativeComponentPrivate::begin(QDeclarativeContextData *parentCon ctxt->imports = component->importCache; // Nested global imports - if (componentCreationContext && start != -1) + if (componentCreationContext && start != -1) ctxt->importedScripts = componentCreationContext->importedScripts; component->importCache->addref(); @@ -850,7 +850,7 @@ void QDeclarativeComponentPrivate::beginDeferred(QDeclarativeEnginePrivate *engi QDeclarativeVME vme; vme.runDeferred(object); - if (vme.isError()) + if (vme.isError()) state->errors = vme.errors(); if (isRoot) { @@ -877,13 +877,13 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri if (state->completePending) { for (int ii = 0; ii < state->bindValues.count(); ++ii) { - QDeclarativeEnginePrivate::SimpleList bv = + QDeclarativeEnginePrivate::SimpleList bv = state->bindValues.at(ii); for (int jj = 0; jj < bv.count; ++jj) { if(bv.at(jj)) { // XXX akennedy bv.at(jj)->m_mePtr = 0; - bv.at(jj)->setEnabled(true, QDeclarativePropertyPrivate::BypassInterceptor | + bv.at(jj)->setEnabled(true, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } } @@ -891,7 +891,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri } for (int ii = 0; ii < state->parserStatus.count(); ++ii) { - QDeclarativeEnginePrivate::SimpleList ps = + QDeclarativeEnginePrivate::SimpleList ps = state->parserStatus.at(ii); for (int jj = ps.count - 1; jj >= 0; --jj) { @@ -942,7 +942,7 @@ void QDeclarativeComponentPrivate::complete(QDeclarativeEnginePrivate *enginePri /*! This method provides more advanced control over component instance creation. - In general, programmers should use QDeclarativeComponent::create() to create a + In general, programmers should use QDeclarativeComponent::create() to create a component. Complete a component creation begin with QDeclarativeComponent::beginCreate(). diff --git a/src/declarative/qml/qdeclarativecontext.cpp b/src/declarative/qml/qdeclarativecontext.cpp index 3ee0e6f..dff90b4 100644 --- a/src/declarative/qml/qdeclarativecontext.cpp +++ b/src/declarative/qml/qdeclarativecontext.cpp @@ -72,10 +72,10 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() Contexts allow data to be exposed to the QML components instantiated by the QML engine. - Each QDeclarativeContext contains a set of properties, distinct from its QObject - properties, that allow data to be explicitly bound to a context by name. The - context properties are defined and updated by calling - QDeclarativeContext::setContextProperty(). The following example shows a Qt model + Each QDeclarativeContext contains a set of properties, distinct from its QObject + properties, that allow data to be explicitly bound to a context by name. The + context properties are defined and updated by calling + QDeclarativeContext::setContextProperty(). The following example shows a Qt model being bound to a context and then accessed from a QML file. \code @@ -97,8 +97,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() To simplify binding and maintaining larger data sets, a context object can be set on a QDeclarativeContext. All the properties of the context object are available by name in the context, as though they were all individually added through calls - to QDeclarativeContext::setContextProperty(). Changes to the property's values are - detected through the property's notify signal. Setting a context object is both + to QDeclarativeContext::setContextProperty(). Changes to the property's values are + detected through the property's notify signal. Setting a context object is both faster and easier than manually adding and maintaing context property values. The following example has the same effect as the previous one, but it uses a context @@ -121,7 +121,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() component.create(context); \endcode - All properties added explicitly by QDeclarativeContext::setContextProperty() take + All properties added explicitly by QDeclarativeContext::setContextProperty() take precedence over the context object's properties. \section2 The Context Hierarchy @@ -147,8 +147,8 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() context2->setContextProperty("b", 15); \endcode - While QML objects instantiated in a context are not strictly owned by that - context, their bindings are. If a context is destroyed, the property bindings of + While QML objects instantiated in a context are not strictly owned by that + context, their bindings are. If a context is destroyed, the property bindings of outstanding QML objects will stop evaluating. \warning Setting the context object or adding new context properties after an object @@ -156,7 +156,7 @@ QDeclarativeContextPrivate::QDeclarativeContextPrivate() to reevaluate). Thus whenever possible you should complete "setup" of the context before using it to create any objects. - \sa {Using QML in C++ Applications} + \sa {Using QML Bindings in C++ Applications} */ /*! \internal */ @@ -223,7 +223,7 @@ QDeclarativeContext::~QDeclarativeContext() /*! Returns whether the context is valid. - To be valid, a context must have a engine, and it's contextObject(), if any, + To be valid, a context must have a engine, and it's contextObject(), if any, must not have been deleted. */ bool QDeclarativeContext::isValid() const @@ -384,7 +384,7 @@ QVariant QDeclarativeContext::contextProperty(const QString &name) const if (data->contextObject) { QObject *obj = data->contextObject; QDeclarativePropertyCache::Data local; - QDeclarativePropertyCache::Data *property = + QDeclarativePropertyCache::Data *property = QDeclarativePropertyCache::property(data->engine, obj, name, local); if (property) value = obj->metaObject()->property(property->coreIndex).read(obj); @@ -461,7 +461,7 @@ QUrl QDeclarativeContext::baseUrl() const { Q_D(const QDeclarativeContext); const QDeclarativeContextData* data = d->data; - while (data && data->url.isEmpty()) + while (data && data->url.isEmpty()) data = data->parent; if (data) @@ -515,7 +515,7 @@ QDeclarativeContextData::QDeclarativeContextData(QDeclarativeContext *ctxt) void QDeclarativeContextData::invalidate() { - while (childContexts) + while (childContexts) childContexts->invalidate(); while (componentAttached) { @@ -570,7 +570,7 @@ void QDeclarativeContextData::clearContext() void QDeclarativeContextData::destroy() { - if (linkedContext) + if (linkedContext) linkedContext->destroy(); if (engine) invalidate(); @@ -626,9 +626,9 @@ void QDeclarativeContextData::setParent(QDeclarativeContextData *p) } } -/* -Refreshes all expressions that could possibly depend on this context. Refreshing flushes all -context-tree dependent caches in the expressions, and should occur every time the context tree +/* +Refreshes all expressions that could possibly depend on this context. Refreshing flushes all +context-tree dependent caches in the expressions, and should occur every time the context tree *structure* (not values) changes. */ void QDeclarativeContextData::refreshExpressions() @@ -656,7 +656,7 @@ void QDeclarativeContextData::addObject(QObject *o) data->outerContext = this; data->nextContextObject = contextObjects; - if (data->nextContextObject) + if (data->nextContextObject) data->nextContextObject->prevContextObject = &data->nextContextObject; data->prevContextObject = &contextObjects; contextObjects = data; @@ -664,7 +664,7 @@ void QDeclarativeContextData::addObject(QObject *o) void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object::ScriptBlock &script) { - if (!engine) + if (!engine) return; QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); @@ -684,7 +684,7 @@ void QDeclarativeContextData::addImportedScript(const QDeclarativeParser::Object scriptContext->pushScope(enginePriv->contextClass->newUrlContext(url)); scriptContext->pushScope(enginePriv->globalClass->staticGlobalObject()); - + QScriptValue scope = QScriptDeclarativeClass::newStaticScopeObject(scriptEngine); scriptContext->pushScope(scope); @@ -752,7 +752,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const for (int i=0; ifindId(i); - } + } if (linkedContext) return linkedContext->findObjectId(obj); @@ -761,7 +761,7 @@ QString QDeclarativeContextData::findObjectId(const QObject *obj) const QDeclarativeContext *QDeclarativeContextData::asQDeclarativeContext() { - if (!publicContext) + if (!publicContext) publicContext = new QDeclarativeContext(this); return publicContext; } diff --git a/src/declarative/util/qdeclarativeanimation.cpp b/src/declarative/util/qdeclarativeanimation.cpp index dd7e5fd..8c3d3da 100644 --- a/src/declarative/util/qdeclarativeanimation.cpp +++ b/src/declarative/util/qdeclarativeanimation.cpp @@ -569,7 +569,7 @@ void QDeclarativeAbstractAnimation::timelineComplete() } \endcode - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativePauseAnimation::QDeclarativePauseAnimation(QObject *parent) : QDeclarativeAbstractAnimation(*(new QDeclarativePauseAnimationPrivate), parent) @@ -628,27 +628,27 @@ QAbstractAnimation *QDeclarativePauseAnimation::qtAnimation() \inherits PropertyAnimation \brief The ColorAnimation element animates changes in color values. - ColorAnimation is a specialized PropertyAnimation that defines an + ColorAnimation is a specialized PropertyAnimation that defines an animation to be applied when a color value changes. - Here is a ColorAnimation applied to the \c color property of a \l Rectangle - as a property value source. It animates the \c color property's value from + Here is a ColorAnimation applied to the \c color property of a \l Rectangle + as a property value source. It animates the \c color property's value from its current value to a value of "red", over 1000 milliseconds: \snippet doc/src/snippets/declarative/coloranimation.qml 0 Like any other animation element, a ColorAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. - - For convenience, when a ColorAnimation is used in a \l Transition, it will - animate any \c color properties that have been modified during the state - change. If a \l{PropertyAnimation::}{property} or - \l{PropertyAnimation::}{properties} are explicitly set for the animation, + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. + + For convenience, when a ColorAnimation is used in a \l Transition, it will + animate any \c color properties that have been modified during the state + change. If a \l{PropertyAnimation::}{property} or + \l{PropertyAnimation::}{properties} are explicitly set for the animation, then those are used instead. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeColorAnimation::QDeclarativeColorAnimation(QObject *parent) : QDeclarativePropertyAnimation(parent) @@ -682,10 +682,10 @@ QDeclarativeColorAnimation::~QDeclarativeColorAnimation() If the ColorAnimation is defined within a \l Transition or \l Behavior, this value defaults to the value defined in the starting state of the - \l Transition, or the current value of the property at the moment the + \l Transition, or the current value of the property at the moment the \l Behavior is triggered. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QColor QDeclarativeColorAnimation::from() const { @@ -708,7 +708,7 @@ void QDeclarativeColorAnimation::setFrom(const QColor &f) \l Transition, or the value of the property change that triggered the \l Behavior. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QColor QDeclarativeColorAnimation::to() const { @@ -875,7 +875,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() \inherits Animation \brief The PropertyAction element allows immediate property changes during animation. - PropertyAction is used to specify an immediate property change during an + PropertyAction is used to specify an immediate property change during an animation. The property change is not animated. It is useful for setting non-animated property values during an animation. @@ -886,9 +886,9 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() \snippet doc/src/snippets/declarative/propertyaction.qml standalone - PropertyAction is also useful for setting the exact point at which a property - change should occur during a \l Transition. For example, if PropertyChanges - was used in a \l State to rotate an item around a particular + PropertyAction is also useful for setting the exact point at which a property + change should occur during a \l Transition. For example, if PropertyChanges + was used in a \l State to rotate an item around a particular \l {Item::}{transformOrigin}, it might be implemented like this: \snippet doc/src/snippets/declarative/propertyaction.qml transition @@ -896,7 +896,7 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() However, with this code, the \c transformOrigin is not set until \e after the animation, as a \l State is taken to define the values at the \e end of a transition. The animation would rotate at the default \c transformOrigin, - then jump to \c Item.BottomRight. To fix this, insert a PropertyChanges + then jump to \c Item.BottomRight. To fix this, insert a PropertyChanges before the RotationAnimation begins: \qml @@ -907,13 +907,13 @@ QAbstractAnimation *QDeclarativeScriptAction::qtAnimation() } } \endqml - + This immediately sets the \c transformOrigin property to the value defined - in the end state of the \l Transition (i.e. the value defined in the + in the end state of the \l Transition (i.e. the value defined in the PropertyChanges object) so that the rotation animation begins with the correct transform origin. - \sa {QML Animation}, QtDeclarative + \sa {QML Animation and Transitions}, QtDeclarative */ QDeclarativePropertyAction::QDeclarativePropertyAction(QObject *parent) : QDeclarativeAbstractAnimation(*(new QDeclarativePropertyActionPrivate), parent) @@ -1143,25 +1143,25 @@ void QDeclarativePropertyAction::transition(QDeclarativeStateActions &actions, \inherits PropertyAnimation \brief The NumberAnimation element animates changes in qreal-type values. - NumberAnimation is a specialized PropertyAnimation that defines an + NumberAnimation is a specialized PropertyAnimation that defines an animation to be applied when a numerical value changes. - Here is a NumberAnimation applied to the \c x property of a \l Rectangle - as a property value source. It animates the \c x value from its current + Here is a NumberAnimation applied to the \c x property of a \l Rectangle + as a property value source. It animates the \c x value from its current value to a value of 50, over 1000 milliseconds: \snippet doc/src/snippets/declarative/numberanimation.qml 0 Like any other animation element, a NumberAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. Note that NumberAnimation may not animate smoothly if there are irregular changes in the number value that it is tracking. If this is the case, use SmoothedAnimation instead. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeNumberAnimation::QDeclarativeNumberAnimation(QObject *parent) : QDeclarativePropertyAnimation(parent) @@ -1205,10 +1205,10 @@ void QDeclarativeNumberAnimation::init() If the NumberAnimation is defined within a \l Transition or \l Behavior, this value defaults to the value defined in the starting state of the - \l Transition, or the current value of the property at the moment the + \l Transition, or the current value of the property at the moment the \l Behavior is triggered. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ qreal QDeclarativeNumberAnimation::from() const @@ -1231,7 +1231,7 @@ void QDeclarativeNumberAnimation::setFrom(qreal f) \l Transition, or the value of the property change that triggered the \l Behavior. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ qreal QDeclarativeNumberAnimation::to() const { @@ -1253,15 +1253,15 @@ void QDeclarativeNumberAnimation::setTo(qreal t) \inherits PropertyAnimation \brief The Vector3dAnimation element animates changes in QVector3d values. - Vector3dAnimation is a specialized PropertyAnimation that defines an + Vector3dAnimation is a specialized PropertyAnimation that defines an animation to be applied when a Vector3d value changes. Like any other animation element, a Vector3dAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeVector3dAnimation::QDeclarativeVector3dAnimation(QObject *parent) : QDeclarativePropertyAnimation(parent) @@ -1282,10 +1282,10 @@ QDeclarativeVector3dAnimation::~QDeclarativeVector3dAnimation() If the Vector3dAnimation is defined within a \l Transition or \l Behavior, this value defaults to the value defined in the starting state of the - \l Transition, or the current value of the property at the moment the + \l Transition, or the current value of the property at the moment the \l Behavior is triggered. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QVector3D QDeclarativeVector3dAnimation::from() const { @@ -1307,7 +1307,7 @@ void QDeclarativeVector3dAnimation::setFrom(QVector3D f) \l Transition, or the value of the property change that triggered the \l Behavior. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QVector3D QDeclarativeVector3dAnimation::to() const { @@ -1330,7 +1330,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) \brief The RotationAnimation element animates changes in rotation values. RotationAnimation is a specialized PropertyAnimation that gives control - over the direction of rotation during an animation. + over the direction of rotation during an animation. By default, it rotates in the direction of the numerical change; a rotation from 0 to 240 will rotate 240 degrees @@ -1346,7 +1346,7 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) Notice the RotationAnimation did not need to set a \l target value. As a convenience, when used in a transition, RotationAnimation will rotate all properties named "rotation" or "angle". You can override this by providing - your own properties via \l {PropertyAnimation::properties}{properties} or + your own properties via \l {PropertyAnimation::properties}{properties} or \l {PropertyAnimation::property}{property}. Also, note the \l Rectangle will be rotated around its default @@ -1356,11 +1356,11 @@ void QDeclarativeVector3dAnimation::setTo(QVector3D t) PropertyAction documentation for more details. Like any other animation element, a RotationAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QVariant _q_interpolateShortestRotation(qreal &f, qreal &t, qreal progress) { @@ -1431,10 +1431,10 @@ QDeclarativeRotationAnimation::~QDeclarativeRotationAnimation() If the RotationAnimation is defined within a \l Transition or \l Behavior, this value defaults to the value defined in the starting state of the - \l Transition, or the current value of the property at the moment the + \l Transition, or the current value of the property at the moment the \l Behavior is triggered. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ qreal QDeclarativeRotationAnimation::from() const { @@ -1456,7 +1456,7 @@ void QDeclarativeRotationAnimation::setFrom(qreal f) \l Transition, or the value of the property change that triggered the \l Behavior. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ qreal QDeclarativeRotationAnimation::to() const { @@ -1582,15 +1582,15 @@ QDeclarativeListProperty QDeclarativeAnimationGro if this is the preferred behavior. Like any other animation element, a SequentialAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \note Once an animation has been grouped into a SequentialAnimation or + \note Once an animation has been grouped into a SequentialAnimation or ParallelAnimation, it cannot be individually started and stopped; the SequentialAnimation or ParallelAnimation must be started and stopped as a group. - - \sa ParallelAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example} + + \sa ParallelAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeSequentialAnimation::QDeclarativeSequentialAnimation(QObject *parent) : @@ -1652,15 +1652,15 @@ void QDeclarativeSequentialAnimation::transition(QDeclarativeStateActions &actio \snippet doc/src/snippets/declarative/parallelanimation.qml 0 Like any other animation element, a ParallelAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \note Once an animation has been grouped into a SequentialAnimation or + \note Once an animation has been grouped into a SequentialAnimation or ParallelAnimation, it cannot be individually started and stopped; the SequentialAnimation or ParallelAnimation must be started and stopped as a group. - \sa SequentialAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa SequentialAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeParallelAnimation::QDeclarativeParallelAnimation(QObject *parent) : QDeclarativeAnimationGroup(parent) @@ -1755,14 +1755,14 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int \inherits Animation \brief The PropertyAnimation element animates changes in property values. - PropertyAnimation provides a way to animate changes to a property's value. + PropertyAnimation provides a way to animate changes to a property's value. It can be used to define animations in a number of ways: - + \list \o In a \l Transition - For example, to animate any objects that have changed their \c x or \c y properties + For example, to animate any objects that have changed their \c x or \c y properties as a result of a state change, using an \c InOutQuad easing curve: \snippet doc/src/snippets/declarative/propertyanimation.qml transition @@ -1802,12 +1802,12 @@ void QDeclarativePropertyAnimationPrivate::convertVariant(QVariant &variant, int Depending on how the animation is used, the set of properties normally used will be different. For more information see the individual property documentation, as well - as the \l{QML Animation} introduction. + as the \l{QML Animation and Transitions} introduction. Note that PropertyAnimation inherits the abstract \l Animation element. This includes additional properties and methods for controlling the animation. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativePropertyAnimation::QDeclarativePropertyAnimation(QObject *parent) @@ -1867,10 +1867,10 @@ void QDeclarativePropertyAnimation::setDuration(int duration) If the PropertyAnimation is defined within a \l Transition or \l Behavior, this value defaults to the value defined in the starting state of the - \l Transition, or the current value of the property at the moment the + \l Transition, or the current value of the property at the moment the \l Behavior is triggered. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QVariant QDeclarativePropertyAnimation::from() const { @@ -1897,7 +1897,7 @@ void QDeclarativePropertyAnimation::setFrom(const QVariant &f) \l Transition, or the value of the property change that triggered the \l Behavior. - \sa {QML Animation} + \sa {QML Animation and Transitions} */ QVariant QDeclarativePropertyAnimation::to() const { @@ -2264,7 +2264,7 @@ void QDeclarativePropertyAnimation::setProperties(const QString &prop) As seen in the above example, properties is specified as a comma-separated string of property names to animate. - \sa exclude, {QML Animation} + \sa exclude, {QML Animation and Transitions} */ QDeclarativeListProperty QDeclarativePropertyAnimation::targets() { @@ -2447,7 +2447,7 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions ParentAnimation is used to animate a parent change for an \l Item. For example, the following ParentChange changes \c blueRect to become - a child of \c redRect when it is clicked. The inclusion of the + a child of \c redRect when it is clicked. The inclusion of the ParentAnimation, which defines a NumberAnimation to be applied during the transition, ensures the item animates smoothly as it moves to its new parent: @@ -2462,17 +2462,17 @@ void QDeclarativePropertyAnimation::transition(QDeclarativeStateActions &actions to animate the parent change via another item that does not have clipping enabled. Such an item can be set using the \l via property. - For convenience, when a ParentAnimation is used in a \l Transition, it will - animate any ParentChange that has occurred during the state change. + For convenience, when a ParentAnimation is used in a \l Transition, it will + animate any ParentChange that has occurred during the state change. This can be overridden by setting a specific target item using the \l target property. Like any other animation element, a ParentAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeParentAnimation::QDeclarativeParentAnimation(QObject *parent) : QDeclarativeAnimationGroup(*(new QDeclarativeParentAnimationPrivate), parent) @@ -2803,23 +2803,23 @@ QAbstractAnimation *QDeclarativeParentAnimation::qtAnimation() \inherits Animation \brief The AnchorAnimation element animates changes in anchor values. - AnchorAnimation is used to animate an anchor change. + AnchorAnimation is used to animate an anchor change. In the following snippet we animate the addition of a right anchor to a \l Rectangle: \snippet doc/src/snippets/declarative/anchoranimation.qml 0 - For convenience, when an AnchorAnimation is used in a \l Transition, it will - animate any AnchorChanges that have occurred during the state change. + For convenience, when an AnchorAnimation is used in a \l Transition, it will + animate any AnchorChanges that have occurred during the state change. This can be overridden by setting a specific target item using the \l target property. Like any other animation element, an AnchorAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa {QML Animation}, AnchorChanges + \sa {QML Animation and Transitions}, AnchorChanges */ QDeclarativeAnchorAnimation::QDeclarativeAnchorAnimation(QObject *parent) diff --git a/src/declarative/util/qdeclarativebehavior.cpp b/src/declarative/util/qdeclarativebehavior.cpp index f1b6f9a..45257de 100644 --- a/src/declarative/util/qdeclarativebehavior.cpp +++ b/src/declarative/util/qdeclarativebehavior.cpp @@ -76,7 +76,7 @@ public: \since 4.7 \brief The Behavior element allows you to specify a default animation for a property change. - A Behavior defines the default animation to be applied whenever a + A Behavior defines the default animation to be applied whenever a particular property value changes. For example, the following Behavior defines a NumberAnimation to be run @@ -93,7 +93,7 @@ public: Behavior, the \l Transition animation overrides the Behavior for that state change. - \sa {QML Animation}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative + \sa {QML Animation and Transitions}, {declarative/animation/behaviors}{Behavior example}, QtDeclarative */ @@ -205,7 +205,7 @@ void QDeclarativeBehavior::write(const QVariant &value) d->animation->qtAnimation()->start(); d->blockRunningChanged = false; if (!after.contains(d->property)) - QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); + QDeclarativePropertyPrivate::write(d->property, value, QDeclarativePropertyPrivate::BypassInterceptor | QDeclarativePropertyPrivate::DontRemoveBinding); } void QDeclarativeBehavior::setTarget(const QDeclarativeProperty &property) diff --git a/src/declarative/util/qdeclarativesmoothedanimation.cpp b/src/declarative/util/qdeclarativesmoothedanimation.cpp index ca83c52..da4c707 100644 --- a/src/declarative/util/qdeclarativesmoothedanimation.cpp +++ b/src/declarative/util/qdeclarativesmoothedanimation.cpp @@ -257,8 +257,8 @@ void QSmoothedAnimation::init() A SmoothedAnimation animates a property's value to a set target value using an ease in/out quad easing curve. When the target value changes, - the easing curves used to animate between the old and new target values - are smoothly spliced together to create a smooth movement to the new + the easing curves used to animate between the old and new target values + are smoothly spliced together to create a smooth movement to the new target value that maintains the current velocity. The follow example shows one \l Rectangle tracking the position of another @@ -288,11 +288,11 @@ void QSmoothedAnimation::init() of 0.5 will take 2000 ms to complete. Like any other animation element, a SmoothedAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa SpringAnimation, NumberAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example} + \sa SpringAnimation, NumberAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example} */ QDeclarativeSmoothedAnimation::QDeclarativeSmoothedAnimation(QObject *parent) diff --git a/src/declarative/util/qdeclarativespringanimation.cpp b/src/declarative/util/qdeclarativespringanimation.cpp index e0fc45d..ccebe82 100644 --- a/src/declarative/util/qdeclarativespringanimation.cpp +++ b/src/declarative/util/qdeclarativespringanimation.cpp @@ -246,19 +246,19 @@ void QDeclarativeSpringAnimationPrivate::updateMode() You can also limit the maximum \l velocity of the animation. - The following \l Rectangle moves to the position of the mouse using a + The following \l Rectangle moves to the position of the mouse using a SpringAnimation when the mouse is clicked. The use of the \l Behavior - on the \c x and \c y values indicates that whenever these values are + on the \c x and \c y values indicates that whenever these values are changed, a SpringAnimation should be applied. \snippet doc/src/snippets/declarative/springanimation.qml 0 Like any other animation element, a SpringAnimation can be applied in a - number of ways, including transitions, behaviors and property value - sources. The \l {QML Animation} documentation shows a variety of methods - for creating animations. + number of ways, including transitions, behaviors and property value + sources. The \l {QML Animation and Transitions} documentation shows a + variety of methods for creating animations. - \sa SmoothedAnimation, {QML Animation}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example} + \sa SmoothedAnimation, {QML Animation and Transitions}, {declarative/animation/basics}{Animation basics example}, {declarative/toys/clocks}{Clocks example} */ QDeclarativeSpringAnimation::QDeclarativeSpringAnimation(QObject *parent) @@ -299,7 +299,7 @@ void QDeclarativeSpringAnimation::setVelocity(qreal velocity) This property describes how strongly the target is pulled towards the source. The default value is 0 (that is, the spring-like motion is disabled). - + The useful value range is 0 - 5.0. When this property is set and the \l velocity value is greater than 0, @@ -394,9 +394,9 @@ void QDeclarativeSpringAnimation::setModulus(qreal modulus) \qmlproperty real SpringAnimation::mass This property holds the "mass" of the property being moved. - The value is 1.0 by default. - - A greater mass causes slower movement and a greater spring-like + The value is 1.0 by default. + + A greater mass causes slower movement and a greater spring-like motion when an item comes to rest. */ qreal QDeclarativeSpringAnimation::mass() const diff --git a/src/declarative/util/qdeclarativetransition.cpp b/src/declarative/util/qdeclarativetransition.cpp index c8bc7b3..49f0000 100644 --- a/src/declarative/util/qdeclarativetransition.cpp +++ b/src/declarative/util/qdeclarativetransition.cpp @@ -60,24 +60,24 @@ QT_BEGIN_NAMESPACE A Transition defines the animations to be applied when a \l State change occurs. For example, the following \l Rectangle has two states: the default state, and - an added "moved" state. In the "moved state, the rectangle's position changes + an added "moved" state. In the "moved state, the rectangle's position changes to (50, 50). The added Transition specifies that when the rectangle changes between the default and the "moved" state, any changes to the \c x and \c y properties should be animated, using an \c Easing.InOutQuad. \snippet doc/src/snippets/declarative/transition.qml 0 - Notice the example does not require \l{PropertyAnimation::}{to} and + Notice the example does not require \l{PropertyAnimation::}{to} and \l{PropertyAnimation::}{from} values for the NumberAnimation. As a convenience, these properties are automatically set to the values of \c x and \c y before and after the state change; the \c from values are provided by the current values of \c x and \c y, and the \c to values are provided by - the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and + the PropertyChanges object. If you wish, you can provide \l{PropertyAnimation::}{to} and \l{PropertyAnimation::}{from} values anyway to override the default values. - By default, a Transition's animations are applied for any state change in the - parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to} - values can be set to restrict the animations to only be applied when changing + By default, a Transition's animations are applied for any state change in the + parent item. The Transition \l {Transition::}{from} and \l {Transition::}{to} + values can be set to restrict the animations to only be applied when changing from one particular state to another. To define multiple transitions, specify \l Item::transitions as a list: @@ -100,7 +100,7 @@ QT_BEGIN_NAMESPACE \l Behavior, the Transition animation overrides the \l Behavior for that state change. - \sa {QML Animation}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative} + \sa {QML Animation and Transitions}, {declarative/animation/states}{states example}, {qmlstates}{States}, {QtDeclarative} */ //ParallelAnimationWrapper allows us to do a "callback" when the animation finishes, rather than connecting @@ -119,8 +119,8 @@ class QDeclarativeTransitionPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeTransition) public: - QDeclarativeTransitionPrivate() - : fromState(QLatin1String("*")), toState(QLatin1String("*")), + QDeclarativeTransitionPrivate() + : fromState(QLatin1String("*")), toState(QLatin1String("*")), reversed(false), reversible(false), endState(0) { group.trans = this; @@ -223,7 +223,7 @@ void QDeclarativeTransition::prepare(QDeclarativeStateOperation::ActionList &act If the transition was changed to this: \qml - transitions: Transition { + transitions: Transition { to: "brighter" ColorAnimation { duration: 1000 } } @@ -263,7 +263,7 @@ void QDeclarativeTransition::setFromState(const QString &f) is reversed, and it is not necessary to set this property to reverse the transition. - However, if a SequentialAnimation is used, or if the \l from or \l to + However, if a SequentialAnimation is used, or if the \l from or \l to properties have been set, this property will need to be set to reverse a transition when a state change is reverted. For example, the following transition applies a sequential animation when the mouse is pressed, @@ -271,7 +271,7 @@ void QDeclarativeTransition::setFromState(const QString &f) \snippet doc/src/snippets/declarative/transition-reversible.qml 0 - If the transition did not set the \c to and \c reversible values, then + If the transition did not set the \c to and \c reversible values, then on the mouse release, the transition would play the PropertyAnimation before the ColorAnimation instead of reversing the sequence. */ diff --git a/src/declarative/util/qdeclarativeview.cpp b/src/declarative/util/qdeclarativeview.cpp index c22f200..e1cf6d7 100644 --- a/src/declarative/util/qdeclarativeview.cpp +++ b/src/declarative/util/qdeclarativeview.cpp @@ -195,9 +195,9 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, \since 4.7 \brief The QDeclarativeView class provides a widget for displaying a Qt Declarative user interface. - QDeclarativeItem objects can be placed on a standard QGraphicsScene and - displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass - provided as a convenience for displaying QML files, and connecting between + QDeclarativeItem objects can be placed on a standard QGraphicsScene and + displayed with QGraphicsView. QDeclarativeView is a QGraphicsView subclass + provided as a convenience for displaying QML files, and connecting between QML and C++ Qt objects. QDeclarativeView provides: @@ -234,7 +234,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, you can connect to the statusChanged() signal and monitor for QDeclarativeView::Error. The errors are available via QDeclarativeView::errors(). - \sa {Integrating QML with existing Qt UI code}, {Using QML in C++ Applications} + \sa {Integrating QML Code with Existing Qt UI Code}, {Using QML Bindings in C++ Applications} */ @@ -248,7 +248,7 @@ void QDeclarativeViewPrivate::itemGeometryChanged(QDeclarativeItem *resizeItem, /*! \fn QDeclarativeView::QDeclarativeView(QWidget *parent) - + Constructs a QDeclarativeView with the given \a parent. */ QDeclarativeView::QDeclarativeView(QWidget *parent) @@ -695,7 +695,7 @@ void QDeclarativeView::paintEvent(QPaintEvent *event) QDeclarativeDebugTrace::startRange(QDeclarativeDebugTrace::Painting); int time = 0; - if (frameRateDebug()) + if (frameRateDebug()) time = d->frameTimer.restart(); #ifdef Q_WS_MAC -- cgit v0.12 From 7d2dc192477c0d10b2c5c9f144e2a37a270093f0 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 21 Dec 2010 10:57:44 +1000 Subject: Add tests for ListView.indexAt() and GridView.IndexAt() --- .../tst_qdeclarativegridview.cpp | 37 ++++++++++++++++++++++ .../tst_qdeclarativelistview.cpp | 33 +++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index fd5d140..a2dcf1c 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -84,6 +84,7 @@ private slots: void manualHighlight(); void footer(); void header(); + void indexAt(); private: QDeclarativeView *createView(); @@ -1299,6 +1300,42 @@ void tst_QDeclarativeGridView::header() QTRY_COMPARE(header->y(), 0.0); } +void tst_QDeclarativeGridView::indexAt() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + model.addItem("Fred", "12345"); + model.addItem("John", "2345"); + model.addItem("Bob", "54321"); + model.addItem("Billy", "22345"); + model.addItem("Sam", "2945"); + model.addItem("Ben", "04321"); + model.addItem("Jim", "0780"); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + ctxt->setContextProperty("testTopToBottom", QVariant(false)); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview1.qml")); + qApp->processEvents(); + + QDeclarativeGridView *gridview = findItem(canvas->rootObject(), "grid"); + QTRY_VERIFY(gridview != 0); + + QDeclarativeItem *contentItem = gridview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + QTRY_COMPARE(gridview->count(), model.count()); + + QCOMPARE(gridview->indexAt(0, 0), 0); + QCOMPARE(gridview->indexAt(79, 59), 0); + QCOMPARE(gridview->indexAt(80, 0), 1); + QCOMPARE(gridview->indexAt(0, 60), 3); + QCOMPARE(gridview->indexAt(240, 0), -1); + + delete canvas; +} QDeclarativeView *tst_QDeclarativeGridView::createView() { diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index b834d46..3df10a9 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -105,6 +105,7 @@ private slots: void QTBUG_14821(); void resizeDelegate(); void QTBUG_16037(); + void indexAt(); private: template void items(); @@ -1964,6 +1965,38 @@ void tst_QDeclarativeListView::QTBUG_16037() delete canvas; } +void tst_QDeclarativeListView::indexAt() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 30; i++) + model.addItem("Item" + QString::number(i), ""); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/listviewtest.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = findItem(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + QCOMPARE(listview->indexAt(0,0), 0); + QCOMPARE(listview->indexAt(0,19), 0); + QCOMPARE(listview->indexAt(239,19), 0); + QCOMPARE(listview->indexAt(0,20), 1); + QCOMPARE(listview->indexAt(240,20), -1); + + delete canvas; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From bc679ceb8ad36de1da696f7f67e71145ceec7f98 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Tue, 21 Dec 2010 11:11:59 +1000 Subject: More testing for KeyNavigation attached properties. --- .../qdeclarativeitem/data/keynavigationtest.qml | 40 ++++++++++++++++++++++ .../qdeclarativeitem/tst_qdeclarativeitem.cpp | 5 +++ 2 files changed, 45 insertions(+) diff --git a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml index 229f969..f614a12 100644 --- a/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml +++ b/tests/auto/declarative/qdeclarativeitem/data/keynavigationtest.qml @@ -3,6 +3,46 @@ import QtQuick 1.0 Grid { columns: 2 width: 100; height: 100 + function verify() { + if (item1.KeyNavigation.right != item2) + return false; + if (item1.KeyNavigation.down != item3) + return false; + if (item1.KeyNavigation.tab != item2) + return false; + if (item1.KeyNavigation.backtab != item4) + return false; + + if (item2.KeyNavigation.left != item1) + return false; + if (item2.KeyNavigation.down != item4) + return false; + if (item2.KeyNavigation.tab != item3) + return false; + if (item2.KeyNavigation.backtab != item1) + return false; + + if (item3.KeyNavigation.right != item4) + return false; + if (item3.KeyNavigation.up != item1) + return false; + if (item3.KeyNavigation.tab != item4) + return false; + if (item3.KeyNavigation.backtab != item2) + return false; + + if (item4.KeyNavigation.left != item3) + return false; + if (item4.KeyNavigation.up != item2) + return false; + if (item4.KeyNavigation.tab != item1) + return false; + if (item4.KeyNavigation.backtab != item3) + return false; + + return true; + } + Rectangle { id: item1 objectName: "item1" diff --git a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp index 711bf00..0ebb8b7 100644 --- a/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp +++ b/tests/auto/declarative/qdeclarativeitem/tst_qdeclarativeitem.cpp @@ -393,6 +393,11 @@ void tst_QDeclarativeItem::keyNavigation() QVERIFY(item); QVERIFY(item->hasActiveFocus()); + QVariant result; + QVERIFY(QMetaObject::invokeMethod(canvas->rootObject(), "verify", + Q_RETURN_ARG(QVariant, result))); + QVERIFY(result.toBool()); + // right QKeyEvent key(QEvent::KeyPress, Qt::Key_Right, Qt::NoModifier, "", false, 1); QApplication::sendEvent(canvas, &key); -- cgit v0.12 From 1476bf8d45b4f1ab6c56770939eb81c4c1b390ad Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Mon, 20 Dec 2010 14:29:19 +1000 Subject: Optimize name lookup for QDeclarativeProperty. If the property is constructed by passing in the property name (and we've verified that it is valid), we can cache that name immediately rather than reconstructing it on the first call to name(). Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- src/declarative/qml/qdeclarativeproperty.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 60edd64..8eaa98b 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -315,6 +315,8 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name if (property && !(property->flags & QDeclarativePropertyCache::Data::IsFunction)) { object = currentObject; core = *property; + nameCache = terminal; + isNameCached = true; } } -- cgit v0.12 From a764a0b5d66e13fb69a5b69330c5edfecf89ee8b Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 21 Dec 2010 08:53:00 +1000 Subject: Optimize QByteArray to QString conversion in PropertyChanges. Perform the conversion once at compile time, rather than many times later. Task-number: QTBUG-15331 Reviewed-by: Martin Jones --- .../util/qdeclarativepropertychanges.cpp | 72 +++++++++++----------- .../util/qdeclarativepropertychanges_p.h | 18 +++--- src/declarative/util/qdeclarativestate.cpp | 24 ++++---- src/declarative/util/qdeclarativestate_p.h | 12 ++-- 4 files changed, 62 insertions(+), 64 deletions(-) diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 400803e..6737382 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -220,12 +220,12 @@ public: void decode(); - QList > properties; - QList > expressions; + QList > properties; + QList > expressions; QList ids; QList signalReplacements; - QDeclarativeProperty property(const QByteArray &); + QDeclarativeProperty property(const QString &); }; void @@ -293,7 +293,7 @@ QDeclarativePropertyChangesParser::compile(const QList> count; for (int ii = 0; ii < count; ++ii) { - QByteArray name; + QString name; bool isScript; QVariant data; QDeclarativeBinding::Identifier id; @@ -405,15 +405,15 @@ void QDeclarativePropertyChanges::setRestoreEntryValues(bool v) } QDeclarativeProperty -QDeclarativePropertyChangesPrivate::property(const QByteArray &property) +QDeclarativePropertyChangesPrivate::property(const QString &property) { Q_Q(QDeclarativePropertyChanges); - QDeclarativeProperty prop(object, QString::fromUtf8(property), qmlContext(q)); + QDeclarativeProperty prop(object, property, qmlContext(q)); if (!prop.isValid()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(QString::fromUtf8(property)); + qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to non-existent property \"%1\"").arg(property); return QDeclarativeProperty(); } else if (!(prop.type() & QDeclarativeProperty::SignalProperty) && !prop.isWritable()) { - qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(QString::fromUtf8(property)); + qmlInfo(q) << QDeclarativePropertyChanges::tr("Cannot assign to read-only property \"%1\"").arg(property); return QDeclarativeProperty(); } return prop; @@ -429,9 +429,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->properties.count(); ++ii) { - QByteArray property = d->properties.at(ii).first; - - QDeclarativeAction a(d->object, QString::fromUtf8(property), + QDeclarativeAction a(d->object, d->properties.at(ii).first, qmlContext(this), d->properties.at(ii).second); if (a.property.isValid()) { @@ -453,7 +451,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->expressions.count(); ++ii) { - QByteArray property = d->expressions.at(ii).first; + const QString &property = d->expressions.at(ii).first; QDeclarativeProperty prop = d->property(property); if (prop.isValid()) { @@ -462,7 +460,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.property = prop; a.fromValue = a.property.read(); a.specifiedObject = d->object; - a.specifiedProperty = QString::fromUtf8(property); + a.specifiedProperty = property; if (d->isExplicit) { a.toValue = d->expressions.at(ii).second->evaluate(); @@ -518,10 +516,10 @@ void QDeclarativePropertyChanges::setIsExplicit(bool e) d->isExplicit = e; } -bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsValue(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; + typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -534,10 +532,10 @@ bool QDeclarativePropertyChanges::containsValue(const QByteArray &name) const return false; } -bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsExpression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QPair ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -550,16 +548,16 @@ bool QDeclarativePropertyChanges::containsExpression(const QByteArray &name) con return false; } -bool QDeclarativePropertyChanges::containsProperty(const QByteArray &name) const +bool QDeclarativePropertyChanges::containsProperty(const QString &name) const { return containsValue(name) || containsExpression(name); } -void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVariant &value) +void QDeclarativePropertyChanges::changeValue(const QString &name, const QVariant &value) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -596,7 +594,7 @@ void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVar action.property = d->property(name); action.fromValue = action.property.read(); action.specifiedObject = object(); - action.specifiedProperty = QString::fromUtf8(name); + action.specifiedProperty = name; action.toValue = value; propertyIterator.insert(PropertyEntry(name, value)); @@ -609,11 +607,11 @@ void QDeclarativePropertyChanges::changeValue(const QByteArray &name, const QVar } } -void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const QString &expression) +void QDeclarativePropertyChanges::changeExpression(const QString &name, const QString &expression) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; bool hadValue = false; @@ -667,7 +665,7 @@ void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const action.property = d->property(name); action.fromValue = action.property.read(); action.specifiedObject = object(); - action.specifiedProperty = QString::fromUtf8(name); + action.specifiedProperty = name; if (d->isExplicit) { @@ -690,11 +688,11 @@ void QDeclarativePropertyChanges::changeExpression(const QByteArray &name, const // what about the signal handler? } -QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const +QVariant QDeclarativePropertyChanges::property(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -715,11 +713,11 @@ QVariant QDeclarativePropertyChanges::property(const QByteArray &name) const return QVariant(); } -void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) +void QDeclarativePropertyChanges::removeProperty(const QString &name) { Q_D(QDeclarativePropertyChanges); - typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QPair PropertyEntry; + typedef QPair ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { @@ -742,10 +740,10 @@ void QDeclarativePropertyChanges::removeProperty(const QByteArray &name) } } -QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const +QVariant QDeclarativePropertyChanges::value(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair PropertyEntry; + typedef QPair PropertyEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -758,10 +756,10 @@ QVariant QDeclarativePropertyChanges::value(const QByteArray &name) const return QVariant(); } -QString QDeclarativePropertyChanges::expression(const QByteArray &name) const +QString QDeclarativePropertyChanges::expression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QPair ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { diff --git a/src/declarative/util/qdeclarativepropertychanges_p.h b/src/declarative/util/qdeclarativepropertychanges_p.h index 449574c..1a98cec 100644 --- a/src/declarative/util/qdeclarativepropertychanges_p.h +++ b/src/declarative/util/qdeclarativepropertychanges_p.h @@ -75,19 +75,19 @@ public: 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; + bool containsProperty(const QString &name) const; + bool containsValue(const QString &name) const; + bool containsExpression(const QString &name) const; + void changeValue(const QString &name, const QVariant &value); + void changeExpression(const QString &name, const QString &expression); + void removeProperty(const QString &name); + QVariant value(const QString &name) const; + QString expression(const QString &name) const; void detachFromState(); void attachToState(); - QVariant property(const QByteArray &name) const; + QVariant property(const QString &name) const; }; class QDeclarativePropertyChangesParser : public QDeclarativeCustomParser diff --git a/src/declarative/util/qdeclarativestate.cpp b/src/declarative/util/qdeclarativestate.cpp index 6925e03..cde6f00 100644 --- a/src/declarative/util/qdeclarativestate.cpp +++ b/src/declarative/util/qdeclarativestate.cpp @@ -370,7 +370,7 @@ void QDeclarativeAction::deleteFromBinding() } } -bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByteArray &name) const +bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -379,7 +379,7 @@ bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByt while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return true; } } @@ -387,7 +387,7 @@ bool QDeclarativeState::containsPropertyInRevertList(QObject *target, const QByt return false; } -bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArray &name, const QVariant &revertValue) +bool QDeclarativeState::changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue) { Q_D(QDeclarativeState); @@ -396,7 +396,7 @@ bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArra while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { simpleAction.setValue(revertValue); return true; } @@ -406,7 +406,7 @@ bool QDeclarativeState::changeValueInRevertList(QObject *target, const QByteArra return false; } -bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteArray &name, QDeclarativeAbstractBinding *binding) +bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding) { Q_D(QDeclarativeState); @@ -415,7 +415,7 @@ bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteAr while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) { + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) { if (simpleAction.binding()) simpleAction.binding()->destroy(); @@ -428,7 +428,7 @@ bool QDeclarativeState::changeBindingInRevertList(QObject *target, const QByteAr return false; } -bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteArray &name) +bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QString &name) { Q_D(QDeclarativeState); @@ -437,7 +437,7 @@ bool QDeclarativeState::removeEntryFromRevertList(QObject *target, const QByteAr while (revertListIterator.hasNext()) { QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.property().object() == target && simpleAction.property().name().toUtf8() == name) { + if (simpleAction.property().object() == target && simpleAction.property().name() == name) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(simpleAction.property()); if (oldBinding) { QDeclarativePropertyPrivate::setBinding(simpleAction.property(), 0); @@ -517,7 +517,7 @@ void QDeclarativeState::addEntriesToRevertList(const QList & } } -QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray &name) const +QVariant QDeclarativeState::valueInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -526,7 +526,7 @@ QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.value(); } } @@ -534,7 +534,7 @@ QVariant QDeclarativeState::valueInRevertList(QObject *target, const QByteArray return QVariant(); } -QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QByteArray &name) const +QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *target, const QString &name) const { Q_D(const QDeclarativeState); @@ -543,7 +543,7 @@ QDeclarativeAbstractBinding *QDeclarativeState::bindingInRevertList(QObject *tar while (revertListIterator.hasNext()) { const QDeclarativeSimpleAction &simpleAction = revertListIterator.next(); - if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty().toUtf8() == name) + if (simpleAction.specifiedObject() == target && simpleAction.specifiedProperty() == name) return simpleAction.binding(); } } diff --git a/src/declarative/util/qdeclarativestate_p.h b/src/declarative/util/qdeclarativestate_p.h index 7b9c18a..dd43a50 100644 --- a/src/declarative/util/qdeclarativestate_p.h +++ b/src/declarative/util/qdeclarativestate_p.h @@ -180,15 +180,15 @@ 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); + bool containsPropertyInRevertList(QObject *target, const QString &name) const; + bool changeValueInRevertList(QObject *target, const QString &name, const QVariant &revertValue); + bool changeBindingInRevertList(QObject *target, const QString &name, QDeclarativeAbstractBinding *binding); + bool removeEntryFromRevertList(QObject *target, const QString &name); void addEntryToRevertList(const QDeclarativeAction &action); void removeAllEntriesFromRevertList(QObject *target); void addEntriesToRevertList(const QList &actions); - QVariant valueInRevertList(QObject *target, const QByteArray &name) const; - QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QByteArray &name) const; + QVariant valueInRevertList(QObject *target, const QString &name) const; + QDeclarativeAbstractBinding *bindingInRevertList(QObject *target, const QString &name) const; bool isStateActive() const; -- cgit v0.12 From 3468ee1a47bc646fe2af5de38425ee917ea92f59 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 21 Dec 2010 13:52:44 +1000 Subject: Fix potential crash in PropertyChanges binding rewrite handling. This fixes the autotest regression for tst_qdeclarativestates::editProperties introduced by 488e616b50707e5b37162e6d0cfc71a1ffdf9bef. Reviewed-by: Joona Petrell --- src/declarative/qml/qdeclarativebinding.cpp | 5 ++ src/declarative/qml/qdeclarativebinding_p.h | 1 + .../util/qdeclarativepropertychanges.cpp | 63 ++++++++++++---------- 3 files changed, 42 insertions(+), 27 deletions(-) diff --git a/src/declarative/qml/qdeclarativebinding.cpp b/src/declarative/qml/qdeclarativebinding.cpp index 1ead6ce..223d057 100644 --- a/src/declarative/qml/qdeclarativebinding.cpp +++ b/src/declarative/qml/qdeclarativebinding.cpp @@ -209,6 +209,8 @@ void QDeclarativeAbstractBinding::setEnabled(bool enabled, QDeclarativePropertyP if (enabled) update(flags); } +QDeclarativeBinding::Identifier QDeclarativeBinding::Invalid = -1; + void QDeclarativeBindingPrivate::refresh() { Q_Q(QDeclarativeBinding); @@ -238,6 +240,9 @@ QDeclarativeBinding * QDeclarativeBinding::createBinding(Identifier id, QObject *obj, QDeclarativeContext *ctxt, const QString &url, int lineNumber, QObject *parent) { + if (id < 0) + return 0; + QDeclarativeContextData *ctxtdata = QDeclarativeContextData::get(ctxt); QDeclarativeEnginePrivate *engine = QDeclarativeEnginePrivate::get(qmlEngine(obj)); diff --git a/src/declarative/qml/qdeclarativebinding_p.h b/src/declarative/qml/qdeclarativebinding_p.h index 787a3b9..69931d9 100644 --- a/src/declarative/qml/qdeclarativebinding_p.h +++ b/src/declarative/qml/qdeclarativebinding_p.h @@ -163,6 +163,7 @@ public: virtual QString expression() const; typedef int Identifier; + static Identifier Invalid; static QDeclarativeBinding *createBinding(Identifier, QObject *, QDeclarativeContext *, const QString &, int, QObject *parent=0); public Q_SLOTS: diff --git a/src/declarative/util/qdeclarativepropertychanges.cpp b/src/declarative/util/qdeclarativepropertychanges.cpp index 6737382..47f03a1 100644 --- a/src/declarative/util/qdeclarativepropertychanges.cpp +++ b/src/declarative/util/qdeclarativepropertychanges.cpp @@ -220,9 +220,19 @@ public: void decode(); + class ExpressionChange { + public: + ExpressionChange(const QString &_name, + QDeclarativeBinding::Identifier _id, + QDeclarativeExpression *_expr) + : name(_name), id(_id), expression(_expr) {} + QString name; + QDeclarativeBinding::Identifier id; + QDeclarativeExpression *expression; + }; + QList > properties; - QList > expressions; - QList ids; + QList expressions; QList signalReplacements; QDeclarativeProperty property(const QString &); @@ -315,7 +325,7 @@ void QDeclarativePropertyChangesPrivate::decode() QString name; bool isScript; QVariant data; - QDeclarativeBinding::Identifier id; + QDeclarativeBinding::Identifier id = QDeclarativeBinding::Invalid; ds >> name; ds >> isScript; ds >> data; @@ -337,8 +347,7 @@ void QDeclarativePropertyChangesPrivate::decode() QDeclarativeData *ddata = QDeclarativeData::get(q); if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); - expressions << qMakePair(name, expression); - ids << id; + expressions << ExpressionChange(name, id, expression); } else { properties << qMakePair(name, data); } @@ -366,7 +375,7 @@ QDeclarativePropertyChanges::~QDeclarativePropertyChanges() { Q_D(QDeclarativePropertyChanges); for(int ii = 0; ii < d->expressions.count(); ++ii) - delete d->expressions.at(ii).second; + delete d->expressions.at(ii).expression; for(int ii = 0; ii < d->signalReplacements.count(); ++ii) delete d->signalReplacements.at(ii); } @@ -451,7 +460,7 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() for (int ii = 0; ii < d->expressions.count(); ++ii) { - const QString &property = d->expressions.at(ii).first; + const QString &property = d->expressions.at(ii).name; QDeclarativeProperty prop = d->property(property); if (prop.isValid()) { @@ -463,12 +472,12 @@ QDeclarativePropertyChanges::ActionList QDeclarativePropertyChanges::actions() a.specifiedProperty = property; if (d->isExplicit) { - a.toValue = d->expressions.at(ii).second->evaluate(); + a.toValue = d->expressions.at(ii).expression->evaluate(); } else { - QDeclarativeExpression *e = d->expressions.at(ii).second; + QDeclarativeExpression *e = d->expressions.at(ii).expression; - QDeclarativeBinding::Identifier id = d->ids.at(ii); - QDeclarativeBinding *newBinding = QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()); + QDeclarativeBinding::Identifier id = d->expressions.at(ii).id; + QDeclarativeBinding *newBinding = id != QDeclarativeBinding::Invalid ? QDeclarativeBinding::createBinding(id, object(), qmlContext(this), e->sourceFile(), e->lineNumber()) : 0; if (!newBinding) { newBinding = new QDeclarativeBinding(e->expression(), object(), qmlContext(this)); newBinding->setSourceLocation(e->sourceFile(), e->lineNumber()); @@ -535,12 +544,12 @@ bool QDeclarativePropertyChanges::containsValue(const QString &name) const bool QDeclarativePropertyChanges::containsExpression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { return true; } } @@ -557,12 +566,12 @@ void QDeclarativePropertyChanges::changeValue(const QString &name, const QVarian { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { expressionIterator.remove(); if (state() && state()->isStateActive()) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); @@ -611,7 +620,7 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; bool hadValue = false; @@ -628,8 +637,8 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - entry.second->setExpression(expression); + if (entry.name == name) { + entry.expression->setExpression(expression); if (state() && state()->isStateActive()) { QDeclarativeAbstractBinding *oldBinding = QDeclarativePropertyPrivate::binding(d->property(name)); if (oldBinding) { @@ -646,7 +655,7 @@ void QDeclarativePropertyChanges::changeExpression(const QString &name, const QS } QDeclarativeExpression *newExpression = new QDeclarativeExpression(qmlContext(this), d->object, expression); - expressionIterator.insert(ExpressionEntry(name, newExpression)); + expressionIterator.insert(ExpressionEntry(name, QDeclarativeBinding::Invalid, newExpression)); if (state() && state()->isStateActive()) { if (hadValue) { @@ -692,7 +701,7 @@ QVariant QDeclarativePropertyChanges::property(const QString &name) const { Q_D(const QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator propertyIterator(d->properties); while (propertyIterator.hasNext()) { @@ -705,8 +714,8 @@ QVariant QDeclarativePropertyChanges::property(const QString &name) const QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - return QVariant(entry.second->expression()); + if (entry.name == name) { + return QVariant(entry.expression->expression()); } } @@ -717,12 +726,12 @@ void QDeclarativePropertyChanges::removeProperty(const QString &name) { Q_D(QDeclarativePropertyChanges); typedef QPair PropertyEntry; - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QMutableListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { + if (entry.name == name) { expressionIterator.remove(); state()->removeEntryFromRevertList(object(), name); return; @@ -759,13 +768,13 @@ QVariant QDeclarativePropertyChanges::value(const QString &name) const QString QDeclarativePropertyChanges::expression(const QString &name) const { Q_D(const QDeclarativePropertyChanges); - typedef QPair ExpressionEntry; + typedef QDeclarativePropertyChangesPrivate::ExpressionChange ExpressionEntry; QListIterator expressionIterator(d->expressions); while (expressionIterator.hasNext()) { const ExpressionEntry &entry = expressionIterator.next(); - if (entry.first == name) { - return entry.second->expression(); + if (entry.name == name) { + return entry.expression->expression(); } } -- cgit v0.12 From 4ff05f2ed8cef9a126af023a4692eb8c50a0a892 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Tue, 21 Dec 2010 15:58:12 +1000 Subject: Fix number of chapters in qtestlib tutorial. Task-number: QTBUG-10248 Reviewed-by: Trust Me --- doc/src/development/qtestlib.qdoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/development/qtestlib.qdoc b/doc/src/development/qtestlib.qdoc index e53957f..38c2220 100644 --- a/doc/src/development/qtestlib.qdoc +++ b/doc/src/development/qtestlib.qdoc @@ -370,7 +370,7 @@ \title QTestLib Tutorial This tutorial gives a short introduction to how to use some of the - features of the QTestLib framework. It is divided into four + features of the QTestLib framework. It is divided into five chapters: \list 1 -- cgit v0.12 From 956c026be3f0a701024aaa466e158a3744284a83 Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Tue, 21 Dec 2010 17:05:04 +1000 Subject: ContentX and ContentY reset on flow change The gridView should be visible when the flow is changed, regardless of the content position before the flow change. Task-number: QTBUG-16230 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativegridview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 4a6a9dc..5aa88b5 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1606,6 +1606,8 @@ void QDeclarativeGridView::setFlow(Flow flow) setContentHeight(-1); setFlickableDirection(QDeclarativeFlickable::HorizontalFlick); } + setContentX(0); + setContentY(0); d->clear(); d->updateGrid(); refill(); -- cgit v0.12 From 5af714b2f1ec9dd85707809397751128c95a93bf Mon Sep 17 00:00:00 2001 From: Christopher Ham Date: Tue, 21 Dec 2010 17:23:46 +1000 Subject: Adding autotest coverage to QDecalarativeGridView Tests added for snapping, and adding coverage for TopToBottom flow Reviewed-by: Martin Jones --- .../tst_qdeclarativegridview.cpp | 92 ++++++++++++++++++++++ 1 file changed, 92 insertions(+) diff --git a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp index fd5d140..bd9885d 100644 --- a/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp +++ b/tests/auto/declarative/qdeclarativegridview/tst_qdeclarativegridview.cpp @@ -78,6 +78,7 @@ private slots: void componentChanges(); void modelChanges(); void positionViewAtIndex(); + void snapping(); void resetModel(); void enforceRange(); void QTBUG_8456(); @@ -993,6 +994,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on a currently visible item gridview->positionViewAtIndex(4, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(120, 90), 4); QTRY_COMPARE(gridview->contentY(), 60.); // Confirm items positioned correctly @@ -1007,6 +1009,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on an item beyond the visible items gridview->positionViewAtIndex(21, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(40, 450), 21); QTRY_COMPARE(gridview->contentY(), 420.); // Confirm items positioned correctly @@ -1021,6 +1024,7 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position on an item that would leave empty space if positioned at the top gridview->positionViewAtIndex(31, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(120, 630), 31); QTRY_COMPARE(gridview->contentY(), 520.); // Confirm items positioned correctly @@ -1035,6 +1039,9 @@ void tst_QDeclarativeGridView::positionViewAtIndex() // Position at the beginning again gridview->positionViewAtIndex(0, QDeclarativeGridView::Beginning); + QTRY_COMPARE(gridview->indexAt(0, 0), 0); + QTRY_COMPARE(gridview->indexAt(40, 30), 0); + QTRY_COMPARE(gridview->indexAt(80, 60), 4); QTRY_COMPARE(gridview->contentY(), 0.); // Confirm items positioned correctly @@ -1088,6 +1095,82 @@ void tst_QDeclarativeGridView::positionViewAtIndex() gridview->positionViewAtIndex(20, QDeclarativeGridView::Contain); QTRY_COMPARE(gridview->contentY(), 100.); + // Test for Top To Bottom layout + ctxt->setContextProperty("testTopToBottom", QVariant(true)); + + // Confirm items positioned correctly + itemCount = findItems(contentItem, "wrapper").count(); + for (int i = 0; i < model.count() && i < itemCount-1; ++i) { + QDeclarativeItem *item = findItem(contentItem, "wrapper", i); + if (!item) qWarning() << "Item" << i << "not found"; + QTRY_VERIFY(item); + QTRY_COMPARE(item->x(), (i/5)*80.); + QTRY_COMPARE(item->y(), (i%5)*60.); + } + + // Position at End + gridview->positionViewAtIndex(30, QDeclarativeGridView::End); + QTRY_COMPARE(gridview->contentX(), 320.); + QTRY_COMPARE(gridview->contentY(), 0.); + + // Position in Center + gridview->positionViewAtIndex(15, QDeclarativeGridView::Center); + QTRY_COMPARE(gridview->contentX(), 160.); + + // Ensure at least partially visible + gridview->positionViewAtIndex(15, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 160.); + + gridview->setContentX(170); + gridview->positionViewAtIndex(25, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 170.); + + gridview->positionViewAtIndex(30, QDeclarativeGridView::Visible); + QTRY_COMPARE(gridview->contentX(), 320.); + + gridview->setContentX(170); + gridview->positionViewAtIndex(25, QDeclarativeGridView::Contain); + QTRY_COMPARE(gridview->contentX(), 240.); + + delete canvas; +} + +void tst_QDeclarativeGridView::snapping() +{ + QDeclarativeView *canvas = createView(); + + TestModel model; + for (int i = 0; i < 40; i++) + model.addItem("Item" + QString::number(i), ""); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + ctxt->setContextProperty("testTopToBottom", QVariant(false)); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/gridview1.qml")); + qApp->processEvents(); + + QDeclarativeGridView *gridview = findItem(canvas->rootObject(), "grid"); + QTRY_VERIFY(gridview != 0); + + gridview->setHeight(220); + QCOMPARE(gridview->height(), 220.); + + gridview->positionViewAtIndex(12, QDeclarativeGridView::Visible); + QCOMPARE(gridview->contentY(), 80.); + + gridview->setContentY(0); + QCOMPARE(gridview->contentY(), 0.); + + gridview->setSnapMode(QDeclarativeGridView::SnapToRow); + QCOMPARE(gridview->snapMode(), QDeclarativeGridView::SnapToRow); + + gridview->positionViewAtIndex(12, QDeclarativeGridView::Visible); + QCOMPARE(gridview->contentY(), 60.); + + gridview->positionViewAtIndex(15, QDeclarativeGridView::End); + QCOMPARE(gridview->contentY(), 120.); + delete canvas; } @@ -1231,6 +1314,15 @@ void tst_QDeclarativeGridView::manualHighlight() QTRY_COMPARE(gridview->currentItem(), findItem(contentItem, "wrapper", 2)); QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); + + gridview->setFlow(QDeclarativeGridView::TopToBottom); + QTRY_COMPARE(gridview->flow(), QDeclarativeGridView::TopToBottom); + + gridview->setCurrentIndex(0); + QTRY_COMPARE(gridview->currentIndex(), 0); + QTRY_COMPARE(gridview->currentItem(), findItem(contentItem, "wrapper", 0)); + QTRY_COMPARE(gridview->highlightItem()->y() - 5, gridview->currentItem()->y()); + QTRY_COMPARE(gridview->highlightItem()->x() - 5, gridview->currentItem()->x()); } void tst_QDeclarativeGridView::footer() -- cgit v0.12 From 111e306c9991a0d89b0001b476e466891974945f Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Tue, 21 Dec 2010 09:12:58 +0100 Subject: QDeclarativeDebug: Remove unused file Got added in 5336e1838a95d97. --- src/declarative/debugger/debugger.pri | 1 - src/declarative/debugger/qdeclarativedebugserverplugin_p.h | 0 2 files changed, 1 deletion(-) delete mode 100644 src/declarative/debugger/qdeclarativedebugserverplugin_p.h diff --git a/src/declarative/debugger/debugger.pri b/src/declarative/debugger/debugger.pri index 9152677..75287b4 100644 --- a/src/declarative/debugger/debugger.pri +++ b/src/declarative/debugger/debugger.pri @@ -19,6 +19,5 @@ HEADERS += \ $$PWD/qdeclarativedebug_p.h \ $$PWD/qdeclarativedebugtrace_p.h \ $$PWD/qdeclarativedebughelper_p.h \ - $$PWD/qdeclarativedebugserverplugin_p.h \ $$PWD/qdeclarativedebugserver_p.h \ debugger/qdeclarativedebugserverconnection_p.h diff --git a/src/declarative/debugger/qdeclarativedebugserverplugin_p.h b/src/declarative/debugger/qdeclarativedebugserverplugin_p.h deleted file mode 100644 index e69de29..0000000 -- cgit v0.12 From b696d941c06535b7a7813c4d3b39dbd3710476e4 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 21 Dec 2010 10:29:19 +0100 Subject: Fix timer warning when deleting item views Reviewed-by: Olivier Task-number: QTBUG-16175 --- src/gui/itemviews/qabstractitemview.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/gui/itemviews/qabstractitemview.cpp b/src/gui/itemviews/qabstractitemview.cpp index 177b088..a7960ae 100644 --- a/src/gui/itemviews/qabstractitemview.cpp +++ b/src/gui/itemviews/qabstractitemview.cpp @@ -595,8 +595,15 @@ QAbstractItemView::QAbstractItemView(QAbstractItemViewPrivate &dd, QWidget *pare */ QAbstractItemView::~QAbstractItemView() { - // stop this timer here before ~QObject - d_func()->delayedReset.stop(); + Q_D(QAbstractItemView); + // stop these timers here before ~QObject + d->delayedReset.stop(); + d->updateTimer.stop(); + d->delayedEditing.stop(); + d->delayedAutoScroll.stop(); + d->autoScrollTimer.stop(); + d->delayedLayout.stop(); + d->fetchMoreTimer.stop(); } /*! -- cgit v0.12 From ff187688e113ec157dd14abcef0faf602b68901c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 14:21:21 +0100 Subject: Doc: Added a missing license header. --- doc/src/snippets/declarative/focus/focusColumn.qml | 39 ++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml index eb59309..42ee3da 100644 --- a/doc/src/snippets/declarative/focus/focusColumn.qml +++ b/doc/src/snippets/declarative/focus/focusColumn.qml @@ -1,3 +1,42 @@ +/**************************************************************************** +** +** 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:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ import QtQuick 1.0 Rectangle { -- cgit v0.12 From b22ff71d8f8fa03260d5ad0eef67184a047685e7 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:04:04 +0100 Subject: Doc: Fixed whitespace. --- doc/src/template/style/narrow.css | 14 ++++++------ doc/src/template/style/superfish.css | 44 ++++++++++++++++++------------------ 2 files changed, 29 insertions(+), 29 deletions(-) diff --git a/doc/src/template/style/narrow.css b/doc/src/template/style/narrow.css index fbb0752..39b4740 100644 --- a/doc/src/template/style/narrow.css +++ b/doc/src/template/style/narrow.css @@ -135,7 +135,7 @@ .creator .wrap { margin: 0px; - background:#FFFFFF; + background:#FFFFFF; } .narrow .wrap .toolbar { @@ -170,7 +170,7 @@ .narrow .wrap .breadcrumb ul li.last a { color: #363534; } - + #narrowsearch { display: none; } @@ -213,7 +213,7 @@ width: 64%; padding-left: 0; } - + .narrow .indexboxcont .sectionlist { width: 32.5%; } @@ -253,7 +253,7 @@ #narrowmenu li, #narrowmenu li ul { background-color: #fff; - margin-top:-1px; + margin-top:-1px; } #narrowmenu li ul { @@ -266,6 +266,6 @@ } /* end narrow mode */ - .creator #narrowsearch, .creator #narrowmenu{ - display:none; - } + .creator #narrowsearch, .creator #narrowmenu{ + display:none; + } diff --git a/doc/src/template/style/superfish.css b/doc/src/template/style/superfish.css index 0cf0f7d..2bdaef4 100644 --- a/doc/src/template/style/superfish.css +++ b/doc/src/template/style/superfish.css @@ -1,51 +1,51 @@ .sf-menu, .sf-menu * { - margin: 0; - padding: 0; - list-style: none; + margin: 0; + padding: 0; + list-style: none; } .sf-menu { - line-height: 1.0; + line-height: 1.0; } .sf-menu ul { - position: absolute; - top: -999em; - width: 10em; /* left offset of submenus need to match (see below) */ + position: absolute; + top: -999em; + width: 10em; /* left offset of submenus need to match (see below) */ } .sf-menu ul li { - width: 100%; + width: 100%; } .sf-menu li:hover { - visibility: inherit; /* fixes IE7 'sticky bug' */ + visibility: inherit; /* fixes IE7 'sticky bug' */ } .sf-menu li { - float: left; - position: relative; + float: left; + position: relative; } .sf-menu a { - display: block; - position: relative; + display: block; + position: relative; } .sf-menu li:hover ul, .sf-menu li.sfHover ul { - left: 0; - top: 2.5em; /* match top ul list item height */ - z-index: 99; + left: 0; + top: 2.5em; /* match top ul list item height */ + z-index: 99; } ul.sf-menu li:hover li ul, ul.sf-menu li.sfHover li ul { - top: -999em; + top: -999em; } ul.sf-menu li li:hover ul, ul.sf-menu li li.sfHover ul { - left: 10em; /* match ul width */ - top: 0; + left: 10em; /* match ul width */ + top: 0; } ul.sf-menu li li:hover li ul, ul.sf-menu li li.sfHover li ul { - top: -999em; + top: -999em; } ul.sf-menu li li li:hover ul, ul.sf-menu li li li.sfHover ul { - left: 10em; /* match ul width */ - top: 0; + left: 10em; /* match ul width */ + top: 0; } -- cgit v0.12 From ae0f24513158ea48b21ba3e6676c5fb8a786a73e Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:07:16 +0100 Subject: Doc: Fixed whitespace. --- tools/qdoc3/test/compat.qdocconf | 8 ++++---- tools/qdoc3/test/qt-cpp-ignore.qdocconf | 10 +++++----- tools/qdoc3/test/qt-defines.qdocconf | 4 ++-- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/qdoc3/test/compat.qdocconf b/tools/qdoc3/test/compat.qdocconf index 5745ed9..0b59629 100644 --- a/tools/qdoc3/test/compat.qdocconf +++ b/tools/qdoc3/test/compat.qdocconf @@ -1,5 +1,5 @@ -alias.i = e -alias.include = input +alias.i = e +alias.include = input macro.0 = "\\\\0" macro.b = "\\\\b" @@ -27,5 +27,5 @@ macro.img = "\\image" macro.endquote = "\\endquotation" macro.relatesto = "\\relates" -spurious = "Missing comma in .*" \ - "Missing pattern .*" +spurious = "Missing comma in .*" \ + "Missing pattern .*" diff --git a/tools/qdoc3/test/qt-cpp-ignore.qdocconf b/tools/qdoc3/test/qt-cpp-ignore.qdocconf index 5d52a47..044eef4 100644 --- a/tools/qdoc3/test/qt-cpp-ignore.qdocconf +++ b/tools/qdoc3/test/qt-cpp-ignore.qdocconf @@ -71,8 +71,8 @@ Cpp.ignoretokens = QAXFACTORY_EXPORT \ QT_END_INCLUDE_NAMESPACE \ PHONON_EXPORT \ Q_DECLARATIVE_EXPORT \ - Q_GADGET \ - QWEBKIT_EXPORT \ + Q_GADGET \ + QWEBKIT_EXPORT \ Q_INVOKABLE Cpp.ignoredirectives = Q_DECLARE_HANDLE \ Q_DECLARE_INTERFACE \ @@ -93,6 +93,6 @@ Cpp.ignoredirectives = Q_DECLARE_HANDLE \ K_DECLARE_PRIVATE \ PHONON_OBJECT \ PHONON_HEIR \ - Q_PRIVATE_PROPERTY \ - Q_DECLARE_PRIVATE_D \ - Q_CLASSINFO + Q_PRIVATE_PROPERTY \ + Q_DECLARE_PRIVATE_D \ + Q_CLASSINFO diff --git a/tools/qdoc3/test/qt-defines.qdocconf b/tools/qdoc3/test/qt-defines.qdocconf index bf7fd08..50a355f 100644 --- a/tools/qdoc3/test/qt-defines.qdocconf +++ b/tools/qdoc3/test/qt-defines.qdocconf @@ -3,12 +3,12 @@ defines = Q_QDOC \ QT_.*_LIB \ QT_COMPAT \ QT_KEYPAD_NAVIGATION \ - QT_NO_EGL \ + QT_NO_EGL \ QT3_SUPPORT \ Q_WS_.* \ Q_OS_.* \ Q_BYTE_ORDER \ - QT_DEPRECATED \ + QT_DEPRECATED \ Q_NO_USING_KEYWORD \ __cplusplus -- cgit v0.12 From 9862f29b3c8d3f23113388b48b1c4b86523137dc Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 15:07:46 +0100 Subject: Doc: Updated the Qt version number. --- tools/qdoc3/test/qt-project.qdocconf | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/qdoc3/test/qt-project.qdocconf b/tools/qdoc3/test/qt-project.qdocconf index 135fbbb..ca7caa9 100644 --- a/tools/qdoc3/test/qt-project.qdocconf +++ b/tools/qdoc3/test/qt-project.qdocconf @@ -6,7 +6,7 @@ include(qt-defines.qdocconf) project = Qt description = Qt Reference Documentation url = http://qt.nokia.com/doc/4.7 -version = 4.7.1 +version = 4.7.2 sourceencoding = UTF-8 outputencoding = UTF-8 @@ -20,9 +20,9 @@ qhp.Qt.virtualFolder = qdoc qhp.Qt.indexTitle = Qt Reference Documentation qhp.Qt.indexRoot = -qhp.Qt.filterAttributes = qt 4.7.1 qtrefdoc -qhp.Qt.customFilters.Qt.name = Qt 4.7.1 -qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.1 +qhp.Qt.filterAttributes = qt 4.7.2 qtrefdoc +qhp.Qt.customFilters.Qt.name = Qt 4.7.2 +qhp.Qt.customFilters.Qt.filterAttributes = qt 4.7.2 qhp.Qt.subprojects = classes overviews examples qhp.Qt.subprojects.classes.title = Classes qhp.Qt.subprojects.classes.indexTitle = Qt's Classes -- cgit v0.12 From fa4526a79112baccf9b00adca7f360ac8588a22d Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 17:35:43 +0100 Subject: Doc: Updated the HarfBuzz license information. As-requested-by: Legal --- doc/src/legal/3rdparty.qdoc | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/doc/src/legal/3rdparty.qdoc b/doc/src/legal/3rdparty.qdoc index 9cc83a6..e2c088a 100644 --- a/doc/src/legal/3rdparty.qdoc +++ b/doc/src/legal/3rdparty.qdoc @@ -92,13 +92,8 @@ \section1 HarfBuzz (\c harfbuzz) - \e{This is HarfBuzz, an OpenType Layout engine.} - - \e{It was derived originally from the OpenType code in FreeType-1.x, ported to - FreeType2. (This code has been abandoned for FreeType2, but until something - better comes along, should serve our purposes.) In addition to porting to - FreeType-2, it has been modified in various other ways.} -- quoted from - \c src/3rdparty/harfbuzz/README. + \e{This is HarfBuzz, an OpenType Layout engine library.} + -- quoted from \c src/3rdparty/harfbuzz/README. \hr @@ -129,8 +124,7 @@ \hr - See \c src/3rdparty/harfbuzz/COPYING.FTL and src/3rdparty/harfbuzz/COPYING.GPL - for license details. + See \c src/3rdparty/harfbuzz/COPYING for license details. \section1 The Independent JPEG Group's JPEG Software (\c libjpeg) version 8 -- cgit v0.12 From 84232c88aa9b05d91016b66963d68b8096099f9c Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 17:36:25 +0100 Subject: Doc: Changed a page title. --- doc/src/declarative/anchor-layout.qdoc | 2 +- doc/src/declarative/declarativeui.qdoc | 2 +- doc/src/declarative/qdeclarativereference.qdoc | 2 +- doc/src/declarative/tutorial.qdoc | 4 ++-- doc/src/getting-started/gettingstartedqml.qdoc | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index f5d5697..e9f79d1 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -28,7 +28,7 @@ /*! \page qml-anchor-layout.html \target anchor-layout -\title Anchor-based Layout in QML +\title Anchor-Based Layout in QML \section1 Overview diff --git a/doc/src/declarative/declarativeui.qdoc b/doc/src/declarative/declarativeui.qdoc index 41b9952..e10c5c8 100644 --- a/doc/src/declarative/declarativeui.qdoc +++ b/doc/src/declarative/declarativeui.qdoc @@ -91,7 +91,7 @@ Module. \list \o \l{QML Documents} \o \l{Property Binding} -\o \l{Anchor-based Layout in QML} +\o \l{Anchor-Based Layout in QML} \o \l{Writing QML Components: Properties, Methods and Signals} \o \l{QML Scope} \o \l{QML Modules} diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc index c2c5e91..76fcc40 100644 --- a/doc/src/declarative/qdeclarativereference.qdoc +++ b/doc/src/declarative/qdeclarativereference.qdoc @@ -64,7 +64,7 @@ \o \l {QML Scope} \o \l {Network Transparency} \o \l {qmlmodels}{Data Models} - \o \l {anchor-layout}{Anchor-based Layout} + \o \l {anchor-layout}{Anchor-Based Layout} \o \l {qmlstates}{States} \o \l {qdeclarativeanimation.html}{Animation} \o \l {qdeclarativemodules.html}{Modules} diff --git a/doc/src/declarative/tutorial.qdoc b/doc/src/declarative/tutorial.qdoc index d8139b4..a24fa85 100644 --- a/doc/src/declarative/tutorial.qdoc +++ b/doc/src/declarative/tutorial.qdoc @@ -94,7 +94,7 @@ We add a \l Text element as a child of the root Rectangle element that displays The \c y property is used to position the text vertically at 30 pixels from the top of its parent. The \c anchors.horizontalCenter property refers to the horizontal center of an element. -In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-based Layout}). +In this case, we specify that our text element should be horizontally centered in the \e page element (see \l{anchor-layout}{Anchor-Based Layout}). The \c font.pointSize and \c font.bold properties are related to fonts and use the \l{dot properties}{dot notation}. @@ -156,7 +156,7 @@ We will use this signal to change the color of the text in the main QML file lat Our cell component is basically a colored rectangle with the \c id \e rectangle. The \c anchors.fill property is a convenient way to set the size of an element. -In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-based Layout}). +In this case the rectangle will have the same size as its parent (see \l{anchor-layout}{Anchor-Based Layout}). \snippet examples/declarative/tutorials/helloworld/Cell.qml 3 diff --git a/doc/src/getting-started/gettingstartedqml.qdoc b/doc/src/getting-started/gettingstartedqml.qdoc index e3977bb..11fad03 100644 --- a/doc/src/getting-started/gettingstartedqml.qdoc +++ b/doc/src/getting-started/gettingstartedqml.qdoc @@ -133,7 +133,7 @@ the interactive area where mouse movements are detected. For our button, we anchor the whole MouseArea to its parent, which is \c simplebutton. The \c anchors.fill syntax is one way of accessing a specific property called \c fill inside a group of properties - called \c anchors. QML uses \l {Anchor-based Layout in QML}{anchor based layouts} where + called \c anchors. QML uses \l {Anchor-Based Layout in QML}{anchor-based layouts} where items can anchor to another item, creating robust layouts. The \c MouseArea has many signal handlers that are called during mouse movements within -- cgit v0.12 From ea41ba11fc848dbefecb0cde324478ab1986e555 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 18:38:04 +0100 Subject: Enabled error reporting and a plain text fallback for invalid QML. The location of places where code is included in documentation is now passed into each code marker when highlighted code is needed. --- tools/qdoc3/codemarker.h | 2 +- tools/qdoc3/cppcodemarker.cpp | 9 +++++---- tools/qdoc3/cppcodemarker.h | 4 ++-- tools/qdoc3/doc.cpp | 6 +++--- tools/qdoc3/jscodemarker.cpp | 12 +++++++++--- tools/qdoc3/jscodemarker.h | 6 +++--- tools/qdoc3/plaincodemarker.cpp | 2 +- tools/qdoc3/plaincodemarker.h | 2 +- tools/qdoc3/qmlcodemarker.cpp | 15 +++++++++++---- tools/qdoc3/qmlcodemarker.h | 6 +++--- 10 files changed, 39 insertions(+), 25 deletions(-) diff --git a/tools/qdoc3/codemarker.h b/tools/qdoc3/codemarker.h index 029ddb9..3cf3984 100644 --- a/tools/qdoc3/codemarker.h +++ b/tools/qdoc3/codemarker.h @@ -126,7 +126,7 @@ class CodeMarker const Node *relative = 0) = 0; virtual QString markedUpCode(const QString& code, const Node *relative, - const QString& dirPath) = 0; + const Location &location) = 0; virtual QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style) = 0; diff --git a/tools/qdoc3/cppcodemarker.cpp b/tools/qdoc3/cppcodemarker.cpp index 55a455f..8ea1c7f 100644 --- a/tools/qdoc3/cppcodemarker.cpp +++ b/tools/qdoc3/cppcodemarker.cpp @@ -157,9 +157,9 @@ QString CppCodeMarker::plainFullName(const Node *node, const Node *relative) QString CppCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(protect(code), relative, dirPath); + return addMarkUp(protect(code), relative, location); } QString CppCodeMarker::markedUpSynopsis(const Node *node, @@ -440,7 +440,8 @@ QString CppCodeMarker::markedUpIncludes(const QStringList& includes) code += "#include <<@headerfile>" + *inc + ">\n"; ++inc; } - return addMarkUp(code, 0, ""); + Location location; + return addMarkUp(code, 0, location); } QString CppCodeMarker::functionBeginRegExp(const QString& funcName) @@ -868,7 +869,7 @@ const Node *CppCodeMarker::resolveTarget(const QString& target, QString CppCodeMarker::addMarkUp(const QString& protectedCode, const Node * /* relative */, - const QString& /* dirPath */) + const Location & /* location */) { static QRegExp globalInclude("#include +<([^<>&]+)>"); static QRegExp yHasTypeX("(?:^|\n *)([a-zA-Z_][a-zA-Z_0-9]*)" diff --git a/tools/qdoc3/cppcodemarker.h b/tools/qdoc3/cppcodemarker.h index 40695c5..bb307f9 100644 --- a/tools/qdoc3/cppcodemarker.h +++ b/tools/qdoc3/cppcodemarker.h @@ -63,7 +63,7 @@ class CppCodeMarker : public CodeMarker virtual QString plainFullName(const Node *node, const Node *relative); virtual QString markedUpCode(const QString& code, const Node *relative, - const QString& dirPath); + const Location &location); virtual QString markedUpSynopsis(const Node *node, const Node *relative, SynopsisStyle style); @@ -90,7 +90,7 @@ class CppCodeMarker : public CodeMarker private: QString addMarkUp(const QString& protectedCode, const Node *relative, - const QString& dirPath); + const Location &location); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/doc.cpp b/tools/qdoc3/doc.cpp index ce9e30d..774f8ba 100644 --- a/tools/qdoc3/doc.cpp +++ b/tools/qdoc3/doc.cpp @@ -536,7 +536,7 @@ void DocParser::parse(const QString& source, enterPara(); x = untabifyEtc(getArgument(true)); marker = CodeMarker::markerForCode(x); - append(Atom::C, marker->markedUpCode(x, 0, "")); + append(Atom::C, marker->markedUpCode(x, 0, location())); break; case CMD_CAPTION: leavePara(); @@ -2305,7 +2305,7 @@ QString DocParser::getCode(int cmd, CodeMarker *marker) code = unindent(minIndent, code); if (!marker) marker = CodeMarker::markerForCode(code); - return marker->markedUpCode(code, 0, ""); + return marker->markedUpCode(code, 0, location()); } /*! @@ -3043,7 +3043,7 @@ CodeMarker *Doc::quoteFromFile(const Location &location, CodeMarker *marker = CodeMarker::markerForFileName(fileName); quoter.quoteFromFile(userFriendlyFilePath, code, - marker->markedUpCode(code, 0, dirPath)); + marker->markedUpCode(code, 0, location)); return marker; } diff --git a/tools/qdoc3/jscodemarker.cpp b/tools/qdoc3/jscodemarker.cpp index 84a28c6..80df0aa 100644 --- a/tools/qdoc3/jscodemarker.cpp +++ b/tools/qdoc3/jscodemarker.cpp @@ -103,14 +103,14 @@ bool JsCodeMarker::recognizeLanguage(const QString &language) QString JsCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(code, relative, dirPath); + return addMarkUp(code, relative, location); } QString JsCodeMarker::addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */) + const Location &location) { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); @@ -130,7 +130,13 @@ QString JsCodeMarker::addMarkUp(const QString &code, QmlMarkupVisitor visitor(code, pragmas, &engine); QDeclarativeJS::AST::Node::accept(ast, &visitor); output = visitor.markedUpCode(); + } else { + location.warning(tr("Unable to parse JavaScript: \"%1\" at line %2, column %3").arg( + parser.errorMessage()).arg(parser.errorLineNumber()).arg( + parser.errorColumnNumber())); + output = protect(code); } + return output; } diff --git a/tools/qdoc3/jscodemarker.h b/tools/qdoc3/jscodemarker.h index f7cb025..6d85063 100644 --- a/tools/qdoc3/jscodemarker.h +++ b/tools/qdoc3/jscodemarker.h @@ -62,11 +62,11 @@ public: virtual QString markedUpCode(const QString &code, const Node *relative, - const QString &dirPath); + const Location &location); private: - QString addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */); + QString addMarkUp(const QString &code, const Node *relative, + const Location &location); }; QT_END_NAMESPACE diff --git a/tools/qdoc3/plaincodemarker.cpp b/tools/qdoc3/plaincodemarker.cpp index d825c13..9819593 100644 --- a/tools/qdoc3/plaincodemarker.cpp +++ b/tools/qdoc3/plaincodemarker.cpp @@ -78,7 +78,7 @@ QString PlainCodeMarker::plainFullName(const Node * /* node */, const Node * /* QString PlainCodeMarker::markedUpCode( const QString& code, const Node * /* relative */, - const QString& /* dirPath */ ) + const Location & /* location */ ) { return protect( code ); } diff --git a/tools/qdoc3/plaincodemarker.h b/tools/qdoc3/plaincodemarker.h index 7afb88e..1c469a0 100644 --- a/tools/qdoc3/plaincodemarker.h +++ b/tools/qdoc3/plaincodemarker.h @@ -61,7 +61,7 @@ public: bool recognizeLanguage( const QString& lang ); QString plainName( const Node *node ); QString plainFullName( const Node *node, const Node *relative ); - QString markedUpCode( const QString& code, const Node *relative, const QString& dirPath ); + QString markedUpCode( const QString& code, const Node *relative, const Location &location ); QString markedUpSynopsis( const Node *node, const Node *relative, SynopsisStyle style ); QString markedUpName( const Node *node ); diff --git a/tools/qdoc3/qmlcodemarker.cpp b/tools/qdoc3/qmlcodemarker.cpp index 1e4ad1e..fc91cbb 100644 --- a/tools/qdoc3/qmlcodemarker.cpp +++ b/tools/qdoc3/qmlcodemarker.cpp @@ -134,9 +134,9 @@ QString QmlCodeMarker::plainFullName(const Node *node, const Node *relative) QString QmlCodeMarker::markedUpCode(const QString &code, const Node *relative, - const QString &dirPath) + const Location &location) { - return addMarkUp(code, relative, dirPath); + return addMarkUp(code, relative, location); } QString QmlCodeMarker::markedUpName(const Node *node) @@ -174,7 +174,8 @@ QString QmlCodeMarker::markedUpIncludes(const QStringList& includes) code += "import " + *inc + "\n"; ++inc; } - return protect(addMarkUp(code, 0, "")); + Location location; + return protect(addMarkUp(code, 0, location)); } QString QmlCodeMarker::functionBeginRegExp(const QString& funcName) @@ -190,7 +191,7 @@ QString QmlCodeMarker::functionEndRegExp(const QString& /* funcName */) QString QmlCodeMarker::addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */) + const Location &location) { QDeclarativeJS::Engine engine; QDeclarativeJS::Lexer lexer(&engine); @@ -210,7 +211,13 @@ QString QmlCodeMarker::addMarkUp(const QString &code, QmlMarkupVisitor visitor(code, pragmas, &engine); QDeclarativeJS::AST::Node::accept(ast, &visitor); output = visitor.markedUpCode(); + } else { + location.warning(tr("Unable to parse QML: \"%1\" at line %2, column %3").arg( + parser.errorMessage()).arg(parser.errorLineNumber()).arg( + parser.errorColumnNumber())); + output = protect(code); } + return output; } diff --git a/tools/qdoc3/qmlcodemarker.h b/tools/qdoc3/qmlcodemarker.h index 68e6753..b1d365c 100644 --- a/tools/qdoc3/qmlcodemarker.h +++ b/tools/qdoc3/qmlcodemarker.h @@ -64,7 +64,7 @@ public: virtual QString plainFullName(const Node *node, const Node *relative); virtual QString markedUpCode(const QString &code, const Node *relative, - const QString &dirPath); + const Location &location); virtual QString markedUpName(const Node *node); virtual QString markedUpFullName(const Node *node, const Node *relative); @@ -76,8 +76,8 @@ public: QList extractPragmas(QString &script); private: - QString addMarkUp(const QString &code, const Node * /* relative */, - const QString & /* dirPath */); + QString addMarkUp(const QString &code, const Node *relative, + const Location &location); }; QT_END_NAMESPACE -- cgit v0.12 From 2143a50d274d36e4fe779de2c732c66f47496ace Mon Sep 17 00:00:00 2001 From: David Boddie Date: Tue, 21 Dec 2010 20:21:47 +0100 Subject: Doc: Fixed QML syntax in quoted code snippets. --- doc/src/declarative/extending.qdoc | 2 +- .../declarative/states/statechangescript.qml | 61 ++++++++++++++++++++++ src/declarative/util/qdeclarativeconnections.cpp | 8 +-- .../util/qdeclarativestateoperations.cpp | 20 +------ 4 files changed, 67 insertions(+), 24 deletions(-) create mode 100644 doc/src/snippets/declarative/states/statechangescript.qml diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 748ec6c..c34dc13 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -823,7 +823,7 @@ If the \l{Item::children}{children} property was not the default property for \qml Item { children: [ - Rectangle {} + Rectangle {}, Rectangle {} ] } diff --git a/doc/src/snippets/declarative/states/statechangescript.qml b/doc/src/snippets/declarative/states/statechangescript.qml new file mode 100644 index 0000000..b885137 --- /dev/null +++ b/doc/src/snippets/declarative/states/statechangescript.qml @@ -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 documentation of the Qt Toolkit. +** +** $QT_BEGIN_LICENSE:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +Item { +//! [state and transition] +State { + name: "state1" + StateChangeScript { + name: "myScript" + script: doStateStuff(); + } + // ... +} +// ... +Transition { + to: "state1" + SequentialAnimation { + NumberAnimation { /* ... */ } + ScriptAction { scriptName: "myScript" } + NumberAnimation { /* ... */ } + } +} +//! [state and transition] +} diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index 15e5ac5..8b3a9da 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -82,7 +82,7 @@ public: \qml MouseArea { - onClicked: { foo(...) } + onClicked: { foo(parameters) } } \endqml @@ -103,7 +103,7 @@ public: \qml MouseArea { Connections { - onClicked: foo(...) + onClicked: foo(parameters) } } \endqml @@ -115,10 +115,10 @@ public: MouseArea { id: area } - ... + // ... Connections { target: area - onClicked: foo(...) + onClicked: foo(parameters) } \endqml diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index d1d7822..1df9013 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -599,25 +599,7 @@ public: ScriptAction to specify the point in the transition at which the StateChangeScript should to be run. - \qml - State { - name "state1" - StateChangeScript { - name: "myScript" - script: doStateStuff(); - } - ... - } - ... - Transition { - to: "state1" - SequentialAnimation { - NumberAnimation { ... } - ScriptAction { scriptName: "myScript" } - NumberAnimation { ... } - } - } - \endqml + \snippet snippets/declarative/states/statechangescript.qml state and transition \sa ScriptAction */ -- cgit v0.12 From afa22a20c1b89960b647b0e3a9dc390fe6f87eae Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Wed, 22 Dec 2010 08:48:40 +1000 Subject: tst_headers: make failure more detailed when failing to open a file Replace QVERIFY(f.open(...)) with QVERIFY2(f.open(...), qPrintable(f.errorString())) This pattern should be followed for all functions which can provide an error string on failure. --- tests/auto/headers/tst_headers.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp index 7ccf058..8c8bc2c 100644 --- a/tests/auto/headers/tst_headers.cpp +++ b/tests/auto/headers/tst_headers.cpp @@ -203,7 +203,7 @@ void tst_Headers::licenseCheck() QFETCH(QString, sourceFile); QFile f(sourceFile); - QVERIFY(f.open(QIODevice::ReadOnly)); + QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString())); QByteArray data = f.readAll(); data.replace("\r\n", "\n"); // Windows data.replace('\r', '\n'); // Mac OS9 @@ -264,7 +264,7 @@ void tst_Headers::privateSlots() return; QFile f(header); - QVERIFY(f.open(QIODevice::ReadOnly)); + QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString())); QStringList content = QString::fromLocal8Bit(f.readAll()).split("\n"); foreach (QString line, content) { @@ -286,7 +286,7 @@ void tst_Headers::macros() return; QFile f(header); - QVERIFY(f.open(QIODevice::ReadOnly)); + QVERIFY2(f.open(QIODevice::ReadOnly), qPrintable(f.errorString())); QByteArray data = f.readAll(); QStringList content = QString::fromLocal8Bit(data.replace('\r', "")).split("\n"); -- cgit v0.12 From 960c0f28c5c2a52d28f06d4cfda4f7d46becad93 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 20 Dec 2010 16:31:09 +1000 Subject: Remove redundant docs --- doc/src/declarative/qdeclarativereference.qdoc | 81 -------------------------- 1 file changed, 81 deletions(-) delete mode 100644 doc/src/declarative/qdeclarativereference.qdoc diff --git a/doc/src/declarative/qdeclarativereference.qdoc b/doc/src/declarative/qdeclarativereference.qdoc deleted file mode 100644 index c2c5e91..0000000 --- a/doc/src/declarative/qdeclarativereference.qdoc +++ /dev/null @@ -1,81 +0,0 @@ -/**************************************************************************** -** -** 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$ -** 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 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$ -** -****************************************************************************/ - -/*! - \page qdeclarativereference.html - \title QML Reference - - \target qtdeclarativemainpage - - QML is a language for building the animation rich, - highly fluid user interfaces that are becoming common in portable consumer - electronics devices such as mobile phones, media players, set-top boxes and - netbooks. It is also appropriate for highly custom desktop - user interfaces, or special elements in more traditional desktop user interfaces. - - Building fluid applications is done declaratively, rather than procedurally. - That is, you specify \e what the UI should look like and how it should behave - rather than specifying step-by-step \e how to build it. Specifying a UI declaratively - does not just include the layout of the interface items, but also the way each - individual item looks and behaves and the overall flow of the application. - - The QML elements provide a sophisticated set of graphical and behavioral building - blocks. These different elements are combined together in \l {QML Documents}{QML documents} to build components - ranging in complexity from simple buttons and sliders, to complete - internet-enabled applications like a \l {http://www.flickr.com}{Flickr} photo browser. - - Getting Started: - \list - \o \l {Introduction to the QML language} - \o \l {QML Tutorial}{Tutorial: 'Hello World'} - \o \l {QML Advanced Tutorial}{Advanced Tutorial: 'Same Game'} - \o \l {QML Examples and Demos} - \endlist - - \section1 Core QML Features: - \list - \o \l {QML Documents} - \o \l {Property Binding} - \o \l {Integrating JavaScript} - \o \l {QML Scope} - \o \l {Network Transparency} - \o \l {qmlmodels}{Data Models} - \o \l {anchor-layout}{Anchor-based Layout} - \o \l {qmlstates}{States} - \o \l {qdeclarativeanimation.html}{Animation} - \o \l {qdeclarativemodules.html}{Modules} - \o \l {qmlfocus}{Keyboard Focus} - \o \l {Extending types from QML} - \endlist - - QML Reference: - \list - \o \l {elements}{QML Elements} - \o \l {QML Global Object} - \o \l {QML Internationalization} - \endlist -*/ -- cgit v0.12 From 22df95289adc5fca59cc0a42cf18e98c5cc433d9 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 22 Dec 2010 11:35:39 +1000 Subject: Add double type to QML Basic Types docs --- doc/src/declarative/basictypes.qdoc | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 034b7d1..939f328 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -95,6 +95,26 @@ */ /*! + \qmlbasictype double + \ingroup qmlbasictypes + + \brief A double number has a decimal point and is stored in double precision. + + A double number has a decimal point and is stored in double precision, \l + {http://en.wikipedia.org/wiki/IEEE_754} {IEEE floating point} + format. + + Example: + \qml + Item { + property double number: 32155.2355 + } + \endqml + + \sa {QML Basic Types} +*/ + +/*! \qmlbasictype string \ingroup qmlbasictypes -- cgit v0.12 From 2d4d125313d79fb80f513952bed675b7126392fd Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 22 Dec 2010 12:23:08 +1000 Subject: Document the 'variant' basic type This includes documentation on restrictions and considerations when storing a JavaScript object with this type, since such properties only hold a copy of the object's values and not the actual object. Task-number: QTBUG-16196 Reviewed-by: Michael Brasser --- doc/src/declarative/basictypes.qdoc | 75 ++++++++++++++++++++++++++++++++++++- doc/src/declarative/extending.qdoc | 24 ++++++------ 2 files changed, 87 insertions(+), 12 deletions(-) diff --git a/doc/src/declarative/basictypes.qdoc b/doc/src/declarative/basictypes.qdoc index 939f328..e9d3a44 100644 --- a/doc/src/declarative/basictypes.qdoc +++ b/doc/src/declarative/basictypes.qdoc @@ -432,7 +432,8 @@ list only modify a \e copy of the list and not the actual list. (These current limitations are due to restrictions on \l {Property Binding} where lists are involved.) - To create a modifiable list, create an array object from within a \c .js JavaScript file, + You can, however, modify a copy of the list and then reassign the property to the modified + value. Other options are to create an array object from within a \c .js JavaScript file, or implement a custom list element in C++. Here is a QML element that modifies the list in a JavaScript file: @@ -472,6 +473,78 @@ \sa {QML Basic Types} */ + +/*! + \qmlbasictype variant + \ingroup qmlbasictypes + + \brief A variant type is a generic property type. + + A variant is a generic property type. A variant type property can hold any of the + \l {QML Basic Types}{basic type} values: + + \qml + Item { + property variant aNumber : 100 + property variant aString : "Hello world!" + property variant aList : [ 1, 2, "buckle my shoe" ] + } + \endqml + + The \c variant type can also hold a \e copy of a JavaScript object. For example, the + \c animal property below defines a JavaScript object defined with JSON notation. The + object's properties and values can be examined using the standard JavaScript syntax, + as shown in the \c Component.onCompleted handler. + + \qml + Item { + property variant animal : { 'type': 'bird', 'species': 'galah', 'age': 7 } + + Component.onCompleted: { + for (var attribute in animal) + console.log(attribute, "=", animal[attribute]) + } + } + \endqml + + It must be noted that the \c animal property holds a \e copy of the defined object, and + not the object itself. (This is true even if the property refers to an object defined in + some JavaScript file; the property will hold a copy of the object, and not the actual + object.) The property essentially holds a copy of the contents within the object. This + has several implications: + + \list + \o Changes to any of the property's values (for example, the \c animal.type value + above) only modify the \e copy of the object, not the object itself. You can, however, + modify a copy of the object and then reassign the property to the modified value. + \o Because the property only holds a copy of the object, \l{Property Binding}{bindings} to + any of the property's individual values are not updated until the whole property is + reassigned to a new value. For example: + + \qml + Item { + property variant animal : { 'type': 'bird', 'species': 'galah', 'age': 7 } + + Text { text: "Animal species: " + animal.species } + + Component.onCompleted: { + animal.species = 'kookaburra' // this has no effect on the displayed text + + var newObj = animal + newObj.species = 'kookaburra' + animal = newObj // this will update the displayed text + } + } + \endqml + \o Since the object values are copied, it does not hold any reference to the original + object, and extra data such as the object's JavaScript prototype chain is lost in the + process. + \endlist + + \sa {QML Basic Types} +*/ + + /*! \qmlbasictype vector3d \ingroup qmlbasictypes diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index 748ec6c..ff519f6 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -753,15 +753,15 @@ with their default values and the corresponding C++ type: \table \header \o QML Type Name \o Default value \o C++ Type Name -\row \o int \o 0 \o int -\row \o bool \o \c false \o bool -\row \o double \o 0.0 \o double -\row \o real \o 0.0 \o double -\row \o string \o "" (empty string) \o QString -\row \o url \o "" (empty url) \o QUrl -\row \o color \o #000000 (black) \o QColor -\row \o date \o \c undefined \o QDateTime -\row \o variant \o \c undefined \o QVariant +\row \o \l int \o 0 \o int +\row \o \l bool \o \c false \o bool +\row \o \l double \o 0.0 \o double +\row \o \l real \o 0.0 \o double +\row \o \l string \o "" (empty string) \o QString +\row \o \l url \o "" (empty url) \o QUrl +\row \o \l color \o #000000 (black) \o QColor +\row \o \l date \o \c undefined \o QDateTime +\row \o \l variant \o \c undefined \o QVariant \endtable QML object types can also be used as property types. This includes @@ -776,6 +776,10 @@ property MyCustomType customProperty Such object-type properties default to an \c undefined value. +It is also possible to store a copy of a JavaScript object using the \c variant +property type. This creates some restrictions on how the property should be used; +see the \l {variant}{variant type documentation} for details. + \l{list}{List properties} are created with the \c list syntax, and default to an empty list: @@ -786,8 +790,6 @@ property list listOfItems Note that list properties cannot be modified like ordinary JavaScript arrays. See the \l {list}{list type documentation} for details. -For details about accessing and manipulating QML properties from C++, see \l {Using QML with C++}. - \section2 Property change signals -- cgit v0.12 From 042e797a21a88ccafbaf54bbcfbf1e8d75b33740 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 22 Dec 2010 10:29:43 +1000 Subject: Optimization: make QDeclarativePropertyPrivate shared. Task-number: QTBUG-15331 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarativeproperty.cpp | 98 +++++++++++++++++----------- src/declarative/qml/qdeclarativeproperty_p.h | 13 +--- 2 files changed, 64 insertions(+), 47 deletions(-) diff --git a/src/declarative/qml/qdeclarativeproperty.cpp b/src/declarative/qml/qdeclarativeproperty.cpp index 8eaa98b..d7cf6cc 100644 --- a/src/declarative/qml/qdeclarativeproperty.cpp +++ b/src/declarative/qml/qdeclarativeproperty.cpp @@ -106,15 +106,16 @@ qWarning() << "Pixel size should now be 24:" << property.read().toInt(); Create an invalid QDeclarativeProperty. */ QDeclarativeProperty::QDeclarativeProperty() -: d(new QDeclarativePropertyPrivate) +: d(0) { - d->q = this; } /*! \internal */ QDeclarativeProperty::~QDeclarativeProperty() { - delete d; d = 0; + if (d) + d->release(); + d = 0; } /*! @@ -124,7 +125,6 @@ QDeclarativeProperty::~QDeclarativeProperty() QDeclarativeProperty::QDeclarativeProperty(QObject *obj) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->initDefault(obj); } @@ -137,7 +137,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ctxt) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = ctxt?QDeclarativeContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initDefault(obj); @@ -152,7 +151,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeContext *ct QDeclarativeProperty::QDeclarativeProperty(QObject *obj, QDeclarativeEngine *engine) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = 0; d->engine = engine; d->initDefault(obj); @@ -178,7 +176,6 @@ void QDeclarativePropertyPrivate::initDefault(QObject *obj) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->initProperty(obj, name); if (!isValid()) d->object = 0; } @@ -190,7 +187,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name) QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeContext *ctxt) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = ctxt?QDeclarativeContextData::get(ctxt):0; d->engine = ctxt?ctxt->engine():0; d->initProperty(obj, name); @@ -205,7 +201,6 @@ QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QD QDeclarativeProperty::QDeclarativeProperty(QObject *obj, const QString &name, QDeclarativeEngine *engine) : d(new QDeclarativePropertyPrivate) { - d->q = this; d->context = 0; d->engine = engine; d->initProperty(obj, name); @@ -324,9 +319,10 @@ void QDeclarativePropertyPrivate::initProperty(QObject *obj, const QString &name Create a copy of \a other. */ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) -: d(new QDeclarativePropertyPrivate(*other.d)) { - d->q = this; + d = other.d; + if (d) + d->addref(); } /*! @@ -355,13 +351,13 @@ QDeclarativeProperty::QDeclarativeProperty(const QDeclarativeProperty &other) */ QDeclarativeProperty::PropertyTypeCategory QDeclarativeProperty::propertyTypeCategory() const { - return d->propertyTypeCategory(); + return d ? d->propertyTypeCategory() : InvalidCategory; } QDeclarativeProperty::PropertyTypeCategory QDeclarativePropertyPrivate::propertyTypeCategory() const { - uint type = q->type(); + uint type = this->type(); if (isValueType()) { return QDeclarativeProperty::Normal; @@ -388,6 +384,8 @@ QDeclarativePropertyPrivate::propertyTypeCategory() const */ const char *QDeclarativeProperty::propertyTypeName() const { + if (!d) + return 0; if (d->isValueType()) { QDeclarativeEnginePrivate *ep = QDeclarativeEnginePrivate::get(d->context); @@ -414,6 +412,8 @@ const char *QDeclarativeProperty::propertyTypeName() const */ bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const { + if (!d || !other.d) + return false; // category is intentially omitted here as it is generated // from the other members return d->object == other.d->object && @@ -427,7 +427,7 @@ bool QDeclarativeProperty::operator==(const QDeclarativeProperty &other) const */ int QDeclarativeProperty::propertyType() const { - return d->propertyType(); + return d ? d->propertyType() : QVariant::Invalid; } bool QDeclarativePropertyPrivate::isValueType() const @@ -437,7 +437,7 @@ bool QDeclarativePropertyPrivate::isValueType() const int QDeclarativePropertyPrivate::propertyType() const { - uint type = q->type(); + uint type = this->type(); if (isValueType()) { return valueType.valueTypePropType; } else if (type & QDeclarativeProperty::Property) { @@ -450,17 +450,22 @@ int QDeclarativePropertyPrivate::propertyType() const } } +QDeclarativeProperty::Type QDeclarativePropertyPrivate::type() const +{ + if (core.flags & QDeclarativePropertyCache::Data::IsFunction) + return QDeclarativeProperty::SignalProperty; + else if (core.isValid()) + return QDeclarativeProperty::Property; + else + return QDeclarativeProperty::Invalid; +} + /*! Returns the type of the property. */ QDeclarativeProperty::Type QDeclarativeProperty::type() const { - if (d->core.flags & QDeclarativePropertyCache::Data::IsFunction) - return SignalProperty; - else if (d->core.isValid()) - return Property; - else - return Invalid; + return d ? d->type() : Invalid; } /*! @@ -484,7 +489,7 @@ bool QDeclarativeProperty::isSignalProperty() const */ QObject *QDeclarativeProperty::object() const { - return d->object; + return d ? d->object : 0; } /*! @@ -492,15 +497,11 @@ QObject *QDeclarativeProperty::object() const */ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty &other) { - d->context = other.d->context; - d->engine = other.d->engine; - d->object = other.d->object; - - d->isNameCached = other.d->isNameCached; - d->core = other.d->core; - d->nameCache = other.d->nameCache; - - d->valueType = other.d->valueType; + if (d) + d->release(); + d = other.d; + if (d) + d->addref(); return *this; } @@ -510,6 +511,8 @@ QDeclarativeProperty &QDeclarativeProperty::operator=(const QDeclarativeProperty */ bool QDeclarativeProperty::isWritable() const { + if (!d) + return false; if (!d->object) return false; if (d->core.flags & QDeclarativePropertyCache::Data::IsQList) //list @@ -527,6 +530,8 @@ bool QDeclarativeProperty::isWritable() const */ bool QDeclarativeProperty::isDesignable() const { + if (!d) + return false; if (type() & Property && d->core.isValid() && d->object) return d->object->metaObject()->property(d->core.coreIndex).isDesignable(); else @@ -538,6 +543,8 @@ bool QDeclarativeProperty::isDesignable() const */ bool QDeclarativeProperty::isResettable() const { + if (!d) + return false; if (type() & Property && d->core.isValid() && d->object) return d->core.flags & QDeclarativePropertyCache::Data::IsResettable; else @@ -550,6 +557,8 @@ bool QDeclarativeProperty::isResettable() const */ bool QDeclarativeProperty::isValid() const { + if (!d) + return false; return type() != Invalid; } @@ -558,6 +567,8 @@ bool QDeclarativeProperty::isValid() const */ QString QDeclarativeProperty::name() const { + if (!d) + return QString(); if (!d->isNameCached) { // ### if (!d->object) { @@ -594,6 +605,8 @@ QString QDeclarativeProperty::name() const */ QMetaProperty QDeclarativeProperty::property() const { + if (!d) + return QMetaProperty(); if (type() & Property && d->core.isValid() && d->object) return d->object->metaObject()->property(d->core.coreIndex); else @@ -606,6 +619,8 @@ QMetaProperty QDeclarativeProperty::property() const */ QMetaMethod QDeclarativeProperty::method() const { + if (!d) + return QMetaMethod(); if (type() & SignalProperty && d->object) return d->object->metaObject()->method(d->core.coreIndex); else @@ -619,7 +634,7 @@ QMetaMethod QDeclarativeProperty::method() const QDeclarativeAbstractBinding * QDeclarativePropertyPrivate::binding(const QDeclarativeProperty &that) { - if (!that.isProperty() || !that.d->object) + if (!that.d || !that.isProperty() || !that.d->object) return 0; return binding(that.d->object, that.d->core.coreIndex, that.d->valueType.valueTypeCoreIdx); @@ -643,7 +658,7 @@ QDeclarativePropertyPrivate::setBinding(const QDeclarativeProperty &that, QDeclarativeAbstractBinding *newBinding, WriteFlags flags) { - if (!that.isProperty() || !that.d->object) { + if (!that.d || !that.isProperty() || !that.d->object) { if (newBinding) newBinding->destroy(); return 0; @@ -893,6 +908,8 @@ QDeclarativePropertyPrivate::setSignalExpression(const QDeclarativeProperty &tha */ QVariant QDeclarativeProperty::read() const { + if (!d) + return QVariant(); if (!d->object) return QVariant(); @@ -1034,8 +1051,10 @@ bool QDeclarativePropertyPrivate::writeEnumProperty(const QMetaProperty &prop, i bool QDeclarativePropertyPrivate::writeValueProperty(const QVariant &value, WriteFlags flags) { // Remove any existing bindings on this property - if (!(flags & DontRemoveBinding)) { - QDeclarativeAbstractBinding *binding = setBinding(*q, 0); + if (!(flags & DontRemoveBinding) && + (type() & QDeclarativeProperty::Property) && object) { + QDeclarativeAbstractBinding *binding = setBinding(object, core.coreIndex, + valueType.valueTypeCoreIdx, 0, flags); if (binding) binding->destroy(); } @@ -1314,6 +1333,8 @@ bool QDeclarativeProperty::reset() const bool QDeclarativePropertyPrivate::write(const QDeclarativeProperty &that, const QVariant &value, WriteFlags flags) { + if (!that.d) + return false; if (that.d->object && that.type() & QDeclarativeProperty::Property && that.d->core.isValid() && that.isWritable()) return that.d->writeValueProperty(value, flags); @@ -1392,12 +1413,12 @@ bool QDeclarativeProperty::connectNotifySignal(QObject *dest, const char *slot) */ int QDeclarativeProperty::index() const { - return d->core.coreIndex; + return d ? d->core.coreIndex : -1; } int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty &that) { - return that.d->valueType.valueTypeCoreIdx; + return that.d ? that.d->valueType.valueTypeCoreIdx : -1; } /*! @@ -1406,6 +1427,8 @@ int QDeclarativePropertyPrivate::valueTypeCoreIndex(const QDeclarativeProperty & */ int QDeclarativePropertyPrivate::bindingIndex(const QDeclarativeProperty &that) { + if (!that.d) + return -1; int rv = that.d->core.coreIndex; if (rv != -1 && that.d->valueType.valueTypeCoreIdx != -1) rv = rv | (that.d->valueType.valueTypeCoreIdx << 24); @@ -1457,6 +1480,7 @@ QDeclarativePropertyPrivate::restore(const QByteArray &data, QObject *object, QD if (data.isEmpty()) return prop; + prop.d = new QDeclarativePropertyPrivate; prop.d->object = object; prop.d->context = ctxt; prop.d->engine = ctxt->engine; diff --git a/src/declarative/qml/qdeclarativeproperty_p.h b/src/declarative/qml/qdeclarativeproperty_p.h index 6392f88..f7d24f1 100644 --- a/src/declarative/qml/qdeclarativeproperty_p.h +++ b/src/declarative/qml/qdeclarativeproperty_p.h @@ -65,23 +65,15 @@ QT_BEGIN_NAMESPACE class QDeclarativeContext; class QDeclarativeEnginePrivate; class QDeclarativeExpression; -class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativePropertyPrivate : public QDeclarativeRefCount { public: enum WriteFlag { BypassInterceptor = 0x01, DontRemoveBinding = 0x02, RemoveBindingOnAliasWrite = 0x04 }; Q_DECLARE_FLAGS(WriteFlags, WriteFlag) QDeclarativePropertyPrivate() - : q(0), context(0), engine(0), object(0), isNameCached(false) {} - + : context(0), engine(0), object(0), isNameCached(false) {} - QDeclarativePropertyPrivate(const QDeclarativePropertyPrivate &other) - : q(0), context(other.context), engine(other.engine), object(other.object), - isNameCached(other.isNameCached), - core(other.core), nameCache(other.nameCache), - valueType(other.valueType) {} - - QDeclarativeProperty *q; QDeclarativeContextData *context; QDeclarativeEngine *engine; QDeclarativeGuard object; @@ -98,6 +90,7 @@ public: bool isValueType() const; int propertyType() const; + QDeclarativeProperty::Type type() const; QDeclarativeProperty::PropertyTypeCategory propertyTypeCategory() const; QVariant readValueProperty(); -- cgit v0.12 From 55c32b91a298d52bd7c29968d21b4b7a5ee741e4 Mon Sep 17 00:00:00 2001 From: Peter Yard Date: Wed, 22 Dec 2010 16:03:35 +1000 Subject: Docs: QTBUG-9150 Incorrect snippet in class doc. --- src/sql/models/qsqltablemodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/models/qsqltablemodel.cpp b/src/sql/models/qsqltablemodel.cpp index 8589163..974cf7b 100644 --- a/src/sql/models/qsqltablemodel.cpp +++ b/src/sql/models/qsqltablemodel.cpp @@ -265,7 +265,7 @@ QSqlRecord QSqlTableModelPrivate::primaryValues(int row) QSqlTableModel can also be used to access a database programmatically, without binding it to a view: - \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 25 + \snippet doc/src/snippets/sqldatabase/sqldatabase.cpp 21 The code snippet above extracts the \c salary field from record 4 in the result set of the query \c{SELECT * from employee}. -- cgit v0.12 From e50a0ad18c40322ca0c06a11e7dc7b9a82951f16 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 22 Dec 2010 16:12:26 +1000 Subject: XmlListModel requests should set 'Accept' header to 'application/xml' Task-number: QTBUG-15836 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativexmllistmodel.cpp | 1 + .../tst_qdeclarativexmllistmodel.cpp | 69 ++++++++++++++++++++++ 2 files changed, 70 insertions(+) diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 49a12b1..e97cd67 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -924,6 +924,7 @@ void QDeclarativeXmlListModel::reload() } else { d->notifyQueryStarted(true); QNetworkRequest req(d->src); + req.setRawHeader("Accept", "application/xml"); d->reply = qmlContext(this)->engine()->networkAccessManager()->get(req); QObject::connect(d->reply, SIGNAL(finished()), this, SLOT(requestFinished())); QObject::connect(d->reply, SIGNAL(downloadProgress(qint64,qint64)), diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index a14f942..b95b053 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -38,8 +38,13 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include + #include #include +#include +#include +#include #include #include #include @@ -81,6 +86,7 @@ private slots: void roles(); void roleErrors(); void uniqueRoleNames(); + void headers(); void xml(); void xml_data(); void source(); @@ -139,6 +145,44 @@ private: QDeclarativeEngine engine; }; +class CustomNetworkAccessManagerFactory : public QObject, public QDeclarativeNetworkAccessManagerFactory +{ + Q_OBJECT +public: + QVariantMap lastSentHeaders; + +protected: + QNetworkAccessManager *create(QObject *parent); +}; + +class CustomNetworkAccessManager : public QNetworkAccessManager +{ + Q_OBJECT +public: + CustomNetworkAccessManager(CustomNetworkAccessManagerFactory *factory, QObject *parent) + : QNetworkAccessManager(parent), m_factory(factory) {} + +protected: + QNetworkReply *createRequest(Operation op, const QNetworkRequest &req, QIODevice * outgoingData = 0) + { + if (m_factory) { + QVariantMap map; + foreach (const QString &header, req.rawHeaderList()) + map[header] = req.rawHeader(header.toUtf8()); + m_factory->lastSentHeaders = map; + } + return QNetworkAccessManager::createRequest(op, req, outgoingData); + } + + QPointer m_factory; +}; + +QNetworkAccessManager *CustomNetworkAccessManagerFactory::create(QObject *parent) +{ + return new CustomNetworkAccessManager(this, parent); +} + + void tst_qdeclarativexmllistmodel::buildModel() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); @@ -312,6 +356,31 @@ void tst_qdeclarativexmllistmodel::xml_data() QTest::newRow("one item") << "HobbesTiger7Large" << 1; } +void tst_qdeclarativexmllistmodel::headers() +{ + // ensure the QNetworkAccessManagers created for this test are immediately deleted + QDeclarativeEngine qmlEng; + + CustomNetworkAccessManagerFactory factory; + qmlEng.setNetworkAccessManagerFactory(&factory); + + QDeclarativeComponent component(&qmlEng, QUrl::fromLocalFile(SRCDIR "/data/model.qml")); + QDeclarativeXmlListModel *model = qobject_cast(component.create()); + QVERIFY(model != 0); + QTRY_COMPARE(model->status(), QDeclarativeXmlListModel::Ready); + + QVariantMap expectedHeaders; + expectedHeaders["Accept"] = "application/xml"; + + QCOMPARE(factory.lastSentHeaders.count(), expectedHeaders.count()); + foreach (const QString &header, expectedHeaders.keys()) { + QVERIFY(factory.lastSentHeaders.contains(header)); + QCOMPARE(factory.lastSentHeaders[header].toString(), expectedHeaders[header].toString()); + } + + delete model; +} + void tst_qdeclarativexmllistmodel::source() { QFETCH(QUrl, source); -- cgit v0.12 From cb31612bf6a48f995fbc05b5e8aa924e13034ae4 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 22 Dec 2010 16:15:28 +1000 Subject: Removing all visible items in ListView resulted in blank view. When delayRemove is true and all visible items are tagged to be removed the visibleIndex became invalid and refill() began filling from 0. Task-number: QTBUG-16183 Reviewed-by: Michael Brasser --- src/declarative/graphicsitems/qdeclarativelistview.cpp | 14 ++++++++++---- .../qdeclarativelistview/tst_qdeclarativelistview.cpp | 3 ++- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 2a7f508..86c8756 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -643,7 +643,8 @@ void QDeclarativeListViewPrivate::refill(qreal from, qreal to, bool doBuffer) int i = visibleItems.count() - 1; while (i > 0 && visibleItems.at(i)->index == -1) --i; - modelIndex = visibleItems.at(i)->index + 1; + if (visibleItems.at(i)->index != -1) + modelIndex = visibleItems.at(i)->index + 1; } bool changed = false; @@ -2804,7 +2805,10 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) int i = d->visibleItems.count() - 1; while (i > 0 && d->visibleItems.at(i)->index == -1) --i; - if (d->visibleItems.at(i)->index + 1 == modelIndex + if (i == 0 && d->visibleItems.first()->index == -1) { + // there are no visible items except items marked for removal + index = d->visibleItems.count(); + } else if (d->visibleItems.at(i)->index + 1 == modelIndex && d->visibleItems.at(i)->endPosition() < d->buffer+d->position()+d->size()-1) { // Special case of appending an item to the model. index = d->visibleItems.count(); @@ -2836,7 +2840,7 @@ void QDeclarativeListView::itemsInserted(int modelIndex, int count) // index can be the next item past the end of the visible items list (i.e. appended) int pos = index < d->visibleItems.count() ? d->visibleItems.at(index)->position() - : d->visibleItems.at(index-1)->endPosition()+d->spacing+1; + : d->visibleItems.last()->endPosition()+d->spacing+1; int initialPos = pos; int diff = 0; QList added; @@ -2988,14 +2992,16 @@ void QDeclarativeListView::itemsRemoved(int modelIndex, int count) } // update visibleIndex + bool haveVisibleIndex = false; for (it = d->visibleItems.begin(); it != d->visibleItems.end(); ++it) { if ((*it)->index != -1) { d->visibleIndex = (*it)->index; + haveVisibleIndex = true; break; } } - if (removedVisible && d->visibleItems.isEmpty()) { + if (removedVisible && !haveVisibleIndex) { d->timeline.clear(); if (d->itemCount == 0) { d->visibleIndex = 0; diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index 3df10a9..dba0cc4 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -667,7 +667,8 @@ void tst_QDeclarativeListView::removed(bool animated) listview->setContentY(80); QTest::qWait(300); - model.removeItems(1, 17); + // remove all visible items + model.removeItems(1, 18); QTest::qWait(300); // Confirm items positioned correctly -- cgit v0.12 From 749387a203737e49fb44ce7001ed78ba5512583d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 21 Dec 2010 12:43:16 +0100 Subject: Improve performance of bilinear downscaling of images with neon. Gives a 36 % performance boost for downscaling a 512x512 pixmap to 480x480 with SmoothPixmapFilter enabled. Reviewed-by: Andreas Kling --- src/gui/painting/qdrawhelper.cpp | 133 +++++++++++++++++++++++++++++++-------- 1 file changed, 107 insertions(+), 26 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index 62af212..fdb686d 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -712,6 +712,38 @@ static inline uint interpolate_4_pixels_16(uint tl, uint tr, uint bl, uint br, i } #endif +#if defined(QT_ALWAYS_HAVE_NEON) +#define interpolate_4_pixels_16_neon(tl, tr, bl, br, distx, disty, disty_, colorMask, invColorMask, v_256, b) \ +{ \ + const int16x8_t dxdy = vmulq_s16(distx, disty); \ + const int16x8_t distx_ = vshlq_n_s16(distx, 4); \ + const int16x8_t idxidy = vaddq_s16(dxdy, vsubq_s16(v_256, vaddq_s16(distx_, disty_))); \ + const int16x8_t dxidy = vsubq_s16(distx_, dxdy); \ + const int16x8_t idxdy = vsubq_s16(disty_, dxdy); \ + \ + int16x8_t tlAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tl), 8)); \ + int16x8_t tlRB = vandq_s16(tl, colorMask); \ + int16x8_t trAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(tr), 8)); \ + int16x8_t trRB = vandq_s16(tr, colorMask); \ + int16x8_t blAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bl), 8)); \ + int16x8_t blRB = vandq_s16(bl, colorMask); \ + int16x8_t brAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(br), 8)); \ + int16x8_t brRB = vandq_s16(br, colorMask); \ + \ + int16x8_t rAG = vmulq_s16(tlAG, idxidy); \ + int16x8_t rRB = vmulq_s16(tlRB, idxidy); \ + rAG = vmlaq_s16(rAG, trAG, dxidy); \ + rRB = vmlaq_s16(rRB, trRB, dxidy); \ + rAG = vmlaq_s16(rAG, blAG, idxdy); \ + rRB = vmlaq_s16(rRB, blRB, idxdy); \ + rAG = vmlaq_s16(rAG, brAG, dxdy); \ + rRB = vmlaq_s16(rRB, brRB, dxdy); \ + \ + rAG = vandq_s16(invColorMask, rAG); \ + rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); \ + vst1q_s16((int16_t*)(b), vorrq_s16(rAG, rRB)); \ +} +#endif template Q_STATIC_TEMPLATE_FUNCTION inline void fetchTransformedBilinear_pixelBounds(int max, int l1, int l2, int &v1, int &v2) @@ -920,35 +952,36 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * const uchar *s2 = data->texture.scanLine(y2); int disty = (fy & 0x0000ffff) >> 12; -#if defined(QT_ALWAYS_HAVE_SSE2) if (blendType != BlendTransformedBilinearTiled && (format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) { - //prolog to get into the bounds - while (b < end) { - int x1 = (fx >> 16); - int x2; - fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); - if (x1 != x2) //break if we are insided the bounds. - break; - uint tl = fetch(s1, x1, data->texture.colorTable); - uint tr = fetch(s1, x2, data->texture.colorTable); - uint bl = fetch(s2, x1, data->texture.colorTable); - uint br = fetch(s2, x2, data->texture.colorTable); - int distx = (fx & 0x0000ffff) >> 12; - *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); - fx += fdx; - ++b; - } - uint *boundedEnd; - if (fdx > 0) - boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); - else - boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); +#define BILINEAR_DOWNSCALE_BOUNDS_PROLOG \ + while (b < end) { \ + int x1 = (fx >> 16); \ + int x2; \ + fetchTransformedBilinear_pixelBounds(image_width, image_x1, image_x2, x1, x2); \ + if (x1 != x2) \ + break; \ + uint tl = fetch(s1, x1, data->texture.colorTable); \ + uint tr = fetch(s1, x2, data->texture.colorTable); \ + uint bl = fetch(s2, x1, data->texture.colorTable); \ + uint br = fetch(s2, x2, data->texture.colorTable); \ + int distx = (fx & 0x0000ffff) >> 12; \ + *b = interpolate_4_pixels_16(tl, tr, bl, br, distx, disty); \ + fx += fdx; \ + ++b; \ + } \ + uint *boundedEnd; \ + if (fdx > 0) \ + boundedEnd = qMin(end, buffer + uint((image_x2 - (fx >> 16)) / data->m11)); \ + else \ + boundedEnd = qMin(end, buffer + uint((image_x1 - (fx >> 16)) / data->m11)); \ boundedEnd -= 3; +#if defined(QT_ALWAYS_HAVE_SSE2) + BILINEAR_DOWNSCALE_BOUNDS_PROLOG + const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); - //const __m128i distShuffleMask = _mm_set_epi8(13, 12, 13, 12, 9, 8, 9, 8, 5, 4, 5, 4, 1, 0, 1, 0); const __m128i v_256 = _mm_set1_epi16(256); const __m128i v_disty = _mm_set1_epi16(disty); __m128i v_fdx = _mm_set1_epi32(fdx*4); @@ -976,8 +1009,7 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * bl.i[i] = *(addr_tl+secondLine); br.i[i] = *(addr_tr+secondLine); } - __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12); //distx = (fx & 0x0000ffff) >> 12; - //v_distx = _mm_shuffle_epi8(v_disty, distShuffleMask); //distx |= distx << 16; + __m128i v_distx = _mm_srli_epi16(v_fx.vect, 12); v_distx = _mm_shufflehi_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); v_distx = _mm_shufflelo_epi16(v_distx, _MM_SHUFFLE(2,2,0,0)); @@ -986,8 +1018,57 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * v_fx.vect = _mm_add_epi32(v_fx.vect, v_fdx); } fx = v_fx.i[0]; - } +#elif defined(QT_ALWAYS_HAVE_NEON) + BILINEAR_DOWNSCALE_BOUNDS_PROLOG + + const int16x8_t colorMask = vdupq_n_s16(0x00ff); + const int16x8_t invColorMask = vmvnq_s16(colorMask); + const int16x8_t v_256 = vdupq_n_s16(256); + const int16x8_t v_disty = vdupq_n_s16(disty); + const int16x8_t v_disty_ = vshlq_n_s16(v_disty, 4); + int32x4_t v_fdx = vdupq_n_s32(fdx*4); + + ptrdiff_t secondLine = reinterpret_cast(s2) - reinterpret_cast(s1); + + union Vect_buffer { int32x4_t vect; quint32 i[4]; }; + Vect_buffer v_fx; + + for (int i = 0; i < 4; i++) { + v_fx.i[i] = fx; + fx += fdx; + } + + const int32x4_t v_ffff_mask = vdupq_n_s32(0x0000ffff); + + while (b < boundedEnd) { + + Vect_buffer tl, tr, bl, br; + + Vect_buffer v_fx_shifted; + v_fx_shifted.vect = vshrq_n_s32(v_fx.vect, 16); + + int32x4_t v_distx = vshrq_n_s32(vandq_s32(v_fx.vect, v_ffff_mask), 12); + + for (int i = 0; i < 4; i++) { + int x1 = v_fx_shifted.i[i]; + const uint *addr_tl = reinterpret_cast(s1) + x1; + const uint *addr_tr = addr_tl + 1; + tl.i[i] = *addr_tl; + tr.i[i] = *addr_tr; + bl.i[i] = *(addr_tl+secondLine); + br.i[i] = *(addr_tr+secondLine); + } + + v_distx = vorrq_s32(v_distx, vshlq_n_s32(v_distx, 16)); + + interpolate_4_pixels_16_neon(vreinterpretq_s16_s32(tl.vect), vreinterpretq_s16_s32(tr.vect), vreinterpretq_s16_s32(bl.vect), vreinterpretq_s16_s32(br.vect), vreinterpretq_s16_s32(v_distx), v_disty, v_disty_, colorMask, invColorMask, v_256, b); + b+=4; + v_fx.vect = vaddq_s32(v_fx.vect, v_fdx); + } + fx = v_fx.i[0]; #endif + } + while (b < end) { int x1 = (fx >> 16); int x2; -- cgit v0.12 From 53f52118efd7587fe604f3d3dd898fa9464809a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 22 Dec 2010 09:34:37 +0100 Subject: Made documentation of QPixmap::createMaskFromColor match behaviour. Task-number: QTBUG-16223 Reviewed-by: Gunnar Sletta --- src/gui/image/qpixmap.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/image/qpixmap.cpp b/src/gui/image/qpixmap.cpp index c5d9a7e..3a7be1d 100644 --- a/src/gui/image/qpixmap.cpp +++ b/src/gui/image/qpixmap.cpp @@ -775,8 +775,8 @@ QBitmap QPixmap::createHeuristicMask(bool clipTight) const /*! Creates and returns a mask for this pixmap based on the given \a maskColor. If the \a mode is Qt::MaskInColor, all pixels matching the - maskColor will be opaque. If \a mode is Qt::MaskOutColor, all pixels - matching the maskColor will be transparent. + maskColor will be transparent. If \a mode is Qt::MaskOutColor, all pixels + matching the maskColor will be opaque. This function is slow because it involves converting to/from a QImage. -- cgit v0.12 From 07bc01460e72f08550f09de66e0e716471cf61bd Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 22 Dec 2010 12:18:39 +0200 Subject: Fix libinfixed usage in Symbian when def files are used There was a hardcoded lookup on "qtcore.dll" in s60main, which caused loading of wrong dll. Task-number: QTBUG-16221 Reviewed-by: Janne Koskinen --- src/s60main/newallocator_hook.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/s60main/newallocator_hook.cpp b/src/s60main/newallocator_hook.cpp index 9ea2ef0..3e259c2 100644 --- a/src/s60main/newallocator_hook.cpp +++ b/src/s60main/newallocator_hook.cpp @@ -69,6 +69,16 @@ TInt UserHeap::SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo) // So the function is found and called dynamically, by library lookup. If it is not found, we // use the OS allocator creation functions instead. +#if defined(QT_LIBINFIX) +# define QT_LSTRING2(x) L##x +# define QT_LSTRING(x) QT_LSTRING2(x) +# define QT_LIBINFIX_UNICODE QT_LSTRING(QT_LIBINFIX) +#else +# define QT_LIBINFIX_UNICODE L"" +#endif + +_LIT(QtCoreLibName, "qtcore" QT_LIBINFIX_UNICODE L".dll"); + struct SThreadCreateInfo { TAny* iHandle; @@ -106,7 +116,7 @@ TInt UserHeap::SetupThreadHeap(TBool aNotFirst, SStdEpocThreadCreateInfo& aInfo) #ifndef __WINS__ // attempt to create the fast allocator through a known export ordinal in qtcore.dll RLibrary qtcore; - if (qtcore.Load(_L("qtcore.dll")) == KErrNone) + if (qtcore.Load(QtCoreLibName) == KErrNone) { const int qt_symbian_SetupThreadHeap_eabi_ordinal = 3713; TLibraryFunction libFunc = qtcore.Lookup(qt_symbian_SetupThreadHeap_eabi_ordinal); -- cgit v0.12 From cafbb2943eea989b0eeadb0c54c151ad921691b9 Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Mon, 20 Dec 2010 19:44:53 +0100 Subject: Do not crash in case a future version of libdbus has a new kind of message. --- src/dbus/qdbusintegrator.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/dbus/qdbusintegrator.cpp b/src/dbus/qdbusintegrator.cpp index 1842e5a..f64b7ca 100644 --- a/src/dbus/qdbusintegrator.cpp +++ b/src/dbus/qdbusintegrator.cpp @@ -565,10 +565,8 @@ bool QDBusConnectionPrivate::handleMessage(const QDBusMessage &amsg) return true; case QDBusMessage::ReplyMessage: case QDBusMessage::ErrorMessage: - return false; // we don't handle those here case QDBusMessage::InvalidMessage: - Q_ASSERT_X(false, "QDBusConnection", "Invalid message found when processing"); - break; + return false; // we don't handle those here } return false; -- cgit v0.12 From fb9ded4e5e3e85672beef83945b3a7e17371368c Mon Sep 17 00:00:00 2001 From: Thiago Macieira Date: Wed, 22 Dec 2010 12:12:30 +0100 Subject: Work around an apparent GCC optimiser bug accessing arrays beyond end Accessing arrays beyond their end is known to cause problems in gcc 4.4 and 4.5. So don't try to be too smart in accessing m[0][index] but instead access the array as it's meant to be. Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247#c10 Reviewed-by: Olivier Goffart --- src/gui/math3d/qgenericmatrix.h | 68 ++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 28 deletions(-) diff --git a/src/gui/math3d/qgenericmatrix.h b/src/gui/math3d/qgenericmatrix.h index 3224ae2..f91bce7 100644 --- a/src/gui/math3d/qgenericmatrix.h +++ b/src/gui/math3d/qgenericmatrix.h @@ -198,52 +198,58 @@ Q_OUTOFLINE_TEMPLATE QGenericMatrix QGenericMatrix::transposed template Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator+=(const QGenericMatrix& other) { - for (int index = 0; index < N * M; ++index) - m[0][index] += other.m[0][index]; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + m[col][row] += other.m[col][row]; return *this; } template Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator-=(const QGenericMatrix& other) { - for (int index = 0; index < N * M; ++index) - m[0][index] -= other.m[0][index]; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + m[col][row] -= other.m[col][row]; return *this; } template Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator*=(T factor) { - for (int index = 0; index < N * M; ++index) - m[0][index] *= factor; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + m[col][row] *= factor; return *this; } template Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator==(const QGenericMatrix& other) const { - for (int index = 0; index < N * M; ++index) { - if (m[0][index] != other.m[0][index]) - return false; - } + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) { + if (m[col][row] != other.m[col][row]) + return false; + } return true; } template Q_OUTOFLINE_TEMPLATE bool QGenericMatrix::operator!=(const QGenericMatrix& other) const { - for (int index = 0; index < N * M; ++index) { - if (m[0][index] != other.m[0][index]) - return true; - } + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) { + if (m[col][row] != other.m[col][row]) + return true; + } return false; } template Q_OUTOFLINE_TEMPLATE QGenericMatrix& QGenericMatrix::operator/=(T divisor) { - for (int index = 0; index < N * M; ++index) - m[0][index] /= divisor; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + m[col][row] /= divisor; return *this; } @@ -251,8 +257,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator+(const QGenericMatrix& m1, const QGenericMatrix& m2) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = m1.m[0][index] + m2.m[0][index]; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = m1.m[col][row] + m2.m[col][row]; return result; } @@ -260,8 +267,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& m1, const QGenericMatrix& m2) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = m1.m[0][index] - m2.m[0][index]; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = m1.m[col][row] - m2.m[col][row]; return result; } @@ -284,8 +292,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator-(const QGenericMatrix& matrix) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = -matrix.m[0][index]; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = -matrix.m[col][row]; return result; } @@ -293,8 +302,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(T factor, const QGenericMatrix& matrix) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * factor; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = matrix.m[col][row] * factor; return result; } @@ -302,8 +312,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator*(const QGenericMatrix& matrix, T factor) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] * factor; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = matrix.m[col][row] * factor; return result; } @@ -311,8 +322,9 @@ template Q_OUTOFLINE_TEMPLATE QGenericMatrix operator/(const QGenericMatrix& matrix, T divisor) { QGenericMatrix result(1); - for (int index = 0; index < N * M; ++index) - result.m[0][index] = matrix.m[0][index] / divisor; + for (int row = 0; row < M; ++row) + for (int col = 0; col < N; ++col) + result.m[col][row] = matrix.m[col][row] / divisor; return result; } -- cgit v0.12 From bfd3a0d40932cb4ef2a35424a24e1961c3b21bb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 21 Dec 2010 15:14:23 +0100 Subject: Improve performance of bilinear upscaling of images with neon. Gives an improvement of around 19.6 % for upscaling a 256x256 pixmap to 480x480 with SmoothPixmapFilter enabled. Reviewed-by: Olivier Goffart --- src/gui/painting/qdrawhelper.cpp | 35 ++++++++++++++++++++++++++++++++--- 1 file changed, 32 insertions(+), 3 deletions(-) diff --git a/src/gui/painting/qdrawhelper.cpp b/src/gui/painting/qdrawhelper.cpp index fdb686d..4fd90ed 100644 --- a/src/gui/painting/qdrawhelper.cpp +++ b/src/gui/painting/qdrawhelper.cpp @@ -851,10 +851,9 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * } } -#if defined(QT_ALWAYS_HAVE_SSE2) if (blendType != BlendTransformedBilinearTiled && (format == QImage::Format_ARGB32_Premultiplied || format == QImage::Format_RGB32)) { - +#if defined(QT_ALWAYS_HAVE_SSE2) const __m128i disty_ = _mm_set1_epi16(disty); const __m128i idisty_ = _mm_set1_epi16(idisty); const __m128i colorMask = _mm_set1_epi32(0x00ff00ff); @@ -884,8 +883,38 @@ const uint * QT_FASTCALL fetchTransformedBilinear(uint *buffer, const Operator * rRB = _mm_srli_epi16(rRB, 8); _mm_storeu_si128((__m128i*)(&intermediate_buffer[0][f]), rRB); } - } +#elif defined(QT_ALWAYS_HAVE_NEON) + const int16x8_t disty_ = vdupq_n_s16(disty); + const int16x8_t idisty_ = vdupq_n_s16(idisty); + const int16x8_t colorMask = vdupq_n_s16(0x00ff); + + lim -= 3; + for (; f < lim; x += 4, f += 4) { + // Load 4 pixels from s1, and split the alpha-green and red-blue component + int16x8_t top = vld1q_s16((int16_t*)((const uint *)(s1)+x)); + int16x8_t topAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(top), 8)); + int16x8_t topRB = vandq_s16(top, colorMask); + // Multiplies each colour component by idisty + topAG = vmulq_s16(topAG, idisty_); + topRB = vmulq_s16(topRB, idisty_); + + // Same for the s2 vector + int16x8_t bottom = vld1q_s16((int16_t*)((const uint *)(s2)+x)); + int16x8_t bottomAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(bottom), 8)); + int16x8_t bottomRB = vandq_s16(bottom, colorMask); + bottomAG = vmulq_s16(bottomAG, disty_); + bottomRB = vmulq_s16(bottomRB, disty_); + + // Add the values, and shift to only keep 8 significant bits per colors + int16x8_t rAG = vaddq_s16(topAG, bottomAG); + rAG = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rAG), 8)); + vst1q_s16((int16_t*)(&intermediate_buffer[1][f]), rAG); + int16x8_t rRB = vaddq_s16(topRB, bottomRB); + rRB = vreinterpretq_s16_u16(vshrq_n_u16(vreinterpretq_u16_s16(rRB), 8)); + vst1q_s16((int16_t*)(&intermediate_buffer[0][f]), rRB); + } #endif + } for (; f < count; f++) { // Same as above but without sse2 if (blendType == BlendTransformedBilinearTiled) { if (x >= image_width) x -= image_width; -- cgit v0.12 From a5110b5d40b70fb44ed98aa8861b676df1e78385 Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 22 Dec 2010 14:34:16 +0100 Subject: Fix timer regression for indeterminate progressbars Indeterminate progressbars were broken since 4.7.0 due to 0f771c62f5253a969f5a8a81bfd9254b9bd58b8f Since start was never called on QElapsedTimer, the elaped time was undefined and resulted in random repaints and behavior for indeterminate progressbars. Task-number:QTBUG-15227 Reviewed-by:richard --- src/gui/styles/qwindowsstyle.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 720dd6d..654be3c 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -130,6 +130,7 @@ QWindowsStylePrivate::QWindowsStylePrivate() pSHGetStockIconInfo = (PtrSHGetStockIconInfo)shellLib.resolve("SHGetStockIconInfo"); } #endif + startTime.start(); } // Returns true if the toplevel parent of \a widget has seen the Alt-key -- cgit v0.12 From 462f5148a3be5835cc8d5b69685473042789c917 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Wed, 22 Dec 2010 15:39:28 +0200 Subject: Fix infinite loop in qmake when reading malformed .ts files. No checking for the end of xml file was done in while loop looking for TS element. Task-number: QTBUG-16261 Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symbiancommon.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/symbian/symbiancommon.cpp b/qmake/generators/symbian/symbiancommon.cpp index 602bcc2..d9f12b3 100644 --- a/qmake/generators/symbian/symbiancommon.cpp +++ b/qmake/generators/symbian/symbiancommon.cpp @@ -977,7 +977,7 @@ bool SymbianCommonGenerator::parseTsContent(const QString &tsFilename, SymbianLo QXmlStreamReader xml(&tsFile); - while (xml.name() != tsElement) + while (!xml.atEnd() && xml.name() != tsElement) xml.readNextStartElement(); while (xml.readNextStartElement()) { -- cgit v0.12 From f44f7084a3020ed8e249644d5b5e07f74cb7b070 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Wed, 22 Dec 2010 15:56:01 +0100 Subject: Doc: Sync with upstream. --- doc/src/snippets/declarative/focus/focusColumn.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/src/snippets/declarative/focus/focusColumn.qml b/doc/src/snippets/declarative/focus/focusColumn.qml index 9b761dd..42ee3da 100644 --- a/doc/src/snippets/declarative/focus/focusColumn.qml +++ b/doc/src/snippets/declarative/focus/focusColumn.qml @@ -4,7 +4,7 @@ ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** -** This file is part of the FOO module of the Qt Toolkit. +** This file is part of the documentation of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:BSD$ ** You may use this file under the terms of the BSD license as follows: -- cgit v0.12 From 8a3c4c8283e4762744a29262ce507713565c1c0c Mon Sep 17 00:00:00 2001 From: Jens Bache-Wiig Date: Wed, 22 Dec 2010 17:13:30 +0100 Subject: Fix crash in indeterminate progressbars on windows Note that this is a surgical fix for 4.7 only. In 4.8 we will add these checks at the top of the styling functions or in the widgets instead. Task-number:QTBUG-15227 Reviewed-by:gabi --- src/gui/styles/qcommonstyle.cpp | 5 +++-- src/gui/styles/qwindowsstyle.cpp | 4 +++- tests/auto/qstyle/tst_qstyle.cpp | 7 +++++++ 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/src/gui/styles/qcommonstyle.cpp b/src/gui/styles/qcommonstyle.cpp index 039a6da..1d7c838 100644 --- a/src/gui/styles/qcommonstyle.cpp +++ b/src/gui/styles/qcommonstyle.cpp @@ -1403,8 +1403,9 @@ void QCommonStyle::drawControl(ControlElement element, const QStyleOption *opt, } break; case CE_ProgressBarGroove: - qDrawShadePanel(p, opt->rect, opt->palette, true, 1, - &opt->palette.brush(QPalette::Window)); + if (opt->rect.isValid()) + qDrawShadePanel(p, opt->rect, opt->palette, true, 1, + &opt->palette.brush(QPalette::Window)); break; case CE_ProgressBarLabel: if (const QStyleOptionProgressBar *pb = qstyleoption_cast(opt)) { diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 654be3c..32a6d8d 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -2397,8 +2397,10 @@ void QWindowsStyle::drawControl(ControlElement ce, const QStyleOption *opt, QPai #ifndef QT_NO_PROGRESSBAR case CE_ProgressBarContents: if (const QStyleOptionProgressBar *pb = qstyleoption_cast(opt)) { - QRect rect = pb->rect; + if (!rect.isValid()) + return; + bool vertical = false; bool inverted = false; diff --git a/tests/auto/qstyle/tst_qstyle.cpp b/tests/auto/qstyle/tst_qstyle.cpp index ba24225..9c754d2 100644 --- a/tests/auto/qstyle/tst_qstyle.cpp +++ b/tests/auto/qstyle/tst_qstyle.cpp @@ -413,6 +413,13 @@ void tst_QStyle::testWindowsStyle() QWindowsStyle wstyle; testAllFunctions(&wstyle); lineUpLayoutTest(&wstyle); + + // Tests drawing indeterminate progress with 0 size: QTBUG-15973 + QStyleOptionProgressBar pb; + pb.rect = QRect(0,0,-9,0); + QPixmap surface(QSize(200, 200)); + QPainter painter(&surface); + wstyle.drawControl(QStyle::CE_ProgressBar, &pb, &painter, 0); } void tst_QStyle::testWindowsXPStyle() -- cgit v0.12 From b461c315547b42293968219583187d83b2b25e0f Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 22 Dec 2010 09:23:48 +1000 Subject: Add additional QDeclarativeProperty autotests. --- .../tst_qdeclarativeproperty.cpp | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp index 3cc71bb..41f2b19 100644 --- a/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp +++ b/tests/auto/declarative/qdeclarativeproperty/tst_qdeclarativeproperty.cpp @@ -167,6 +167,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -263,6 +264,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -309,6 +311,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); @@ -362,6 +365,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -408,6 +412,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); @@ -456,6 +461,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -503,6 +509,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -555,6 +562,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -601,6 +609,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); @@ -654,6 +663,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), false); QCOMPARE(prop.object(), (QObject *)0); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -700,6 +710,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), true); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), false); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::Normal); @@ -748,6 +759,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -795,6 +807,7 @@ void tst_qdeclarativeproperty::qmlmetaproperty_object_string_context() QCOMPARE(prop.isWritable(), false); QCOMPARE(prop.isDesignable(), false); QCOMPARE(prop.isResettable(), false); + QCOMPARE(prop.isSignalProperty(), true); QCOMPARE(prop.isValid(), true); QCOMPARE(prop.object(), qobject_cast(&dobject)); QCOMPARE(prop.propertyTypeCategory(), QDeclarativeProperty::InvalidCategory); @@ -922,6 +935,17 @@ void tst_qdeclarativeproperty::read() QCOMPARE(p.read(), QVariant("myName")); } + // Value prop by name (static) + { + QObject o; + + QCOMPARE(QDeclarativeProperty::read(&o, "objectName"), QVariant(QString())); + + o.setObjectName("myName"); + + QCOMPARE(QDeclarativeProperty::read(&o, "objectName"), QVariant("myName")); + } + // Value-type prop { PropertyObject o; @@ -994,6 +1018,16 @@ void tst_qdeclarativeproperty::read() QCOMPARE(qvariant_cast(v)->property("a").toInt(), 10); QCOMPARE(qvariant_cast(v)->property("b").toInt(), 19); } + { // static + QDeclarativeComponent component(&engine, TEST_FILE("readSynthesizedObject.qml")); + QObject *object = component.create(); + QVERIFY(object != 0); + + QVariant v = QDeclarativeProperty::read(object, "test", &engine); + QVERIFY(v.userType() == QMetaType::QObjectStar); + QCOMPARE(qvariant_cast(v)->property("a").toInt(), 10); + QCOMPARE(qvariant_cast(v)->property("b").toInt(), 19); + } // Attached property { @@ -1026,6 +1060,15 @@ void tst_qdeclarativeproperty::read() QCOMPARE(p.read(), QVariant(10)); delete object; } + { // static + QDeclarativeComponent component(&engine); + component.setData("import Test 1.0 as Foo\nFoo.MyContainer { Foo.MyContainer.foo: 10 }", QUrl()); + QObject *object = component.create(); + QVERIFY(object != 0); + + QCOMPARE(QDeclarativeProperty::read(object, "Foo.MyContainer.foo", qmlContext(object)), QVariant(10)); + delete object; + } } void tst_qdeclarativeproperty::write() @@ -1066,6 +1109,13 @@ void tst_qdeclarativeproperty::write() QCOMPARE(o.objectName(), QString("myName")); } + // Writable prop by name (static) + { + PropertyObject o; + QCOMPARE(QDeclarativeProperty::write(&o, QString("objectName"), QVariant(QString("myName"))), true); + QCOMPARE(o.objectName(), QString("myName")); + } + // Deleted object { PropertyObject *o = new PropertyObject; @@ -1138,6 +1188,18 @@ void tst_qdeclarativeproperty::write() QCOMPARE(p2.write(QUrl("main.qml")), true); QCOMPARE(o.url(), result); } + { // static + PropertyObject o; + + QCOMPARE(QDeclarativeProperty::write(&o, "url", QUrl("main.qml")), true); + QCOMPARE(o.url(), QUrl("main.qml")); + + QUrl result = engine.baseUrl().resolved(QUrl("main.qml")); + QVERIFY(result != QUrl("main.qml")); + + QCOMPARE(QDeclarativeProperty::write(&o, "url", QUrl("main.qml"), engine.rootContext()), true); + QCOMPARE(o.url(), result); + } // Attached property { -- cgit v0.12 From f360cc9b521e5e3e7d4b896627b3257365c6ad3c Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 22 Dec 2010 10:05:06 +1000 Subject: Improve QDeclarativeComponent test coverage. --- src/declarative/qml/qdeclarativecomponent.cpp | 11 ----------- src/declarative/qml/qdeclarativecomponent_p.h | 1 - .../qdeclarativecomponent/tst_qdeclarativecomponent.cpp | 15 +++++++++++++++ 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/src/declarative/qml/qdeclarativecomponent.cpp b/src/declarative/qml/qdeclarativecomponent.cpp index 77fc925..ecb3bc5 100644 --- a/src/declarative/qml/qdeclarativecomponent.cpp +++ b/src/declarative/qml/qdeclarativecomponent.cpp @@ -699,17 +699,6 @@ QObject *QDeclarativeComponent::create(QDeclarativeContext *context) return rv; } -QObject *QDeclarativeComponentPrivate::create(QDeclarativeContextData *context, - const QBitField &bindings) -{ - if (!context) - context = QDeclarativeContextData::get(engine->rootContext()); - - QObject *rv = beginCreate(context, bindings); - completeCreate(); - return rv; -} - /*! This method provides more advanced control over component instance creation. In general, programmers should use QDeclarativeComponent::create() to create a diff --git a/src/declarative/qml/qdeclarativecomponent_p.h b/src/declarative/qml/qdeclarativecomponent_p.h index 7b30bad..daf1dcb 100644 --- a/src/declarative/qml/qdeclarativecomponent_p.h +++ b/src/declarative/qml/qdeclarativecomponent_p.h @@ -81,7 +81,6 @@ class Q_AUTOTEST_EXPORT QDeclarativeComponentPrivate : public QObjectPrivate, pu public: QDeclarativeComponentPrivate() : typeData(0), progress(0.), start(-1), count(-1), cc(0), engine(0), creationContext(0) {} - QObject *create(QDeclarativeContextData *, const QBitField &); QObject *beginCreate(QDeclarativeContextData *, const QBitField &); void completeCreate(); diff --git a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp index 8a19b8b..60ce46d 100644 --- a/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp +++ b/tests/auto/declarative/qdeclarativecomponent/tst_qdeclarativecomponent.cpp @@ -57,6 +57,7 @@ public: tst_qdeclarativecomponent() { } private slots: + void null(); void loadEmptyUrl(); void qmlCreateObject(); @@ -64,6 +65,20 @@ private: QDeclarativeEngine engine; }; +void tst_qdeclarativecomponent::null() +{ + { + QDeclarativeComponent c; + QVERIFY(c.isNull()); + } + + { + QDeclarativeComponent c(&engine); + QVERIFY(c.isNull()); + } +} + + void tst_qdeclarativecomponent::loadEmptyUrl() { QDeclarativeComponent c(&engine); -- cgit v0.12 From 01fd44cd76f2da1dd1e39d7e5632b3274ca895a3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 10:20:23 +1000 Subject: Nested flickables would react alternately to flicks. The grab was not always kept by filtering Flickables, but would remain set next flick, resulting in toggling of flicking. Task-number: QTBUG-16177 Reviewed-by: Michael Brasser --- .../graphicsitems/qdeclarativeflickable.cpp | 6 +- .../data/flickable-nested.0.png | Bin 0 -> 1710 bytes .../data/flickable-nested.1.png | Bin 0 -> 1710 bytes .../data/flickable-nested.2.png | Bin 0 -> 1727 bytes .../data/flickable-nested.3.png | Bin 0 -> 1727 bytes .../data/flickable-nested.4.png | Bin 0 -> 1727 bytes .../data/flickable-nested.5.png | Bin 0 -> 1731 bytes .../data/flickable-nested.qml | 2159 ++++++++++++++++++++ .../qdeclarativeflickable/flickable-nested.qml | 50 + 9 files changed, 2213 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.2.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.3.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.4.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.5.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-nested.qml diff --git a/src/declarative/graphicsitems/qdeclarativeflickable.cpp b/src/declarative/graphicsitems/qdeclarativeflickable.cpp index f1d92c5..f5da491 100644 --- a/src/declarative/graphicsitems/qdeclarativeflickable.cpp +++ b/src/declarative/graphicsitems/qdeclarativeflickable.cpp @@ -671,10 +671,12 @@ void QDeclarativeFlickable::setFlickableDirection(FlickableDirection direction) void QDeclarativeFlickablePrivate::handleMousePressEvent(QGraphicsSceneMouseEvent *event) { + Q_Q(QDeclarativeFlickable); if (interactive && timeline.isActive() && (qAbs(hData.velocity) > 10 || qAbs(vData.velocity) > 10)) stealMouse = true; // If we've been flicked then steal the click. else stealMouse = false; + q->setKeepMouseGrab(stealMouse); pressed = true; timeline.clear(); hData.velocity = 0; @@ -769,6 +771,8 @@ void QDeclarativeFlickablePrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent } stealMouse = stealX || stealY; + if (stealMouse) + q->setKeepMouseGrab(true); if (!lastPos.isNull()) { qreal elapsed = qreal(QDeclarativeItemPrivate::restart(lastPosTime)) / 1000.; @@ -848,8 +852,6 @@ void QDeclarativeFlickable::mouseMoveEvent(QGraphicsSceneMouseEvent *event) Q_D(QDeclarativeFlickable); if (d->interactive) { d->handleMouseMoveEvent(event); - if (d->stealMouse) - setKeepMouseGrab(true); event->accept(); } else { QDeclarativeItem::mouseMoveEvent(event); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.0.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.0.png new file mode 100644 index 0000000..464d913 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.1.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.1.png new file mode 100644 index 0000000..464d913 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.2.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.2.png new file mode 100644 index 0000000..b16b9f0 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.3.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.3.png new file mode 100644 index 0000000..c3d2a6f Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.4.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.4.png new file mode 100644 index 0000000..d074e73 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.5.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.5.png new file mode 100644 index 0000000..0cac34c Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.qml new file mode 100644 index 0000000..c418cc8 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-nested.qml @@ -0,0 +1,2159 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "flickable-nested.0.png" + } + Frame { + msec: 32 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 48 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 64 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 80 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 96 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 112 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 128 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 144 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 160 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 176 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 192 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 208 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 224 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 240 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 256 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 272 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 288 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 304 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 320 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 336 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 352 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 368 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 384 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 400 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 416 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 432 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 448 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 464 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 480 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 496 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 512 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 528 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 544 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 560 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 576 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 592 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 608 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 624 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 640 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 656 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 672 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 688 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 704 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 720 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 736 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 752 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 768 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 784 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 800 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 816 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 832 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 848 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 864 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 880 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 896 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 912 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 928 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 206; y: 205 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 944 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Frame { + msec: 960 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 206; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 976 + image: "flickable-nested.1.png" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 206; y: 203 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 206; y: 202 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 992 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 205; y: 201 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 205; y: 199 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1008 + hash: "7523750f0fd21aff13e6ab379e87640d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 204; y: 197 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 202; y: 196 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1024 + hash: "bddf8ca2638c9a04f7029d6982152d11" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 198; y: 191 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 197; y: 189 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1040 + hash: "bc15f1b562879d5058d3b1336fb9074e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 194; y: 185 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 194; y: 184 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1056 + hash: "3572c62d7d2b9b23a8d9d3e5037591dd" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 194; y: 182 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 194; y: 182 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1072 + hash: "ce9658887cca581a88e7db14b92d46f2" + } + Frame { + msec: 1088 + hash: "e1fe1a2e1669a200e20468b4aa98dd3d" + } + Frame { + msec: 1104 + hash: "b7582829bf01223e6641ce82f62047df" + } + Frame { + msec: 1120 + hash: "80bd41fe22fb84efb011acf50ec38574" + } + Frame { + msec: 1136 + hash: "04c8d6c3922ce9777ee27d8df59d4729" + } + Frame { + msec: 1152 + hash: "f84dba18e525f1c06548c0232a244b6d" + } + Frame { + msec: 1168 + hash: "26c74b95835e8e0da5aadc7c42cac81c" + } + Frame { + msec: 1184 + hash: "1b4fcb1f0bd83a683cfe0ac303be0033" + } + Frame { + msec: 1200 + hash: "1b4fcb1f0bd83a683cfe0ac303be0033" + } + Frame { + msec: 1216 + hash: "4df47f90656fff253883e3e2d33506dc" + } + Frame { + msec: 1232 + hash: "4df47f90656fff253883e3e2d33506dc" + } + Frame { + msec: 1248 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1264 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1280 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1296 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1312 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1328 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1344 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1360 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1376 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1392 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1408 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1424 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1440 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1456 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1472 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1488 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1504 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1520 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1536 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1552 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1568 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1584 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Frame { + msec: 1600 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 226; y: 218 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1616 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 225; y: 218 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1632 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 223; y: 217 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 222; y: 217 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1648 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 220; y: 216 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 218; y: 214 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1664 + hash: "7d0d94c4a7a9330f5bd17782ca484848" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 214; y: 212 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 212; y: 211 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1680 + hash: "54b41609ba43f710b08ba63f0b96df99" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 208; y: 208 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 207; y: 207 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1696 + hash: "8910b66b9eb1b2be80e36ed2824df1a0" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 205; y: 205 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 205; y: 205 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1712 + hash: "38df31933f34f961a9b7020ad0d469c2" + } + Frame { + msec: 1728 + hash: "7702a7f710991225d9f411e8f410b515" + } + Frame { + msec: 1744 + hash: "c90d402e68208ccfd2c7345a2bf650cd" + } + Frame { + msec: 1760 + hash: "2630ed37aaf37907d1ee48efb0239615" + } + Frame { + msec: 1776 + hash: "527725818699ce3425b5cb95a25610d5" + } + Frame { + msec: 1792 + hash: "7bd6e37853946a835973c3da213beddc" + } + Frame { + msec: 1808 + hash: "e3c5e113d992e5e50b6780185891edd7" + } + Frame { + msec: 1824 + hash: "e3c5e113d992e5e50b6780185891edd7" + } + Frame { + msec: 1840 + hash: "20ced2b9960931c4c0cbe8bcc1f9e52a" + } + Frame { + msec: 1856 + hash: "09710c8964c8b010a90c67f126acdefa" + } + Frame { + msec: 1872 + hash: "09710c8964c8b010a90c67f126acdefa" + } + Frame { + msec: 1888 + hash: "09710c8964c8b010a90c67f126acdefa" + } + Frame { + msec: 1904 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 1920 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 1936 + image: "flickable-nested.2.png" + } + Frame { + msec: 1952 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 1968 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 1984 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2000 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2016 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2032 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2048 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2064 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2080 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2096 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2112 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2128 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2144 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2160 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2176 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2192 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2208 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2224 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2240 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2256 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2272 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2288 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Frame { + msec: 2304 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 274; y: 218 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2320 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 273; y: 218 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 273; y: 217 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2336 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 272; y: 215 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 272; y: 213 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2352 + hash: "e80b03bd168ec62aba64cdf75dcd1d5f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 271; y: 210 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 270; y: 208 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2368 + hash: "79a132ab719ccdf48d367cca443cd835" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 269; y: 204 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 269; y: 202 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2384 + hash: "1f19e7d2c7494f5b603dee16e211d65d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 196 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 193 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2400 + hash: "64fd22407c77fac28d13035ce78c67b2" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 186 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 266; y: 177 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2416 + hash: "f05a0f956b4964d4ebff056b63252297" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 265; y: 173 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 264; y: 167 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2432 + hash: "3de1e9a2b33e37b0fe3b799b68ec22d6" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 263; y: 164 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 263; y: 164 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2448 + hash: "71f115c60d4f20422e4ac3f319644c48" + } + Frame { + msec: 2464 + hash: "c3995ac89f0a4b3fb07401479538d338" + } + Frame { + msec: 2480 + hash: "950e83408adf55f4e7fc1c0c127caa89" + } + Frame { + msec: 2496 + hash: "5b335621a76a527d058708384c2e5635" + } + Frame { + msec: 2512 + hash: "a201ae31d5bb778bd44a49dd21951c1b" + } + Frame { + msec: 2528 + hash: "550e6708a8999d56d1f57c121228692f" + } + Frame { + msec: 2544 + hash: "d8eb4dd2b3cf50273cb7dfbb5bd658b9" + } + Frame { + msec: 2560 + hash: "aa1fd0a990e42175acc84de96b384e9d" + } + Frame { + msec: 2576 + hash: "0236fb15db30da5ec794444affee1169" + } + Frame { + msec: 2592 + hash: "a7445a70874a9767462e79e1dff88dbc" + } + Frame { + msec: 2608 + hash: "339ea6bd5b486ff85272e19e07669f0b" + } + Frame { + msec: 2624 + hash: "2b24d9d17c77cd0ac52989328dcf499b" + } + Frame { + msec: 2640 + hash: "2b24d9d17c77cd0ac52989328dcf499b" + } + Frame { + msec: 2656 + hash: "e2fcfe4f3e14e46404eb6955502180a1" + } + Frame { + msec: 2672 + hash: "5d0c9601b871690047f4df91723ccfb1" + } + Frame { + msec: 2688 + hash: "5d0c9601b871690047f4df91723ccfb1" + } + Frame { + msec: 2704 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2720 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2736 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2752 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2768 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2784 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2800 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2816 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2832 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2848 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2864 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2880 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2896 + image: "flickable-nested.3.png" + } + Frame { + msec: 2912 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2928 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2944 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Frame { + msec: 2960 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 268; y: 102 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2976 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 103 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 104 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2992 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 268; y: 105 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 269; y: 108 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3008 + hash: "5b5d7e880e9f4942f52a3cde738dc7fb" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 270; y: 111 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 270; y: 114 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3024 + hash: "2b24d9d17c77cd0ac52989328dcf499b" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 271; y: 119 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 272; y: 122 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3040 + hash: "550e6708a8999d56d1f57c121228692f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 273; y: 130 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 274; y: 138 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3056 + hash: "57f3c0a49cef2137e3cfa435396c099e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 274; y: 142 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 274; y: 149 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3072 + hash: "0fffc659a270cc614d16ddf3fa2ab51d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 274; y: 153 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 274; y: 161 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3088 + hash: "a8d937c8379950299a6e3611ff313415" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 273; y: 165 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 272; y: 172 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3104 + hash: "46cfebbf821a08aa30055bfa8fffd137" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 271; y: 175 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 270; y: 180 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 270; y: 180 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3120 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3136 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3152 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3168 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3184 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3200 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3216 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3232 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3248 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3264 + hash: "20a32ee8ae2cf88a2cfdb2dd8552255a" + } + Frame { + msec: 3280 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3296 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3312 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3328 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3344 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3360 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3376 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3392 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3408 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3424 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3440 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3456 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3472 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3488 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3504 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3520 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3536 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3552 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3568 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 3584 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 352; y: 206 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3600 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 205 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 204 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3616 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 201 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 196 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3632 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 193 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 185 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3648 + hash: "eb718f97648438dae1440e2089434b0a" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 176 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 352; y: 172 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3664 + hash: "e4a2b82752939f351ac46032f2d3333e" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 353; y: 163 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 354; y: 158 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3680 + hash: "ab1099a146433a5ec77b336673d0527c" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 356; y: 148 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 356; y: 142 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3696 + hash: "7e4ca5ba45d5de10d72ef5ab1171ead5" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 357; y: 130 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 357; y: 130 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3712 + hash: "417bb78fc4f255194a71193e388b752f" + } + Frame { + msec: 3728 + hash: "be63b1e57006d881a345db3ca66e7097" + } + Frame { + msec: 3744 + hash: "e1b96137c2cc0ef18e224a32f665de9d" + } + Frame { + msec: 3760 + hash: "6157ba3962fc7829e8693e2456fd6e8e" + } + Frame { + msec: 3776 + hash: "951ae231b7b18517f8d6504ce7f01b3d" + } + Frame { + msec: 3792 + hash: "57f60f9da1a204cc7eb930575de45ae4" + } + Frame { + msec: 3808 + hash: "008323603b48a55b589af7cbb2f1c8b0" + } + Frame { + msec: 3824 + hash: "b8447e994280cba5ccddc36e7ad3c927" + } + Frame { + msec: 3840 + hash: "98dfc2d6573e5cb7a56a893b8fecf422" + } + Frame { + msec: 3856 + image: "flickable-nested.4.png" + } + Frame { + msec: 3872 + hash: "09dabc3ef85dc857719e7d20111e6023" + } + Frame { + msec: 3888 + hash: "5864c4197fe3269c3f1ad05caf25832e" + } + Frame { + msec: 3904 + hash: "370a471a614d22d281d9987a5b6a42bf" + } + Frame { + msec: 3920 + hash: "36c74e2e325807c7c06e941581613f48" + } + Frame { + msec: 3936 + hash: "e1e2b69992294dc611e6eef7e259d4cd" + } + Frame { + msec: 3952 + hash: "e1e2b69992294dc611e6eef7e259d4cd" + } + Frame { + msec: 3968 + hash: "e1e2b69992294dc611e6eef7e259d4cd" + } + Frame { + msec: 3984 + hash: "36c74e2e325807c7c06e941581613f48" + } + Frame { + msec: 4000 + hash: "36c74e2e325807c7c06e941581613f48" + } + Frame { + msec: 4016 + hash: "bd8f39423d96fceaf577c7f792b61211" + } + Frame { + msec: 4032 + hash: "370a471a614d22d281d9987a5b6a42bf" + } + Frame { + msec: 4048 + hash: "c8fe4424d96460a2503632e3a54d4f6a" + } + Frame { + msec: 4064 + hash: "09dabc3ef85dc857719e7d20111e6023" + } + Frame { + msec: 4080 + hash: "22bff1406eba529d58320b8b19be76d9" + } + Frame { + msec: 4096 + hash: "478bc04322b93b75b5185d047c2898b7" + } + Frame { + msec: 4112 + hash: "98dfc2d6573e5cb7a56a893b8fecf422" + } + Frame { + msec: 4128 + hash: "03b96d3e148e86f1150b09696012d07c" + } + Frame { + msec: 4144 + hash: "735b24d2811beef969477c8b0f400d32" + } + Frame { + msec: 4160 + hash: "b8399d2a7a6de0b5f81e68e8f8825622" + } + Frame { + msec: 4176 + hash: "766a97e0881b623a0de93babfa841125" + } + Frame { + msec: 4192 + hash: "008323603b48a55b589af7cbb2f1c8b0" + } + Frame { + msec: 4208 + hash: "3da913235e4916b4691e3d089dc7b52f" + } + Frame { + msec: 4224 + hash: "3da913235e4916b4691e3d089dc7b52f" + } + Frame { + msec: 4240 + hash: "8c7f6ff7b3db65d7dd9ac4d18545f0d1" + } + Frame { + msec: 4256 + hash: "8c7f6ff7b3db65d7dd9ac4d18545f0d1" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 346; y: 95 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4272 + hash: "8c7f6ff7b3db65d7dd9ac4d18545f0d1" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 346; y: 98 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 346; y: 103 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4288 + hash: "951ae231b7b18517f8d6504ce7f01b3d" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 348; y: 110 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 348; y: 115 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4304 + hash: "364283bbbcedabc87689ec174ae29818" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 351; y: 124 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 353; y: 129 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4320 + hash: "6a8a59ba8cf0539704fc035d7d5def41" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 358; y: 141 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 361; y: 145 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4336 + hash: "d4626b39fbf24cc6a4e23ef33a570add" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 370; y: 163 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4352 + hash: "255604ac684a18e272dccfa9a81fa1bb" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 376; y: 172 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4368 + hash: "2696641e48ea2a0ccfc65057b283814f" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 377; y: 175 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 377; y: 175 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 4384 + hash: "4ae011d8d81c57f9e2495d32a90fb5c0" + } + Frame { + msec: 4400 + hash: "c07f57059244b1164e698430b20aac8e" + } + Frame { + msec: 4416 + hash: "d39c21bc6fc079c76ea78d1a3fb0c974" + } + Frame { + msec: 4432 + hash: "f955985ee02fcb810ab8c5f4790f5c12" + } + Frame { + msec: 4448 + hash: "d06b83769bf0f0331e53c270f5dc294c" + } + Frame { + msec: 4464 + hash: "a49ef3866e3f71c26c57fcd616a6dc4c" + } + Frame { + msec: 4480 + hash: "086f4bb966b2076f51b1f615368afda5" + } + Frame { + msec: 4496 + hash: "898de0b200cb83c9724869dd2b74ed52" + } + Frame { + msec: 4512 + hash: "47833f93c5c55f57de5733950ba53714" + } + Frame { + msec: 4528 + hash: "0ced71db7e8c5b8ce8e195a7b821507d" + } + Frame { + msec: 4544 + hash: "84888b8748e297ed4e0525019865ea2b" + } + Frame { + msec: 4560 + hash: "0f62d1aaa0fec0dd90351258a3745869" + } + Frame { + msec: 4576 + hash: "e34a874942161ea830907f94040fc0a5" + } + Frame { + msec: 4592 + hash: "9031e4ad8ee57a8b826d6a6394f0feb9" + } + Frame { + msec: 4608 + hash: "9031e4ad8ee57a8b826d6a6394f0feb9" + } + Frame { + msec: 4624 + hash: "cc8a2477368001015b68c99db95ebaa1" + } + Frame { + msec: 4640 + hash: "01c0f4d5b155eb16ac364b24d5085bac" + } + Frame { + msec: 4656 + hash: "4c4f318b03e0da461bcecb61f43ef3cd" + } + Frame { + msec: 4672 + hash: "dffd22d719f18c943cd0c30afe272434" + } + Frame { + msec: 4688 + hash: "4f7ab0450512ae1319dad22a6e0400b7" + } + Frame { + msec: 4704 + hash: "ea29e23bdb49a30694640dfb078c796a" + } + Frame { + msec: 4720 + hash: "80739ed287906d0b55297be4b74a54cb" + } + Frame { + msec: 4736 + hash: "8d9117cf841c4b158f30b79ac8f2afb0" + } + Frame { + msec: 4752 + hash: "1850e9117160b2bd1865274092f9ec84" + } + Frame { + msec: 4768 + hash: "07945c8954860895f95f8e352c49e0a5" + } + Frame { + msec: 4784 + hash: "d0fa6087d2859446ff8f317c9d7dafe1" + } + Frame { + msec: 4800 + hash: "8ebba2084793d90a640ec2fb12dc0547" + } + Frame { + msec: 4816 + image: "flickable-nested.5.png" + } + Frame { + msec: 4832 + hash: "77d479675c36ecda0926061449f5a60b" + } + Frame { + msec: 4848 + hash: "77d479675c36ecda0926061449f5a60b" + } + Frame { + msec: 4864 + hash: "b968c1528ce7ecf80008fbd56f0ca9a9" + } + Frame { + msec: 4880 + hash: "b968c1528ce7ecf80008fbd56f0ca9a9" + } + Frame { + msec: 4896 + hash: "b968c1528ce7ecf80008fbd56f0ca9a9" + } + Frame { + msec: 4912 + hash: "b968c1528ce7ecf80008fbd56f0ca9a9" + } + Frame { + msec: 4928 + hash: "b968c1528ce7ecf80008fbd56f0ca9a9" + } + Frame { + msec: 4944 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 4960 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 4976 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 4992 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5008 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5024 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5040 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5056 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5072 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5088 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5104 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5120 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5136 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5152 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5168 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5184 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5200 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5216 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5232 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5248 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5264 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5280 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5296 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5312 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5328 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5344 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5360 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5376 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5392 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5408 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5424 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5440 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5456 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5472 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5488 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5504 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5520 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5536 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5552 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5568 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5584 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5600 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5616 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5632 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5648 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5664 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5680 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } + Frame { + msec: 5696 + hash: "38f29e86bd9bfe4df04c6411374f76ae" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-nested.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-nested.qml new file mode 100644 index 0000000..9335b9e --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/flickable-nested.qml @@ -0,0 +1,50 @@ +import QtQuick 1.0 + +Item { + width: 640 + height: 400 + + Flickable { + objectName: "flick 1" + anchors.fill: parent + contentWidth: width + 100 + contentHeight: height + 100 + + Rectangle { + width: 300 + height: 300 + color: "blue" + + Flickable { + objectName: "flick 2" + width: 300 + height: 300 + clip: true + contentWidth: 400 + contentHeight: 400 + + Rectangle { + width: 100 + height: 100 + anchors.centerIn: parent + color: "yellow" + + Flickable { + objectName: "flick 3" + anchors.fill: parent + clip: true + contentWidth: 150 + contentHeight: 150 + Rectangle { + x: 80 + y: 80 + width: 50 + height: 50 + color: "green" + } + } + } + } + } + } +} -- cgit v0.12 From 1699e8240b8073241f1aaddc12ded6065ef520b9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 11:02:04 +1000 Subject: Ensure PathView doesn't jump when starting to drag. Task-number: QTBUG-16133 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativepathview.cpp | 4 +- .../data/test-pathview-2.0.png | Bin 1114 -> 1114 bytes .../data/test-pathview-2.1.png | Bin 1105 -> 1119 bytes .../data/test-pathview-2.2.png | Bin 1088 -> 1102 bytes .../data/test-pathview-2.3.png | Bin 1096 -> 1092 bytes .../data/test-pathview-2.4.png | Bin 1143 -> 1143 bytes .../data/test-pathview-2.5.png | Bin 1143 -> 1143 bytes .../qdeclarativepathview/data/test-pathview-2.qml | 366 +++++------ .../qdeclarativepathview/data/test-pathview.0.png | Bin 1169 -> 1169 bytes .../qdeclarativepathview/data/test-pathview.1.png | Bin 1182 -> 1172 bytes .../qdeclarativepathview/data/test-pathview.2.png | Bin 1211 -> 1201 bytes .../qdeclarativepathview/data/test-pathview.3.png | Bin 1184 -> 1164 bytes .../qdeclarativepathview/data/test-pathview.4.png | Bin 1152 -> 1226 bytes .../qdeclarativepathview/data/test-pathview.5.png | Bin 1141 -> 1192 bytes .../qdeclarativepathview/data/test-pathview.6.png | Bin 1189 -> 1188 bytes .../qdeclarativepathview/data/test-pathview.qml | 672 ++++++++++----------- .../qdeclarativepathview/test-pathview.qml | 2 + 17 files changed, 524 insertions(+), 520 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index 87ea214..a6f44b3 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1133,8 +1133,10 @@ void QDeclarativePathViewPrivate::handleMouseMoveEvent(QGraphicsSceneMouseEvent QPointF pathPoint = pointNear(event->pos(), &newPc); if (!stealMouse) { QPointF delta = pathPoint - startPoint; - if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) + if (qAbs(delta.x()) > QApplication::startDragDistance() || qAbs(delta.y()) > QApplication::startDragDistance()) { stealMouse = true; + startPc = newPc; + } } if (stealMouse) { diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png index 699f83e..347e773 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png index a742a6a..370ca80 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png index 71abae2..97e3906 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png index a6e6b3e..5fa3c67 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png index 9f125c4..ce11c09 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png index 41d0cd5..d155742 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml index b75d140..304d5c7 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml @@ -222,7 +222,7 @@ VisualTest { } Frame { msec: 752 - hash: "e21cac055208e47e267ac906c7c2ca9c" + hash: "d2dda5bec262721d653e88ec3eaeca57" } Mouse { type: 5 @@ -234,7 +234,7 @@ VisualTest { } Frame { msec: 768 - hash: "131e094a79edbeea9a1b981592e55abf" + hash: "d61d21ab4d83b8578494720d9bfe6fa8" } Mouse { type: 5 @@ -254,7 +254,7 @@ VisualTest { } Frame { msec: 784 - hash: "73faabf52bd2af8d8b9d28ce21e5e77b" + hash: "0a178235529d721529e8dc3b439a64c9" } Mouse { type: 5 @@ -266,7 +266,7 @@ VisualTest { } Frame { msec: 800 - hash: "359554a95362db1734f606cf677001fc" + hash: "c800609ffea814ba7cc2441790157245" } Mouse { type: 5 @@ -286,43 +286,43 @@ VisualTest { } Frame { msec: 816 - hash: "8ef4ecc5c5ba578f0279dc57a6c17ccd" + hash: "afcb452d41c6e895309bb921a1ad1d31" } Frame { msec: 832 - hash: "69c3d9d2700dd395b656b0b09fa63511" + hash: "02d8f91c33f62aaf366bcfd03d232269" } Frame { msec: 848 - hash: "2bbcc36d72c3e9a4b672a46f2aae5076" + hash: "1ba9bc8c2b941fd0ec82f211eb559682" } Frame { msec: 864 - hash: "125a5f0c8efdf97676edbe379660dcce" + hash: "ee8680df3c58a48f3fff4a8fc221e38c" } Frame { msec: 880 - hash: "4347a02227207fbf870b6aed76131619" + hash: "36c04a2bd58124877a332bb6a262a7e5" } Frame { msec: 896 - hash: "e08b494c818669bfc48273598574d22e" + hash: "e6ea836d68c54a8308e10f33d4eb8b98" } Frame { msec: 912 - hash: "186cb5465f45c0df8082ec8cad6ee8b1" + hash: "f2400819feb116ae3b327284bbb292ff" } Frame { msec: 928 - hash: "91d04d4469492c3bb2a1ed415dcd904c" + hash: "5d9a3458cb59ede36e7b51bac869785a" } Frame { msec: 944 - hash: "8cc8ef251d68af926a8f300b8666ecfd" + hash: "b859b690c633a9fec87941e7c89f5d19" } Frame { msec: 960 - hash: "42f64722245f8519386e75ce7e3c0cd9" + hash: "ef0b66e789a8e88389e16bfa36b9f6e2" } Frame { msec: 976 @@ -330,195 +330,195 @@ VisualTest { } Frame { msec: 992 - hash: "058311da9dcf73a4b4928038334b04b5" + hash: "493e3c7b0de4a7b4b46678fe4ce9a763" } Frame { msec: 1008 - hash: "ea662934ee0c3c8d4dbde3ad49448922" + hash: "b7056d635c69b8e5bf98872f4c07ed43" } Frame { msec: 1024 - hash: "01991a871819e7bdbf817580f720ead6" + hash: "68aa8bd6709e1b49cfefc4594c236c46" } Frame { msec: 1040 - hash: "69a7fe47ae589bcc2607cc42fcea7451" + hash: "4b28ebf737b8c4228771122d844b8166" } Frame { msec: 1056 - hash: "8240d087b767311e00b7dd4b8726246c" + hash: "b04155316770a1265e5dc431e1b9a9a1" } Frame { msec: 1072 - hash: "cc70c8e79d68f09e6db0dd43b99906b7" + hash: "d540453541aba394b0958cdc48f91d48" } Frame { msec: 1088 - hash: "2bfabef74bc6e1dbf72111838a0e7557" + hash: "b3e7cbc83c65ec61c768757798b17c58" } Frame { msec: 1104 - hash: "66616f01553364c5bd589b781e22163a" + hash: "b12b31d4959a697fcc8e54f1c846eef9" } Frame { msec: 1120 - hash: "58b9de84ebdaabee3917608f2af3bbdb" + hash: "77c3bbb94471cfbfd23cc3914d796dfc" } Frame { msec: 1136 - hash: "964d96b9b783efb1053501f8a6931248" + hash: "41975592e60f08a0296a8babe1da2df3" } Frame { msec: 1152 - hash: "055b77b921a2bac71b6780ab3179f19f" + hash: "0a5eea8a11b15ee8583f187f336f56c7" } Frame { msec: 1168 - hash: "074904f31b4f7cf0679f0bf7bba30af2" + hash: "bf9c02945fdee4b06353f8f7f4fca2a3" } Frame { msec: 1184 - hash: "f020a490b6800d5b4402ecb9a8bcd436" + hash: "157c92d133a39a2b1d20a551303d2f6f" } Frame { msec: 1200 - hash: "1615bdedf92f91f089e494d893840c4b" + hash: "213716cad9fa2179a17a512e8c03c8f5" } Frame { msec: 1216 - hash: "b6892f6a5db6d211f0d1bb2bbe5045bf" + hash: "0ec517c50e9e36fef4fb14318e298723" } Frame { msec: 1232 - hash: "5f0d903ba682923ac69454026a359ed9" + hash: "bab010fe0f5d3b57fd556a9b709c285e" } Frame { msec: 1248 - hash: "da5bae496a9ad28585151f4c75ee0c9f" + hash: "b6bdf2f21c4137d4b5f25e0fe728bba5" } Frame { msec: 1264 - hash: "68f553248f7ca116671782d1c357b552" + hash: "c091e46064c8096568224ed7e4c8dc4f" } Frame { msec: 1280 - hash: "5503df04dd7f4c88314f9d309a5b36b4" + hash: "c0a6ede96566533ab35384afa535530f" } Frame { msec: 1296 - hash: "cc48c1f58b553adcb27d60f176e2b910" + hash: "f61f5c7617700b9aad71206cfc9e402e" } Frame { msec: 1312 - hash: "661f546199d8753a7b6f6ccea5928c12" + hash: "c70c106d128051c06da3acdf817f5ffb" } Frame { msec: 1328 - hash: "0fd70052c100f77bddbad177d9e5573d" + hash: "624d7c7fb2f39225d51d1a548aa186ed" } Frame { msec: 1344 - hash: "488e0652c0ed82a014de63a64145c34c" + hash: "f052610f17a7484bf6cb2bd07aa91af6" } Frame { msec: 1360 - hash: "8b6bf2519080a6e4a61fe216f72dfa09" + hash: "44cd80041a1965c8c60fdffd9ae19395" } Frame { msec: 1376 - hash: "4dab1827f6ce9561297fce8e067df1bd" + hash: "7597f86b537fbd70260908c973f9db21" } Frame { msec: 1392 - hash: "b3f4c5cd728eaf2b791612a7fea64e7b" + hash: "30cd60db9aa2df2adc7d01091c905cb4" } Frame { msec: 1408 - hash: "3d01abd0b8a5a62d58a4c09546f212d8" + hash: "8da4613759e9bcb926a0c84556213eb5" } Frame { msec: 1424 - hash: "e76796498cf595c60d4b60cc0e320601" + hash: "1085fcc81f0aed8508817839ca748359" } Frame { msec: 1440 - hash: "1b31e96f2823e78a0c4029e7bc45b9f2" + hash: "b87f002bf6fb0684f0b3cf565507e066" } Frame { msec: 1456 - hash: "f75c182dc24f4fabe1034ee494dba2ad" + hash: "b60916a57aec6ebbd8b69be7c8d66e19" } Frame { msec: 1472 - hash: "646c12edadf350405709860381cfced6" + hash: "a28e1538d18ccb7485d0306b9f7b18a6" } Frame { msec: 1488 - hash: "b6719406da9f2484fe55e3c69184f86c" + hash: "832c857f2e05f2f82308cbf91f7bf401" } Frame { msec: 1504 - hash: "5456857d6d48d064df1cb3f35d8447b5" + hash: "ca3e50cd337a07ef07f063be28fa6dc2" } Frame { msec: 1520 - hash: "8d1809b568345e1532fb6d9428fc9729" + hash: "3ecf7faa733653ef20e4a26eb47d63d1" } Frame { msec: 1536 - hash: "5cffa76fe09a771a9f62a9f0392f0431" + hash: "f17a6be2e183f4c87e31004458e5052c" } Frame { msec: 1552 - hash: "8de59915e874ce829c691a19ac930f28" + hash: "bfa62672ee7fcd9c3a75b63198a4c2bf" } Frame { msec: 1568 - hash: "9027bbf8121f70d26530f70423ec05b7" + hash: "cdaafe7f622c18c2409ac539649de1cd" } Frame { msec: 1584 - hash: "d3d1d8b9f7b4eb74a8b7ae5cf19a8e20" + hash: "c957f5c58e0a9b315b51ac1012709493" } Frame { msec: 1600 - hash: "81ffcc0147e3124a3015deb7c0dbfd90" + hash: "925c55a8564f2318f9de4bd406cb5b13" } Frame { msec: 1616 - hash: "ca0c96e908f05c4ee1af1f80d7b432aa" + hash: "466208a8f6ecf45393be01a6dd7f2b0f" } Frame { msec: 1632 - hash: "2bdb6fbf942623856a6963c335794dd2" + hash: "35cff8c0f4b503ba4948966079484feb" } Frame { msec: 1648 - hash: "18ac264d9ea9b592b0738f1cf732f678" + hash: "47472faf5e9bf4b4e514abe55f1e0b72" } Frame { msec: 1664 - hash: "1ee9adbbae7b97dc050c82b8ed7b0aad" + hash: "b699165e354bcadfd0d914d9ecb3d2aa" } Frame { msec: 1680 - hash: "b502390c452883ade550d2761bb09d3d" + hash: "e255c047ce78f5677ccec8bd9737201a" } Frame { msec: 1696 - hash: "31a6f573fbb3f545ee051e2290938004" + hash: "bd4f08095a9c546a42c85e6df6eaf655" } Frame { msec: 1712 - hash: "3be9788228d9e540313e75671319c5b7" + hash: "ca65869f48b169260c3756d846a12f36" } Frame { msec: 1728 - hash: "23cbd718154f939d8270674e8f7607f0" + hash: "1921889beb8e61c8b959d4affa814465" } Frame { msec: 1744 - hash: "5f7f49b894b80ddd7cdc544a49ec24a2" + hash: "a9dda9ebaa97133c671917473721272c" } Mouse { type: 2 @@ -538,11 +538,11 @@ VisualTest { } Frame { msec: 1760 - hash: "2a1ddee3d3a0c2a4fffab3988e35e274" + hash: "cab96d2118b31d43e85dc902df2ed8ed" } Frame { msec: 1776 - hash: "2a1ddee3d3a0c2a4fffab3988e35e274" + hash: "cab96d2118b31d43e85dc902df2ed8ed" } Mouse { type: 5 @@ -562,7 +562,7 @@ VisualTest { } Frame { msec: 1792 - hash: "5594b9139480ba1c814509a049f9b6c5" + hash: "d21c8af68b314800b86922493db6553e" } Mouse { type: 5 @@ -574,7 +574,7 @@ VisualTest { } Frame { msec: 1808 - hash: "d8729deb404f5b821264743943adb288" + hash: "a80c0f6f679ba5f1354f8e16677c1125" } Mouse { type: 5 @@ -586,7 +586,7 @@ VisualTest { } Frame { msec: 1824 - hash: "6de642baf7698ec65d48ccf0a1e8e7db" + hash: "d8729deb404f5b821264743943adb288" } Mouse { type: 5 @@ -606,7 +606,7 @@ VisualTest { } Frame { msec: 1840 - hash: "f6732999861d1f638484a5aaa9cf0550" + hash: "87d41239eb7e170fa7a1ed523a9af942" } Mouse { type: 5 @@ -618,7 +618,7 @@ VisualTest { } Frame { msec: 1856 - hash: "7cd7c1679838f35556bd4ee4565b7a86" + hash: "1c185649e08a54a6949409ed7ee5dc60" } Mouse { type: 5 @@ -638,7 +638,7 @@ VisualTest { } Frame { msec: 1872 - hash: "4276a4d9350503603b0c9c98552697b3" + hash: "d82969ef0f4baf3c51e112e049cb1334" } Mouse { type: 5 @@ -650,7 +650,7 @@ VisualTest { } Frame { msec: 1888 - hash: "954a47627aee0a1128a78191bf32d984" + hash: "e746a3eb8527036b09afb9cdd3d15648" } Mouse { type: 5 @@ -662,7 +662,7 @@ VisualTest { } Frame { msec: 1904 - hash: "360a47795f7f9389f82f2f55fa1fe83f" + hash: "e1d6c01f6cd66a5bcdb08ca810a07282" } Mouse { type: 5 @@ -674,7 +674,7 @@ VisualTest { } Frame { msec: 1920 - hash: "19d4284791d0031342ba995bd17a7833" + hash: "fd0e9cf835131ee6cc5ecf67c6724d73" } Mouse { type: 5 @@ -706,7 +706,7 @@ VisualTest { } Frame { msec: 1952 - hash: "e9cd8fb810ecf39a90af039ead97aaf1" + hash: "69c17a9c18795b1d8ae63d36d76af626" } Mouse { type: 5 @@ -726,7 +726,7 @@ VisualTest { } Frame { msec: 1968 - hash: "42df1a0fbbe7cce5f2359d9e02696299" + hash: "c7ca4762498af158a2f2da6f5ae560ce" } Mouse { type: 5 @@ -738,7 +738,7 @@ VisualTest { } Frame { msec: 1984 - hash: "cc71434d6bd162386b80cb3b7e387116" + hash: "f500232133ec07a3b833b06425379484" } Mouse { type: 5 @@ -758,7 +758,7 @@ VisualTest { } Frame { msec: 2000 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Mouse { type: 5 @@ -770,7 +770,7 @@ VisualTest { } Frame { msec: 2016 - hash: "5bdb7472e325651e891c115953afdb39" + hash: "1754875ee6a5712ffb8ce1bbae6d4ed1" } Mouse { type: 5 @@ -782,7 +782,7 @@ VisualTest { } Frame { msec: 2032 - hash: "ab3a64b41c67a0b8a6c0830c0e0cb797" + hash: "1e743264f0a312bc0d0a023fbc6db832" } Mouse { type: 5 @@ -794,7 +794,7 @@ VisualTest { } Frame { msec: 2048 - hash: "8eb1f2c8c02c2acf4262e05000045649" + hash: "ab3a64b41c67a0b8a6c0830c0e0cb797" } Mouse { type: 5 @@ -806,7 +806,7 @@ VisualTest { } Frame { msec: 2064 - hash: "514220d357c4a26e4aaf9ed20d3f4f33" + hash: "d05f721f1d7d23d6e0cc67993bf1fa8f" } Mouse { type: 5 @@ -818,7 +818,7 @@ VisualTest { } Frame { msec: 2080 - hash: "e44526ef273048028d5989fc662eb7e6" + hash: "419c09739f855c53be3427a71aa3faf9" } Mouse { type: 5 @@ -838,7 +838,7 @@ VisualTest { } Frame { msec: 2096 - hash: "29ac091428a89cfcb4c52c08e0e10327" + hash: "f0ae80ed5965d7531d6a653c80eed444" } Mouse { type: 5 @@ -858,7 +858,7 @@ VisualTest { } Frame { msec: 2112 - hash: "82beb845af88fc9432dc104ff805a146" + hash: "1419fe55cc28ce9690846d4c03275fe7" } Mouse { type: 5 @@ -870,7 +870,7 @@ VisualTest { } Frame { msec: 2128 - hash: "371392f267b2c1f4e29963506180e246" + hash: "2e22df53697a599b0e44fb2a3986dcd0" } Mouse { type: 5 @@ -882,11 +882,11 @@ VisualTest { } Frame { msec: 2144 - hash: "1da06d036cc0a2d2de34eee37b6981c0" + hash: "96f763c555b523d9b7ed7a0a159db368" } Frame { msec: 2160 - hash: "1da06d036cc0a2d2de34eee37b6981c0" + hash: "96f763c555b523d9b7ed7a0a159db368" } Mouse { type: 5 @@ -898,31 +898,31 @@ VisualTest { } Frame { msec: 2176 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2192 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2208 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2224 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2240 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2256 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Frame { msec: 2272 - hash: "4980de22342d1085e205401090777d24" + hash: "20f9cf7787c8cfd4843289f5ab2012e7" } Mouse { type: 5 @@ -934,7 +934,7 @@ VisualTest { } Frame { msec: 2288 - hash: "e0a52543b976dc998615704c63b1f3e9" + hash: "1241895174f4d8e4386c3957e3d2e292" } Mouse { type: 5 @@ -946,7 +946,7 @@ VisualTest { } Frame { msec: 2304 - hash: "82beb845af88fc9432dc104ff805a146" + hash: "1419fe55cc28ce9690846d4c03275fe7" } Mouse { type: 5 @@ -958,7 +958,7 @@ VisualTest { } Frame { msec: 2320 - hash: "e44526ef273048028d5989fc662eb7e6" + hash: "419c09739f855c53be3427a71aa3faf9" } Mouse { type: 5 @@ -978,7 +978,7 @@ VisualTest { } Frame { msec: 2336 - hash: "8eb1f2c8c02c2acf4262e05000045649" + hash: "ab3a64b41c67a0b8a6c0830c0e0cb797" } Mouse { type: 5 @@ -990,7 +990,7 @@ VisualTest { } Frame { msec: 2352 - hash: "442958c3a705745204db96ff9902b7fc" + hash: "a130b471b3903f3f1d77f2306da2b92e" } Mouse { type: 5 @@ -1002,31 +1002,31 @@ VisualTest { } Frame { msec: 2368 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2384 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2400 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2416 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2432 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2448 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Frame { msec: 2464 - hash: "a130b471b3903f3f1d77f2306da2b92e" + hash: "0a0cd0433e206dfc923ec0d3617e04a1" } Mouse { type: 5 @@ -1046,7 +1046,7 @@ VisualTest { } Frame { msec: 2480 - hash: "374dc7c3ea0c93ac93a857a4620bc031" + hash: "47e86b008567366f37ac043ed8802d53" } Mouse { type: 5 @@ -1058,7 +1058,7 @@ VisualTest { } Frame { msec: 2496 - hash: "0b943f48b39053bfc906a4a47a37d68a" + hash: "92e1d5dbc85e777785cc68171a0a3fbf" } Mouse { type: 5 @@ -1070,7 +1070,7 @@ VisualTest { } Frame { msec: 2512 - hash: "099fbdf1560dd79b700914863406c904" + hash: "360a47795f7f9389f82f2f55fa1fe83f" } Mouse { type: 5 @@ -1090,7 +1090,7 @@ VisualTest { } Frame { msec: 2528 - hash: "3aa1614cc49504d19e979ebf190f2970" + hash: "acefb43050e140d689f1d377f50f5c83" } Mouse { type: 5 @@ -1102,7 +1102,7 @@ VisualTest { } Frame { msec: 2544 - hash: "837420c71a5010f25cccd05e5e9b3eec" + hash: "4bc43ae81aac757c872157ac9b41a2d9" } Mouse { type: 5 @@ -1114,7 +1114,7 @@ VisualTest { } Frame { msec: 2560 - hash: "871349fc09f418717231b8f8e20a7fff" + hash: "41421089f087c54ebcd9fa44e95bd96e" } Mouse { type: 5 @@ -1134,7 +1134,7 @@ VisualTest { } Frame { msec: 2576 - hash: "9b6022024aae22ec1f522fd00ed29e9b" + hash: "db0f09393b5c9284142f9eb3cb5952ce" } Mouse { type: 5 @@ -1154,79 +1154,79 @@ VisualTest { } Frame { msec: 2592 - hash: "8d9410909ae259388fa94b3a60342608" + hash: "9491689e51ec46bec07fb8b280daef80" } Frame { msec: 2608 - hash: "0ceb355351ac99458ba75776c11b3039" + hash: "44a30531642ada65c052afe30874d7ba" } Frame { msec: 2624 - hash: "61ca917ecc8ad4c35b7f2a3b828542bf" + hash: "6bf415b82e7cfa68b8321571ab619c3f" } Frame { msec: 2640 - hash: "fd5db933d1d8684b15eb5239d19d8919" + hash: "645e43948279d528020070125b71c33b" } Frame { msec: 2656 - hash: "13f466a82ee22cabf5cbd2463f55b46a" + hash: "495d14df729eede7e560f2e841bae142" } Frame { msec: 2672 - hash: "3b7f7880f5b568a0e45cd0e268822f3a" + hash: "fa3b12e9869bf4254c8cdf6e5b10bb2d" } Frame { msec: 2688 - hash: "cca22501c3b5a2ed4264ba060eeb1a6e" + hash: "482ce41c4b918a71b803c5f521ea494e" } Frame { msec: 2704 - hash: "efe5258ac5962d1d2bfa4286c1621830" + hash: "79d70563c7e139d9f9785565219133c7" } Frame { msec: 2720 - hash: "141998cff765a4e90836b871f229a1ca" + hash: "0dc70772aa50445c1cb7dbd8ee0092b0" } Frame { msec: 2736 - hash: "9d684675fa883d5488194effcb1d8d0a" + hash: "222d638b8fb896563028f029e6fb3c49" } Frame { msec: 2752 - hash: "fa87f781048f264ddf447441a714ee50" + hash: "20b8fc718d9329c9c8901fdfe14557a2" } Frame { msec: 2768 - hash: "61b4992b9c52222345c9ada3148d50f9" + hash: "e3972b3244e4a98c9ee4df2d4b623c12" } Frame { msec: 2784 - hash: "3e255a634d215746cb95f5d765335ea2" + hash: "e3a4b357c00d3d49e4a7d90f6f57054c" } Frame { msec: 2800 - hash: "d64a755e47a502244e7f14f2091f0ca6" + hash: "44ad81d2ad0d502b003e148412871a41" } Frame { msec: 2816 - hash: "582562992b0652f995b439897182e0f8" + hash: "47d757dab5c72cad08cb8026631d67e6" } Frame { msec: 2832 - hash: "2d69b1a274c262faf5ce9ed3191c7d22" + hash: "8522a3b6202b303a9e65a9e136423e27" } Frame { msec: 2848 - hash: "36c04a2bd58124877a332bb6a262a7e5" + hash: "70e3cd650472d0e95f4d6ca9e34a2ce1" } Frame { msec: 2864 - hash: "798711925da8f5034039dad86cc1fad1" + hash: "19a7825cd8c0eaa6f313ec77fff9ec1b" } Frame { msec: 2880 - hash: "31495157a10c3bb4dd70cfd857fd07e6" + hash: "579688ff6ec910570c0c0c60fdf44cf6" } Frame { msec: 2896 @@ -1234,207 +1234,207 @@ VisualTest { } Frame { msec: 2912 - hash: "b81330eb50dbd39f1abcdb8ff1553d08" + hash: "7ab8cf0d0b650e8f994a9beed8be29fb" } Frame { msec: 2928 - hash: "ececcb86b76e9cd2f57585bd87e16bef" + hash: "92e9be6d36844bb475b861ba9c4bc3ff" } Frame { msec: 2944 - hash: "2c37e2c24cf22a334cfcc6f2691ad9fb" + hash: "08b9cce3b2071b328054af6bcb6755c7" } Frame { msec: 2960 - hash: "ad0572020d273dbca046357aa0f8bf3b" + hash: "b505d2f41a6db06d4ca03f5340800aa6" } Frame { msec: 2976 - hash: "51a469e059a5e1a3675db731f55209d3" + hash: "f0267f59e247e24e4cf9c56f8931112b" } Frame { msec: 2992 - hash: "dca7d50a3faab1f049bece34bd16b8c4" + hash: "ddbc73e2df4da11d5122539a00c126de" } Frame { msec: 3008 - hash: "86dc86bafb01fa086caa3b22f9d393d9" + hash: "8dd67df95fae14079ed5b83c421a5b6e" } Frame { msec: 3024 - hash: "05754bd86070a6f01bf90ca2b964f695" + hash: "7b217f7c51087a07e8922b0286b2c1dc" } Frame { msec: 3040 - hash: "911ec290ba303f0cac258cbb893bbf78" + hash: "e464b5121f3204c64cafe2f5e31cf497" } Frame { msec: 3056 - hash: "f27f29249426f46b8fb508372bcbb32d" + hash: "7fc2018f8db17b65fd01b2ddfa44f66d" } Frame { msec: 3072 - hash: "2f452e2d519f33ee03db67ebd7f69e3b" + hash: "a5d1871511eac7224292b3552da466a8" } Frame { msec: 3088 - hash: "35cf7747a75ea3f727c2fe1dae6136c5" + hash: "2f0a55cf3cd30da77fbb73e749b729a3" } Frame { msec: 3104 - hash: "6773187693f52a8f2c0e358e379b4d21" + hash: "9aab649b6664c179878d0ead438dd751" } Frame { msec: 3120 - hash: "abca1f00f7ec60c8c80ba5345898e54b" + hash: "2ad733363d239d9a3ea1c31427a3b3fe" } Frame { msec: 3136 - hash: "9bee1da64534da97de349e1ee973cc9c" + hash: "e73b4fd7cb6285df9a77d666f25ab245" } Frame { msec: 3152 - hash: "087df06ca720918482f2e29653c7fbac" + hash: "53b05d8be52a74c3a24b88779d4927bf" } Frame { msec: 3168 - hash: "5b08911bf0975bd6615bf29294e4b1f5" + hash: "04fc6aac5f090960cd87eefb4273fb0f" } Frame { msec: 3184 - hash: "dead4bb3768b65418f68bae7dd0bf004" + hash: "294c842a71b5e4927146952ce865c8a2" } Frame { msec: 3200 - hash: "6bfe4c866936d8ae509650419ae12455" + hash: "ac6f7afb4a5e67e2edd8300e7dfdff13" } Frame { msec: 3216 - hash: "7428bdd9609a2594be08fdeac6ff1e17" + hash: "8a7ab6dc549b247f3b897e098d784dd8" } Frame { msec: 3232 - hash: "d02f9f693e0ae8c7034bf727064ec28a" + hash: "0a3144254f66a6b005b95a026496cd32" } Frame { msec: 3248 - hash: "b6284efd849547bbfefc22ec77d61062" + hash: "ca457a1c503a980687926e31ac16995b" } Frame { msec: 3264 - hash: "4b78b647be8e918e85edab0c23b6f882" + hash: "c17922ca04f5ce9916e2907a6c28bf8b" } Frame { msec: 3280 - hash: "c4a02c18ce3574d057e6a54b30efadb3" + hash: "b2a071734226b905f6c6f5652f645517" } Frame { msec: 3296 - hash: "d1d190010239d0b02a697d1c63c748ab" + hash: "1f41a314699151771d7d1ca672aaba8f" } Frame { msec: 3312 - hash: "b198689d11aa59d937297e6fcf675c93" + hash: "de94c2ad2e74036d975e8402dd8b06e9" } Frame { msec: 3328 - hash: "218f3371beea895aefd28aa874012dcc" + hash: "9cfe0627852cefe67fc0b44b31085b4a" } Frame { msec: 3344 - hash: "1135de1b9a4ebf1d2829546d3c3f3903" + hash: "de7ab5230efb63264f76fa1f1b61dcfa" } Frame { msec: 3360 - hash: "773a64cc7bb8e99a25078f348986e28f" + hash: "5ad22cf9e1c9a02cfc570beaac55bee0" } Frame { msec: 3376 - hash: "e8ce58aeb18b3f56ebd3d6f61ac94657" + hash: "9e6210d9e6bfda4fe0695b75d03435e2" } Frame { msec: 3392 - hash: "6de92679c32c7f3e9d9b6ba3a47e65eb" + hash: "d3989a9fb7e99d16032fa1842364f2ed" } Frame { msec: 3408 - hash: "339b37207af10ad986269e21ab37ff6d" + hash: "2f3e7040a4966e56858312f6534e9e77" } Frame { msec: 3424 - hash: "ac01f0708800fdfdacec67ac9e80602f" + hash: "16bb17f511519337be2e60d8b9f95149" } Frame { msec: 3440 - hash: "9de89a748b1e18eb6ed94875af6f26de" + hash: "819250fd9899a9457a9300f942f4d8bf" } Frame { msec: 3456 - hash: "d091e4a93c2beafb0ce4b6dff6d5b05f" + hash: "6639a15d4d23540ccf63c9bea0e1689e" } Frame { msec: 3472 - hash: "9532271085864d2fde3aa6e572599588" + hash: "14b553132a86e57577c416e6f6c53433" } Frame { msec: 3488 - hash: "d00804b42ab1c1f082a9f394ff4d666e" + hash: "f7a95239db44b66698d29f0daae826f1" } Frame { msec: 3504 - hash: "2c745f007353e6f8a7195470ba9492c2" + hash: "b5a6abb5294fb9b069ab8a075003cb61" } Frame { msec: 3520 - hash: "b4e952acb734ab1a608297fcb44fbe46" + hash: "391c1c43ce893aeefc42d164e6e8aaac" } Frame { msec: 3536 - hash: "75ceed3c2ddd557866145393fa50a12f" + hash: "271addef36d51d904bc1d68f65b66de3" } Frame { msec: 3552 - hash: "8b83b80554dd4a1266184092d380554c" + hash: "73a23e56edcd64ac6147aff27b785ebb" } Frame { msec: 3568 - hash: "973bddb1b2f9dbadd40c0de3ca7c3510" + hash: "bd43145ae22086348cb5e68765a42ac1" } Frame { msec: 3584 - hash: "5691b5bf54b50d4ff0a717873e001c00" + hash: "4b2706d1215f2b5b08ac87e40ba8c21b" } Frame { msec: 3600 - hash: "8b26b0aa8b06da031354c59d7fb41bf0" + hash: "6420fd46fd8068010d3caaa68eea457e" } Frame { msec: 3616 - hash: "45786c39a10b8e1cf399df98f3fb7ffb" + hash: "188499a79313d984ed1d710329b0237f" } Frame { msec: 3632 - hash: "c6d0be03e167c16566372cc992604dfb" + hash: "12da197320858ea4f8a1437b7ceac95a" } Frame { msec: 3648 - hash: "8d6e057550632d143faf996a62bbd1cd" + hash: "14bdec5663d1a81fa617d3b81e19f8b4" } Frame { msec: 3664 - hash: "7e3a321b95d5f62f0da2b10324b485b6" + hash: "3430047eca214a217aca0bd71814f4db" } Frame { msec: 3680 - hash: "e842f18dfd36947b2fa086a4d0bb2ec5" + hash: "974c431fe7030990389c7fc719655cfd" } Frame { msec: 3696 - hash: "a9359e143dae4113437a43cc00493479" + hash: "d38f3153b3cf39a278dc6948ff9ef71d" } Frame { msec: 3712 - hash: "2eca61c837cca9beb6d1834eafe8c538" + hash: "0c6eec50abcf4afc20311ffa1326d4e8" } Frame { msec: 3728 diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png index af0e781..da688c7 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png index 6f1878f..618d238 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png index 97f09f7..0688ed1 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png index 878875a..ec6e330 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png index cdbe606..1692d17 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png index 7b78f7a..d70704d 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png index d7b5943..f8f37c6 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml index bc900c6..3828e76 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml @@ -182,7 +182,7 @@ VisualTest { } Frame { msec: 592 - hash: "731c8547a72c64ac86aec87c0a9a12cb" + hash: "683d9f54c75f5b1ed082edb0b4559bc8" } Mouse { type: 5 @@ -202,7 +202,7 @@ VisualTest { } Frame { msec: 608 - hash: "d9d7dd7ea05499f028964fdd11af0fe6" + hash: "02e5238c0764f370d0f463cc3f477df7" } Mouse { type: 5 @@ -214,7 +214,7 @@ VisualTest { } Frame { msec: 624 - hash: "361879f350c448a484b71a9e7a42b87f" + hash: "02239cd84ce630a89b94dbcf469d9a70" } Mouse { type: 5 @@ -226,7 +226,7 @@ VisualTest { } Frame { msec: 640 - hash: "998da4b3e36ee3e17deb2b5a097661da" + hash: "6cdaa8ffc906ade671fe259711e76f24" } Mouse { type: 5 @@ -246,7 +246,7 @@ VisualTest { } Frame { msec: 656 - hash: "1b3f9758bd9842cc9545b494499f87c4" + hash: "db00a0d69efd43f69c83dafbf38a06a6" } Mouse { type: 5 @@ -258,7 +258,7 @@ VisualTest { } Frame { msec: 672 - hash: "7e87f7c233dad50549e4bdafe10bb48e" + hash: "76fdf4cb75376ec3a9e084d93765c5cb" } Mouse { type: 5 @@ -286,75 +286,75 @@ VisualTest { } Frame { msec: 688 - hash: "01ceb2fea81f2192ab11d7d6e1df879a" + hash: "b12e86c13e012c5992930b3e559c337c" } Frame { msec: 704 - hash: "9afa862248bd527e07374a5c2f2036a1" + hash: "4056e78a59e8f1e030f3e3a51c436b46" } Frame { msec: 720 - hash: "e06439495148bfbf059cfe2b5df22840" + hash: "c84781b7586943ef889b8911c23e91db" } Frame { msec: 736 - hash: "b206a28d6f3be8cba9595849328b27b8" + hash: "cd952ffa63dbcb772b666ce755c9a2f1" } Frame { msec: 752 - hash: "646e4529bf554dceee0140ec56a02d1c" + hash: "2a31778e3ab7c676ae82278948cef12a" } Frame { msec: 768 - hash: "31bdcf1f178d65e033e23dfbdcb9dc5f" + hash: "ef6319b262fc299b14b40d1521f9c9c3" } Frame { msec: 784 - hash: "b4e897356814ca2dddbc3644b1782f36" + hash: "05ccb24a2025df31188b413c8d837232" } Frame { msec: 800 - hash: "669e5d682aae8727640e0e0f4e855a60" + hash: "df31f9dba1a762397c0364d7e83052ef" } Frame { msec: 816 - hash: "892007b1a379c617412502499df92d01" + hash: "6eec07606ef320072ea23ceedb3f6b29" } Frame { msec: 832 - hash: "f4d66daa2d428aa712a73ded2de7a361" + hash: "e3502cb53c6e17373de3b718a8212f4d" } Frame { msec: 848 - hash: "0c21e69bed6dc2d6b7c23c20714aca67" + hash: "2e01e2e252ca9fb3e7107f04a3ba4031" } Frame { msec: 864 - hash: "189909bdbfeb1f02ad527fbc438d567d" + hash: "547a9f25404c2bf7737526faf67a459d" } Frame { msec: 880 - hash: "b2fcbc0657474e1b6d27e1f2f93be35b" + hash: "aa9c3122e3c2a7ed450a0afffbcf4e6a" } Frame { msec: 896 - hash: "4407d7ad1b6a40b2355145aee136ff15" + hash: "1535dea92038cf87395a616841fd9bf6" } Frame { msec: 912 - hash: "347ada687af0a97f0a862a1f3a1132be" + hash: "1535dea92038cf87395a616841fd9bf6" } Frame { msec: 928 - hash: "db6217ff0194c5a3f9ca9ea7e3b3dfd8" + hash: "1535dea92038cf87395a616841fd9bf6" } Frame { msec: 944 - hash: "8a94ca0ee93daaa1bdcdbfc8a80713c1" + hash: "1535dea92038cf87395a616841fd9bf6" } Frame { msec: 960 - hash: "ab24d0c8545518cbaff876976247be2c" + hash: "1535dea92038cf87395a616841fd9bf6" } Frame { msec: 976 @@ -450,7 +450,7 @@ VisualTest { } Frame { msec: 1216 - hash: "c612bb9906f18786ef7cc6f4e56de218" + hash: "aa9c3122e3c2a7ed450a0afffbcf4e6a" } Mouse { type: 5 @@ -470,7 +470,7 @@ VisualTest { } Frame { msec: 1232 - hash: "ffec210dd863ed32a780506f61b06056" + hash: "b889647c08af7db2e6582d9927cb1cf7" } Mouse { type: 5 @@ -490,7 +490,7 @@ VisualTest { } Frame { msec: 1248 - hash: "9613c658f267d19b84d6e7ef2a676fed" + hash: "ac97616fc3c54711bb067cc72c15d4c5" } Mouse { type: 5 @@ -510,7 +510,7 @@ VisualTest { } Frame { msec: 1264 - hash: "8c5dd8d0f9f434530b20e14a84af9f46" + hash: "b38c46d537e6e622c8a0ecae76dbe506" } Mouse { type: 5 @@ -530,7 +530,7 @@ VisualTest { } Frame { msec: 1280 - hash: "a956e8e9ca8958c387f8f5ce374cdec9" + hash: "6261f2f16bdd89142cfbf1de4ce64a32" } Mouse { type: 5 @@ -550,87 +550,87 @@ VisualTest { } Frame { msec: 1296 - hash: "712e865d894f179cfd9d86b08e60811a" + hash: "d4f8d57bae3d5bc888a4bbe2812b3fdf" } Frame { msec: 1312 - hash: "db5c1f2af2e72ff4edce83cb342b5263" + hash: "4e0a90dda433c1615ea367ec90917409" } Frame { msec: 1328 - hash: "834f0aa26c66234491468c1b27a2d329" + hash: "b20e244f27dae505568fcba25cccb5d8" } Frame { msec: 1344 - hash: "78a2a4b60db730a7367bc77e1dfc1a1b" + hash: "f31d264a002718787ea55a6312c7f9f2" } Frame { msec: 1360 - hash: "a8ff2277b5f7d515bc5a9af1f0e77197" + hash: "0abbf36b5e3f2db9288bde05825dc111" } Frame { msec: 1376 - hash: "e05d730624025000b831860f5b99e8ac" + hash: "64fc0f18174f5e8002cf79a908cc08df" } Frame { msec: 1392 - hash: "54aa124492ea742e4327f1d2b45ab620" + hash: "430d7719ebf3b5835af92683cff10e56" } Frame { msec: 1408 - hash: "bc700bee41ac384a2555723b010e9041" + hash: "411a8fe1ee3a0510574cbf6a69d23456" } Frame { msec: 1424 - hash: "26f66098c505cea4715a89b6a2232759" + hash: "47e431bf01575c44f7c1fa3e20409866" } Frame { msec: 1440 - hash: "00f3255a3ead315410d8c0d338779689" + hash: "d17b62a0b52b4a5220b29b55f764abc6" } Frame { msec: 1456 - hash: "154e7d86d7602ebba38a0d63b211894d" + hash: "9bd0d8dfbee424bd0ccf72703a7c51c2" } Frame { msec: 1472 - hash: "87cf2bff69ebd75af69d0a7c7f668b07" + hash: "8ef880c18ecd8adb66e7e0a2dceb61fc" } Frame { msec: 1488 - hash: "f221b870ecccb1669b6223e5431c31d1" + hash: "fcc1bc7f35342f595448ca2870478b50" } Frame { msec: 1504 - hash: "40a9d4c522d9fd831be2ca698ac10670" + hash: "cf360de1c6649e45beb974ddbe436ea9" } Frame { msec: 1520 - hash: "7ad47479d99fd4d9fde96fef242bdc20" + hash: "b2a6acf1fed92069fd2779b1fa236c95" } Frame { msec: 1536 - hash: "b91912801c790d849399306c693a4d33" + hash: "7128a442b6bb06038477d46ac3da5021" } Frame { msec: 1552 - hash: "e5c8d361abcbc15df0b0b82728cb5b84" + hash: "6a0ab3ccc3749b9a2b9a5b5851b0cf70" } Frame { msec: 1568 - hash: "3f2f82c925e93d4593581cdba16f361f" + hash: "18f6cdad215c55ea8335d06110715aa8" } Frame { msec: 1584 - hash: "7007fd0595c188a9a5b3ff31b0514aa5" + hash: "137420f4b1f51440c3aefd18dbdad71d" } Frame { msec: 1600 - hash: "118661091df765ae35c152c7fe818029" + hash: "faf898388f87948fbacd74589cb18af0" } Frame { msec: 1616 - hash: "0a8edd2a35f7921ced6e3aa7e571bc4b" + hash: "b818181b3fee6f5a35a0da6c0f8e240e" } Mouse { type: 2 @@ -650,7 +650,7 @@ VisualTest { } Frame { msec: 1632 - hash: "ef734ce4d7e1aee19a78b743c9923f90" + hash: "2e74cc22a4e5b20cc231bc08e15e662a" } Mouse { type: 5 @@ -670,7 +670,7 @@ VisualTest { } Frame { msec: 1648 - hash: "09a9925d5ec2fd03cfbf469bc22bf201" + hash: "27be226c985bb0143d1dca3e4be4b10a" } Mouse { type: 5 @@ -690,71 +690,71 @@ VisualTest { } Frame { msec: 1664 - hash: "6babcbf5582d5ed8f0cf52e233867055" + hash: "9384d46806b2a8091b6d16f7636d6ae4" } Frame { msec: 1680 - hash: "94dae9d52f3523e17f3f0e59ca24a069" + hash: "684a17820c3693d893f8199cd7c7076f" } Frame { msec: 1696 - hash: "0d417d25893a0454a729f5c23a2a6c28" + hash: "dc1facc91b6935983bbcd2eada452d4d" } Frame { msec: 1712 - hash: "afd1bbca1dcfea8d1f0a340d86b07fa8" + hash: "6bb08cc431a3ecca1a553ea10669bb0c" } Frame { msec: 1728 - hash: "97e98982742b94dba8b6cb59397bcb66" + hash: "1330640d4ca9ac69dd089cea34b7f61d" } Frame { msec: 1744 - hash: "a0ad8cbbd0daa0afd3831e8a071b9a0e" + hash: "95370207a55b56c41923937b40d5fe6b" } Frame { msec: 1760 - hash: "f71826bcd6ea91d2f64d627a390c379d" + hash: "c36b60f81e7de5c0e5a59655041adff2" } Frame { msec: 1776 - hash: "7699da01cf1ee9a7f404ab053241b530" + hash: "297abbc6b38a1909324fcee6d8b1d908" } Frame { msec: 1792 - hash: "6aba727ecc562d7b5555eae427e6978b" + hash: "0af89e3bab7c517f375897239ea35153" } Frame { msec: 1808 - hash: "ef9c6daa5b04b0be9159594e04524fba" + hash: "05109c3dfac7f65fe00e81d1a145f048" } Frame { msec: 1824 - hash: "6293ede5de83f3b01a3b4d8d87648089" + hash: "57e1e871cbbc627f2fb9bf5583c4f097" } Frame { msec: 1840 - hash: "c3b34d8592f88622cad0f9353d08e739" + hash: "5220aecdd1516d94f0698e79f17fee57" } Frame { msec: 1856 - hash: "880f3cb9d5dbe06cdf17e3a953d4562d" + hash: "f3d8c908e61e5d61bbeeb9c6b5e8a704" } Frame { msec: 1872 - hash: "ed381ce920863a5a6627f383a88ea2fe" + hash: "f27867aeb39ef64ebd50b5d79b69337e" } Frame { msec: 1888 - hash: "b5bc40b8c4abb6458aeb67eda73507b6" + hash: "b807b4e74a0f008df3f4534901debe38" } Frame { msec: 1904 - hash: "482cb61b7fac4b1654483f846b8b6717" + hash: "e19832a0a7fcd57efe46cb0102a8d418" } Frame { msec: 1920 - hash: "e1a4a16d2cf5132a9fbb0869ed6082d9" + hash: "f0dcfd9b22f385fedfde964774480f85" } Frame { msec: 1936 @@ -762,171 +762,171 @@ VisualTest { } Frame { msec: 1952 - hash: "f8874aaab1e65cf9b86d6b5174c3d2c8" + hash: "746c60e03c50dc2e28c62fe52a8dd9d2" } Frame { msec: 1968 - hash: "d8490adeaa793352b812e832f4cb079a" + hash: "27d6da44b605cb38552147fdf451ef45" } Frame { msec: 1984 - hash: "85fdb99926ba34a25fa964df11af9a5a" + hash: "c41d5491c417531ee86ac6ec8571c6a8" } Frame { msec: 2000 - hash: "ad137a75981c181838d97cbe313063ac" + hash: "ac57c578e7e2cbb57e982d6da5fb7268" } Frame { msec: 2016 - hash: "bfa5cecfc0058b56ca66aa816ea098dc" + hash: "db40e242fabf119f0e7187eeb96a34a5" } Frame { msec: 2032 - hash: "53fe3960c2f332eb099fedd8421fcc94" + hash: "0850d4b73a664ee0f1ed6d6e0615ea80" } Frame { msec: 2048 - hash: "61b99ff526560c1589d2fc8737af2af2" + hash: "ae6cb0bfda1cea70b3641251d0dc60c4" } Frame { msec: 2064 - hash: "f9dd63709bed985f5d691d27c0d32484" + hash: "67a28c2188aecfc5dcccedd257789dbc" } Frame { msec: 2080 - hash: "964c20ada9ad9e83edd9b429bf681b83" + hash: "4355f220c8a87ad981088fb23bb15f11" } Frame { msec: 2096 - hash: "997bc44a319c8ce8212387f7564c4005" + hash: "2081c1ffe35f20dd827b3d9f52be90b3" } Frame { msec: 2112 - hash: "892eda6e7446321483ffb1dbf44a0432" + hash: "ba13b0b4790aec7084b5553fe0b0d72b" } Frame { msec: 2128 - hash: "62068dca6da7227882b6c3bc147c6f24" + hash: "7f289e50f1bbd570b6bc2ca1998f8493" } Frame { msec: 2144 - hash: "2cd0c351c53234d4bbf4d2c74d313f59" + hash: "8bb3a37f416032d40cb5f919abb42e30" } Frame { msec: 2160 - hash: "cf812f971bb4f8ab3116cf2b14c325df" + hash: "bcc69f859b3bff759e0c732c7adc23f0" } Frame { msec: 2176 - hash: "be296bd9ab4c38d95e6d7d445d8c7f68" + hash: "d3e8aae08a2518c039d6bda80fc520a4" } Frame { msec: 2192 - hash: "536d0214c8c3f69ce8d4e1585128b2b8" + hash: "955212dc28a6f8fe59c658401284d3a3" } Frame { msec: 2208 - hash: "f71452a0a6ef80758800d67e601a162b" + hash: "8eebcff152288a4ab2a3e64fd7ba6f80" } Frame { msec: 2224 - hash: "e57c099beb70d0a4ca2cbc94a2c3887e" + hash: "85fe363271d480163fb7847a3501472f" } Frame { msec: 2240 - hash: "84cea22f64ff8b8838a7db0b19af1a4e" + hash: "23190380ddcc4e3afce2164a4743d179" } Frame { msec: 2256 - hash: "04aa0d5d089779977f569d0f849b97dd" + hash: "40ca7c3d24883a8d3457de934b247280" } Frame { msec: 2272 - hash: "85b52e125142d52d531132939930dd93" + hash: "299ed19fa4d213e0e9dd127e8799d5fc" } Frame { msec: 2288 - hash: "19bc7b318c21a6ce2be8ebde2e624fc3" + hash: "e39a067860fa7dcb4efba87aee58cc77" } Frame { msec: 2304 - hash: "9cc744249cb031f0400e87893c1642af" + hash: "a709045723c4a9a2e85295fcc360eea9" } Frame { msec: 2320 - hash: "a834706bbf573f37cf9f59c6c6cbbfa5" + hash: "029428301287e4c7cd2f8a1fa6a25381" } Frame { msec: 2336 - hash: "8db3eea9d47a162d8b0ee9cd18e194f3" + hash: "aef25177af3511dc99004a1e37f7f5d3" } Frame { msec: 2352 - hash: "29da9b8da8f572ace93250abb8626a90" + hash: "f9e11fd7023a72366dacaaf19b2eb81c" } Frame { msec: 2368 - hash: "179b74316d885f9ee41066b9c475b57f" + hash: "51f7c896d79c900a2b54a8c756228200" } Frame { msec: 2384 - hash: "35464509ef5a9919af46a30d40c3edc7" + hash: "28c18081813c801c6793873ec23e6c0c" } Frame { msec: 2400 - hash: "aadec42355d38d149421ef6c93783e69" + hash: "39df3050c4100e8a4f6e648b4aa16ba7" } Frame { msec: 2416 - hash: "cb8609791270e8e3c13da4579f85595f" + hash: "752cb6969fa8b76abf4bb229edb2c21f" } Frame { msec: 2432 - hash: "93e81e036a1bc30cc63ce703f8f43a34" + hash: "54d50f6c980cb04a1634622a29a6f0e9" } Frame { msec: 2448 - hash: "d08d18adf9ca92cd6597c2f51ae90383" + hash: "d510db233f025b026f896b760848cc07" } Frame { msec: 2464 - hash: "f54ec103787023647beaa4b992340385" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2480 - hash: "61c9f72d78fce0b966a278abacc97ce6" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2496 - hash: "5b0500ed0562b11280c3424412f74188" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2512 - hash: "b8ee7bc1e94ce35bf946ee71fa03d72c" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2528 - hash: "60ec6aceeaf82fc730c3df55b5c06f90" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2544 - hash: "01cc732bad8b28483e79115c117ee26d" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2560 - hash: "b39c8d373524ba679c8567d16e6c5fe0" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2576 - hash: "2474476dfd021ff485c3a127bd22367e" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2592 - hash: "1342a1a0f6bc02159de1be058cf2411b" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2608 - hash: "a9721b64b9a5526335937245302249ae" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Mouse { type: 2 @@ -938,15 +938,15 @@ VisualTest { } Frame { msec: 2624 - hash: "109dc503ee86e731f52d25908daf5d36" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2640 - hash: "94998dbab6792c518ca1f37f060f1d4b" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Frame { msec: 2656 - hash: "3146ba4e63fa74279939b8de935f067c" + hash: "e5c8d361abcbc15df0b0b82728cb5b84" } Mouse { type: 5 @@ -966,7 +966,7 @@ VisualTest { } Frame { msec: 2672 - hash: "1aaea4143076bf8ba8190d94fcc89e64" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -986,7 +986,7 @@ VisualTest { } Frame { msec: 2688 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1006,7 +1006,7 @@ VisualTest { } Frame { msec: 2704 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1026,7 +1026,7 @@ VisualTest { } Frame { msec: 2720 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1046,7 +1046,7 @@ VisualTest { } Frame { msec: 2736 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1066,39 +1066,39 @@ VisualTest { } Frame { msec: 2752 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2768 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2784 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2800 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2816 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2832 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2848 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2864 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2880 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2896 @@ -1106,51 +1106,51 @@ VisualTest { } Frame { msec: 2912 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2928 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2944 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2960 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2976 - hash: "a0d8bb20189c3c65e5e72671788d9493" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 2992 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3008 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3024 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3040 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3056 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3072 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3088 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 2 @@ -1162,23 +1162,23 @@ VisualTest { } Frame { msec: 3104 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3120 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3136 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3152 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3168 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1190,11 +1190,11 @@ VisualTest { } Frame { msec: 3184 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Frame { msec: 3200 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1214,7 +1214,7 @@ VisualTest { } Frame { msec: 3216 - hash: "1236a317e60f7ae3d3fb2fb521bad2a2" + hash: "f728208b0fc2f230313c86378cf7f419" } Mouse { type: 5 @@ -1234,7 +1234,7 @@ VisualTest { } Frame { msec: 3232 - hash: "1b604ea70459a768fb37a6333000174b" + hash: "7d43010a9951054df82571936a04cc50" } Mouse { type: 5 @@ -1254,7 +1254,7 @@ VisualTest { } Frame { msec: 3248 - hash: "25e0aabe364085a61b4572ef015dac2c" + hash: "ab1980970c82238d2c37d61db4fc5153" } Mouse { type: 5 @@ -1274,7 +1274,7 @@ VisualTest { } Frame { msec: 3264 - hash: "ee6fc5c1de08e6f13f23b26829d2cba2" + hash: "849ffa1fdd718a48e9570b88987f9203" } Mouse { type: 5 @@ -1294,7 +1294,7 @@ VisualTest { } Frame { msec: 3280 - hash: "b077c59359d047738d9ba739f591393b" + hash: "d497eff3c8879d30619630e7ffcbf5c9" } Mouse { type: 5 @@ -1314,7 +1314,7 @@ VisualTest { } Frame { msec: 3296 - hash: "2cc0b8d7bd088f2277f5e939c234114c" + hash: "b0679dfe2f631e41f5cc269bd16d742c" } Mouse { type: 5 @@ -1334,7 +1334,7 @@ VisualTest { } Frame { msec: 3312 - hash: "64703db84cd5bda3109546293783804d" + hash: "ab2d88a4cd58d0064c32660272ff1dbd" } Mouse { type: 5 @@ -1354,7 +1354,7 @@ VisualTest { } Frame { msec: 3328 - hash: "137cd88932ad1fdbfdbf1a80cccf7b3f" + hash: "ea3cff28ff3be273332b19a2b8acb95e" } Mouse { type: 5 @@ -1374,7 +1374,7 @@ VisualTest { } Frame { msec: 3344 - hash: "ff9011d861c64bcad214b52cb4245583" + hash: "458decd62af57d333a07459c89e62393" } Mouse { type: 5 @@ -1394,7 +1394,7 @@ VisualTest { } Frame { msec: 3360 - hash: "c3f0132e472d29ddee95c7349243d33e" + hash: "1347a26241ed98d4913e1cb6cda58286" } Mouse { type: 5 @@ -1414,87 +1414,87 @@ VisualTest { } Frame { msec: 3376 - hash: "42ae9c21dce6a7cd59de228dac775dd5" + hash: "2efe07858c0c4de7fd3e339d7a24d5f5" } Frame { msec: 3392 - hash: "3f8631caf6a98d83356b188d6f94e9a6" + hash: "3edbe6755710ce148341faeb6980707a" } Frame { msec: 3408 - hash: "b2788cd1939a6dd42f12d8fd1282a122" + hash: "0f53231de64ac5b0503e92ad10155dea" } Frame { msec: 3424 - hash: "0d1ab6e9f2780be0c392d20f4b3b9619" + hash: "f2be693c23ea0885d6e8180c3062ba76" } Frame { msec: 3440 - hash: "03fdd91b352798b1ff958c23c0bc5f35" + hash: "207003ce6908f9707e9193a6c82a40c0" } Frame { msec: 3456 - hash: "028fee3630fdb3cf862213c0466a56fe" + hash: "ba86efade16e8965f59f6257ae90d131" } Frame { msec: 3472 - hash: "3ab76009ca029723e5cf0bf9bc154102" + hash: "1fdaaa68c4ed484536c207a0eacf6e72" } Frame { msec: 3488 - hash: "866c59b7dd545364b70ddbf21a8ee874" + hash: "d1223c8254f9e7e37c4e09628f38bce2" } Frame { msec: 3504 - hash: "9b4ff972b1055db38900fc0c5007e7b0" + hash: "c822447614f47b5e15ffad967964a061" } Frame { msec: 3520 - hash: "cbe0073c84617e23f0679a08c1a78492" + hash: "5eb2e64f11847cc9360291e14e866611" } Frame { msec: 3536 - hash: "374a5e6070dd628ed031e80d44be1f3f" + hash: "545dcc2645b50d78c84c658880d0500c" } Frame { msec: 3552 - hash: "4d16c81f877585a82549cfc4f68c574d" + hash: "9d984e07b99137b3cb57dd4df16b8237" } Frame { msec: 3568 - hash: "64b2b4c374a730b138b3573095f45d2c" + hash: "da27085e7a3cccde7cc3db2d9c6cc2cd" } Frame { msec: 3584 - hash: "26c59f4131fdb01ac4771231341c75c3" + hash: "8d8c117ca102cb93e752904fe3aee7bc" } Frame { msec: 3600 - hash: "bf6a3fdb7c516ca9cfc09f1059cc8cdf" + hash: "bfb5ed7b65f36d80e3156560a0ec58b7" } Frame { msec: 3616 - hash: "1bfb86796087cd293c68205cce6ac294" + hash: "bbd5f2b95325fde3b8759f2ef713c6bd" } Frame { msec: 3632 - hash: "e0f76f8fc7bd7756a4e004655f97f782" + hash: "1c36be8deb2079ed81f1718c92e44803" } Frame { msec: 3648 - hash: "61d3aa5f827452482d8a4a903fe64acc" + hash: "5a424e7e66d87d278483c43070920d56" } Frame { msec: 3664 - hash: "c8e42d3a5df195eaa091e50fc9dcd51e" + hash: "ae28bc20e20e022e1ac9bc2ddac0e134" } Frame { msec: 3680 - hash: "bb684dccf4c0a74dc091fb78c1be4f2b" + hash: "1551c4aae06a258bdadc9ef356724871" } Frame { msec: 3696 - hash: "54341e5a76fb4657021c41e6e3f3d496" + hash: "526aec43f710e524d247f8a4b08c261c" } Mouse { type: 2 @@ -1514,7 +1514,7 @@ VisualTest { } Frame { msec: 3712 - hash: "435ee710e108df42f659250ad7dbdb5e" + hash: "b50ef7198c1831623ed2210e651ac618" } Mouse { type: 5 @@ -1526,7 +1526,7 @@ VisualTest { } Frame { msec: 3728 - hash: "0c7078ec0d4a1dea84e0fba06323c533" + hash: "913269856c18d4f478eed1aa1d5ae293" } Mouse { type: 5 @@ -1546,7 +1546,7 @@ VisualTest { } Frame { msec: 3744 - hash: "854103790c02ca86fa011ef1b0f2be0a" + hash: "2c6a32e167bef4c3de0ca97e5764f31b" } Mouse { type: 5 @@ -1566,7 +1566,7 @@ VisualTest { } Frame { msec: 3760 - hash: "1a5995196e5bb4d1464ca76191af72d5" + hash: "88386cf4d982c5ca4e3fbd3519d9bd9c" } Mouse { type: 5 @@ -1586,7 +1586,7 @@ VisualTest { } Frame { msec: 3776 - hash: "397bbd080cae99790621642fab6ded91" + hash: "ecf04273061af5f881925f3a33015fbb" } Mouse { type: 5 @@ -1606,7 +1606,7 @@ VisualTest { } Frame { msec: 3792 - hash: "66ecad306911060329dcf7695c358e87" + hash: "b09c45ea79cd818bac6fe35e4167d4bd" } Mouse { type: 5 @@ -1626,7 +1626,7 @@ VisualTest { } Frame { msec: 3808 - hash: "c06da5f40f3f59f576a1d540d0b3244f" + hash: "4a1dbbac65a3caac16b38c45be61003c" } Mouse { type: 5 @@ -1646,7 +1646,7 @@ VisualTest { } Frame { msec: 3824 - hash: "a88d97691539dce19af4c14baf610275" + hash: "f4a805fc5c12cc3b2a22ef01050bf3aa" } Mouse { type: 5 @@ -1666,7 +1666,7 @@ VisualTest { } Frame { msec: 3840 - hash: "a07dca2c0014609ca5241612550992f5" + hash: "aa7805e4d806c4c56ded804145c44464" } Mouse { type: 5 @@ -1706,7 +1706,7 @@ VisualTest { } Frame { msec: 3872 - hash: "e5a4e76dd607ba1bae97aaf184ee009a" + hash: "fd2eab6b3a65713f057da22a412512c7" } Mouse { type: 5 @@ -1726,7 +1726,7 @@ VisualTest { } Frame { msec: 3888 - hash: "bb1d2614e590562479fc8d301bc7402f" + hash: "0dda191a66162db6365c663979b0990d" } Mouse { type: 5 @@ -1746,7 +1746,7 @@ VisualTest { } Frame { msec: 3904 - hash: "5d9fd2238666d3ae04613f1bba0fab05" + hash: "72a57fe4fc34a19040890a9e2a11dae5" } Mouse { type: 5 @@ -1766,7 +1766,7 @@ VisualTest { } Frame { msec: 3920 - hash: "b12a944cb5e593afbb21a10453879b52" + hash: "fd18bd5f8f09c995f122b8b4ecb80279" } Mouse { type: 5 @@ -1786,7 +1786,7 @@ VisualTest { } Frame { msec: 3936 - hash: "2f04c990978627b86fb2ad04579db0db" + hash: "8d33b6fa9d6525902e5611cf8ed2fa1f" } Mouse { type: 5 @@ -1798,7 +1798,7 @@ VisualTest { } Frame { msec: 3952 - hash: "e7ddf142fc36174fcaaa70b9340ef7a8" + hash: "d73a8eba0c43f214946052481f3db98f" } Mouse { type: 5 @@ -1818,7 +1818,7 @@ VisualTest { } Frame { msec: 3968 - hash: "4fce53c6f5347fe03ecf17b07fabe3ac" + hash: "c2f101636963ff5c61be2ad83c6b7ceb" } Mouse { type: 5 @@ -1846,111 +1846,111 @@ VisualTest { } Frame { msec: 3984 - hash: "75a0ec2c0158c55a90147c3f4afaa19c" + hash: "54630f489303c7ec2e94b4c941bd310f" } Frame { msec: 4000 - hash: "e89e98b7c1f36b74c664c77e121dedcb" + hash: "357106c752b13bcca047d55a3c7cd486" } Frame { msec: 4016 - hash: "f4c1e52a7b97a25fba640be2a1430d2d" + hash: "b00b78122721ddcded2c7131cfe40d53" } Frame { msec: 4032 - hash: "be58ca8f63dac8373825231512f483ca" + hash: "7da9e4197cb9be292e561790af1caa27" } Frame { msec: 4048 - hash: "755b16d4be00cb52595d42775d6227ac" + hash: "076fefc33455667af954dcc5a06017d3" } Frame { msec: 4064 - hash: "c62f1ebbb1e4ae4ca22c060078d6240b" + hash: "76edfedd2b9edcc5770dcce87b022427" } Frame { msec: 4080 - hash: "5f1187e9530584f9eb81ce1ce8267da0" + hash: "12e6711077da076b737aef1aaa336d42" } Frame { msec: 4096 - hash: "5dc9921e9ddf15ee0457fcdc834544c5" + hash: "1e19329fb839a00faa3b95d13b7a9015" } Frame { msec: 4112 - hash: "efacedc2782435ef4e269e6956fb3547" + hash: "7469fb57ce0b7ea9a7cc6da14f6a245a" } Frame { msec: 4128 - hash: "5b356dd3082f6b0920bb41d332595ce1" + hash: "17e3aca0838e2ba75cc9b869bb969220" } Frame { msec: 4144 - hash: "5d8afcc1abd890beb2badf85bcf02897" + hash: "32ebb24cee3ba65f9242708538203553" } Frame { msec: 4160 - hash: "03c56ab4fea11cce19fcbb62dccb7683" + hash: "948429b8ded1f688cd7e27e0f056f40c" } Frame { msec: 4176 - hash: "236254ce32a8e06dc42f2fd3c9ac6c7c" + hash: "c6fc2e8519a31bc18eb924ca98cd24be" } Frame { msec: 4192 - hash: "4beb33da77bc2b41eb882a2a5cdeb539" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4208 - hash: "b345470adead1ffb3af4d1091ffbd95c" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4224 - hash: "c2677f1653b08952338a5c26a724ebe7" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4240 - hash: "45b6633acf0ac28c5b5462920cf61282" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4256 - hash: "26a9a6609ce8eee1f744c2bd43494f22" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4272 - hash: "9373a8010a05d05cb5b3c2ec75359493" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4288 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4304 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4320 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4336 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4352 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4368 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4384 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 4400 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Mouse { type: 2 @@ -1962,7 +1962,7 @@ VisualTest { } Frame { msec: 4416 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Mouse { type: 5 @@ -1974,7 +1974,7 @@ VisualTest { } Frame { msec: 4432 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Mouse { type: 5 @@ -1994,7 +1994,7 @@ VisualTest { } Frame { msec: 4448 - hash: "d0c561761825512a02a9e3640139cadc" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Mouse { type: 5 @@ -2014,7 +2014,7 @@ VisualTest { } Frame { msec: 4464 - hash: "0e7554f077e2d6d8c6cf9496b20ab009" + hash: "d8f9d016318e0bd38d4654b4850da952" } Mouse { type: 5 @@ -2034,7 +2034,7 @@ VisualTest { } Frame { msec: 4480 - hash: "d6e78f43c971abcc1d2aadb96e8b80b0" + hash: "13a2382e08ab10ecb40f9c24c682a797" } Mouse { type: 5 @@ -2054,7 +2054,7 @@ VisualTest { } Frame { msec: 4496 - hash: "10d8e0ee5bd432c639963c9cedd25b85" + hash: "cef145c5d105466f3913bb81bb2b58df" } Mouse { type: 5 @@ -2074,7 +2074,7 @@ VisualTest { } Frame { msec: 4512 - hash: "53e142d6b0112644d75df29f7865fbb4" + hash: "9bc0a21266bebbf8fc3509e5f92dd77f" } Mouse { type: 5 @@ -2086,7 +2086,7 @@ VisualTest { } Frame { msec: 4528 - hash: "9609807e6c2a27a8b9f1d5c878c3dadf" + hash: "e419dbe857667b014e4dd9b57b01bbe4" } Mouse { type: 5 @@ -2098,7 +2098,7 @@ VisualTest { } Frame { msec: 4544 - hash: "a0a1e5fd37e9d8033f182f4f2b20fd26" + hash: "411cb7a7f331161059faba4ae6549229" } Mouse { type: 5 @@ -2110,7 +2110,7 @@ VisualTest { } Frame { msec: 4560 - hash: "b40e553dc373e4018488d5421b9a8914" + hash: "b008d6b2b444881c36521595f6b31539" } Mouse { type: 5 @@ -2122,7 +2122,7 @@ VisualTest { } Frame { msec: 4576 - hash: "22e36512a0af86fac12c09f735dcb1f7" + hash: "77fcc3c74c3832ae6b80aec420cb06e0" } Mouse { type: 5 @@ -2142,59 +2142,59 @@ VisualTest { } Frame { msec: 4592 - hash: "70e9ad0f56e4c37f8684e38f614b889d" + hash: "41d1c54bc76caeae057fb1bdb3b93843" } Frame { msec: 4608 - hash: "0754126f5738e3dcec35fc1ef65fdec3" + hash: "03fdd91b352798b1ff958c23c0bc5f35" } Frame { msec: 4624 - hash: "b3d84ceeecc294d21bc09a3197195c20" + hash: "2098ea8b55b54ca8dd648fb285c43ebf" } Frame { msec: 4640 - hash: "ce00501e194b1056edf1ebd43b954a70" + hash: "9929c509654819fd04da4e4b5c8e22b4" } Frame { msec: 4656 - hash: "793f41ac2568530e6d630446216833dc" + hash: "c470d3a57c6b56f9f56b176823b27d53" } Frame { msec: 4672 - hash: "e8573de724b653439bde85c15e9555ab" + hash: "37474b3a23f90dafee6b9e0043a702fa" } Frame { msec: 4688 - hash: "bfb3f3645c7b2425b686ac23bcef82b8" + hash: "0fbb6a9fded011b010fa6f3a2819630c" } Frame { msec: 4704 - hash: "faa78596e208c2cf4593ea25e31fabde" + hash: "6c5a7dad864999548257e4bf0ddc3687" } Frame { msec: 4720 - hash: "f1b0931bffce37abfe5a6d635f1f8454" + hash: "339bc42e559c66d07f37af5e06feacef" } Frame { msec: 4736 - hash: "0975630a55bfd56eb3e39426c1c3f1e5" + hash: "513dc773dc93275e32fa9ac61e6dcb46" } Frame { msec: 4752 - hash: "98f1d79153a8009123abc94141375779" + hash: "b725c84435b1f387dc3f375280e39de6" } Frame { msec: 4768 - hash: "d864817f877a9eeb44c665518ea19687" + hash: "f3d04b513df286aacb9ebdb107d7a0b4" } Frame { msec: 4784 - hash: "79745c267d14e7790e1bb3a7e76f20b4" + hash: "c22839005ed0cb6b2fa9c958d17fd948" } Frame { msec: 4800 - hash: "ec038d4cec64b847711fa221f808bead" + hash: "2fb9a2d5d22a6d0ed567328ffaa512f0" } Frame { msec: 4816 @@ -2202,239 +2202,239 @@ VisualTest { } Frame { msec: 4832 - hash: "ef7b3f93abbf210f8f0d38a58380dc8f" + hash: "ba13b0b4790aec7084b5553fe0b0d72b" } Frame { msec: 4848 - hash: "f0eea63127df25f7f818596fc034fef8" + hash: "2bc983733d4004cc67a56d77e9f48e5d" } Frame { msec: 4864 - hash: "8000dee3ea54522a8193a7f9f2e86023" + hash: "0f729cbe41b155b6eef20a4be207b853" } Frame { msec: 4880 - hash: "111485ebaf93aae4f5e0a83da898bbac" + hash: "c2ca47a7d70ef827029b32c11a052b83" } Frame { msec: 4896 - hash: "4b2dee1fd88dcaeabc8235f6a0e5c090" + hash: "803aefca7f1cbd494d2d2f7e7eea9a3f" } Frame { msec: 4912 - hash: "5e560c777d0294dfa8f249232bfcf3a2" + hash: "2641683e1fa9ed418ac89631be7922f1" } Frame { msec: 4928 - hash: "d8b490092ca5ce3ef9b078f4768c382a" + hash: "3d9370305ca147625828f7ee3b34ca33" } Frame { msec: 4944 - hash: "28b2bbc3fd19786dd9c0ab718141c525" + hash: "5cdfdd22a0dc1ed78035ae4b5e2e26a7" } Frame { msec: 4960 - hash: "d1a61000ebc5a475c0223dde649c8054" + hash: "2af663981b43dbe699849eff4731829a" } Frame { msec: 4976 - hash: "d3e8aae08a2518c039d6bda80fc520a4" + hash: "b159d3a09666327bd2d860bf56920734" } Frame { msec: 4992 - hash: "9f3bd8654adb9af0457dd50ff71fcd43" + hash: "a1ed6f686f4cda9aa59bfd49deb8a075" } Frame { msec: 5008 - hash: "befe00fef613b7616e2dc668a5ed59c7" + hash: "c5f1862e7cbb1dcd6b303e58c525ab5c" } Frame { msec: 5024 - hash: "24e84e6998389aa119d7d9e0ac2206ac" + hash: "3cc5e5d87067978961eee6e7b33ada06" } Frame { msec: 5040 - hash: "2d3d2b66bf016c8e499f527dbf8923db" + hash: "74f3b0eae443bd9f171020fd973ca960" } Frame { msec: 5056 - hash: "52d24673729dbd53d3227675b7001b24" + hash: "432037812ab1a09e0d0b32dfaf0f876e" } Frame { msec: 5072 - hash: "4e5c807682d7b6b7839c047a7fb4ad93" + hash: "0eec7146b8df3b4892e89abd13b8bc9d" } Frame { msec: 5088 - hash: "319affea47c4a0b0e2c3db51b85430bc" + hash: "a01dc5f4b4307aa66068d21159dd64d5" } Frame { msec: 5104 - hash: "344962f0b88c7e8a33df71b4708fd1c0" + hash: "11eefdf5b1be8493a6ed9aaf519c7e17" } Frame { msec: 5120 - hash: "ac099ba8a5639b9c83b6f58f2b5bcf93" + hash: "55ed797b82f5bca2ac2b5954c44c041e" } Frame { msec: 5136 - hash: "2f8e57c93289dcdc758281531300e949" + hash: "498d4ca9faabf8b59e2359b60dc1aff2" } Frame { msec: 5152 - hash: "e4cc3bdf6068064bcfdd0014cc301e65" + hash: "78895368b141ab6d3a16f65f4389b2d5" } Frame { msec: 5168 - hash: "598c8a33e2bbf47b21df8b0636e0f0bc" + hash: "c73b27167bad79f3f3c5ebb64fa579c2" } Frame { msec: 5184 - hash: "6aea67c85370eee8447a22e2b9e8c44c" + hash: "fb05312d65155f0300f456d727698b80" } Frame { msec: 5200 - hash: "39e27a3376f4aba8510f7b0d90ca0e33" + hash: "6e974736a0ecea6a71c1a7052a14fa20" } Frame { msec: 5216 - hash: "0ff93a16a07af43bd5e22a2b00fd2588" + hash: "f5daf5bec03d3e56c877e9b2dc5701b6" } Frame { msec: 5232 - hash: "8b6004368b9b0a766f6b519820fe1ff6" + hash: "29793d2147563feb9ed0ebff18b303cd" } Frame { msec: 5248 - hash: "5d92c0a12ff138d1b2c75bd042be4ea2" + hash: "5b63dfa3cb7ac0847f2e63f9d2a0b2b6" } Frame { msec: 5264 - hash: "4386b0abe49106a0174154c726c301f6" + hash: "cf2f42dd9830d80f50df30e93a0b1ad2" } Frame { msec: 5280 - hash: "832da8d2a86caa3ca96f33d2cd49178e" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5296 - hash: "efee6ab1ba4a1112f2129aad12825667" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5312 - hash: "f20a7e67a4789c559b0b0a7656bd89b1" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5328 - hash: "350cc8c0085a8f79c9ea8880737a0b75" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5344 - hash: "b19715b4029ea489debf7c5a269aca98" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5360 - hash: "f383fcaf603af41650c5622bfaf136b3" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5376 - hash: "0c62a442367fc0bac5117da1327ed39a" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5392 - hash: "323ba45d158d983f359211f1a87b7ebd" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5408 - hash: "aeed1a31b8b77dac2c2858969ff2d86c" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5424 - hash: "27a9357730a97846ffeddd18492df04d" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5440 - hash: "42f78593e64585b33c8854e8ea92710e" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5456 - hash: "064f5cec99b9a351bebe2088019f46d1" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5472 - hash: "d3669826f94aa2afc1069ab967f677a3" + hash: "8abb0aa8951612338c3bb87c7a0d2509" } Frame { msec: 5488 - hash: "a118cf8892d29e6b70b4e65e42380c15" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5504 - hash: "f254260f01ff4697e9e3146cc106140d" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5520 - hash: "ec062b2bb87444115c2e8744b7f80bde" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5536 - hash: "4d45522a4e4253c810cac9cbf24c9b76" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5552 - hash: "532c3d3ead73836948a1036e8e69cadf" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5568 - hash: "4debea14aeac85ff4e64387938d8b010" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5584 - hash: "d8940cf6e39a1bd5e7216a83ce87a676" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5600 - hash: "fba6485f8a60a38ce2f3110137b1f2df" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5616 - hash: "8a8909b114332dd932b784a2640e9ff4" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5632 - hash: "fd901422400333c137240ef5f91928a3" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5648 - hash: "97b84a957515d5823e381fdd86d31fb8" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5664 - hash: "f3547ea694b88dd7d2fb8b04d6bf76a9" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5680 - hash: "9eb0da29d0c323b45e62d31bee97ce8c" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5696 - hash: "9d814096d27e9fbcffdf7e29866e0059" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5712 - hash: "6087185e1e8bf17545a7372be2990ab2" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5728 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5744 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5760 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5776 @@ -2442,126 +2442,126 @@ VisualTest { } Frame { msec: 5792 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5808 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5824 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5840 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5856 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5872 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5888 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5904 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5920 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5936 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5952 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5968 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 5984 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6000 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6016 - hash: "82e534c416dfe884e5abc2f91d902484" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6032 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6048 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6064 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6080 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6096 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6112 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6128 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6144 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6160 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6176 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6192 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6208 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6224 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6240 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6256 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } Frame { msec: 6272 - hash: "6839b467f32eaa79d4c1ce4905145350" + hash: "a29d4b3fa16829823e63bf83e7b62aff" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml index 4374b84..08499e7 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/test-pathview.qml @@ -35,6 +35,8 @@ Rectangle { id: photoPathView; model: rssModel; delegate: photoDelegate anchors.fill: parent; z: 1 anchors.topMargin:40 + highlightMoveDuration: 200 + flickDeceleration: 200 path: Path { startX: -50; startY: 40; -- cgit v0.12 From e1ac82f713ab2a766ae518f3ec7a7f76689acb48 Mon Sep 17 00:00:00 2001 From: Jason McDonald Date: Thu, 23 Dec 2010 13:14:06 +1000 Subject: Improve docs for QTEST_MAIN macro. The macro doesn't always create a QApplication, it depends on whether QT_GUI_LIB is defined. Task-number: QTBUG-3899 Reviewed-by: Rohan McGovern --- src/testlib/qtestcase.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp index e3a8726..207873e 100644 --- a/src/testlib/qtestcase.cpp +++ b/src/testlib/qtestcase.cpp @@ -298,10 +298,14 @@ QT_BEGIN_NAMESPACE \relates QTest - Implements a main() function that instantiates a QApplication object and + Implements a main() function that instantiates an application object and the \a TestClass, and executes all tests in the order they were defined. Use this macro to build stand-alone executables. + If \c QT_GUI_LIB is defined, the application object will be a QApplication, + otherwise it will be a QCoreApplication. If qmake is used and the configuration + includes \c{QT += gui}, then \c QT_GUI_LIB will be defined automatically. + \bold {Note:} On platforms that have keypad navigation enabled by default (eg: Symbian), this macro will forcfully disable it to simplify the usage of key events when writing autotests. If you wish to write a test case that uses keypad navigation, you should -- cgit v0.12 From 34630042ded25177b49f8e54b41269db1be42935 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 23 Dec 2010 13:17:20 +1000 Subject: Try fixing build error on Windows --- .../declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro index 472cffb..efcea12 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro +++ b/tests/auto/declarative/qdeclarativexmllistmodel/qdeclarativexmllistmodel.pro @@ -1,5 +1,5 @@ load(qttest_p4) -contains(QT_CONFIG,declarative): QT += declarative script gui +contains(QT_CONFIG,declarative): QT += declarative script gui network contains(QT_CONFIG,xmlpatterns) { QT += xmlpatterns DEFINES += QTEST_XMLPATTERNS -- cgit v0.12 From 16d08f97eaa7dd0469d7c9006546f86f1fd763f6 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 13:13:36 +1000 Subject: Models which load incrementally via fetchMore() don't work. Call canFetchMore()/fetchMore() on setModel(), setRootIndex() and when the last item is created. Task-number: QTBUG-16039 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativevisualitemmodel.cpp | 6 ++ .../qdeclarativelistview/incrementalmodel.cpp | 89 ++++++++++++++++++++++ .../qdeclarativelistview/incrementalmodel.h | 68 +++++++++++++++++ .../qdeclarativelistview/qdeclarativelistview.pro | 3 +- .../tst_qdeclarativelistview.cpp | 28 +++++++ 5 files changed, 193 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativelistview/incrementalmodel.cpp create mode 100644 tests/auto/declarative/qdeclarativelistview/incrementalmodel.h diff --git a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp index 4f5213a..bf9263b 100644 --- a/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp +++ b/src/declarative/graphicsitems/qdeclarativevisualitemmodel.cpp @@ -773,6 +773,8 @@ void QDeclarativeVisualDataModel::setModel(const QVariant &model) QObject::connect(d->m_abstractItemModel, SIGNAL(modelReset()), this, SLOT(_q_modelReset())); QObject::connect(d->m_abstractItemModel, SIGNAL(layoutChanged()), this, SLOT(_q_layoutChanged())); d->m_metaDataCacheable = true; + if (d->m_abstractItemModel->canFetchMore(d->m_root)) + d->m_abstractItemModel->fetchMore(d->m_root); return; } if ((d->m_visualItemModel = qvariant_cast(model))) { @@ -870,6 +872,8 @@ void QDeclarativeVisualDataModel::setRootIndex(const QVariant &root) if (d->m_root != modelIndex) { int oldCount = d->modelCount(); d->m_root = modelIndex; + if (d->m_abstractItemModel && d->m_abstractItemModel->canFetchMore(modelIndex)) + d->m_abstractItemModel->fetchMore(modelIndex); int newCount = d->modelCount(); if (d->m_delegate && oldCount) emit itemsRemoved(0, oldCount); @@ -1094,6 +1098,8 @@ QDeclarativeItem *QDeclarativeVisualDataModel::item(int index, const QByteArray d->m_delegateValidated = true; } } + if (d->modelCount()-1 == index && d->m_abstractItemModel && d->m_abstractItemModel->canFetchMore(d->m_root)) + d->m_abstractItemModel->fetchMore(d->m_root); return item; } diff --git a/tests/auto/declarative/qdeclarativelistview/incrementalmodel.cpp b/tests/auto/declarative/qdeclarativelistview/incrementalmodel.cpp new file mode 100644 index 0000000..b2c9df5 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/incrementalmodel.cpp @@ -0,0 +1,89 @@ +/**************************************************************************** +** +** 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 test suite 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 "incrementalmodel.h" +#include +#include + +IncrementalModel::IncrementalModel(QObject *parent) + : QAbstractListModel(parent), count(0) +{ + for (int i = 0; i < 100; ++i) + list.append("Item " + QString::number(i)); +} + +int IncrementalModel::rowCount(const QModelIndex & /* parent */) const +{ + return count; +} + +QVariant IncrementalModel::data(const QModelIndex &index, int role) const +{ + if (!index.isValid()) + return QVariant(); + + if (index.row() >= list.size() || index.row() < 0) + return QVariant(); + + if (role == Qt::DisplayRole) + return list.at(index.row()); + return QVariant(); +} + +bool IncrementalModel::canFetchMore(const QModelIndex & /* index */) const +{ + if (count < list.size()) + return true; + else + return false; +} + +void IncrementalModel::fetchMore(const QModelIndex & /* index */) +{ + int remainder = list.size() - count; + int itemsToFetch = qMin(5, remainder); + + beginInsertRows(QModelIndex(), count, count+itemsToFetch-1); + + count += itemsToFetch; + + endInsertRows(); +} diff --git a/tests/auto/declarative/qdeclarativelistview/incrementalmodel.h b/tests/auto/declarative/qdeclarativelistview/incrementalmodel.h new file mode 100644 index 0000000..b1f7407 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelistview/incrementalmodel.h @@ -0,0 +1,68 @@ +/**************************************************************************** +** +** 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 test suite 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 IncrementalModel_H +#define IncrementalModel_H + +#include +#include +#include + +class IncrementalModel : public QAbstractListModel +{ + Q_OBJECT + +public: + IncrementalModel(QObject *parent = 0); + + int rowCount(const QModelIndex &parent = QModelIndex()) const; + QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const; + +protected: + bool canFetchMore(const QModelIndex &parent) const; + void fetchMore(const QModelIndex &parent); + +private: + QStringList list; + int count; +}; + +#endif diff --git a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro index 2c5a859..8c99f08 100644 --- a/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro +++ b/tests/auto/declarative/qdeclarativelistview/qdeclarativelistview.pro @@ -2,7 +2,8 @@ load(qttest_p4) contains(QT_CONFIG,declarative): QT += declarative macx:CONFIG -= app_bundle -SOURCES += tst_qdeclarativelistview.cpp +HEADERS += incrementalmodel.h +SOURCES += tst_qdeclarativelistview.cpp incrementalmodel.cpp symbian: { importFiles.sources = data diff --git a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp index dba0cc4..e76cb15 100644 --- a/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp +++ b/tests/auto/declarative/qdeclarativelistview/tst_qdeclarativelistview.cpp @@ -51,6 +51,7 @@ #include #include #include "../../../shared/util.h" +#include "incrementalmodel.h" #ifdef Q_OS_SYMBIAN // In Symbian OS test data is located in applications private dir @@ -106,6 +107,7 @@ private slots: void resizeDelegate(); void QTBUG_16037(); void indexAt(); + void incrementalModel(); private: template void items(); @@ -1998,6 +2000,32 @@ void tst_QDeclarativeListView::indexAt() delete canvas; } +void tst_QDeclarativeListView::incrementalModel() +{ + QDeclarativeView *canvas = createView(); + + IncrementalModel model; + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testModel", &model); + + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/displaylist.qml")); + qApp->processEvents(); + + QDeclarativeListView *listview = findItem(canvas->rootObject(), "list"); + QTRY_VERIFY(listview != 0); + + QDeclarativeItem *contentItem = listview->contentItem(); + QTRY_VERIFY(contentItem != 0); + + QTRY_COMPARE(listview->count(), 20); + + listview->positionViewAtIndex(10, QDeclarativeListView::Beginning); + + QTRY_COMPARE(listview->count(), 25); + + delete canvas; +} + void tst_QDeclarativeListView::qListModelInterface_items() { items(); -- cgit v0.12 From 508d52477fe16f3b425e5d3ec65584e86ed939b3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 15:01:58 +1000 Subject: Improve docs on attached properties on view delegates. Clarify that the properties are attached to the root of the delegate, and must be accessed as such by child items. Task-number: QTBUG-16193 Reviewed-by: Bea Lam --- doc/src/snippets/declarative/gridview/gridview.qml | 26 ++++++++++++++++++++++ doc/src/snippets/declarative/listview/listview.qml | 14 ++++++++---- .../declarative/pathview/pathattributes.qml | 4 ++-- doc/src/snippets/declarative/pathview/pathview.qml | 14 ++++++++++-- .../graphicsitems/qdeclarativegridview.cpp | 9 ++++++++ .../graphicsitems/qdeclarativelistview.cpp | 7 ++++++ .../graphicsitems/qdeclarativepathview.cpp | 9 ++++++++ 7 files changed, 75 insertions(+), 8 deletions(-) diff --git a/doc/src/snippets/declarative/gridview/gridview.qml b/doc/src/snippets/declarative/gridview/gridview.qml index 73e58ec..87d70de 100644 --- a/doc/src/snippets/declarative/gridview/gridview.qml +++ b/doc/src/snippets/declarative/gridview/gridview.qml @@ -132,6 +132,32 @@ GridView { } //![highlightFollowsCurrentItem] +//![isCurrentItem] +GridView { + width: 300; height: 200 + cellWidth: 80; cellHeight: 80 + + Component { + id: contactsDelegate + Rectangle { + id: wrapper + width: 80 + height: 80 + color: GridView.isCurrentItem ? "black" : "red" + Text { + id: contactInfo + text: name + ": " + number + color: wrapper.GridView.isCurrentItem ? "red" : "black" + } + } + } + + model: ContactModel {} + delegate: contactsDelegate + focus: true +} +//![isCurrentItem] + } } diff --git a/doc/src/snippets/declarative/listview/listview.qml b/doc/src/snippets/declarative/listview/listview.qml index 8ba47a8..370429e 100644 --- a/doc/src/snippets/declarative/listview/listview.qml +++ b/doc/src/snippets/declarative/listview/listview.qml @@ -127,10 +127,16 @@ ListView { Component { id: contactsDelegate - Text { - id: contactInfo - text: name + ": " + number - color: contactInfo.ListView.isCurrentItem ? "red" : "black" + Rectangle { + id: wrapper + width: 180 + height: contactInfo.height + color: ListView.isCurrentItem ? "black" : "red" + Text { + id: contactInfo + text: name + ": " + number + color: wrapper.ListView.isCurrentItem ? "red" : "black" + } } } diff --git a/doc/src/snippets/declarative/pathview/pathattributes.qml b/doc/src/snippets/declarative/pathview/pathattributes.qml index d6dacdb..be933e0 100644 --- a/doc/src/snippets/declarative/pathview/pathattributes.qml +++ b/doc/src/snippets/declarative/pathview/pathattributes.qml @@ -52,8 +52,8 @@ Rectangle { scale: PathView.iconScale opacity: PathView.iconOpacity Column { - Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { text: name; font.pointSize: 16} + Image { anchors.horizontalCenter: nameText.horizontalCenter; width: 64; height: 64; source: icon } + Text { id: nameText; text: name; font.pointSize: 16 } } } } diff --git a/doc/src/snippets/declarative/pathview/pathview.qml b/doc/src/snippets/declarative/pathview/pathview.qml index 93298c4..e5e90a4 100644 --- a/doc/src/snippets/declarative/pathview/pathview.qml +++ b/doc/src/snippets/declarative/pathview/pathview.qml @@ -48,8 +48,18 @@ Rectangle { Component { id: delegate Column { - Image { anchors.horizontalCenter: name.horizontalCenter; width: 64; height: 64; source: icon } - Text { text: name; font.pointSize: 16 } + id: wrapper + Image { + anchors.horizontalCenter: nameText.horizontalCenter + width: 64; height: 64 + source: icon + } + Text { + id: nameText + text: name + font.pointSize: 16 + color: wrapper.PathView.isCurrentItem ? "red" : "black" + } } } //! [1] diff --git a/src/declarative/graphicsitems/qdeclarativegridview.cpp b/src/declarative/graphicsitems/qdeclarativegridview.cpp index 4a6a9dc..7ddf6a2 100644 --- a/src/declarative/graphicsitems/qdeclarativegridview.cpp +++ b/src/declarative/graphicsitems/qdeclarativegridview.cpp @@ -1131,6 +1131,13 @@ 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. + GridView attaches a number of properties to the root item of the delegate, for example + \c {GridView.isCurrentItem}. In the following example, the root delegate item can access + this attached property directly as \c GridView.isCurrentItem, while the child + \c contactInfo object must refer to this property as \c wrapper.GridView.isCurrentItem. + + \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem + \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 @@ -1167,6 +1174,8 @@ QDeclarativeGridView::~QDeclarativeGridView() This attached property holds the view that manages this delegate instance. It is attached to each instance of the delegate. + + \snippet doc/src/snippets/declarative/gridview/gridview.qml isCurrentItem */ /*! diff --git a/src/declarative/graphicsitems/qdeclarativelistview.cpp b/src/declarative/graphicsitems/qdeclarativelistview.cpp index 86c8756..702442b 100644 --- a/src/declarative/graphicsitems/qdeclarativelistview.cpp +++ b/src/declarative/graphicsitems/qdeclarativelistview.cpp @@ -1416,6 +1416,13 @@ void QDeclarativeListViewPrivate::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. + ListView attaches a number of properties to the root item of the delegate, for example + \c {ListView.isCurrentItem}. In the following example, the root delegate item can access + this attached property directly as \c ListView.isCurrentItem, while the child + \c contactInfo object must refer to this property as \c wrapper.ListView.isCurrentItem. + + \snippet doc/src/snippets/declarative/listview/listview.qml isCurrentItem + \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 diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index a6f44b3..e3987d0 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -393,6 +393,13 @@ void QDeclarativePathViewPrivate::regenerate() Delegates are instantiated as needed and may be destroyed at any time. State should \e never be stored in a delegate. + PathView attaches a number of properties to the root item of the delegate, for example + \c {PathView.isCurrentItem}. In the following example, the root delegate item can access + this attached property directly as \c PathView.isCurrentItem, while the child + \c nameText object must refer to this property as \c wrapper.PathView.isCurrentItem. + + \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 + \bold Note that 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 @@ -452,6 +459,8 @@ QDeclarativePathView::~QDeclarativePathView() It is attached to each instance of the delegate. This property may be used to adjust the appearance of the current item. + + \snippet doc/src/snippets/declarative/pathview/pathview.qml 1 */ /*! -- cgit v0.12 From 93edc0680b8ca9cccefa31f8d2df08b0fc8f32f8 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 15:21:32 +1000 Subject: More docs for FolderListModel --- .../qdeclarativefolderlistmodel.cpp | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp index 9c71004..7b05bc5 100644 --- a/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp +++ b/src/imports/folderlistmodel/qdeclarativefolderlistmodel.cpp @@ -190,6 +190,12 @@ QVariant QDeclarativeFolderListModel::data(const QModelIndex &index, int role) c return rv; } +/*! + \qmlproperty int FolderListModel::count + + Returns the number of items in the current folder that match the + filter criteria. +*/ int QDeclarativeFolderListModel::rowCount(const QModelIndex &parent) const { Q_UNUSED(parent); @@ -225,6 +231,11 @@ void QDeclarativeFolderListModel::setFolder(const QUrl &folder) } } +/*! + \qmlproperty url FolderListModel::parentFolder + + Returns the URL of the parent of of the current \l folder. +*/ QUrl QDeclarativeFolderListModel::parentFolder() const { QString localFile = d->folder.toLocalFile(); @@ -286,6 +297,21 @@ void QDeclarativeFolderListModel::componentComplete() QMetaObject::invokeMethod(this, "refresh", Qt::QueuedConnection); } +/*! + \qmlproperty enumeration FolderListModel::sortField + + The \a sortField property contains field to use for sorting. sortField + may be one of: + \list + \o Unsorted - no sorting is applied. The order is system default. + \o Name - sort by filename + \o Time - sort by time modified + \o Size - sort by file size + \o Type - sort by file type (extension) + \endlist + + \sa sortReversed +*/ QDeclarativeFolderListModel::SortField QDeclarativeFolderListModel::sortField() const { return d->sortField; @@ -299,6 +325,13 @@ void QDeclarativeFolderListModel::setSortField(SortField field) } } +/*! + \qmlproperty bool FolderListModel::sortReversed + + If set to true, reverses the sort order. The default is false. + + \sa sortField +*/ bool QDeclarativeFolderListModel::sortReversed() const { return d->sortReversed; -- cgit v0.12 From eb395badcba6eada75ad5e6a72b74f5204170ed9 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 23 Dec 2010 15:41:09 +1000 Subject: WorkerScript could starve image loading of CPU. We use idle priority for image loading and XmlListModel in order to keep the UI responsive, but WorkerScript used LowPriority which would significantly reduce CPU available for image loading. Task-number: QTBUG-16167 --- src/declarative/qml/qdeclarativeworkerscript.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/declarative/qml/qdeclarativeworkerscript.cpp b/src/declarative/qml/qdeclarativeworkerscript.cpp index 4b78020..9dc214f 100644 --- a/src/declarative/qml/qdeclarativeworkerscript.cpp +++ b/src/declarative/qml/qdeclarativeworkerscript.cpp @@ -458,7 +458,7 @@ QDeclarativeWorkerScriptEngine::QDeclarativeWorkerScriptEngine(QDeclarativeEngin { d->m_lock.lock(); connect(d, SIGNAL(stopThread()), this, SLOT(quit()), Qt::DirectConnection); - start(QThread::LowPriority); + start(QThread::IdlePriority); d->m_wait.wait(&d->m_lock); d->moveToThread(this); d->m_lock.unlock(); -- cgit v0.12 From 03f94089a16cf6b6a3b533ba1f90444eb18c29ab Mon Sep 17 00:00:00 2001 From: Charles Yin Date: Thu, 4 Nov 2010 15:38:57 +1000 Subject: Add Postgresql 8.x and 9 supports Change-Id: Ic740686ead768cc3e106703049d878549dfd3c6a Task-number:QTBUG-14206 Reviewed-by: Michael Goddard --- src/sql/drivers/psql/qsql_psql.cpp | 116 ++++++++++++++++++++++---------- src/sql/drivers/psql/qsql_psql.h | 6 +- tests/auto/qsqldatabase/tst_databases.h | 2 + 3 files changed, 88 insertions(+), 36 deletions(-) diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index 2a4e595..bf9685f 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -54,7 +54,6 @@ #include #include - #include #include @@ -619,6 +618,50 @@ static void setDatestyle(PGconn* connection) PQclear(result); } +static QPSQLDriver::Protocol qMakePSQLVersion(int vMaj, int vMin) +{ + switch (vMaj) { + case 6: + return QPSQLDriver::Version6; + case 7: + { + switch (vMin) { + case 1: + return QPSQLDriver::Version71; + case 3: + return QPSQLDriver::Version73; + case 4: + return QPSQLDriver::Version74; + default: + return QPSQLDriver::Version7; + } + break; + } + case 8: + { + switch (vMin) { + case 1: + return QPSQLDriver::Version81; + case 2: + return QPSQLDriver::Version82; + case 3: + return QPSQLDriver::Version83; + case 4: + return QPSQLDriver::Version84; + default: + return QPSQLDriver::Version8; + } + break; + } + case 9: + return QPSQLDriver::Version9; + break; + default: + break; + } + return QPSQLDriver::VersionUnknown; +} + static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection) { QPSQLDriver::Protocol serverVersion = QPSQLDriver::Version6; @@ -626,50 +669,44 @@ static QPSQLDriver::Protocol getPSQLVersion(PGconn* connection) int status = PQresultStatus(result); if (status == PGRES_COMMAND_OK || status == PGRES_TUPLES_OK) { QString val = QString::fromAscii(PQgetvalue(result, 0, 0)); + QRegExp rx(QLatin1String("(\\d+)\\.(\\d+)")); rx.setMinimal(true); // enforce non-greedy RegExp + if (rx.indexIn(val) != -1) { int vMaj = rx.cap(1).toInt(); int vMin = rx.cap(2).toInt(); - - switch (vMaj) { - case 7: - switch (vMin) { - case 0: - serverVersion = QPSQLDriver::Version7; - break; - case 1: - case 2: - serverVersion = QPSQLDriver::Version71; - break; - default: - serverVersion = QPSQLDriver::Version73; - break; - } - break; - case 8: - switch (vMin) { - case 0: - serverVersion = QPSQLDriver::Version8; - break; - case 1: - serverVersion = QPSQLDriver::Version81; - break; - case 2: - default: - serverVersion = QPSQLDriver::Version82; - break; - } - break; - default: - break; + serverVersion = qMakePSQLVersion(vMaj, vMin); +#ifdef PG_MAJORVERSION + if (rx.indexIn(QLatin1String(PG_MAJORVERSION)) != -1) { + vMaj = rx.cap(1).toInt(); + vMin = rx.cap(2).toInt(); + } + QPSQLDriver::Protocol clientVersion = qMakePSQLVersion(vMaj, vMin); + + if (serverVersion >= QPSQLDriver::Version9 && clientVersion < QPSQLDriver::Version9) { + //Client version before QPSQLDriver::Version9 only supports escape mode for bytea type, + //but bytea format is set to hex by default in PSQL 9 and above. So need to force the + //server use the old escape mode when connects to the new server with old client library. + result = PQexec(connection, "SET bytea_output=escape; "); + status = PQresultStatus(result); + } else if (serverVersion == QPSQLDriver::VersionUnknown) { + serverVersion = clientVersion; + if (serverVersion != QPSQLDriver::VersionUnknown) + qWarning("The server version of this PostgreSQL is unknown, falling back to the client version."); } +#endif } } PQclear(result); - if (serverVersion < QPSQLDriver::Version71) + //keep the old behavior unchanged + if (serverVersion == QPSQLDriver::VersionUnknown) + serverVersion = QPSQLDriver::Version6; + + if (serverVersion < QPSQLDriver::Version71) { qWarning("This version of PostgreSQL is not supported and may not work."); + } return serverVersion; } @@ -852,7 +889,10 @@ bool QPSQLDriver::commitTransaction() // This hack can dissapear once there is an API to query this sort of information. if (d->pro == QPSQLDriver::Version8 || d->pro == QPSQLDriver::Version81 || - d->pro == QPSQLDriver::Version82) { + d->pro == QPSQLDriver::Version82 || + d->pro == QPSQLDriver::Version83 || + d->pro == QPSQLDriver::Version84 || + d->pro == QPSQLDriver::Version9) { transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0; } @@ -963,6 +1003,9 @@ QSqlIndex QPSQLDriver::primaryIndex(const QString& tablename) const case QPSQLDriver::Version8: case QPSQLDriver::Version81: case QPSQLDriver::Version82: + case QPSQLDriver::Version83: + case QPSQLDriver::Version84: + case QPSQLDriver::Version9: stmt = QLatin1String("SELECT pg_attribute.attname, pg_attribute.atttypid::int, " "pg_class.relname " "FROM pg_attribute, pg_class " @@ -1046,6 +1089,9 @@ QSqlRecord QPSQLDriver::record(const QString& tablename) const case QPSQLDriver::Version8: case QPSQLDriver::Version81: case QPSQLDriver::Version82: + case QPSQLDriver::Version83: + case QPSQLDriver::Version84: + case QPSQLDriver::Version9: stmt = QLatin1String("select pg_attribute.attname, pg_attribute.atttypid::int, " "pg_attribute.attnotnull, pg_attribute.attlen, pg_attribute.atttypmod, " "pg_attrdef.adsrc " diff --git a/src/sql/drivers/psql/qsql_psql.h b/src/sql/drivers/psql/qsql_psql.h index 22871ff..107da87 100644 --- a/src/sql/drivers/psql/qsql_psql.h +++ b/src/sql/drivers/psql/qsql_psql.h @@ -97,6 +97,7 @@ class Q_EXPORT_SQLDRIVER_PSQL QPSQLDriver : public QSqlDriver Q_OBJECT public: enum Protocol { + VersionUnknown = -1, Version6 = 6, Version7 = 7, Version71 = 8, @@ -104,7 +105,10 @@ public: Version74 = 10, Version8 = 11, Version81 = 12, - Version82 = 13 + Version82 = 13, + Version83 = 14, + Version84 = 15, + Version9 = 16, }; explicit QPSQLDriver(QObject *parent=0); diff --git a/tests/auto/qsqldatabase/tst_databases.h b/tests/auto/qsqldatabase/tst_databases.h index 80535df..82ee41a 100644 --- a/tests/auto/qsqldatabase/tst_databases.h +++ b/tests/auto/qsqldatabase/tst_databases.h @@ -235,6 +235,8 @@ public: // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "postgres74-nokia.trolltech.com.au" ); // Version 7.4.19-1.el4_6.1 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql81.apac.nokia.com" ); // Version 8.1.11-1.el5_1.1 // addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql84.apac.nokia.com" ); // Version 8.4.1-2.1.i586 +// addDb( "QPSQL7", "testdb", "testuser", "Ee4Gabf6_", "bq-pgsql90.apac.nokia.com" ); // Version 9.0.0 + // addDb( "QDB2", "testdb", "troll", "trond", "silence.nokia.troll.no" ); // DB2 v9.1 on silence -- cgit v0.12 From 26d2580daab37f4a6ff595a5f18b8a49249b5da1 Mon Sep 17 00:00:00 2001 From: Milian Wolff Date: Thu, 23 Dec 2010 14:31:54 +0100 Subject: improve performance of QTextEngine, esp. setBoundary by using non-detaching operator[] Improves scrolling in testfile content.xml attached to QTBUG-9549. According to callgrind, the improvement is nearly 35% (comparing total incl. cost of QTextEngine::setBoundary) total incl cost / calls to setBoundary = before: 6.0883269E9 / 46520 = approx. 130875.47 after: 2.4834313E9 / 29370 = approx. 84556.733 in relation this gives us: 84556.733 / 130875.47 = approx. 0.64608542 Merge-request: 975 Reviewed-by: Harald Fernengel --- src/gui/text/qtextengine.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 3bd6122..17d5fc1 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -894,16 +894,16 @@ void QTextEngine::shapeText(int item) const if (letterSpacingIsAbsolute) glyphs.advances_x[i-1] += letterSpacing; else { - const QFixed advance = glyphs.advances_x[i-1]; - glyphs.advances_x[i-1] += (letterSpacing - 100) * advance / 100; + QFixed &advance = glyphs.advances_x[i-1]; + advance += (letterSpacing - 100) * advance / 100; } } } if (letterSpacingIsAbsolute) glyphs.advances_x[si.num_glyphs-1] += letterSpacing; else { - const QFixed advance = glyphs.advances_x[si.num_glyphs-1]; - glyphs.advances_x[si.num_glyphs-1] += (letterSpacing - 100) * advance / 100; + QFixed &advance = glyphs.advances_x[si.num_glyphs-1]; + advance += (letterSpacing - 100) * advance / 100; } } if (wordSpacing != 0) { @@ -2521,14 +2521,14 @@ void QTextEngine::setBoundary(int strPos) const return; int itemToSplit = 0; - while (itemToSplit < layoutData->items.size() && layoutData->items[itemToSplit].position <= strPos) + while (itemToSplit < layoutData->items.size() && layoutData->items.at(itemToSplit).position <= strPos) itemToSplit++; itemToSplit--; - if (layoutData->items[itemToSplit].position == strPos) { + if (layoutData->items.at(itemToSplit).position == strPos) { // already a split at the requested position return; } - splitItem(itemToSplit, strPos - layoutData->items[itemToSplit].position); + splitItem(itemToSplit, strPos - layoutData->items.at(itemToSplit).position); } void QTextEngine::splitItem(int item, int pos) const -- cgit v0.12 From 15f6124da9c2cf70e74a1e0e6f89c27d17ec9d29 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 23 Dec 2010 15:53:43 +0200 Subject: Fix fullscreen/Maximized dialog misplacement in Symbian Task-number: QTBUG-16277 Reviewed-by: Sami Merila --- src/gui/dialogs/qdialog.cpp | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/gui/dialogs/qdialog.cpp b/src/gui/dialogs/qdialog.cpp index 16ea045..bcf952c 100644 --- a/src/gui/dialogs/qdialog.cpp +++ b/src/gui/dialogs/qdialog.cpp @@ -899,9 +899,21 @@ bool QDialog::symbianAdjustedPosition() { #if defined(Q_WS_S60) QPoint p; - const bool doS60Positioning = !(isFullScreen()||isMaximized()); - if (doS60Positioning) { - QPoint oldPos = pos(); + QPoint oldPos = pos(); + if (isFullScreen()) { + p.setX(0); + p.setY(0); + } else if (isMaximized()) { + TRect statusPaneRect = TRect(); + if (S60->screenHeightInPixels > S60->screenWidthInPixels) { + AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStatusPane, statusPaneRect); + } else { + AknLayoutUtils::LayoutMetricsRect(AknLayoutUtils::EStaconTop, statusPaneRect); + } + + p.setX(0); + p.setY(statusPaneRect.Height()); + } else { // naive way to deduce screen orientation if (S60->screenHeightInPixels > S60->screenWidthInPixels) { int cbaHeight; @@ -937,10 +949,10 @@ bool QDialog::symbianAdjustedPosition() p.setX(qMax(0,S60->screenWidthInPixels - width())); } } - if (oldPos != p || p.y() < 0) - move(p); } - return doS60Positioning; + if (oldPos != p || p.y() < 0) + move(p); + return true; #else // TODO - check positioning requirement for Symbian, non-s60 return false; -- cgit v0.12 From b7ac9ed56ff8bfb3158d115ea7c6e3eef250f4bc Mon Sep 17 00:00:00 2001 From: Kent Hansen Date: Tue, 28 Dec 2010 14:19:18 +0100 Subject: Add compiler optimization for QtScript/JSC on Symbian Ported from http://trac.webkit.org/changeset/73126. This gives a ~70% performance improvement for the SunSpider and V8 benchmarks. Task-number: QTBUG-15847 Reviewed-by: Simon Hausmann --- src/script/script.pro | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/script/script.pro b/src/script/script.pro index 4ee86d7..d1633d8 100644 --- a/src/script/script.pro +++ b/src/script/script.pro @@ -84,5 +84,15 @@ symbian { LIBS += -lhal } +symbian { + symbian-abld|symbian-sbsv2 { + MMP_RULES += ALWAYS_BUILD_AS_ARM + } else { + QMAKE_CFLAGS -= --thumb + QMAKE_CXXFLAGS -= --thumb + } + QMAKE_CXXFLAGS.ARMCC += -OTime -O3 +} + # WebKit doesn't compile in C++0x mode *-g++*:QMAKE_CXXFLAGS -= -std=c++0x -std=gnu++0x -- cgit v0.12 From ef96a142f790152524248b4dd0f24e3126ef871e Mon Sep 17 00:00:00 2001 From: Jason Barron Date: Wed, 29 Dec 2010 19:15:03 +0200 Subject: Clear WSERV content when a native child receives an "expose" Native child windows on Symbian can cause composition artifacts on S^3 because they own a visible RWindow instance, but the RWindow technically has no content because child windows paint their content to their parent's backing store. In the event that a native child widget completely obscures a top level, the composition engine does not understand that the child is "empty" and should clear the UI surface to let the top level "shine through". The result is that articacts can remain on the UI surface after a transition from a WSERV drawing app to a Qt (EGL rendering) app. To fix this issue, we call CWindowGc::Clear() when the native child widget receives an "expose" event. This clears the UI surface content and ensures the top level is visible even though it is technically below another RWindow. Task-number: QTMOBILITY-484 Reviewed-by: Jani Hautakangas --- src/gui/kernel/qapplication_s60.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp index 181fcc7..691c02a 100644 --- a/src/gui/kernel/qapplication_s60.cpp +++ b/src/gui/kernel/qapplication_s60.cpp @@ -1071,6 +1071,14 @@ void QSymbianControl::Draw(const TRect& controlRect) const Q_ASSERT(topExtra); if (!topExtra->inExpose) { topExtra->inExpose = true; + if (!qwidget->isWindow()) { + // If we get here, then it means we have a native child window + // Since no content should ever be painted to these windows, we + // erase them with a transparent brush when they get an expose. + CWindowGc &gc = SystemGc(); + gc.SetBrushColor(TRgb(0, 0, 0, 0)); + gc.Clear(controlRect); + } QRect exposeRect = qt_TRect2QRect(controlRect); qwidget->d_func()->syncBackingStore(exposeRect); topExtra->inExpose = false; -- cgit v0.12 From 2de60ba30f86a9dd338359f7269b62ca5d0a2c46 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 30 Dec 2010 17:16:16 +1000 Subject: Forward qmlviewer traces to system's default message handler on Symbian Task-number: QTBUG-16353 Reviewed-by: Christopher Ham --- tools/qml/main.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index b9513b9..2df96c0 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -88,6 +88,9 @@ void myMessageOutput(QtMsgType type, const char *msg) ::write(fd, "\n", 1); ::fsync(fd); + if (systemMsgOutput) + systemMsgOutput(type, msg); + switch (type) { case QtFatalMsg: abort(); @@ -529,11 +532,7 @@ QDeclarativeViewer *openFile(const QString &fileName) int main(int argc, char ** argv) { -#if defined (Q_OS_SYMBIAN) - qInstallMsgHandler(myMessageOutput); -#else systemMsgOutput = qInstallMsgHandler(myMessageOutput); -#endif #if defined (Q_WS_X11) || defined (Q_WS_MAC) //### default to using raster graphics backend for now -- cgit v0.12 From 22daf9fbdfaa859db6414d39d9354e7d46f63005 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 30 Dec 2010 17:52:30 +1000 Subject: Add convenience deselect() functions to TextInput and TextEdit Task-number: QTBUG-16059 Reviewed-by: Christopher Ham --- src/declarative/graphicsitems/qdeclarativetextedit.cpp | 13 +++++++++++++ src/declarative/graphicsitems/qdeclarativetextedit_p.h | 1 + src/declarative/graphicsitems/qdeclarativetextinput.cpp | 11 +++++++++++ src/declarative/graphicsitems/qdeclarativetextinput_p.h | 1 + .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 7 +++++++ .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 7 +++++++ 6 files changed, 40 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index f37fa62..c1314ff 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -996,6 +996,19 @@ void QDeclarativeTextEditPrivate::focusChanged(bool hasFocus) } /*! + \qmlmethod void TextEdit::deselect() + + Removes active text selection. +*/ +void QDeclarativeTextEdit::deselect() +{ + Q_D(QDeclarativeTextEdit); + QTextCursor c = d->control->textCursor(); + c.clearSelection(); + d->control->setTextCursor(c); +} + +/*! \qmlmethod void TextEdit::selectAll() Causes all text to be selected. diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 7f12c85..691d995 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -223,6 +223,7 @@ Q_SIGNALS: void selectByMouseChanged(bool selectByMouse); public Q_SLOTS: + void deselect(); void selectAll(); void selectWord(); void select(int start, int end); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index 4649be8..4e1c297 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -1166,6 +1166,17 @@ QVariant QDeclarativeTextInput::inputMethodQuery(Qt::InputMethodQuery property) } /*! + \qmlmethod void TextInput::deselect() + + Removes active text selection. +*/ +void QDeclarativeTextInput::deselect() +{ + Q_D(QDeclarativeTextInput); + d->control->deselect(); +} + +/*! \qmlmethod void TextInput::selectAll() Causes all text to be selected. diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 06f77e5..878f040 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -231,6 +231,7 @@ protected: void focusInEvent(QFocusEvent *event); public Q_SLOTS: + void deselect(); void selectAll(); void selectWord(); void select(int start, int end); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index a7971cc..c0bb46e 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -689,6 +689,13 @@ void tst_qdeclarativetextedit::selection() QVERIFY(textEditObject->selectedText().size() == 10); textEditObject->select(0,100); QVERIFY(textEditObject->selectedText().size() == 10); + + textEditObject->deselect(); + QVERIFY(textEditObject->selectedText().isNull()); + textEditObject->select(0,10); + QVERIFY(textEditObject->selectedText().size() == 10); + textEditObject->deselect(); + QVERIFY(textEditObject->selectedText().isNull()); } void tst_qdeclarativetextedit::mouseSelection_data() diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 76e0102..589ffa6 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -392,6 +392,13 @@ void tst_qdeclarativetextinput::selection() textinputObject->select(0,100); QVERIFY(textinputObject->selectedText().size() == 10); + textinputObject->deselect(); + QVERIFY(textinputObject->selectedText().isNull()); + textinputObject->select(0,10); + QVERIFY(textinputObject->selectedText().size() == 10); + textinputObject->deselect(); + QVERIFY(textinputObject->selectedText().isNull()); + delete textinputObject; } -- cgit v0.12 From 8365b863419ad68f7dde7b7595e1b943ad9670ca Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 31 Dec 2010 08:20:39 +1000 Subject: Fixed networkselftest failing to resolve hostname The logic here was the opposite from what was intended. Note that this bug was hidden under normal circumstances when running the entire testcase. It only appeared when one of the following was true: (1) httpProxy or socks5Proxy was run on its own, or (2) the dnsResolution test failed. --- tests/auto/networkselftest/tst_networkselftest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 752e368..5e9c50e 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -337,7 +337,7 @@ QHostAddress tst_NetworkSelfTest::serverIpAddress() // need resolving QHostInfo resolved = QHostInfo::fromName(QtNetworkSettings::serverName()); if(resolved.error() != QHostInfo::NoError || - !resolved.addresses().isEmpty()) { + resolved.addresses().isEmpty()) { qWarning("QHostInfo::fromName failed (%d).", resolved.error()); return QHostAddress(QHostAddress::Null); } -- cgit v0.12 From e8b736c44426fd4ae832e82a9e624c9737a40213 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 31 Dec 2010 11:28:08 +1000 Subject: Use deselect() function in text selection example Task-number: QTBUG-16059 Reviewed-by: Christopher Ham --- examples/declarative/text/textselection/textselection.qml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/declarative/text/textselection/textselection.qml b/examples/declarative/text/textselection/textselection.qml index f343be5..c6f44a0 100644 --- a/examples/declarative/text/textselection/textselection.qml +++ b/examples/declarative/text/textselection/textselection.qml @@ -265,7 +265,7 @@ Rectangle { anchors.fill: parent onClicked: { edit.cursorPosition = edit.selectionEnd; - edit.select(edit.cursorPosition, edit.cursorPosition); + edit.deselect(); editor.state = "" } } -- cgit v0.12 From 59ec08d255b7d7bd8975bdbfd0b0a42c1b6ed2a0 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 31 Dec 2010 15:49:48 +1000 Subject: Provide qmlviewer warning window also on Symbian Task-number: QTBUG-10800 Reviewed-by: Christopher Ham --- tools/qml/loggerwidget.cpp | 9 +++++++++ tools/qml/main.cpp | 49 ++++++++++++++++++---------------------------- tools/qml/qmlruntime.cpp | 8 +++++++- 3 files changed, 35 insertions(+), 31 deletions(-) diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index 8aa029f..f601d95 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -64,6 +64,14 @@ LoggerWidget::LoggerWidget(QWidget *parent) : m_plainTextEdit = new QPlainTextEdit(); +#if defined(Q_OS_SYMBIAN) + m_plainTextEdit->setReadOnly(true); + QAction* backAction = new QAction( tr("Back"), this ); + backAction->setSoftKeyRole( QAction::NegativeSoftKey ); + connect(backAction, SIGNAL(triggered()), this, SLOT(hide())); + addAction( backAction ); +#endif + #ifdef Q_WS_MAEMO_5 new TextEditAutoResizer(m_plainTextEdit); setAttribute(Qt::WA_Maemo5StackedWindow); @@ -74,6 +82,7 @@ LoggerWidget::LoggerWidget(QWidget *parent) : #else setCentralWidget(m_plainTextEdit); #endif + readSettings(); setupPreferencesMenu(); } diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index 2df96c0..b5a4fd0 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -72,36 +72,15 @@ void exitApp(int i) exit(i); } +QWeakPointer logger; +static QAtomicInt recursiveLock(0); + #if defined (Q_OS_SYMBIAN) #include #include #include #include - -void myMessageOutput(QtMsgType type, const char *msg) -{ - static int fd = -1; - if (fd == -1) - fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT); - - ::write(fd, msg, strlen(msg)); - ::write(fd, "\n", 1); - ::fsync(fd); - - if (systemMsgOutput) - systemMsgOutput(type, msg); - - switch (type) { - case QtFatalMsg: - abort(); - } -} - -#else // !defined (Q_OS_SYMBIAN) - -QWeakPointer logger; - -static QAtomicInt recursiveLock(0); +#endif void myMessageOutput(QtMsgType type, const char *msg) { @@ -118,7 +97,21 @@ void myMessageOutput(QtMsgType type, const char *msg) warnings += QLatin1Char('\n'); } } - if (systemMsgOutput) { // Windows +#if defined (Q_OS_SYMBIAN) + static int fd = -1; + if (fd == -1) + fd = ::open("E:\\qml.log", O_WRONLY | O_CREAT); + + ::write(fd, msg, strlen(msg)); + ::write(fd, "\n", 1); + ::fsync(fd); + switch (type) { + case QtFatalMsg: + abort(); + } +#endif + + if (systemMsgOutput) { systemMsgOutput(type, msg); } else { // Unix fprintf(stderr, "%s\n", msg); @@ -126,8 +119,6 @@ void myMessageOutput(QtMsgType type, const char *msg) } } -#endif - static QDeclarativeViewer* globalViewer = 0; // The qml file that is shown if the user didn't specify a QML file @@ -472,7 +463,6 @@ static QDeclarativeViewer *createViewer() viewer->setScript(opts.script); } -#if !defined(Q_OS_SYMBIAN) logger = viewer->warningsWidget(); if (opts.warningsConfig == ShowWarnings) { logger.data()->setDefaultVisibility(LoggerWidget::ShowWarnings); @@ -480,7 +470,6 @@ static QDeclarativeViewer *createViewer() } else if (opts.warningsConfig == HideWarnings){ logger.data()->setDefaultVisibility(LoggerWidget::HideWarnings); } -#endif if (opts.experimentalGestures) viewer->enableExperimentalGestures(); diff --git a/tools/qml/qmlruntime.cpp b/tools/qml/qmlruntime.cpp index 142e4c5..b829528 100644 --- a/tools/qml/qmlruntime.cpp +++ b/tools/qml/qmlruntime.cpp @@ -742,8 +742,10 @@ void QDeclarativeViewer::createMenu() connect(slowAction, SIGNAL(triggered(bool)), this, SLOT(setSlowMode(bool))); showWarningsWindow = new QAction(tr("Show Warnings"), this); +#if !defined(Q_OS_SYMBIAN) showWarningsWindow->setCheckable((true)); showWarningsWindow->setChecked(loggerWindow->isVisible()); +#endif connect(showWarningsWindow, SIGNAL(triggered(bool)), this, SLOT(showWarnings(bool))); QAction *proxyAction = new QAction(tr("HTTP &Proxy..."), this); @@ -826,11 +828,11 @@ void QDeclarativeViewer::createMenu() QMenu *recordMenu = menu->addMenu(tr("&Recording")); recordMenu->addAction(snapshotAction); recordMenu->addAction(recordAction); +#endif // ! Q_OS_SYMBIAN QMenu *debugMenu = menu->addMenu(tr("&Debugging")); debugMenu->addAction(slowAction); debugMenu->addAction(showWarningsWindow); -#endif // ! Q_OS_SYMBIAN QMenu *settingsMenu = menu->addMenu(tr("&Settings")); settingsMenu->addAction(proxyAction); @@ -914,7 +916,11 @@ void QDeclarativeViewer::toggleFullScreen() void QDeclarativeViewer::showWarnings(bool show) { +#if defined(Q_OS_SYMBIAN) + loggerWindow->showMaximized(); +#else loggerWindow->setVisible(show); +#endif } void QDeclarativeViewer::warningsWidgetOpened() -- cgit v0.12 From 5d18d393808d7a4be56eb00ab9f1e9cda9e211c9 Mon Sep 17 00:00:00 2001 From: Ville Pernu Date: Fri, 31 Dec 2010 12:48:09 +0200 Subject: Fix QNetworkReply autotest cases for QT-3494 These fixes add a new QTest columns to cases tst_QNetworkReply:: ioGetFromHttpStatus100_data and tst_QNetworkReply::ioGetFromHttpNoHeaders. Each test row now has an expected error message per input data string. Task-Number: QT-3494 Reviewed-By: Perttu Pohjonen --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index cff0ae9..6cd9d3c 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2585,17 +2585,19 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer() void tst_QNetworkReply::ioGetFromHttpStatus100_data() { QTest::addColumn("dataToSend"); - QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n"); - QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n"); - QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); - QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); + QTest::addColumn("expectedError"); + QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; + QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; + QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n") << QNetworkReply::RemoteHostClosedError; + QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n") << QNetworkReply::RemoteHostClosedError; + QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; + QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; } void tst_QNetworkReply::ioGetFromHttpStatus100() { QFETCH(QByteArray, dataToSend); + QFETCH(QNetworkReply::NetworkError, expectedError); MiniHttpServer server(dataToSend); server.doClose = true; @@ -2607,7 +2609,7 @@ void tst_QNetworkReply::ioGetFromHttpStatus100() QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->error(), expectedError); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); QVERIFY(reply->rawHeader("bla").isNull()); } @@ -2615,12 +2617,14 @@ void tst_QNetworkReply::ioGetFromHttpStatus100() void tst_QNetworkReply::ioGetFromHttpNoHeaders_data() { QTest::addColumn("dataToSend"); - QTest::newRow("justStatus+noheaders+disconnect") << QByteArray("HTTP/1.0 200 OK\r\n\r\n"); + QTest::addColumn("expectedError"); + QTest::newRow("justStatus+noheaders+disconnect") << QByteArray("HTTP/1.0 200 OK\r\n\r\n") << QNetworkReply::RemoteHostClosedError; } void tst_QNetworkReply::ioGetFromHttpNoHeaders() { QFETCH(QByteArray, dataToSend); + QFETCH(QNetworkReply::NetworkError, expectedError); MiniHttpServer server(dataToSend); server.doClose = true; @@ -2632,7 +2636,7 @@ void tst_QNetworkReply::ioGetFromHttpNoHeaders() QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); - QCOMPARE(reply->error(), QNetworkReply::NoError); + QCOMPARE(reply->error(), expectedError); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); } -- cgit v0.12 From 1f24941131a7ab62969265f1e29ef990dbc60ff5 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Mon, 3 Jan 2011 12:35:16 +0200 Subject: Ignore static_and_shared in Symbian builds. The function addExclusiveBuilds doesn't work on Symbian and is unlikely to ever work due to build system mandated target directories, so ignore static_and_shared in Symbian builds that rely on Symbian toolchains. Task-number: QTBUG-16298 Reviewed-by: axis --- mkspecs/features/static_and_shared.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/static_and_shared.prf b/mkspecs/features/static_and_shared.prf index f586bdd..39a9a1f 100644 --- a/mkspecs/features/static_and_shared.prf +++ b/mkspecs/features/static_and_shared.prf @@ -1,3 +1,3 @@ -!contains(TEMPLATE, subdirs):!macx-xcode { +!contains(TEMPLATE, subdirs):!macx-xcode:!symbian-abld:!symbian-sbsv2 { addExclusiveBuilds(static, Static, shared, Shared) } -- cgit v0.12 From 00cf748fa3d241e52dc0908da90864ea397dab8a Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Mon, 3 Jan 2011 15:08:22 +0100 Subject: Fix crash when closing QFontDialog::getFont() dialog Unfortunately, given the large number of ways of showing a QFontDialog, it's possible that we try to close the dialog before its event loop is finished. Setting the Cocoa font panel's isReleaseOnClose property to FALSE ensures the panel is still around when we effectively exit the dialog's event loop. Reviewed-by: Richard Task-number: QTBUG-15666 --- src/gui/dialogs/qfontdialog_mac.mm | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gui/dialogs/qfontdialog_mac.mm b/src/gui/dialogs/qfontdialog_mac.mm index 9c63dfa..e2c0ef5 100644 --- a/src/gui/dialogs/qfontdialog_mac.mm +++ b/src/gui/dialogs/qfontdialog_mac.mm @@ -116,6 +116,7 @@ const int StyleMask = NSTitledWindowMask | NSClosableWindowMask | NSResizableWin - (void)showModelessPanel; - (void)showWindowModalSheet:(QWidget *)docWidget; - (void)runApplicationModalPanel; +- (BOOL)isAppModal; - (void)changeFont:(id)sender; - (void)changeAttributes:(id)sender; - (BOOL)windowShouldClose:(id)window; @@ -226,6 +227,7 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) QBoolBlocker nativeDialogOnTop(QApplicationPrivate::native_modal_dialog_active); mAppModal = true; NSWindow *ourPanel = [mStolenContentView window]; + [ourPanel setReleasedWhenClosed:NO]; [NSApp runModalForWindow:ourPanel]; QAbstractEventDispatcher::instance()->interrupt(); @@ -235,6 +237,11 @@ static QFont qfontForCocoaFont(NSFont *cocoaFont, const QFont &resolveFont) mPriv->fontDialog()->reject(); } +- (BOOL)isAppModal +{ + return mAppModal; +} + - (void)showWindowModalSheet:(QWidget *)docWidget { #ifdef QT_MAC_USE_COCOA @@ -485,6 +492,8 @@ void QFontDialogPrivate::closeCocoaFontPanel() QT_MANGLE_NAMESPACE(QCocoaFontPanelDelegate) *theDelegate = static_cast(delegate); NSWindow *ourPanel = [theDelegate actualPanel]; [ourPanel close]; + if ([theDelegate isAppModal]) + [ourPanel release]; [theDelegate cleanUpAfterMyself]; [theDelegate release]; this->delegate = 0; -- cgit v0.12 From e21f066df7017e8cb8e50a387b3bf952cf497602 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Tue, 4 Jan 2011 11:12:30 +1000 Subject: Update visual tests Minor changes in flickable and rectangle radius behaviours have led to some altered pixels here and there. Task-number: QTBUG-14792 --- .../qmlvisual/ListView/data/listview.5.png | Bin 1661 -> 1663 bytes .../qmlvisual/ListView/data/listview.6.png | Bin 1674 -> 1666 bytes .../qmlvisual/ListView/data/listview.qml | 234 ++--- .../data/flickable-horizontal.0.png | Bin 1439 -> 1436 bytes .../data/flickable-horizontal.1.png | Bin 1424 -> 1426 bytes .../data/flickable-horizontal.2.png | Bin 1428 -> 1429 bytes .../data/flickable-horizontal.3.png | Bin 1397 -> 1395 bytes .../data/flickable-horizontal.4.png | Bin 1454 -> 1450 bytes .../data/flickable-horizontal.qml | 578 +++++------ .../data/flickable-vertical.0.png | Bin 1073 -> 1070 bytes .../data/flickable-vertical.1.png | Bin 1063 -> 1064 bytes .../data/flickable-vertical.2.png | Bin 1080 -> 1079 bytes .../data/flickable-vertical.3.png | Bin 1080 -> 1079 bytes .../data/flickable-vertical.4.png | Bin 1056 -> 1057 bytes .../data/flickable-vertical.5.png | Bin 1075 -> 1080 bytes .../data/flickable-vertical.6.png | Bin 1029 -> 1030 bytes .../data/flickable-vertical.7.png | Bin 1073 -> 1070 bytes .../data/flickable-vertical.8.png | Bin 1053 -> 1055 bytes .../data/flickable-vertical.qml | 1034 ++++++++++---------- .../qmlvisual/rect/data/rect-painting.0.png | Bin 15272 -> 15366 bytes 20 files changed, 923 insertions(+), 923 deletions(-) diff --git a/tests/auto/declarative/qmlvisual/ListView/data/listview.5.png b/tests/auto/declarative/qmlvisual/ListView/data/listview.5.png index 63a594e..d1f06fa 100644 Binary files a/tests/auto/declarative/qmlvisual/ListView/data/listview.5.png and b/tests/auto/declarative/qmlvisual/ListView/data/listview.5.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/listview.6.png b/tests/auto/declarative/qmlvisual/ListView/data/listview.6.png index 05e24c6..9e6e29c 100644 Binary files a/tests/auto/declarative/qmlvisual/ListView/data/listview.6.png and b/tests/auto/declarative/qmlvisual/ListView/data/listview.6.png differ diff --git a/tests/auto/declarative/qmlvisual/ListView/data/listview.qml b/tests/auto/declarative/qmlvisual/ListView/data/listview.qml index 059128d..b1ffe8f 100644 --- a/tests/auto/declarative/qmlvisual/ListView/data/listview.qml +++ b/tests/auto/declarative/qmlvisual/ListView/data/listview.qml @@ -1550,7 +1550,7 @@ VisualTest { } Frame { msec: 4240 - hash: "84b477b46c313d6dcb0a77628182905b" + hash: "ad913e53e63c030ffdf4560766722760" } Mouse { type: 5 @@ -1570,7 +1570,7 @@ VisualTest { } Frame { msec: 4256 - hash: "281c0499db31ca78175ca7af6292b853" + hash: "ef31f8a4d5bde5a2e308d19ee6d5e759" } Mouse { type: 5 @@ -1582,7 +1582,7 @@ VisualTest { } Frame { msec: 4272 - hash: "5c29d61f037e4636988fdc99ee2ed8a4" + hash: "3ba07527f66e8bea5a8fb7647b0b4f3f" } Mouse { type: 5 @@ -1594,7 +1594,7 @@ VisualTest { } Frame { msec: 4288 - hash: "a18f5e9f7be932dcd1bcb4c7fe0797e8" + hash: "70e5fe656f5fd843383964825690b678" } Mouse { type: 5 @@ -1614,7 +1614,7 @@ VisualTest { } Frame { msec: 4304 - hash: "85a4130b4a57ef79e90d350cf4816801" + hash: "b7d8738be4cd6caa63dbecdb0f810a2f" } Mouse { type: 5 @@ -1626,7 +1626,7 @@ VisualTest { } Frame { msec: 4320 - hash: "364dd89fd6f96e1c77723436c7078a7b" + hash: "d6312191f9d7bbddc07f9253d8a93469" } Mouse { type: 5 @@ -1638,7 +1638,7 @@ VisualTest { } Frame { msec: 4336 - hash: "3e37312c45aa92de34d9661f9b482c48" + hash: "b182da64886cf4f444296e5fde26701e" } Mouse { type: 5 @@ -1650,7 +1650,7 @@ VisualTest { } Frame { msec: 4352 - hash: "dc2d63ad430ea6214f962629793925f3" + hash: "ebefef14b6fb990e0c6900884528bbd3" } Mouse { type: 5 @@ -1662,7 +1662,7 @@ VisualTest { } Frame { msec: 4368 - hash: "188fe1e6af9d02b2680426127ef1d39e" + hash: "9a3451ed091b1bb6b975a9c5506b1ea4" } Mouse { type: 5 @@ -1674,7 +1674,7 @@ VisualTest { } Frame { msec: 4384 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Mouse { type: 5 @@ -1686,7 +1686,7 @@ VisualTest { } Frame { msec: 4400 - hash: "bb74813667f49b15978aa78843436205" + hash: "eaaf9ea1d7fcf4a2a9dd58b1b5bb3cae" } Mouse { type: 5 @@ -1698,7 +1698,7 @@ VisualTest { } Frame { msec: 4416 - hash: "8e88500470517ed1d7c3ca10edd4e230" + hash: "7ca8e3d76cf913d85f84f0b96acde829" } Mouse { type: 5 @@ -1710,7 +1710,7 @@ VisualTest { } Frame { msec: 4432 - hash: "614dc45593db51f467adeda87d84f9a4" + hash: "7cfef56b24a552c6d4ecb3d0b88a1d08" } Mouse { type: 5 @@ -1730,7 +1730,7 @@ VisualTest { } Frame { msec: 4448 - hash: "b170583b9b284debdd04af643752aa6b" + hash: "d032b257259810b4fe514c63ca5c9e4b" } Mouse { type: 5 @@ -1742,7 +1742,7 @@ VisualTest { } Frame { msec: 4464 - hash: "dba0394b92f3ee166bc397439a86e6dc" + hash: "568f6a57e6f1644b0dc245d03a1d7b85" } Mouse { type: 5 @@ -1754,87 +1754,87 @@ VisualTest { } Frame { msec: 4480 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4496 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4512 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4528 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4544 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4560 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4576 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4592 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4608 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4624 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4640 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4656 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4672 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4688 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4704 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4720 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4736 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4752 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4768 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4784 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4800 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4816 @@ -1842,11 +1842,11 @@ VisualTest { } Frame { msec: 4832 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Frame { msec: 4848 - hash: "74b499d5d764bf53efbee8932bab3cc3" + hash: "5cb4cf2c527d821db2a5072dd3702653" } Mouse { type: 5 @@ -1866,7 +1866,7 @@ VisualTest { } Frame { msec: 4864 - hash: "95ab953fc04389396da9a38d97262d98" + hash: "d48ecbd0661e08b2117fe2fd96ffeb2c" } Mouse { type: 5 @@ -1878,7 +1878,7 @@ VisualTest { } Frame { msec: 4880 - hash: "614dc45593db51f467adeda87d84f9a4" + hash: "7cfef56b24a552c6d4ecb3d0b88a1d08" } Mouse { type: 5 @@ -1890,7 +1890,7 @@ VisualTest { } Frame { msec: 4896 - hash: "0d884cdb22e3668203d07c72055bcb85" + hash: "5b12e9d17d9d464b055601db9cf0da44" } Mouse { type: 5 @@ -1902,7 +1902,7 @@ VisualTest { } Frame { msec: 4912 - hash: "23bd71236829253fb3ef18ebc9dd3136" + hash: "25333e1f0cc9cfc664fd7369af544c06" } Mouse { type: 5 @@ -1914,39 +1914,39 @@ VisualTest { } Frame { msec: 4928 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 4944 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 4960 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 4976 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 4992 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5008 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5024 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5040 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5056 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Mouse { type: 3 @@ -1958,179 +1958,179 @@ VisualTest { } Frame { msec: 5072 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5088 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5104 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5120 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5136 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5152 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5168 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5184 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5200 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5216 - hash: "bdb784f5ccf428f8b8a9d29310069808" + hash: "04290d8d62436c8a812f886e0a56ec1b" } Frame { msec: 5232 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5248 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5264 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5280 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5296 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5312 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5328 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5344 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5360 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5376 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5392 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5408 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5424 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5440 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5456 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5472 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5488 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5504 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5520 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5536 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5552 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5568 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5584 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5600 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5616 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5632 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5648 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5664 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5680 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5696 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5712 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5728 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5744 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5760 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5776 @@ -2138,90 +2138,90 @@ VisualTest { } Frame { msec: 5792 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5808 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5824 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5840 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5856 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5872 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5888 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5904 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5920 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5936 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5952 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5968 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 5984 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6000 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6016 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6032 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6048 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6064 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6080 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6096 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6112 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } Frame { msec: 6128 - hash: "9ba43cbdd92c077f64e4a59c6c1c42ac" + hash: "dbd87bf02d698b7f053d307ef0c98452" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.0.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.0.png index e1b0967..968a78f 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.1.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.1.png index c7d4e1d..55ab3b7 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.2.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.2.png index 9373fae..a6ec6d1 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.3.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.3.png index 7a30196..e6755ac 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png index 4c4d17c..bc65634 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml index a94aca8..106d108 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-horizontal.qml @@ -10,179 +10,179 @@ VisualTest { } Frame { msec: 32 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 48 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 64 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 80 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 96 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 112 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 128 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 144 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 160 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 176 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 192 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 208 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 224 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 240 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 256 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 272 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 288 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 304 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 320 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 336 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 352 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 368 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 384 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 400 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 416 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 432 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 448 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 464 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 480 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 496 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 512 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 528 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 544 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 560 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 576 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 592 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 608 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 624 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 640 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 656 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 672 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 688 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 704 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 720 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 2 @@ -194,15 +194,15 @@ VisualTest { } Frame { msec: 736 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 752 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 768 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 5 @@ -214,7 +214,7 @@ VisualTest { } Frame { msec: 784 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 5 @@ -226,7 +226,7 @@ VisualTest { } Frame { msec: 800 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 5 @@ -246,7 +246,7 @@ VisualTest { } Frame { msec: 816 - hash: "c92e345e4ffdb30c28d9d5aa5400bd30" + hash: "49372aa66b86904d587b72c6c2cfd467" } Mouse { type: 5 @@ -258,7 +258,7 @@ VisualTest { } Frame { msec: 832 - hash: "90f94986ab44ab59618e9a5da17b8cc9" + hash: "06519aabcc86c5fd961c80a65d2cf67c" } Mouse { type: 5 @@ -270,7 +270,7 @@ VisualTest { } Frame { msec: 848 - hash: "0154a65f8693b98576101ac1c2fc8761" + hash: "c3b182c37393ea0468c06474e84f127f" } Mouse { type: 5 @@ -290,31 +290,31 @@ VisualTest { } Frame { msec: 864 - hash: "792c1b5267f14c891dae2348a8188a92" + hash: "dce4bcca20e89c40a603394515f679b1" } Frame { msec: 880 - hash: "15ce9e88d4ad2e698bf167d1432c0b8a" + hash: "dabf2b63bedd0073f761a858f048df5a" } Frame { msec: 896 - hash: "8f4109ef4c24d286d73f689565a0d056" + hash: "c51ca7786b7346b3e62b774c01a67f98" } Frame { msec: 912 - hash: "f5728190bf5c94742686f063b4a4b09b" + hash: "d1628aa2fd1ec92021fa37f9960fb06a" } Frame { msec: 928 - hash: "a38c7527a9a818b7bc25466b0e4939f9" + hash: "4e571776c8a01d1ab79ff1c3affc0474" } Frame { msec: 944 - hash: "ed3902455fc31a4e3232308b815a4daa" + hash: "85a3c22ecaed87c119202b76e22f2b2e" } Frame { msec: 960 - hash: "a2093589363ac2d50491412e99e0193a" + hash: "42d345e97b0a8e5cbcfdf4243ccafcdc" } Frame { msec: 976 @@ -322,227 +322,227 @@ VisualTest { } Frame { msec: 992 - hash: "c32349580e3a9586cc1133c935607cf0" + hash: "1a651405076d8980b03cc8279a379fff" } Frame { msec: 1008 - hash: "cd2068492e346eb20d50aee69e3a3559" + hash: "8c4f3c6a4c67c76fe92ff401114892e7" } Frame { msec: 1024 - hash: "f43a1a38894b8ffad009ba995d84b0ee" + hash: "447a817e33cd8213e362192ffe663272" } Frame { msec: 1040 - hash: "2d5c4a73df2a054801571f1ce119e31f" + hash: "eed6ba9be5f7869101068afd1d46cb69" } Frame { msec: 1056 - hash: "b8825cc6bdca8102a655d797ea41b5b1" + hash: "15ae5acff4211f97802c6c50649ad487" } Frame { msec: 1072 - hash: "3f0be15b85220743d004f2d54b6e137c" + hash: "e30b0a23e215c0b9b71b083381a8523e" } Frame { msec: 1088 - hash: "4b0952d33149b44ffa0a06723a4116c7" + hash: "6fad48a7d3a2480468aca07e6760de94" } Frame { msec: 1104 - hash: "9056bda43259e92cfe56fdf394e2ca54" + hash: "998bd191ac5bac1f300e247514a112d7" } Frame { msec: 1120 - hash: "82ec9f09d2303e5b0b9c05b9a10a84db" + hash: "9245e8bf2fb38f491aa7f0da4400e190" } Frame { msec: 1136 - hash: "751a9b3054c09d900364d7c9cac8bc2b" + hash: "7565ea1f01cd9ad5d92e2a0ee7fc947d" } Frame { msec: 1152 - hash: "17dfdfef20f9da7e8b6f16df974baea9" + hash: "898c6e226787391340099910ee128ed6" } Frame { msec: 1168 - hash: "108e6d9a5a81df32823bfd7a90a000a7" + hash: "bafd74d70e99cf4053d3c00d18915762" } Frame { msec: 1184 - hash: "71dd0d55a3e837d3a8e4b4e318579ade" + hash: "6456a5ca9bb90b2d0fb99bae63a8db35" } Frame { msec: 1200 - hash: "8013cdb2615bca89134ea040409af509" + hash: "2b34216c9f7c76133ef4889b74df7ad9" } Frame { msec: 1216 - hash: "4b2826ad4c755690bd837994133f5fac" + hash: "cbc75068017b378f277c2692f2cb1709" } Frame { msec: 1232 - hash: "52d0da7f138bd37ac587a448d6402aca" + hash: "8c72d80a5a2776ee2d805c089f5c534d" } Frame { msec: 1248 - hash: "e634724c5bb294d338210845bf64d2cf" + hash: "d5a248b9177e078cad40af72b3cbceb5" } Frame { msec: 1264 - hash: "59bc5f0d057ee431f289806377f19213" + hash: "1a9b246f8223bbcf6421a22e8a1fb50e" } Frame { msec: 1280 - hash: "6ef2c5f7766c2cc77b30d636bfaa4422" + hash: "ea9b292eb000a9e4c5b46a8d94b8e80e" } Frame { msec: 1296 - hash: "578d056c3db094420dbaa51bd08ced20" + hash: "ac059cd45cd1936a7ff3fd0fc9fa688b" } Frame { msec: 1312 - hash: "14c6f7a04a52caffefa07af556ccb262" + hash: "fda383d47ffb1e2fd633793594831cfb" } Frame { msec: 1328 - hash: "7cb63d56fec144d0509ce219fc6fe459" + hash: "a4c7709f3642088e4be48ec607d0a0fe" } Frame { msec: 1344 - hash: "462dafa7f6427aecf6c28a5dcf5a10cc" + hash: "08d0268402d4a410f5f8c9bb8ba7b306" } Frame { msec: 1360 - hash: "45360814f985ed780a443568a91fc170" + hash: "ecc8f3c4faf86362e45b465b0f4d6dc2" } Frame { msec: 1376 - hash: "0d18ceb2436e4f7eb56a3443fab706e6" + hash: "3107a4b522744a643dd107da5e5e13c2" } Frame { msec: 1392 - hash: "1d83f367ba9f7f1d4496208271e925ed" + hash: "44c1731d0433aac53edc2e88a38c66b0" } Frame { msec: 1408 - hash: "fdbd00ee4c122aef779df42ea53f403a" + hash: "d86e9dfb38be51b2fa9cf44271eddc3e" } Frame { msec: 1424 - hash: "bedd1cb304efd4851813b39a746198a4" + hash: "0c33ce00df6fbb848d300aa510ad80d9" } Frame { msec: 1440 - hash: "9aa7bed86efa9634466736f20ee0ab5b" + hash: "48ff92aaa0c797c10ca8dbc5b2240736" } Frame { msec: 1456 - hash: "00fc8186a7ae44e10195a7b13defa0d2" + hash: "8582fd8c3643d9a5c1993e1607c6fae8" } Frame { msec: 1472 - hash: "42d6e8e0bbed879ed63644c83e61e7bd" + hash: "2390e374160ec5bc99613a463aa98fb2" } Frame { msec: 1488 - hash: "df074f8c210249e5ef652349479b6325" + hash: "369a11c32596b668a4f275232c45ac68" } Frame { msec: 1504 - hash: "4f94020437e35cf44dd3576997990ab7" + hash: "0b0d82d523a77a925ee00cf457326034" } Frame { msec: 1520 - hash: "8ca6c3b4fa3be73ac35073356b680a35" + hash: "48e7a92905761d7f0b8b9ac95bb5ff45" } Frame { msec: 1536 - hash: "c25eee1c5791383ebc59974e7754eacb" + hash: "2cdccfd2cdf56728fa07a49de34142d9" } Frame { msec: 1552 - hash: "f4917ada78942428cc6b9aa5e56c013d" + hash: "83a8166805523ee8426d88ef80c8f3a9" } Frame { msec: 1568 - hash: "23e1e607101fc7260a4ac841344f5fe0" + hash: "20ac2e68a5c733dc6128921c34f033e5" } Frame { msec: 1584 - hash: "2dcc7d187d8e0493e5766efbf09ef37c" + hash: "836963a1ed3084606b80b7f82fee09ef" } Frame { msec: 1600 - hash: "c1e5602753e80cf44d7b330140c6912e" + hash: "ee49c684d788558e20a10899ebe0b6c2" } Frame { msec: 1616 - hash: "febaf72d01a3763461b4b7d2ddd7a23e" + hash: "e00c0b340165d335cb49730890eca301" } Frame { msec: 1632 - hash: "071262b911b61576f451be25691a57cf" + hash: "fba2c2adeef04e6c1a764c4d8a1a97bc" } Frame { msec: 1648 - hash: "44705db9289fd8753b9d63e8bc963b38" + hash: "8160bd2a6daa2757b948d038fa754c77" } Frame { msec: 1664 - hash: "0c41d7b7d36bd083abfc0b83b862cad9" + hash: "10130d0b75ce420f5c9af6f181500783" } Frame { msec: 1680 - hash: "0c41d7b7d36bd083abfc0b83b862cad9" + hash: "10130d0b75ce420f5c9af6f181500783" } Frame { msec: 1696 - hash: "071262b911b61576f451be25691a57cf" + hash: "fba2c2adeef04e6c1a764c4d8a1a97bc" } Frame { msec: 1712 - hash: "a00aa90e894b48203b0446ca287ee712" + hash: "fec5477699ba60da129866e1c3727e08" } Frame { msec: 1728 - hash: "26c9ca53ee4b084c6595ad65bf4880df" + hash: "12076b96a177bd24be8ad4a3dc179d79" } Frame { msec: 1744 - hash: "f4917ada78942428cc6b9aa5e56c013d" + hash: "83a8166805523ee8426d88ef80c8f3a9" } Frame { msec: 1760 - hash: "ffedee7bf2d8099e361b8b1706b03f88" + hash: "e9016d43624060ef4efbad2b7bc53b1b" } Frame { msec: 1776 - hash: "1778ef1629ce977015b641448b46634f" + hash: "483700c4ba07a9f01d2a226a3efde15f" } Frame { msec: 1792 - hash: "42d6e8e0bbed879ed63644c83e61e7bd" + hash: "2390e374160ec5bc99613a463aa98fb2" } Frame { msec: 1808 - hash: "99e843ec69b79b79b0792e0a2f28cd1b" + hash: "094df49593f0cd1d6de4a0b91c459d15" } Frame { msec: 1824 - hash: "8b3ebca70b50a6a93823e015ea80f0f9" + hash: "0a60ed609c7fcb2d485f393ea309527a" } Frame { msec: 1840 - hash: "8eaa7f076064ce55051237b04861e408" + hash: "d4e0f07c2f298626ae800d5d7b5f098b" } Frame { msec: 1856 - hash: "6acc0ca5e5808d911287edfa78c8ac02" + hash: "ff249c1301704da0b82b023558512c6a" } Frame { msec: 1872 - hash: "e9f05899e0b53c21f6efe834095a3ea4" + hash: "42883458efeb17ff1e52296ae7228fb2" } Mouse { type: 2 @@ -562,7 +562,7 @@ VisualTest { } Frame { msec: 1888 - hash: "e9f05899e0b53c21f6efe834095a3ea4" + hash: "42883458efeb17ff1e52296ae7228fb2" } Mouse { type: 5 @@ -582,7 +582,7 @@ VisualTest { } Frame { msec: 1904 - hash: "d2dece405f5f6ed1de2acb6615a931de" + hash: "36a4b0d745ee8fa53e906b7a23b7ab88" } Mouse { type: 5 @@ -594,7 +594,7 @@ VisualTest { } Frame { msec: 1920 - hash: "21e0f21edc77424e8327c9a3350ecc1d" + hash: "826187b1a24fd09e1abcb6a01c59c059" } Mouse { type: 5 @@ -626,7 +626,7 @@ VisualTest { } Frame { msec: 1952 - hash: "c10c8b0c94f899414d8b3ef0b7c97646" + hash: "426f9459ac16c2903f85d618b366a475" } Mouse { type: 5 @@ -646,235 +646,235 @@ VisualTest { } Frame { msec: 1968 - hash: "807aff4e6c96a9d0de7fa55e233446b1" + hash: "d43dc1cfeaac1da281f2cdbffda93d17" } Frame { msec: 1984 - hash: "dbd02848cefacbb26f4bcb7d8f073d6c" + hash: "766dd54cdb6253ead664b6ab852e934b" } Frame { msec: 2000 - hash: "9a60608d8ea1b39fa2d3851873f2f08e" + hash: "1db59868779a357917a5d4859130108e" } Frame { msec: 2016 - hash: "e7b3e3a40281f63889808211d6746374" + hash: "1da33a5f6a001915464f34799a651f7a" } Frame { msec: 2032 - hash: "188c225c46ec00105df230bfeea09974" + hash: "868a6e445623378b6590789156e4b7e0" } Frame { msec: 2048 - hash: "e2e977b42e91d8c5dee57fd8245692eb" + hash: "46ae42a4b7f00e24a10ffdfd7a076b68" } Frame { msec: 2064 - hash: "ca2f12fb173c405f95e608858ab982ad" + hash: "2a91ffdfec461f573784cfaed2150e33" } Frame { msec: 2080 - hash: "fa86ee5f25fa425cf2569c8ef570b9d8" + hash: "2cbaa11e8589c806e65e52ce59ad1c42" } Frame { msec: 2096 - hash: "9b74656866fb8c7394bbbecec6414aca" + hash: "3b93b1e1fa7963d5a75103814f93a0a2" } Frame { msec: 2112 - hash: "87147326d1baab174c0f9a5ccdc2cb84" + hash: "a2e59dc9459a7afb6916638d08330dff" } Frame { msec: 2128 - hash: "c0d00f98c71bf3f8e5954b45fbab95a8" + hash: "cb3e8334babe3abffa202c2ba2d3b21f" } Frame { msec: 2144 - hash: "c087d1d62e56e573b55c1d8599bba8a6" + hash: "07882f5f098e59c479f089dbc74612bf" } Frame { msec: 2160 - hash: "dd5a94c6febdee58e8f115cb75131aaa" + hash: "e9ad84bf0c7f83bfe1bff3afed591bfd" } Frame { msec: 2176 - hash: "a7465d6137f865f512ce65ceb29533b4" + hash: "1839c26fda8710dc3fa7f5abd8136eee" } Frame { msec: 2192 - hash: "409086f6bb661aab8b548fea56d7e6b1" + hash: "15e3bdd811c390ad3a9cf22949568ed7" } Frame { msec: 2208 - hash: "6a22911e0fb58df31271baa463ff599d" + hash: "61ede9a7ef29997627bb08070fea65a4" } Frame { msec: 2224 - hash: "c4f6dd30d5fdfcf91a8b29cf5c622423" + hash: "fac89040e757522117e3792625ca6a19" } Frame { msec: 2240 - hash: "5a95b83f237c7243a198a43e9a587179" + hash: "1dc01a1118681f8606768fcf246397f7" } Frame { msec: 2256 - hash: "d79ed290efc6dbd976d574bf0b14a6a3" + hash: "2b243094b7f25368a8fb4a9014968cad" } Frame { msec: 2272 - hash: "a7bcb436e96d7c981852239462573495" + hash: "c6677acf9b9d632bc99caa8626448c49" } Frame { msec: 2288 - hash: "f63cc82e351daab503e316f8b516990f" + hash: "9035988b0dc0b7065fe4f1d1a4737801" } Frame { msec: 2304 - hash: "4ea63cd25a1424042ffc60549a78563c" + hash: "cd34e7118d43968cfcf52ed9ce58fc0a" } Frame { msec: 2320 - hash: "ef0fb776012575b3b0dbf6e5f4dee571" + hash: "7142aeaed61722424e184c55bb8d047c" } Frame { msec: 2336 - hash: "e2508faec7737be2666d87ad715b5f74" + hash: "9113c68cf5689e1f4690e58bbf824ae6" } Frame { msec: 2352 - hash: "9fe4e897c6b853f774d11817a0eb53bf" + hash: "2f9ec963d6f06f8252a69760965df2ee" } Frame { msec: 2368 - hash: "c122ce2e73cbfedcc99d649c21d91f9d" + hash: "07373282f0337437944dc8fff1e32343" } Frame { msec: 2384 - hash: "883b8b180853f1f432ae98ddfe1b6ce3" + hash: "4769fa4ba0c08baefa431b94b47a7ffc" } Frame { msec: 2400 - hash: "d0808284e431da60f61d571c257a3011" + hash: "390cd7786aa1989b590033682472f604" } Frame { msec: 2416 - hash: "df90f19450bf4d9496aab987a89e3a02" + hash: "482e2969bc1a877ba63c3df65ec04b7e" } Frame { msec: 2432 - hash: "5640c1e64556b90e7fbd4448fa9db462" + hash: "e3dc252a3a0b35398bf3d91c37d6b5e9" } Frame { msec: 2448 - hash: "6d9b5c2f7d0dedbbc444e69bb39fed08" + hash: "5bce3aac5cc049d81a74e7f71e2cf522" } Frame { msec: 2464 - hash: "485c4a8049068cf73bf22db5fd3618be" + hash: "390edc00756c4e92e94a7a75f3d65c45" } Frame { msec: 2480 - hash: "9e25da59c9e7e4cf7796902e8e2ff92a" + hash: "285397b2ff5a64d2a112c458d6ec5aba" } Frame { msec: 2496 - hash: "bd45e8f2442d7c1a1b16a762bc29e7cf" + hash: "ed0889dc439d66e6b5a81059956ef564" } Frame { msec: 2512 - hash: "ec1013d23e581dbb39b1549d2e1b3b32" + hash: "cb804da0db92d879a5cb8f138c546f88" } Frame { msec: 2528 - hash: "1ea3c2fde8ee3a14406e027f2124d793" + hash: "523fe4d3d9c11631f41d96bcc604103b" } Frame { msec: 2544 - hash: "3c3f31a05fb2f32538872c9fa158aaab" + hash: "cc4717c4233f9a2f2380bfad6dc89075" } Frame { msec: 2560 - hash: "05a84d9c55e634ec01edd2a63e13613b" + hash: "65c4171ff3e98aa04667606d9f6bd9b3" } Frame { msec: 2576 - hash: "0f7ccd2da58e2e73b0ab18bb681dafd5" + hash: "b2994136a603206c8013158fd67ca6bd" } Frame { msec: 2592 - hash: "e481ff78029f8bc4bf7c697db6824f6a" + hash: "44ad0d4645a01243b9d9be0faaf6d6ee" } Frame { msec: 2608 - hash: "efb92b8b7a90acabeb4a8d5cae52fe3c" + hash: "3b7b06f5f3f028fbae21dfedf821e696" } Frame { msec: 2624 - hash: "4728dd0fac4edf40cfd5ef5a422b4ed9" + hash: "b86466e530c3bd51353074cbb9da9ec3" } Frame { msec: 2640 - hash: "27641dcd772c979ae22d12bfbadbb67f" + hash: "2528deb04bae8b89a85dc6fcea05dbbd" } Frame { msec: 2656 - hash: "26268714105bc4832d336a38a859fc50" + hash: "e0ff5e36bff2b9e08244fc7f79cecee6" } Frame { msec: 2672 - hash: "caf0d351d3b6914ca52853a30643ea48" + hash: "34ca311d2e3462da3779324419c027e7" } Frame { msec: 2688 - hash: "319824b1143925162f04aaddcfaa65d9" + hash: "75aae68f21f68364a897c504f26ee655" } Frame { msec: 2704 - hash: "73aa36815f34bf5e005000e7da38555e" + hash: "8039e52e7f1977433596c1a34a41cc9f" } Frame { msec: 2720 - hash: "73aa36815f34bf5e005000e7da38555e" + hash: "8039e52e7f1977433596c1a34a41cc9f" } Frame { msec: 2736 - hash: "319824b1143925162f04aaddcfaa65d9" + hash: "75aae68f21f68364a897c504f26ee655" } Frame { msec: 2752 - hash: "caf0d351d3b6914ca52853a30643ea48" + hash: "34ca311d2e3462da3779324419c027e7" } Frame { msec: 2768 - hash: "c87ba4dda0a5c931d0c7ae74a0fb2896" + hash: "d3649eb8f8232b0e64b0cb476313b63c" } Frame { msec: 2784 - hash: "ab551561ad8a3937558afc080b3e6130" + hash: "cdb30549933d3778e74dbd419b474a5f" } Frame { msec: 2800 - hash: "474d8b566b9e4ef7dc125a8df30ccbb1" + hash: "3a43d652bb85d3f562bd5eaec386107f" } Frame { msec: 2816 - hash: "cc7dfbcfafa12d40210a4d5fa7f60862" + hash: "df6771eb2afa24b6e3250b05b180fa4d" } Frame { msec: 2832 - hash: "3c3f31a05fb2f32538872c9fa158aaab" + hash: "cc4717c4233f9a2f2380bfad6dc89075" } Frame { msec: 2848 - hash: "9705c0dd30c3f381084ec29242bebb2f" + hash: "76e04278dab430d5860306830b73ab6f" } Frame { msec: 2864 - hash: "917579854722d6e6711811e10cbe229f" + hash: "8f70f69731fe8b8f4aa397a667f4c5c0" } Frame { msec: 2880 - hash: "43fa578250e214ed9ad6894329a27c54" + hash: "25b72be5ca16c246bfc6adc4bf19871c" } Frame { msec: 2896 @@ -882,79 +882,79 @@ VisualTest { } Frame { msec: 2912 - hash: "5640c1e64556b90e7fbd4448fa9db462" + hash: "e3dc252a3a0b35398bf3d91c37d6b5e9" } Frame { msec: 2928 - hash: "88cef15940302e2b8b43e73234fd7b9c" + hash: "ce0d8b3f0f0b235eaedc932f4514ea00" } Frame { msec: 2944 - hash: "041aecec2b0b0d59a56e1dd26b45cab1" + hash: "f6b030effcca891ab20073f106b22d73" } Frame { msec: 2960 - hash: "0d519463c713f3da46ecacd155e1a0f3" + hash: "2cfafd1f686f5794d5bf99ec4aaa1d08" } Frame { msec: 2976 - hash: "5dd0c855b97d298244fb599c9f781651" + hash: "502a23fd9a3bcccb29c496e7edeb5d66" } Frame { msec: 2992 - hash: "bfc51621e9bc95d2d46cec632a3fae12" + hash: "82ac348a63a4e358a877a2e45d48e2b1" } Frame { msec: 3008 - hash: "b05fb6e798ab3fed940b5ac4d88ca378" + hash: "0d321f4ca15f09d849c4a28f032cc1cc" } Frame { msec: 3024 - hash: "6bc9cc0d3b11ea91856296b0ec934a8b" + hash: "5c995f84415ea7a260647f946b8963ee" } Frame { msec: 3040 - hash: "f4e63f3af69dacbf2d1d719d4d03a266" + hash: "ee4ecac449c4a2ad4e11ad1d560b3ec3" } Frame { msec: 3056 - hash: "31ab08997eb86fab062a3128aecbccb5" + hash: "0bc3d5b91d781bcf10041eb1557f0d6a" } Frame { msec: 3072 - hash: "90736b240ba1e634bd0ea86423908e16" + hash: "321297177b354e0cc435b3eae49331a3" } Frame { msec: 3088 - hash: "90736b240ba1e634bd0ea86423908e16" + hash: "321297177b354e0cc435b3eae49331a3" } Frame { msec: 3104 - hash: "e74982557dc06aac572078840c7e889a" + hash: "de00148fe89be44237af32d929432655" } Frame { msec: 3120 - hash: "e74982557dc06aac572078840c7e889a" + hash: "de00148fe89be44237af32d929432655" } Frame { msec: 3136 - hash: "ca30c14c7344d1711a35c707f8804f6e" + hash: "756c8068009e9780428bd3ae35df19fe" } Frame { msec: 3152 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 3168 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 3184 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 3200 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 2 @@ -966,15 +966,15 @@ VisualTest { } Frame { msec: 3216 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 3232 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 3248 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Mouse { type: 5 @@ -994,7 +994,7 @@ VisualTest { } Frame { msec: 3264 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "96a78749a57bdb87cf28a3804b63793f" } Mouse { type: 5 @@ -1006,7 +1006,7 @@ VisualTest { } Frame { msec: 3280 - hash: "1991cbb0fb053937f922731d5716032c" + hash: "b8f158a8694f2b922faf818d469230e4" } Mouse { type: 5 @@ -1018,7 +1018,7 @@ VisualTest { } Frame { msec: 3296 - hash: "df447575a4734bb5bd9badc6e27d98e4" + hash: "257a298bec9589037e3022cc2fe7a775" } Mouse { type: 5 @@ -1030,7 +1030,7 @@ VisualTest { } Frame { msec: 3312 - hash: "0fbfe1e0d7fb54450188398aa40690cd" + hash: "391d17c09dd33b3dcfc9a619fbb500dc" } Mouse { type: 5 @@ -1042,7 +1042,7 @@ VisualTest { } Frame { msec: 3328 - hash: "cb62e60296046c73d301d7186e14faed" + hash: "b645a1808de7a5d2ce7944ab66a7c233" } Mouse { type: 5 @@ -1054,7 +1054,7 @@ VisualTest { } Frame { msec: 3344 - hash: "909cbd1292476584554e22232cb43639" + hash: "54ddfe85ca8923bcf7f3b6ccab0560de" } Mouse { type: 5 @@ -1066,7 +1066,7 @@ VisualTest { } Frame { msec: 3360 - hash: "e63b7e502dfb2834c06a969b683b9bd3" + hash: "5c1169e17ee96b817e66b4a6097f790c" } Mouse { type: 5 @@ -1078,7 +1078,7 @@ VisualTest { } Frame { msec: 3376 - hash: "4ea63cd25a1424042ffc60549a78563c" + hash: "cd34e7118d43968cfcf52ed9ce58fc0a" } Mouse { type: 5 @@ -1090,7 +1090,7 @@ VisualTest { } Frame { msec: 3392 - hash: "77e39d2d4bfcacecdae4f014e4506d71" + hash: "f3d9d5cd228914b2e1323f19c22aa6f9" } Mouse { type: 5 @@ -1102,7 +1102,7 @@ VisualTest { } Frame { msec: 3408 - hash: "db576eca8bad67cb8b994f12fc448969" + hash: "10e63c46f4b970a9c997126906c01cf9" } Mouse { type: 5 @@ -1114,7 +1114,7 @@ VisualTest { } Frame { msec: 3424 - hash: "efeb3f616da9d78505c3c82fc34ee31c" + hash: "c9b412087f7b744096bf995c6a9ddf15" } Mouse { type: 5 @@ -1126,7 +1126,7 @@ VisualTest { } Frame { msec: 3440 - hash: "e4f8bb02f8ac6bc40e1801cc8f360078" + hash: "70cdc34e22c7a031c2e28898f7edea72" } Mouse { type: 5 @@ -1138,7 +1138,7 @@ VisualTest { } Frame { msec: 3456 - hash: "82118ef71809e3867717232c4d9c5518" + hash: "d0ea5c1f9050499d944ba7e61d354e40" } Mouse { type: 5 @@ -1150,7 +1150,7 @@ VisualTest { } Frame { msec: 3472 - hash: "5363451c696f6c6eb792b23d086243d7" + hash: "d9fc23e14a170b68264721dc18be4fb1" } Mouse { type: 5 @@ -1162,7 +1162,7 @@ VisualTest { } Frame { msec: 3488 - hash: "fe6afe8ae8a7c216a1cffc5515f273d5" + hash: "d59ccdfdb179f2c8c2636a64aecf2a6a" } Mouse { type: 5 @@ -1174,7 +1174,7 @@ VisualTest { } Frame { msec: 3504 - hash: "9b165741d86c70380c15e15cff3fabb6" + hash: "6d21752283210371faf2f757c7a972b3" } Mouse { type: 5 @@ -1186,7 +1186,7 @@ VisualTest { } Frame { msec: 3520 - hash: "f5e176355468f4fa224d4dfcdd7525a3" + hash: "1338a54d3b980a6868ba7d167cfdbdf7" } Mouse { type: 5 @@ -1198,27 +1198,27 @@ VisualTest { } Frame { msec: 3536 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Frame { msec: 3552 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Frame { msec: 3568 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Frame { msec: 3584 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Frame { msec: 3600 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Frame { msec: 3616 - hash: "8c5a14a76e052cc6503a3e78245d1da3" + hash: "0be430c9e6058be2aee599d4182bc0d0" } Mouse { type: 5 @@ -1230,7 +1230,7 @@ VisualTest { } Frame { msec: 3632 - hash: "f5e176355468f4fa224d4dfcdd7525a3" + hash: "1338a54d3b980a6868ba7d167cfdbdf7" } Mouse { type: 5 @@ -1242,7 +1242,7 @@ VisualTest { } Frame { msec: 3648 - hash: "acf538fce5f1b90b83474d9898b7cdd7" + hash: "b58a71e761abe238de0e90c1c756cd37" } Mouse { type: 5 @@ -1254,7 +1254,7 @@ VisualTest { } Frame { msec: 3664 - hash: "5a0ee016b8732fbc36064e8a35d91215" + hash: "3383dc4a9b1f8267d145d22f9d825dc0" } Mouse { type: 5 @@ -1266,7 +1266,7 @@ VisualTest { } Frame { msec: 3680 - hash: "8fd06a14c1de175813845ce8f07db6ec" + hash: "95df7fbe18630d9b8ffa83850bc5bec5" } Mouse { type: 5 @@ -1278,7 +1278,7 @@ VisualTest { } Frame { msec: 3696 - hash: "26b0ff6ffda0725e0800f7ea3af510ef" + hash: "96c625b6854a862c83ead3fbb32df3b0" } Mouse { type: 5 @@ -1290,7 +1290,7 @@ VisualTest { } Frame { msec: 3712 - hash: "80443f134511be0356a687c9b542b3e7" + hash: "f48f12540c60bc7b60279db8e67ff91b" } Mouse { type: 5 @@ -1302,7 +1302,7 @@ VisualTest { } Frame { msec: 3728 - hash: "3eeb98a829d29b3dc52f3d145ac49d58" + hash: "98353745244809a583c93c1fd87b9a56" } Mouse { type: 5 @@ -1314,7 +1314,7 @@ VisualTest { } Frame { msec: 3744 - hash: "f4d43069b16f41a30e5549aae911d4cd" + hash: "09a1bb3238282c80cc40fccb6e45ba28" } Mouse { type: 5 @@ -1326,7 +1326,7 @@ VisualTest { } Frame { msec: 3760 - hash: "661c89fa832f0abdcf4ae0c9e8e2d18f" + hash: "9e50b6fc980c66698a35178e2520e13c" } Mouse { type: 3 @@ -1338,23 +1338,23 @@ VisualTest { } Frame { msec: 3776 - hash: "661c89fa832f0abdcf4ae0c9e8e2d18f" + hash: "9e50b6fc980c66698a35178e2520e13c" } Frame { msec: 3792 - hash: "1520f54b6c8606b9e8372c5c06180453" + hash: "006c37d9d6b5a8470d74909b9646d5f1" } Frame { msec: 3808 - hash: "0fcf5e2ce47348cbb5bb485f101fe5ac" + hash: "24cf52f7c3cf095be20393757dfaaa6b" } Frame { msec: 3824 - hash: "2eb070e69de07c89830543e0475fc110" + hash: "2189799d060770928f1feaaa44728ec8" } Frame { msec: 3840 - hash: "d73c1059219c0655968af268d22e2c18" + hash: "b8a6375f0303ec8b66cf14f59888c273" } Frame { msec: 3856 @@ -1362,214 +1362,214 @@ VisualTest { } Frame { msec: 3872 - hash: "cc969b2c64839ca6d3b5069c0ed938d0" + hash: "1fd391b060c84ac99c6e94d2d3647c31" } Frame { msec: 3888 - hash: "1f819e18d1297a1c7eeebb7b040bdef8" + hash: "8b594f115e8158b931a9da42fa6829a5" } Frame { msec: 3904 - hash: "3643b99afbd8af0953cb39b2c8c04b9f" + hash: "8f93fdffed4bfd31f9f5977b09074f6a" } Frame { msec: 3920 - hash: "713fd2e2fa38ab27604cb9cae59f1777" + hash: "d0f3eae785732bf24c363fd189672eb2" } Frame { msec: 3936 - hash: "e2508faec7737be2666d87ad715b5f74" + hash: "9113c68cf5689e1f4690e58bbf824ae6" } Frame { msec: 3952 - hash: "fc33b1c7479caeff676ffd885a18d618" + hash: "44dd376f3d5f61ec71b7c488c3a6ee58" } Frame { msec: 3968 - hash: "aca01143db4f870a56bb7546e84cbc5e" + hash: "4555e295bd6de22abcbaecf797ec8902" } Frame { msec: 3984 - hash: "442b58c39fd3745c61a1eb5043fcbb53" + hash: "eb343f3e69f205a240c0425873ea6db1" } Frame { msec: 4000 - hash: "7983d7183cc11d6819fa0a006c2d67b4" + hash: "37a5b81894c16cacd13312f7113a5445" } Frame { msec: 4016 - hash: "9fe4e897c6b853f774d11817a0eb53bf" + hash: "2f9ec963d6f06f8252a69760965df2ee" } Frame { msec: 4032 - hash: "43f528c81ccfa5b9921dfa3564a24c68" + hash: "dec984b2a5cdd85f2dfb8983da5cdee4" } Frame { msec: 4048 - hash: "dfe04ff0b3ccf205bb38beeab58a4411" + hash: "a95f51c3e172ee76b5b74e94532cdfaf" } Frame { msec: 4064 - hash: "32ff30b50b500e9feb51e8eef205783c" + hash: "62d73e875875329c886d2eb540a9c2d9" } Frame { msec: 4080 - hash: "7d83ab4c336b05bcf2cde4e7d8031f6c" + hash: "63c70a0ea1f43d92c717ff23dcfebe81" } Frame { msec: 4096 - hash: "c92e345e4ffdb30c28d9d5aa5400bd30" + hash: "49372aa66b86904d587b72c6c2cfd467" } Frame { msec: 4112 - hash: "02eec604d0c00965aae4ac61b91bdc22" + hash: "523c18f3c7bbaaf9c625835ddf0d8435" } Frame { msec: 4128 - hash: "df447575a4734bb5bd9badc6e27d98e4" + hash: "257a298bec9589037e3022cc2fe7a775" } Frame { msec: 4144 - hash: "bac10d8f94a39573313b3b8b2f871c49" + hash: "d777e4b06791bda82cf1e8e84b1cff5c" } Frame { msec: 4160 - hash: "e5944c5dc6dec8f0c28b7ec3cd58723d" + hash: "c31de5bfff431b13dcbf2b8b4c503bc3" } Frame { msec: 4176 - hash: "1991cbb0fb053937f922731d5716032c" + hash: "b8f158a8694f2b922faf818d469230e4" } Frame { msec: 4192 - hash: "50d6538bcaffc343f6626635a3e5899c" + hash: "5fd4cd0c335cecc7468d44d188e1669d" } Frame { msec: 4208 - hash: "f3613f57cdb9ed38d8e3fa636962aa99" + hash: "77b003c8f72498ed295678158adf417c" } Frame { msec: 4224 - hash: "10a89da9887cb4bbd812c090a8a56797" + hash: "96a78749a57bdb87cf28a3804b63793f" } Frame { msec: 4240 - hash: "89ba74d46970ad2edff701475c059ec8" + hash: "f497ed7bc98daea35a9ae4838427207e" } Frame { msec: 4256 - hash: "6e8b84c70e81578a2216e9e975b35434" + hash: "35a7221f2888ab3afec443b2c1060c80" } Frame { msec: 4272 - hash: "6e8b84c70e81578a2216e9e975b35434" + hash: "35a7221f2888ab3afec443b2c1060c80" } Frame { msec: 4288 - hash: "883b8b180853f1f432ae98ddfe1b6ce3" + hash: "4769fa4ba0c08baefa431b94b47a7ffc" } Frame { msec: 4304 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4320 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4336 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4352 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4368 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4384 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4400 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4416 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4432 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4448 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4464 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4480 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4496 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4512 - hash: "e616110d39009f0d636b816828cc0ccb" + hash: "afec5604967bc19a2bb8fc7e899c1e11" } Frame { msec: 4528 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4544 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4560 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4576 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4592 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4608 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4624 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4640 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4656 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4672 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4688 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } Frame { msec: 4704 - hash: "244c12e82ee0b2528a0dbb02a8b8134a" + hash: "66d988259c52db9bd85f60ed598469f7" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.0.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.0.png index 2af1a3e..5af9306 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.1.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.1.png index 8334a3f..61acc87 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.2.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.2.png index c705849..bc6ac34 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.3.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.3.png index c705849..bc6ac34 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.4.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.4.png index 349dca2..c970488 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.5.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.5.png index a0e84e3..0af1424 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.6.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.6.png index e5c1583..c826907 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.6.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.6.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.7.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.7.png index 2af1a3e..5af9306 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.7.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.7.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.8.png b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.8.png index 06468e4..f714fa5 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.8.png and b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.8.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml index 920a48f..8ad3029 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativeflickable/data/flickable-vertical.qml @@ -10,71 +10,71 @@ VisualTest { } Frame { msec: 32 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 48 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 64 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 80 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 96 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 112 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 128 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 144 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 160 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 176 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 192 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 208 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 224 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 240 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 256 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 272 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 288 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 2 @@ -86,7 +86,7 @@ VisualTest { } Frame { msec: 304 - hash: "3d1b648229210ae5b57a0be51cc02f67" + hash: "71a0273e7582419e07937fe701d8e027" } Mouse { type: 5 @@ -98,7 +98,7 @@ VisualTest { } Frame { msec: 320 - hash: "3d1b648229210ae5b57a0be51cc02f67" + hash: "71a0273e7582419e07937fe701d8e027" } Mouse { type: 5 @@ -118,7 +118,7 @@ VisualTest { } Frame { msec: 336 - hash: "3d1b648229210ae5b57a0be51cc02f67" + hash: "71a0273e7582419e07937fe701d8e027" } Mouse { type: 5 @@ -138,7 +138,7 @@ VisualTest { } Frame { msec: 352 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -158,7 +158,7 @@ VisualTest { } Frame { msec: 368 - hash: "57fa1d842d37df12004b493c1c5761f3" + hash: "a8d53f622836800e43157685ce21fad4" } Mouse { type: 5 @@ -178,7 +178,7 @@ VisualTest { } Frame { msec: 384 - hash: "521a8188877551a97cd3ea82d209e8ae" + hash: "99c8215fbd87e45836908a85748dccc7" } Mouse { type: 5 @@ -198,7 +198,7 @@ VisualTest { } Frame { msec: 400 - hash: "ce126aaade1532e22a35416fd7203dde" + hash: "d56ff1a2994f1acb5ad06b0468672a29" } Mouse { type: 5 @@ -218,119 +218,119 @@ VisualTest { } Frame { msec: 416 - hash: "aa9c4301332240ccc00ec99a05b7f9c9" + hash: "85ba01e36cc978459451887facbc3260" } Frame { msec: 432 - hash: "db0a670d61133a3420a3581ecb532773" + hash: "958d223a6b27ecc87febd860168d5aa5" } Frame { msec: 448 - hash: "b34de164d5ec0294ca27281e1e5e3cd6" + hash: "851ef5f56b7b05d3feb0a1a357f96007" } Frame { msec: 464 - hash: "8636af4591c61c4b4a548f3a38749413" + hash: "4d90460d3b6c46075ffda426bc6ceaa6" } Frame { msec: 480 - hash: "eee4fa336149528dfb16565b856ca692" + hash: "bb67acd602414cf59e27b5ff19f69169" } Frame { msec: 496 - hash: "85eeaeaf359ed87417be68dc18c06d0c" + hash: "acce28653f8bf46c09067254774fb126" } Frame { msec: 512 - hash: "d5db4af6cf35c61146bd24646d82ab83" + hash: "91ea2538dfe0f9af7b4732cb4474215b" } Frame { msec: 528 - hash: "2189fc03c337fe41f3d9f51929c9860f" + hash: "e7fd52f25a4a9c31a2f2fabd59c31160" } Frame { msec: 544 - hash: "4e3e283fb402dc4ec79f65878a513747" + hash: "6acdb4852ef9091382030998e28d02a5" } Frame { msec: 560 - hash: "62f4281d8e049bc12b636b7ebe3862df" + hash: "10c7eaab96a538a7111b054a403132a3" } Frame { msec: 576 - hash: "cf9a0a968459a1283fff91102eb29ba3" + hash: "4ebb31f7945bb5542f9e5146888b1065" } Frame { msec: 592 - hash: "c432221928096cff3b76c8034db26b43" + hash: "b98d594580ad701afb4d2ef186853bc4" } Frame { msec: 608 - hash: "3df59808e56955c3c161609b72d93c7f" + hash: "2700eb44f9b7400f3c1bd11d878e078d" } Frame { msec: 624 - hash: "c497bcbe500905b8a69fd310fd7c7e1a" + hash: "b8a8c4db8325b3e0292e6473084347d9" } Frame { msec: 640 - hash: "7dceef52fab6dc38d140e3097e39a271" + hash: "88ff05697e82e78847794b153be12c46" } Frame { msec: 656 - hash: "c7bbd81b452db98fb8fd892762a23df6" + hash: "06970943c3cd12f07b1d661de0ab730f" } Frame { msec: 672 - hash: "17efc9793ef2966722544d561312b17a" + hash: "5804b412094ab17424de4ba12b2e2e32" } Frame { msec: 688 - hash: "1bf05b272ad6b8e5d134c94d9ba62030" + hash: "8ff038b364f065e67430b2a312a10101" } Frame { msec: 704 - hash: "cad61ba68fdfb26cfb136f22a2f8cc0c" + hash: "8a9a1c725b80af8fd3ffb9d8bc7328ac" } Frame { msec: 720 - hash: "0ce5ff1a1d9a6193ef763affa39cb790" + hash: "83c3481ec7a1dddcbc36d6fb9b7d6149" } Frame { msec: 736 - hash: "880bce9130454aaf1261842b8f9b9a57" + hash: "abf102e5d88bef8ed429c222284907da" } Frame { msec: 752 - hash: "ab78cadac88156d9755d8b70d26384e8" + hash: "e9bcb3268f705e708ffbcf707c78c889" } Frame { msec: 768 - hash: "4a22e502c105a7df0845ca75cbdfb0ec" + hash: "918c60c1ed90f5803d24ea515f21f8fa" } Frame { msec: 784 - hash: "d6209a0b9b9e0f2072179a4623c70fbd" + hash: "f3064485083025aba09224faafcede14" } Frame { msec: 800 - hash: "85e85567831cf57df1f013f5bf3beb86" + hash: "9f36e5b91e6abc9f991625cc52afdd4e" } Frame { msec: 816 - hash: "602d2e02029178faeb99748e2f70827e" + hash: "70a50039fbd67d4b56c0c7ec3d7aecd1" } Frame { msec: 832 - hash: "fd4dbb6f47f6681af98eb6781ae7de58" + hash: "90bbef58e2e59021f68b878db477f74b" } Frame { msec: 848 - hash: "faf3be40e402768724703f5d0051249f" + hash: "21480d7b949acba033f4686c666d3f85" } Frame { msec: 864 - hash: "bc650ca5b7a3bdc1f0f051b9481faf29" + hash: "b622d2cea2428fb92a8e37715a60f195" } Mouse { type: 2 @@ -342,7 +342,7 @@ VisualTest { } Frame { msec: 880 - hash: "bc650ca5b7a3bdc1f0f051b9481faf29" + hash: "b622d2cea2428fb92a8e37715a60f195" } Mouse { type: 5 @@ -362,7 +362,7 @@ VisualTest { } Frame { msec: 896 - hash: "bc650ca5b7a3bdc1f0f051b9481faf29" + hash: "b622d2cea2428fb92a8e37715a60f195" } Mouse { type: 5 @@ -382,7 +382,7 @@ VisualTest { } Frame { msec: 912 - hash: "f2a679f2b7585245d4f1896fed4e0d1e" + hash: "8b537cd0481c1a9bf84f4855ae5697ad" } Mouse { type: 5 @@ -402,7 +402,7 @@ VisualTest { } Frame { msec: 928 - hash: "721b5fa42f583c1e1e1a751fc8aad270" + hash: "f5aba503b2c155401d26be068724e28a" } Mouse { type: 5 @@ -422,7 +422,7 @@ VisualTest { } Frame { msec: 944 - hash: "7e3ddefca9a99d6b9103ffd4524bc593" + hash: "1aca5a9415dd669a0ff76ef4da9c9a56" } Mouse { type: 5 @@ -442,7 +442,7 @@ VisualTest { } Frame { msec: 960 - hash: "7858d23cb4c206676eca51c1c09802b5" + hash: "b046e18396cd3d2da6505fa783bd2b89" } Mouse { type: 5 @@ -474,171 +474,171 @@ VisualTest { } Frame { msec: 992 - hash: "e723da5ecaffe31f03b1d5ca6765229b" + hash: "c4506098417f905871a43d183cd5904d" } Frame { msec: 1008 - hash: "73d169bf6bdfce801b824b7b560c3fad" + hash: "fe8014819e6fe41fa109f5b0ff2e9764" } Frame { msec: 1024 - hash: "4e3e283fb402dc4ec79f65878a513747" + hash: "6acdb4852ef9091382030998e28d02a5" } Frame { msec: 1040 - hash: "38c2e2835c20dbee55c69d0211a0be2d" + hash: "d5a9739669a9a641c0c1f44b777cb9b8" } Frame { msec: 1056 - hash: "84e668ba374ff0004dd7222933a635cf" + hash: "a4006cb90c69313b9b04a6b7b8734855" } Frame { msec: 1072 - hash: "349c7a84ff8f9b52d39dba1282353167" + hash: "23b447e486a6354354505171cf3c45ec" } Frame { msec: 1088 - hash: "b63218110c65b6d7b4bc2d63155204cd" + hash: "ad172b89d9764bd568d9127c91547c0b" } Frame { msec: 1104 - hash: "aad65a7070aa668dd8ce4a3cc0f0f117" + hash: "0003fb6329e0bf293d56af63265bf0ca" } Frame { msec: 1120 - hash: "c4ae97e1d1f2efbc998f9b57c2373201" + hash: "dd62960e62800219c179fcd481e4504d" } Frame { msec: 1136 - hash: "94701ffaa4f45924ad89f92a30157c7d" + hash: "7fe6c7bd1bc9e46d3e520178a2309e87" } Frame { msec: 1152 - hash: "eee4fa336149528dfb16565b856ca692" + hash: "bb67acd602414cf59e27b5ff19f69169" } Frame { msec: 1168 - hash: "ff1a053c0af99c51353503002515843d" + hash: "3170c18b8dd74429b0f366ec07f4870b" } Frame { msec: 1184 - hash: "118494c60034b0e265e28b34e3128d00" + hash: "249e4e489236e3f0748ba63c7a105b33" } Frame { msec: 1200 - hash: "bf693bffb37d7554a437eca21bdec7c1" + hash: "bd2fb97c583e6fe653a32fa610d6ac83" } Frame { msec: 1216 - hash: "880f60263cd79fb6a1bff7252d2373bb" + hash: "95ca2f988370075070c6a98e5e680206" } Frame { msec: 1232 - hash: "b34de164d5ec0294ca27281e1e5e3cd6" + hash: "851ef5f56b7b05d3feb0a1a357f96007" } Frame { msec: 1248 - hash: "e1609c4e40fb9e043a9fff683b94c6c4" + hash: "80f599f50af9e601536f62ea93f4e429" } Frame { msec: 1264 - hash: "2450b61b84c24727232c779114e6a474" + hash: "485d719d81429e63be4de1ba81d53996" } Frame { msec: 1280 - hash: "cf5ac4a5e3d42b3d4e171ed3227cfa85" + hash: "745f3c2e0baede59a52805eddac5b01f" } Frame { msec: 1296 - hash: "5cb5576ab347647ca881d4d450732df3" + hash: "fea3fa6e26eb150ab37fe96a34d3be3b" } Frame { msec: 1312 - hash: "34dc672ebfd75ec017d0c2f0bd435cd8" + hash: "29c8004517294539adf3243533381436" } Frame { msec: 1328 - hash: "aa9c4301332240ccc00ec99a05b7f9c9" + hash: "85ba01e36cc978459451887facbc3260" } Frame { msec: 1344 - hash: "3f98121997a1613bd49d22003d1a1887" + hash: "deedb9ddcc2f5354a2356178db54d971" } Frame { msec: 1360 - hash: "86732d3e900877ae7a8615b7448afaaa" + hash: "9e1fb461c13b4affa39e5909d3ade168" } Frame { msec: 1376 - hash: "7e2f2786d3c0540a0b6559fffe06ad3c" + hash: "684a543d7afc5a5cac2bb823bbb94893" } Frame { msec: 1392 - hash: "79e00bbe77f0a178e8db30023a881c3f" + hash: "636f04661a0418c1fdcaaaba28092671" } Frame { msec: 1408 - hash: "5f611226b3aa38f9aa3cd6a2dbd01f12" + hash: "89cac82b6751208654d1e4ef4df8ef28" } Frame { msec: 1424 - hash: "4f4cd776b76272cfe79b86a108bd6b6e" + hash: "a974415dcf31bee79874c4a6e84cf796" } Frame { msec: 1440 - hash: "a746404a1a26e2a25b8d364dbef46eef" + hash: "f74c075e8cf2aef501b7115427b3b221" } Frame { msec: 1456 - hash: "9124d97d120de1806d86c8f437ec4ed2" + hash: "7efcd27e34db1d3adc3d31e0b9ebe432" } Frame { msec: 1472 - hash: "4fda328eafe6ec2d02d939517d6d82e3" + hash: "c8747327ae3370b04a996aa6b5e373c6" } Frame { msec: 1488 - hash: "6afb6abe291c9e9628fd0b8c3da5d9db" + hash: "b7b32b5e782f8f5b1cbd6f581f90004a" } Frame { msec: 1504 - hash: "cb5962fe94c5d3ef754ff45f905a5c88" + hash: "5fda56f77948e183557ff54690030746" } Frame { msec: 1520 - hash: "57b5fc47ed700831b3dc3f2afbb1c3ed" + hash: "6e43987a8db7a6231887cf5883d381bf" } Frame { msec: 1536 - hash: "38793fb8a19c9566c8dd9d23c9a15b5d" + hash: "901e1f9851d05ff300fa2d52a38829ec" } Frame { msec: 1552 - hash: "2e311a5dc484e9f4bc7bd85d32a693b1" + hash: "abda2edf3c9f1aa28f41bf28083d081f" } Frame { msec: 1568 - hash: "69d1eed68fba918e831899c8b84374a1" + hash: "5e324e90e4056f59730db9fbc941609a" } Frame { msec: 1584 - hash: "c872391012e6ab2a6d1eb98c7f47f9e8" + hash: "d98ec6ad7e6f2df6796f975cdf06ea2c" } Frame { msec: 1600 - hash: "cf12f90835d823550cd83d472b4f022f" + hash: "fa62c8154b5aba9fa6daa0a50229e752" } Frame { msec: 1616 - hash: "fbb2f03ddbd87ed419386eb2942bccac" + hash: "c03b7e52c7da4f1cb6a4a2cab119a1a1" } Frame { msec: 1632 - hash: "0788a0fdb51cedba0f8b597a4cc38ebe" + hash: "57c1149d35ed84de63bac7accdb30c77" } Frame { msec: 1648 - hash: "b6595edf06fba22f3258c9b433af6ab8" + hash: "48823d7e5b72ff6e11bbe877962c9884" } Mouse { type: 2 @@ -650,19 +650,19 @@ VisualTest { } Frame { msec: 1664 - hash: "521a8188877551a97cd3ea82d209e8ae" + hash: "99c8215fbd87e45836908a85748dccc7" } Frame { msec: 1680 - hash: "4d923cd520c00f5cd985283d62cf17ec" + hash: "45e2cf43322f038d2b322dea82e829f1" } Frame { msec: 1696 - hash: "7ccff14d344c7090fa634f6defd6511e" + hash: "6473a0dc426bf118674d09b281fb6c38" } Frame { msec: 1712 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 3 @@ -674,55 +674,55 @@ VisualTest { } Frame { msec: 1728 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1744 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1760 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1776 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1792 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1808 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1824 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1840 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1856 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1872 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1888 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1904 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1920 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1936 @@ -730,39 +730,39 @@ VisualTest { } Frame { msec: 1952 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1968 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 1984 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2000 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2016 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2032 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2048 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2064 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2080 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 2 @@ -782,7 +782,7 @@ VisualTest { } Frame { msec: 2096 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -802,7 +802,7 @@ VisualTest { } Frame { msec: 2112 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -822,7 +822,7 @@ VisualTest { } Frame { msec: 2128 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -842,7 +842,7 @@ VisualTest { } Frame { msec: 2144 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -862,7 +862,7 @@ VisualTest { } Frame { msec: 2160 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -882,7 +882,7 @@ VisualTest { } Frame { msec: 2176 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -902,7 +902,7 @@ VisualTest { } Frame { msec: 2192 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -922,7 +922,7 @@ VisualTest { } Frame { msec: 2208 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -942,7 +942,7 @@ VisualTest { } Frame { msec: 2224 - hash: "888c68103c4eef2f65ef32a93be8286a" + hash: "5f6ed58401fddd692503810f22b23e93" } Mouse { type: 5 @@ -970,79 +970,79 @@ VisualTest { } Frame { msec: 2240 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2256 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2272 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2288 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2304 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2320 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2336 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2352 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2368 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2384 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2400 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2416 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2432 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2448 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2464 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2480 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2496 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2512 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2528 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 2 @@ -1054,7 +1054,7 @@ VisualTest { } Frame { msec: 2544 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1066,7 +1066,7 @@ VisualTest { } Frame { msec: 2560 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1086,7 +1086,7 @@ VisualTest { } Frame { msec: 2576 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1106,7 +1106,7 @@ VisualTest { } Frame { msec: 2592 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1126,7 +1126,7 @@ VisualTest { } Frame { msec: 2608 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1146,7 +1146,7 @@ VisualTest { } Frame { msec: 2624 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1166,7 +1166,7 @@ VisualTest { } Frame { msec: 2640 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1186,7 +1186,7 @@ VisualTest { } Frame { msec: 2656 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1206,7 +1206,7 @@ VisualTest { } Frame { msec: 2672 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1226,7 +1226,7 @@ VisualTest { } Frame { msec: 2688 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1246,7 +1246,7 @@ VisualTest { } Frame { msec: 2704 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1266,7 +1266,7 @@ VisualTest { } Frame { msec: 2720 - hash: "0d3bac7463b5fe7f585997e35f179122" + hash: "defd2e26ba579dffd2273bcc86c54a94" } Mouse { type: 5 @@ -1286,43 +1286,43 @@ VisualTest { } Frame { msec: 2736 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2752 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2768 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2784 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2800 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2816 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2832 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2848 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2864 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2880 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2896 @@ -1330,63 +1330,63 @@ VisualTest { } Frame { msec: 2912 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2928 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2944 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2960 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2976 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 2992 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3008 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3024 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3040 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3056 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3072 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3088 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3104 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3120 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3136 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 2 @@ -1398,23 +1398,23 @@ VisualTest { } Frame { msec: 3152 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3168 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3184 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3200 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3216 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 3 @@ -1426,67 +1426,67 @@ VisualTest { } Frame { msec: 3232 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3248 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3264 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3280 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3296 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3312 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3328 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3344 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3360 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3376 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3392 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3408 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3424 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3440 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3456 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3472 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 2 @@ -1498,19 +1498,19 @@ VisualTest { } Frame { msec: 3488 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3504 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3520 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3536 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 3 @@ -1522,55 +1522,55 @@ VisualTest { } Frame { msec: 3552 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3568 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3584 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3600 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3616 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3632 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3648 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3664 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3680 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3696 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3712 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3728 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Frame { msec: 3744 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 2 @@ -1582,7 +1582,7 @@ VisualTest { } Frame { msec: 3760 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 5 @@ -1602,7 +1602,7 @@ VisualTest { } Frame { msec: 3776 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 5 @@ -1622,7 +1622,7 @@ VisualTest { } Frame { msec: 3792 - hash: "998cb23307a61afefb59c8b9e361a89f" + hash: "8caa38000edef97a8276022b5da19ecc" } Mouse { type: 5 @@ -1642,7 +1642,7 @@ VisualTest { } Frame { msec: 3808 - hash: "2e311a5dc484e9f4bc7bd85d32a693b1" + hash: "abda2edf3c9f1aa28f41bf28083d081f" } Mouse { type: 5 @@ -1662,7 +1662,7 @@ VisualTest { } Frame { msec: 3824 - hash: "cbfcb7b986b0c51828473d98ca9fee03" + hash: "1a0305de0a8156f3f059d74891b71846" } Mouse { type: 5 @@ -1682,7 +1682,7 @@ VisualTest { } Frame { msec: 3840 - hash: "389b514c4cd4a4d65388608643d08c04" + hash: "04c2fbbb1df6ca9d03c105fcfa5c0770" } Mouse { type: 5 @@ -1722,7 +1722,7 @@ VisualTest { } Frame { msec: 3872 - hash: "cf9a0a968459a1283fff91102eb29ba3" + hash: "4ebb31f7945bb5542f9e5146888b1065" } Mouse { type: 5 @@ -1742,139 +1742,139 @@ VisualTest { } Frame { msec: 3888 - hash: "77c86fb26126825cfd5b6ba21b903808" + hash: "2a731429c6d5c4ee1f1fa8f3ca07f0c2" } Frame { msec: 3904 - hash: "c497bcbe500905b8a69fd310fd7c7e1a" + hash: "b8a8c4db8325b3e0292e6473084347d9" } Frame { msec: 3920 - hash: "95bffb4d4aff1603e96af55cbc2dc3f2" + hash: "fae53bd8bc9d05f343968c7006723207" } Frame { msec: 3936 - hash: "6fa87a7136528b688069fe1c4bd94043" + hash: "fe2fc28a79609af32ea1043f3c988b08" } Frame { msec: 3952 - hash: "602c16e1382d810f853d647e531b4e8a" + hash: "18f77a48b14347b2ab41eb39c9de3be4" } Frame { msec: 3968 - hash: "01d1227e4f5b95f8b0c6a57a4b2314c4" + hash: "93e83c35d34715ee703a0d79d51bc145" } Frame { msec: 3984 - hash: "1db6401af45574b7453ad57766e60e6f" + hash: "4ae9d80d6079b92be66fcc099209d779" } Frame { msec: 4000 - hash: "067a1bef3df5d1c40842f28885d60250" + hash: "bd8c0a924552cb4dfc5ddc1451931b01" } Frame { msec: 4016 - hash: "5fba31051e05ec00c0d68b8e8af94132" + hash: "6a1874cdac6f754b36f022c583834d32" } Frame { msec: 4032 - hash: "d6209a0b9b9e0f2072179a4623c70fbd" + hash: "f3064485083025aba09224faafcede14" } Frame { msec: 4048 - hash: "ec30f07ab0056a45954c07ecdfa1401a" + hash: "8e82568ac62969dfedbf1c2082101661" } Frame { msec: 4064 - hash: "fef6c7767970a283bb3b13826f71bdac" + hash: "4e447efea0dd139787c7aa9018327206" } Frame { msec: 4080 - hash: "29621938e96be0d11c95fd1e4ca37631" + hash: "ed23778ce6843053cd4af6df7262bdd0" } Frame { msec: 4096 - hash: "8103c96ac90ddf52056d7e8b32e4ae9e" + hash: "fe1118cc51b4cd25d775b5d1c1d66540" } Frame { msec: 4112 - hash: "d72bf8b88efe603050ad038380173969" + hash: "02a59ccc15df26abe5612f13ce926286" } Frame { msec: 4128 - hash: "4438b56eb6aa800602634db6016caa50" + hash: "71c43a208e3dfbce6cb461f8ff0d2f17" } Frame { msec: 4144 - hash: "44674f7a874023c3932d698344ccda0e" + hash: "404b8155f17dff084c2da1407d6915a9" } Frame { msec: 4160 - hash: "155a834ddaa7128b6f5a2a406b340315" + hash: "ab0dba54c469dea461cd1619161edd82" } Frame { msec: 4176 - hash: "3886efa510581ee5b6c4a2ed76aeb42d" + hash: "e6f158712a7afe1844acc1a1cd9385ec" } Frame { msec: 4192 - hash: "094954e8d10b85d3941626dec4fb36af" + hash: "b9d8fcc3d68ebc6d4d4f60e4652befe3" } Frame { msec: 4208 - hash: "b597aeb20a8630e4b1dfd0a7be383e4d" + hash: "9005a49b3ac2ef2344d78ef68595ea26" } Frame { msec: 4224 - hash: "abc58e74ab197a2d7c243ddd67442e53" + hash: "aad3dd90f766320ad68b62b97559ec02" } Frame { msec: 4240 - hash: "b6ec106d39af13492c3d43bf006b7b15" + hash: "a39008d78d188e8bd3571f80f679a915" } Frame { msec: 4256 - hash: "d80211f898473a01e0c0641b96bc92f4" + hash: "cedc580acc63d6a069442bb83f17b6f8" } Frame { msec: 4272 - hash: "5010579fcd925e65c778c2e9cf0317de" + hash: "f63f5d20e3b5a4b6247339d0ec518449" } Frame { msec: 4288 - hash: "5010579fcd925e65c778c2e9cf0317de" + hash: "f63f5d20e3b5a4b6247339d0ec518449" } Frame { msec: 4304 - hash: "d80211f898473a01e0c0641b96bc92f4" + hash: "cedc580acc63d6a069442bb83f17b6f8" } Frame { msec: 4320 - hash: "27cfc811f62029df48ea7f371ff5654b" + hash: "bccf94c11e92af36f418dbee1b797a86" } Frame { msec: 4336 - hash: "b6ec106d39af13492c3d43bf006b7b15" + hash: "a39008d78d188e8bd3571f80f679a915" } Frame { msec: 4352 - hash: "28c8e3f08f46bf13cc52a7d6a31a7cf1" + hash: "02d38396737a262fa983511a40514b38" } Frame { msec: 4368 - hash: "b597aeb20a8630e4b1dfd0a7be383e4d" + hash: "9005a49b3ac2ef2344d78ef68595ea26" } Frame { msec: 4384 - hash: "a3a3682ce0d2a2d57457458b13645afa" + hash: "c05dad606a9b5b501a201bfead974f03" } Frame { msec: 4400 - hash: "98bf25cbb8202fe1576ac15bac7b9e65" + hash: "27846f086c13e1b06e89a8a395802678" } Frame { msec: 4416 - hash: "16b99c9cf5297a5251869a3935084cf7" + hash: "f919b09b6f7f4f09b5d9b123b686a442" } Mouse { type: 2 @@ -1886,11 +1886,11 @@ VisualTest { } Frame { msec: 4432 - hash: "16b99c9cf5297a5251869a3935084cf7" + hash: "f919b09b6f7f4f09b5d9b123b686a442" } Frame { msec: 4448 - hash: "16b99c9cf5297a5251869a3935084cf7" + hash: "f919b09b6f7f4f09b5d9b123b686a442" } Mouse { type: 5 @@ -1902,7 +1902,7 @@ VisualTest { } Frame { msec: 4464 - hash: "16b99c9cf5297a5251869a3935084cf7" + hash: "f919b09b6f7f4f09b5d9b123b686a442" } Mouse { type: 5 @@ -1922,7 +1922,7 @@ VisualTest { } Frame { msec: 4480 - hash: "16b99c9cf5297a5251869a3935084cf7" + hash: "ab0dba54c469dea461cd1619161edd82" } Mouse { type: 5 @@ -1942,7 +1942,7 @@ VisualTest { } Frame { msec: 4496 - hash: "abc58e74ab197a2d7c243ddd67442e53" + hash: "aad3dd90f766320ad68b62b97559ec02" } Mouse { type: 5 @@ -1962,7 +1962,7 @@ VisualTest { } Frame { msec: 4512 - hash: "e5c5b741da7c028ec77f52016675c1ca" + hash: "09e110197afc9350dbbaf3e19e24dbe8" } Mouse { type: 5 @@ -1982,7 +1982,7 @@ VisualTest { } Frame { msec: 4528 - hash: "12481bcccb524a478851a57d4db6cf8d" + hash: "c50fa7aa75b947d065109c97a0db4c02" } Mouse { type: 5 @@ -2002,7 +2002,7 @@ VisualTest { } Frame { msec: 4544 - hash: "a49985bd332cd3376986d379c474a3de" + hash: "e701f8ef23f576f10c286191ea4caaf1" } Mouse { type: 5 @@ -2030,51 +2030,51 @@ VisualTest { } Frame { msec: 4560 - hash: "cd4e55b15e9df7fee1862180fddec0ca" + hash: "c24daebe9c5ba9bd46ef674c49edd160" } Frame { msec: 4576 - hash: "64ff54775d198b616597f4539de90bd8" + hash: "fc762235395c772666d2529a5e9bff98" } Frame { msec: 4592 - hash: "2b188745bfff51f9d3af90b7ad9c8d77" + hash: "7f4f4420fde62e6126f0c3bf604425dc" } Frame { msec: 4608 - hash: "2dde7d565f92f22c6524448f97107e35" + hash: "0e9978b0f60cba7bf599571b97f2f751" } Frame { msec: 4624 - hash: "897a454ac464008d6dd7864eb608ae65" + hash: "ff19d1b0a0d7d0cc5dd8919606c17fc8" } Frame { msec: 4640 - hash: "269df4f1aca4f0cdbd5c86c2e115bd3c" + hash: "7c61e0a6c354b4f30db6c861b9250be2" } Frame { msec: 4656 - hash: "ec0ebdbd3f4665fba7f6a523a82a5071" + hash: "bd1196ce51f5abd53f6052f17d926a81" } Frame { msec: 4672 - hash: "c1ac6a385f580f23b3486c643d276e33" + hash: "ab2b1c33a5f60690fe2724a0ddd3bb67" } Frame { msec: 4688 - hash: "3de0d147a6a3c1382ec64a80996bb4f4" + hash: "0a0709d2649d649ab52eaddbe60c1dc9" } Frame { msec: 4704 - hash: "8db942b5909f63d4369ad5b29938ef49" + hash: "ef3b3099811cc2e26d823d94c5b66f1d" } Frame { msec: 4720 - hash: "f7840636f2d01c25be8e9c77230cca53" + hash: "522683305b2706b6e22d0e1770f285d6" } Frame { msec: 4736 - hash: "d315f82e175361fed83193ce550cb6e9" + hash: "c08d933b3dbda5fc476ed673cd7a2e4a" } Mouse { type: 2 @@ -2086,7 +2086,7 @@ VisualTest { } Frame { msec: 4752 - hash: "d315f82e175361fed83193ce550cb6e9" + hash: "c08d933b3dbda5fc476ed673cd7a2e4a" } Mouse { type: 5 @@ -2106,7 +2106,7 @@ VisualTest { } Frame { msec: 4768 - hash: "d315f82e175361fed83193ce550cb6e9" + hash: "ab0dba54c469dea461cd1619161edd82" } Mouse { type: 5 @@ -2126,7 +2126,7 @@ VisualTest { } Frame { msec: 4784 - hash: "00b072a0adbfcd520d495ef6540f5680" + hash: "d23653a4e1651babdbb3561fb7029df2" } Mouse { type: 5 @@ -2146,7 +2146,7 @@ VisualTest { } Frame { msec: 4800 - hash: "fb605e95988a6110384671e7f3f18ad8" + hash: "702d94cbca1ba235a5a2cc30c552d8b7" } Mouse { type: 5 @@ -2186,7 +2186,7 @@ VisualTest { } Frame { msec: 4832 - hash: "4d1eb644b592a693b13fe14377aeed97" + hash: "f53134176897d55299ab723ab20ba3fc" } Mouse { type: 5 @@ -2206,7 +2206,7 @@ VisualTest { } Frame { msec: 4848 - hash: "00eb1d3b016eb0220461074ce81b1aef" + hash: "84146c913b41215c4bab1f36471f2b7b" } Mouse { type: 5 @@ -2234,231 +2234,231 @@ VisualTest { } Frame { msec: 4864 - hash: "77c86fb26126825cfd5b6ba21b903808" + hash: "2a731429c6d5c4ee1f1fa8f3ca07f0c2" } Frame { msec: 4880 - hash: "e80f024bbdce0ceeae137e347abc95a4" + hash: "a1e960ffef391daecb52d31698c7b06c" } Frame { msec: 4896 - hash: "bb189f39a836b9a2aa68f4535ed1d6fb" + hash: "adca54c132f170c517f1ef17c45006c8" } Frame { msec: 4912 - hash: "cf9a0a968459a1283fff91102eb29ba3" + hash: "4ebb31f7945bb5542f9e5146888b1065" } Frame { msec: 4928 - hash: "27130e7f6b853a287a7bdd8608628a4f" + hash: "c43ebd04137e379216c94b4c57cab3d9" } Frame { msec: 4944 - hash: "231c7b7078af00a36cfee3d5e43a4021" + hash: "c0218c548f5e3eb74ef33cb2921dbc96" } Frame { msec: 4960 - hash: "d8ffc8cc9cecc25cb9b4e7990fb7b8e7" + hash: "e6a15947574c7ac8e5a2454a5f8b043d" } Frame { msec: 4976 - hash: "fb5db5dafdb375132f1f1a461193bc60" + hash: "ec9aca63b61a8c3beb4ad476d4e38568" } Frame { msec: 4992 - hash: "64100f9f102ffc9415e306c087547709" + hash: "28f0447e8107d7fac9ec29b83808d2cb" } Frame { msec: 5008 - hash: "6960e5c4feb55043ff91934fc934734e" + hash: "74e28cddf8dd7bd7593c7185e09ea752" } Frame { msec: 5024 - hash: "349c7a84ff8f9b52d39dba1282353167" + hash: "23b447e486a6354354505171cf3c45ec" } Frame { msec: 5040 - hash: "bb41010df844312fc15bb5b42712619a" + hash: "3e3948addc7236ff8638863786dfe045" } Frame { msec: 5056 - hash: "63a3e18670bb2a5e7edfe3b752c0a1b5" + hash: "49885ec2f3242fc3ba9c9b808b3bb491" } Frame { msec: 5072 - hash: "92b1d0fbadbefe9f122b14903a5e0ee9" + hash: "0c12fc65a0298af1a1ec3bccfcdb20ab" } Frame { msec: 5088 - hash: "6b979e1a4bc7226a89ffb97be2f08147" + hash: "49c71089343b963fd8b3587eb1d5d457" } Frame { msec: 5104 - hash: "7b783908e0b10d329a7d3172f2302a85" + hash: "f083682e9bce74022baeafcb26870adb" } Frame { msec: 5120 - hash: "41d5ef3390cfc0d806825fc0cd033be6" + hash: "5bd49eab3fd8b246659b51d4602ea391" } Frame { msec: 5136 - hash: "ff1a053c0af99c51353503002515843d" + hash: "3170c18b8dd74429b0f366ec07f4870b" } Frame { msec: 5152 - hash: "63b26ecde2a2a9ce36884191304352ed" + hash: "d82de8b7c5a144b20085f447cf041350" } Frame { msec: 5168 - hash: "bdcff2f9f2c376974211ea6ad5c4961f" + hash: "60e520c52c5b87c686294a23d96dbd11" } Frame { msec: 5184 - hash: "00ffef1a1d4341ac1c7f43d493a9e826" + hash: "bb5b6cb5862e28a7f309ef5c7cf2b5dd" } Frame { msec: 5200 - hash: "65dcbb543656f65267c7d32dcd644e56" + hash: "b9e255376ad0b74b2c9be6e694f84d90" } Frame { msec: 5216 - hash: "38b49419b7103d76da2b6d7101d63d88" + hash: "e7527c7c8cb2f8c9e5ce32be98612837" } Frame { msec: 5232 - hash: "de39f6bf64745054cbee30ddf306f641" + hash: "8f8547a6508b156d514c6d4a61d18424" } Frame { msec: 5248 - hash: "d6b5ceca4aa48a7d4fd901d44c151b53" + hash: "99b4220101d400b49346ca023799c8fe" } Frame { msec: 5264 - hash: "876e6eee8a35c34e2dd5269f86a9ab3a" + hash: "2d83cf7c5f93aad4f9dcadcfdbb08fa3" } Frame { msec: 5280 - hash: "f94219306eac2e678881d0b607d15a1e" + hash: "c9ea64aa7000008ad9032cddd898767c" } Frame { msec: 5296 - hash: "c9184196ef45c985f08f80435492641d" + hash: "4c37b188261e927f72725484d08ac9e1" } Frame { msec: 5312 - hash: "34dc672ebfd75ec017d0c2f0bd435cd8" + hash: "29c8004517294539adf3243533381436" } Frame { msec: 5328 - hash: "4daf1c730fdf13e0a87b28208f2b6dd1" + hash: "b5126298ebb61d6ab5ae58822c9380ca" } Frame { msec: 5344 - hash: "c28d5d7d9d3a86e5bbf6ad48331f9c61" + hash: "7b546c089dca57353b4867af724ea370" } Frame { msec: 5360 - hash: "3f98121997a1613bd49d22003d1a1887" + hash: "deedb9ddcc2f5354a2356178db54d971" } Frame { msec: 5376 - hash: "86732d3e900877ae7a8615b7448afaaa" + hash: "9e1fb461c13b4affa39e5909d3ade168" } Frame { msec: 5392 - hash: "9f3da7ebaeb319c9fec0abdd6bd76ee2" + hash: "dbb54d7d203c99d466b1a173fb90c148" } Frame { msec: 5408 - hash: "326563c2c812a74c7f1fa5e9da0c2369" + hash: "0a67ef028264551c1122f4d8a0b07c20" } Frame { msec: 5424 - hash: "79e00bbe77f0a178e8db30023a881c3f" + hash: "636f04661a0418c1fdcaaaba28092671" } Frame { msec: 5440 - hash: "e624204566550e928ab2a2c54113d217" + hash: "de8946eb6317277b580cbf6a38a85a29" } Frame { msec: 5456 - hash: "b95bf705b81544b05f560c54dec56ff1" + hash: "45dd5e856c10ef2e5a9b968044802096" } Frame { msec: 5472 - hash: "4f4cd776b76272cfe79b86a108bd6b6e" + hash: "a974415dcf31bee79874c4a6e84cf796" } Frame { msec: 5488 - hash: "ec2eb1b39a252bd9b37d12ede3d231ce" + hash: "58dab05300d4c83ba084c8bef6a04958" } Frame { msec: 5504 - hash: "a746404a1a26e2a25b8d364dbef46eef" + hash: "f74c075e8cf2aef501b7115427b3b221" } Frame { msec: 5520 - hash: "17d190465ee0d348d9b67a748626d99e" + hash: "7fd3e958115134b2f15cc6d3e01cbcfe" } Frame { msec: 5536 - hash: "9124d97d120de1806d86c8f437ec4ed2" + hash: "7efcd27e34db1d3adc3d31e0b9ebe432" } Frame { msec: 5552 - hash: "ea746de2380835d299c56bb01f0aa83c" + hash: "2229621b9ad55dddce371061584a4dfd" } Frame { msec: 5568 - hash: "4fda328eafe6ec2d02d939517d6d82e3" + hash: "c8747327ae3370b04a996aa6b5e373c6" } Frame { msec: 5584 - hash: "9c6f671def0b1f5d780024a9dad439e6" + hash: "677f52c273dda1f878bfea43b6353aaa" } Frame { msec: 5600 - hash: "b7d441d0bb27ed6d1984f324b6e02548" + hash: "d29de2f0505bdaca1e3443812a588fb1" } Frame { msec: 5616 - hash: "3042a62a1125171d9530b696f4b36e19" + hash: "71f3088ea8794a232ee08c6b0ad72e98" } Frame { msec: 5632 - hash: "4534f40cf6bb7f402d7252c474629664" + hash: "3733ba52e740ea8438967cb03c619368" } Frame { msec: 5648 - hash: "cb5962fe94c5d3ef754ff45f905a5c88" + hash: "5fda56f77948e183557ff54690030746" } Frame { msec: 5664 - hash: "b5a5f9f3aa0948f0bd8d9b4a3fceae50" + hash: "5996c2fc31ff3a13e1f3a23a230aad9a" } Frame { msec: 5680 - hash: "2e0605899abb5725cf22561ec9293879" + hash: "90b9b19f9f6aef7279b1199ca7b34b07" } Frame { msec: 5696 - hash: "1f260f1d931326be7e398f7c87e44735" + hash: "05b4559167ff77d07bb3063b87c4e621" } Frame { msec: 5712 - hash: "57b5fc47ed700831b3dc3f2afbb1c3ed" + hash: "6e43987a8db7a6231887cf5883d381bf" } Frame { msec: 5728 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5744 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5760 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5776 @@ -2474,19 +2474,19 @@ VisualTest { } Frame { msec: 5792 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5808 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5824 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5840 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Mouse { type: 3 @@ -2498,59 +2498,59 @@ VisualTest { } Frame { msec: 5856 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5872 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5888 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5904 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5920 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5936 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5952 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5968 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 5984 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6000 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6016 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6032 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6048 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6064 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Mouse { type: 2 @@ -2562,23 +2562,23 @@ VisualTest { } Frame { msec: 6080 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6096 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6112 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6128 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6144 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Mouse { type: 3 @@ -2590,63 +2590,63 @@ VisualTest { } Frame { msec: 6160 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6176 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6192 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6208 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6224 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6240 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6256 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6272 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6288 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6304 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6320 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6336 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6352 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6368 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Frame { msec: 6384 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Mouse { type: 2 @@ -2658,11 +2658,11 @@ VisualTest { } Frame { msec: 6400 - hash: "c18aeb6fb3914a0be2d34ff76249ed8e" + hash: "9b748b3b85f63d7f62cd916b0bf4357c" } Frame { msec: 6416 - hash: "c18aeb6fb3914a0be2d34ff76249ed8e" + hash: "9b748b3b85f63d7f62cd916b0bf4357c" } Mouse { type: 5 @@ -2682,7 +2682,7 @@ VisualTest { } Frame { msec: 6432 - hash: "c18aeb6fb3914a0be2d34ff76249ed8e" + hash: "9b748b3b85f63d7f62cd916b0bf4357c" } Mouse { type: 5 @@ -2702,7 +2702,7 @@ VisualTest { } Frame { msec: 6448 - hash: "8b9167c04a8acc7f8ade258a3e58893b" + hash: "351d95ba7bc01ea8d4991883885ca537" } Mouse { type: 5 @@ -2722,7 +2722,7 @@ VisualTest { } Frame { msec: 6464 - hash: "a5daa2f6c932fa38038639bdc8231c5d" + hash: "2c84bdd7066c8fd8c66b022783c6fcfe" } Mouse { type: 5 @@ -2742,7 +2742,7 @@ VisualTest { } Frame { msec: 6480 - hash: "f342612efcd5e0820b44bd788ec52d7a" + hash: "ffe18300d9ce72e2d4e191c473a6973c" } Mouse { type: 5 @@ -2762,7 +2762,7 @@ VisualTest { } Frame { msec: 6496 - hash: "9a66e65c69ec833a36cce5cbd7d8257f" + hash: "427720fdd38ff4310c8040b1a5a5f84f" } Mouse { type: 5 @@ -2782,7 +2782,7 @@ VisualTest { } Frame { msec: 6512 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2802,7 +2802,7 @@ VisualTest { } Frame { msec: 6528 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2822,7 +2822,7 @@ VisualTest { } Frame { msec: 6544 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2842,7 +2842,7 @@ VisualTest { } Frame { msec: 6560 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2862,7 +2862,7 @@ VisualTest { } Frame { msec: 6576 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2882,7 +2882,7 @@ VisualTest { } Frame { msec: 6592 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 5 @@ -2910,35 +2910,35 @@ VisualTest { } Frame { msec: 6608 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6624 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6640 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6656 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6672 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6688 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6704 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6720 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6736 @@ -2946,67 +2946,67 @@ VisualTest { } Frame { msec: 6752 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6768 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6784 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6800 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6816 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6832 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6848 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6864 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6880 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6896 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6912 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6928 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6944 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6960 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6976 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Frame { msec: 6992 - hash: "bca482a77823f03e8fb4170ee329fc0e" + hash: "08a827d109c78ff0d82ed7b6ef8d55b9" } Mouse { type: 2 @@ -3018,7 +3018,7 @@ VisualTest { } Frame { msec: 7008 - hash: "9ed65a21e4aaedf9c48a38324b3f5480" + hash: "ff198f6b27379e64b901b37e0cf1e98b" } Mouse { type: 5 @@ -3038,7 +3038,7 @@ VisualTest { } Frame { msec: 7024 - hash: "9ed65a21e4aaedf9c48a38324b3f5480" + hash: "ff198f6b27379e64b901b37e0cf1e98b" } Mouse { type: 5 @@ -3058,7 +3058,7 @@ VisualTest { } Frame { msec: 7040 - hash: "9ed65a21e4aaedf9c48a38324b3f5480" + hash: "ff198f6b27379e64b901b37e0cf1e98b" } Mouse { type: 5 @@ -3078,7 +3078,7 @@ VisualTest { } Frame { msec: 7056 - hash: "c4925926f64b852ff6c8d07e1c70ead5" + hash: "61d410fdbe0ee8a41e9c7b25eb2901a7" } Mouse { type: 5 @@ -3098,7 +3098,7 @@ VisualTest { } Frame { msec: 7072 - hash: "da771cedad067b8f25c100613b6a14f2" + hash: "8e27d1db841047a115561861a1c20e67" } Mouse { type: 5 @@ -3118,7 +3118,7 @@ VisualTest { } Frame { msec: 7088 - hash: "c8862bf76a431edc1cf04f4114fa859f" + hash: "7599e2f206da8b46dcaf35a4a7858747" } Mouse { type: 5 @@ -3138,7 +3138,7 @@ VisualTest { } Frame { msec: 7104 - hash: "4d923cd520c00f5cd985283d62cf17ec" + hash: "45e2cf43322f038d2b322dea82e829f1" } Mouse { type: 5 @@ -3158,7 +3158,7 @@ VisualTest { } Frame { msec: 7120 - hash: "76b0d1c77ba29bad836673b1b79de911" + hash: "0170b6aff2eab67213fc4f2883be1db9" } Mouse { type: 5 @@ -3178,7 +3178,7 @@ VisualTest { } Frame { msec: 7136 - hash: "3f9c5686f0a9ef5ecf2b8338ef2e7933" + hash: "23ef985de50ae4600d8f62ed4c91edc9" } Mouse { type: 5 @@ -3198,7 +3198,7 @@ VisualTest { } Frame { msec: 7152 - hash: "799d83eedefa0a56f37a83404c59ad4f" + hash: "a69e534df84e406e06ca94e2221c97f1" } Mouse { type: 5 @@ -3226,79 +3226,79 @@ VisualTest { } Frame { msec: 7168 - hash: "d6b5ceca4aa48a7d4fd901d44c151b53" + hash: "99b4220101d400b49346ca023799c8fe" } Frame { msec: 7184 - hash: "e1609c4e40fb9e043a9fff683b94c6c4" + hash: "80f599f50af9e601536f62ea93f4e429" } Frame { msec: 7200 - hash: "ea457fc4d4065d2ed0e9f6efc47a06ee" + hash: "e211b4a9e0059eaf7a3654121ed6b7a4" } Frame { msec: 7216 - hash: "b7f4319aa9c21640a697ee89f162bb49" + hash: "ef0997291fb3323c877b65847905f7c3" } Frame { msec: 7232 - hash: "880f60263cd79fb6a1bff7252d2373bb" + hash: "95ca2f988370075070c6a98e5e680206" } Frame { msec: 7248 - hash: "00ffef1a1d4341ac1c7f43d493a9e826" + hash: "bb5b6cb5862e28a7f309ef5c7cf2b5dd" } Frame { msec: 7264 - hash: "c949fe87ba91e08f26a1c4d90028513f" + hash: "958e9074dfa2392db05fb3f532573519" } Frame { msec: 7280 - hash: "8636af4591c61c4b4a548f3a38749413" + hash: "4d90460d3b6c46075ffda426bc6ceaa6" } Frame { msec: 7296 - hash: "63b26ecde2a2a9ce36884191304352ed" + hash: "d82de8b7c5a144b20085f447cf041350" } Frame { msec: 7312 - hash: "843f7263f63442f0041bf2c1a6fae400" + hash: "4d5d1c8470df16097c51517e750ef6be" } Frame { msec: 7328 - hash: "ff1a053c0af99c51353503002515843d" + hash: "3170c18b8dd74429b0f366ec07f4870b" } Frame { msec: 7344 - hash: "47aea3ac4ea935d43f731a258287c2e8" + hash: "35b4e282089b4f7e8cc60aaf6635a0f7" } Frame { msec: 7360 - hash: "eee4fa336149528dfb16565b856ca692" + hash: "bb67acd602414cf59e27b5ff19f69169" } Frame { msec: 7376 - hash: "bb94493c25c56c41e81ef1e390adf63d" + hash: "0135220633c5aebe964b596f3c1bae27" } Frame { msec: 7392 - hash: "2915f455a5e1e8c6b8cc78309c5e84d9" + hash: "b4a996bdc1ccae96f84e285b212a19a3" } Frame { msec: 7408 - hash: "94701ffaa4f45924ad89f92a30157c7d" + hash: "7fe6c7bd1bc9e46d3e520178a2309e87" } Frame { msec: 7424 - hash: "92fae8cf4b8d8404b26a31f995860b95" + hash: "b803764915a58bd59aed1223bd7c67d7" } Frame { msec: 7440 - hash: "6b979e1a4bc7226a89ffb97be2f08147" + hash: "49c71089343b963fd8b3587eb1d5d457" } Frame { msec: 7456 - hash: "dd94beeb0b4933a9ac2236a9abe630ff" + hash: "d2e577eecdf6fc9ecadf500896e0ff46" } Mouse { type: 2 @@ -3310,11 +3310,11 @@ VisualTest { } Frame { msec: 7472 - hash: "dd94beeb0b4933a9ac2236a9abe630ff" + hash: "d2e577eecdf6fc9ecadf500896e0ff46" } Frame { msec: 7488 - hash: "dd94beeb0b4933a9ac2236a9abe630ff" + hash: "d2e577eecdf6fc9ecadf500896e0ff46" } Mouse { type: 5 @@ -3334,7 +3334,7 @@ VisualTest { } Frame { msec: 7504 - hash: "dd94beeb0b4933a9ac2236a9abe630ff" + hash: "d2e577eecdf6fc9ecadf500896e0ff46" } Mouse { type: 5 @@ -3354,7 +3354,7 @@ VisualTest { } Frame { msec: 7520 - hash: "34c7ed1c072d84626a8a64f7db02f71d" + hash: "21bf0affeaf1033e59a99bed9efeb80d" } Mouse { type: 5 @@ -3374,7 +3374,7 @@ VisualTest { } Frame { msec: 7536 - hash: "e723da5ecaffe31f03b1d5ca6765229b" + hash: "c4506098417f905871a43d183cd5904d" } Mouse { type: 5 @@ -3394,7 +3394,7 @@ VisualTest { } Frame { msec: 7552 - hash: "a85128cae494abeb5d45ab8df0d127a6" + hash: "fdf8dfa53431f930b01e667b3b86c7a1" } Mouse { type: 5 @@ -3414,7 +3414,7 @@ VisualTest { } Frame { msec: 7568 - hash: "3599a92966c27321e9f702f3428b9b00" + hash: "a94e05f80f0f8d3af13678318fd91416" } Mouse { type: 5 @@ -3434,31 +3434,31 @@ VisualTest { } Frame { msec: 7584 - hash: "067a1bef3df5d1c40842f28885d60250" + hash: "bd8c0a924552cb4dfc5ddc1451931b01" } Frame { msec: 7600 - hash: "82f818ed44a191fb51e637b8068786dc" + hash: "ed5bab2126fb459989b7ea0e44da6776" } Frame { msec: 7616 - hash: "f408f59707195549ba61f030a3f020cd" + hash: "756fc80a88e6f5d28f9c6bba771355c5" } Frame { msec: 7632 - hash: "66e79c8b2f8e3a57c3bc14935c5df7d1" + hash: "640c092db0d2a523ce0cdc961e64124a" } Frame { msec: 7648 - hash: "4341c6b7b0d2e8021b51cb1abab85e10" + hash: "097582f1b42c16d41f4413755ac15c3e" } Frame { msec: 7664 - hash: "5ec8ee5ccecac1787b2f5e99268e810d" + hash: "67ef5e3297fe5605bd41a72681899f48" } Frame { msec: 7680 - hash: "1fae7b735ff6e88abfb1423f8960da4f" + hash: "91452c52c309b7d90c7ccca3fc9ae8b2" } Frame { msec: 7696 @@ -3466,182 +3466,182 @@ VisualTest { } Frame { msec: 7712 - hash: "dce74ff07eb37c82a38b3e515f9a43f2" + hash: "ebef3c7095abadf45855fe75cbf3d358" } Frame { msec: 7728 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7744 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7760 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7776 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7792 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7808 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7824 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7840 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7856 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7872 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7888 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7904 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7920 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7936 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7952 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7968 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 7984 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8000 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8016 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8032 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8048 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8064 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8080 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8096 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8112 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8128 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8144 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8160 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8176 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8192 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8208 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8224 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8240 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8256 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8272 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8288 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8304 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8320 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8336 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8352 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8368 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8384 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8400 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } Frame { msec: 8416 - hash: "ba2c06129f17fde474427859d66ecd23" + hash: "97b167a5a76d6b71713d25508ed360f0" } } diff --git a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png index 1dc9372..3556dce 100644 Binary files a/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png and b/tests/auto/declarative/qmlvisual/rect/data/rect-painting.0.png differ -- cgit v0.12 From 086f33dd4c70be03adcbc1703997afa27add920b Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Tue, 4 Jan 2011 15:03:53 +1000 Subject: Fix results of number() queries for zero and non-number values Use xs:string() to test whether a value is empty, instead of using a simple boolean check which fails for zero-type values. This fix also means 'NaN' is returned for non-number (including empty) values. Task-number: QTBUG-16423, QTBUG-16265 Reviewed-by: Michael Brasser --- src/declarative/util/qdeclarativexmllistmodel.cpp | 2 +- .../qdeclarativexmllistmodel/data/model2.qml | 11 ---- .../tst_qdeclarativexmllistmodel.cpp | 76 ++++++++++++++++++---- 3 files changed, 64 insertions(+), 25 deletions(-) delete mode 100644 tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml diff --git a/src/declarative/util/qdeclarativexmllistmodel.cpp b/src/declarative/util/qdeclarativexmllistmodel.cpp index 49a12b1..f5c3ad4 100644 --- a/src/declarative/util/qdeclarativexmllistmodel.cpp +++ b/src/declarative/util/qdeclarativexmllistmodel.cpp @@ -382,7 +382,7 @@ void QDeclarativeXmlQuery::doSubQueryJob() for (int i = 0; i < queries.size(); ++i) { QList resultList; if (!queries[i].isEmpty()) { - subquery.setQuery(m_prefix + QLatin1String("(let $v := ") + queries[i] + QLatin1String(" return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); + subquery.setQuery(m_prefix + QLatin1String("(let $v := string(") + queries[i] + QLatin1String(") return if ($v) then ") + queries[i] + QLatin1String(" else \"\")")); if (subquery.isValid()) { QXmlResultItems resultItems; subquery.evaluateTo(&resultItems); diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml deleted file mode 100644 index e56aafa..0000000 --- a/tests/auto/declarative/qdeclarativexmllistmodel/data/model2.qml +++ /dev/null @@ -1,11 +0,0 @@ -import QtQuick 1.0 - -XmlListModel { - source: "model.xml" - query: "/Pets/Pet" - XmlRole { name: "name"; query: "name/string()" } - XmlRole { name: "type"; query: "type/string()" } - XmlRole { name: "age"; query: "age/number()" } - XmlRole { name: "size"; query: "size/string()" } - XmlRole { name: "tricks"; query: "tricks/string()" } -} diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp index a14f942..3e81c53 100644 --- a/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp +++ b/tests/auto/declarative/qdeclarativexmllistmodel/tst_qdeclarativexmllistmodel.cpp @@ -38,6 +38,12 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +#include + +#include +#include +#include + #include #include #include @@ -75,7 +81,8 @@ private slots: } void buildModel(); - void missingFields(); + void testTypes(); + void testTypes_data(); void cdata(); void attributes(); void roles(); @@ -158,27 +165,70 @@ void tst_qdeclarativexmllistmodel::buildModel() delete model; } -void tst_qdeclarativexmllistmodel::missingFields() +void tst_qdeclarativexmllistmodel::testTypes() { - QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/model2.qml")); + QFETCH(QString, xml); + QFETCH(QString, roleName); + QFETCH(QVariant, expectedValue); + + QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/testtypes.qml")); QDeclarativeXmlListModel *model = qobject_cast(component.create()); QVERIFY(model != 0); - QTRY_COMPARE(model->count(), 9); + model->setXml(xml.toUtf8()); + model->reload(); + QTRY_COMPARE(model->count(), 1); - QList roles; - roles << Qt::UserRole << Qt::UserRole + 1 << Qt::UserRole + 2 << Qt::UserRole + 3 << Qt::UserRole + 4; - QHash data = model->data(5, roles); - QVERIFY(data.count() == 5); - QCOMPARE(data.value(Qt::UserRole+3).toString(), QLatin1String("")); - QCOMPARE(data.value(Qt::UserRole+4).toString(), QLatin1String("")); + int role = -1; + foreach (int i, model->roles()) { + if (model->toString(i) == roleName) { + role = i; + break; + } + } + QVERIFY(role >= 0); - data = model->data(7, roles); - QVERIFY(data.count() == 5); - QCOMPARE(data.value(Qt::UserRole+2).toString(), QLatin1String("")); + if (expectedValue.toString() == "nan") + QVERIFY(qIsNaN(model->data(0, role).toDouble())); + else + QCOMPARE(model->data(0, role), expectedValue); delete model; } +void tst_qdeclarativexmllistmodel::testTypes_data() +{ + QTest::addColumn("xml"); + QTest::addColumn("roleName"); + QTest::addColumn("expectedValue"); + + QTest::newRow("missing string field") << "" + << "stringValue" << QVariant(""); + QTest::newRow("empty string") << "" + << "stringValue" << QVariant(""); + QTest::newRow("1-char string") << "5" + << "stringValue" << QVariant("5"); + QTest::newRow("string ok") << "abc def g" + << "stringValue" << QVariant("abc def g"); + + QTest::newRow("missing number field") << "" + << "numberValue" << QVariant(""); + double nan = qQNaN(); + QTest::newRow("empty number field") << "" + << "numberValue" << QVariant(nan); + QTest::newRow("number field with string") << "a string" + << "numberValue" << QVariant(nan); + QTest::newRow("-1") << "-1" + << "numberValue" << QVariant("-1"); + QTest::newRow("-1.5") << "-1.5" + << "numberValue" << QVariant("-1.5"); + QTest::newRow("0") << "0" + << "numberValue" << QVariant("0"); + QTest::newRow("+1") << "1" + << "numberValue" << QVariant("1"); + QTest::newRow("+1.5") << "1.5" + << "numberValue" << QVariant("1.5"); +} + void tst_qdeclarativexmllistmodel::cdata() { QDeclarativeComponent component(&engine, QUrl::fromLocalFile(SRCDIR "/data/recipes.qml")); -- cgit v0.12 From 31460847fed4bc0867c3fd78466fed32e407fafb Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Tue, 4 Jan 2011 14:21:26 +1000 Subject: Fix translation in Connections element. Provide the component's file name to the expression as the translation context. Task-number: QTBUG-10300 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeconnections.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/declarative/util/qdeclarativeconnections.cpp b/src/declarative/util/qdeclarativeconnections.cpp index 15e5ac5..e102f2c 100644 --- a/src/declarative/util/qdeclarativeconnections.cpp +++ b/src/declarative/util/qdeclarativeconnections.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include #include @@ -257,7 +258,11 @@ void QDeclarativeConnections::connectSignals() if (prop.isValid() && (prop.type() & QDeclarativeProperty::SignalProperty)) { QDeclarativeBoundSignal *signal = new QDeclarativeBoundSignal(target(), prop.method(), this); - signal->setExpression(new QDeclarativeExpression(qmlContext(this), 0, script)); + QDeclarativeExpression *expression = new QDeclarativeExpression(qmlContext(this), 0, script); + QDeclarativeData *ddata = QDeclarativeData::get(this); + if (ddata && ddata->outerContext && !ddata->outerContext->url.isEmpty()) + expression->setSourceLocation(ddata->outerContext->url.toString(), ddata->lineNumber); + signal->setExpression(expression); d->boundsignals += signal; } else { if (!d->ignoreUnknownSignals) -- cgit v0.12 From cb470a33bf85cf15b9df57e3ade27c6a0720d138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Tue, 4 Jan 2011 08:39:22 +0100 Subject: Fixed first element being a LineToElement in QPainterPath::connectPath() This would produce an invalid path, causing potential crashes in various parts of Qt. Task-number: QTBUG-16377 Reviewed-by: Gunnar Sletta --- src/gui/painting/qpainterpath.cpp | 3 ++- tests/auto/qpainterpath/tst_qpainterpath.cpp | 26 ++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index ffd0d5c..94e2cd4 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1196,7 +1196,8 @@ void QPainterPath::connectPath(const QPainterPath &other) int first = d->elements.size(); d->elements += other.d_func()->elements; - d->elements[first].type = LineToElement; + if (first != 0) + d->elements[first].type = LineToElement; // avoid duplicate points if (first > 0 && QPointF(d->elements[first]) == QPointF(d->elements[first - 1])) { diff --git a/tests/auto/qpainterpath/tst_qpainterpath.cpp b/tests/auto/qpainterpath/tst_qpainterpath.cpp index d0cddda..66e6d10 100644 --- a/tests/auto/qpainterpath/tst_qpainterpath.cpp +++ b/tests/auto/qpainterpath/tst_qpainterpath.cpp @@ -107,6 +107,7 @@ private slots: void operators(); void connectPathDuplicatePoint(); + void connectPathMoveTo(); void translate(); }; @@ -1169,6 +1170,31 @@ void tst_QPainterPath::connectPathDuplicatePoint() QCOMPARE(c, a); } +void tst_QPainterPath::connectPathMoveTo() +{ + QPainterPath path1; + QPainterPath path2; + QPainterPath path3; + QPainterPath path4; + + path1.moveTo(1,1); + + path2.moveTo(4,4); + path2.lineTo(5,6); + path2.lineTo(6,7); + + path3.connectPath(path2); + + path4.lineTo(5,5); + + path1.connectPath(path2); + + QVERIFY(path1.elementAt(0).type == QPainterPath::MoveToElement); + QVERIFY(path2.elementAt(0).type == QPainterPath::MoveToElement); + QVERIFY(path3.elementAt(0).type == QPainterPath::MoveToElement); + QVERIFY(path4.elementAt(0).type == QPainterPath::MoveToElement); +} + void tst_QPainterPath::translate() { QPainterPath path; -- cgit v0.12 From 7fec0ddfae9e7c79d904c87e7726991a306f5ab3 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 4 Jan 2011 09:29:06 +0100 Subject: QMeeGoSwitchEvent exported and static. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 1009 Reviewed-by: Samuel Rødal --- tools/qmeegographicssystemhelper/qmeegoswitchevent.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h index 0ddbd3d..462182f 100644 --- a/tools/qmeegographicssystemhelper/qmeegoswitchevent.h +++ b/tools/qmeegographicssystemhelper/qmeegoswitchevent.h @@ -52,7 +52,7 @@ when going to software mode. */ -class QMeeGoSwitchEvent : public QEvent +class Q_DECL_EXPORT QMeeGoSwitchEvent : public QEvent { public: @@ -83,7 +83,7 @@ public: The type is registered on first access. Use this to detect incoming QMeeGoSwitchEvents. */ - QEvent::Type eventNumber(); + static QEvent::Type eventNumber(); private: QString name; -- cgit v0.12 From 3ad35ffdbfcbd2db5e8aac95fa0cc9f80e372128 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 4 Jan 2011 10:28:20 +0100 Subject: Pre-create the GL share widget before window surface creation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Not pixmap creation. Merge-request: 988 Reviewed-by: Samuel Rødal --- src/plugins/graphicssystems/meego/qmeegographicssystem.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp index 4a86082..b1a8f5f7 100644 --- a/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp +++ b/src/plugins/graphicssystems/meego/qmeegographicssystem.cpp @@ -75,6 +75,8 @@ QMeeGoGraphicsSystem::~QMeeGoGraphicsSystem() QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const { + QGLShareContextScope ctx(qt_gl_share_widget()->context()); + QMeeGoGraphicsSystem::surfaceWasCreated = true; QWindowSurface *surface = new QGLWindowSurface(widget); return surface; @@ -82,12 +84,6 @@ QWindowSurface* QMeeGoGraphicsSystem::createWindowSurface(QWidget *widget) const QPixmapData *QMeeGoGraphicsSystem::createPixmapData(QPixmapData::PixelType type) const { - // Long story short: without this it's possible to hit an - // uninitialized 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); } -- cgit v0.12 From b5acfc61f3989ab8b72f784431fc5ab168ffb975 Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 4 Jan 2011 10:53:57 +0100 Subject: Support for swap modes in QGLWindowSurface. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit AlwaysFull and AlwaysPartial implemented in ES only for now. By default do automatic. Merge-request: 993 Reviewed-by: Samuel Rødal --- src/opengl/qwindowsurface_gl.cpp | 13 ++++++++++++- src/opengl/qwindowsurface_gl_p.h | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index 7dc7dc7..b8716ce 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -284,6 +284,7 @@ struct QGLWindowSurfacePrivate }; QGLFormat QGLWindowSurface::surfaceFormat; +QGLWindowSurface::SwapMode QGLWindowSurface::swapBehavior = QGLWindowSurface::AutomaticSwap; void QGLWindowSurfaceGLPaintDevice::endPaint() { @@ -541,6 +542,9 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & const GLenum target = GL_TEXTURE_2D; Q_UNUSED(target); + if (QGLWindowSurface::swapBehavior == QGLWindowSurface::KillSwap) + return; + if (context()) { context()->makeCurrent(); @@ -588,7 +592,14 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & } } #endif - bool doingPartialUpdate = hasPartialUpdateSupport() && br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2; + bool doingPartialUpdate = false; + if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AutomaticSwap) + doingPartialUpdate = hasPartialUpdateSupport() && br.width() * br.height() < parent->geometry().width() * parent->geometry().height() * 0.2; + else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysFullSwap) + doingPartialUpdate = false; + else if (QGLWindowSurface::swapBehavior == QGLWindowSurface::AlwaysPartialSwap) + doingPartialUpdate = hasPartialUpdateSupport(); + QGLContext *ctx = reinterpret_cast(parent->d_func()->extraData()->glContext); if (widget != window()) { if (initializeOffscreenTexture(window()->size())) diff --git a/src/opengl/qwindowsurface_gl_p.h b/src/opengl/qwindowsurface_gl_p.h index 6906f35..9b0bee3 100644 --- a/src/opengl/qwindowsurface_gl_p.h +++ b/src/opengl/qwindowsurface_gl_p.h @@ -102,6 +102,9 @@ public: static QGLFormat surfaceFormat; + enum SwapMode { AutomaticSwap, AlwaysFullSwap, AlwaysPartialSwap, KillSwap }; + static SwapMode swapBehavior; + private slots: void deleted(QObject *object); -- cgit v0.12 From 177f2a2f17251c22f57944e9dd100ec8515b891a Mon Sep 17 00:00:00 2001 From: Michael Dominic K Date: Tue, 4 Jan 2011 10:53:58 +0100 Subject: QMeeGoGraphicsSystemHelper::setSwapBehavior implementation. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Merge-request: 993 Reviewed-by: Samuel Rødal --- .../qmeegographicssystemhelper.cpp | 15 +++++++++++++++ .../qmeegographicssystemhelper.h | 18 ++++++++++++++++++ .../qmeegographicssystemhelper.pro | 2 +- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp index b660eb3..37cc417 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.cpp @@ -45,6 +45,7 @@ #include #include #include +#include #include "qmeegoruntime.h" #include "qmeegoswitchevent.h" @@ -153,3 +154,17 @@ void QMeeGoGraphicsSystemHelper::setTranslucent(bool translucent) ENSURE_RUNNING_MEEGO; QMeeGoRuntime::setTranslucent(translucent); } + +void QMeeGoGraphicsSystemHelper::setSwapBehavior(SwapMode mode) +{ + ENSURE_RUNNING_MEEGO; + + if (mode == AutomaticSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AutomaticSwap; + else if (mode == AlwaysFullSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysFullSwap; + else if (mode == AlwaysPartialSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::AlwaysPartialSwap; + else if (mode == KillSwap) + QGLWindowSurface::swapBehavior = QGLWindowSurface::KillSwap; +} diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h index 6df3c22..c8dccc2 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.h @@ -186,6 +186,24 @@ public: on the top-level widget *before* you show it instead. */ static void setTranslucent(bool translucent); + + //! Used to specify the mode for swapping buffers in double-buffered GL rendering. + enum SwapMode { + AutomaticSwap, /**< Automatically choose netween full and partial updates (25% threshold) */ + AlwaysFullSwap, /**< Always do a full swap even if partial updates support present */ + AlwaysPartialSwap, /**< Always do a partial swap (if support present) no matter what threshold */ + KillSwap /**< Do not perform buffer swapping at all (no picture) */ + }; + + //! Sets the buffer swapping mode. + /*! + This can be only called when running with the meego graphics system. + The KillSwap mode can be specififed to effectively block painting. + + This functionality should be used only by applications counting on a specific behavior. + Most applications should use the default automatic behavior. + */ + static void setSwapBehavior(SwapMode mode); }; #endif diff --git a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro index 360847e..7639ad7 100644 --- a/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro +++ b/tools/qmeegographicssystemhelper/qmeegographicssystemhelper.pro @@ -3,7 +3,7 @@ TARGET = QtMeeGoGraphicsSystemHelper include(../../src/qbase.pri) -QT += gui +QT += gui opengl INCLUDEPATH += '../../src/plugins/graphicssystems/meego' HEADERS = qmeegographicssystemhelper.h qmeegooverlaywidget.h qmeegolivepixmap.h qmeegoruntime.h qmeegolivepixmap_p.h qmeegofencesync.h qmeegofencesync_p.h qmeegoswitchevent.h -- cgit v0.12 From 91e127444f1b217525263b26f44fb566b9067d75 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 4 Jan 2011 16:20:55 +0200 Subject: Generate freeze targets in Symbian Make it possible to freeze def files via makefile targets. Task-number: QTBUG-13769 Reviewed-by: Janne Koskinen --- qmake/generators/symbian/symmake_abld.cpp | 21 +++++++++++++++++++++ qmake/generators/symbian/symmake_sbsv2.cpp | 29 +++++++++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/qmake/generators/symbian/symmake_abld.cpp b/qmake/generators/symbian/symmake_abld.cpp index eb39d36..94cb22e 100644 --- a/qmake/generators/symbian/symmake_abld.cpp +++ b/qmake/generators/symbian/symmake_abld.cpp @@ -406,6 +406,27 @@ void SymbianAbldMakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, bool t << "\t$(ABLD)" << testClause << " reallyclean " << item << " urel" << endl; } t << endl; + + t << "freeze: $(ABLD)" << endl; + t << "\t$(ABLD)" << testClause << " freeze" << endl; + t << endl; + + // Abld toolchain doesn't differentiate between freezing release or debug + t << "freeze-debug: freeze" << endl << endl; + t << "freeze-release: freeze" << endl << endl; + + // For more specific builds, targets are in this form: freeze-build-platform, e.g. freeze-release-armv5, + // though note that debug and release targets of each platform are identical in symbian-abld. + foreach(QString item, debugPlatforms) { + t << "freeze-debug-" << item << ": $(ABLD)" << endl; + t << "\t$(ABLD)" << testClause << " freeze " << item << endl; + } + foreach(QString item, releasePlatforms) { + t << "freeze-release-" << item << ": $(ABLD)" << endl; + t << "\t$(ABLD)" << testClause << " freeze " << item << endl; + } + + t << endl; } void SymbianAbldMakefileGenerator::writeBldInfExtensionRulesPart(QTextStream& t, const QString &iconTargetFile) diff --git a/qmake/generators/symbian/symmake_sbsv2.cpp b/qmake/generators/symbian/symmake_sbsv2.cpp index c219f1d..c6dec6d 100644 --- a/qmake/generators/symbian/symmake_sbsv2.cpp +++ b/qmake/generators/symbian/symmake_sbsv2.cpp @@ -391,6 +391,14 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << clause; } t << endl; + + t << "freeze-debug: " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze"; + foreach(QString clause, debugClauses) { + t << clause; + } + t << endl; + t << "release: " << locFileDep << BLD_INF_FILENAME << endl; t << "\t$(SBS)"; foreach(QString clause, releaseClauses) { @@ -402,6 +410,13 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo foreach(QString clause, releaseClauses) { t << clause; } + t << endl; + + t << "freeze-release: " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze"; + foreach(QString clause, releaseClauses) { + t << clause; + } t << endl << endl; QString defaultGcceArmVersion; @@ -427,6 +442,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "\t$(SBS)" << clause << endl; t << "clean-debug-" << item << ": " << BLD_INF_FILENAME << endl; t << "\t$(SBS) reallyclean" << clause << endl; + t << "freeze-debug-" << item << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze" << clause << endl; } foreach(QString item, releasePlatforms) { @@ -440,6 +457,8 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "\t$(SBS)" << clause << endl; t << "clean-release-" << item << ": " << BLD_INF_FILENAME << endl; t << "\t$(SBS) reallyclean" << clause << endl; + t << "freeze-release-" << item << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze" << clause << endl; } foreach(QString item, armPlatforms) { @@ -450,10 +469,14 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << "\t$(SBS)" << debugClause << endl; t << "clean-debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; t << "\t$(SBS) reallyclean" << debugClause << endl; + t << "freeze-debug-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze" << debugClause << endl; t << "release-" << item << "-" << compilerVersion << ": " << locFileDep << BLD_INF_FILENAME << endl; t << "\t$(SBS)" << releaseClause << endl; t << "clean-release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; t << "\t$(SBS) reallyclean" << releaseClause << endl; + t << "freeze-release-" << item << "-" << compilerVersion << ": " << BLD_INF_FILENAME << endl; + t << "\t$(SBS) freeze" << releaseClause << endl; } } @@ -471,6 +494,12 @@ void SymbianSbsv2MakefileGenerator::writeWrapperMakefile(QFile& wrapperFile, boo t << clause; } t << endl << endl; + + // Typically one wants to freeze release binaries, so make plain freeze target equal to + // freeze-release. If freezing of debug binaries is needed for some reason, then + // freeze-debug target should be used. There is no point to try freezing both with one + // target as both produce the same def file. + t << "freeze: freeze-release" << endl << endl; } // Add all extra targets including extra compiler targets also to wrapper makefile, -- cgit v0.12 From c981098ea0353aead43c93ac81835451515b63d0 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 4 Jan 2011 17:16:03 +0200 Subject: Fix def file names for libinfixed testlib Reviewed-by: Janne Koskinen --- mkspecs/features/symbian/def_files.prf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mkspecs/features/symbian/def_files.prf b/mkspecs/features/symbian/def_files.prf index f243878..4a59116 100644 --- a/mkspecs/features/symbian/def_files.prf +++ b/mkspecs/features/symbian/def_files.prf @@ -4,7 +4,7 @@ CONFIG -= def_files_disabled # We need a target name without the INFIX'ed part, since DEF files are not infixed. -equals(QMAKE_TARGET_PRODUCT, Qt4):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") +equals(QMAKE_TARGET_PRODUCT, Qt4)|equals(QMAKE_TARGET_PRODUCT, QTestLib):clean_TARGET = $$replace(TARGET, "$${QT_LIBINFIX}$", "") else:clean_TARGET = $$TARGET symbian-abld|symbian-sbsv2 { -- cgit v0.12 From 7a979f8dab64c33a7088b70ca5bff69b881ee55d Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 5 Jan 2011 10:40:47 +1000 Subject: Add clarifications to QML SQL docs. Reviewed-by: Bea Lam --- doc/src/declarative/globalobject.qdoc | 7 ++++--- src/declarative/qml/qdeclarativesqldatabase.cpp | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/doc/src/declarative/globalobject.qdoc b/doc/src/declarative/globalobject.qdoc index ffc84f9..ef8de5e 100644 --- a/doc/src/declarative/globalobject.qdoc +++ b/doc/src/declarative/globalobject.qdoc @@ -141,8 +141,9 @@ using the Offline Storage API. \section3 db = openDatabaseSync(identifier, version, description, estimated_size, callback(db)) Returns the database identified by \e identifier. If the database does not already exist, it -is created with the properties \e description and \e estimated_size and the function \e callback -is called with the database as a parameter. +is created, and the function \e callback is called with the database as a parameter. \e description +and \e estimated_size are written to the INI file (described below), but are otherwise currently +unused. May throw exception with code property SQLException.DATABASE_ERR, or SQLException.VERSION_ERR. @@ -153,7 +154,7 @@ When a database is first created, an INI file is also created specifying its cha \row \o Name \o The name of the database passed to \c openDatabase() \row \o Version \o The version of the database passed to \c openDatabase() \row \o Description \o The description of the database passed to \c openDatabase() -\row \o EstimatedSize \o The estimated size of the database passed to \c openDatabase() +\row \o EstimatedSize \o The estimated size (in bytes) of the database passed to \c openDatabase() \row \o Driver \o Currently "QSQLITE" \endtable diff --git a/src/declarative/qml/qdeclarativesqldatabase.cpp b/src/declarative/qml/qdeclarativesqldatabase.cpp index bda02a5..a774c02 100644 --- a/src/declarative/qml/qdeclarativesqldatabase.cpp +++ b/src/declarative/qml/qdeclarativesqldatabase.cpp @@ -351,7 +351,7 @@ static QScriptValue qmlsqldatabase_read_transaction(QScriptContext *context, QSc } /* - Currently documented in doc/src/declarastive/globalobject.qdoc + Currently documented in doc/src/declarative/globalobject.qdoc */ static QScriptValue qmlsqldatabase_open_sync(QScriptContext *context, QScriptEngine *engine) { -- cgit v0.12 From 3f80a24c5d375dd173d18c2a4227301f1afba2e3 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 6 Dec 2010 14:23:47 +1000 Subject: Allow a revision to be associated with properties and methods. Allows a revision to be associated with properties via: Q_PROPERTY(int prop READ prop1 REVISION 1) Allows a revision to be associated with methods via either: public slots Q_REVISION(1): void method1(); or: public slots: Q_REVISION void method1(); Private revision() methods are added to QMetaProperty and QMetaMethod to access the revision info. This is private API for use by QML for now. Task-number: QTBUG-13451 Reviewed-by: Kent Hansen --- src/corelib/kernel/qmetaobject.cpp | 48 +++++++++++++ src/corelib/kernel/qmetaobject.h | 3 + src/corelib/kernel/qmetaobject_p.h | 6 +- src/corelib/kernel/qobjectdefs.h | 2 + src/tools/moc/generator.cpp | 36 +++++++++- src/tools/moc/generator.h | 1 + src/tools/moc/keywords.cpp | 20 ++++-- src/tools/moc/moc.cpp | 82 ++++++++++++++++++++-- src/tools/moc/moc.h | 13 +++- src/tools/moc/token.cpp | 1 + src/tools/moc/token.h | 1 + src/tools/moc/util/generate_keywords.cpp | 1 + tests/auto/moc/tst_moc.cpp | 113 +++++++++++++++++++++++++++++++ 13 files changed, 311 insertions(+), 16 deletions(-) diff --git a/src/corelib/kernel/qmetaobject.cpp b/src/corelib/kernel/qmetaobject.cpp index 9854e68..dd5f231 100644 --- a/src/corelib/kernel/qmetaobject.cpp +++ b/src/corelib/kernel/qmetaobject.cpp @@ -1369,6 +1369,25 @@ int QMetaMethod::methodIndex() const } /*! + \internal + + Returns the method revision if one was + specified by Q_REVISION, otherwise returns 0. + */ +int QMetaMethod::revision() const +{ + if (!mobj) + return 0; + if ((QMetaMethod::Access)(mobj->d.data[handle + 4] & MethodRevisioned)) { + int offset = priv(mobj->d.data)->methodData + + priv(mobj->d.data)->methodCount * 5 + + (handle - priv(mobj->d.data)->methodData) / 5; + return mobj->d.data[offset]; + } + return 0; +} + +/*! Returns the access specification of this method (private, protected, or public). @@ -2389,6 +2408,35 @@ int QMetaProperty::notifySignalIndex() const } /*! + \internal + + Returns the property revision if one was + specified by REVISION, otherwise returns 0. + */ +int QMetaProperty::revision() const +{ + if (!mobj) + return 0; + int flags = mobj->d.data[handle + 2]; + if (flags & Revisioned) { + int offset = priv(mobj->d.data)->propertyData + + priv(mobj->d.data)->propertyCount * 3 + idx; + // Revision data is placed after NOTIFY data, if present. + // Iterate through properties to discover whether we have NOTIFY signals. + for (int i = 0; i < priv(mobj->d.data)->propertyCount; ++i) { + int handle = priv(mobj->d.data)->propertyData + 3*i; + if (mobj->d.data[handle + 2] & Notify) { + offset += priv(mobj->d.data)->propertyCount; + break; + } + } + return mobj->d.data[offset]; + } else { + return 0; + } +} + +/*! Returns true if this property is writable; otherwise returns false. diff --git a/src/corelib/kernel/qmetaobject.h b/src/corelib/kernel/qmetaobject.h index b700351..1ab08ee 100644 --- a/src/corelib/kernel/qmetaobject.h +++ b/src/corelib/kernel/qmetaobject.h @@ -70,6 +70,7 @@ public: enum Attributes { Compatibility = 0x1, Cloned = 0x2, Scriptable = 0x4 }; int attributes() const; int methodIndex() const; + int revision() const; inline const QMetaObject *enclosingMetaObject() const { return mobj; } @@ -200,6 +201,8 @@ public: QMetaMethod notifySignal() const; int notifySignalIndex() const; + int revision() const; + QVariant read(const QObject *obj) const; bool write(QObject *obj, const QVariant &value) const; bool reset(QObject *obj) const; diff --git a/src/corelib/kernel/qmetaobject_p.h b/src/corelib/kernel/qmetaobject_p.h index 4a03874..7b103e2 100644 --- a/src/corelib/kernel/qmetaobject_p.h +++ b/src/corelib/kernel/qmetaobject_p.h @@ -78,7 +78,8 @@ enum PropertyFlags { ResolveEditable = 0x00080000, User = 0x00100000, ResolveUser = 0x00200000, - Notify = 0x00400000 + Notify = 0x00400000, + Revisioned = 0x00800000 }; enum MethodFlags { @@ -95,7 +96,8 @@ enum MethodFlags { MethodCompatibility = 0x10, MethodCloned = 0x20, - MethodScriptable = 0x40 + MethodScriptable = 0x40, + MethodRevisioned = 0x80 }; enum MetaObjectFlags { diff --git a/src/corelib/kernel/qobjectdefs.h b/src/corelib/kernel/qobjectdefs.h index 555a1f5..d1a8f06 100644 --- a/src/corelib/kernel/qobjectdefs.h +++ b/src/corelib/kernel/qobjectdefs.h @@ -79,6 +79,7 @@ class QString; #define Q_INTERFACES(x) #define Q_PROPERTY(text) #define Q_PRIVATE_PROPERTY(d, text) +#define Q_REVISION(v) #define Q_OVERRIDE(text) #define Q_ENUMS(x) #define Q_FLAGS(x) @@ -180,6 +181,7 @@ private: #define Q_INTERFACES(x) Q_INTERFACES(x) #define Q_PROPERTY(text) Q_PROPERTY(text) #define Q_PRIVATE_PROPERTY(d, text) Q_PRIVATE_PROPERTY(d, text) +#define Q_REVISION(v) Q_REVISION(v) #define Q_OVERRIDE(text) Q_OVERRIDE(text) #define Q_ENUMS(x) Q_ENUMS(x) #define Q_FLAGS(x) Q_FLAGS(x) diff --git a/src/tools/moc/generator.cpp b/src/tools/moc/generator.cpp index c3bbba1..ea5b474 100644 --- a/src/tools/moc/generator.cpp +++ b/src/tools/moc/generator.cpp @@ -181,10 +181,14 @@ void Generator::generateCode() int methodCount = cdef->signalList.count() + cdef->slotList.count() + cdef->methodList.count(); fprintf(out, " %4d, %4d, // methods\n", methodCount, methodCount ? index : 0); index += methodCount * 5; + if (cdef->revisionedMethods) + index += methodCount; fprintf(out, " %4d, %4d, // properties\n", cdef->propertyList.count(), cdef->propertyList.count() ? index : 0); index += cdef->propertyList.count() * 3; if(cdef->notifyableProperties) index += cdef->propertyList.count(); + if (cdef->revisionedProperties) + index += cdef->propertyList.count(); fprintf(out, " %4d, %4d, // enums/sets\n", cdef->enumList.count(), cdef->enumList.count() ? index : 0); int enumsIndex = index; @@ -217,6 +221,14 @@ void Generator::generateCode() // generateFunctions(cdef->methodList, "method", MethodMethod); +// +// Build method version arrays +// + if (cdef->revisionedMethods) { + generateFunctionRevisions(cdef->signalList, "signal"); + generateFunctionRevisions(cdef->slotList, "slot"); + generateFunctionRevisions(cdef->methodList, "method"); + } // // Build property array @@ -456,7 +468,7 @@ void Generator::generateFunctions(QList& list, const char *functype } sig += ')'; - char flags = type; + unsigned char flags = type; if (f.access == FunctionDef::Private) flags |= AccessPrivate; else if (f.access == FunctionDef::Public) @@ -475,11 +487,23 @@ void Generator::generateFunctions(QList& list, const char *functype flags |= MethodCloned; if (f.isScriptable) flags |= MethodScriptable; + if (f.revision > 0) + flags |= MethodRevisioned; fprintf(out, " %4d, %4d, %4d, %4d, 0x%02x,\n", strreg(sig), strreg(arguments), strreg(f.normalizedType), strreg(f.tag), flags); } } +void Generator::generateFunctionRevisions(QList& list, const char *functype) +{ + if (list.count()) + fprintf(out, "\n // %ss: revision\n", functype); + for (int i = 0; i < list.count(); ++i) { + const FunctionDef &f = list.at(i); + fprintf(out, " %4d,\n", f.revision); + } +} + void Generator::generateProperties() { // @@ -537,6 +561,9 @@ void Generator::generateProperties() if (p.notifyId != -1) flags |= Notify; + if (p.revision > 0) + flags |= Revisioned; + if (p.constant) flags |= Constant; if (p.final) @@ -562,6 +589,13 @@ void Generator::generateProperties() p.notifyId); } } + if (cdef->revisionedProperties) { + fprintf(out, "\n // properties: revision\n"); + for (int i = 0; i < cdef->propertyList.count(); ++i) { + const PropertyDef &p = cdef->propertyList.at(i); + fprintf(out, " %4d,\n", p.revision); + } + } } void Generator::generateEnums(int index) diff --git a/src/tools/moc/generator.h b/src/tools/moc/generator.h index fb6ad747..72b2b17 100644 --- a/src/tools/moc/generator.h +++ b/src/tools/moc/generator.h @@ -58,6 +58,7 @@ public: private: void generateClassInfos(); void generateFunctions(QList &list, const char *functype, int type); + void generateFunctionRevisions(QList& list, const char *functype); void generateEnums(int index); void generateProperties(); void generateMetacall(); diff --git a/src/tools/moc/keywords.cpp b/src/tools/moc/keywords.cpp index df1ba0d..7b84fd7 100644 --- a/src/tools/moc/keywords.cpp +++ b/src/tools/moc/keywords.cpp @@ -43,12 +43,12 @@ // DO NOT EDIT. static const short keyword_trans[][128] = { - {0,0,0,0,0,0,0,0,0,533,530,0,0,0,0,0, + {0,0,0,0,0,0,0,0,0,541,538,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 533,252,531,534,0,38,239,532,25,26,236,234,30,235,27,237, + 541,252,539,542,0,38,239,540,25,26,236,234,30,235,27,237, 22,22,22,22,22,22,22,22,22,22,34,41,23,39,24,43, 0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,8, - 8,21,8,8,8,8,8,8,8,8,8,31,535,32,238,8, + 8,21,8,8,8,8,8,8,8,8,8,31,543,32,238,8, 0,1,2,3,4,5,6,7,8,9,8,8,10,11,12,13, 14,8,15,16,17,18,19,20,8,8,8,36,245,37,248,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -190,7 +190,7 @@ static const short keyword_trans[][128] = { {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,42,0,0,0,28,0, - 538,538,538,538,538,538,538,538,538,538,0,0,0,0,0,0, + 546,546,546,546,546,546,546,546,546,546,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -349,7 +349,7 @@ static const short keyword_trans[][128] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, - 0,0,0,0,0,0,0,0,0,0,537,0,0,0,0,536, + 0,0,0,0,0,0,0,0,0,0,545,0,0,0,0,544, 0,0,0,0,0,0,0,0,0,0,0,0,0,258,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -392,7 +392,7 @@ static const short keyword_trans[][128] = { 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,439,388,378,383,364,0,448,0,0,0,0,0,358, - 370,0,0,436,0,0,0,0,0,0,0,0,0,0,0,0, + 370,0,530,436,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, @@ -983,6 +983,14 @@ static const struct {CHARACTER, 0, 84, 528, CHARACTER}, {CHARACTER, 0, 89, 529, CHARACTER}, {Q_PRIVATE_PROPERTY_TOKEN, 0, 0, 0, CHARACTER}, + {CHARACTER, 0, 69, 531, CHARACTER}, + {CHARACTER, 0, 86, 532, CHARACTER}, + {CHARACTER, 0, 73, 533, CHARACTER}, + {CHARACTER, 0, 83, 534, CHARACTER}, + {CHARACTER, 0, 73, 535, CHARACTER}, + {CHARACTER, 0, 79, 536, CHARACTER}, + {CHARACTER, 0, 78, 537, CHARACTER}, + {Q_REVISION_TOKEN, 0, 0, 0, CHARACTER}, {NEWLINE, 0, 0, 0, NOTOKEN}, {QUOTE, 0, 0, 0, NOTOKEN}, {SINGLEQUOTE, 0, 0, 0, NOTOKEN}, diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index 2c24165..b8b823c 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -335,6 +335,23 @@ bool Moc::testFunctionAttribute(Token tok, FunctionDef *def) return false; } +bool Moc::testFunctionRevision(FunctionDef *def) +{ + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + def->revision = revision.toInt(&ok); + if (!ok || def->revision < 0) + error("Invalid revision"); + return true; + } + + return false; +} + // returns false if the function should be ignored bool Moc::parseFunction(FunctionDef *def, bool inMacro) { @@ -342,7 +359,7 @@ bool Moc::parseFunction(FunctionDef *def, bool inMacro) //skip modifiers and attributes while (test(INLINE) || test(STATIC) || (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual - || testFunctionAttribute(def)) {} + || testFunctionAttribute(def) || testFunctionRevision(def)) {} bool templateFunction = (lookup() == TEMPLATE); def->type = parseType(); if (def->type.name.isEmpty()) { @@ -433,7 +450,7 @@ bool Moc::parseMaybeFunction(const ClassDef *cdef, FunctionDef *def) //skip modifiers and attributes while (test(EXPLICIT) || test(INLINE) || test(STATIC) || (test(VIRTUAL) && (def->isVirtual = true)) //mark as virtual - || testFunctionAttribute(def)) {} + || testFunctionAttribute(def) || testFunctionRevision(def)) {} bool tilde = test(TILDE); def->type = parseType(); if (def->type.name.isEmpty()) @@ -694,6 +711,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.slotList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } else if (funcDef.isSignal) { def.signalList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { @@ -701,6 +720,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.signalList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } else if (funcDef.isInvokable) { def.methodList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { @@ -708,6 +729,8 @@ void Moc::parse() funcDef.arguments.removeLast(); def.methodList += funcDef; } + if (funcDef.revision > 0) + ++def.revisionedMethods; } } } else { @@ -806,6 +829,18 @@ QList Moc::generate(bool ignoreProperties) void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) { + int defaultRevision = -1; + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + defaultRevision = revision.toInt(&ok); + if (!ok || defaultRevision < 0) + error("Invalid revision"); + } + next(COLON); while (inClass(def) && hasNext()) { switch (next()) { @@ -831,6 +866,12 @@ void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) funcDef.access = access; if (!parseFunction(&funcDef)) continue; + if (funcDef.revision > 0) { + ++def->revisionedMethods; + } else if (defaultRevision != -1) { + funcDef.revision = defaultRevision; + ++def->revisionedMethods; + } def->slotList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { funcDef.wasCloned = true; @@ -842,6 +883,18 @@ void Moc::parseSlots(ClassDef *def, FunctionDef::Access access) void Moc::parseSignals(ClassDef *def) { + int defaultRevision = -1; + if (test(Q_REVISION_TOKEN)) { + next(LPAREN); + QByteArray revision = lexemUntil(RPAREN); + revision.remove(0, 1); + revision.chop(1); + bool ok = false; + defaultRevision = revision.toInt(&ok); + if (!ok || defaultRevision < 0) + error("Invalid revision"); + } + next(COLON); while (inClass(def) && hasNext()) { switch (next()) { @@ -869,6 +922,12 @@ void Moc::parseSignals(ClassDef *def) warning("Signals cannot be declared virtual"); if (funcDef.inlineCode) error("Not a signal declaration"); + if (funcDef.revision > 0) { + ++def->revisionedMethods; + } else if (defaultRevision != -1) { + funcDef.revision = defaultRevision; + ++def->revisionedMethods; + } def->signalList += funcDef; while (funcDef.arguments.size() > 0 && funcDef.arguments.last().isDefault) { funcDef.wasCloned = true; @@ -911,7 +970,6 @@ void Moc::createPropertyDef(PropertyDef &propDef) propDef.name = lexem(); while (test(IDENTIFIER)) { QByteArray l = lexem(); - if (l[0] == 'C' && l == "CONSTANT") { propDef.constant = true; continue; @@ -923,6 +981,10 @@ void Moc::createPropertyDef(PropertyDef &propDef) QByteArray v, v2; if (test(LPAREN)) { v = lexemUntil(RPAREN); + } else if (test(INTEGER_LITERAL)) { + v = lexem(); + if (l != "REVISION") + error(1); } else { next(IDENTIFIER); v = lexem(); @@ -937,7 +999,12 @@ void Moc::createPropertyDef(PropertyDef &propDef) propDef.read = v; else if (l == "RESET") propDef.reset = v + v2; - else + else if (l == "REVISION") { + bool ok = false; + propDef.revision = v.toInt(&ok); + if (!ok || propDef.revision < 0) + error(1); + } else error(2); break; case 'S': @@ -1002,6 +1069,8 @@ void Moc::parseProperty(ClassDef *def) if(!propDef.notify.isEmpty()) def->notifyableProperties++; + if (propDef.revision > 0) + ++def->revisionedProperties; def->propertyList += propDef; } @@ -1028,6 +1097,8 @@ void Moc::parsePrivateProperty(ClassDef *def) if(!propDef.notify.isEmpty()) def->notifyableProperties++; + if (propDef.revision > 0) + ++def->revisionedProperties; def->propertyList += propDef; } @@ -1177,6 +1248,9 @@ void Moc::parseSlotInPrivate(ClassDef *def, FunctionDef::Access access) funcDef.arguments.removeLast(); def->slotList += funcDef; } + if (funcDef.revision > 0) + ++def->revisionedMethods; + } QByteArray Moc::lexemUntil(Token target) diff --git a/src/tools/moc/moc.h b/src/tools/moc/moc.h index 5e47d9a..c07ec0b 100644 --- a/src/tools/moc/moc.h +++ b/src/tools/moc/moc.h @@ -86,7 +86,7 @@ struct FunctionDef FunctionDef(): returnTypeIsVolatile(false), access(Private), isConst(false), isVirtual(false), inlineCode(false), wasCloned(false), isCompat(false), isInvokable(false), isScriptable(false), isSlot(false), isSignal(false), - isConstructor(false), isDestructor(false), isAbstract(false) {} + isConstructor(false), isDestructor(false), isAbstract(false), revision(0) {} Type type; QByteArray normalizedType; QByteArray tag; @@ -111,11 +111,13 @@ struct FunctionDef bool isConstructor; bool isDestructor; bool isAbstract; + + int revision; }; struct PropertyDef { - PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec){} + PropertyDef():notifyId(-1), constant(false), final(false), gspec(ValueSpec), revision(0){} QByteArray name, type, read, write, reset, designable, scriptable, editable, stored, user, notify, inPrivateClass; int notifyId; bool constant; @@ -128,6 +130,7 @@ struct PropertyDef s += name.mid(1); return (s == write); } + int revision; }; @@ -139,7 +142,8 @@ struct ClassInfoDef struct ClassDef { ClassDef(): - hasQObject(false), hasQGadget(false), notifyableProperties(0), begin(0), end(0){} + hasQObject(false), hasQGadget(false), notifyableProperties(0) + , revisionedMethods(0), revisionedProperties(0), begin(0), end(0){} QByteArray classname; QByteArray qualified; QList > superclassList; @@ -164,6 +168,8 @@ struct ClassDef { QMap enumDeclarations; QList enumList; QMap flagAliases; + int revisionedMethods; + int revisionedProperties; int begin; int end; @@ -236,6 +242,7 @@ public: // in FunctionDef accordingly bool testFunctionAttribute(FunctionDef *def); bool testFunctionAttribute(Token tok, FunctionDef *def); + bool testFunctionRevision(FunctionDef *def); void checkSuperClasses(ClassDef *def); void checkProperties(ClassDef* cdef); diff --git a/src/tools/moc/token.cpp b/src/tools/moc/token.cpp index 3da9446..27d5146 100644 --- a/src/tools/moc/token.cpp +++ b/src/tools/moc/token.cpp @@ -180,6 +180,7 @@ const char *tokenTypeName(Token t) case Q_SLOT_TOKEN: return "Q_SLOT_TOKEN"; case Q_PRIVATE_SLOT_TOKEN: return "Q_PRIVATE_SLOT_TOKEN"; case Q_PRIVATE_PROPERTY_TOKEN: return "Q_PRIVATE_PROPERTY_TOKEN"; + case Q_REVISION_TOKEN: return "Q_REVISION_TOKEN"; case SPECIAL_TREATMENT_MARK: return "SPECIAL_TREATMENT_MARK"; case MOC_INCLUDE_BEGIN: return "MOC_INCLUDE_BEGIN"; case MOC_INCLUDE_END: return "MOC_INCLUDE_END"; diff --git a/src/tools/moc/token.h b/src/tools/moc/token.h index 6ca3d84..8b72eb6 100644 --- a/src/tools/moc/token.h +++ b/src/tools/moc/token.h @@ -186,6 +186,7 @@ enum Token { Q_INVOKABLE_TOKEN, Q_SCRIPTABLE_TOKEN, Q_PRIVATE_PROPERTY_TOKEN, + Q_REVISION_TOKEN, Q_META_TOKEN_END, SPECIAL_TREATMENT_MARK = Q_META_TOKEN_END, MOC_INCLUDE_BEGIN, diff --git a/src/tools/moc/util/generate_keywords.cpp b/src/tools/moc/util/generate_keywords.cpp index 88f187d..e9463e1 100644 --- a/src/tools/moc/util/generate_keywords.cpp +++ b/src/tools/moc/util/generate_keywords.cpp @@ -249,6 +249,7 @@ static const Keyword keywords[] = { { "Q_SLOT", "Q_SLOT_TOKEN" }, { "Q_SCRIPTABLE", "Q_SCRIPTABLE_TOKEN" }, { "Q_PRIVATE_PROPERTY", "Q_PRIVATE_PROPERTY_TOKEN" }, + { "Q_REVISION", "Q_REVISION_TOKEN" }, { "\n", "NEWLINE" }, { "\"", "QUOTE" }, { "\'", "SINGLEQUOTE" }, diff --git a/tests/auto/moc/tst_moc.cpp b/tests/auto/moc/tst_moc.cpp index bb23f49..a634349 100644 --- a/tests/auto/moc/tst_moc.cpp +++ b/tests/auto/moc/tst_moc.cpp @@ -493,6 +493,7 @@ private slots: void QTBUG5590_dummyProperty(); void QTBUG12260_defaultTemplate(); void notifyError(); + void revisions(); signals: void sigWithUnsignedArg(unsigned foo); void sigWithSignedArg(signed foo); @@ -507,6 +508,7 @@ private: bool user2() { return false; }; bool user3() { return false; }; bool userFunction(){ return false; }; + template void revisions_T(); private: QString qtIncludePath; @@ -1384,6 +1386,117 @@ void tst_Moc::notifyError() #endif } +// If changed, update VersionTestNotify below +class VersionTest : public QObject +{ + Q_OBJECT + Q_PROPERTY(int prop1 READ foo) + Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_ENUMS(TestEnum); + +public: + int foo() const { return 0; } + + Q_INVOKABLE void method1() {} + Q_INVOKABLE Q_REVISION(4) void method2() {} + + enum TestEnum { One, Two }; + +public slots: + void slot1() {} + Q_REVISION(3) void slot2() {} + +signals: + void signal1(); + Q_REVISION(5) void signal2(); + +public slots Q_REVISION(6): + void slot3() {} + void slot4() {} + +signals Q_REVISION(7): + void signal3(); + void signal4(); +}; + +// If changed, update VersionTest above +class VersionTestNotify : public QObject +{ + Q_OBJECT + Q_PROPERTY(int prop1 READ foo NOTIFY fooChanged) + Q_PROPERTY(int prop2 READ foo REVISION 2) + Q_ENUMS(TestEnum); + +public: + int foo() const { return 0; } + + Q_INVOKABLE void method1() {} + Q_INVOKABLE Q_REVISION(4) void method2() {} + + enum TestEnum { One, Two }; + +public slots: + void slot1() {} + Q_REVISION(3) void slot2() {} + +signals: + void fooChanged(); + void signal1(); + Q_REVISION(5) void signal2(); + +public slots Q_REVISION(6): + void slot3() {} + void slot4() {} + +signals Q_REVISION(7): + void signal3(); + void signal4(); +}; + +template +void tst_Moc::revisions_T() +{ + int idx = T::staticMetaObject.indexOfProperty("prop1"); + QVERIFY(T::staticMetaObject.property(idx).revision() == 0); + idx = T::staticMetaObject.indexOfProperty("prop2"); + QVERIFY(T::staticMetaObject.property(idx).revision() == 2); + + idx = T::staticMetaObject.indexOfMethod("method1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfMethod("method2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 4); + + idx = T::staticMetaObject.indexOfSlot("slot1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfSlot("slot2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 3); + + idx = T::staticMetaObject.indexOfSlot("slot3()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 6); + idx = T::staticMetaObject.indexOfSlot("slot4()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 6); + + idx = T::staticMetaObject.indexOfSignal("signal1()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 0); + idx = T::staticMetaObject.indexOfSignal("signal2()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 5); + + idx = T::staticMetaObject.indexOfSignal("signal3()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 7); + idx = T::staticMetaObject.indexOfSignal("signal4()"); + QVERIFY(T::staticMetaObject.method(idx).revision() == 7); + + idx = T::staticMetaObject.indexOfEnumerator("TestEnum"); + QCOMPARE(T::staticMetaObject.enumerator(idx).keyCount(), 2); + QCOMPARE(T::staticMetaObject.enumerator(idx).key(0), "One"); +} + +// test using both class that has properties with and without NOTIFY signals +void tst_Moc::revisions() +{ + revisions_T(); + revisions_T(); +} QTEST_APPLESS_MAIN(tst_Moc) #include "tst_moc.moc" -- cgit v0.12 From ffd499eb6ff64df1833625f64dbbf92e0e0746d4 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 Jan 2011 13:57:17 +1000 Subject: Support property/method versions in QML Use metaobject revisioning to exclude properties/revisions added in later versions from interfering with earlier versions. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 77 +++++++++- .../qml/qdeclarativecompiledbindings.cpp | 4 + src/declarative/qml/qdeclarativecompiler.cpp | 17 ++- src/declarative/qml/qdeclarativedata_p.h | 5 +- src/declarative/qml/qdeclarativeinstruction_p.h | 1 + src/declarative/qml/qdeclarativemetatype.cpp | 83 ++++++++++- src/declarative/qml/qdeclarativemetatype_p.h | 5 + .../qml/qdeclarativeobjectscriptclass.cpp | 14 ++ src/declarative/qml/qdeclarativeprivate.h | 1 + src/declarative/qml/qdeclarativepropertycache.cpp | 3 +- src/declarative/qml/qdeclarativepropertycache_p.h | 4 +- src/declarative/qml/qdeclarativescriptparser.cpp | 1 - src/declarative/qml/qdeclarativevaluetype.cpp | 1 + src/declarative/qml/qdeclarativevme.cpp | 4 + src/declarative/qml/qmetaobjectbuilder.cpp | 33 +---- src/declarative/qml/qmetaobjectbuilder_p.h | 2 - .../util/qdeclarativeopenmetaobject.cpp | 1 - .../data/metaobjectRevision.qml | 7 + .../data/metaobjectRevision2.qml | 9 ++ .../data/metaobjectRevision3.qml | 8 + .../data/metaobjectRevisionErrors.qml | 14 ++ .../data/metaobjectRevisionErrors2.qml | 24 +++ .../data/metaobjectRevisionErrors3.qml | 36 +++++ .../qdeclarativeecmascript/testtypes.cpp | 9 ++ .../declarative/qdeclarativeecmascript/testtypes.h | 161 ++++++++++++++++++++ .../tst_qdeclarativeecmascript.cpp | 82 +++++++++++ .../data/metaobjectRevision.1.errors.txt | 1 + .../data/metaobjectRevision.1.qml | 8 + .../data/metaobjectRevision.2.errors.txt | 1 + .../data/metaobjectRevision.2.qml | 7 + .../data/metaobjectRevision.3.errors.txt | 1 + .../data/metaobjectRevision.3.qml | 10 ++ .../qdeclarativelanguage/data/revisions10.qml | 8 + .../qdeclarativelanguage/data/revisions11.qml | 10 ++ .../data/revisionsbasesub11.qml | 16 ++ .../qdeclarativelanguage/data/revisionssub10.qml | 10 ++ .../qdeclarativelanguage/data/revisionssub11.qml | 12 ++ .../declarative/qdeclarativelanguage/testtypes.cpp | 9 ++ .../declarative/qdeclarativelanguage/testtypes.h | 163 +++++++++++++++++++++ .../tst_qdeclarativelanguage.cpp | 62 ++++++++ .../qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp | 12 +- 41 files changed, 883 insertions(+), 53 deletions(-) create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml create mode 100644 tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index f0c62f4..8a6d068 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -113,6 +113,7 @@ int qmlRegisterType() 0, 0, + 0, 0 }; @@ -148,6 +149,7 @@ int qmlRegisterUncreatableType(const char *uri, int versionMajor, int versionMin 0, 0, + 0, 0 }; @@ -181,12 +183,82 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c 0, 0, + 0, 0 }; return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); } +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QDeclarativeListProperty<" + name + ">"); + + QDeclarativePrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QDeclarativePrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, qmlName, &T::staticMetaObject, + + QDeclarativePrivate::attachedPropertiesFunc(), + QDeclarativePrivate::attachedPropertiesMetaObject(), + + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); +} + +template +int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) +{ + QByteArray name(T::staticMetaObject.className()); + + QByteArray pointerName(name + '*'); + QByteArray listName("QDeclarativeListProperty<" + name + ">"); + + QDeclarativePrivate::RegisterType type = { + 1, + + qRegisterMetaType(pointerName.constData()), + qRegisterMetaType >(listName.constData()), + sizeof(T), QDeclarativePrivate::createInto, + QString(), + + uri, versionMajor, versionMinor, 0, &T::staticMetaObject, + + QDeclarativePrivate::attachedPropertiesFunc(), + QDeclarativePrivate::attachedPropertiesMetaObject(), + + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + QDeclarativePrivate::StaticCastSelector::cast(), + + 0, 0, + + 0, + metaObjectRevision + }; + + return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); +} + + template int qmlRegisterExtendedType() { @@ -214,6 +286,7 @@ int qmlRegisterExtendedType() QDeclarativePrivate::createParent, &E::staticMetaObject, + 0, 0 }; @@ -255,6 +328,7 @@ int qmlRegisterExtendedType(const char *uri, int versionMajor, int versionMinor, QDeclarativePrivate::createParent, &E::staticMetaObject, + 0, 0 }; @@ -309,7 +383,8 @@ int qmlRegisterCustomType(const char *uri, int versionMajor, int versionMinor, 0, 0, - parser + parser, + 0 }; return QDeclarativePrivate::qmlregister(QDeclarativePrivate::TypeRegistration, &type); diff --git a/src/declarative/qml/qdeclarativecompiledbindings.cpp b/src/declarative/qml/qdeclarativecompiledbindings.cpp index 48f8b84..619016b 100644 --- a/src/declarative/qml/qdeclarativecompiledbindings.cpp +++ b/src/declarative/qml/qdeclarativecompiledbindings.cpp @@ -2527,6 +2527,10 @@ bool QDeclarativeBindingCompilerPrivate::fetch(Result &rv, const QMetaObject *mo rv.metaObject = 0; rv.type = 0; + //XXX binding optimizer doesn't handle properties with a revision + if (prop.revision() > 0) + return false; + int fastFetchIndex = fastProperties()->accessorIndexForProperty(mo, idx); Instr fetch; diff --git a/src/declarative/qml/qdeclarativecompiler.cpp b/src/declarative/qml/qdeclarativecompiler.cpp index b2b0990..0c56165 100644 --- a/src/declarative/qml/qdeclarativecompiler.cpp +++ b/src/declarative/qml/qdeclarativecompiler.cpp @@ -902,6 +902,7 @@ void QDeclarativeCompiler::genObject(QDeclarativeParser::Object *obj) create.line = obj->location.start.line; create.createSimple.create = output->types.at(obj->type).type->createFunction(); create.createSimple.typeSize = output->types.at(obj->type).type->createSize(); + create.createSimple.type = obj->type; create.createSimple.column = obj->location.start.column; output->bytecode << create; @@ -1351,7 +1352,8 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl if(name[0] >= 'A' && name[0] <= 'Z') name[0] = name[0] - 'A' + 'a'; - int sigIdx = QDeclarativePropertyPrivate::findSignalByName(obj->metaObject(), name).methodIndex(); + QMetaMethod method = QDeclarativePropertyPrivate::findSignalByName(obj->metaObject(), name); + int sigIdx = method.methodIndex(); if (sigIdx == -1) { @@ -1364,6 +1366,13 @@ bool QDeclarativeCompiler::buildSignal(QDeclarativeParser::Property *prop, QDecl if (prop->value || prop->values.count() != 1) COMPILE_EXCEPTION(prop, tr("Incorrectly specified signal assignment")); + if (method.revision() > 0) { + QDeclarativeType *type = output->types.at(obj->type).type; + if (!type->isMethodAvailable(sigIdx, method.revision())) { + COMPILE_EXCEPTION(prop, tr("Signal \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion)); + } + } + prop->index = sigIdx; obj->addSignalProperty(prop); @@ -1481,6 +1490,12 @@ bool QDeclarativeCompiler::buildProperty(QDeclarativeParser::Property *prop, // successful index resolution if (p.name()) { prop->type = p.userType(); + if (p.revision() > 0) { + QDeclarativeType *type = output->types.at(obj->type).type; + if (!type->isPropertyAvailable(prop->index, p.revision())) { + COMPILE_EXCEPTION(prop, tr("Property \"%1\" not available in %2 %3.%4").arg(QString::fromUtf8(prop->name)).arg(QString::fromUtf8(type->qmlTypeName())).arg(obj->majorVersion).arg(obj->minorVersion)); + } + } } // Check if this is an alias diff --git a/src/declarative/qml/qdeclarativedata_p.h b/src/declarative/qml/qdeclarativedata_p.h index 4767169..81f279c 100644 --- a/src/declarative/qml/qdeclarativedata_p.h +++ b/src/declarative/qml/qdeclarativedata_p.h @@ -66,6 +66,7 @@ class QDeclarativePropertyCache; class QDeclarativeContextData; class QDeclarativeNotifier; class QDeclarativeDataExtended; +class QDeclarativeType; // This class is structured in such a way, that simply zero'ing it is the // default state for elemental object allocations. This is crucial in the // workings of the QDeclarativeInstruction::CreateSimpleObject instruction. @@ -77,7 +78,7 @@ public: : ownMemory(true), ownContext(false), indestructible(true), explicitIndestructibleSet(false), context(0), outerContext(0), bindings(0), nextContextObject(0), prevContextObject(0), bindingBitsSize(0), bindingBits(0), lineNumber(0), columnNumber(0), deferredComponent(0), deferredIdx(0), - scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), extendedData(0) { + scriptValue(0), objectDataRefCount(0), propertyCache(0), guards(0), type(0), extendedData(0) { init(); } @@ -136,6 +137,8 @@ public: QDeclarativeGuard *guards; + const QDeclarativeType *type; + static QDeclarativeData *get(const QObject *object, bool create = false) { QObjectPrivate *priv = QObjectPrivate::get(const_cast(object)); if (priv->wasDeleted) { diff --git a/src/declarative/qml/qdeclarativeinstruction_p.h b/src/declarative/qml/qdeclarativeinstruction_p.h index 94676fc..4030bab 100644 --- a/src/declarative/qml/qdeclarativeinstruction_p.h +++ b/src/declarative/qml/qdeclarativeinstruction_p.h @@ -182,6 +182,7 @@ public: struct CreateSimpleInstruction { void (*create)(void *); int typeSize; + int type; ushort column; }; struct StoreMetaInstruction { diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 7a78a1f..1f387c4 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -134,10 +134,13 @@ public: bool m_isInterface : 1; const char *m_iid; + QByteArray m_module; QByteArray m_name; int m_version_maj; int m_version_min; int m_typeId; int m_listId; + int m_revision; + mutable QDeclarativeType *m_superType; int m_allocationSize; void (*m_newFunc)(void *); @@ -155,6 +158,7 @@ public: int m_index; QDeclarativeCustomParser *m_customParser; mutable volatile bool m_isSetup:1; + mutable bool m_haveSuperType : 1; mutable QList m_metaObjects; static QHash m_attachedPropertyIds; @@ -163,10 +167,10 @@ public: QHash QDeclarativeTypePrivate::m_attachedPropertyIds; QDeclarativeTypePrivate::QDeclarativeTypePrivate() -: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), +: m_isInterface(false), m_iid(0), m_typeId(0), m_listId(0), m_revision(0), m_superType(0), m_allocationSize(0), m_newFunc(0), m_baseMetaObject(0), m_attachedPropertiesFunc(0), m_attachedPropertiesType(0), m_parserStatusCast(-1), m_propertyValueSourceCast(-1), m_propertyValueInterceptorCast(-1), - m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false) + m_extFunc(0), m_extMetaObject(0), m_index(-1), m_customParser(0), m_isSetup(false), m_haveSuperType(false) { } @@ -192,9 +196,11 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe if (type.uri) name += '/'; name += type.elementName; + d->m_module = type.uri; d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; + d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; d->m_allocationSize = type.objectSize; @@ -243,6 +249,56 @@ bool QDeclarativeType::availableInVersion(int vmajor, int vminor) const return vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min); } +bool QDeclarativeType::availableInVersion(const QByteArray &module, int vmajor, int vminor) const +{ + return module == d->m_module && (vmajor > d->m_version_maj || (vmajor == d->m_version_maj && vminor >= d->m_version_min)); +} + +// returns the nearest _registered_ super class +QDeclarativeType *QDeclarativeType::superType() const +{ + if (!d->m_haveSuperType) { + const QMetaObject *mo = d->m_baseMetaObject->superClass(); + while (mo && !d->m_superType) { + d->m_superType = QDeclarativeMetaType::qmlType(mo, d->m_module, d->m_version_maj, d->m_version_min); + mo = mo->superClass(); + } + d->m_haveSuperType = true; + } + + return d->m_superType; +} + +bool QDeclarativeType::isPropertyAvailable(int index, int revision) const +{ + if (revision == 0) + return true; + + if (index < d->m_baseMetaObject->propertyOffset()) { + if (QDeclarativeType *super = superType()) + return super->isPropertyAvailable(index, revision); + } else if (index < d->m_baseMetaObject->propertyOffset() + d->m_baseMetaObject->propertyCount()) { + return d->m_revision >= revision; + } + + return false; +} + +bool QDeclarativeType::isMethodAvailable(int index, int revision) const +{ + if (revision == 0) + return true; + + if (index < d->m_baseMetaObject->methodOffset()) { + if (QDeclarativeType *super = superType()) + return super->isMethodAvailable(index, revision); + } else if (index < d->m_baseMetaObject->methodOffset() + d->m_baseMetaObject->methodCount()) { + return d->m_revision >= revision; + } + + return false; +} + static void clone(QMetaObjectBuilder &builder, const QMetaObject *mo, const QMetaObject *ignoreStart, const QMetaObject *ignoreEnd) { @@ -572,7 +628,7 @@ int registerType(const QDeclarativePrivate::RegisterType &type) if (!dtype->qmlTypeName().isEmpty()) data->nameToType.insertMulti(dtype->qmlTypeName(), dtype); - data->metaObjectToType.insert(dtype->baseMetaObject(), dtype); + data->metaObjectToType.insertMulti(dtype->baseMetaObject(), dtype); if (data->objects.size() <= type.typeId) data->objects.resize(type.typeId + 16); @@ -862,6 +918,27 @@ QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject) } /*! + Returns the type (if any) that corresponds to the \a metaObject in version specified + by \a version_major and \a version_minor in module specified by \a uri. Returns null if no + type is registered. +*/ +QDeclarativeType *QDeclarativeMetaType::qmlType(const QMetaObject *metaObject, const QByteArray &module, int version_major, int version_minor) +{ + QReadLocker lock(metaTypeDataLock()); + QDeclarativeMetaTypeData *data = metaTypeData(); + + QDeclarativeMetaTypeData::MetaObjects::const_iterator it = data->metaObjectToType.find(metaObject); + while (it != data->metaObjectToType.end() && it.key() == metaObject) { + QDeclarativeType *t = *it; + if (version_major < 0 || t->availableInVersion(module, version_major,version_minor)) + return t; + ++it; + } + + return 0; +} + +/*! Returns the type (if any) that corresponds to the QVariant::Type \a userType. Returns null if no type is registered. */ diff --git a/src/declarative/qml/qdeclarativemetatype_p.h b/src/declarative/qml/qdeclarativemetatype_p.h index 9c486d3..d9a3795 100644 --- a/src/declarative/qml/qdeclarativemetatype_p.h +++ b/src/declarative/qml/qdeclarativemetatype_p.h @@ -76,6 +76,7 @@ public: static QDeclarativeType *qmlType(const QByteArray &, int, int); static QDeclarativeType *qmlType(const QMetaObject *); + static QDeclarativeType *qmlType(const QMetaObject *metaObject, const QByteArray &module, int version_major, int version_minor); static QDeclarativeType *qmlType(int); static QMetaProperty defaultProperty(const QMetaObject *); @@ -115,6 +116,9 @@ public: int majorVersion() const; int minorVersion() const; bool availableInVersion(int vmajor, int vminor) const; + bool availableInVersion(const QByteArray &module, int vmajor, int vminor) const; + bool isPropertyAvailable(int index, int revision) const; + bool isMethodAvailable(int index, int revision) const; QObject *create() const; void create(QObject **, void **, size_t) const; @@ -149,6 +153,7 @@ public: int index() const; private: + QDeclarativeType *superType() const; friend class QDeclarativeTypePrivate; friend struct QDeclarativeMetaTypeData; friend int registerType(const QDeclarativePrivate::RegisterType &); diff --git a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp index b0bc5bb..090eeda 100644 --- a/src/declarative/qml/qdeclarativeobjectscriptclass.cpp +++ b/src/declarative/qml/qdeclarativeobjectscriptclass.cpp @@ -166,6 +166,20 @@ QDeclarativeObjectScriptClass::queryProperty(QObject *obj, const Identifier &nam QDeclarativeEnginePrivate *enginePrivate = QDeclarativeEnginePrivate::get(engine); lastData = QDeclarativePropertyCache::property(engine, obj, name, local); + if (lastData && lastData->revision > 0 && (hints & ImplicitObject)) { + QDeclarativeData *data = QDeclarativeData::get(obj); + if (data) { + if (!data->type) { + lastData = 0; + } else if (lastData->flags & QDeclarativePropertyCache::Data::IsFunction) { + if (!data->type->isMethodAvailable(lastData->coreIndex, lastData->revision)) + lastData = 0; + } else if (!data->type->isPropertyAvailable(lastData->coreIndex, lastData->revision)) { + lastData = 0; + } + } + } + if (lastData) return QScriptClass::HandlesReadAccess | QScriptClass::HandlesWriteAccess; diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index 388c92e..a4fc4c1 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -214,6 +214,7 @@ namespace QDeclarativePrivate const QMetaObject *extensionMetaObject; QDeclarativeCustomParser *customParser; + int revision; }; struct RegisterInterface { diff --git a/src/declarative/qml/qdeclarativepropertycache.cpp b/src/declarative/qml/qdeclarativepropertycache.cpp index dd9a224..76c9eb9 100644 --- a/src/declarative/qml/qdeclarativepropertycache.cpp +++ b/src/declarative/qml/qdeclarativepropertycache.cpp @@ -88,6 +88,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaProperty &p, QDeclarativeE coreIndex = p.propertyIndex(); notifyIndex = p.notifySignalIndex(); flags = flagsForProperty(p, engine); + revision = p.revision(); } void QDeclarativePropertyCache::Data::load(const QMetaMethod &m) @@ -106,6 +107,7 @@ void QDeclarativePropertyCache::Data::load(const QMetaMethod &m) QList params = m.parameterTypes(); if (!params.isEmpty()) flags |= Data::HasArguments; + revision = m.revision(); } @@ -235,7 +237,6 @@ void QDeclarativePropertyCache::append(QDeclarativeEngine *engine, const QMetaOb Data::Flag propertyFlags, Data::Flag methodFlags, Data::Flag signalFlags) { QDeclarativeEnginePrivate *enginePriv = QDeclarativeEnginePrivate::get(engine); - int methodCount = metaObject->methodCount(); // 3 to block the destroyed signal and the deleteLater() slot int methodOffset = qMax(3, metaObject->methodOffset()); diff --git a/src/declarative/qml/qdeclarativepropertycache_p.h b/src/declarative/qml/qdeclarativepropertycache_p.h index f7c5daa..3f7f9ef 100644 --- a/src/declarative/qml/qdeclarativepropertycache_p.h +++ b/src/declarative/qml/qdeclarativepropertycache_p.h @@ -110,6 +110,7 @@ public: int notifyIndex; // When !IsFunction int relatedIndex; // When IsFunction }; + int revision; static Flags flagsForProperty(const QMetaProperty &, QDeclarativeEngine *engine = 0); void load(const QMetaProperty &, QDeclarativeEngine *engine = 0); @@ -176,7 +177,8 @@ bool QDeclarativePropertyCache::Data::operator==(const QDeclarativePropertyCache return flags == other.flags && propType == other.propType && coreIndex == other.coreIndex && - notifyIndex == other.notifyIndex; + notifyIndex == other.notifyIndex && + revision == other.revision; } QDeclarativePropertyCache::Data * diff --git a/src/declarative/qml/qdeclarativescriptparser.cpp b/src/declarative/qml/qdeclarativescriptparser.cpp index 57cc9ab..e32a3d2 100644 --- a/src/declarative/qml/qdeclarativescriptparser.cpp +++ b/src/declarative/qml/qdeclarativescriptparser.cpp @@ -307,7 +307,6 @@ ProcessAST::defineObjectBinding(AST::UiQualifiedId *propertyName, obj->location = location; if (propertyCount) { - Property *prop = currentProperty(); Value *v = new Value; v->object = obj; diff --git a/src/declarative/qml/qdeclarativevaluetype.cpp b/src/declarative/qml/qdeclarativevaluetype.cpp index 5dc6ffd..bf02de8 100644 --- a/src/declarative/qml/qdeclarativevaluetype.cpp +++ b/src/declarative/qml/qdeclarativevaluetype.cpp @@ -71,6 +71,7 @@ int qmlRegisterValueTypeEnums(const char *uri, int versionMajor, int versionMino 0, 0, + 0, 0 }; diff --git a/src/declarative/qml/qdeclarativevme.cpp b/src/declarative/qml/qdeclarativevme.cpp index c742dec..6ee653b 100644 --- a/src/declarative/qml/qdeclarativevme.cpp +++ b/src/declarative/qml/qdeclarativevme.cpp @@ -194,6 +194,8 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, QDeclarativeData *ddata = QDeclarativeData::get(o); Q_ASSERT(ddata); + if (types.at(instr.create.type).type) + ddata->type = types.at(instr.create.type).type; if (stack.isEmpty()) { if (ddata->context) { @@ -249,6 +251,8 @@ QObject *QDeclarativeVME::run(QDeclarativeVMEStack &stack, QDeclarativeData *ddata = (QDeclarativeData *)(((const char *)o) + instr.createSimple.typeSize); + if (types.at(instr.createSimple.type).type) + ddata->type = types.at(instr.createSimple.type).type; ddata->lineNumber = instr.line; ddata->columnNumber = instr.createSimple.column; diff --git a/src/declarative/qml/qmetaobjectbuilder.cpp b/src/declarative/qml/qmetaobjectbuilder.cpp index dfe89f8..60cd6a9 100644 --- a/src/declarative/qml/qmetaobjectbuilder.cpp +++ b/src/declarative/qml/qmetaobjectbuilder.cpp @@ -122,7 +122,7 @@ enum PropertyFlags { User = 0x00100000, ResolveUser = 0x00200000, Notify = 0x00400000, - Dynamic = 0x00800000 + Revisioned = 0x00800000 }; enum MethodFlags { @@ -139,7 +139,8 @@ enum MethodFlags { MethodCompatibility = 0x10, MethodCloned = 0x20, - MethodScriptable = 0x40 + MethodScriptable = 0x40, + MethodRevisioned = 0x80 }; struct QMetaObjectPrivate @@ -2277,21 +2278,6 @@ bool QMetaPropertyBuilder::isEnumOrFlag() const } /*! - Returns true if the property has the dynamic flag set; - otherwise returns false. The default value is false. - - \sa setDynamic() -*/ -bool QMetaPropertyBuilder::isDynamic() const -{ - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) - return d->flag(Dynamic); - else - return false; -} - -/*! Sets this property to readable if \a value is true. \sa isReadable(), setWritable() @@ -2415,19 +2401,6 @@ void QMetaPropertyBuilder::setEnumOrFlag(bool value) } /*! - Sets this property to have the dynamic flag if \a value is - true. - - \sa isDynamic() -*/ -void QMetaPropertyBuilder::setDynamic(bool value) -{ - QMetaPropertyBuilderPrivate *d = d_func(); - if (d) - d->setFlag(Dynamic, value); -} - -/*! \class QMetaEnumBuilder \internal \brief The QMetaEnumBuilder class enables modifications to an enumerator definition on a meta object builder. diff --git a/src/declarative/qml/qmetaobjectbuilder_p.h b/src/declarative/qml/qmetaobjectbuilder_p.h index a90ba63..c270f60 100644 --- a/src/declarative/qml/qmetaobjectbuilder_p.h +++ b/src/declarative/qml/qmetaobjectbuilder_p.h @@ -258,7 +258,6 @@ public: bool isUser() const; bool hasStdCppSet() const; bool isEnumOrFlag() const; - bool isDynamic() const; void setReadable(bool value); void setWritable(bool value); @@ -270,7 +269,6 @@ public: void setUser(bool value); void setStdCppSet(bool value); void setEnumOrFlag(bool value); - void setDynamic(bool value); private: const QMetaObjectBuilder *_mobj; diff --git a/src/declarative/util/qdeclarativeopenmetaobject.cpp b/src/declarative/util/qdeclarativeopenmetaobject.cpp index c611435..1426cea 100644 --- a/src/declarative/util/qdeclarativeopenmetaobject.cpp +++ b/src/declarative/util/qdeclarativeopenmetaobject.cpp @@ -97,7 +97,6 @@ int QDeclarativeOpenMetaObjectType::createProperty(const QByteArray &name) int id = d->mob.propertyCount(); d->mob.addSignal("__" + QByteArray::number(id) + "()"); QMetaPropertyBuilder build = d->mob.addProperty(name, "QVariant", id); - build.setDynamic(true); propertyCreated(id, build); qFree(d->mem); d->mem = d->mob.toMetaObject(); diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml new file mode 100644 index 0000000..77accd8 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision.qml @@ -0,0 +1,7 @@ +import Qt.test 1.1 + +MyRevisionedClass +{ + prop1: prop2 + onSignal1: method2() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml new file mode 100644 index 0000000..36057cb --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision2.qml @@ -0,0 +1,9 @@ +import Qt.test 1.1 + +MyRevisionedSubclass +{ + prop1: prop3 + onSignal1: method2() + prop3: prop4 + onSignal3: method4() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml new file mode 100644 index 0000000..81769e9 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevision3.qml @@ -0,0 +1,8 @@ +import Qt.test 1.0 + +MyRevisionedSubclass +{ + prop1: prop3 + onSignal1: method1() + onSignal3: method3() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml new file mode 100644 index 0000000..44d421e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors.qml @@ -0,0 +1,14 @@ +import QtQuick 1.0 +import Qt.test 1.0 + +MyRevisionedClass +{ + // Will not hit optimizer + property real p1: prop1 % 3 + property real p2: prop2 % 3 + + // Should hit optimizer + property real p3: prop2 + + Component.onCompleted: method2() +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml new file mode 100644 index 0000000..121642e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors2.qml @@ -0,0 +1,24 @@ +import QtQuick 1.0 +import Qt.test 1.0 + +MyRevisionedSubclass +{ + // Will not hit optimizer + property real p1: prop1 % 3 + property real p2: prop2 % 3 + property real p3: prop3 % 3 + property real p4: prop4 % 3 + + // Should hit optimizer + property real p5: prop1 + property real p6: prop2 + property real p7: prop3 + property real p8: prop4 + + Component.onCompleted: { + method1() + method2() + method3() + method4() + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml new file mode 100644 index 0000000..123650e --- /dev/null +++ b/tests/auto/declarative/qdeclarativeecmascript/data/metaobjectRevisionErrors3.qml @@ -0,0 +1,36 @@ +import QtQuick 1.0 +import Qt.test 1.1 + +MyRevisionedSubclass +{ + // Will not hit optimizer + property real pA: propA % 3 + property real pB: propB % 3 + property real pC: propC % 3 + property real pD: propD % 3 + property real p1: prop1 % 3 + property real p2: prop2 % 3 + property real p3: prop3 % 3 + property real p4: prop4 % 3 + + // Should hit optimizer + property real pE: propA + property real pF: propB + property real pG: propC + property real pH: propD + property real p5: prop1 + property real p6: prop2 + property real p7: prop3 + property real p8: prop4 + + Component.onCompleted: { + methodA() + methodB() + methodC() + methodD() + method1() + method2() + method3() + method4() + } +} diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp index 94135f9..29e5eac 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.cpp @@ -113,6 +113,15 @@ void registerTypes() qmlRegisterType("Qt.test", 1,0, "NumberAssignment"); qmlRegisterExtendedType("Qt.test", 1,0, "DefaultPropertyExtendedObject"); qmlRegisterType("Qt.test", 1,0, "OverrideDefaultPropertyObject"); + qmlRegisterType("Qt.test",1,0,"MyRevisionedClass"); + qmlRegisterType("Qt.test",1,1,"MyRevisionedClass"); + + // Register the uncreatable base class + qmlRegisterRevision("Qt.test",1,1); + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + qmlRegisterType("Qt.test",1,0,"MyRevisionedSubclass"); + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + qmlRegisterType("Qt.test",1,1,"MyRevisionedSubclass"); qmlRegisterExtendedType("Qt.test",1,0,"QWidget"); qmlRegisterType("Qt.test",1,0,"QPlainTextEdit"); diff --git a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h index 15c310f..02a4352 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/testtypes.h +++ b/tests/auto/declarative/qdeclarativeecmascript/testtypes.h @@ -736,6 +736,167 @@ public: OverrideDefaultPropertyObject() {} }; +class MyRevisionedBaseClassRegistered : public QObject +{ +Q_OBJECT + Q_PROPERTY(qreal propA READ propA WRITE setPropA NOTIFY propAChanged) + Q_PROPERTY(qreal propB READ propB WRITE setPropB NOTIFY propBChanged REVISION 1) + +public: + MyRevisionedBaseClassRegistered() : m_pa(1), m_pb(2) {} + + qreal propA() const { return m_pa; } + void setPropA(qreal p) { + if (p != m_pa) { + m_pa = p; + emit propAChanged(); + } + } + qreal propB() const { return m_pb; } + void setPropB(qreal p) { + if (p != m_pb) { + m_pb = p; + emit propBChanged(); + } + } + + Q_INVOKABLE void methodA() { } + Q_INVOKABLE Q_REVISION(1) void methodB() { } + +signals: + void propAChanged(); + void propBChanged(); + + void signalA(); + Q_REVISION(1) void signalB(); + +protected: + qreal m_pa; + qreal m_pb; +}; + +class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered +{ +Q_OBJECT + Q_PROPERTY(qreal propC READ propC WRITE setPropC NOTIFY propCChanged) + Q_PROPERTY(qreal propD READ propD WRITE setPropD NOTIFY propDChanged REVISION 1) + +public: + MyRevisionedBaseClassUnregistered() : m_pc(1), m_pd(2) {} + + qreal propC() const { return m_pc; } + void setPropC(qreal p) { + if (p != m_pc) { + m_pc = p; + emit propCChanged(); + } + } + qreal propD() const { return m_pd; } + void setPropD(qreal p) { + if (p != m_pd) { + m_pd = p; + emit propDChanged(); + } + } + + Q_INVOKABLE void methodC() { } + Q_INVOKABLE Q_REVISION(1) void methodD() { } + +signals: + void propCChanged(); + void propDChanged(); + + void signalC(); + Q_REVISION(1) void signalD(); + +protected: + qreal m_pc; + qreal m_pd; +}; + +class MyRevisionedClass : public MyRevisionedBaseClassUnregistered +{ + Q_OBJECT + Q_PROPERTY(qreal prop1 READ prop1 WRITE setProp1 NOTIFY prop1Changed) + Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1) + +public: + MyRevisionedClass() {} + + qreal prop1() const { return m_p1; } + void setProp1(qreal p) { + if (p != m_p1) { + m_p1 = p; + emit prop1Changed(); + } + } + qreal prop2() const { return m_p2; } + void setProp2(qreal p) { + if (p != m_p2) { + m_p2 = p; + emit prop2Changed(); + } + } + + Q_INVOKABLE void method1() { } + Q_INVOKABLE Q_REVISION(1) void method2() { } + +signals: + void prop1Changed(); + void prop2Changed(); + + void signal1(); + Q_REVISION(1) void signal2(); + +protected: + qreal m_p1; + qreal m_p2; +}; + +class MyRevisionedSubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop3 READ prop3 WRITE setProp3 NOTIFY prop3Changed) + Q_PROPERTY(qreal prop4 READ prop4 WRITE setProp4 NOTIFY prop4Changed REVISION 1) + +public: + MyRevisionedSubclass() : m_p3(3), m_p4(4) {} + + qreal prop3() const { return m_p3; } + void setProp3(qreal p) { + if (p != m_p3) { + m_p3 = p; + emit prop3Changed(); + } + } + qreal prop4() const { return m_p4; } + void setProp4(qreal p) { + if (p != m_p4) { + m_p4 = p; + emit prop4Changed(); + } + } + + Q_INVOKABLE void method3() { } + Q_INVOKABLE Q_REVISION(1) void method4() { } + +signals: + void prop3Changed(); + void prop4Changed(); + + void signal3(); + Q_REVISION(1) void signal4(); + +protected: + qreal m_p3; + qreal m_p4; +}; + +QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) +QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) +QML_DECLARE_TYPE(MyRevisionedClass) +QML_DECLARE_TYPE(MyRevisionedSubclass) + void registerTypes(); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index 4228bc4..a29c459 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -176,6 +176,9 @@ private slots: void callQtInvokables(); void invokableObjectArg(); void invokableObjectRet(); + + void revisionErrors(); + void revision(); private: QDeclarativeEngine engine; }; @@ -2847,6 +2850,85 @@ void tst_qdeclarativeecmascript::aliasWritesOverrideBindings() } } +void tst_qdeclarativeecmascript::revisionErrors() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors.qml")); + QString url = component.url().toString(); + + QString warning1 = url + ":8: ReferenceError: Can't find variable: prop2"; + QString warning2 = url + ":11: ReferenceError: Can't find variable: prop2"; + QString warning3 = url + ":13: ReferenceError: Can't find variable: method2"; + + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors2.qml")); + QString url = component.url().toString(); + + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + // method2, prop2 from MyRevisionedClass not available + // method4, prop4 from MyRevisionedSubclass not available + QString warning1 = url + ":8: ReferenceError: Can't find variable: prop2"; + QString warning2 = url + ":14: ReferenceError: Can't find variable: prop2"; + QString warning3 = url + ":10: ReferenceError: Can't find variable: prop4"; + QString warning4 = url + ":16: ReferenceError: Can't find variable: prop4"; + QString warning5 = url + ":20: ReferenceError: Can't find variable: method2"; + + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning4.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning5.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevisionErrors3.qml")); + QString url = component.url().toString(); + + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + // All properties/methods available, except MyRevisionedBaseClassUnregistered rev 1 + QString warning1 = url + ":30: ReferenceError: Can't find variable: methodD"; + QString warning2 = url + ":10: ReferenceError: Can't find variable: propD"; + QString warning3 = url + ":20: ReferenceError: Can't find variable: propD"; + QTest::ignoreMessage(QtWarningMsg, warning1.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning2.toLatin1().constData()); + QTest::ignoreMessage(QtWarningMsg, warning3.toLatin1().constData()); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } +} + +void tst_qdeclarativeecmascript::revision() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision2.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } + { + QDeclarativeComponent component(&engine, TEST_FILE("metaobjectRevision3.qml")); + QString url = component.url().toString(); + + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + } +} + QTEST_MAIN(tst_qdeclarativeecmascript) #include "tst_qdeclarativeecmascript.moc" diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt new file mode 100644 index 0000000..6ad6bfa --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.errors.txt @@ -0,0 +1 @@ +7:5:Property "prop2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml new file mode 100644 index 0000000..4662d5e --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.1.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + prop1: 1 + prop2: 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt new file mode 100644 index 0000000..92ccd9a --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.errors.txt @@ -0,0 +1 @@ +6:5:Signal "onSignal2" not available in Test/MyRevisionedClass 1.0 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml new file mode 100644 index 0000000..8da7a25 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.2.qml @@ -0,0 +1,7 @@ +import Test 1.0 + +MyRevisionedClass +{ + onSignal1: prop1 = 2 + onSignal2: prop1 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt new file mode 100644 index 0000000..b3c33c4 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.errors.txt @@ -0,0 +1 @@ +9:5:Property "propD" not available in Test/MyRevisionedClass 1.1 diff --git a/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml new file mode 100644 index 0000000..195be21 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/metaobjectRevision.3.qml @@ -0,0 +1,10 @@ +import Test 1.1 + +MyRevisionedClass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is in rev 1 of MyRevisionedClassUnregistered, but not registered in 1.1 + propD: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml new file mode 100644 index 0000000..c4974cf --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions10.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedClass +{ + property real prop2: 10 + prop1: 1 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml new file mode 100644 index 0000000..4d3d7d2 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisions11.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedClass +{ + prop1: 1 + prop2: 10 + + onSignal2: prop2 = 3 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml new file mode 100644 index 0000000..57d76b1 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionsbasesub11.qml @@ -0,0 +1,16 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + propA: 10 + propB: 10 + propC: 10 + // propD is not registered in 1.1 + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml new file mode 100644 index 0000000..b5de4a3 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub10.qml @@ -0,0 +1,10 @@ +import QtQuick 1.0 +import Test 1.0 + +MyRevisionedSubclass +{ + property real prop4: 10 + property real prop2: 10 + prop1: 5 + prop3: 7 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml new file mode 100644 index 0000000..f107356 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/revisionssub11.qml @@ -0,0 +1,12 @@ +import QtQuick 1.0 +import Test 1.1 + +MyRevisionedSubclass +{ + prop1: 10 + prop2: 10 + prop3: 10 + prop4: 10 + + onSignal4: prop4 = 2 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp index e697aeb..217f54a 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp @@ -52,6 +52,15 @@ void registerTypes() qmlRegisterType("Test",1,0,"MySecondNamespacedType"); qmlRegisterType("Test",1,0,"MyParserStatus"); qmlRegisterType(); + qmlRegisterType("Test",1,0,"MyRevisionedClass"); + qmlRegisterType("Test",1,1,"MyRevisionedClass"); + + // Register the uncreatable base class + qmlRegisterRevision("Test",1,1); + // MyRevisionedSubclass 1.0 uses MyRevisionedClass revision 0 + qmlRegisterType("Test",1,0,"MyRevisionedSubclass"); + // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 + qmlRegisterType("Test",1,1,"MyRevisionedSubclass"); qmlRegisterCustomType("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser); diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index f8d785c..4508d01 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -601,6 +601,169 @@ private: int m_ccc; }; +class MyRevisionedBaseClassRegistered : public QObject +{ + Q_OBJECT + Q_PROPERTY(qreal propA READ propA WRITE setPropA NOTIFY propAChanged) + Q_PROPERTY(qreal propB READ propB WRITE setPropB NOTIFY propBChanged REVISION 1) + +public: + MyRevisionedBaseClassRegistered() : m_pa(1), m_pb(2) {} + + qreal propA() const { return m_pa; } + void setPropA(qreal p) { + if (p != m_pa) { + m_pa = p; + emit propAChanged(); + } + } + qreal propB() const { return m_pb; } + void setPropB(qreal p) { + if (p != m_pb) { + m_pb = p; + emit propBChanged(); + } + } + + Q_INVOKABLE void methodA() { } + Q_INVOKABLE Q_REVISION(1) void methodB() { } + +signals: + void propAChanged(); + void propBChanged(); + + void signalA(); + Q_REVISION(1) void signalB(); + +protected: + qreal m_pa; + qreal m_pb; +}; + +class MyRevisionedBaseClassUnregistered : public MyRevisionedBaseClassRegistered +{ + Q_OBJECT + Q_PROPERTY(qreal propC READ propC WRITE setPropC NOTIFY propCChanged) + Q_PROPERTY(qreal propD READ propD WRITE setPropD NOTIFY propDChanged REVISION 1) + +public: + MyRevisionedBaseClassUnregistered() : m_pc(1), m_pd(2) {} + + qreal propC() const { return m_pc; } + void setPropC(qreal p) { + if (p != m_pc) { + m_pc = p; + emit propCChanged(); + } + } + qreal propD() const { return m_pd; } + void setPropD(qreal p) { + if (p != m_pd) { + m_pd = p; + emit propDChanged(); + } + } + + Q_INVOKABLE void methodC() { } + Q_INVOKABLE Q_REVISION(1) void methodD() { } + +signals: + void propCChanged(); + void propDChanged(); + + void signalC(); + Q_REVISION(1) void signalD(); + +protected: + qreal m_pc; + qreal m_pd; +}; + +class MyRevisionedClass : public MyRevisionedBaseClassUnregistered +{ + Q_OBJECT + Q_PROPERTY(qreal prop1 READ prop1 WRITE setProp1 NOTIFY prop1Changed) + Q_PROPERTY(qreal prop2 READ prop2 WRITE setProp2 NOTIFY prop2Changed REVISION 1) + +public: + MyRevisionedClass() : m_p1(1), m_p2(2) {} + + qreal prop1() const { return m_p1; } + void setProp1(qreal p) { + if (p != m_p1) { + m_p1 = p; + emit prop1Changed(); + } + } + qreal prop2() const { return m_p2; } + void setProp2(qreal p) { + if (p != m_p2) { + m_p2 = p; + emit prop2Changed(); + } + } + + Q_INVOKABLE void method1() { } + Q_INVOKABLE Q_REVISION(1) void method2() { } + +signals: + void prop1Changed(); + void prop2Changed(); + + void signal1(); + Q_REVISION(1) void signal2(); + +protected: + qreal m_p1; + qreal m_p2; +}; + +class MyRevisionedSubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop3 READ prop3 WRITE setProp3 NOTIFY prop3Changed) + Q_PROPERTY(qreal prop4 READ prop4 WRITE setProp4 NOTIFY prop4Changed REVISION 1) + +public: + MyRevisionedSubclass() : m_p3(3), m_p4(4) {} + + qreal prop3() const { return m_p3; } + void setProp3(qreal p) { + if (p != m_p3) { + m_p3 = p; + emit prop3Changed(); + } + } + qreal prop4() const { return m_p4; } + void setProp4(qreal p) { + if (p != m_p4) { + m_p4 = p; + emit prop4Changed(); + } + } + + Q_INVOKABLE void method3() { } + Q_INVOKABLE Q_REVISION(1) void method4() { } + +signals: + void prop3Changed(); + void prop4Changed(); + + void signal3(); + Q_REVISION(1) void signal4(); + +protected: + qreal m_p3; + qreal m_p4; +}; + +QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) +QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) +QML_DECLARE_TYPE(MyRevisionedClass) +QML_DECLARE_TYPE(MyRevisionedSubclass) + + + void registerTypes(); #endif // TESTTYPES_H diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 6410853..298d802 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -153,6 +153,8 @@ private slots: void customOnProperty(); void variantNotify(); + void revisions(); + // regression tests for crashes void crash1(); void crash2(); @@ -421,6 +423,10 @@ void tst_qdeclarativelanguage::errors_data() << "incorrectCase.errors.sensitive.txt" #endif << false; + + QTest::newRow("metaobjectRevision.1") << "metaobjectRevision.1.qml" << "metaobjectRevision.1.errors.txt" << false; + QTest::newRow("metaobjectRevision.2") << "metaobjectRevision.2.qml" << "metaobjectRevision.2.errors.txt" << false; + QTest::newRow("metaobjectRevision.3") << "metaobjectRevision.3.qml" << "metaobjectRevision.3.errors.txt" << false; } @@ -1888,6 +1894,62 @@ void tst_qdeclarativelanguage::variantNotify() delete object; } +void tst_qdeclarativelanguage::revisions() +{ + { + QDeclarativeComponent component(&engine, TEST_FILE("revisions10.qml")); + + VERIFY_ERRORS(0); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 2.0); + QCOMPARE(object->property("prop2").toReal(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisions11.qml")); + + VERIFY_ERRORS(0); + MyRevisionedClass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisionssub10.qml")); + + VERIFY_ERRORS(0); + MyRevisionedSubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop2(), 2.0); + QCOMPARE(object->property("prop2").toReal(), 10.0); + + QCOMPARE(object->prop4(), 4.0); + QCOMPARE(object->property("prop4").toReal(), 10.0); + + delete object; + } + { + QDeclarativeComponent component(&engine, TEST_FILE("revisionssub11.qml")); + + VERIFY_ERRORS(0); + MyRevisionedSubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop1(), 10.0); + QCOMPARE(object->prop2(), 10.0); + QCOMPARE(object->prop3(), 10.0); + QCOMPARE(object->prop4(), 10.0); + + delete object; + } +} + void tst_qdeclarativelanguage::initTestCase() { registerTypes(); diff --git a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp index 0f6d531..a1f938a 100644 --- a/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp +++ b/tests/auto/declarative/qmetaobjectbuilder/tst_qmetaobjectbuilder.cpp @@ -546,7 +546,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!nullProp.isUser()); QVERIFY(!nullProp.hasStdCppSet()); QVERIFY(!nullProp.isEnumOrFlag()); - QVERIFY(!nullProp.isDynamic()); QCOMPARE(nullProp.index(), 0); // Add a property and check its attributes. @@ -564,7 +563,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop1.isUser()); QVERIFY(!prop1.hasStdCppSet()); QVERIFY(!prop1.isEnumOrFlag()); - QVERIFY(!prop1.isDynamic()); QCOMPARE(prop1.index(), 0); QCOMPARE(builder.propertyCount(), 1); @@ -583,7 +581,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); QCOMPARE(prop2.index(), 1); QCOMPARE(builder.propertyCount(), 2); @@ -605,7 +602,6 @@ void tst_QMetaObjectBuilder::property() prop1.setUser(true); prop1.setStdCppSet(true); prop1.setEnumOrFlag(true); - prop1.setDynamic(true); // Check that prop1 is changed, but prop2 is not. QCOMPARE(prop1.name(), QByteArray("foo")); @@ -620,7 +616,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(prop1.isUser()); QVERIFY(prop1.hasStdCppSet()); QVERIFY(prop1.isEnumOrFlag()); - QVERIFY(prop1.isDynamic()); QVERIFY(prop2.isReadable()); QVERIFY(prop2.isWritable()); QCOMPARE(prop2.name(), QByteArray("bar")); @@ -633,7 +628,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); // Remove prop1 and check that prop2 becomes index 0. builder.removeProperty(0); @@ -649,7 +643,6 @@ void tst_QMetaObjectBuilder::property() QVERIFY(!prop2.isUser()); QVERIFY(!prop2.hasStdCppSet()); QVERIFY(!prop2.isEnumOrFlag()); - QVERIFY(!prop2.isDynamic()); QCOMPARE(prop2.index(), 0); // Perform index-based lookup again. @@ -673,7 +666,6 @@ void tst_QMetaObjectBuilder::property() prop2.setUser(false); \ prop2.setStdCppSet(false); \ prop2.setEnumOrFlag(false); \ - prop2.setDynamic(false); \ } while (0) #define COUNT_FLAGS() \ ((prop2.isReadable() ? 1 : 0) + \ @@ -685,8 +677,7 @@ void tst_QMetaObjectBuilder::property() (prop2.isEditable() ? 1 : 0) + \ (prop2.isUser() ? 1 : 0) + \ (prop2.hasStdCppSet() ? 1 : 0) + \ - (prop2.isEnumOrFlag() ? 1 : 0) + \ - (prop2.isDynamic() ? 1 : 0)) + (prop2.isEnumOrFlag() ? 1 : 0)) #define CHECK_FLAG(setFunc,isFunc) \ do { \ CLEAR_FLAGS(); \ @@ -705,7 +696,6 @@ void tst_QMetaObjectBuilder::property() CHECK_FLAG(setUser, isUser); CHECK_FLAG(setStdCppSet, hasStdCppSet); CHECK_FLAG(setEnumOrFlag, isEnumOrFlag); - CHECK_FLAG(setDynamic, isDynamic); // Check that nothing else changed. QVERIFY(checkForSideEffects(builder, QMetaObjectBuilder::Properties)); -- cgit v0.12 From 810eb8e2bf52a30632abc42618b7f9f4352e2dd9 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Wed, 5 Jan 2011 14:01:44 +1000 Subject: Add missing test data file --- .../auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml diff --git a/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml b/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml new file mode 100644 index 0000000..4dbcc02 --- /dev/null +++ b/tests/auto/declarative/qdeclarativexmllistmodel/data/testtypes.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 + +XmlListModel { + query: "/data" + XmlRole { name: "stringValue"; query: "a-string/string()" } + XmlRole { name: "numberValue"; query: "a-number/number()" } +} + -- cgit v0.12 From 572598884de78c5026694843473122487269a244 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Wed, 5 Jan 2011 15:41:56 +1000 Subject: Fix outdated tests selftest_noimages and qdeclarativespringanimation were correct, updating test scripts to match. Task-number: QTBUG-14792 --- .../data-X11/follow.0.png | Bin 0 -> 950 bytes .../data-X11/follow.1.png | Bin 0 -> 983 bytes .../data-X11/follow.2.png | Bin 0 -> 1243 bytes .../data-X11/follow.3.png | Bin 0 -> 1235 bytes .../data-X11/follow.4.png | Bin 0 -> 1253 bytes .../data-X11/follow.5.png | Bin 0 -> 1249 bytes .../data-X11/follow.6.png | Bin 0 -> 1241 bytes .../data-X11/follow.7.png | Bin 0 -> 1251 bytes .../data-X11/follow.qml | 1763 ++++++++++++++++++++ .../selftest_noimages/data/selftest_noimages.qml | 146 +- 10 files changed, 1779 insertions(+), 130 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.2.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.3.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.4.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.5.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.6.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.7.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.qml diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.0.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.0.png new file mode 100644 index 0000000..6525dbb Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.1.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.1.png new file mode 100644 index 0000000..5b8d209 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.2.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.2.png new file mode 100644 index 0000000..cf012ba Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.3.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.3.png new file mode 100644 index 0000000..57e77a4 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.4.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.4.png new file mode 100644 index 0000000..24d26bd Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.5.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.5.png new file mode 100644 index 0000000..a540734 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.6.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.6.png new file mode 100644 index 0000000..17da643 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.6.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.7.png b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.7.png new file mode 100644 index 0000000..e03cfe4 Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.7.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.qml b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.qml new file mode 100644 index 0000000..98cd12c --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativespringanimation/data-X11/follow.qml @@ -0,0 +1,1763 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "follow.0.png" + } + Frame { + msec: 32 + hash: "2ddcb50f5d285eb80a8136f0cf4cf85a" + } + Frame { + msec: 48 + hash: "519d93a844e05f8215139d91c9aef58b" + } + Frame { + msec: 64 + hash: "9f075a5547e4dc67cbe2ace2766395bb" + } + Frame { + msec: 80 + hash: "8fc48f74a51d45b4ea1fb7bd1d48002f" + } + Frame { + msec: 96 + hash: "a28fc4be5a5bb9ff36f796d9b071f02c" + } + Frame { + msec: 112 + hash: "ebc14c2905f3596ec451dd96409e6001" + } + Frame { + msec: 128 + hash: "4f270bdcff44006a56055edb1cda522a" + } + Frame { + msec: 144 + hash: "571f347e764bf38985768c85c2a13ba1" + } + Frame { + msec: 160 + hash: "b1aa23268167b7e2a1190288926f52c0" + } + Frame { + msec: 176 + hash: "06d548aef9a678edbf3ab4d3ce62a647" + } + Frame { + msec: 192 + hash: "daf6af0ae78f39566913c656450a66e5" + } + Frame { + msec: 208 + hash: "f101cd0c026ee0ed6ccef7a4aed302a0" + } + Frame { + msec: 224 + hash: "b3caa673f072c53d31d71109c9b33357" + } + Frame { + msec: 240 + hash: "8596f1d305d6b8f97b9feda9e69bdefe" + } + Frame { + msec: 256 + hash: "23c23df2c130aafb2092fe47a958a4cd" + } + Frame { + msec: 272 + hash: "66a4f2d8213264437a5f4d6cf10cd442" + } + Frame { + msec: 288 + hash: "6392490111813bad0a9467cc0c1746ed" + } + Frame { + msec: 304 + hash: "c115a47e0ecab63b881e2ec492d24e68" + } + Frame { + msec: 320 + hash: "c2a2b57e6f9ea2975c0846124d2dbc66" + } + Frame { + msec: 336 + hash: "8286c315dfda4241607b2de1154f869d" + } + Frame { + msec: 352 + hash: "3f0f7cae80357176892ff7628ec3153a" + } + Frame { + msec: 368 + hash: "d13bde4a5b5ed8202f92ae33913166c9" + } + Frame { + msec: 384 + hash: "b70cc32134b1b0d31a5e7f145af09495" + } + Frame { + msec: 400 + hash: "03ebc2ff317ac840f4508e8701d66955" + } + Frame { + msec: 416 + hash: "8dff08e72365e8e2fee8088c386dedca" + } + Frame { + msec: 432 + hash: "720f3bbaf3fa3e3a064747d5689e47a0" + } + Frame { + msec: 448 + hash: "350e3ebfcfef96969ef5b8d5944f7e62" + } + Frame { + msec: 464 + hash: "1e4e6e68b3a8eac0c5cd039164eec166" + } + Frame { + msec: 480 + hash: "62a10c4250ad025139a3f9e72109e8e1" + } + Frame { + msec: 496 + hash: "23cfd643adfc98f6a06c7e7b15dac954" + } + Frame { + msec: 512 + hash: "3a78930d5b86b886723fad85e77dd075" + } + Frame { + msec: 528 + hash: "64dc878e2f527e80403c766e61fe14a6" + } + Frame { + msec: 544 + hash: "d79160989d2584044042271e79a88e69" + } + Frame { + msec: 560 + hash: "22cbaea4affc88433834c7d0dc1f1644" + } + Frame { + msec: 576 + hash: "77cb616902257e1f239a0e6bfaabb33c" + } + Frame { + msec: 592 + hash: "a2fe73dced03b23c4acb9aae9b774b41" + } + Frame { + msec: 608 + hash: "230e21d3a9ed0e185593677233af1275" + } + Frame { + msec: 624 + hash: "4e10ecffac4e06d624855d3f8917f76c" + } + Frame { + msec: 640 + hash: "84f49d56baace4a02e50d3eafaea04ec" + } + Frame { + msec: 656 + hash: "e3cd0b334551a9f91723eb2c876d335a" + } + Frame { + msec: 672 + hash: "259330f3ec390c9926d9c2ddc2d77319" + } + Frame { + msec: 688 + hash: "cc659623bfa385d282d608684d7cdc2b" + } + Frame { + msec: 704 + hash: "47ed75d077143a6bfa0e10158550c542" + } + Frame { + msec: 720 + hash: "0de93bbd9f9ee63e97968089321003e1" + } + Frame { + msec: 736 + hash: "b33d867d4399879256a01344ce0b81f2" + } + Frame { + msec: 752 + hash: "97c31fce937d11f62bebc6169b464a42" + } + Frame { + msec: 768 + hash: "ea4166b8a4001bca3f27af30f251267f" + } + Frame { + msec: 784 + hash: "b56d270b7893565f8d7ed2a0bfe10d60" + } + Frame { + msec: 800 + hash: "88a42559fe22b45cff379258dd40ced9" + } + Frame { + msec: 816 + hash: "4ee1a711cb8d26087e1b75a3166ca5f0" + } + Frame { + msec: 832 + hash: "9b88a00d041092e79b4a08bccbaca0e1" + } + Frame { + msec: 848 + hash: "afea397b3d740dc42f0313624fc10efd" + } + Frame { + msec: 864 + hash: "39fd8e4cefbd9fed283d62a7aecded22" + } + Frame { + msec: 880 + hash: "916b783d2379ac054c749e7b6eae7ddf" + } + Frame { + msec: 896 + hash: "fccd44740ff7ffb0f2adccf00a7588bd" + } + Frame { + msec: 912 + hash: "c064f20703a13543e8273d251fd645fe" + } + Frame { + msec: 928 + hash: "1b9b0755101841e3d1cbe208d81575d5" + } + Frame { + msec: 944 + hash: "1eb5e4a301b565012bc8f6af8e879eb9" + } + Frame { + msec: 960 + hash: "032db65eb5c405e433f88df3975c322b" + } + Frame { + msec: 976 + image: "follow.1.png" + } + Frame { + msec: 992 + hash: "fdb67e11d7cc767b2389a8bbef752c7e" + } + Frame { + msec: 1008 + hash: "ed89cb161336c61b13e3514fdf816023" + } + Frame { + msec: 1024 + hash: "331b873c5367e0aaa62af85cb54a6a96" + } + Frame { + msec: 1040 + hash: "cde4503f02f0c3732e310a7d0418cd1e" + } + Frame { + msec: 1056 + hash: "f8c028c591fc1495d5bec8763da6f011" + } + Frame { + msec: 1072 + hash: "9dc68483218335afe41aa3cd052a98b5" + } + Frame { + msec: 1088 + hash: "31105c455418a3284700cf9c88571507" + } + Frame { + msec: 1104 + hash: "72724947167a1ac600aaa1d7f331f7ec" + } + Frame { + msec: 1120 + hash: "a4a1243326de6b9e93948fcb22fecac4" + } + Frame { + msec: 1136 + hash: "c3e26e62f12dd658f21a0330fefb0533" + } + Frame { + msec: 1152 + hash: "15d85b4a9ad761a911bbaa3e0c4b2b61" + } + Frame { + msec: 1168 + hash: "bce1400b437cc43b8ff57b1a5fbc9551" + } + Frame { + msec: 1184 + hash: "5d05848afcd8f697c1b3762f00a759f6" + } + Frame { + msec: 1200 + hash: "6c83f68ea72cd54793149f4c9e759d44" + } + Frame { + msec: 1216 + hash: "5206b93666e51cee3e25a7a85e27b5b8" + } + Frame { + msec: 1232 + hash: "a3ef5c76efece4455e5ad12bcc8bd8f5" + } + Frame { + msec: 1248 + hash: "c36c6ee7b6c8074f5dc1af7446fad1ad" + } + Frame { + msec: 1264 + hash: "bb0887f1f10548bb53f0dc1ffeec25ee" + } + Frame { + msec: 1280 + hash: "ebffe547a7c3528e5deddc590510506d" + } + Frame { + msec: 1296 + hash: "18962faef1a1a1207a3c6783116154a2" + } + Frame { + msec: 1312 + hash: "8aaa876e4a6c4de04e557f35ddd4fb61" + } + Frame { + msec: 1328 + hash: "c66123bb4e01ce267629f5b50d147db1" + } + Frame { + msec: 1344 + hash: "334e5acf84d90e70ca3085b9d5e057a7" + } + Frame { + msec: 1360 + hash: "9bb49ddcc775307c3c1159908323e010" + } + Frame { + msec: 1376 + hash: "1b3cfb8b6b6c39a34ea86a66ea1cc6b1" + } + Frame { + msec: 1392 + hash: "d2a68c6eb2b05390ab1049137f96f227" + } + Frame { + msec: 1408 + hash: "91e254fd2376ba35a283b18b947ca1a8" + } + Frame { + msec: 1424 + hash: "fe94e2e8b4978390e9e8cbfe77dfc241" + } + Frame { + msec: 1440 + hash: "e3d32b73c5c50e7aa59f4e4725de170e" + } + Frame { + msec: 1456 + hash: "a73b90254d7da5557cc3941db0017a65" + } + Frame { + msec: 1472 + hash: "9aa49cce5d63f8dd6409995ac6d91d63" + } + Frame { + msec: 1488 + hash: "0ba674df46accec28a3c1b81e656adc7" + } + Frame { + msec: 1504 + hash: "025a45417b8c75d47b5dac6c5ef913e9" + } + Frame { + msec: 1520 + hash: "742527b97c7f580b0b7ff9d6aa105d31" + } + Frame { + msec: 1536 + hash: "965ec8315d45894e704fcc5a3efc8c55" + } + Frame { + msec: 1552 + hash: "6abdd59e6bd2c31124eab254418a5322" + } + Frame { + msec: 1568 + hash: "9f6d06b176c55fa292e7f0ef4b5cd1cb" + } + Frame { + msec: 1584 + hash: "05eba8c6e02c0d4af49e59b3346c9e68" + } + Frame { + msec: 1600 + hash: "3c4215f6253aba836516cd51368bc471" + } + Frame { + msec: 1616 + hash: "c6339a290007c0106cb18ecef5b7392b" + } + Frame { + msec: 1632 + hash: "39a4bcd2ce84035f9db70f196ca00971" + } + Frame { + msec: 1648 + hash: "b75a4be472583c3b893fc894ebe7d4d8" + } + Frame { + msec: 1664 + hash: "d1efebbe748c43b3c1241753612e100d" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 195; y: 95 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1680 + hash: "f6f3ad64fb71ffb68a5ea0375cc94bae" + } + Frame { + msec: 1696 + hash: "778ecbafb5d235edde1683cabe3c3cfe" + } + Frame { + msec: 1712 + hash: "5a41b9196fe4a97e6ba2400806299bd8" + } + Frame { + msec: 1728 + hash: "1c8ddbc5910e35be389a1cb34fab9dec" + } + Frame { + msec: 1744 + hash: "5e8b236c00087a067d366afde67184f3" + } + Frame { + msec: 1760 + hash: "b7308837c5d7950dc81abec1340b4582" + } + Frame { + msec: 1776 + hash: "bbe9f0b030efa716f34a05f0af929c66" + } + Frame { + msec: 1792 + hash: "cd393fc19a30d896bfe62aa0000308f8" + } + Frame { + msec: 1808 + hash: "c390f5b1bcff54de203490d8f2616fcd" + } + Frame { + msec: 1824 + hash: "b5da2ea467c334dd13c75b811b94efb1" + } + Frame { + msec: 1840 + hash: "49887c9312c3a4dfc2d9719f47c83a15" + } + Frame { + msec: 1856 + hash: "7f077703e49f154d01c12a44f53469c5" + } + Frame { + msec: 1872 + hash: "7be4130ed767f0e0bf41c3bebf050cac" + } + Frame { + msec: 1888 + hash: "cc1590486c172000557b76c6eadb51e0" + } + Frame { + msec: 1904 + hash: "7ccd05236d9c1f8af0e9645404326122" + } + Frame { + msec: 1920 + hash: "2da165bf7e868b53b85bb630649ddc3e" + } + Frame { + msec: 1936 + image: "follow.2.png" + } + Frame { + msec: 1952 + hash: "2b6a24b6ceeaa956527c872af70fb5f9" + } + Frame { + msec: 1968 + hash: "8c882de21f4ed0fb68433c19b114c3f8" + } + Frame { + msec: 1984 + hash: "f75226c58726a687079d0d24e865ee6f" + } + Frame { + msec: 2000 + hash: "2fa9b69fe85b4e1361ba260545c10e06" + } + Frame { + msec: 2016 + hash: "6d513bc03f2798fbce1a0790969da6b5" + } + Frame { + msec: 2032 + hash: "7e359e605483493e9a865f6eb912c394" + } + Frame { + msec: 2048 + hash: "497c7c82c24408dcaff5ec981d3d4f35" + } + Frame { + msec: 2064 + hash: "8738b024cf75ef970ffe20166e85141c" + } + Frame { + msec: 2080 + hash: "014b805eb1ecf2ea1cd61727bfd1ca08" + } + Frame { + msec: 2096 + hash: "a81cde60979300f397054ea017382114" + } + Frame { + msec: 2112 + hash: "c46183b5224e762335eea98d9da65465" + } + Frame { + msec: 2128 + hash: "11afbb88994f298a1fed6575fae3d7fd" + } + Frame { + msec: 2144 + hash: "0195fa503143561d9ae3ffe68739ca3f" + } + Frame { + msec: 2160 + hash: "6d298df37d2116eb9a62b58853cb3344" + } + Frame { + msec: 2176 + hash: "1660865f00ea9adf94c8e56c7a8a73b2" + } + Frame { + msec: 2192 + hash: "9835b5527b84e8e8a8fea2bdf9653a99" + } + Frame { + msec: 2208 + hash: "ec1158b83daa9e98437abc9ce90b70f0" + } + Frame { + msec: 2224 + hash: "11ce5e37747e05ff5f5071b13324ce9e" + } + Frame { + msec: 2240 + hash: "6d7d427d5a15a31fd395f26c94ea455e" + } + Frame { + msec: 2256 + hash: "828949e0fbdb7c79719fb533febb5b35" + } + Frame { + msec: 2272 + hash: "7ef7f73ef6a59c9210cfa37df3894cb1" + } + Frame { + msec: 2288 + hash: "e74bec397b32ba2934ffdde23a3d60c6" + } + Frame { + msec: 2304 + hash: "09c2ca9c22e9b77bc166b4567b29bca7" + } + Frame { + msec: 2320 + hash: "44d87983f33c4e03f4be70b406bb9bd9" + } + Frame { + msec: 2336 + hash: "92844b36c2f30e618f04bfbc5cfbcad6" + } + Frame { + msec: 2352 + hash: "0245f39a8966c4addb3f8dbcee93cd3f" + } + Frame { + msec: 2368 + hash: "eb1e81cfa29295d4b1522c69d4501f51" + } + Frame { + msec: 2384 + hash: "2af9c3bea11b25c0f6c2b780d533a968" + } + Frame { + msec: 2400 + hash: "5062e9ab29c4a7a9657a4d29249ca822" + } + Frame { + msec: 2416 + hash: "d7652ddc85d3be3bb3a2fc268ae9bc29" + } + Frame { + msec: 2432 + hash: "7c924bf2ad6167db439723679b373a3a" + } + Frame { + msec: 2448 + hash: "a93b61dd26a2ca72100b747ac3ed81b6" + } + Frame { + msec: 2464 + hash: "5fedc849d3d21e0acf0ab4a4815a1285" + } + Frame { + msec: 2480 + hash: "4313d2458f4bede8d3b02ac60135e728" + } + Frame { + msec: 2496 + hash: "0f09e81d89262b569c56a9c876f3898d" + } + Frame { + msec: 2512 + hash: "ea932789ded14fc5c8bae565b67d004c" + } + Frame { + msec: 2528 + hash: "fd1f7b9b51f1284fee4d777ef83bba3f" + } + Frame { + msec: 2544 + hash: "e98b884a1ec8ce4b4dc20749b85b571e" + } + Frame { + msec: 2560 + hash: "d144072bb87bb88750b9df9cd92f7a4b" + } + Frame { + msec: 2576 + hash: "9d8ad80d3367292d7e89d67cf49862b8" + } + Frame { + msec: 2592 + hash: "c09b89e71e862da15d2b9edb0e00aa7b" + } + Frame { + msec: 2608 + hash: "551277add3f8f09951d9c8f55ccd40f7" + } + Frame { + msec: 2624 + hash: "1d0be0e7108516869374a9b985fd7543" + } + Frame { + msec: 2640 + hash: "12e7cfb6c4a26af54c4b35182294a7b7" + } + Frame { + msec: 2656 + hash: "a666a5a59d5854973668798eb8d508ba" + } + Frame { + msec: 2672 + hash: "420d2e21461dc45f134b7dfa11d04d25" + } + Frame { + msec: 2688 + hash: "95f848874899fb58a81c62b5921cf857" + } + Frame { + msec: 2704 + hash: "fa3ea7a0f90ca549cc9a857f0647b061" + } + Frame { + msec: 2720 + hash: "cbc5338de6157cd5dad511b246f5093b" + } + Frame { + msec: 2736 + hash: "e26b43c83197abab3746830bbfacc0f4" + } + Frame { + msec: 2752 + hash: "5225e854ff2763e562dee2810331d560" + } + Frame { + msec: 2768 + hash: "a1d114ea67233ac4c6351e18e3afa64e" + } + Frame { + msec: 2784 + hash: "bc9f12af2d0816bb84fd5040ed29bdad" + } + Frame { + msec: 2800 + hash: "d9337da38caa4ad3385249602a830df3" + } + Frame { + msec: 2816 + hash: "6ce20e0c89181b0f11e609b248da71d7" + } + Frame { + msec: 2832 + hash: "bbc8337950a78c7bfa48aab2635120a8" + } + Frame { + msec: 2848 + hash: "0e28ade7f52f3c27e1dbdd6e98be8c7d" + } + Frame { + msec: 2864 + hash: "0e28ade7f52f3c27e1dbdd6e98be8c7d" + } + Frame { + msec: 2880 + hash: "b496af17513d60d4028bd7402fbfba93" + } + Frame { + msec: 2896 + image: "follow.3.png" + } + Frame { + msec: 2912 + hash: "29aa7ce0fb1aa350753d3ec6da05bdf9" + } + Frame { + msec: 2928 + hash: "fde474797d8105d9d004a7020e010fa4" + } + Frame { + msec: 2944 + hash: "5a553d9a4bd2ef5d86f5eb37a863d28f" + } + Frame { + msec: 2960 + hash: "2dcbf6c84abd49529f0b5d85bfb74808" + } + Frame { + msec: 2976 + hash: "e96ec3b7d37bbf4c9ca297ad5afde31c" + } + Frame { + msec: 2992 + hash: "9d824068affe32c143226b0b530206fc" + } + Frame { + msec: 3008 + hash: "3e85f0ace68cffed47f4c9b00145f0f0" + } + Frame { + msec: 3024 + hash: "540b8e1e2bee7d2ba5e29fd3b1086cd1" + } + Frame { + msec: 3040 + hash: "0786585d11934c5e4a7e965eaac9a152" + } + Frame { + msec: 3056 + hash: "8271705df2ca697f4343007a7810d4ac" + } + Frame { + msec: 3072 + hash: "b98e1cd20ab2e4239f35d04df5e5175a" + } + Frame { + msec: 3088 + hash: "ab1a7eaa5c5d919ee76cba405d0dd4cd" + } + Frame { + msec: 3104 + hash: "52682386448379a395dc6c541224b7d4" + } + Frame { + msec: 3120 + hash: "31dffcb9da94dfc085ab8c561404c248" + } + Frame { + msec: 3136 + hash: "f3703eed8ebf9ece776ebe51e4c60ae6" + } + Frame { + msec: 3152 + hash: "1126b90345bb42691cd17f37ecec6bdb" + } + Frame { + msec: 3168 + hash: "7a63ab96d1c8d4992c03a6f59bba4e7e" + } + Frame { + msec: 3184 + hash: "91f4a00c9a7ea6164b334aa4b90da862" + } + Frame { + msec: 3200 + hash: "485471140f6a5336837377612e7a85bf" + } + Frame { + msec: 3216 + hash: "96881b4021aff05020e0a9342fbae75d" + } + Frame { + msec: 3232 + hash: "9891326646c3da4ff250aab69c862f96" + } + Frame { + msec: 3248 + hash: "f00f36bbb5a828824c596ee6f85bec2f" + } + Frame { + msec: 3264 + hash: "f00f36bbb5a828824c596ee6f85bec2f" + } + Frame { + msec: 3280 + hash: "f00f36bbb5a828824c596ee6f85bec2f" + } + Frame { + msec: 3296 + hash: "f00f36bbb5a828824c596ee6f85bec2f" + } + Frame { + msec: 3312 + hash: "9891326646c3da4ff250aab69c862f96" + } + Frame { + msec: 3328 + hash: "c766238db55f4704c2f29a6be6ee6907" + } + Frame { + msec: 3344 + hash: "0254665427dcbd1c155bc954cc7aa7cd" + } + Frame { + msec: 3360 + hash: "33ae1012816b997ef5c61c03ccfcc590" + } + Frame { + msec: 3376 + hash: "4c7857bbbcb9aa812fc2503af2b395cf" + } + Frame { + msec: 3392 + hash: "3a570e4af992d35e55923cea23c3c11b" + } + Frame { + msec: 3408 + hash: "533ef554538005512ce37c73c6def722" + } + Frame { + msec: 3424 + hash: "f863fa215d0642708bfa82780c766dc4" + } + Frame { + msec: 3440 + hash: "fcca3ec34521c4b9087a102ba1e47293" + } + Frame { + msec: 3456 + hash: "47d67cd74cb96b12801842b288a8b9ff" + } + Frame { + msec: 3472 + hash: "34c5ea76f297ec68cba70521caa468e4" + } + Frame { + msec: 3488 + hash: "7be247cc7a4032ff0478fca1a2aace8a" + } + Frame { + msec: 3504 + hash: "3ade2a1a48edef15f522b9fc016e137e" + } + Frame { + msec: 3520 + hash: "8b37b9d123504931d82bb06f6981bade" + } + Frame { + msec: 3536 + hash: "5eb39825003f405f353f629e236b3395" + } + Frame { + msec: 3552 + hash: "c4550722260c4a30ab1176c7e5cb62bf" + } + Frame { + msec: 3568 + hash: "bd33e3ecd4b59cd659588c0298b61095" + } + Frame { + msec: 3584 + hash: "4b3a62bff0019df7412aa2e1c07c0a23" + } + Frame { + msec: 3600 + hash: "a9b98adcc3350febbb89dbf725b81436" + } + Frame { + msec: 3616 + hash: "66eb8c84e75141d1575caf7d3cbc1ceb" + } + Frame { + msec: 3632 + hash: "238f2b1dc5bf5b65e827c860f9ee76b5" + } + Frame { + msec: 3648 + hash: "6d1fed0697370b2a2163c369fe559739" + } + Frame { + msec: 3664 + hash: "04ea478c785586d900bbe3472371bbc7" + } + Frame { + msec: 3680 + hash: "ba429e711c9363eebfb20e641fa44c84" + } + Frame { + msec: 3696 + hash: "0129dfba166ffcbaa15087467c864068" + } + Frame { + msec: 3712 + hash: "3fb340c874eee94e8baa1453b37c3fb5" + } + Frame { + msec: 3728 + hash: "068c51d99c458f3edefe3371f46de260" + } + Frame { + msec: 3744 + hash: "dd1e04ed3d610c2712158d73ee2c5b9d" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 195; y: 95 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 3760 + hash: "840154afb9e7e0c859c66667bb6944b6" + } + Frame { + msec: 3776 + hash: "239c2e33800e386b468a95341d0e23f4" + } + Frame { + msec: 3792 + hash: "0a00515f2d297362862c1a5cf6519845" + } + Frame { + msec: 3808 + hash: "f855df3495e44291aed8f085163c804b" + } + Frame { + msec: 3824 + hash: "b4eb31e48c65550bb78d175b48e0e9fb" + } + Frame { + msec: 3840 + hash: "70243664f9db83614e5972fc18ee81a1" + } + Frame { + msec: 3856 + image: "follow.4.png" + } + Frame { + msec: 3872 + hash: "c48ce2a4cf28ab706b9c097bddc74c27" + } + Frame { + msec: 3888 + hash: "754a957e0df02839dd2fe33fefb7a721" + } + Frame { + msec: 3904 + hash: "ec3ebe7b941af9bf2163634d7f15e8aa" + } + Frame { + msec: 3920 + hash: "a76423ff2184cd9dac47abf7ae52ce5a" + } + Frame { + msec: 3936 + hash: "559bec54f51c36c6e90004ca5e77c23c" + } + Frame { + msec: 3952 + hash: "dc6fdd6a867a675afcb58f7052605614" + } + Frame { + msec: 3968 + hash: "b2fb0dbbec01490243f37fe5f80ab6c7" + } + Frame { + msec: 3984 + hash: "2bc1df7a913b1948ee7bb77eeaa55aa2" + } + Frame { + msec: 4000 + hash: "82c6430d85c6a94c4b55a9529d2bc78f" + } + Frame { + msec: 4016 + hash: "463e70dc9a9bdabdc158199bdcd7d2fa" + } + Frame { + msec: 4032 + hash: "c1e9553327f060b70caa713bf3015342" + } + Frame { + msec: 4048 + hash: "42f7f505d4e5ef316240e4f287a039bf" + } + Frame { + msec: 4064 + hash: "200500f600ffe43c5ad4d057bcfc0831" + } + Frame { + msec: 4080 + hash: "22e78edb813f7830776b2603b0aaae5c" + } + Frame { + msec: 4096 + hash: "32ebf3490832fd0693b1b922b4501251" + } + Frame { + msec: 4112 + hash: "1be622caa5ef94f87e2ec8297b6e1caa" + } + Frame { + msec: 4128 + hash: "d1480529e0cb94c51c412109663e5fab" + } + Frame { + msec: 4144 + hash: "e55e627d6d13b647f35233f18f0cbe89" + } + Frame { + msec: 4160 + hash: "87d7b349cd2898de7686e5f1a14f6338" + } + Frame { + msec: 4176 + hash: "2ac974836ee5e6092b55fcda20d7c35d" + } + Frame { + msec: 4192 + hash: "53867256c1dac4de2f02af1ae000b49f" + } + Frame { + msec: 4208 + hash: "08623509e9e5089fdaa1af2bf9a77eb1" + } + Frame { + msec: 4224 + hash: "e4692f42c12593ee865048aef00cbeb2" + } + Frame { + msec: 4240 + hash: "981ad6459e3e7483bb323ab4bc514630" + } + Frame { + msec: 4256 + hash: "79e8adfcdc9d6dae0d2b6a69e8e322fa" + } + Frame { + msec: 4272 + hash: "58f967a607972faa9daa13402eeb9912" + } + Frame { + msec: 4288 + hash: "1fd5b002b049132565b6a963fb7b3bb6" + } + Frame { + msec: 4304 + hash: "a16c96598f47404ec5f4ef55e87a1e70" + } + Frame { + msec: 4320 + hash: "3c632899804812c93c7edd3e3f3d2bac" + } + Frame { + msec: 4336 + hash: "af0eb810e0273f9bacb082d9f90612df" + } + Frame { + msec: 4352 + hash: "728d7ac4a5410482c7d86d03c2d8a996" + } + Frame { + msec: 4368 + hash: "416e76064f2be71a03eddddf61a33cb0" + } + Frame { + msec: 4384 + hash: "c41f20b4ac9a7b34eefd066f77ea351a" + } + Frame { + msec: 4400 + hash: "821d51db415a210b09ebdf8d861aadf2" + } + Frame { + msec: 4416 + hash: "9394266815a52f1779858bb088d557dc" + } + Frame { + msec: 4432 + hash: "cc475d1589665414e5aef051ec237ef4" + } + Frame { + msec: 4448 + hash: "a95f3b8128faa7820f36391fa9bd579f" + } + Frame { + msec: 4464 + hash: "d52687293a11891c364de52525039203" + } + Frame { + msec: 4480 + hash: "5333dc4f65b2f1e066edcd23f7621bd7" + } + Frame { + msec: 4496 + hash: "797bb5e27b2fe2b733a54402433901b4" + } + Frame { + msec: 4512 + hash: "84c610cdff7f8b04a34977216e37847d" + } + Frame { + msec: 4528 + hash: "0317f0406a566b2851c8bda62900e40c" + } + Frame { + msec: 4544 + hash: "6538ecd7abd35234c5cc5c2a17249fc1" + } + Frame { + msec: 4560 + hash: "f9019150a132eb5f5cfafcd5337aff7a" + } + Frame { + msec: 4576 + hash: "0f0136fffbc65c02cee249ece4c8c0ef" + } + Frame { + msec: 4592 + hash: "0027e0d236b8b33a451a0cc35e81b4ce" + } + Frame { + msec: 4608 + hash: "ac2f86b2d4f29f223fb78440d67ccd31" + } + Frame { + msec: 4624 + hash: "a6eb112a10c849e337f816ee408f22a6" + } + Frame { + msec: 4640 + hash: "dafbb01f2615a2513310478ebe484a05" + } + Frame { + msec: 4656 + hash: "17c400c4c29652dc278980ab578b75b3" + } + Frame { + msec: 4672 + hash: "48696c02a2a4839b893a4c0b431b78a3" + } + Frame { + msec: 4688 + hash: "04e05c7e722e53299d24cd0f1b7d17ee" + } + Frame { + msec: 4704 + hash: "55d158f13ffc7ccde5ee368656d2830b" + } + Frame { + msec: 4720 + hash: "fa478e1575acedae023322a520171a5b" + } + Frame { + msec: 4736 + hash: "e2147ddd6e19fde80bb76da24011400c" + } + Frame { + msec: 4752 + hash: "44ee0144db4c55aa90d2a931d83a895e" + } + Frame { + msec: 4768 + hash: "552e87bbce4ad48006c899052a2c8cad" + } + Frame { + msec: 4784 + hash: "3b6efe225303566f751c3f884ac8c069" + } + Frame { + msec: 4800 + hash: "3a7175916d1dc103506061607b910550" + } + Frame { + msec: 4816 + image: "follow.5.png" + } + Frame { + msec: 4832 + hash: "b2e5d5c14b02a13bca62673f87e85627" + } + Frame { + msec: 4848 + hash: "bd89a911d6fb13e4e841f8ee5b8b42af" + } + Frame { + msec: 4864 + hash: "89795784185e83d0299e656f2eec73c8" + } + Frame { + msec: 4880 + hash: "5b6d6fe78f341bdf0eb4bedfe3d975d0" + } + Frame { + msec: 4896 + hash: "e246bc451ee48e16ef6dee20d6256e9c" + } + Frame { + msec: 4912 + hash: "8c1bc37b1b268743aa314247ea949ef5" + } + Frame { + msec: 4928 + hash: "04f34203c34dc87efc708bfb232663df" + } + Frame { + msec: 4944 + hash: "d37a48545e81970d16951e3388f0ff8c" + } + Frame { + msec: 4960 + hash: "9411e846c9f59cc915288efb59d4c9de" + } + Frame { + msec: 4976 + hash: "6ee179741ac74837708afb55943f15bd" + } + Frame { + msec: 4992 + hash: "f626fc3166bd5b01171271ae9bfa9b22" + } + Frame { + msec: 5008 + hash: "e22898b2c0c566bbf531223234f98327" + } + Frame { + msec: 5024 + hash: "1343d90c5eae70713cd49110fe61237b" + } + Frame { + msec: 5040 + hash: "493d9322da6d01979a3f1a120c265f8c" + } + Frame { + msec: 5056 + hash: "defccc76caf3a7c7c67e8abf5ccc2def" + } + Frame { + msec: 5072 + hash: "fe3cad9227fcfa7ba2238465078f2ac7" + } + Frame { + msec: 5088 + hash: "66ebfeee3a63323c7d8b949db9aafd7e" + } + Frame { + msec: 5104 + hash: "805820b382d005894f9a615004b97b0d" + } + Frame { + msec: 5120 + hash: "eee1620f47bb071de8a9c788d1fd258e" + } + Frame { + msec: 5136 + hash: "f5a7d9a81fcfc8cfb9e7cc8ead0f1ff8" + } + Frame { + msec: 5152 + hash: "249903ee123090b27019350f120c8b79" + } + Frame { + msec: 5168 + hash: "019793a363c905809af32bf34ef52ec0" + } + Frame { + msec: 5184 + hash: "4f5ad5a3ebb6eca73dd7567199d07b08" + } + Frame { + msec: 5200 + hash: "fdc1b42d50c7a5c45458498788ff0abd" + } + Frame { + msec: 5216 + hash: "cc091469598cad28d0a00690f1acb412" + } + Frame { + msec: 5232 + hash: "5c8757e1f8f34a31d8b3717b64b84c07" + } + Frame { + msec: 5248 + hash: "5da75559f60eac1b9f518ed55a174e5b" + } + Frame { + msec: 5264 + hash: "1214c08daec4dcfb27690fdc18f2ac28" + } + Frame { + msec: 5280 + hash: "87d92c1ba694d0cf187d8616b0f622f0" + } + Frame { + msec: 5296 + hash: "d4af63638fe69b6c4f087a935351057e" + } + Frame { + msec: 5312 + hash: "0573c41f34c2c117cada987e4ee813a5" + } + Frame { + msec: 5328 + hash: "f179ef4b7bf0f915e25ffd8168a9126f" + } + Frame { + msec: 5344 + hash: "1618bf7c94e7898392eb5ffbf44b8aff" + } + Frame { + msec: 5360 + hash: "5af24b902e3729d544f70c77e189b8a7" + } + Frame { + msec: 5376 + hash: "4e5789404e58113cc2d8aa737a03ab58" + } + Frame { + msec: 5392 + hash: "e4bf91a249e47597e959bbaf25f0724d" + } + Frame { + msec: 5408 + hash: "39a3e3d6269522ed57a0e37319ab94d5" + } + Frame { + msec: 5424 + hash: "f2e2e47922e7e058e14537a0455cd77f" + } + Frame { + msec: 5440 + hash: "64abb3f2c9e05fd1dd7490d11c74f06a" + } + Frame { + msec: 5456 + hash: "a9bf45c29536ca34c42aa916747b485b" + } + Frame { + msec: 5472 + hash: "da21839b6635e5c4e0a589d163e62752" + } + Frame { + msec: 5488 + hash: "f31e49258bcbb2a144daa320e4567df1" + } + Frame { + msec: 5504 + hash: "f96c5b39f94bf2ac1e3f4de96767d720" + } + Frame { + msec: 5520 + hash: "281b90d1056803093cc37f30465f0e73" + } + Frame { + msec: 5536 + hash: "d63a2424e1947328957ad8f5f0bec043" + } + Frame { + msec: 5552 + hash: "bd510a0de7df02b1b5741824b6f90944" + } + Frame { + msec: 5568 + hash: "47dc4e5ff91cb84c89dd0fc0459f75f2" + } + Frame { + msec: 5584 + hash: "4bc46b5e116dd30e1db4d4bb650ed6ed" + } + Frame { + msec: 5600 + hash: "c6964b89f1962f120028057d1c588694" + } + Frame { + msec: 5616 + hash: "39a77544a1c88b68cb63da9a8910a35e" + } + Frame { + msec: 5632 + hash: "bd8ac21d7a507a8e195437ccac254ecc" + } + Frame { + msec: 5648 + hash: "7b39b2667a8f8efae20ec8696e35dbc4" + } + Frame { + msec: 5664 + hash: "7b39b2667a8f8efae20ec8696e35dbc4" + } + Frame { + msec: 5680 + hash: "8628f4f24670d17965fec40a02e0196f" + } + Frame { + msec: 5696 + hash: "515903d9896a853cb18cc7b7c45c1cce" + } + Frame { + msec: 5712 + hash: "b7a3f70bedcb3f90a2e294b447e05f70" + } + Frame { + msec: 5728 + hash: "8e8b104ef82b1e219021aa38276f8b45" + } + Frame { + msec: 5744 + hash: "70abe79da860bebd2d17a8c7abb20b4e" + } + Frame { + msec: 5760 + hash: "d99af176fb6cf9d9cbcf7cf4286a165c" + } + Frame { + msec: 5776 + image: "follow.6.png" + } + Frame { + msec: 5792 + hash: "67809c7daad6716d0a664c52de9906ce" + } + Frame { + msec: 5808 + hash: "29a27fd59b7316ce305803482686ea58" + } + Frame { + msec: 5824 + hash: "25b9ca40d1d6208d026e5c965923f8fb" + } + Frame { + msec: 5840 + hash: "126b1542415aea11dbb35492be4f66aa" + } + Frame { + msec: 5856 + hash: "26ca7034536e0e690236797df740f19a" + } + Frame { + msec: 5872 + hash: "fec9db60af63a4712b0da037cf1d89cd" + } + Frame { + msec: 5888 + hash: "d9b7e2729c75ca0c0f33b542525c4880" + } + Frame { + msec: 5904 + hash: "89149d16b893ea432b6d0fb05ead48cb" + } + Frame { + msec: 5920 + hash: "8e389d2ca706277ce06e1da557e2e6c1" + } + Frame { + msec: 5936 + hash: "fc5c74473410da1ddd451c5901572172" + } + Frame { + msec: 5952 + hash: "54514970eadff9362d31499a737e4c95" + } + Frame { + msec: 5968 + hash: "d5953bc29532ec49c20ee552c8756ba1" + } + Frame { + msec: 5984 + hash: "5f03be3ed5824e6a6f8f371ce6a47997" + } + Frame { + msec: 6000 + hash: "0431e2ec4765167d0099c59df400f3fd" + } + Frame { + msec: 6016 + hash: "0431e2ec4765167d0099c59df400f3fd" + } + Frame { + msec: 6032 + hash: "403e1f235770f2b7c8b1b2e86aea69a5" + } + Frame { + msec: 6048 + hash: "403e1f235770f2b7c8b1b2e86aea69a5" + } + Frame { + msec: 6064 + hash: "32ff9f959598972f5a264418587dca1f" + } + Frame { + msec: 6080 + hash: "b4c7c07e52a684f7ce21e47a4d66356a" + } + Frame { + msec: 6096 + hash: "e0f214bed2c3a31f473952929b8f3ea9" + } + Frame { + msec: 6112 + hash: "15328b8a205965f3f29fc63a6a8ac8ed" + } + Frame { + msec: 6128 + hash: "72c46ed63633e6879373f4783df25d8b" + } + Frame { + msec: 6144 + hash: "3f2570289df823446f85bbd8d620db4d" + } + Frame { + msec: 6160 + hash: "df9451c6634d72e6f794e962b3591086" + } + Frame { + msec: 6176 + hash: "773e10bbd133e64457e7ddbc73a10fc2" + } + Frame { + msec: 6192 + hash: "c79abb97eb86761b69053d77156dffd4" + } + Frame { + msec: 6208 + hash: "d927934b19ffd55ea7cea1916983351a" + } + Frame { + msec: 6224 + hash: "ae5058d935c1e44d103be66921b19e77" + } + Frame { + msec: 6240 + hash: "b6a1446b6be054d5785ba52ac23f8aa8" + } + Frame { + msec: 6256 + hash: "3dffbffded44249fdbe58aecd24ab97f" + } + Frame { + msec: 6272 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6288 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6304 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Frame { + msec: 6320 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Frame { + msec: 6336 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Frame { + msec: 6352 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Frame { + msec: 6368 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Frame { + msec: 6384 + hash: "cb2b0ddbc7b8485fbf32a537e5a98d0e" + } + Frame { + msec: 6400 + hash: "cb2b0ddbc7b8485fbf32a537e5a98d0e" + } + Frame { + msec: 6416 + hash: "cb2b0ddbc7b8485fbf32a537e5a98d0e" + } + Frame { + msec: 6432 + hash: "cb2b0ddbc7b8485fbf32a537e5a98d0e" + } + Frame { + msec: 6448 + hash: "cb2b0ddbc7b8485fbf32a537e5a98d0e" + } + Frame { + msec: 6464 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6480 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6496 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6512 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6528 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6544 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6560 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6576 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6592 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6608 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6624 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6640 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6656 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6672 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6688 + hash: "fa87436d5e51122022a005d815f97c32" + } + Frame { + msec: 6704 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6720 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6736 + image: "follow.7.png" + } + Frame { + msec: 6752 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6768 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6784 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6800 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6816 + hash: "da52e87ccd157c0330c07e480b8b0c06" + } + Frame { + msec: 6832 + hash: "257ce16f529b99f28beb2e57625f52ee" + } + Key { + type: 6 + key: 16777249 + modifiers: 67108864 + text: "" + autorep: false + count: 1 + } + Frame { + msec: 6848 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6864 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6880 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6896 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6912 + hash: "56445ab8554a23a786b70e4fd9f40451" + } + Frame { + msec: 6928 + hash: "56445ab8554a23a786b70e4fd9f40451" + } +} diff --git a/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml b/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml index 70ee988..ccadea0 100644 --- a/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml +++ b/tests/auto/declarative/qmlvisual/selftest_noimages/data/selftest_noimages.qml @@ -196,6 +196,14 @@ VisualTest { Frame { msec: 1024 } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 53; y: 47 + modifiers: 0 + sendToViewport: true + } Frame { msec: 1040 } @@ -214,6 +222,14 @@ VisualTest { Frame { msec: 1120 } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 53; y: 47 + modifiers: 0 + sendToViewport: true + } Frame { msec: 1136 } @@ -259,14 +275,6 @@ VisualTest { Frame { msec: 1360 } - Mouse { - type: 2 - button: 1 - buttons: 1 - x: 77; y: 7 - modifiers: 0 - sendToViewport: true - } Frame { msec: 1376 } @@ -282,14 +290,6 @@ VisualTest { Frame { msec: 1440 } - Mouse { - type: 3 - button: 1 - buttons: 0 - x: 77; y: 7 - modifiers: 0 - sendToViewport: true - } Frame { msec: 1456 } @@ -353,118 +353,4 @@ VisualTest { Frame { msec: 1776 } - Frame { - msec: 1792 - } - Frame { - msec: 1808 - } - Frame { - msec: 1824 - } - Frame { - msec: 1840 - } - Frame { - msec: 1856 - } - Frame { - msec: 1872 - } - Frame { - msec: 1888 - } - Frame { - msec: 1904 - } - Frame { - msec: 1920 - } - Frame { - msec: 1936 - } - Frame { - msec: 1952 - } - Frame { - msec: 1968 - } - Frame { - msec: 1984 - } - Frame { - msec: 2000 - } - Frame { - msec: 2016 - } - Frame { - msec: 2032 - } - Frame { - msec: 2048 - } - Frame { - msec: 2064 - } - Frame { - msec: 2080 - } - Frame { - msec: 2096 - } - Frame { - msec: 2112 - } - Frame { - msec: 2128 - } - Frame { - msec: 2144 - } - Frame { - msec: 2160 - } - Frame { - msec: 2176 - } - Frame { - msec: 2192 - } - Frame { - msec: 2208 - } - Frame { - msec: 2224 - } - Frame { - msec: 2240 - } - Frame { - msec: 2256 - } - Frame { - msec: 2272 - } - Frame { - msec: 2288 - } - Frame { - msec: 2304 - } - Frame { - msec: 2320 - } - Frame { - msec: 2336 - } - Frame { - msec: 2352 - } - Frame { - msec: 2368 - } - Frame { - msec: 2384 - } } -- cgit v0.12 From c3a4ce70e588620393a9a4189f3e429622103406 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Wed, 5 Jan 2011 17:52:36 +1000 Subject: Test importing version > registered with a matching base class rev. Consieder the case of a BaseClass registered with version 1.1 and the created Class registered with version 1.0. When version 1.1 is imported the Class should be able to use BaseClass properties from version 1.1. This currently fails. Task-number: QTBUG-13451 --- .../qdeclarativelanguage/data/versionedbase.qml | 8 +++++++ .../declarative/qdeclarativelanguage/testtypes.cpp | 3 +++ .../declarative/qdeclarativelanguage/testtypes.h | 26 ++++++++++++++++++++++ .../tst_qdeclarativelanguage.cpp | 17 +++++++++++++- 4 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml diff --git a/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml b/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml new file mode 100644 index 0000000..8c74715 --- /dev/null +++ b/tests/auto/declarative/qdeclarativelanguage/data/versionedbase.qml @@ -0,0 +1,8 @@ +import QtQuick 1.0 +import Test 1.1 + +MySubclass +{ + prop1: 10 + prop2: 10 +} diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp index 217f54a..18e3885 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.cpp @@ -62,6 +62,9 @@ void registerTypes() // MyRevisionedSubclass 1.1 uses MyRevisionedClass revision 1 qmlRegisterType("Test",1,1,"MyRevisionedSubclass"); + // Only version 1.0, but its super class is registered in version 1.1 also + qmlRegisterType("Test",1,0,"MySubclass"); + qmlRegisterCustomType("Test", 1, 0, "MyCustomParserType", new MyCustomParserTypeParser); qmlRegisterTypeNotAvailable("Test",1,0,"UnavailableType", "UnavailableType is unavailable for testing"); diff --git a/tests/auto/declarative/qdeclarativelanguage/testtypes.h b/tests/auto/declarative/qdeclarativelanguage/testtypes.h index 4508d01..48055e8 100644 --- a/tests/auto/declarative/qdeclarativelanguage/testtypes.h +++ b/tests/auto/declarative/qdeclarativelanguage/testtypes.h @@ -757,10 +757,36 @@ protected: qreal m_p4; }; +class MySubclass : public MyRevisionedClass +{ + Q_OBJECT + Q_PROPERTY(qreal prop5 READ prop5 WRITE setProp5 NOTIFY prop5Changed) + +public: + MySubclass() : m_p5(5) {} + + qreal prop5() const { return m_p5; } + void setProp5(qreal p) { + if (p != m_p5) { + m_p5 = p; + emit prop5Changed(); + } + } + + Q_INVOKABLE void method5() { } + +signals: + void prop5Changed(); + +protected: + qreal m_p5; +}; + QML_DECLARE_TYPE(MyRevisionedBaseClassRegistered) QML_DECLARE_TYPE(MyRevisionedBaseClassUnregistered) QML_DECLARE_TYPE(MyRevisionedClass) QML_DECLARE_TYPE(MyRevisionedSubclass) +QML_DECLARE_TYPE(MySubclass) diff --git a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp index 298d802..a139d5e 100644 --- a/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp +++ b/tests/auto/declarative/qdeclarativelanguage/tst_qdeclarativelanguage.cpp @@ -1935,7 +1935,8 @@ void tst_qdeclarativelanguage::revisions() delete object; } { - QDeclarativeComponent component(&engine, TEST_FILE("revisionssub11.qml")); + QDeclarativeEngine myEngine; + QDeclarativeComponent component(&myEngine, TEST_FILE("revisionssub11.qml")); VERIFY_ERRORS(0); MyRevisionedSubclass *object = qobject_cast(component.create()); @@ -1948,6 +1949,20 @@ void tst_qdeclarativelanguage::revisions() delete object; } + { + // If this is uncommented it will work + // qmlRegisterType("Test",1,1,"MySubclass"); + QDeclarativeComponent component(&engine, TEST_FILE("versionedbase.qml")); + QEXPECT_FAIL("", "Class version 1.0 with base class version 1.1 registered", Abort); + VERIFY_ERRORS(0); + MySubclass *object = qobject_cast(component.create()); + QVERIFY(object != 0); + + QCOMPARE(object->prop1(), 10.0); + QCOMPARE(object->prop2(), 10.0); + + delete object; + } } void tst_qdeclarativelanguage::initTestCase() -- cgit v0.12 From 7a54885b1df9baf793374e3cb9fdf8be93ee7c80 Mon Sep 17 00:00:00 2001 From: Eskil Abrahamsen Blomfeldt Date: Tue, 4 Jan 2011 15:35:58 +0100 Subject: Fix regression in text rendering in OpenGL2 engine Change 532115bcaa370af827a5cbad017b272842c5aacf introduced a regression by fixing a typo in the QT_OPENGL_ES_2 macro. This caused a broken and untested code path to be used in the GLES2 case. Since the QImage scanlines are 32 bit aligned, QImage::width() cannot be used when copying the data. Rather than pass in bytesPerLine() to the GL function, I opted to revert to the proven behavior, where the pad bytes are never read by GL but each scanline is copied separately, to avoid further regressions on different hardware. This also seems like the more correct approach, as the pad bytes should ideally not be copied into the cache texture. Reviewed-by: Samuel --- src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp index 1b879c3..ad1bf31 100644 --- a/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp +++ b/src/opengl/gl2paintengineex/qtextureglyphcache_gl.cpp @@ -293,9 +293,6 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) if (mask.format() == QImage::Format_RGB32) { glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_BGRA, GL_UNSIGNED_BYTE, mask.bits()); } else { -#ifdef QT_OPENGL_ES_2 - glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y, maskWidth, maskHeight, GL_ALPHA, GL_UNSIGNED_BYTE, mask.bits()); -#else // glTexSubImage2D() might cause some garbage to appear in the texture if the mask width is // not a multiple of four bytes. The bug appeared on a computer with 32-bit Windows Vista // and nVidia GeForce 8500GT. GL_UNPACK_ALIGNMENT is set to four bytes, 'mask' has a @@ -307,7 +304,6 @@ void QGLTextureGlyphCache::fillTexture(const Coord &c, glyph_t glyph) for (int i = 0; i < maskHeight; ++i) glTexSubImage2D(GL_TEXTURE_2D, 0, c.x, c.y + i, maskWidth, 1, GL_ALPHA, GL_UNSIGNED_BYTE, mask.scanLine(i)); -#endif } } -- cgit v0.12 From c196394ce305a7343cc5f51f166b76746f9d9903 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Wed, 5 Jan 2011 11:47:12 +0100 Subject: Fixed merge conflict --- doc/src/declarative/anchor-layout.qdoc | 4 ---- 1 file changed, 4 deletions(-) diff --git a/doc/src/declarative/anchor-layout.qdoc b/doc/src/declarative/anchor-layout.qdoc index 70381de..11acbad 100644 --- a/doc/src/declarative/anchor-layout.qdoc +++ b/doc/src/declarative/anchor-layout.qdoc @@ -28,14 +28,10 @@ /*! \page qml-anchor-layout.html \target anchor-layout -<<<<<<< HEAD \contentspage QML Features \previouspage {Using QML Positioner and Repeater Items}{Component Layouts} \nextpage {QML Mouse Events}{Mouse Events} \title Anchor-based Layout in QML -======= -\title Anchor-Based Layout in QML ->>>>>>> f44f7084a3020ed8e249644d5b5e07f74cb7b070 \section1 Overview -- cgit v0.12 From 4836d809f5dc3fc9e978ef630c0e5c8847c171a7 Mon Sep 17 00:00:00 2001 From: Prasanth Ullattil Date: Wed, 5 Jan 2011 15:19:07 +0100 Subject: Add support for QMetaType::QVariant in ActiveQt Previously when we convert the typename "QVariant" to QVaraint::Type, it returns QVariant::Invalid. From Qt 4.7 onwards, it will return QVariant::UserType. Task-number: QTBUG-15157 Reviewed-by: Martin Petersson --- src/activeqt/container/qaxbase.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/activeqt/container/qaxbase.cpp b/src/activeqt/container/qaxbase.cpp index 7692749..c29eac6 100644 --- a/src/activeqt/container/qaxbase.cpp +++ b/src/activeqt/container/qaxbase.cpp @@ -1671,12 +1671,11 @@ private: QVariant::Type vartype = QVariant::nameToType(prop.type); switch(vartype) { case QVariant::Invalid: + case QVariant::UserType: if (prop.type == "QVariant") { prop.typeId |= 0xff << 24; break; } - // fall through - case QVariant::UserType: if (QMetaType::type(prop.type) == -1) qWarning("QAxBase: Unsupported property type: %s", prop.type.data()); break; -- cgit v0.12 From 0c07af230d016aab6e416ae57594189ab9953101 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 19 Nov 2010 15:24:35 +0100 Subject: cookie jar code: enhance security by keeping track of effective TLDs The problem was the following: According to the cookie RFC, domains must have at least one dot in their name for setting a cookie (e.g. domain example.com can set a cookie for ".example.com" but not for ".com"). The problem is: Following this rule, one could still set "supercookies" for e.g. ".co.uk". The solution is to generate a table from http://publicsuffix.org which maintains a list of all "effective" TLDs like e.g. ".co.uk". Reviewed-by: Olivier Goffart Task-number: QTBUG-14706 --- src/network/access/access.pri | 1 + src/network/access/qnetworkcookiejar.cpp | 63 +- src/network/access/qnetworkcookiejar_p.h | 3 + src/network/access/qnetworkcookiejartlds_p.h | 6479 ++++++++++++++++++++ src/network/access/qnetworkcookiejartlds_p.h.INFO | 17 + .../qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 104 + .../cookiejar-generateTLDs.pro | 9 + util/network/cookiejar-generateTLDs/main.cpp | 161 + 8 files changed, 6825 insertions(+), 12 deletions(-) create mode 100644 src/network/access/qnetworkcookiejartlds_p.h create mode 100644 src/network/access/qnetworkcookiejartlds_p.h.INFO create mode 100644 util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro create mode 100644 util/network/cookiejar-generateTLDs/main.cpp diff --git a/src/network/access/access.pri b/src/network/access/access.pri index 6a0cd32..ce79b06 100644 --- a/src/network/access/access.pri +++ b/src/network/access/access.pri @@ -23,6 +23,7 @@ HEADERS += \ access/qnetworkcookie_p.h \ access/qnetworkcookiejar.h \ access/qnetworkcookiejar_p.h \ + access/qnetworkcookiejartlds_p.h \ access/qnetworkrequest.h \ access/qnetworkrequest_p.h \ access/qnetworkreply.h \ diff --git a/src/network/access/qnetworkcookiejar.cpp b/src/network/access/qnetworkcookiejar.cpp index 0b3a918..9cbeafe 100644 --- a/src/network/access/qnetworkcookiejar.cpp +++ b/src/network/access/qnetworkcookiejar.cpp @@ -40,6 +40,7 @@ ****************************************************************************/ #include "qnetworkcookiejar.h" +#include "qnetworkcookiejartlds_p.h" #include "qnetworkcookiejar_p.h" #include "QtNetwork/qnetworkcookie.h" @@ -157,7 +158,8 @@ static inline bool isParentDomain(QString domain, QString reference) jar. Default values for path and domain are taken from the \a url object. - Returns true if one or more cookes are set for url otherwise false. + Returns true if one or more cookies are set for \a url, + otherwise false. If a cookie already exists in the cookie jar, it will be overridden by those in \a cookieList. @@ -208,16 +210,14 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList &cookieLis QString domain = cookie.domain(); if (!(isParentDomain(domain, defaultDomain) - || isParentDomain(defaultDomain, domain))) { - continue; // not accepted - } - - // reject if domain is like ".com" - // (i.e., reject if domain does not contain embedded dots, see RFC 2109 section 4.3.2) - // this is just a rudimentary check and does not cover all cases - if (domain.lastIndexOf(QLatin1Char('.')) == 0) - continue; // not accepted - + || isParentDomain(defaultDomain, domain))) + continue; // not accepted + + // the check for effective TLDs makes the "embedded dot" rule from RFC 2109 section 4.3.2 + // redundant; the "leading dot" rule has been relaxed anyway, see above + // we remove the leading dot for this check + if (QNetworkCookieJarPrivate::isEffectiveTLD(domain.remove(0, 1))) + continue; // not accepted } QList::Iterator it = d->allCookies.begin(), @@ -250,7 +250,7 @@ bool QNetworkCookieJar::setCookiesFromUrl(const QList &cookieLis If more than one cookie with the same name is found, but with differing paths, the one with longer path is returned before the one with shorter path. In other words, this function returns - cookies sorted by path length. + cookies sorted decreasingly by path length. The default QNetworkCookieJar class implements only a very basic security policy (it makes sure that the cookies' domain and path @@ -304,4 +304,43 @@ QList QNetworkCookieJar::cookiesForUrl(const QUrl &url) const return result; } +bool QNetworkCookieJarPrivate::isEffectiveTLD(const QString &domain) +{ + // for domain 'foo.bar.com': + // 1. return if TLD table contains 'foo.bar.com' + if (containsTLDEntry(domain)) + return true; + + if (domain.contains(QLatin1Char('.'))) { + int count = domain.size() - domain.indexOf(QLatin1Char('.')); + QString wildCardDomain; + wildCardDomain.reserve(count + 1); + wildCardDomain.append(QLatin1Char('*')); + wildCardDomain.append(domain.right(count)); + // 2. if table contains '*.bar.com', + // test if table contains '!foo.bar.com' + if (containsTLDEntry(wildCardDomain)) { + QString exceptionDomain; + exceptionDomain.reserve(domain.size() + 1); + exceptionDomain.append(QLatin1Char('!')); + exceptionDomain.append(domain); + return (! containsTLDEntry(exceptionDomain)); + } + } + return false; +} + +bool QNetworkCookieJarPrivate::containsTLDEntry(const QString &entry) +{ + int index = qHash(entry) % tldCount; + int currentDomainIndex = tldIndices[index]; + while (currentDomainIndex < tldIndices[index+1]) { + QString currentEntry = QString::fromUtf8(tldData + currentDomainIndex); + if (currentEntry == entry) + return true; + currentDomainIndex += qstrlen(tldData + currentDomainIndex) + 1; // +1 for the ending \0 + } + return false; +} + QT_END_NAMESPACE diff --git a/src/network/access/qnetworkcookiejar_p.h b/src/network/access/qnetworkcookiejar_p.h index 5802115..74870be 100644 --- a/src/network/access/qnetworkcookiejar_p.h +++ b/src/network/access/qnetworkcookiejar_p.h @@ -63,6 +63,9 @@ class QNetworkCookieJarPrivate: public QObjectPrivate public: QList allCookies; + static bool Q_AUTOTEST_EXPORT isEffectiveTLD(const QString &domain); + static bool containsTLDEntry(const QString &entry); + Q_DECLARE_PUBLIC(QNetworkCookieJar) }; diff --git a/src/network/access/qnetworkcookiejartlds_p.h b/src/network/access/qnetworkcookiejartlds_p.h new file mode 100644 index 0000000..fc1c75f --- /dev/null +++ b/src/network/access/qnetworkcookiejartlds_p.h @@ -0,0 +1,6479 @@ +// Version: MPL 1.1/GPL 2.0/LGPL 2.1 +// +// The contents of this file are subject to the Mozilla Public License Version +// 1.1 (the "License"); you may not use this file except in compliance with +// the License. You may obtain a copy of the License at +// http://www.mozilla.org/MPL/ +// +// Software distributed under the License is distributed on an "AS IS" basis, +// WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License +// for the specific language governing rights and limitations under the +// License. +// +// The Original Code is the Public Suffix List. +// +// The Initial Developer of the Original Code is +// Jo Hermans . +// Portions created by the Initial Developer are Copyright (C) 2007 +// the Initial Developer. All Rights Reserved. +// +// Contributor(s): +// Ruben Arakelyan +// Gervase Markham +// Pamela Greene +// David Triendl +// Jothan Frakes +// The kind representatives of many TLD registries +// +// Alternatively, the contents of this file may be used under the terms of +// either the GNU General Public License Version 2 or later (the "GPL"), or +// the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), +// in which case the provisions of the GPL or the LGPL are applicable instead +// of those above. If you wish to allow use of your version of this file only +// under the terms of either the GPL or the LGPL, and not to allow others to +// use your version of this file under the terms of the MPL, indicate your +// decision by deleting the provisions above and replace them with the notice +// and other provisions required by the GPL or the LGPL. If you do not delete +// the provisions above, a recipient may use your version of this file under +// the terms of any one of the MPL, the GPL or the LGPL. +// + +#ifndef QNETWORKCOOKIEJARTLD_P_H +#define QNETWORKCOOKIEJARTLD_P_H + +// +// W A R N I N G +// ------------- +// +// This file is not part of the Qt API. It exists for the convenience +// of the Network Access framework. This header file may change from +// version to version without notice, or even be removed. +// +// We mean it. +// + +QT_BEGIN_NAMESPACE + +// note to maintainer: +// this file should be updated before each release -> +// for instructions see the program at +// util/network/cookiejar-generateTLDs + +static const quint16 tldCount = 3949; +static const quint16 tldIndices[] = { +0, +7, +14, +14, +20, +51, +61, +93, +100, +100, +116, +159, +167, +180, +180, +193, +234, +234, +234, +255, +255, +255, +280, +280, +287, +287, +295, +303, +313, +326, +326, +380, +393, +413, +419, +419, +419, +424, +438, +438, +469, +515, +515, +515, +534, +534, +557, +557, +557, +557, +572, +572, +572, +579, +587, +597, +612, +612, +624, +636, +648, +662, +687, +709, +714, +740, +766, +789, +789, +805, +805, +810, +815, +815, +824, +824, +831, +857, +869, +891, +891, +916, +916, +916, +927, +934, +964, +971, +987, +987, +987, +1008, +1008, +1016, +1016, +1030, +1030, +1052, +1075, +1075, +1082, +1087, +1115, +1135, +1135, +1135, +1172, +1178, +1178, +1178, +1202, +1207, +1220, +1220, +1266, +1266, +1266, +1266, +1272, +1290, +1316, +1316, +1332, +1332, +1339, +1339, +1352, +1352, +1389, +1389, +1408, +1415, +1437, +1444, +1489, +1489, +1502, +1502, +1512, +1518, +1539, +1555, +1562, +1584, +1598, +1607, +1607, +1607, +1632, +1652, +1652, +1658, +1658, +1675, +1682, +1709, +1733, +1748, +1776, +1783, +1783, +1790, +1797, +1826, +1850, +1850, +1856, +1880, +1887, +1901, +1921, +1947, +1961, +1967, +1967, +1967, +1972, +1986, +1986, +1986, +2009, +2029, +2029, +2047, +2061, +2075, +2075, +2075, +2075, +2075, +2075, +2082, +2082, +2124, +2124, +2129, +2162, +2162, +2162, +2236, +2256, +2263, +2276, +2283, +2313, +2313, +2347, +2380, +2387, +2387, +2387, +2431, +2438, +2445, +2452, +2459, +2459, +2469, +2490, +2516, +2527, +2540, +2540, +2586, +2610, +2630, +2630, +2653, +2660, +2669, +2693, +2693, +2710, +2710, +2719, +2719, +2734, +2740, +2740, +2753, +2753, +2763, +2770, +2775, +2782, +2789, +2802, +2820, +2827, +2827, +2841, +2855, +2855, +2865, +2872, +2884, +2884, +2919, +2937, +2955, +2962, +3012, +3042, +3073, +3083, +3083, +3100, +3105, +3112, +3131, +3131, +3166, +3180, +3187, +3194, +3211, +3218, +3223, +3233, +3249, +3259, +3268, +3314, +3314, +3324, +3324, +3336, +3336, +3336, +3336, +3350, +3363, +3376, +3398, +3416, +3445, +3464, +3488, +3488, +3497, +3545, +3552, +3552, +3552, +3566, +3573, +3573, +3573, +3581, +3581, +3603, +3603, +3615, +3621, +3621, +3683, +3683, +3710, +3710, +3716, +3716, +3748, +3770, +3791, +3803, +3810, +3817, +3833, +3846, +3846, +3852, +3876, +3876, +3882, +3903, +3910, +3939, +3939, +3939, +3947, +3962, +3962, +3981, +3994, +4021, +4030, +4042, +4085, +4085, +4096, +4096, +4104, +4123, +4123, +4123, +4143, +4154, +4164, +4194, +4194, +4194, +4205, +4205, +4222, +4238, +4301, +4309, +4322, +4331, +4331, +4331, +4331, +4331, +4347, +4365, +4375, +4375, +4385, +4398, +4412, +4430, +4430, +4437, +4447, +4463, +4472, +4472, +4472, +4484, +4484, +4484, +4484, +4484, +4490, +4490, +4511, +4511, +4522, +4522, +4522, +4522, +4528, +4528, +4534, +4551, +4551, +4551, +4564, +4583, +4583, +4611, +4611, +4611, +4622, +4622, +4649, +4668, +4677, +4692, +4692, +4692, +4705, +4723, +4723, +4723, +4729, +4729, +4743, +4743, +4750, +4750, +4763, +4770, +4776, +4776, +4776, +4793, +4811, +4811, +4811, +4821, +4821, +4841, +4857, +4891, +4897, +4903, +4903, +4903, +4919, +4935, +4942, +4958, +4958, +4975, +4975, +4975, +4985, +4985, +5020, +5032, +5032, +5040, +5053, +5068, +5079, +5079, +5101, +5115, +5115, +5135, +5154, +5161, +5161, +5168, +5168, +5184, +5210, +5210, +5238, +5255, +5278, +5285, +5308, +5318, +5327, +5327, +5333, +5333, +5340, +5348, +5355, +5366, +5377, +5384, +5408, +5415, +5422, +5435, +5442, +5482, +5482, +5482, +5482, +5498, +5527, +5534, +5541, +5572, +5572, +5572, +5579, +5591, +5602, +5602, +5621, +5621, +5646, +5664, +5671, +5671, +5681, +5696, +5707, +5716, +5716, +5723, +5723, +5732, +5742, +5742, +5763, +5770, +5776, +5790, +5790, +5797, +5806, +5816, +5832, +5882, +5882, +5882, +5882, +5893, +5934, +5934, +5965, +5965, +5980, +5980, +5980, +5980, +6007, +6017, +6034, +6051, +6065, +6075, +6075, +6091, +6097, +6097, +6109, +6109, +6109, +6122, +6147, +6168, +6168, +6191, +6191, +6191, +6191, +6191, +6198, +6217, +6224, +6224, +6231, +6245, +6252, +6252, +6270, +6270, +6284, +6305, +6315, +6322, +6322, +6322, +6329, +6329, +6329, +6353, +6361, +6361, +6375, +6391, +6405, +6405, +6415, +6431, +6431, +6431, +6431, +6458, +6475, +6475, +6475, +6482, +6489, +6496, +6496, +6503, +6520, +6520, +6520, +6527, +6527, +6544, +6561, +6573, +6573, +6580, +6580, +6587, +6587, +6592, +6592, +6592, +6592, +6599, +6599, +6612, +6633, +6649, +6649, +6669, +6676, +6683, +6683, +6713, +6720, +6727, +6736, +6736, +6746, +6770, +6807, +6814, +6827, +6846, +6846, +6864, +6864, +6864, +6864, +6881, +6888, +6888, +6888, +6914, +6935, +6935, +6935, +6953, +6959, +6966, +6983, +6983, +6983, +7013, +7023, +7023, +7023, +7023, +7037, +7044, +7058, +7079, +7086, +7123, +7134, +7155, +7168, +7178, +7203, +7227, +7236, +7258, +7265, +7274, +7274, +7303, +7303, +7314, +7314, +7345, +7352, +7367, +7377, +7388, +7388, +7402, +7402, +7409, +7421, +7421, +7467, +7484, +7484, +7484, +7491, +7532, +7532, +7539, +7546, +7546, +7553, +7573, +7573, +7573, +7580, +7587, +7594, +7594, +7594, +7606, +7606, +7637, +7637, +7637, +7664, +7664, +7664, +7677, +7684, +7701, +7723, +7723, +7723, +7723, +7734, +7734, +7734, +7748, +7748, +7748, +7748, +7759, +7759, +7775, +7775, +7782, +7789, +7817, +7824, +7831, +7836, +7865, +7865, +7876, +7901, +7901, +7908, +7918, +7938, +7945, +7945, +7957, +7964, +7979, +7986, +7994, +8007, +8007, +8014, +8021, +8061, +8061, +8071, +8088, +8131, +8138, +8153, +8160, +8160, +8160, +8175, +8183, +8197, +8211, +8211, +8211, +8243, +8243, +8243, +8243, +8259, +8259, +8259, +8259, +8259, +8266, +8275, +8281, +8281, +8281, +8281, +8288, +8288, +8309, +8309, +8309, +8330, +8330, +8330, +8330, +8337, +8343, +8343, +8360, +8370, +8370, +8380, +8380, +8386, +8386, +8397, +8415, +8415, +8428, +8454, +8460, +8475, +8492, +8526, +8554, +8554, +8583, +8583, +8583, +8598, +8607, +8617, +8617, +8642, +8652, +8652, +8652, +8662, +8688, +8688, +8704, +8704, +8747, +8765, +8775, +8783, +8811, +8835, +8835, +8835, +8850, +8859, +8884, +8910, +8919, +8952, +8978, +8978, +8991, +8991, +8991, +8999, +8999, +8999, +9030, +9030, +9030, +9030, +9030, +9041, +9048, +9048, +9054, +9054, +9054, +9086, +9108, +9108, +9119, +9119, +9130, +9144, +9152, +9161, +9174, +9194, +9207, +9207, +9207, +9232, +9242, +9242, +9271, +9290, +9308, +9308, +9308, +9308, +9320, +9333, +9343, +9356, +9379, +9379, +9379, +9395, +9395, +9406, +9419, +9419, +9419, +9419, +9450, +9485, +9485, +9497, +9497, +9505, +9517, +9528, +9528, +9551, +9564, +9586, +9586, +9608, +9608, +9626, +9626, +9626, +9653, +9653, +9681, +9681, +9681, +9698, +9698, +9698, +9714, +9729, +9737, +9737, +9765, +9765, +9765, +9765, +9765, +9825, +9844, +9866, +9880, +9880, +9880, +9880, +9886, +9895, +9895, +9895, +9895, +9895, +9913, +9913, +9924, +9958, +9958, +9967, +9975, +9975, +9975, +9981, +9998, +9998, +9998, +10012, +10036, +10036, +10066, +10079, +10097, +10121, +10133, +10142, +10142, +10142, +10156, +10173, +10173, +10173, +10196, +10205, +10205, +10205, +10205, +10218, +10234, +10240, +10240, +10240, +10264, +10273, +10286, +10286, +10286, +10286, +10299, +10299, +10309, +10309, +10339, +10358, +10358, +10374, +10374, +10390, +10390, +10413, +10413, +10439, +10461, +10467, +10467, +10467, +10492, +10492, +10501, +10528, +10528, +10528, +10539, +10583, +10583, +10583, +10613, +10613, +10619, +10628, +10645, +10645, +10645, +10650, +10671, +10687, +10709, +10709, +10709, +10709, +10709, +10727, +10727, +10727, +10727, +10733, +10733, +10768, +10768, +10773, +10780, +10788, +10788, +10797, +10797, +10835, +10835, +10845, +10852, +10861, +10861, +10861, +10861, +10861, +10861, +10861, +10875, +10888, +10907, +10907, +10907, +10920, +10920, +10932, +10946, +10977, +10977, +10997, +11008, +11037, +11059, +11059, +11059, +11067, +11067, +11067, +11067, +11067, +11077, +11091, +11102, +11102, +11112, +11125, +11129, +11129, +11154, +11154, +11154, +11164, +11164, +11189, +11189, +11189, +11189, +11189, +11196, +11196, +11227, +11238, +11247, +11256, +11265, +11265, +11286, +11307, +11330, +11337, +11378, +11378, +11389, +11413, +11454, +11469, +11475, +11475, +11475, +11475, +11503, +11503, +11503, +11503, +11534, +11534, +11550, +11550, +11557, +11557, +11557, +11557, +11574, +11585, +11585, +11603, +11626, +11643, +11643, +11643, +11643, +11663, +11663, +11682, +11696, +11696, +11696, +11696, +11706, +11706, +11706, +11706, +11723, +11723, +11757, +11757, +11773, +11795, +11813, +11836, +11836, +11883, +11903, +11952, +11965, +11965, +11984, +11997, +12008, +12008, +12008, +12024, +12043, +12065, +12071, +12099, +12129, +12140, +12140, +12146, +12161, +12161, +12161, +12161, +12167, +12167, +12180, +12186, +12208, +12226, +12243, +12243, +12252, +12252, +12274, +12289, +12302, +12302, +12313, +12313, +12313, +12313, +12358, +12358, +12358, +12369, +12375, +12391, +12391, +12391, +12391, +12405, +12410, +12416, +12416, +12436, +12436, +12436, +12443, +12443, +12462, +12477, +12492, +12492, +12503, +12519, +12525, +12531, +12571, +12571, +12591, +12591, +12601, +12641, +12641, +12641, +12657, +12657, +12657, +12699, +12699, +12699, +12712, +12728, +12744, +12761, +12769, +12782, +12793, +12823, +12836, +12851, +12863, +12890, +12900, +12900, +12900, +12910, +12910, +12924, +12924, +12924, +12924, +12924, +12952, +12984, +13003, +13038, +13038, +13056, +13056, +13056, +13056, +13074, +13081, +13093, +13103, +13103, +13112, +13119, +13132, +13132, +13132, +13141, +13151, +13183, +13193, +13206, +13206, +13206, +13236, +13252, +13267, +13267, +13294, +13307, +13307, +13307, +13343, +13349, +13349, +13349, +13375, +13375, +13375, +13384, +13384, +13384, +13393, +13393, +13393, +13402, +13414, +13425, +13445, +13467, +13485, +13499, +13509, +13528, +13528, +13549, +13549, +13559, +13570, +13570, +13570, +13570, +13598, +13637, +13647, +13647, +13661, +13673, +13682, +13687, +13694, +13694, +13720, +13733, +13742, +13748, +13771, +13795, +13795, +13814, +13821, +13821, +13855, +13862, +13862, +13862, +13874, +13874, +13897, +13909, +13909, +13947, +13947, +13952, +13952, +13970, +13979, +13979, +13979, +14008, +14049, +14049, +14049, +14049, +14049, +14049, +14060, +14083, +14083, +14091, +14101, +14101, +14101, +14101, +14118, +14136, +14195, +14195, +14195, +14213, +14213, +14232, +14232, +14253, +14253, +14258, +14275, +14275, +14304, +14311, +14311, +14318, +14318, +14318, +14318, +14318, +14318, +14325, +14325, +14345, +14345, +14379, +14389, +14422, +14422, +14422, +14422, +14435, +14441, +14441, +14460, +14460, +14471, +14471, +14481, +14495, +14495, +14495, +14502, +14502, +14502, +14502, +14524, +14533, +14541, +14552, +14552, +14552, +14552, +14563, +14563, +14568, +14568, +14585, +14595, +14602, +14628, +14628, +14645, +14672, +14678, +14697, +14697, +14734, +14757, +14764, +14771, +14771, +14771, +14796, +14815, +14822, +14845, +14861, +14861, +14861, +14873, +14873, +14873, +14902, +14920, +14920, +14926, +14926, +14926, +14941, +14949, +14949, +14949, +14949, +14949, +14960, +14960, +14971, +14971, +14998, +15003, +15003, +15003, +15013, +15013, +15027, +15027, +15027, +15043, +15053, +15063, +15074, +15083, +15093, +15093, +15121, +15121, +15128, +15128, +15144, +15144, +15144, +15144, +15165, +15170, +15170, +15170, +15170, +15170, +15170, +15170, +15186, +15206, +15206, +15206, +15224, +15236, +15236, +15252, +15258, +15258, +15258, +15258, +15264, +15277, +15288, +15307, +15307, +15318, +15328, +15328, +15334, +15334, +15363, +15399, +15399, +15422, +15438, +15447, +15447, +15456, +15456, +15456, +15495, +15495, +15495, +15495, +15511, +15511, +15530, +15557, +15566, +15582, +15590, +15590, +15604, +15604, +15625, +15635, +15655, +15655, +15655, +15655, +15655, +15665, +15675, +15675, +15675, +15675, +15675, +15682, +15682, +15682, +15694, +15719, +15749, +15749, +15794, +15794, +15837, +15854, +15854, +15861, +15861, +15861, +15861, +15884, +15900, +15911, +15931, +15931, +15931, +15931, +15931, +15963, +15963, +15996, +16006, +16013, +16024, +16034, +16049, +16049, +16049, +16059, +16059, +16059, +16059, +16059, +16059, +16059, +16064, +16075, +16104, +16104, +16117, +16124, +16124, +16124, +16124, +16130, +16145, +16159, +16190, +16193, +16196, +16210, +16224, +16243, +16255, +16261, +16280, +16283, +16292, +16295, +16295, +16301, +16304, +16322, +16325, +16328, +16349, +16355, +16382, +16408, +16414, +16414, +16414, +16458, +16477, +16480, +16485, +16488, +16514, +16520, +16530, +16530, +16546, +16562, +16597, +16603, +16622, +16622, +16646, +16669, +16672, +16715, +16715, +16715, +16718, +16718, +16727, +16733, +16752, +16770, +16787, +16794, +16810, +16827, +16840, +16850, +16876, +16901, +16901, +16901, +16916, +16919, +16926, +16943, +16972, +16978, +16978, +16978, +16981, +17008, +17008, +17016, +17053, +17053, +17053, +17053, +17072, +17086, +17105, +17139, +17153, +17162, +17162, +17177, +17177, +17177, +17177, +17195, +17218, +17221, +17221, +17237, +17276, +17276, +17300, +17319, +17339, +17357, +17370, +17383, +17400, +17407, +17419, +17439, +17439, +17449, +17465, +17475, +17504, +17527, +17527, +17534, +17548, +17564, +17564, +17598, +17598, +17601, +17630, +17649, +17669, +17669, +17679, +17686, +17757, +17776, +17796, +17810, +17840, +17840, +17877, +17884, +17884, +17911, +17936, +17970, +17980, +17995, +17995, +18008, +18011, +18036, +18075, +18097, +18097, +18104, +18115, +18115, +18129, +18134, +18141, +18141, +18157, +18180, +18190, +18217, +18224, +18252, +18284, +18284, +18296, +18299, +18312, +18322, +18338, +18348, +18348, +18363, +18372, +18387, +18387, +18390, +18402, +18445, +18445, +18445, +18466, +18479, +18479, +18498, +18508, +18511, +18511, +18511, +18511, +18511, +18526, +18558, +18586, +18622, +18643, +18670, +18686, +18710, +18720, +18739, +18739, +18742, +18745, +18771, +18774, +18777, +18791, +18813, +18816, +18822, +18839, +18845, +18851, +18854, +18878, +18881, +18896, +18896, +18899, +18926, +18937, +18940, +18953, +18963, +19010, +19010, +19017, +19046, +19060, +19060, +19087, +19095, +19101, +19101, +19128, +19146, +19157, +19157, +19188, +19198, +19205, +19223, +19230, +19255, +19280, +19280, +19283, +19292, +19301, +19320, +19323, +19323, +19341, +19341, +19365, +19378, +19381, +19394, +19423, +19433, +19440, +19466, +19490, +19490, +19490, +19497, +19504, +19511, +19511, +19518, +19545, +19568, +19575, +19575, +19583, +19586, +19592, +19592, +19609, +19622, +19629, +19641, +19641, +19656, +19673, +19700, +19723, +19733, +19746, +19759, +19769, +19782, +19789, +19795, +19831, +19834, +19841, +19851, +19854, +19880, +19895, +19898, +19898, +19911, +19922, +19950, +20020, +20030, +20059, +20062, +20089, +20107, +20151, +20154, +20175, +20205, +20208, +20229, +20229, +20255, +20261, +20261, +20283, +20335, +20362, +20385, +20392, +20392, +20392, +20392, +20418, +20418, +20418, +20418, +20443, +20446, +20446, +20452, +20452, +20467, +20467, +20489, +20489, +20498, +20525, +20554, +20560, +20575, +20589, +20589, +20589, +20614, +20652, +20659, +20659, +20668, +20679, +20679, +20679, +20685, +20685, +20685, +20685, +20685, +20685, +20696, +20733, +20760, +20766, +20769, +20792, +20792, +20792, +20792, +20813, +20813, +20813, +20813, +20826, +20826, +20846, +20862, +20880, +20887, +20901, +20908, +20933, +20938, +20958, +20969, +20978, +20978, +20978, +20985, +20985, +20985, +21000, +21010, +21010, +21014, +21026, +21033, +21041, +21041, +21051, +21051, +21064, +21071, +21113, +21120, +21120, +21127, +21134, +21142, +21164, +21164, +21164, +21188, +21195, +21208, +21215, +21226, +21226, +21226, +21238, +21249, +21255, +21255, +21265, +21279, +21296, +21301, +21315, +21321, +21331, +21331, +21331, +21337, +21343, +21343, +21351, +21351, +21361, +21368, +21383, +21383, +21389, +21413, +21437, +21449, +21462, +21478, +21506, +21534, +21546, +21546, +21557, +21580, +21595, +21595, +21595, +21595, +21626, +21626, +21646, +21670, +21676, +21688, +21688, +21716, +21731, +21762, +21762, +21762, +21762, +21762, +21783, +21789, +21799, +21828, +21828, +21837, +21845, +21868, +21874, +21874, +21880, +21880, +21889, +21901, +21910, +21941, +21941, +21959, +21959, +21959, +21966, +21966, +21972, +21972, +21995, +22011, +22043, +22043, +22051, +22051, +22060, +22060, +22060, +22074, +22086, +22086, +22099, +22099, +22120, +22120, +22134, +22144, +22150, +22158, +22164, +22164, +22171, +22199, +22210, +22210, +22210, +22220, +22228, +22228, +22239, +22261, +22304, +22304, +22312, +22349, +22349, +22349, +22357, +22381, +22381, +22390, +22390, +22390, +22390, +22402, +22413, +22413, +22422, +22422, +22445, +22445, +22445, +22456, +22456, +22469, +22479, +22501, +22512, +22528, +22528, +22528, +22528, +22528, +22528, +22528, +22540, +22540, +22546, +22546, +22546, +22546, +22569, +22591, +22591, +22591, +22591, +22610, +22655, +22655, +22667, +22667, +22677, +22677, +22692, +22692, +22702, +22702, +22702, +22717, +22736, +22750, +22755, +22780, +22785, +22822, +22844, +22859, +22871, +22909, +22949, +22962, +22973, +22979, +22988, +23007, +23027, +23035, +23072, +23082, +23082, +23109, +23116, +23130, +23158, +23166, +23166, +23172, +23177, +23189, +23219, +23219, +23250, +23273, +23281, +23281, +23281, +23281, +23281, +23287, +23287, +23299, +23305, +23315, +23315, +23321, +23328, +23334, +23355, +23355, +23355, +23355, +23355, +23366, +23390, +23396, +23396, +23396, +23396, +23402, +23418, +23424, +23424, +23438, +23446, +23446, +23446, +23500, +23525, +23569, +23592, +23592, +23592, +23605, +23614, +23614, +23614, +23627, +23633, +23657, +23673, +23673, +23673, +23689, +23689, +23701, +23701, +23701, +23713, +23713, +23713, +23738, +23758, +23775, +23775, +23794, +23794, +23803, +23803, +23803, +23803, +23813, +23826, +23845, +23845, +23845, +23845, +23872, +23872, +23872, +23888, +23888, +23900, +23900, +23906, +23906, +23906, +23906, +23906, +23924, +23924, +23924, +23930, +23930, +23939, +23949, +23971, +23971, +23971, +24000, +24012, +24042, +24042, +24042, +24042, +24042, +24070, +24076, +24094, +24094, +24094, +24123, +24123, +24123, +24134, +24150, +24150, +24150, +24150, +24150, +24150, +24155, +24179, +24179, +24189, +24189, +24189, +24198, +24198, +24218, +24218, +24218, +24234, +24251, +24257, +24276, +24305, +24321, +24321, +24321, +24334, +24334, +24334, +24349, +24356, +24361, +24372, +24372, +24372, +24388, +24396, +24396, +24402, +24410, +24410, +24428, +24428, +24450, +24450, +24467, +24485, +24495, +24495, +24495, +24507, +24507, +24514, +24531, +24531, +24531, +24531, +24531, +24537, +24537, +24558, +24572, +24584, +24584, +24601, +24601, +24607, +24615, +24615, +24632, +24632, +24632, +24632, +24661, +24676, +24676, +24724, +24751, +24751, +24774, +24774, +24783, +24793, +24793, +24793, +24813, +24819, +24819, +24826, +24826, +24842, +24858, +24872, +24872, +24890, +24890, +24890, +24890, +24890, +24890, +24890, +24890, +24890, +24906, +24906, +24917, +24928, +24947, +24947, +24947, +24947, +24947, +24947, +24947, +24947, +24947, +24963, +24983, +24991, +24991, +24991, +24991, +24991, +24991, +24991, +24991, +25007, +25007, +25007, +25007, +25007, +25007, +25007, +25030, +25040, +25040, +25040, +25040, +25040, +25059, +25097, +25132, +25149, +25159, +25169, +25169, +25169, +25192, +25192, +25192, +25192, +25205, +25205, +25216, +25221, +25221, +25233, +25233, +25240, +25250, +25256, +25273, +25273, +25303, +25321, +25321, +25321, +25333, +25333, +25333, +25333, +25370, +25370, +25402, +25418, +25418, +25439, +25439, +25454, +25454, +25454, +25463, +25477, +25526, +25526, +25526, +25526, +25545, +25562, +25572, +25572, +25582, +25582, +25582, +25597, +25610, +25634, +25641, +25641, +25641, +25668, +25668, +25675, +25707, +25727, +25727, +25741, +25756, +25756, +25779, +25811, +25811, +25811, +25817, +25817, +25817, +25827, +25827, +25827, +25827, +25827, +25836, +25836, +25836, +25836, +25850, +25850, +25860, +25884, +25901, +25922, +25936, +25946, +25969, +25969, +25969, +25969, +25975, +25975, +25987, +25987, +26065, +26065, +26065, +26084, +26084, +26103, +26128, +26141, +26151, +26169, +26169, +26169, +26180, +26191, +26191, +26191, +26197, +26197, +26205, +26211, +26235, +26235, +26235, +26235, +26235, +26235, +26245, +26245, +26259, +26259, +26259, +26259, +26284, +26284, +26325, +26325, +26355, +26364, +26364, +26402, +26418, +26418, +26425, +26432, +26432, +26454, +26504, +26513, +26525, +26525, +26525, +26525, +26525, +26545, +26545, +26571, +26590, +26597, +26597, +26597, +26597, +26597, +26639, +26648, +26659, +26666, +26672, +26672, +26672, +26672, +26672, +26694, +26701, +26701, +26701, +26724, +26724, +26746, +26753, +26774, +26774, +26774, +26774, +26806, +26824, +26824, +26830, +26852, +26882, +26882, +26889, +26889, +26889, +26889, +26889, +26889, +26903, +26911, +26918, +26918, +26928, +26948, +26948, +26970, +26970, +26985, +26996, +27045, +27045, +27058, +27058, +27068, +27068, +27104, +27155, +27155, +27155, +27155, +27155, +27172, +27172, +27172, +27172, +27189, +27195, +27195, +27223, +27223, +27223, +27223, +27244, +27290, +27322, +27332, +27364, +27371, +27371, +27371, +27401, +27401, +27417, +27417, +27431, +27470, +27470, +27470, +27470, +27484, +27484, +27484, +27484, +27484, +27496, +27496, +27515, +27515, +27543, +27560, +27576, +27604, +27622, +27631, +27631, +27638, +27649, +27672, +27682, +27682, +27682, +27707, +27717, +27724, +27732, +27755, +27755, +27755, +27768, +27768, +27783, +27789, +27799, +27799, +27799, +27818, +27826, +27838, +27848, +27848, +27848, +27855, +27862, +27862, +27896, +27921, +27921, +27943, +27954, +27954, +27976, +27976, +27976, +27985, +28002, +28012, +28019, +28034, +28034, +28046, +28068, +28097, +28122, +28122, +28131, +28137, +28151, +28151, +28172, +28190, +28196, +28211, +28211, +28264, +28273, +28286, +28324, +28324, +28324, +28354, +28354, +28361, +28397, +28417, +28417, +28424, +28435, +28461, +28461, +28470, +28483, +28483, +28483, +28483, +28483, +28483, +28483, +28515, +28531, +28531, +28549, +28575, +28575, +28575, +28582, +28599, +28615, +28630, +28630, +28672, +28711, +28723, +28723, +28731, +28752, +28752, +28752, +28763, +28763, +28775, +28775, +28775, +28775, +28775, +28775, +28805, +28814, +28830, +28861, +28882, +28882, +28902, +28918, +28937, +28952, +28959, +28998, +29009, +29009, +29009, +29009, +29019, +29019, +29019, +29019, +29019, +29057, +29069, +29076, +29076, +29076, +29076, +29076, +29082, +29082, +29082, +29117, +29117, +29117, +29117, +29134, +29134, +29159, +29159, +29185, +29185, +29196, +29196, +29242, +29248, +29256, +29280, +29301, +29307, +29307, +29307, +29314, +29314, +29338, +29356, +29367, +29367, +29381, +29391, +29399, +29399, +29414, +29434, +29434, +29441, +29473, +29484, +29503, +29520, +29520, +29548, +29565, +29572, +29572, +29572, +29572, +29572, +29597, +29597, +29620, +29655, +29660, +29660, +29660, +29667, +29674, +29688, +29698, +29705, +29728, +29740, +29740, +29761, +29761, +29767, +29780, +29787, +29794, +29794, +29807, +29820, +29820, +29820, +29820, +29832, +29844, +29855, +29855, +29855, +29867, +29867, +29867, +29867, +29881, +29881, +29905, +29905, +29905, +29923, +29923, +29948, +29948, +29948, +29976, +29986, +29996, +29996, +30030, +30030, +30054, +30054, +30070, +30070, +30070, +30077, +30077, +30087, +30107, +30107, +30115, +30141, +30178, +30178, +30201, +30201, +30201, +30207, +30229, +30239, +30254, +30268, +30277, +30311, +30323, +30323, +30331, +30331, +30331, +30331, +30331, +30353, +30365, +30374, +30374, +30374, +30380, +30380, +30380, +30380, +30410, +30410, +30410, +30443, +30443, +30453, +30462, +30472, +30472, +30472, +30472, +30472, +30472, +30489, +30500, +30500, +30500, +30532, +30532, +30553, +30577, +30599, +30599, +30609, +30640, +30640, +30640, +30664, +30676, +30676, +30676, +30692, +30719, +30728, +30728, +30742, +30742, +30749, +30749, +30760, +30770, +30770, +30783, +30783, +30783, +30804, +30847, +30847, +30847, +30847, +30857, +30857, +30857, +30857, +30875, +30875, +30895, +30895, +30921, +30926, +30926, +30926, +30945, +30945, +30945, +30945, +30959, +30959, +30959, +30959, +30972, +30972, +30984, +31011, +31011, +31048, +31056, +31056, +31070, +31077, +31077, +31110, +31110, +31115, +31122, +31139, +31159, +31159, +31165, +31171, +31171, +31197, +31204, +31211, +31211, +31221, +31228, +31228, +31245, +31245, +31245, +31252, +31265, +31265, +31265, +31265, +31294, +31305, +31320, +31333, +31333, +31333, +31343, +31350, +31357, +31369, +31369, +31379, +31385, +31391, +31407, +31407, +31407, +31423, +31423, +31423, +31434, +31454, +31470, +31511, +31521, +31521, +31521, +31542, +31582, +31582, +31597, +31597, +31597, +31614, +31623, +31645, +31645, +31661, +31661, +31669, +31669, +31676, +31676, +31706, +31720, +31726, +31743, +31785, +31804, +31817, +31817, +31835, +31846, +31863, +31885, +31885, +31896, +31907, +31907, +31907, +31922, +31922, +31929, +31929, +31929, +31936, +31943, +31949, +31949, +31949, +31959, +32006, +32024, +32031, +32031, +32038, +32063, +32095, +32095, +32105, +32105, +32105, +32105, +32105, +32125, +32134, +32140, +32176, +32185, +32195, +32195, +32195, +32195, +32202, +32202, +32218, +32236, +32259, +32294, +32300, +32305, +32305, +32305, +32323, +32337, +32352, +32359, +32374, +32381, +32388, +32388, +32388, +32402, +32402, +32402, +32402, +32418, +32428, +32428, +32428, +32450, +32450, +32450, +32462, +32467, +32480, +32480, +32480, +32487, +32502, +32509, +32525, +32560, +32570, +32583, +32597, +32623, +32637, +32644, +32667, +32707, +32725, +32725, +32747, +32747, +32751, +32758, +32789, +32807, +32824, +32824, +32824, +32824, +32843, +32843, +32850, +32876, +32908, +32915, +32946, +32965, +32965, +32982, +33002, +33009, +33029, +33064, +33084, +33098, +33098, +33098, +33098, +33110, +33110, +33151, +33158, +33180, +33198, +33205, +33227, +33227, +33237, +33237, +33253, +33258, +33277, +33292, +33315, +33315, +33333, +33348, +33348, +33348, +33348, +33348, +33348, +33348, +33355, +33355, +33355, +33390, +33408, +33423, +33437, +33452, +33458, +33465, +33480, +33480, +33487, +33494, +33504, +33511, +33551, +33551, +33558, +33589, +33595, +33595, +33602, +33627, +33644, +33668, +33668, +33668, +33676, +33676, +33716, +33728, +33747, +33747, +33769, +33775, +33789, +33803, +33803, +33810, +33810, +33810, +33820, +33820, +33820, +33820, +33843, +33843, +33843, +33879, +33889, +33889, +33889, +33903, +33917, +33931, +33959, +33993, +34000, +34014, +34037, +34043, +34055, +34055, +34077, +34083, +34090, +34099, +34099, +34115, +34115, +34133, +34140, +34167, +34172, +34184, +34221, +34245, +34252, +34252, +34259, +34318, +34318, +34325, +34325, +34352, +34400, +34415, +34422, +34422, +34431, +34438, +34445, +34445, +34473, +34473, +34489, +34489, +34489, +34489, +34499, +34499, +34499, +34516, +34536, +34551, +34564, +34580, +34580, +34580, +34589, +34589, +34589, +34613, +34648, +34648, +34648, +34655, +34664, +34681, +34681, +34698, +34698, +34720, +34736, +34749, +34749, +34765, +34778, +34785, +34795, +34819, +34819, +34829, +34841, +34848, +34854, +34854, +34854, +34878, +34894, +34894, +34900, +34917, +34934, +34940, +34970, +34998, +34998, +35004, +35004, +35012, +35012, +35012, +35020, +35020, +35032, +35038, +35062, +35062, +35062, +35068, +35068, +35082, +35092, +35096, +35107, +35118, +35134, +35155, +35155, +35166, +35178, +35178, +35195, +35201, +35201, +35201, +35226, +35226, +35226, +35226, +35256, +35262, +35272, +35280, +35299, +35332, +35354, +35354, +35354, +35370, +35386, +35417, +35417, +35460, +35473, +35478, +35495, +35504, +35504, +35518, +35552, +35589, +35624, +35624, +35637, +35637, +35643, +35643, +35669, +35682, +35695, +35702, +35709, +35709, +35726, +35739, +35749, +35756, +35756, +35778, +35803, +35810, +35829, +35883, +35899, +35905, +35911, +35911, +35923, +35947, +35954, +35980, +35987, +36034, +36052, +36063, +36095, +36106, +36106, +36113, +36120, +36140, +36140, +36153, +36160, +36160, +36167, +36203, +36203, +36218, +36218, +36225, +36253, +36259, +36284, +36296, +36310, +36324, +36331, +36344, +36367, +36367, +36367, +36412, +36412, +36422, +36463, +36463, +36463, +36479, +36490, +36513, +36520, +36520, +36527, +36527, +36527, +36540, +36574, +36594, +36594, +36605, +36621, +36621, +36641, +36641, +36641, +36659, +36682, +36682, +36682, +36682, +36705, +36705, +36705, +36720, +36720, +36755, +36755, +36771, +36771, +36771, +36788, +36806, +36835, +36845, +36875, +36875, +36903, +36921, +36928, +36928, +36940, +36940, +36940, +36966, +36966, +36973, +36983, +36998, +37004, +37014, +37024, +37024, +37032, +37038, +37038, +37061, +37074, +37074, +37091, +37098, +37105, +37105, +37133, +37141, +37141, +37148, +37191, +37191, +37197, +37197, +37210, +37224, +37224, +37231, +37250, +37257, +37273, +37273, +37280, +37287, +37294, +37300, +37307, +37330, +37348, +37348, +37359, +37359, +37359, +37377, +37392, +37398, +37412, +37431, +37469, +37486, +37508, +37517, +37535, +37535, +37542, +37542, +37549, +37549, +37549, +37549, +37556, +37576, +37576, +37583, +37590, +37597, +37604, +37604, +37621, +37635, +37676, +37676, +37704, +37711, +37728, +37728, +37737, +37737, +37737, +37750, +37757, +37778, +37785, +37785, +37819, +37826, +37833, +37843, +37850, +37869, +37914, +37921, +37935, +37942, +37949, +37982, +38013, +38013, +38013, +38023, +38057, +38077, +38097, +38110, +38117, +38123, +38133, +38133, +38133, +38140, +38140, +38148, +38159, +38179, +38192, +38205, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38218, +38225, +38225, +38230, +38246, +38258, +38280, +38287, +38294, +38294, +38294, +38301, +38318, +38318, +38340, +38371, +38371, +38384, +38420, +38440, +38453, +38481, +38506, +38522, +38534, +38559, +38559, +38559, +38564, +38564, +38581, +38604, +38604, +38611, +38620, +38626, +38635, +38635, +38635, +38666, +38674, +38688, +38693, +38710, +38722, +38722, +38722, +38729, +38734, +38752, +38792, +38818, +38825, +38861, +38902, +38934, +38949, +38949, +38960, +38969, +38985, +38985, +38996, +39013, +39024, +39024, +39032, +39061, +39074, +39089, +39123, +39123, +39123, +39140, +39161, +39180, +39206, +39215, +39254, +39261, +39277, +39284, +39314, +39314, +39330, +39340, +39340, +39371, +39371, +39392, +39430, +39430, +39437, +39444, +39461, +39468, +39468, +39485, +39517, +39524, +39538, +39543, +39548, +39555, +39581, +39588, +39588, +39609, +39609, +39616, +39652, +39670, +39677, +39677, +39684, +39691, +39702, +39717, +39717, +39717, +39724, +39749, +39760, +39766, +39775, +39791, +39791, +39814, +39827, +39827, +39837, +39859}; + +static const char tldData[] = { +"com.cn\0" +"com.co\0" +"hb.cn\0" +"med.br\0conf.lv\0wallonie.museum\0" +"namsos.no\0" +"\xe7\xb6\xb2\xe7\xbb\x9c.hk\0farmers.museum\0rel.pl\0" +"com.cu\0" +"military.museum\0" +"*.jm\0convent.museum\0cymru.museum\0malvik.no\0" +"univ.sn\0" +"gliding.aero\0" +"wodzislaw.pl\0" +"com.dm\0!pref.iwate.jp\0tran\xc3\xb8y.no\0pila.pl\0" +"mb.it\0*.ke\0lib.ri.us\0" +"com.ec\0*.kh\0tr\xc3\xb8gstad.no\0" +"com.ee\0" +"mobi.gp\0" +"gran.no\0" +"wa.gov.au\0" +"com.dz\0kg.kr\0" +"zoological.museum\0gjerstad.no\0haugesund.no\0kharkov.ua\0" +"walbrzych.pl\0" +"civilization.museum\0" +"ha.no\0" +"*.kw\0" +"med.ec\0com.es\0" +"med.ee\0otago.museum\0svelvik.no\0" +"art.ht\0amber.museum\0elvendrell.museum\0rost.no\0" +"jx.cn\0gratangen.no\0" +"association.aero\0ca.it\0" +"zaporizhzhe.ua\0" +"com.fr\0" +"szex.hu\0" +"e-burg.ru\0" +"com.ge\0bokn.no\0" +"mordovia.ru\0" +"com.gh\0*.mm\0" +"com.gi\0z.se\0" +"cahcesuolo.no\0" +"hurdal.no\0joshkar-ola.ru\0" +"cadaques.museum\0ma.us\0" +"a.bg\0" +"com.gn\0bozen.it\0tambov.ru\0" +"*.gifu.jp\0*.tokyo.jp\0*.mt\0" +"com.gp\0travel\0cc.tx.us\0" +"com.gr\0hemne.no\0" +"*.ni\0" +"*.mz\0" +"cc.il.us\0" +"com.gy\0" +"zj.cn\0oksnes.no\0museum.tt\0" +"com.hk\0*.np\0" +"rc.it\0baseball.museum\0" +"com.hn\0exhibition.museum\0" +"h\xc3\xa1""bmer.no\0" +"com.hr\0" +"fg.it\0stathelle.no\0defense.tn\0" +"com.ht\0" +"qld.gov.au\0*.nz\0" +"davvenj\xc3\xa1rga.no\0*.om\0" +"vang.no\0" +"*.kumamoto.jp\0" +"vercelli.it\0usenet.pl\0" +"com.io\0stalbans.museum\0" +"com.iq\0" +"*.pg\0" +"com.is\0klabu.no\0skiptvet.no\0" +"med.ht\0field.museum\0" +"gr.it\0gj\xc3\xb8vik.no\0tromsa.no\0lib.mi.us\0" +"ca.na\0" +"hagebostad.no\0k12.ma.us\0" +"*.qa\0" +"*.niigata.jp\0" +"monzaebrianza.it\0com.jo\0comunica\xc3\xa7\xc3\xb5""es.museum\0" +"gr.jp\0" +"ballangen.no\0*.py\0" +"scienceandindustry.museum\0" +"nuoro.it\0com.kg\0" +"com.ki\0" +"im.it\0idv.tw\0" +"*.akita.jp\0com.km\0r\xc3\xb8ros.no\0sopot.pl\0" +"!pref.yamanashi.jp\0" +"com.kp\0" +"!pref.kochi.jp\0com.la\0" +"com.lb\0" +"com.lc\0stjordalshalsen.no\0sigdal.no\0cc.nm.us\0" +"samnanger.no\0" +"drobak.no\0" +"vt.it\0" +"catering.aero\0com.ky\0" +"com.kz\0cc.ca.us\0" +"com.lk\0" +"grosseto.it\0mosvik.no\0" +"namsskogan.no\0" +"loten.no\0" +"chirurgiens-dentistes.fr\0" +"com.lr\0bremanger.no\0" +"gs.cn\0" +"com.lv\0lib.co.us\0" +"com.mg\0" +"passenger-association.aero\0" +"com.ly\0yekaterinburg.ru\0" +"vladivostok.ru\0" +"com.mk\0beeldengeluid.museum\0" +"com.ml\0" +"art.pl\0" +"com.mo\0" +"britishcolumbia.museum\0tx.us\0" +"com.na\0sakhalin.ru\0*.sv\0" +"mc.it\0" +"amsterdam.museum\0udm.ru\0" +"com.mu\0" +"com.mv\0com.nf\0" +"com.mw\0com.ng\0il.us\0" +"geometre-expert.fr\0com.mx\0" +"med.ly\0com.my\0" +"ag.it\0" +"*.tr\0" +"!pref.oita.jp\0" +"hoyanger.no\0skedsmo.no\0" +"com.nr\0turystyka.pl\0" +"koebenhavn.museum\0" +"quebec.museum\0" +"stord.no\0*.uk\0" +"act.au\0" +"br.it\0cb.it\0gyeonggi.kr\0jobs.tt\0lib.hi.us\0" +"*.ve\0" +"*.saga.jp\0wildlife.museum\0com.pa\0" +"monzabrianza.it\0sciencehistory.museum\0stange.no\0oskol.ru\0principe.st\0*.uy\0" +"plaza.museum\0com.pe\0" +"com.pf\0" +"eigersund.no\0" +"com.ph\0" +"manx.museum\0marylhurst.museum\0" +"md.ci\0pi.it\0schweiz.museum\0com.pk\0" +"grp.lk\0fr\xc3\xb8ya.no\0com.pl\0press.se\0" +"us.com\0" +"b.bg\0cremona.it\0communication.museum\0art.sn\0" +"med.pa\0" +"com.pr\0" +"com.ps\0" +"com.pt\0" +"k12.in.us\0" +"ah.cn\0bahcavuotna.no\0" +"sondrio.it\0arkhangelsk.ru\0" +"cargo.aero\0" +"council.aero\0" +"museum.mv\0hattfjelldal.no\0spydeberg.no\0med.pl\0" +"niepce.museum\0museum.mw\0" +"anthropology.museum\0" +"pharmacien.fr\0smola.no\0" +"fin.ec\0" +"selbu.no\0" +"workinggroup.aero\0nm.us\0" +"museum.no\0com.re\0" +"cc.vt.us\0" +"village.museum\0" +"ca.us\0" +"*.sapporo.jp\0" +"teramo.it\0" +"com.ro\0" +"*.ye\0" +"com.sa\0" +"com.sb\0" +"so.it\0com.sc\0" +"jolster.no\0com.sd\0" +"com.ru\0" +"com.rw\0com.sg\0" +"sydney.museum\0" +"sa.edu.au\0" +"tom.ru\0" +"com.sl\0*.za\0" +"\xe7\xbd\x91\xe7\xb5\xa1.hk\0naturbruksgymn.se\0com.sn\0" +"assedic.fr\0com.so\0" +"!pref.mie.jp\0*.yu\0" +"med.sa\0" +"newspaper.museum\0holmestrand.no\0dnepropetrovsk.ua\0" +"christiansburg.museum\0roan.no\0" +"pesaro-urbino.it\0med.sd\0com.st\0" +"s\xc3\xb8gne.no\0" +"nuernberg.museum\0" +"*.zm\0" +"com.sy\0" +"*.nagano.jp\0com.tj\0" +"nt.gov.au\0news.hu\0paderborn.museum\0" +"boston.museum\0" +"com.tn\0" +"com.to\0" +"broadcast.museum\0" +"com.ua\0" +"*.zw\0" +"baikal.ru\0" +"bykle.no\0com.tt\0" +"verdal.no\0" +"roros.no\0" +"fi.cr\0carboniaiglesias.it\0chuvashia.ru\0com.tw\0" +"k12.ca.us\0" +"eidsvoll.no\0" +"*.ishikawa.jp\0" +"dolls.museum\0" +"naval.museum\0" +"karasjok.no\0tysvar.no\0" +"bielawa.pl\0com.vc\0" +"svalbard.no\0deatnu.no\0rnd.ru\0" +"grandrapids.museum\0" +"bauern.museum\0k12.pr.us\0" +"press.ma\0" +"*.kagawa.jp\0fribourg.museum\0przeworsk.pl\0com.vi\0" +"com.uz\0" +"babia-gora.pl\0" +"com.vn\0" +"med.pro\0" +"suedtirol.it\0kursk.ru\0" +"bonn.museum\0" +"lt.it\0" +"design.aero\0microlight.aero\0americanantiques.museum\0meland.no\0" +"insurance.aero\0aarborte.no\0" +"kh.ua\0" +"macerata.it\0architecture.museum\0" +"rovigo.it\0rawa-maz.pl\0" +"store.nf\0levanger.no\0" +"b\xc3\xa1jddar.no\0" +"not.br\0" +"com.ws\0" +"!pref.kagawa.jp\0" +"!omanpost.om\0" +"vt.us\0" +"gs.ah.no\0vladikavkaz.ru\0" +"no.it\0" +"in.na\0szkola.pl\0a.se\0" +"aid.pl\0" +"workshop.museum\0vegarshei.no\0" +"sund.no\0" +"bs.it\0flora.no\0" +"agriculture.museum\0" +"koeln.museum\0" +"minnesota.museum\0k12.il.us\0" +"froya.no\0" +"aeroport.fr\0" +"davvenjarga.no\0zgora.pl\0ivano-frankivsk.ua\0" +"*.gunma.jp\0" +"amot.no\0" +"mus.br\0chungbuk.kr\0" +"ggf.br\0lorenskog.no\0" +"jeonbuk.kr\0" +"k12.vi.us\0" +"c.bg\0sande.more-og-romsdal.no\0" +"perugia.it\0" +"massa-carrara.it\0" +"michigan.museum\0" +"archaeology.museum\0mosj\xc3\xb8""en.no\0czest.pl\0koenig.ru\0\xe0\xb6\xbd\xe0\xb6\x82\xe0\xb6\x9a\xe0\xb7\x8f\0" +"mobi.tt\0" +"kraanghke.no\0" +"cc.in.us\0" +"re.it\0lib.vt.us\0" +"dell-ogliastra.it\0" +"s\xc3\xb8mna.no\0" +"k12.wv.us\0" +"gok.pk\0fh.se\0" +"luzern.museum\0" +"fi.it\0swidnica.pl\0" +"cbg.ru\0" +"latina.it\0" +"vibovalentia.it\0" +"modum.no\0" +"safety.aero\0" +"sp.it\0" +"science.museum\0ah.no\0" +"norddal.no\0" +"cc.na\0" +"re.kr\0" +"dielddanuorri.no\0" +"force.museum\0" +"torino.it\0cc.md.us\0" +"artanddesign.museum\0pisz.pl\0" +"olsztyn.pl\0" +"unsa.ba\0rade.no\0vinnica.ua\0" +"in.rs\0astrakhan.ru\0" +"sogne.no\0" +"homebuilt.aero\0" +"polkowice.pl\0" +"hole.no\0health.vn\0" +"fj.cn\0" +"davvesiida.no\0" +"vic.au\0" +"kongsberg.no\0" +"pub.sa\0" +"vv.it\0" +"!pref.tottori.jp\0" +"*.sendai.jp\0in.th\0" +"lib.pa.us\0" +"chiropractic.museum\0" +"mobi.na\0aca.pro\0" +"konyvelo.hu\0sciencecenters.museum\0" +"he.cn\0" +"in.ua\0" +"!city.nagoya.jp\0" +"muenchen.museum\0" +"psi.br\0" +"maryland.museum\0" +"!statecouncil.om\0" +"tr\xc3\xa6na.no\0" +"!pref.yamagata.jp\0jewishart.museum\0" +"lu.it\0me.it\0" +"chel.ru\0" +"tatarstan.ru\0" +"adult.ht\0in.us\0" +"kafjord.no\0" +"\xd7\x99\xd7\xa8\xd7\x95\xd7\xa9\xd7\x9c\xd7\x99\xd7\x9d.museum\0" +"net.ac\0k12.ec\0" +"net.ae\0bashkiria.ru\0" +"net.af\0!omantel.om\0" +"net.ag\0" +"net.ai\0" +"!pref.toyama.jp\0" +"net.al\0timekeeping.museum\0" +"net.an\0design.museum\0fin.tn\0" +"ethnology.museum\0" +"perso.ht\0asker.no\0b.se\0" +"net.ba\0" +"net.bb\0flanders.museum\0" +"mincom.tn\0" +"frana.no\0" +"bt.it\0" +"net.bh\0" +"auto.pl\0" +"net.az\0" +"treviso.it\0" +"war.museum\0" +"net.bm\0" +"langevag.no\0m\xc3\xa5lselv.no\0" +"net.bo\0" +"gol.no\0" +"folkebibl.no\0" +"net.br\0" +"net.bs\0troandin.no\0saotome.st\0lib.tn.us\0" +"md.us\0k12.ut.us\0" +"d.bg\0cambridge.museum\0\xc3\xa5s.no\0" +"net.ci\0" +"net.bz\0" +"sch.ae\0undersea.museum\0odda.no\0" +"net.cn\0" +"net.co\0c.la\0" +"gliwice.pl\0" +"aurskog-h\xc3\xb8land.no\0" +"andria-trani-barletta.it\0" +"net.cu\0loab\xc3\xa1t.no\0" +"rep.kp\0" +"\xe7\xbb\x84\xe7\xb9\x94.hk\0" +"gallery.museum\0" +"\xc3\xb8rland.no\0" +"store.ro\0" +"net.dm\0" +"somna.no\0" +"hemnes.no\0" +"ringebu.no\0k12.ky.us\0" +"net.ec\0" +"dn.ua\0" +"tarnobrzeg.pl\0" +"soc.lk\0" +"romsa.no\0" +"bamble.no\0" +"net.dz\0lutsk.ua\0" +"barlettatraniandria.it\0ta.it\0countryestate.museum\0" +"kaszuby.pl\0" +"*.yamaguchi.jp\0cranbrook.museum\0store.st\0" +"southcarolina.museum\0lib.md.us\0" +"textile.museum\0" +"cheltenham.museum\0hurum.no\0" +"*.oita.jp\0" +"shop.ht\0cc.me.us\0" +"shop.hu\0turin.it\0" +"louvre.museum\0" +"k12.ar.us\0" +"consulting.aero\0" +"gv.ao\0" +"sauherad.no\0" +"gv.at\0net.ge\0" +"ostre-toten.no\0lib.ok.us\0" +"net.gg\0pilots.museum\0" +"2000.hu\0geology.museum\0" +"net.gn\0" +"mazowsze.pl\0bir.ru\0" +"net.gp\0" +"net.gr\0" +"oxford.museum\0" +"per.la\0" +"eastafrica.museum\0" +"meeres.museum\0" +"net.gy\0*.shizuoka.jp\0" +"\xe5\x95\x86\xe6\xa5\xad.tw\0" +"net.hk\0" +"net.hn\0" +"philadelphiaarea.museum\0" +"osen.no\0" +"net.ht\0net.id\0" +"fundacio.museum\0" +"j\xc3\xb8rpeland.no\0" +"\xe6\x95\x99\xe8\x82\xb2.hk\0" +"divtasvuodna.no\0" +"student.aero\0sch.gg\0net.im\0" +"\xe7\xbd\x91\xe7\xbb\x9c.cn\0net.in\0" +"net.iq\0" +"net.ir\0" +"net.is\0" +"net.je\0" +"kepno.pl\0lapy.pl\0" +"per.nf\0" +"gov\0*.shimane.jp\0" +"artcenter.museum\0" +"k\xc3\xa5""fjord.no\0" +"net.jo\0" +"eu.int\0" +"c.se\0" +"net.kg\0" +"ce.it\0net.ki\0" +"sch.id\0os.hedmark.no\0" +"columbus.museum\0" +"arteducation.museum\0" +"net.kn\0" +"kr.com\0" +"net.la\0bushey.museum\0cc.gu.us\0" +"net.lb\0" +"net.lc\0" +"gs.bu.no\0" +"e164.arpa\0" +"chieti.it\0labour.museum\0" +"sch.ir\0creation.museum\0krodsherad.no\0" +"net.ky\0" +"net.kz\0me.us\0" +"e.bg\0sch.je\0net.lk\0" +"zlg.br\0suwalki.pl\0" +"\xe5\x80\x8b\xe4\xba\xba.hk\0net.ma\0" +"net.lr\0" +"sch.jo\0notaires.km\0net.me\0" +"net.lv\0karate.museum\0" +"net.ly\0karm\xc3\xb8y.no\0" +"rg.it\0" +"net.mk\0" +"net.ml\0evenes.no\0" +"ngo.lk\0net.mo\0egyptian.museum\0" +"marine.ru\0" +"realestate.pl\0" +"net.mu\0" +"net.mv\0net.nf\0" +"net.mw\0net.ng\0gda.pl\0" +"net.mx\0" +"freemasonry.museum\0net.my\0enebakk.no\0" +"karlsoy.no\0" +"\xe7\xbd\x91\xe7\xbb\x9c.hk\0\xc3\xb8rskog.no\0" +"randaberg.no\0" +"club.aero\0" +"certification.aero\0sr.it\0" +"center.museum\0so.gov.pl\0" +"caa.aero\0" +"sch.lk\0tvedestrand.no\0" +"net.nr\0" +"luroy.no\0" +"aukra.no\0s\xc3\xa1lat.no\0lib.me.us\0" +"ddr.museum\0" +"york.museum\0stryn.no\0k12.nm.us\0" +"per.sg\0" +"judaica.museum\0" +"verona.it\0" +"agdenes.no\0" +"cng.br\0sch.ly\0" +"net.pa\0" +"author.aero\0" +"naturalhistory.museum\0steiermark.museum\0bu.no\0" +"sn\xc3\xa5sa.no\0net.pe\0" +"net.ph\0" +"savannahga.museum\0batsfjord.no\0lib.oh.us\0" +"net.pk\0" +"net.pl\0" +"net.pn\0" +"washingtondc.museum\0" +"net.pr\0" +"net.ps\0" +"net.pt\0" +"nordkapp.no\0" +"emergency.aero\0krokstadelva.no\0" +"satx.museum\0ngo.ph\0omsk.ru\0" +"texas.museum\0" +"ngo.pl\0" +"mantova.it\0gu.us\0" +"!pref.shiga.jp\0isa.us\0" +"usa.museum\0" +"gb.net\0k12.vi\0" +"iveland.no\0" +"tempio-olbia.it\0" +"net.sa\0" +"net.sb\0" +"works.aero\0net.sc\0komvux.se\0" +"net.sd\0" +"net.ru\0" +"0.bg\0" +"forlicesena.it\0net.rw\0net.sg\0" +"klodzko.pl\0" +"detroit.museum\0wegrow.pl\0" +"net.sl\0" +"glogow.pl\0" +"store.bb\0air.museum\0" +"net.so\0" +"katowice.pl\0" +"nsk.ru\0" +"pisa.it\0eid.no\0" +"net.st\0" +"film.hu\0" +"tuva.ru\0d.se\0" +"net.th\0" +"net.sy\0" +"viterbo.it\0tsaritsyn.ru\0perso.sn\0net.tj\0" +"lib.gu.us\0" +"plc.co.im\0sec.ps\0" +"r\xc3\xa1hkker\xc3\xa1vju.no\0kazimierz-dolny.pl\0net.tn\0" +"net.to\0" +"veterinaire.km\0" +"net.ua\0" +"info.ht\0net.tt\0" +"info.hu\0" +"exchange.aero\0" +"sch.sa\0net.tw\0" +"andriatranibarletta.it\0perso.tn\0" +"f.bg\0malselv.no\0" +"net.vc\0" +"trana.no\0" +"ns.ca\0" +"net.vi\0" +"lucca.it\0oristano.it\0" +"usarts.museum\0net.vn\0" +"gon.pk\0" +"pl.ua\0" +"eastcoast.museum\0" +"novara.it\0" +"k12.ks.us\0" +"dp.ua\0" +"nesseby.no\0" +"!pref.wakayama.jp\0" +"repbody.aero\0" +"jamison.museum\0lugansk.ua\0" +"ss.it\0" +"alessandria.it\0" +"hadsel.no\0net.ws\0" +"\xe0\xae\x9a\xe0\xae\xbf\xe0\xae\x99\xe0\xaf\x8d\xe0\xae\x95\xe0\xae\xaa\xe0\xaf\x8d\xe0\xae\xaa\xe0\xaf\x82\xe0\xae\xb0\xe0\xaf\x8d\0" +"veterinaire.fr\0leirfjord.no\0" +"massacarrara.it\0north.museum\0" +"project.museum\0" +"other.nf\0" +"k12.nh.us\0" +"mat.br\0artgallery.museum\0" +"sr.gov.pl\0" +"gamvik.no\0" +"info.ec\0lancashire.museum\0" +"fm.br\0ltd.co.im\0" +"americana.museum\0southwest.museum\0cc.ak.us\0" +"enna.it\0lunner.no\0" +"v\xc3\xa5gan.no\0" +"mari.ru\0" +"accident-investigation.aero\0" +"sor-aurdal.no\0lib.ny.us\0" +"novosibirsk.ru\0" +"bjugn.no\0" +"n\xc3\xa6r\xc3\xb8y.no\0ostrowwlkp.pl\0" +"info.bb\0foundation.museum\0" +"brand.se\0" +"info.at\0!pref.akita.jp\0l\xc3\xb8ten.no\0" +"coal.museum\0miners.museum\0" +"glass.museum\0" +"info.az\0" +"frog.museum\0szczytno.pl\0nov.ru\0" +"sunndal.no\0" +"gen.in\0" +"gx.cn\0" +"web.co\0*.mie.jp\0hobol.no\0\xe5\x8f\xb0\xe6\xb9\xbe\0" +"logistics.aero\0plo.ps\0" +"erotika.hu\0" +"torsken.no\0" +"exeter.museum\0" +"info.co\0" +"selje.no\0" +"storfjord.no\0" +"barum.no\0lind\xc3\xa5s.no\0" +"leasing.aero\0" +"championship.aero\0fst.br\0" +"lierne.no\0" +"!gobiernoelectronico.ar\0""1.bg\0" +"corporation.museum\0" +"al.it\0*.miyagi.jp\0" +"*.aomori.jp\0" +"\xd8\xa7\xd9\x84\xd8\xa7\xd8\xb1\xd8\xaf\xd9\x86\0" +"amursk.ru\0" +"vestvagoy.no\0" +"\xd8\xa7\xdb\x8c\xd8\xb1\xd8\xa7\xd9\x86.ir\0cc.fl.us\0" +"os.hordaland.no\0" +"pistoia.it\0" +"tver.ru\0e.se\0" +"res.in\0*.yamagata.jp\0syzran.ru\0" +"capebreton.museum\0sandnessj\xc3\xb8""en.no\0" +"ternopil.ua\0" +"shop.pl\0" +"tank.museum\0" +"m\xc3\xa5s\xc3\xb8y.no\0" +"potenza.it\0time.museum\0" +"mjondalen.no\0" +"eng.br\0nedre-eiker.no\0" +"air-surveillance.aero\0" +"nt.au\0am.br\0pn.it\0" +"oystre-slidre.no\0ug.gov.pl\0" +"g.bg\0nesodden.no\0vologda.ru\0" +"parma.it\0tula.ru\0" +"*.nara.jp\0ak.us\0" +"nt.ca\0konin.pl\0" +"kiev.ua\0" +"skierv\xc3\xa1.no\0vestre-toten.no\0" +"ri.it\0botanical.museum\0farsund.no\0veg\xc3\xa5rshei.no\0dagestan.ru\0" +"ind.br\0k-uralsk.ru\0" +"rahkkeravju.no\0cmw.ru\0" +"canada.museum\0" +"fm.it\0" +"cc.wi.us\0" +"web.id\0aver\xc3\xb8y.no\0" +"dudinka.ru\0" +"baghdad.museum\0fitjar.no\0grane.no\0" +"gs.fm.no\0" +"sumy.ua\0" +"al.no\0" +"westfalen.museum\0" +"oregon.museum\0" +"bruxelles.museum\0elk.pl\0" +"planetarium.museum\0sn\xc3\xa5""ase.no\0" +"s\xc3\xb8rreisa.no\0" +"gs.st.no\0skien.no\0" +"bible.museum\0ivanovo.ru\0" +"avellino.it\0" +"tgory.pl\0" +"family.museum\0" +"ppg.br\0k12.as.us\0" +"trader.aero\0gorlice.pl\0" +"cc.al.us\0" +"ogliastra.it\0" +"is.it\0lib.nv.us\0" +"dr.na\0" +"media.hu\0nesna.no\0fl.us\0" +"uri.arpa\0" +"bjerkreim.no\0" +"charter.aero\0" +"genova.it\0" +"it.ao\0botany.museum\0hapmir.no\0" +"educational.museum\0" +"helsinki.museum\0" +"memorial.museum\0" +"web.lk\0pharmacy.museum\0" +"aircraft.aero\0appspot.com\0" +"ferrara.it\0beskidy.pl\0" +"hi.cn\0" +"taxi.aero\0flekkefjord.no\0" +"varoy.no\0" +"ragusa.it\0ambulance.museum\0" +"can.museum\0" +"*.osaka.jp\0isleofman.museum\0fm.no\0warmia.pl\0" +"educator.aero\0asmatart.museum\0" +"mi.it\0" +"kutno.pl\0" +"skedsmokorset.no\0" +"2.bg\0" +"*.kagoshima.jp\0km.ua\0" +"!city.sendai.jp\0" +"web.nf\0st.no\0cc.ri.us\0" +"reggiocalabria.it\0" +"wi.us\0" +"ancona.it\0newjersey.museum\0nnov.ru\0" +"f.se\0" +"ind.in\0" +"info.vn\0" +"andoy.no\0" +"ch.it\0fredrikstad.no\0guovdageaidnu.no\0" +"fjaler.no\0" +"sa.com\0" +"gs.nt.no\0" +"masfjorden.no\0" +"pordenone.it\0" +"po.it\0basel.museum\0" +"chambagri.fr\0" +"h.bg\0web.pk\0" +"london.museum\0" +"sciencecenter.museum\0\xe0\xb9\x84\xe0\xb8\x97\xe0\xb8\xa2\0" +"unbi.ba\0augustow.pl\0" +"wolomin.pl\0" +"notaires.fr\0tcm.museum\0al.us\0" +"nu.ca\0!pref.nagano.jp\0" +"info.tn\0" +"lib.wa.us\0" +"ed.ao\0info.tt\0" +"barreau.bj\0" +"k12.wy.us\0" +"pp.az\0gop.pk\0" +"int\0" +"l\xc3\xb8renskog.no\0podhale.pl\0" +"voagat.no\0" +"telekommunikation.museum\0" +"qld.au\0" +"te.it\0freiburg.museum\0snasa.no\0" +"gjemnes.no\0" +"sejny.pl\0" +"media.pl\0" +"skjak.no\0" +"watchandclock.museum\0" +"ed.ci\0pacific.museum\0" +"theater.museum\0info.ro\0" +"uk.com\0" +"campobasso.it\0aquarium.museum\0tysv\xc3\xa6r.no\0" +"kragero.no\0" +"windmill.museum\0info.sd\0" +"sologne.museum\0sande.m\xc3\xb8re-og-romsdal.no\0" +"nt.no\0cc.mi.us\0" +"ed.cr\0" +"academy.museum\0zachpomor.pl\0" +"tananger.no\0v\xc3\xa1rgg\xc3\xa1t.no\0ri.us\0" +"federation.aero\0" +"web.tj\0" +"matta-varjjat.no\0" +"steigen.no\0" +"local\0akrehamn.no\0" +"!pref.chiba.jp\0info.pk\0" +"info.pl\0""6bone.pl\0" +"klepp.no\0kherson.ua\0" +"ketrzyn.pl\0info.pr\0" +"sweden.museum\0" +"lardal.no\0" +"!retina.ar\0gz.cn\0" +"barletta-trani-andria.it\0vikna.no\0" +"bearalv\xc3\xa1hki.no\0" +"broker.aero\0gov.nc.tr\0" +"info.na\0k12.fl.us\0" +"hembygdsforbund.museum\0" +"entertainment.aero\0jerusalem.museum\0l\xc3\xa6rdal.no\0" +"hitra.no\0sogndal.no\0" +"farmequipment.museum\0info.mv\0info.nf\0\xc3\xa5lg\xc3\xa5rd.no\0" +"la-spezia.it\0" +"skanland.no\0fam.pk\0" +"skole.museum\0" +"art.museum\0" +"presidio.museum\0" +"3.bg\0public.museum\0" +"h\xc3\xb8yanger.no\0zagan.pl\0" +"an.it\0" +"philadelphia.museum\0info.nr\0" +"pesarourbino.it\0g\xc3\xa1ivuotna.no\0" +"poltava.ua\0" +"nt.ro\0" +"station.museum\0" +"mi.th\0" +"altoadige.it\0" +"nu.it\0" +"usculture.museum\0g.se\0" +"h\xc3\xa1mm\xc3\xa1rfeasta.no\0" +"daegu.kr\0info.la\0" +"dovre.no\0" +"ci.it\0horology.museum\0" +"bergbau.museum\0" +"press.museum\0" +"gangwon.kr\0" +"!city.kitakyushu.jp\0sor-varanger.no\0cc.hi.us\0" +"fuossko.no\0" +"zp.ua\0" +"american.museum\0" +"fl\xc3\xa5.no\0mi.us\0" +"i.bg\0" +"od.ua\0" +"encyclopedic.museum\0" +"ind.tn\0" +"midatlantic.museum\0" +"newyork.museum\0" +"castres.museum\0" +"act.edu.au\0" +"topology.museum\0" +"ed.jp\0" +"of.by\0" +"iris.arpa\0inf.br\0askim.no\0pyatigorsk.ru\0" +"nord-fron.no\0nsn.us\0" +"beardu.no\0" +"agrar.hu\0corvette.museum\0chtr.k12.ma.us\0" +"figueres.museum\0" +"!pref.gunma.jp\0medizinhistorisches.museum\0" +"tjeldsund.no\0" +"nebraska.museum\0" +"bellevue.museum\0" +"abo.pa\0k12.al.us\0" +"info.ki\0" +"inf.cu\0sv.it\0" +"jfk.museum\0" +"!city.osaka.jp\0swinoujscie.pl\0" +"bydgoszcz.pl\0" +"!city.kyoto.jp\0" +"uvic.museum\0" +"madrid.museum\0steinkjer.no\0" +"lib.ma.us\0" +"sirdal.no\0" +"n\xc3\xb8tter\xc3\xb8y.no\0" +"taranto.it\0starnberg.museum\0" +"vic.gov.au\0pvt.ge\0pors\xc3\xa1\xc5\x8bgu.no\0" +"naroy.no\0ris\xc3\xb8r.no\0" +"va.it\0salem.museum\0starachowice.pl\0" +"!nawrastelecom.om\0" +"town.museum\0te.ua\0" +"se.net\0" +"kemerovo.ru\0" +"lerdal.no\0" +"gs.va.no\0" +"kms.ru\0" +"consulado.st\0" +"haram.no\0" +"tysnes.no\0" +"!pref.ibaraki.jp\0hamburg.museum\0" +"\xc3\xa5rdal.no\0" +"airline.aero\0" +"crew.aero\0newhampshire.museum\0" +"muenster.museum\0" +"aerodrome.aero\0" +"heroy.nordland.no\0belau.pw\0" +"kamchatka.ru\0" +"b\xc3\xa5""d\xc3\xa5""ddj\xc3\xa5.no\0lillehammer.no\0hi.us\0" +"hk.cn\0" +"!city.kobe.jp\0berlevag.no\0" +"ardal.no\0" +"askoy.no\0" +"vardo.no\0" +"fyresdal.no\0" +"sassari.it\0" +"video.hu\0drammen.no\0" +"lyngen.no\0nakhodka.ru\0" +"ip6.arpa\0games.hu\0" +"online.museum\0" +"k12.sd.us\0" +"4.bg\0sebastopol.ua\0" +"ao.it\0atlanta.museum\0" +"lebork.pl\0" +"ravenna.it\0" +"railway.museum\0songdalen.no\0" +"!pref.shimane.jp\0delaware.museum\0ed.pw\0" +"f\xc3\xb8rde.no\0" +"living.museum\0" +"juif.museum\0" +"lomza.pl\0" +"h.se\0" +"!bl.uk\0" +"portland.museum\0\xe7\xb5\x84\xe7\xb9\x94.tw\0" +"stj\xc3\xb8rdal.no\0" +"lecce.it\0" +"bz.it\0" +"farmstead.museum\0va.no\0" +"express.aero\0!nacion.ar\0" +"presse.km\0gs.of.no\0" +"\xe5\x8f\xb0\xe7\x81\xa3\0" +"og.ao\0gyeongbuk.kr\0vestv\xc3\xa5g\xc3\xb8y.no\0" +"prd.fr\0" +"pp.ru\0pp.se\0" +"forum.hu\0!pref.saga.jp\0" +"kvalsund.no\0" +"!city.kawasaki.jp\0n\xc3\xa5\xc3\xa5mesjevuemie.no\0" +"j.bg\0" +"vlaanderen.museum\0" +"cc.va.us\0" +"\xd8\xa7\xd9\x8a\xd8\xb1\xd8\xa7\xd9\x86.ir\0alabama.museum\0" +"school.museum\0her\xc3\xb8y.m\xc3\xb8re-og-romsdal.no\0" +"\xc3\xa5seral.no\0" +"traniandriabarletta.it\0" +"flog.br\0" +"presse.ml\0" +"k\xc3\xa1r\xc3\xa1\xc5\xa1johka.no\0" +"historisch.museum\0" +"farm.museum\0palmsprings.museum\0oslo.no\0dyroy.no\0stranda.no\0" +"gs.rl.no\0r\xc3\xa5""de.no\0" +"bomlo.no\0s\xc3\xb8rum.no\0" +"jan-mayen.no\0ivgu.no\0" +"coop\0" +"agr.br\0k12.ak.us\0" +"!nic.ar\0catanzaro.it\0fusa.no\0" +"hu.com\0" +"inf.mk\0" +"vet.br\0" +"k12.mt.us\0k12.nd.us\0" +"vlog.br\0\xe5\x85\xac\xe5\x8f\xb8.cn\0sandnessjoen.no\0" +"lib.az.us\0" +"nsw.edu.au\0of.no\0\xc3\xb8stre-toten.no\0" +"*.okinawa.jp\0" +"vb.it\0" +"asso.fr\0firenze.it\0" +"trieste.it\0" +"\xe5\x85\xac\xe5\x8f\xb8.hk\0" +"museet.museum\0" +"prd.km\0" +"navuotna.no\0lib.ca.us\0" +"cc.nv.us\0" +"asso.gp\0" +"meraker.no\0" +"h\xc3\xa1pmir.no\0" +"i.ph\0" +"sx.cn\0jeonnam.kr\0" +"halden.no\0" +"fed.us\0" +"medio-campidano.it\0tsk.ru\0" +"barcelona.museum\0" +"giessen.museum\0roma.museum\0" +"hl.cn\0" +"\xe0\xae\x87\xe0\xae\xb2\xe0\xae\x99\xe0\xaf\x8d\xe0\xae\x95\xe0\xaf\x88\0" +"biz.bb\0benevento.it\0rl.no\0bygland.no\0" +"port.fr\0asso.ht\0prd.mg\0" +"biz.at\0" +"tra.kp\0" +"*.aichi.jp\0khabarovsk.ru\0" +"campidano-medio.it\0" +"biz.az\0" +"newmexico.museum\0va.us\0" +"finearts.museum\0" +"murmansk.ru\0" +"\xc3\xb8rsta.no\0radom.pl\0k12.sc.us\0" +"5.bg\0kvinesdal.no\0" +"ap.it\0" +"*.fukushima.jp\0" +"asso.bj\0" +"mad.museum\0" +"lebesby.no\0" +"og.it\0glas.museum\0sauda.no\0" +"i.se\0" +"k12.tx.us\0" +"asso.ci\0mk.ua\0" +"cesena-forli.it\0" +"lowicz.pl\0" +"k12.id.us\0" +"tas.gov.au\0" +"lukow.pl\0" +"utazas.hu\0" +"maritimo.museum\0bjark\xc3\xb8y.no\0" +"adm.br\0" +"pr.it\0lib.vi.us\0" +"bergamo.it\0k12.va.us\0" +"k.bg\0" +"railroad.museum\0" +"!british-library.uk\0" +"cincinnati.museum\0" +"sorreisa.no\0" +"asso.dz\0!nel.uk\0" +"rm.it\0" +"nv.us\0" +"nx.cn\0gos.pk\0" +"vic.edu.au\0" +"biella.it\0tjome.no\0" +"r\xc3\xb8yken.no\0" +"beiarn.no\0" +"qc.ca\0" +"georgia.museum\0square.museum\0" +"labor.museum\0omasvuotna.no\0cc.la.us\0" +"br.com\0reggioemilia.it\0" +"kristiansund.no\0" +"sorum.no\0" +"orsta.no\0" +"furniture.museum\0surrey.museum\0eng.pro\0" +"asn.lv\0balat.no\0" +"lavangen.no\0sld.pa\0" +"fla.no\0k12.ms.us\0k12.nc.us\0" +"bardu.no\0" +"donostia.museum\0" +"club.tw\0" +"elburg.museum\0" +"gs.hl.no\0lodingen.no\0" +"samara.ru\0" +"vc.it\0*.nagasaki.jp\0" +"fosnes.no\0" +"fuel.aero\0" +"qc.com\0" +"skjervoy.no\0" +"bill.museum\0kv\xc3\xa6""fjord.no\0" +"skydiving.aero\0*.tokushima.jp\0" +"!congresodelalengua3.ar\0laquila.it\0k12.ct.us\0" +"gorge.museum\0linz.museum\0sherbrooke.museum\0" +"tranoy.no\0ing.pa\0" +"ptz.ru\0" +"kr.it\0prato.it\0stat.no\0" +"\xd0\xb8\xd0\xba\xd0\xbe\xd0\xbc.museum\0" +"cosenza.it\0" +"stj\xc3\xb8rdalshalsen.no\0" +"finland.museum\0leka.no\0cc.pr.us\0" +"historichouses.museum\0s\xc3\xa1l\xc3\xa1t.no\0" +"venice.it\0" +"biz.ki\0" +"g\xc3\xa1ls\xc3\xa1.no\0" +"\xe7\xbb\x84\xe7\xbb\x87.hk\0" +"*.yamanashi.jp\0" +"rad\xc3\xb8y.no\0" +"6.bg\0" +"fareast.ru\0" +"paragliding.aero\0ba.it\0aq.it\0" +"sk\xc3\xa5nland.no\0" +"its.me\0" +"us.na\0" +"hl.no\0cc.ga.us\0" +"ac\0granvin.no\0" +"ad\0qld.edu.au\0!city.sapporo.jp\0" +"ae\0" +"af\0" +"ag\0crotone.it\0" +"dallas.museum\0" +"ai\0brussels.museum\0" +"dali.museum\0" +"la.us\0" +"al\0salzburg.museum\0" +"am\0" +"an\0cl.it\0" +"ao\0" +"aq\0ba\0" +"bb\0" +"as\0lajolla.museum\0" +"at\0" +"be\0" +"bf\0inderoy.no\0snz.ru\0" +"aw\0bg\0" +"ax\0bh\0cim.br\0ltd.gi\0biz.mv\0" +"bi\0xz.cn\0\xe7\xb5\x84\xe7\xb9\x94.hk\0biz.mw\0" +"az\0bj\0" +"bm\0tranibarlettaandria.it\0naamesjevuemie.no\0" +"chattanooga.museum\0" +"bo\0" +"l.bg\0" +"ca\0" +"br\0stateofdelaware.museum\0" +"bs\0cc\0" +"cd\0biz.nr\0" +"cf\0berlev\xc3\xa5g.no\0" +"bw\0cg\0snaase.no\0" +"ch\0harvestcelebration.museum\0ck.ua\0" +"by\0ci\0" +"bz\0bahccavuotna.no\0" +"cl\0yuzhno-sakhalinsk.ru\0" +"cm\0halsa.no\0lyngdal.no\0" +"cn\0" +"co\0rn.it\0childrens.museum\0frankfurt.museum\0" +"cr\0" +"pskov.ru\0" +"cu\0de\0" +"cv\0fr.it\0lib.ky.us\0" +"aseral.no\0kvam.no\0" +"cx\0hellas.museum\0" +"hof.no\0" +"cz\0dj\0k12.la.us\0" +"dk\0moscow.museum\0" +"sosnowiec.pl\0" +"dm\0biz.pk\0" +"schokoladen.museum\0biz.pl\0" +"far.br\0arna.no\0tynset.no\0" +"even\xc3\xa1\xc5\xa1\xc5\xa1i.no\0" +"ec\0" +"biz.pr\0" +"ee\0celtic.museum\0" +"scientist.aero\0modern.museum\0" +"pr.us\0" +"dz\0" +"mj\xc3\xb8ndalen.no\0s\xc3\xb8r-odal.no\0" +"!nic.tr\0" +"conference.aero\0vestnes.no\0k12.mn.us\0" +"!pref.hiroshima.jp\0" +"es\0trapani.it\0" +"fermo.it\0vard\xc3\xb8.no\0" +"eu\0gs.hm.no\0r\xc3\xb8""d\xc3\xb8y.no\0stordal.no\0" +"gc.ca\0!nhs.uk\0" +"jgora.pl\0" +"fi\0stjordal.no\0" +"fm\0!mediaphone.om\0" +"kirov.ru\0pvt.k12.ma.us\0" +"fo\0" +"ga\0hyllestad.no\0" +"gov.ac\0fr\0andriabarlettatrani.it\0ga.us\0" +"gov.ae\0gd\0estate.museum\0" +"gov.af\0ge\0tolga.no\0" +"gf\0asso.re\0cc.oh.us\0" +"gg\0florida.museum\0" +"presse.ci\0gh\0" +"gi\0k12.dc.us\0" +"ltd.lk\0orland.no\0" +"gov.al\0" +"gl\0tokke.no\0" +"hanggliding.aero\0gm\0" +"hareid.no\0" +"gov.ba\0tj.cn\0gp\0" +"gov.bb\0gq\0" +"gov.as\0gr\0agrigento.it\0lc.it\0" +"gs\0kalmykia.ru\0aero.tt\0" +"gov.bf\0" +"county.museum\0" +"gov.bh\0hn.cn\0gw\0" +"gov.az\0gy\0assn.lk\0guernsey.museum\0" +"hk\0" +"gov.bm\0h\xc3\xa6gebostad.no\0biz.tj\0" +"hm\0computer.museum\0" +"gov.bo\0hn\0kl\xc3\xa6""bu.no\0" +"pulawy.pl\0" +"gov.br\0" +"trd.br\0gov.bs\0hr\0reggio-calabria.it\0historyofscience.museum\0lipetsk.ru\0" +"gov.cd\0*.nagoya.jp\0" +"ht\0id\0spjelkavik.no\0" +"hu\0ie\0aero.mv\0" +"marketplace.aero\0mn.it\0biz.tt\0" +"gov.by\0saintlouis.museum\0mer\xc3\xa5ker.no\0" +"gov.bz\0" +"7.bg\0gov.cl\0virtual.museum\0" +"gov.cm\0vennesla.no\0kr.ua\0" +"gov.cn\0im\0ar.it\0galsa.no\0rovno.ua\0" +"gov.co\0in\0" +"io\0limanowa.pl\0" +"iq\0k12.ga.us\0" +"ir\0" +"riik.ee\0is\0\xc3\xa1laheadju.no\0" +"gov.cu\0it\0hawaii.museum\0seaport.museum\0" +"je\0pubol.museum\0hm.no\0" +"gov.cx\0" +"*.chiba.jp\0" +"*.kawasaki.jp\0" +"k.se\0" +"gov.dm\0" +"aland.fi\0vik.no\0" +"yk.ca\0jo\0kobierzyce.pl\0" +"jp\0biz.vn\0" +"presse.fr\0lib.il.us\0\xe9\xa6\x99\xe6\xb8\xaf\0" +"gov.ec\0" +"transport.museum\0bronnoy.no\0" +"slg.br\0gov.ee\0asso.nc\0bievat.no\0" +"nyny.museum\0" +"kg\0" +"mo-i-rana.no\0" +"gov.dz\0ki\0" +"monmouth.museum\0" +"suldal.no\0" +"bc.ca\0km\0zt.ua\0" +"pt.it\0kn\0" +"fineart.museum\0" +"la\0" +"kr\0gulen.no\0" +"m.bg\0mo.cn\0lc\0alaheadju.no\0g\xc3\xa1\xc5\x8bgaviika.no\0" +"nowaruda.pl\0cc.ut.us\0" +"br\xc3\xb8nn\xc3\xb8y.no\0" +"ky\0li\0overhalla.no\0" +"kz\0khv.ru\0" +"lk\0" +"artdeco.museum\0" +"ma\0fortworth.museum\0kostroma.ru\0" +"ro.it\0kirkenes.no\0vestby.no\0" +"urbino-pesaro.it\0ls\0mc\0alstahaug.no\0" +"blog.br\0gov.ge\0lt\0md\0" +"lu\0me\0botanicgarden.museum\0" +"gov.gg\0lv\0oh.us\0" +"gov.gh\0mg\0valley.museum\0" +"gov.gi\0mh\0" +"ly\0sandiego.museum\0" +"mk\0" +"ml\0" +"gov.gn\0rollag.no\0naklo.pl\0" +"mn\0" +"mo\0" +"mp\0leirvik.no\0" +"gov.gr\0mq\0na\0cc.ks.us\0" +"mr\0" +"ms\0nc\0" +"valer.hedmark.no\0" +"mu\0ne\0" +"mv\0nf\0" +"mw\0" +"mx\0nord-odal.no\0jur.pro\0" +"my\0" +"gov.hk\0name.hr\0" +"nl\0" +"astronomy.museum\0lib.nm.us\0" +"catania.it\0" +"no\0" +"skjerv\xc3\xb8y.no\0" +"k12.ne.us\0" +"monza-e-della-brianza.it\0!pref.fukushima.jp\0nr\0" +"gov.ie\0" +"stuttgart.museum\0nu\0cc.mn.us\0" +"karasjohka.no\0" +"engine.aero\0bearalvahki.no\0" +"oyer.no\0" +"ve.it\0" +"gov.im\0froland.no\0cc.ar.us\0" +"gov.in\0magadan.ru\0" +"pescara.it\0" +"gov.iq\0usdecorativearts.museum\0" +"gov.ir\0pa\0" +"gov.is\0" +"gov.it\0lavagis.no\0" +"gov.je\0" +"naustdal.no\0pe\0k12.or.us\0" +"gd.cn\0carraramassa.it\0pf\0" +"ph\0" +"cc.ny.us\0" +"rissa.no\0" +"info\0pk\0pomorze.pl\0" +"pl\0" +"gov.jo\0asso.km\0pn\0" +"*.okayama.jp\0cieszyn.pl\0" +"freight.aero\0" +"pr\0" +"narvik.no\0ps\0" +"!pref.aichi.jp\0elverum.no\0pt\0" +"edunet.tn\0" +"gov.kg\0" +"flatanger.no\0marker.no\0pw\0" +"gov.ki\0nuremberg.museum\0" +"aip.ee\0" +"gov.km\0" +"gov.kn\0" +"gov.kp\0" +"rieti.it\0gov.la\0bajddar.no\0" +"gov.lb\0aviation.museum\0" +"gov.lc\0" +"asso.mc\0" +"re\0" +"ut.us\0" +"sa.gov.au\0gov.ky\0" +"mo.it\0gov.kz\0" +"gov.lk\0" +"iraq.museum\0" +"badajoz.museum\0" +"8.bg\0inder\xc3\xb8y.no\0" +"monticello.museum\0ro\0ks.ua\0" +"gov.ma\0svizzera.museum\0" +"gov.lr\0sa\0" +"matera.it\0sb\0" +"gov.lt\0rs\0sc\0" +"gov.me\0sd\0" +"gov.lv\0ru\0se\0" +"gov.mg\0" +"rw\0sg\0" +"gov.ly\0assisi.museum\0kids.museum\0sh\0" +"si\0" +"gov.mk\0" +"gov.ml\0sk\0" +"sl\0" +"gov.mn\0airguard.museum\0sm\0" +"gov.mo\0l.se\0sn\0" +"so\0" +"gov.mr\0ks.us\0" +"name.az\0sr\0" +"naturhistorisches.museum\0tc\0" +"trainer.aero\0cn.it\0urbinopesaro.it\0gov.mu\0nativeamerican.museum\0st\0td\0" +"gov.mv\0su\0" +"trentino.it\0gov.mw\0gov.ng\0tf\0" +"tg\0" +"co.ae\0venezia.it\0gov.my\0th\0" +"!pref.ehime.jp\0sy\0" +"co.ag\0lewismiller.museum\0ostrowiec.pl\0sz\0tj\0" +"tk\0" +"motorcycle.museum\0tl\0" +"birdart.museum\0trogstad.no\0tm\0" +"tn\0" +"humanities.museum\0to\0" +"pu.it\0gov.nr\0ua\0lib.ut.us\0" +"co.ao\0" +"co.ba\0trondheim.no\0tt\0" +"in-addr.arpa\0tempioolbia.it\0!city.yokohama.jp\0mn.us\0" +"n.bg\0schoenbrunn.museum\0tv\0" +"co.at\0aremark.no\0tw\0ug\0" +"jus.br\0" +"co.bi\0bialowieza.pl\0ar.us\0" +"audnedaln.no\0kustanai.ru\0" +"va\0" +"us\0vc\0" +"newport.museum\0" +"kopervik.no\0gov.ph\0vg\0" +"ny.us\0vi\0" +"co.bw\0finn\xc3\xb8y.no\0gov.pk\0uz\0" +"honefoss.no\0gov.pl\0lanbib.se\0" +"co.ci\0" +"gov.pn\0intl.tn\0" +"act.gov.au\0vn\0" +"television.museum\0gov.pr\0" +"sykkylven.no\0v\xc3\xa5ler.hedmark.no\0gov.ps\0" +"gov.pt\0" +"co.cr\0vu\0" +"legnica.pl\0" +"sa.au\0" +"bjarkoy.no\0" +"openair.museum\0birkenes.no\0lib.nj.us\0" +"fylkesbibl.no\0holt\xc3\xa5len.no\0" +"iz.hr\0" +"ws\0" +"oceanographique.museum\0" +"b\xc3\xa1id\xc3\xa1r.no\0cc.mo.us\0" +"\xc3\xb8ygarden.no\0" +"contemporary.museum\0" +"gb.com\0cc.as.us\0" +"belluno.it\0gov.sa\0" +"gov.sb\0" +"gov.rs\0gov.sc\0" +"gov.sd\0" +"!pref.nagasaki.jp\0gov.ru\0" +"asia\0" +"sa.cr\0gov.rw\0gov.sg\0" +"kuzbass.ru\0" +"gs.vf.no\0" +"gov.sl\0" +"norfolk.museum\0" +"k12.de.us\0" +"mil\0" +"rendalen.no\0" +"gov.st\0" +"agro.pl\0" +"orkdal.no\0" +"le.it\0gov.sy\0" +"gov.tj\0" +"co.gg\0nore-og-uvdal.no\0v\xc3\xa5ler.\xc3\xb8stfold.no\0" +"gov.tl\0" +"gov.tn\0" +"gov.to\0" +"kids.us\0" +"equipment.aero\0gov.ua\0" +"!city.niigata.jp\0gov.tt\0" +"sel.no\0" +"l\xc3\xa4ns.museum\0" +"gov.tw\0" +"rennebu.no\0" +"egersund.no\0" +"medecin.km\0" +"co.gy\0" +"!mecon.ar\0" +"berlin.museum\0" +"carrara-massa.it\0" +"9.bg\0" +"pri.ee\0gov.vc\0" +"at.it\0" +"muosat.no\0" +"co.id\0" +"co.hu\0" +"etne.no\0" +"\xc3\xa1lt\xc3\xa1.no\0" +"gov.vn\0" +"modelling.aero\0" +"co.im\0" +"co.in\0\xc3\xa5krehamn.no\0m.se\0" +"gouv.fr\0*.kitakyushu.jp\0" +"narviika.no\0" +"rennes\xc3\xb8y.no\0" +"co.ir\0afjord.no\0" +"lea\xc5\x8bgaviika.no\0buryatia.ru\0" +"co.it\0coastaldefence.museum\0" +"co.je\0vf.no\0" +"osteroy.no\0" +"uslivinghistory.museum\0" +"aerobatic.aero\0" +"mesaverde.museum\0mining.museum\0" +"a\xc3\xa9roport.ci\0gov.ws\0" +"co.jp\0copenhagen.museum\0" +"pv.it\0" +"r\xc3\xb8mskog.no\0" +"vossevangen.no\0porsanger.no\0" +"salat.no\0mo.us\0" +"o.bg\0imperia.it\0carrier.museum\0" +"carbonia-iglesias.it\0" +"as.us\0" +"alvdal.no\0" +"state.museum\0mandal.no\0cn.ua\0" +"cuneo.it\0" +"gouv.ht\0" +"!city.okayama.jp\0co.kr\0" +"co.lc\0" +"sa.it\0" +"donna.no\0" +"sortland.no\0" +"tomsk.ru\0" +"birthplace.museum\0l\xc3\xb8""dingen.no\0" +"ge.it\0orenburg.ru\0" +"cn.com\0" +"co.ma\0" +"co.ls\0skaun.no\0name.vn\0" +"navigation.aero\0" +"cagliari.it\0co.me\0portal.museum\0" +"gouv.bj\0" +"udine.it\0" +"engineer.aero\0" +"szczecin.pl\0" +"wales.museum\0" +"co.na\0bo.telemark.no\0" +"austin.museum\0" +"k12.mo.us\0" +"co.mu\0" +"gouv.ci\0" +"co.mw\0" +"esp.br\0" +"naturalhistorymuseum.museum\0" +"mosjoen.no\0" +"solund.no\0" +"name.tj\0" +"sand\xc3\xb8y.no\0" +"kunstunddesign.museum\0" +"cartoonart.museum\0collection.museum\0gsm.pl\0" +"aure.no\0" +"!pref.yamaguchi.jp\0historical.museum\0" +"name.tt\0" +"england.museum\0valle.no\0" +"cc.ok.us\0" +"salangen.no\0" +"gloppen.no\0" +"cc.co.us\0" +"contemporaryart.museum\0" +"tas.edu.au\0" +"trading.aero\0" +"mazury.pl\0" +"!pref.aomori.jp\0co.pl\0" +"opoczno.pl\0" +"*.kobe.jp\0co.pn\0" +"oppegard.no\0" +"co.pw\0" +"saltdal.no\0smolensk.ru\0" +"na.it\0\xc4\x8d\xc3\xa1hcesuolo.no\0" +"vgs.no\0evenassi.no\0" +"parachuting.aero\0jl.cn\0maritime.museum\0bd.se\0" +"badaddja.no\0" +"bergen.no\0" +"brussel.museum\0" +"avoues.fr\0" +"cesenaforli.it\0" +"oregontrail.museum\0" +"ullensaker.no\0" +"jobs\0" +"accident-prevention.aero\0" +"n.se\0" +"association.museum\0california.museum\0" +"cultural.museum\0co.rs\0" +"zoology.museum\0" +"pruszkow.pl\0" +"control.aero\0nt.edu.au\0net\0komforb.se\0" +"lincoln.museum\0aurland.no\0name.pr\0co.rw\0" +"ostroleka.pl\0" +"isernia.it\0" +"tm.fr\0" +"gs.ol.no\0" +"nb.ca\0marnardal.no\0" +"williamsburg.museum\0" +"!jet.uk\0" +"suisse.museum\0\xc3\xa5""fjord.no\0flakstad.no\0" +"karmoy.no\0" +"yn.cn\0chesapeakebay.museum\0" +"nsw.au\0" +"amur.ru\0co.st\0" +"imb.br\0siellak.no\0\xe7\xb6\xb2\xe8\xb7\xaf.tw\0" +"name.na\0" +"co.th\0" +"p.bg\0" +"co.sz\0co.tj\0" +"name.mv\0\xc3\xa5lesund.no\0lib.in.us\0" +"lucerne.museum\0naumburg.museum\0" +"society.museum\0name.my\0" +"tinn.no\0" +"co.tt\0" +"unj\xc3\xa1rga.no\0" +"co.ug\0" +"lib.wy.us\0" +"co.tz\0" +"ass.km\0" +"ok.us\0" +"tm.hu\0kongsvinger.no\0" +"ibestad.no\0" +"juedisches.museum\0co.us\0" +"cq.cn\0" +"rs.ba\0" +"wa.edu.au\0co.vi\0" +"co.uz\0" +"health.museum\0" +"grue.no\0" +"automotive.museum\0journalism.museum\0settlement.museum\0" +"qh.cn\0interactive.museum\0" +"snillfjord.no\0!national-library-scotland.uk\0" +"balsfjord.no\0lib.nh.us\0" +"kolobrzeg.pl\0" +"gs.tm.no\0" +"h\xc3\xb8nefoss.no\0" +"ol.no\0" +"music.museum\0moareke.no\0" +"b\xc3\xb8.nordland.no\0" +"name.mk\0lier.no\0" +"eidfjord.no\0" +"sc.cn\0tm.km\0" +"jelenia-gora.pl\0sanok.pl\0" +"intelligence.museum\0" +"srv.br\0elblag.pl\0" +"judygarland.museum\0" +"padua.it\0" +"k12.co.us\0" +"lindesnes.no\0" +"name.jo\0izhevsk.ru\0" +"yorkshire.museum\0mel\xc3\xb8y.no\0" +"tm.mc\0lib.pr.us\0" +"hjartdal.no\0" +"tm.mg\0" +"bari.it\0milano.it\0" +"lg.jp\0" +"zgrad.ru\0" +"sm\xc3\xb8la.no\0" +"communications.museum\0" +"arts.co\0seoul.kr\0engerdal.no\0" +"oster\xc3\xb8y.no\0" +"\xe6\x95\x8e\xe8\x82\xb2.hk\0foggia.it\0verran.no\0" +"orskog.no\0voronezh.ru\0kv.ua\0" +"av.it\0" +"tm.no\0nissedal.no\0" +"historisches.museum\0gs.mr.no\0" +"medecin.fr\0" +"montreal.museum\0" +"o.se\0" +"!metro.tokyo.jp\0sola.no\0" +"k12.tn.us\0" +"floro.no\0" +"milan.it\0*.shiga.jp\0" +"berkeley.museum\0" +"maintenance.aero\0" +"ws.na\0" +"lindas.no\0cc.ia.us\0" +"brescia.it\0embroidery.museum\0" +"arezzo.it\0tm.pl\0" +"r\xc3\xa6lingen.no\0" +"burghof.museum\0" +"rec.br\0" +"q.bg\0" +"!nawras.om\0" +"hammarfeasta.no\0" +"moss.no\0" +"on.ca\0" +"gouv.rw\0" +"luxembourg.museum\0" +"rec.co\0british.museum\0" +"reggio-emilia.it\0" +"gouv.sn\0lib.wv.us\0" +"avocat.fr\0" +"simbirsk.ru\0" +"jar.ru\0" +"monza-brianza.it\0" +"tm.ro\0" +"imageandsound.museum\0" +"jpn.com\0mr.no\0" +"siracusa.it\0" +"norilsk.ru\0tm.se\0" +"tn.it\0" +"jeju.kr\0" +"!pref.fukuoka.jp\0" +"*.hyogo.jp\0portlligat.museum\0" +"!pref.osaka.jp\0" +"siena.it\0sc.kr\0omaha.museum\0saskatchewan.museum\0" +"phoenix.museum\0vanylven.no\0" +"botanicalgarden.museum\0" +"turek.pl\0" +"vagsoy.no\0" +"riodejaneiro.museum\0" +"vi.it\0" +"uy.com\0" +"kristiansand.no\0" +"sd.cn\0trento.it\0" +"muncie.museum\0" +"berg.no\0meldal.no\0" +"nes.buskerud.no\0" +"saratov.ru\0" +"gs.oslo.no\0" +"harstad.no\0vaga.no\0" +"research.museum\0" +"brunel.museum\0ia.us\0" +"test.tj\0" +"columbia.museum\0" +"ms.it\0stockholm.museum\0" +"reklam.hu\0" +"pomorskie.pl\0lg.ua\0" +"bg.it\0historicalsociety.museum\0rns.tn\0" +"mallorca.museum\0surgut.ru\0cc.sc.us\0" +"ushistory.museum\0" +"palana.ru\0" +"snoasa.no\0" +"naturalsciences.museum\0" +"yaroslavl.ru\0" +"unjarga.no\0" +"p.se\0" +"ingatlan.hu\0" +"irc.pl\0" +"savona.it\0" +"cr.it\0" +"test.ru\0cc.tn.us\0" +"ms.kr\0museumvereniging.museum\0" +"time.no\0k12.ia.us\0" +"vladimir.ru\0" +"correios-e-telecomunica\xc3\xa7\xc3\xb5""es.museum\0" +"gouv.km\0nationalfirearms.museum\0" +"m\xc3\xa1latvuopmi.no\0" +"aero\0yosemite.museum\0" +"r.bg\0school.na\0" +"cc.vi.us\0" +"*.wakayama.jp\0" +"beauxarts.museum\0averoy.no\0ullensvang.no\0bar.pro\0" +"!city.hiroshima.jp\0" +"b\xc3\xa1hccavuotna.no\0" +"frosta.no\0" +"gdynia.pl\0" +"medical.museum\0" +"embaixada.st\0" +"balsan.it\0vantaa.museum\0" +"za.net\0" +"!city.saitama.jp\0lib.ks.us\0" +"fnd.br\0" +"ru.com\0se.com\0hol.no\0modalen.no\0" +"gouv.ml\0chukotka.ru\0" +"malopolska.pl\0" +"mansion.museum\0" +"iki.fi\0children.museum\0" +"cyber.museum\0rec.nf\0mo\xc3\xa5reke.no\0" +"to.it\0" +"hasvik.no\0" +"\xc3\xb8yer.no\0" +"arts.ro\0sc.ug\0" +"lib.ar.us\0" +"sc.tz\0cc.ms.us\0cc.nc.us\0" +"etc.br\0poznan.pl\0" +"cnt.br\0viking.museum\0" +"*.miyazaki.jp\0" +"melhus.no\0" +"skodje.no\0vevelstad.no\0" +"sc.us\0" +"upow.gov.pl\0" +"!city.fukuoka.jp\0brandywinevalley.museum\0natuurwetenschappen.museum\0tranby.no\0" +"bahn.museum\0msk.ru\0" +"delmenhorst.museum\0" +"russia.museum\0fuoisku.no\0" +"shell.museum\0" +"r\xc3\xa1isa.no\0" +"hs.kr\0udmurtia.ru\0" +"palermo.it\0" +"pilot.aero\0" +"tn.us\0" +"priv.hu\0" +"li.it\0" +"kr\xc3\xa5""anghke.no\0mosreg.ru\0" +"lib.fl.us\0" +"plants.museum\0" +"ulsan.kr\0national.museum\0" +"mil.ac\0!pref.nara.jp\0surgeonshall.museum\0" +"mil.ae\0santacruz.museum\0vi.us\0" +"wlocl.pl\0" +"mt.it\0napoli.it\0alaska.museum\0arts.nf\0" +"missoula.museum\0" +"rec.ro\0" +"mil.al\0" +"marburg.museum\0waw.pl\0" +"pharmaciens.km\0indianapolis.museum\0larsson.museum\0" +"cc.sd.us\0" +"mil.ba\0mobi\0" +"indianmarket.museum\0" +"recreation.aero\0padova.it\0" +"varese.it\0parti.se\0" +"mil.az\0" +"mil.bo\0!pref.kagoshima.jp\0khmelnitskiy.ua\0" +"rygge.no\0" +"os\xc3\xb8yro.no\0" +"mil.br\0" +"cs.it\0" +"austevoll.no\0fjell.no\0" +"mil.by\0" +"!pref.tokushima.jp\0org\0" +"mil.cn\0gs.svalbard.no\0" +"mil.co\0" +"pz.it\0lib.va.us\0\xd1\x80\xd1\x84\0" +"\xe4\xb8\xaa\xe4\xba\xba.hk\0ms.us\0nc.us\0k12.wi.us\0" +"s.bg\0drangedal.no\0" +"en.it\0" +"culturalcenter.museum\0" +"house.museum\0divttasvuotna.no\0" +"fhs.no\0" +"circus.museum\0" +"priv.at\0" +"mil.ec\0" +"ruovat.no\0" +"midsund.no\0vagan.no\0" +"casadelamoneda.museum\0" +"bristol.museum\0" +"and.museum\0" +"ascolipiceno.it\0computerhistory.museum\0vyatka.ru\0" +"uhren.museum\0" +"lahppi.no\0" +"*.yokohama.jp\0cody.museum\0lib.al.us\0" +"colonialwilliamsburg.museum\0indian.museum\0cc.ky.us\0" +"tp.it\0biev\xc3\xa1t.no\0" +"can.br\0royken.no\0" +"id.ir\0" +"mediocampidano.it\0tromso.no\0" +"kartuzy.pl\0k12.ok.us\0" +"*.saitama.jp\0stjohn.museum\0m\xc3\xa1tta-v\xc3\xa1rjjat.no\0" +"mil.ge\0trani-barletta-andria.it\0" +"lib.as.us\0" +"swiebodzin.pl\0cc.mt.us\0cc.nd.us\0" +"mil.gh\0" +"science-fiction.museum\0\xd9\x82\xd8\xb7\xd8\xb1\0" +"airtraffic.aero\0" +"konskowola.pl\0" +"scienceandhistory.museum\0nysa.pl\0sd.us\0" +"balestrand.no\0" +"oygarden.no\0" +"her\xc3\xb8y.nordland.no\0" +"!pref.ishikawa.jp\0strand.no\0" +"\xe7\xb5\x84\xe7\xbb\x87.hk\0mil.hn\0" +"gob.bo\0volda.no\0" +"losangeles.museum\0larvik.no\0" +"university.museum\0" +"cc.dc.us\0" +"mil.id\0" +"sorfold.no\0" +"watch-and-clock.museum\0" +"flor\xc3\xb8.no\0" +"nittedal.no\0oppeg\xc3\xa5rd.no\0" +"k12.ri.us\0" +"gob.cl\0" +"komi.ru\0" +"government.aero\0mil.in\0" +"mil.iq\0id.lv\0" +"culture.museum\0" +"id.ly\0" +"raholt.no\0" +"lubin.pl\0grozny.ru\0" +"kchr.ru\0" +"nikolaev.ua\0" +"lib.sd.us\0" +"de.com\0" +"mil.jo\0" +"*.kanagawa.jp\0gaular.no\0miasta.pl\0" +"bi.it\0rnu.tn\0uzhgorod.ua\0" +"idrett.no\0v\xc3\xa5gs\xc3\xb8y.no\0" +"wroclaw.pl\0" +"res.aero\0ne.jp\0mil.kg\0" +"\xc3\xa5mli.no\0" +"education.museum\0" +"dgca.aero\0" +"mil.km\0" +"trolley.museum\0" +"cci.fr\0r.se\0" +"archaeological.museum\0" +"monzaedellabrianza.it\0mil.kr\0" +"gob.es\0kvafjord.no\0ky.us\0" +"lecco.it\0" +"ct.it\0" +"magazine.aero\0" +"operaunite.com\0ne.kr\0" +"mil.kz\0skoczow.pl\0" +"nf.ca\0" +"western.museum\0" +"kunst.museum\0gaivuotna.no\0karpacz.pl\0spb.ru\0cc.id.us\0" +"slask.pl\0" +"youth.museum\0" +"adv.br\0campidanomedio.it\0!songfest.om\0" +"geelvinck.museum\0\xd8\xa7\xd9\x85\xd8\xa7\xd8\xb1\xd8\xa7\xd8\xaa\0" +"mil.lv\0" +"fie.ee\0mil.mg\0mt.us\0nd.us\0k12.vt.us\0" +"t.bg\0ushuaia.museum\0" +"off.ai\0" +"irkutsk.ru\0" +"stor-elvdal.no\0tourism.tn\0" +"penza.ru\0" +"bj.cn\0\xe4\xb8\xad\xe5\x9b\xbd\0" +"civilwar.museum\0mil.mv\0opole.pl\0" +"nes.akershus.no\0" +"mil.my\0karelia.ru\0" +"como.it\0sande.vestfold.no\0" +"\xe4\xb8\xad\xe5\x9c\x8b\0" +"gob.hn\0lib.la.us\0" +"mil.no\0cc.wv.us\0" +"boleslawiec.pl\0" +"!pref.niigata.jp\0gs.sf.no\0dc.us\0k12.mi.us\0" +"museum\0dep.no\0kv\xc3\xa6nangen.no\0l\xc3\xa1hppi.no\0" +"film.museum\0" +"frei.no\0" +"notodden.no\0risor.no\0" +"messina.it\0" +"eidsberg.no\0" +"krakow.pl\0lib.mt.us\0lib.nd.us\0" +"rauma.no\0" +"mulhouse.museum\0" +"sibenik.museum\0grong.no\0mil.pe\0" +"budejju.no\0k12.nv.us\0" +"stavanger.no\0mil.ph\0" +"forli-cesena.it\0" +"naples.it\0cc.ne.us\0" +"s\xc3\xb8r-aurdal.no\0" +"mil.pl\0" +"vibo-valentia.it\0ski.museum\0siedlce.pl\0" +"bus.museum\0" +"tozsde.hu\0" +"!pref.shizuoka.jp\0santabarbara.museum\0" +"zhitomir.ua\0" +"pro.az\0" +"ne.pw\0" +"pro.br\0orkanger.no\0b\xc3\xb8.telemark.no\0" +"roma.it\0cc.ct.us\0" +"heritage.museum\0giske.no\0" +"!pref.kumamoto.jp\0prof.pr\0" +"*.kochi.jp\0" +"andria-barletta-trani.it\0*.toyama.jp\0sveio.no\0" +"id.us\0" +"bolt.hu\0" +"fetsund.no\0porsgrunn.no\0" +"iglesias-carbonia.it\0" +"sf.no\0" +"mil.ru\0" +"from.hr\0asnes.no\0mil.rw\0" +"alesund.no\0sos.pl\0" +"livorno.it\0" +"crafts.museum\0" +"aquila.it\0" +"vega.no\0" +"jewelry.museum\0" +"sk\xc3\xa1nit.no\0chita.ru\0" +"pro.ec\0" +"fortmissoula.museum\0j\xc3\xb8lster.no\0" +"pro\0mil.st\0" +"busan.kr\0lib.ga.us\0" +"dellogliastra.it\0" +"aosta.it\0chungnam.kr\0gob.mx\0" +"mil.sy\0k12.hi.us\0" +"mil.tj\0" +"ulan-ude.ru\0mil.to\0wv.us\0" +"luster.no\0volgograd.ru\0" +"pa.it\0kommunalforbund.se\0lib.tx.us\0" +"s.se\0" +"qsl.br\0" +"mil.tw\0" +"est.pr\0ens.tn\0" +"lib.id.us\0" +"mil.tz\0" +"uscountryestate.museum\0" +"agents.aero\0" +"\xc3\xb8vre-eiker.no\0ne.ug\0" +"pb.ao\0" +"gob.pa\0ne.tz\0" +"tur.br\0" +"mil.vc\0" +"or.at\0gob.pe\0" +"s\xc3\xb8r-fron.no\0" +"or.bi\0ne.us\0" +"u.bg\0gob.pk\0" +"stavern.no\0" +"brindisi.it\0" +"aknoluokta.no\0" +"!pref.kyoto.jp\0tydal.no\0" +"plc.ly\0muos\xc3\xa1t.no\0" +"or.ci\0hamaroy.no\0priv.pl\0" +"vestre-slidre.no\0gniezno.pl\0" +"\xe7\xae\x87\xe4\xba\xba.hk\0" +"andebu.no\0" +"nieruchomosci.pl\0\xd8\xa7\xd9\x84\xd8\xb3\xd8\xb9\xd9\x88\xd8\xaf\xd9\x8a\xd8\xa9\0" +"or.cr\0pro.ht\0bolzano.it\0" +"ct.us\0k12.md.us\0" +"za.org\0" +"!icnet.uk\0" +"localhistory.museum\0" +"firm.ht\0" +"lel.br\0tr.it\0kvanangen.no\0" +"sondre-land.no\0t\xc3\xb8nsberg.no\0vefsn.no\0" +"nature.museum\0yamal.ru\0" +"rv.ua\0" +"lans.museum\0lib.ne.us\0" +"lur\xc3\xb8y.no\0" +"eu.com\0firm.in\0" +"hjelmeland.no\0" +"gs.tr.no\0" +"casino.hu\0essex.museum\0tourism.pl\0" +"rennesoy.no\0" +"priv.no\0" +"baths.museum\0mytis.ru\0" +"tingvoll.no\0" +"cc.az.us\0" +"sh.cn\0" +"!pref.miyazaki.jp\0s\xc3\xb8rfold.no\0" +"aurskog-holand.no\0malatvuopmi.no\0" +"lib.ct.us\0" +"cc.pa.us\0" +"pa.gov.pl\0" +"firm.co\0cc.de.us\0" +"nrw.museum\0" +"daejeon.kr\0livinghistory.museum\0" +"gildeskal.no\0lund.no\0" +"\xc3\xb8ksnes.no\0stavropol.ru\0" +"b\xc3\xa6rum.no\0r\xc3\xb8yrvik.no\0" +"osoyro.no\0" +"priv.me\0sula.no\0!parliament.uk\0" +"nationalheritage.museum\0" +"jaworzno.pl\0" +"dinosaur.museum\0" +"garden.museum\0trust.museum\0" +"turen.tn\0" +"kautokeino.no\0" +"pro.na\0" +"gorizia.it\0" +"siljan.no\0" +"or.id\0pro.mv\0" +"bieszczady.pl\0www.ro\0" +"lib.ee\0antiques.museum\0brasil.museum\0tr.no\0" +"aejrie.no\0" +"!pref.hokkaido.jp\0" +"schlesisches.museum\0" +"huissier-justice.fr\0or.it\0" +"t.se\0" +"environment.museum\0" +"vindafjord.no\0" +"edu.ac\0or.jp\0" +"tree.museum\0" +"groundhandling.aero\0edu.af\0" +"rochester.museum\0sanfrancisco.museum\0" +"ebiz.tw\0" +"kirovograd.ua\0" +"edu.al\0" +"edu.an\0\xc3\xa1k\xc5\x8boluokta.no\0v\xc3\xa5g\xc3\xa5.no\0" +"v.bg\0" +"edu.ba\0" +"edu.bb\0nesset.no\0" +"hornindal.no\0pro.pr\0" +"or.kr\0" +"az.us\0" +"edu.bh\0volkenkunde.museum\0" +"edu.bi\0" +"edu.az\0" +"b\xc3\xb8mlo.no\0" +"edu.bm\0" +"edu.bo\0tyumen.ru\0" +"edu.br\0" +"edu.bs\0pa.us\0" +"alto-adige.it\0whaling.museum\0" +"*.iwate.jp\0" +"edu.ci\0law.pro\0" +"edu.bz\0de.us\0" +"lib.ak.us\0" +"edu.cn\0" +"edu.co\0" +"laspezia.it\0" +"baidar.no\0" +"ts.it\0" +"or.na\0" +"edu.cu\0hotel.lk\0" +"show.aero\0or.mu\0" +"sandnes.no\0" +"museumcenter.museum\0" +"edu.dm\0kazan.ru\0" +"biz\0caltanissetta.it\0odessa.ua\0k12.oh.us\0" +"crimea.ua\0" +"research.aero\0lom.no\0" +"edu.ec\0florence.it\0clock.museum\0sshn.se\0" +"edu.ee\0game.tw\0" +"!pref.okinawa.jp\0" +"ilawa.pl\0" +"edu.dz\0indiana.museum\0" +"gs.jan-mayen.no\0" +"publ.pt\0" +"nom.ad\0" +"skanit.no\0gdansk.pl\0k12.pa.us\0" +"nom.ag\0edu.es\0" +"if.ua\0" +"pro.tt\0lib.de.us\0" +"environmentalconservation.museum\0cc.or.us\0" +"bern.museum\0nat.tn\0" +"rubtsovsk.ru\0" +"!educ.ar\0masoy.no\0" +"bologna.it\0" +"\xc3\xa5snes.no\0fhv.se\0" +"*.tottori.jp\0radoy.no\0" +"romskog.no\0" +"malbork.pl\0" +"olbiatempio.it\0" +"edu.ge\0" +"edu.gh\0" +"edu.gi\0" +"or.pw\0" +"hob\xc3\xb8l.no\0" +"nom.br\0edu.gn\0virginia.museum\0mbone.pl\0!nls.uk\0" +"seljord.no\0pro.vn\0" +"edu.gp\0" +"edu.gr\0" +"!uba.ar\0!pref.saitama.jp\0" +"greta.fr\0gs.aa.no\0kvinnherad.no\0" +"lib.sc.us\0" +"js.cn\0nom.co\0edu.hk\0" +"lesja.no\0" +"bl.it\0" +"edu.hn\0\xc3\xb8ystre-slidre.no\0mari-el.ru\0" +"hotel.hu\0" +"rindal.no\0" +"edu.ht\0" +"!pref.miyagi.jp\0" +"midtre-gauldal.no\0" +"xj.cn\0australia.museum\0" +"ab.ca\0salvadordali.museum\0olawa.pl\0" +"pc.it\0" +"u.se\0" +"edu.in\0b\xc3\xa1l\xc3\xa1t.no\0" +"ln.cn\0alta.no\0" +"chelyabinsk.ru\0" +"edu.iq\0" +"ontario.museum\0" +"edu.is\0" +"edu.it\0" +"b\xc3\xa5tsfjord.no\0" +"trysil.no\0or.th\0" +"utsira.no\0" +"nom.es\0edu.jo\0fhsk.se\0" +"bale.museum\0" +"w.bg\0" +"lillesand.no\0" +"edu.kg\0" +"amusement.aero\0" +"edu.ki\0" +"fauske.no\0or.ug\0" +"int.az\0askvoll.no\0eidskog.no\0cv.ua\0" +"algard.no\0" +"edu.km\0or.tz\0" +"nom.fr\0edu.kn\0" +"*.ibaraki.jp\0hoylandet.no\0" +"int.bo\0edu.kp\0" +"edu.la\0" +"si.it\0edu.lb\0travel.pl\0" +"edu.lc\0mx.na\0n\xc3\xa1vuotna.no\0ovre-eiker.no\0" +"aa.no\0!siemens.om\0" +"sciences.museum\0or.us\0" +"cat\0" +"edu.ky\0" +"int.ci\0edu.kz\0firm.ro\0cc.wy.us\0" +"edu.lk\0vaapste.no\0" +"!pref.tochigi.jp\0" +"int.co\0podlasie.pl\0" +"edu.lr\0" +"karikatur.museum\0jamal.ru\0" +"gjovik.no\0krager\xc3\xb8.no\0k12.az.us\0" +"edu.me\0" +"ud.it\0edu.lv\0entomology.museum\0" +"edu.mg\0moskenes.no\0" +"\xe6\x94\xbf\xe5\xba\x9c.hk\0edu.ly\0" +"stpetersburg.museum\0" +"edu.mk\0" +"edu.ml\0nordreisa.no\0" +"!pref.fukui.jp\0lib.ms.us\0lib.nc.us\0" +"edu.mn\0\xd9\x81\xd9\x84\xd8\xb3\xd8\xb7\xd9\x8a\xd9\x86\0" +"fot.br\0edu.mo\0" +"iron.museum\0" +"asti.it\0annefrank.museum\0stv.ru\0cc.nh.us\0" +"edu.mv\0" +"lodi.it\0edu.mw\0edu.ng\0" +"gwangju.kr\0edu.mx\0" +"edu.my\0" +"soundandvision.museum\0" +"lenvik.no\0" +"ballooning.aero\0" +"name\0" +"jogasz.hu\0frogn.no\0" +"history.museum\0" +"consultant.aero\0edu.nr\0" +"manchester.museum\0" +"*.hiroshima.jp\0" +"pol.dz\0" +"*.tochigi.jp\0heimatunduhren.museum\0" +"!pref.kanagawa.jp\0" +"firm.nf\0edu.pa\0" +"coop.ht\0pc.pl\0" +"chicago.museum\0" +"vn.ua\0" +"edu.pe\0" +"tana.no\0edu.pf\0" +"edu.ph\0" +"nom.km\0" +"travel.tt\0" +"edu.pk\0" +"experts-comptables.fr\0edu.pl\0bryansk.ru\0" +"edu.pn\0" +"evje-og-hornnes.no\0warszawa.pl\0" +"ac.ae\0" +"edu.pr\0" +"vaksdal.no\0edu.ps\0dni.us\0" +"po.gov.pl\0edu.pt\0" +"nordre-land.no\0vadso.no\0" +"rnrt.tn\0" +"sport.hu\0!pref.gifu.jp\0voss.no\0targi.pl\0" +"flesberg.no\0" +"photography.museum\0" +"modena.it\0tonsberg.no\0" +"ac.at\0" +"ac.be\0coop.br\0" +"services.aero\0" +"nom.mg\0" +"wielun.pl\0" +"jefferson.museum\0wy.us\0" +"pd.it\0ot.it\0neues.museum\0slattum.no\0" +"vdonsk.ru\0" +"ar.com\0edu.sa\0" +"\xc3\xa5l.no\0edu.sb\0" +"edu.rs\0edu.sc\0" +"ac.ci\0int.is\0edu.sd\0!tsk.tr\0" +"br\xc3\xb8nn\xc3\xb8ysund.no\0and\xc3\xb8y.no\0edu.ru\0" +"pol.ht\0" +"edu.rw\0edu.sg\0" +"gyeongnam.kr\0olecko.pl\0" +"ac.cn\0" +"graz.museum\0" +"coldwar.museum\0edu.sl\0" +"ac.cr\0" +"edu.sn\0" +"hamar.no\0" +"histoire.museum\0" +"!city.shizuoka.jp\0" +"edu.st\0" +"oceanographic.museum\0nh.us\0" +"x.bg\0" +"surnadal.no\0" +"fc.it\0costume.museum\0stalowa-wola.pl\0" +"valer.ostfold.no\0edu.sy\0" +"edu.tj\0" +"arq.br\0" +"aeroclub.aero\0odo.br\0pe.ca\0\xe7\xb6\xb2\xe7\xb5\xa1.cn\0bronnoysund.no\0nom.pa\0" +"edu.to\0" +"paleo.museum\0nom.pe\0edu.ua\0" +"int.la\0trustee.museum\0forsand.no\0krasnoyarsk.ru\0" +"!pref.hyogo.jp\0" +"edu.tt\0" +"zarow.pl\0" +"edu.tw\0" +"nom.pl\0" +"community.museum\0kvitsoy.no\0" +"int.lk\0tychy.pl\0" +"k12.me.us\0" +"jondal.no\0edu.vc\0" +"illustration.museum\0" +"clinton.museum\0" +"tas.au\0es.kr\0" +"production.aero\0" +"rodoy.no\0" +"database.museum\0bodo.no\0" +"anthro.museum\0landes.museum\0edu.vn\0" +"nom.re\0" +"altai.ru\0" +"filatelia.museum\0" +"sk.ca\0lezajsk.pl\0" +"rockart.museum\0int.mv\0" +"int.mw\0herad.no\0" +"eti.br\0ac.gn\0" +"fedje.no\0nom.ro\0" +"money.museum\0" +"\xd9\x85\xd8\xb5\xd8\xb1\0" +"horten.no\0" +"gangaviika.no\0mielec.pl\0" +"uw.gov.pl\0" +"moma.museum\0" +"edu.ws\0" +"go.ci\0" +"tv.bo\0technology.museum\0" +"s\xc3\xb8ndre-land.no\0" +"tv.br\0" +"jor.br\0lib.dc.us\0" +"arboretum.museum\0" +"go.cr\0" +"artsandcrafts.museum\0\xd8\xaa\xd9\x88\xd9\x86\xd8\xb3\0" +"psc.br\0ac.id\0!city.chiba.jp\0" +"wa.au\0" +"rome.it\0" +"amli.no\0" +"ac.im\0lo.it\0" +"ac.in\0" +"\xe7\xb6\xb2\xe7\xb5\xa1.hk\0durham.museum\0" +"ac.ir\0" +"torino.museum\0" +"loabat.no\0" +"com\0" +"nalchik.ru\0" +"yakutia.ru\0" +"settlers.museum\0" +"!promocion.ar\0int.pt\0" +"union.aero\0" +"utah.museum\0" +"giehtavuoatna.no\0" +"ac.jp\0" +"air-traffic-control.aero\0" +"silk.museum\0usantiques.museum\0" +"bn.it\0" +"kalisz.pl\0" +"perm.ru\0" +"aoste.it\0bindal.no\0" +"coloradoplateau.museum\0k12.gu.us\0" +"frosinone.it\0forde.no\0" +"epilepsy.museum\0" +"olbia-tempio.it\0" +"journalist.aero\0ac.kr\0*.sch.uk\0" +"nic.im\0sciencesnaturelles.museum\0bedzin.pl\0" +"nic.in\0pe.it\0" +"w.se\0" +"!pref.okayama.jp\0" +"urn.arpa\0" +"cinema.museum\0" +"monza.it\0versailles.museum\0int.ru\0" +"andasuolo.no\0skj\xc3\xa5k.no\0chernovtsy.ua\0" +"nyc.museum\0int.rw\0paroch.k12.ma.us\0" +"ringerike.no\0" +"ac.ma\0" +"org.ac\0civilaviation.aero\0" +"rakkestad.no\0" +"org.ae\0ac.me\0" +"org.af\0" +"org.ag\0" +"org.ai\0stokke.no\0" +"airport.aero\0" +"finnoy.no\0" +"org.al\0" +"org.an\0y.bg\0habmer.no\0" +"stadt.museum\0holtalen.no\0" +"int.tj\0" +"org.ba\0gjerdrum.no\0" +"org.bb\0ascoli-piceno.it\0molde.no\0r\xc3\xb8st.no\0tysfjord.no\0" +"pe.kr\0rybnik.pl\0" +"go.id\0" +"ac.mu\0" +"ac.mw\0ac.ng\0" +"org.bh\0\xc3\xa5mot.no\0rana.no\0" +"org.bi\0" +"org.az\0belgorod.ru\0int.tt\0" +"ae.org\0" +"group.aero\0posts-and-telecommunications.museum\0" +"org.bm\0salerno.it\0" +"etnedal.no\0" +"org.bo\0*.hokkaido.jp\0donetsk.ua\0" +"ostroda.pl\0" +"org.br\0" +"org.bs\0" +"go.it\0h\xc3\xb8ylandet.no\0" +"zgorzelec.pl\0" +"org.bw\0" +"org.ci\0" +"org.bz\0vicenza.it\0resistance.museum\0" +"missile.museum\0" +"org.cn\0" +"org.co\0assassination.museum\0" +"go.jp\0" +"tv.it\0austrheim.no\0ac.pa\0" +"verbania.it\0" +"palace.museum\0" +"tmp.br\0int.vn\0" +"org.cu\0" +"paris.museum\0" +"media.aero\0hokksund.no\0" +"arts.museum\0gemological.museum\0hammerfest.no\0" +"k12.ny.us\0" +"org.dm\0hemsedal.no\0ringsaker.no\0sklep.pl\0" +"h\xc3\xa5.no\0cc.nj.us\0" +"rzeszow.pl\0" +"go.kr\0gjesdal.no\0ac.pr\0" +"org.ec\0" +"org.ee\0" +"media.museum\0" +"terni.it\0touch.museum\0zakopane.pl\0" +"journal.aero\0org.dz\0" +"incheon.kr\0" +"b\xc3\xa1hcavuotna.no\0" +"leksvik.no\0ulvik.no\0" +"plantation.museum\0" +"org.es\0loyalist.museum\0" +"gildesk\xc3\xa5l.no\0bytom.pl\0" +"bo.nordland.no\0" +"ambulance.aero\0iglesiascarbonia.it\0" +"tw.cn\0\xe6\x96\xb0\xe5\x8a\xa0\xe5\x9d\xa1\0" +"chocolate.museum\0" +"pittsburgh.museum\0" +"royrvik.no\0sor-odal.no\0ac.rs\0" +"kaluga.ru\0" +"org.ge\0erotica.hu\0ac.ru\0ac.se\0" +"org.gg\0leangaviika.no\0ac.rw\0" +"org.gh\0v\xc3\xa6r\xc3\xb8y.no\0" +"org.gi\0" +"jevnaker.no\0" +"org.gn\0tv.na\0leikanger.no\0" +"org.gp\0" +"ask\xc3\xb8y.no\0" +"org.gr\0wroc.pl\0" +"ad.jp\0" +"powiat.pl\0" +"tj\xc3\xb8me.no\0" +"coop.tt\0" +"ac.th\0" +"mragowo.pl\0ac.sz\0ac.tj\0" +"org.hk\0bo.it\0" +"philately.museum\0" +"org.hn\0" +"fet.no\0" +"axis.museum\0mansions.museum\0" +"wiki.br\0" +"org.ht\0" +"org.hu\0piacenza.it\0scotland.museum\0cpa.pro\0" +"ac.ug\0" +"coop.mv\0x.se\0" +"coop.mw\0ac.tz\0" +"bmd.br\0" +"org.im\0ralingen.no\0" +"org.in\0" +"cz.it\0lib.ia.us\0" +"org.iq\0" +"org.ir\0" +"org.is\0" +"nl.ca\0" +"org.je\0" +"childrensgarden.museum\0" +"kvits\xc3\xb8y.no\0go.pw\0" +"sokndal.no\0" +"ra.it\0grimstad.no\0" +"denmark.museum\0" +"ac.vn\0" +"ecn.br\0org.jo\0" +"bialystok.pl\0nj.us\0" +"z.bg\0bilbao.museum\0stargard.pl\0nic.tj\0" +"eisenbahn.museum\0" +"fe.it\0bryne.no\0vrn.ru\0" +"cc.wa.us\0" +"sex.hu\0skierva.no\0" +"org.kg\0" +"org.ki\0" +"org.km\0" +"org.kn\0khakassia.ru\0" +"org.kp\0" +"org.la\0" +"org.lb\0" +"org.lc\0" +"francaise.museum\0" +"panama.museum\0" +"rotorcraft.aero\0gateway.museum\0olkusz.pl\0" +"org.ky\0czeladz.pl\0ryazan.ru\0" +"org.kz\0" +"org.lk\0dyr\xc3\xb8y.no\0" +"raisa.no\0" +"dlugoleka.pl\0" +"org.ma\0" +"org.lr\0prochowice.pl\0" +"org.ls\0" +"org.me\0sandoy.no\0s\xc3\xb8r-varanger.no\0" +"org.lv\0" +"org.mg\0" +"tel\0go.th\0" +"org.ly\0" +"steam.museum\0go.tj\0" +"org.mk\0pasadena.museum\0jessheim.no\0lib.mn.us\0" +"org.ml\0" +"software.aero\0" +"org.mn\0" +"org.mo\0" +"*.fukui.jp\0decorativearts.museum\0" +"spy.museum\0org.na\0jorpeland.no\0" +"vads\xc3\xb8.no\0" +"org.mu\0building.museum\0gausdal.no\0" +"org.mv\0nannestad.no\0" +"org.mw\0org.ng\0go.ug\0" +"vr.it\0org.mx\0" +"org.my\0" +"go.tz\0" +"oppdal.no\0" +"uk.net\0" +"coop.km\0" +"*.kyoto.jp\0" +"sarpsborg.no\0org.nr\0" +"chernigov.ua\0" +"ha.cn\0no.com\0" +"space.museum\0" +"org.pa\0" +"*.ar\0" +"usgarden.museum\0" +"*.bd\0org.pe\0" +"*.au\0org.pf\0um.gov.pl\0" +"bio.br\0" +"org.ph\0" +"org.pk\0" +"fr\xc3\xa6na.no\0org.pl\0" +"nord-aurdal.no\0org.pn\0" +"*.bn\0handson.museum\0agrinet.tn\0" +"kviteseid.no\0" +"rel.ht\0virtuel.museum\0atm.pl\0org.pr\0" +"org.ps\0cherkassy.ua\0" +"org.pt\0wa.us\0" +"*.bt\0arendal.no\0magnitka.ru\0" +"depot.museum\0porsangu.no\0" +"laakesvuemie.no\0" +"sor-fron.no\0" +"heroy.more-og-romsdal.no\0" +"*.ck\0" +"!rakpetroleum.om\0" +"kr\xc3\xb8""dsherad.no\0mail.pl\0" +"mod.gi\0" +"gs.nl.no\0" +"mb.ca\0" +"pavia.it\0" +"civilisation.museum\0folldal.no\0" +"suli.hu\0" +"brumunddal.no\0" +"*.cy\0" +"pg.it\0troms\xc3\xb8.no\0" +"sex.pl\0y.se\0" +"org.ro\0" +"*.do\0" +"caserta.it\0org.sa\0" +"za.com\0halloffame.museum\0org.sb\0lviv.ua\0" +"mill.museum\0org.rs\0org.sc\0" +"org.sd\0" +"idv.hk\0!omanmobile.om\0org.ru\0org.se\0" +"langev\xc3\xa5g.no\0r\xc3\xa5holt.no\0starostwo.gov.pl\0" +"trani-andria-barletta.it\0org.sg\0" +"*.eg\0hvaler.no\0" +"*.ehime.jp\0" +"gmina.pl\0" +"bod\xc3\xb8.no\0org.sl\0" +"edu\0org.sn\0" +"org.so\0lib.wi.us\0" +"kommune.no\0" +"nome.pt\0" +"*.er\0namdalseid.no\0k12.wa.us\0" +"nm.cn\0org.st\0" +"*.et\0d\xc3\xb8nna.no\0" +"jewish.museum\0preservation.museum\0" +"slupsk.pl\0org.sy\0" +"art.br\0org.sz\0org.tj\0" +"ntr.br\0*.fj\0ski.no\0" +"*.fk\0rimini.it\0grajewo.pl\0" +"loppa.no\0" +"franziskaner.museum\0notteroy.no\0org.tn\0" +"org.to\0" +"nesoddtangen.no\0" +"org.ua\0" +"discovery.museum\0wloclawek.pl\0" +"lakas.hu\0org.tt\0" +"kurgan.ru\0" +"baltimore.museum\0nkz.ru\0org.tw\0" +"com.ac\0castle.museum\0" +"*.fukuoka.jp\0sandefjord.no\0varggat.no\0" +"com.af\0" +"com.ag\0" +"ato.br\0k12.nj.us\0" +"com.ai\0" +"city.hu\0oryol.ru\0" +"com.al\0nl.no\0mielno.pl\0cc.ma.us\0" +"org.vc\0" +"com.an\0g12.br\0" +"*.gt\0" +"*.gu\0" +"com.ba\0" +"com.bb\0americanart.museum\0" +"org.vi\0" +"kunstsammlung.museum\0" +"com.aw\0" +"flight.aero\0com.bh\0lib.mo.us\0org.vn\0" +"com.bi\0adygeya.ru\0" +"com.az\0" +"art.dz\0" +"com.bm\0" +"dr\xc3\xb8""bak.no\0" +"com.bo\0isla.pr\0" +"com.br\0" +"com.bs\0ustka.pl\0kuban.ru\0" +"press.aero\0" +"vs.it\0" +"meloy.no\0" +"*.il\0ulm.museum\0" +"com.by\0com.ci\0genoa.it\0" +"com.bz\0sn.cn\0" +"lib.or.us\0" +"santafe.museum\0org.ws\0" +}; + +#endif // QNETWORKCOOKIEJARTLD_P_H diff --git a/src/network/access/qnetworkcookiejartlds_p.h.INFO b/src/network/access/qnetworkcookiejartlds_p.h.INFO new file mode 100644 index 0000000..57a8d0e --- /dev/null +++ b/src/network/access/qnetworkcookiejartlds_p.h.INFO @@ -0,0 +1,17 @@ +The file qnetworkcookiejartlds_p.h is generated from the Public Suffix +List (see [1] and [2]), by the program residing at +util/network/cookiejar-generateTLDs in the Qt source tree. + +That program generates a character array and an index array from the +list to provide fast lookups of elements within C++. + +Those arrays in qnetworkcookiejartlds_p.h are derived from the Public +Suffix List ([2]), which was originally provided by +Jo Hermans . + +The file qnetworkcookiejartlds_p.h was last generated Friday, +November 19th 15:24 2010. + +---- +[1] list: http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1 +[2] homepage: http://publicsuffix.org/ diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 01b9c0c..6548158 100644 --- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -42,6 +42,7 @@ #include #include +#include "private/qnetworkcookiejar_p.h" class tst_QNetworkCookieJar: public QObject { @@ -53,6 +54,8 @@ private slots: void setCookiesFromUrl(); void cookiesForUrl_data(); void cookiesForUrl(); + void effectiveTLDs_data(); + void effectiveTLDs(); }; QT_BEGIN_NAMESPACE @@ -174,6 +177,31 @@ void tst_QNetworkCookieJar::setCookiesFromUrl_data() result += cookie; QTest::newRow("security-path-1") << preset << cookie << "http://www.foo.tld" << result << true; + // check effective TLDs + // 1. co.uk is an effective TLD, should be denied + result.clear(); + preset.clear(); + cookie.setPath("/"); + cookie.setDomain(".co.uk"); + QTest::newRow("effective-tld1-denied") << preset << cookie << "http://something.co.uk" << result << false; + cookie.setDomain("co.uk"); + QTest::newRow("effective-tld1-denied2") << preset << cookie << "http://something.co.uk" << result << false; + cookie.setDomain(".something.co.uk"); + result += cookie; + QTest::newRow("effective-tld1-accepted") << preset << cookie << "http://something.co.uk" << result << true; + + // 2. anything .ar is an effective TLD ('*.ar'), but 'gobiernoelectronico.ar' is an exception + result.clear(); + preset.clear(); + cookie.setDomain(".farmacia.ar"); + QTest::newRow("effective-tld2-denied") << preset << cookie << "http://farmacia.ar" << result << false; + QTest::newRow("effective-tld2-denied2") << preset << cookie << "http://www.farmacia.ar" << result << false; + QTest::newRow("effective-tld2-denied3") << preset << cookie << "http://www.anything.farmacia.ar" << result << false; + cookie.setDomain(".gobiernoelectronico.ar"); + result += cookie; + QTest::newRow("effective-tld2-accepted") << preset << cookie << "http://www.gobiernoelectronico.ar" << result << true; + + // setting the defaults: finalCookie = cookie; finalCookie.setPath("/something/"); @@ -334,6 +362,82 @@ void tst_QNetworkCookieJar::cookiesForUrl() QCOMPARE(result, expectedResult); } +void tst_QNetworkCookieJar::effectiveTLDs_data() +{ + QTest::addColumn("domain"); + QTest::addColumn("isTLD"); + + QTest::newRow("yes1") << "com" << true; + QTest::newRow("yes2") << "de" << true; + QTest::newRow("yes3") << "ulm.museum" << true; + QTest::newRow("yes4") << "krodsherad.no" << true; + QTest::newRow("yes5") << "1.bg" << true; + QTest::newRow("yes6") << "com.cn" << true; + QTest::newRow("yes7") << "org.ws" << true; + QTest::newRow("yes8") << "co.uk" << true; + QTest::newRow("yes9") << "wallonie.museum" << true; + + QTest::newRow("no1") << "anything.com" << false; + QTest::newRow("no2") << "anything.de" << false; + QTest::newRow("no3") << "eselsberg.ulm.museum" << false; + QTest::newRow("no4") << "noe.krodsherad.no" << false; + QTest::newRow("no5") << "2.1.bg" << false; + QTest::newRow("no6") << "foo.com.cn" << false; + QTest::newRow("no7") << "something.org.ws" << false; + QTest::newRow("no8") << "teatime.co.uk" << false; + QTest::newRow("no9") << "bla" << false; + QTest::newRow("no10") << "bla.bla" << false; + + const ushort s1[] = {0x74, 0x72, 0x61, 0x6e, 0xf8, 0x79, 0x2e, 0x6e, 0x6f, 0x00}; // xn--trany-yua.no + const ushort s2[] = {0x5d9, 0x5e8, 0x5d5, 0x5e9, 0x5dc, 0x5d9, 0x5dd, 0x2e, 0x6d, 0x75, 0x73, 0x65, 0x75, 0x6d, 0x00}; // xn--9dbhblg6di.museum + const ushort s3[] = {0x7ec4, 0x7e54, 0x2e, 0x68, 0x6b, 0x00}; // xn--mk0axi.hk + const ushort s4[] = {0x7f51, 0x7edc, 0x2e, 0x63, 0x6e, 0x00}; // xn--io0a7i.cn + const ushort s5[] = {0x72, 0xe1, 0x68, 0x6b, 0x6b, 0x65, 0x72, 0xe1, 0x76, 0x6a, 0x75, 0x2e, 0x6e, 0x6f, 0x00}; // xn--rhkkervju-01af.no + const ushort s6[] = {0xb9a, 0xbbf, 0xb99, 0xbcd, 0xb95, 0xbaa, 0xbcd, 0xbaa, 0xbc2, 0xbb0, 0xbcd, 0x00}; // xn--clchc0ea0b2g2a9gcd + const ushort s7[] = {0x627, 0x644, 0x627, 0x631, 0x62f, 0x646, 0x00}; // xn--mgbayh7gpa + const ushort s8[] = {0x63, 0x6f, 0x72, 0x72, 0x65, 0x69, 0x6f, 0x73, 0x2d, 0x65, 0x2d, 0x74, 0x65, 0x6c, 0x65, + 0x63, 0x6f, 0x6d, 0x75, 0x6e, 0x69, 0x63, 0x61, 0xe7, 0xf5, 0x65, 0x73, 0x2e, 0x6d, 0x75, + 0x73, 0x65, 0x75, 0x6d, 0x00}; // xn--correios-e-telecomunicaes-ghc29a.museum + QTest::newRow("yes-specialchars1") << QString::fromUtf16(s1) << true; + QTest::newRow("yes-specialchars2") << QString::fromUtf16(s2) << true; + QTest::newRow("yes-specialchars3") << QString::fromUtf16(s3) << true; + QTest::newRow("yes-specialchars4") << QString::fromUtf16(s4) << true; + QTest::newRow("yes-specialchars5") << QString::fromUtf16(s5) << true; + QTest::newRow("yes-specialchars6") << QString::fromUtf16(s6) << true; + QTest::newRow("yes-specialchars7") << QString::fromUtf16(s7) << true; + QTest::newRow("yes-specialchars8") << QString::fromUtf16(s8) << true; + + QTest::newRow("no-specialchars1") << QString::fromUtf16(s1).prepend("something") << false; + QTest::newRow("no-specialchars2") << QString::fromUtf16(s2).prepend(QString::fromUtf16(s2)) << false; + QTest::newRow("no-specialchars2.5") << QString::fromUtf16(s2).prepend("whatever") << false; + QTest::newRow("no-specialchars3") << QString::fromUtf16(s3).prepend("foo") << false; + QTest::newRow("no-specialchars4") << QString::fromUtf16(s4).prepend("bar") << false; + QTest::newRow("no-specialchars5") << QString::fromUtf16(s5).prepend(QString::fromUtf16(s2)) << false; + QTest::newRow("no-specialchars6") << QString::fromUtf16(s6).prepend(QLatin1Char('.') + QString::fromUtf16(s6)) << false; + QTest::newRow("no-specialchars7") << QString::fromUtf16(s7).prepend("bla") << false; + QTest::newRow("no-specialchars8") << QString::fromUtf16(s8).append("foo") << false; + + QTest::newRow("exception1") << "pref.iwate.jp" << false; + QTest::newRow("exception2") << "omanpost.om" << false; + QTest::newRow("exception3") << "omantel.om" << false; + QTest::newRow("exception4") << "gobiernoelectronico.ar" << false; + QTest::newRow("exception5") << "pref.ishikawa.jp" << false; + + QTest::newRow("yes-wildcard1") << "*.jm" << true; + QTest::newRow("yes-wildcard1.5") << "anything.jm" << true; + QTest::newRow("yes-wildcard2") << "something.kh" << true; + QTest::newRow("yes-wildcard3") << "whatever.uk" << true; + QTest::newRow("yes-wildcard4") << "anything.shizuoka.jp" << true; + QTest::newRow("yes-wildcard5") << "foo.sch.uk" << true; +} + +void tst_QNetworkCookieJar::effectiveTLDs() +{ + QFETCH(QString, domain); + QFETCH(bool, isTLD); + QCOMPARE(QNetworkCookieJarPrivate::isEffectiveTLD(domain), isTLD); +} + QTEST_MAIN(tst_QNetworkCookieJar) #include "tst_qnetworkcookiejar.moc" diff --git a/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro b/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro new file mode 100644 index 0000000..9d5f1cf --- /dev/null +++ b/util/network/cookiejar-generateTLDs/cookiejar-generateTLDs.pro @@ -0,0 +1,9 @@ +TEMPLATE = app +TARGET = +DEPENDPATH += . +INCLUDEPATH += . + +QT = core + +# Input +SOURCES += main.cpp diff --git a/util/network/cookiejar-generateTLDs/main.cpp b/util/network/cookiejar-generateTLDs/main.cpp new file mode 100644 index 0000000..fad2c71 --- /dev/null +++ b/util/network/cookiejar-generateTLDs/main.cpp @@ -0,0 +1,161 @@ +/**************************************************************************** +** +** 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 utils 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 + +static QString utf8encode(const QByteArray &array) // turns e.g. tranøy.no to tran\xc3\xb8y.no +{ + QString result; + result.reserve(array.length() + array.length() / 3); + for (int i = 0; i < array.length(); ++i) { + char c = array.at(i); + // if char is non-ascii, escape it + if (c < 0x20 || uchar(c) >= 0x7f) { + result += "\\x" + QString::number(uchar(c), 16); + } else { + // if previous char was escaped, we need to make sure the next char is not + // interpreted as part of the hex value, e.g. "äc.com" -> "\xabc.com"; this + // should be "\xab""c.com" + QRegExp hexEscape("\\\\x[a-fA-F0-9][a-fA-F0-9]$"); + bool isHexChar = ((c >= '0' && c <= '9') || + (c >= 'a' && c <= 'f') || + (c >= 'A' && c <= 'F')); + if (result.contains(hexEscape) && isHexChar) + result += "\"\""; + result += c; + } + } + return result; +} + +int main(int argc, char **argv) { + + QCoreApplication app(argc, argv); + if (argc < 3) { + printf("\nusage: %s inputFile outputFile\n\n", argv[0]); + printf("'inputFile' should be a list of effective TLDs, one per line,\n"); + printf("as obtained from http://publicsuffix.org . To create indices and data file\n"); + printf("file, do the following:\n\n"); + printf(" wget http://mxr.mozilla.org/mozilla-central/source/netwerk/dns/effective_tld_names.dat?raw=1 -O effective_tld_names.dat\n"); + printf(" grep '^[^\\/\\/]' effective_tld_names.dat > effective_tld_names.dat.trimmed\n"); + printf(" %s effective_tld_names.dat.trimmed effective_tld_names.dat.qt\n\n", argv[0]); + printf("Now copy the data from effective_tld_names.dat.qt to the file src/network/access/qnetworkcookiejartlds_p.h in your Qt repo\n\n"); + exit(1); + } + QFile file(argv[1]); + QFile outFile(argv[2]); + file.open(QIODevice::ReadOnly); + outFile.open(QIODevice::WriteOnly); + + QByteArray outIndicesBufferBA; + QBuffer outIndicesBuffer(&outIndicesBufferBA); + outIndicesBuffer.open(QIODevice::WriteOnly); + + QByteArray outDataBufferBA; + QBuffer outDataBuffer(&outDataBufferBA); + outDataBuffer.open(QIODevice::WriteOnly); + + int lineCount = 0; + while (!file.atEnd()) { + file.readLine(); + lineCount++; + } + file.reset(); + QVector strings(lineCount); + while (!file.atEnd()) { + QString s = QString::fromUtf8(file.readLine()); + QString st = s.trimmed(); + int num = qHash(st) % lineCount; + + QString utf8String = utf8encode(st.toUtf8()); + + // for domain 1.com, we could get something like + // a.com\01.com, which would be interpreted as octal 01, + // so we need to separate those strings with quotes + QRegExp regexpOctalEscape(QLatin1String("^[0-9]")); + if (!strings.at(num).isEmpty() && st.contains(regexpOctalEscape)) + strings[num].append("\"\""); + + strings[num].append(utf8String); + strings[num].append("\\0"); + } + + outIndicesBuffer.write("static const quint16 tldCount = "); + outIndicesBuffer.write(QByteArray::number(lineCount)); + outIndicesBuffer.write(";\n"); + outIndicesBuffer.write("static const quint16 tldIndices["); +// outIndicesBuffer.write(QByteArray::number(lineCount+1)); // not needed + outIndicesBuffer.write("] = {\n"); + + int utf8Size = 0; +// int charSize = 0; + for (int a = 0; a < lineCount; a++) { + bool lineIsEmpty = strings.at(a).isEmpty(); + if (!lineIsEmpty) { + strings[a].prepend("\""); + strings[a].append("\""); + } + int zeroCount = strings.at(a).count(QLatin1String("\\0")); + int utf8CharsCount = strings.at(a).count(QLatin1String("\\x")); + int quoteCount = strings.at(a).count('"'); + outDataBuffer.write(strings.at(a).toUtf8()); + if (!lineIsEmpty) + outDataBuffer.write("\n"); + outIndicesBuffer.write(QByteArray::number(utf8Size)); + outIndicesBuffer.write(",\n"); + utf8Size += strings.at(a).count() - (zeroCount + quoteCount + utf8CharsCount * 3); +// charSize += strings.at(a).count(); + } + outIndicesBuffer.write(QByteArray::number(utf8Size)); + outIndicesBuffer.write("};\n"); + outIndicesBuffer.close(); + outFile.write(outIndicesBufferBA); + + outDataBuffer.close(); + outFile.write("\nstatic const char tldData["); +// outFile.write(QByteArray::number(charSize)); // not needed + outFile.write("] = {\n"); + outFile.write(outDataBufferBA); + outFile.write("};\n"); + outFile.close(); + printf("data generated to %s . Now copy the data from this file to src/network/access/qnetworkcookiejartlds_p.h in your Qt repo\n", argv[2]); + exit(0); +} -- cgit v0.12 From 5c11ca38c441dd0e4e105ca0b5372dc917cf31b1 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 10:56:06 +1000 Subject: Ensure QDeclarativePrivate::RegisterType version is updated and checked. Also exclude from bic check since we expect its size to increase from time to time. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 4 ++-- src/declarative/qml/qdeclarativemetatype.cpp | 3 ++- src/declarative/qml/qdeclarativeprivate.h | 1 + tests/auto/bic/tst_bic.cpp | 3 +++ 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index 8a6d068..cdd7202 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -199,7 +199,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 1, + 2, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), @@ -233,7 +233,7 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 1, + 2, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index 1f387c4..e90fa40 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -200,7 +200,8 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; - d->m_revision = type.revision; + if (type.version > 1) // revisions added in version 2 + d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; d->m_allocationSize = type.objectSize; diff --git a/src/declarative/qml/qdeclarativeprivate.h b/src/declarative/qml/qdeclarativeprivate.h index a4fc4c1..981df78 100644 --- a/src/declarative/qml/qdeclarativeprivate.h +++ b/src/declarative/qml/qdeclarativeprivate.h @@ -215,6 +215,7 @@ namespace QDeclarativePrivate QDeclarativeCustomParser *customParser; int revision; + // If this is extended ensure "version" is bumped!!! }; struct RegisterInterface { diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index cd1d5ca..74fa252 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -135,6 +135,9 @@ tst_Bic::tst_Bic() /* This structure is semi-private and should never shrink */ bic.addBlacklistedClass(QLatin1String("QVFbHeader")); + + /* This structure has a version field that allows extension */ + bic.addBlacklistedClass(QLatin1String("QDeclarativePrivate::RegisterType")); } void tst_Bic::initTestCase_data() -- cgit v0.12 From fa5c838636a8cf4e483706696d19afef495da994 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 11:10:38 +1000 Subject: Fix version in previous commit. Had already been bumped. The version had already been bumped from 0 to 1. Only the version check was required. Task-number: QTBUG-13451 Reviewed-by: Aaron Kennedy --- src/declarative/qml/qdeclarative.h | 4 ++-- src/declarative/qml/qdeclarativemetatype.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/declarative/qml/qdeclarative.h b/src/declarative/qml/qdeclarative.h index cdd7202..8a6d068 100644 --- a/src/declarative/qml/qdeclarative.h +++ b/src/declarative/qml/qdeclarative.h @@ -199,7 +199,7 @@ int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const c QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 2, + 1, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), @@ -233,7 +233,7 @@ int qmlRegisterRevision(const char *uri, int versionMajor, int versionMinor) QByteArray listName("QDeclarativeListProperty<" + name + ">"); QDeclarativePrivate::RegisterType type = { - 2, + 1, qRegisterMetaType(pointerName.constData()), qRegisterMetaType >(listName.constData()), diff --git a/src/declarative/qml/qdeclarativemetatype.cpp b/src/declarative/qml/qdeclarativemetatype.cpp index e90fa40..48a63bb 100644 --- a/src/declarative/qml/qdeclarativemetatype.cpp +++ b/src/declarative/qml/qdeclarativemetatype.cpp @@ -200,7 +200,7 @@ QDeclarativeType::QDeclarativeType(int index, const QDeclarativePrivate::Registe d->m_name = name; d->m_version_maj = type.versionMajor; d->m_version_min = type.versionMinor; - if (type.version > 1) // revisions added in version 2 + if (type.version >= 1) // revisions added in version 1 d->m_revision = type.revision; d->m_typeId = type.typeId; d->m_listId = type.listId; -- cgit v0.12 From 57a3d4250ea438b2607d7f62ef26b8b83eb0f66c Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 6 Jan 2011 11:16:49 +1000 Subject: Doc fixes for introduction page and Item docs Moved 'Identity' and 'Property Change Signals' sections from Item docs to the intro page, which previously had a section on ids but this has been moved out of the 'Properties' section since an id isn't an ordinary property. --- doc/src/declarative/qdeclarativeintro.qdoc | 213 +++++++++++++-------- src/declarative/graphicsitems/qdeclarativeitem.cpp | 28 --- 2 files changed, 130 insertions(+), 111 deletions(-) diff --git a/doc/src/declarative/qdeclarativeintro.qdoc b/doc/src/declarative/qdeclarativeintro.qdoc index 4e41fda..20db248 100644 --- a/doc/src/declarative/qdeclarativeintro.qdoc +++ b/doc/src/declarative/qdeclarativeintro.qdoc @@ -37,7 +37,7 @@ interface is specified as a tree of objects with properties. This introduction is meant for those with little or no programming experience. JavaScript is used as a scripting language in QML, so you may want -to learn a bit more about it (\l{Javascript Guide}) before diving +to learn a bit more about it (see the \l{Javascript Guide}) before diving deeper into QML. It's also helpful to have a basic understanding of other web technologies like HTML and CSS, but it's not required. @@ -60,13 +60,13 @@ Rectangle { } \endcode -Objects are specified by their type, followed by a pair of braces. Object -types always begin with a capital letter. In the above example, there are -two objects, a \l Rectangle, and an \l Image. Between the braces, we can specify -information about the object, such as its properties. +Here we create two objects, a \l Rectangle object and its child +\l Image object. Objects are specified by their type, followed by a pair of +braces in between which additional data can be defined for the object, such as +its property values and any child objects. -Properties are specified as \c {property: value}. In the above example, we -can see the Image has a property named \c source, which has been assigned the +Properties are specified with a \c {property: value} syntax. In the above example, we +can see the \l Image object has a property named \c source, which has been assigned the value \c "pics/logo.png". The property and its value are separated by a colon. Properties can be specified one-per-line: @@ -87,45 +87,13 @@ Rectangle { width: 100; height: 100 } When multiple property/value pairs are specified on a single line, they must be separated by a semicolon. -The \c import statement imports the \c Qt \l{QML Modules}{module}, which contains all of the +The \c import statement imports the \c QtQuick \l{QML Modules}{module}, which contains all of the standard \l {QML Elements}. Without this import statement, the \l Rectangle and \l Image elements would not be available. -\section1 Expressions - -In addition to assigning values to properties, you can also assign -expressions written in JavaScript. - -\code -Rotation { - angle: 360 * 3 -} -\endcode - -These expressions can include references to other objects and properties, in which case -a \e binding is established: when the value of the expression changes, the property the -expression has been assigned to is automatically updated to that value. - -\code -Item { - Text { - id: text1 - text: "Hello World" - } - Text { - id: text2 - text: text1.text - } -} -\endcode - -In the example above, the \c text2 object will display the same text as \c text1. If \c text1 is changed, -\c text2 is automatically changed to the same value. -Note that to refer to other objects, we use their \e id values. (See below for more -information on the \e id property.) -\section1 QML Comments +\section1 Comments Commenting in QML is similar to JavaScript. \list @@ -149,27 +117,95 @@ Text { } \endcode -In the above example, the Text object will have normal opacity, since the +In the above example, the \l Text object will have normal opacity, since the line opacity: 0.5 has been turned into a comment. -\section1 Properties -\target intro-properties -\section2 Property naming -Properties begin with a lowercase letter (with the exception of \l{Attached Properties}). +\section1 Object identifiers + +Each object can be given a special \e id value that allows the object to be identified +and referred to by other objects. + +For example, below we have two \l Text objects. The first \l Text object +has an \c id value of "text1". The second \l Text object can now set its own +\c text property value to be the same as that of the first object, by referring to +\c text1.text: + +\qml +import QtQuick 1.0 + +Row { + Text { + id: text1 + text: "Hello World" + } + + Text { text: text1.text } +} +\endqml + +An object can be referred to by its \c id from anywhere within the \l {QML Documents}{component} +in which it is declared. Therefore, an \c id value must always be unique within a single component. + +The \c id value is a special value for a QML object and should not be thought of as an +ordinary object property; for example, it is not possible to access \c text1.id in the +above example. Once an object is created, its \c id cannot be changed. + +Note that an \c id must begin with a lower-case letter or an underscore, and cannot contain +characters other than letters, numbers and underscores. + + + +\section1 Expressions + +JavaScript expressions can be used to assign property values. For example: + +\code +Item { + width: 100 * 3 + height: 50 + 22 +} +\endcode + +These expressions can include references to other objects and properties, in which case +a \l{Property Binding}{binding} is established: when the value of the expression changes, +the property to which the expression is assigned is automatically updated to the +new value. For example: + +\code +Item { + width: 300 + height: 300 + + Rectangle { + width: parent.width - 50 + height: 100 + color: "yellow" + } +} +\endcode + +Here, the \l Rectangle object's \c width property is set relative to the width +of its parent. Whenever the parent's width changes, the width of the \l Rectangle is +automatically updated. -\section2 Property types -QML supports properties of many types (see \l{QML Basic Types}). The basic types include int, -real, bool, string, color, and lists. + +\section1 Properties +\target intro-properties + +\section2 Basic property types + +QML supports properties of many types (see \l{QML Basic Types}). The basic types include \c int, +\c real, \c bool, \c string and \c color. \code Item { x: 10.5 // a 'real' property - ... state: "details" // a 'string' property focus: true // a 'bool' property + ... } \endcode @@ -183,31 +219,30 @@ Item { } \endcode -\section3 The \c id property +Note that with the exception of \l {Attached Properties}, properties always begin with a lowercase +letter. -Each object can be given a special unique property called an \e id. No other object within the -same QML component (see \l{QML Documents}) can have the same \c id value. Assigning an id enables the object -to be referred to by other objects and scripts. -The first Rectangle element below has an \e id, "myRect". The second Rectangle element defines its -own width by referring to \tt myRect.width, which means it will have the same \tt width -value as the first Rectangle element. +\section2 Property change notifications -\code -Item { - Rectangle { - id: myRect - width: 100 - height: 100 - } - Rectangle { - width: myRect.width - height: 200 - } +When a property changes value, it can send a signal to notify others of this change. + +To receive these signals, simply create a \e {signal handler} named with an \c onChanged +syntax. For example, the \l Rectangle element has \l {Item::}{width} and \l {Rectangle::}{color} +properties. Below, we have a \l Rectangle object that has defined two signal handlers, +\c onWidthChanged and \c onColorChanged, which will automaticallly be called whenever these +properties are modified: + +\qml +Rectangle { + width: 100; height: 100 + + onWidthChanged: console.log("Width has changed to:", width) + onColorChanged: console.log("Color has changed to:", color) } -\endcode +\endqml -Note that an \e id must begin with a lower-case letter or an underscore, and cannot contain characters other than letters, numbers and underscores. +Signal handlers are explained further \l {Signal Handlers}{below}. \section2 List properties @@ -293,7 +328,9 @@ Some objects attach properties to another object. Attached Properties are of the form \e {Type.property} where \e Type is the type of the element that attaches \e property. -For example: +For example, the \l ListView element attaches the \e ListView.isCurrentItem property +to each delegate it creates: + \code Component { id: myDelegate @@ -307,9 +344,6 @@ ListView { } \endcode -The \l ListView element attaches the \e ListView.isCurrentItem property -to each delegate it creates. - Another example of attached properties is the \l Keys element which attaches properties for handling key presses to any visual Item, for example: @@ -321,27 +355,40 @@ Item { } \endcode -\section2 Signal Handlers +\section1 Signal Handlers -Signal handlers allow actions to be taken in response to an event. For instance, -the \l MouseArea element has signal handlers to handle mouse press, release -and click: +Signal handlers allow JavaScript code to be executed in response to an event. For +example, the \l MouseArea element has an \l {MouseArea::}{onClicked} handler that can +be used to respond to a mouse click. Below, we use this handler to print a +message whenever the mouse is clicked: \code -MouseArea { - onPressed: console.log("mouse button pressed") +Item { + width: 100; height: 100 + + MouseArea { + anchors.fill: parent + onClicked: { + console.log("mouse button clicked") + } + } } \endcode All signal handlers begin with \e "on". -Some signal handlers include an optional parameter, for example -the MouseArea onPressed signal handler has a \e mouse parameter: +Some signal handlers include an optional parameter. For example +the MouseArea \l{MouseArea::}{onPressed} signal handler has a \c mouse parameter +that contains information about the mouse press. This parameter can be referred to in +the JavaScript code, as below: \code MouseArea { acceptedButtons: Qt.LeftButton | Qt.RightButton - onPressed: if (mouse.button == Qt.RightButton) console.log("Right mouse button pressed") + onPressed: { + if (mouse.button == Qt.RightButton) + console.log("Right mouse button pressed") + } } \endcode diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 24d9b03..922fa8f 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -1333,23 +1333,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec } \endqml - \section1 Identity - - Each item has an "id" - the identifier of the Item. - - The identifier can be used in bindings and other expressions to - refer to the item. For example: - - \qml - Text { id: myText; ... } - Text { text: myText.text } - \endqml - - The identifier is available throughout to the \l {components}{component} - where it is declared. The identifier must be unique in the component. - - The id should not be thought of as a "property" - it makes no sense - to write \c myText.id, for example. \section1 Key Handling @@ -1376,17 +1359,6 @@ QDeclarativeKeysAttached *QDeclarativeKeysAttached::qmlAttachedProperties(QObjec \endqml See the \l {Keys}{Keys} attached property for detailed documentation. - - \section1 Property Change Signals - - Most properties on Item and Item derivatives have a signal - emitted when they change. By convention, the signals are - named Changed, e.g. xChanged will be emitted when an item's - x property changes. Note that these also have signal handers e.g. - the onXChanged signal handler will be called when an item's x property - changes. For many properties in Item or Item derivatives this can be used - to add a touch of imperative logic to your application (when absolutely - necessary). */ /*! -- cgit v0.12 From 1d7b672fd46abab51a0124ad19aad18e5d14f1a8 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 6 Jan 2011 14:10:35 +1000 Subject: Update docs - calling overloaded functions from QML is now supported --- doc/src/declarative/qtbinding.qdoc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/doc/src/declarative/qtbinding.qdoc b/doc/src/declarative/qtbinding.qdoc index 04b8ca6..8ee7247 100644 --- a/doc/src/declarative/qtbinding.qdoc +++ b/doc/src/declarative/qtbinding.qdoc @@ -96,7 +96,7 @@ There are a number of ways to extend your QML application through C++. For examp \list \o Load a QML component and manipulate it (or its children) from C++ \o Embed a C++ object and its properties directly into a QML component (for example, to make a -particular C++ object callable from QML, or to replace a dummy list model data with a real data set) +particular C++ object callable from QML, or to replace a dummy list model with a real data set) \o Define new QML elements (through QObject-based C++ classes) and create them directly from your QML code \endlist @@ -297,17 +297,20 @@ methods on the \c myObject object, which has been set using QDeclarativeContext: \snippet doc/src/snippets/declarative/qtbinding/functions-cpp/main.cpp 0 \endtable -Note that QML does not support overloaded functions. If a C++ has more than one function with the -same name, there is no guarantee which overloaded function will be called from QML. +QML supports the calling of overloaded C++ functions. If there are multiple C++ functions with the +same name but different arguments, the correct function will be called according to the number and +the types of arguments that are provided. \section2 Receiving signals All QML signals are automatically available to C++, and can be connected to using QObject::connect() -like any ordinary Qt C++ signal. +like any ordinary Qt C++ signal. In return, any C++ signal can be received by a QML object using +\l {Signal Handlers}{signal handlers}. Here is a QML component with a signal named \c qmlSignal. This signal is connected to a C++ object's -slot using QObject::connect(): +slot using QObject::connect(), so that the \c cppSlot() method is called whenever the \c qmlSignal +is emitted: \table \row -- cgit v0.12 From c1a87921c8a85d5ecee9aba3b3578ae8d042c28a Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Thu, 6 Jan 2011 14:22:35 +1000 Subject: Add Repeater itemAdded(), itemRemoved() signals and itemAt() method Task-number: QTBUG-15161 Reviewed-by: Martin Jones --- doc/src/declarative/qdeclarativemodels.qdoc | 4 +- .../graphicsitems/qdeclarativerepeater.cpp | 123 ++++++++---- .../graphicsitems/qdeclarativerepeater_p.h | 6 + .../tst_qdeclarativerepeater.cpp | 216 +++++++++++++++++++-- 4 files changed, 293 insertions(+), 56 deletions(-) diff --git a/doc/src/declarative/qdeclarativemodels.qdoc b/doc/src/declarative/qdeclarativemodels.qdoc index e11cd56..9fc6696 100644 --- a/doc/src/declarative/qdeclarativemodels.qdoc +++ b/doc/src/declarative/qdeclarativemodels.qdoc @@ -161,7 +161,7 @@ while QAbstractItemModel provides a more flexible solution for more complex models. -\section2 QStringList +\section2 QStringList-based model A model may be a simple QStringList, which provides the contents of the list via the \e modelData role. @@ -182,7 +182,7 @@ have changed. If the QStringList changes, it will be necessary to reset the model by calling QDeclarativeContext::setContextProperty() again. -\section2 QList +\section2 QObjectList-based model A list of QObject* values can also be used as a model. A QList provides the properties of the objects in the list as roles. diff --git a/src/declarative/graphicsitems/qdeclarativerepeater.cpp b/src/declarative/graphicsitems/qdeclarativerepeater.cpp index 6f46c7b..fa684c1 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater.cpp +++ b/src/declarative/graphicsitems/qdeclarativerepeater.cpp @@ -84,43 +84,23 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \image repeater-simple.png - The \l model of a Repeater can be any of the supported \l {qmlmodels}{Data Models}. + A Repeater's \l model can be any of the supported \l {qmlmodels}{data models}. + Additionally, like delegates for other views, a Repeater delegate can access + its index within the repeater, as well as the model data relevant to the + delegate. See the \l delegate property documentation for details. Items instantiated by the Repeater are inserted, in order, as children of the Repeater's parent. The insertion starts immediately after the repeater's position in its parent stacking list. This allows a Repeater to be used inside a layout. For example, the following Repeater's items are stacked between a red rectangle and a blue rectangle: - + \snippet doc/src/snippets/declarative/repeaters/repeater.qml layout \image repeater.png - \section2 The \c index and \c modelData properties - - The index of a delegate is exposed as an accessible \c index property in the delegate. - Properties of the model are also available depending upon the type of \l {qmlmodels}{Data Model}. - - Here is a Repeater that uses the \c index property inside the instantiated items: - - \table - \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index - \o \image repeater-index.png - \endtable - - Here is another Repeater that uses the \c modelData property to reference the data for a - particular index: - - \table - \row - \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata - \o \image repeater-modeldata.png - \endtable - - - A Repeater item owns all items it instantiates. Removing or dynamically destroying + \note A Repeater item owns all items it instantiates. Removing or dynamically destroying an item created by a Repeater results in unpredictable behavior. @@ -146,6 +126,27 @@ QDeclarativeRepeaterPrivate::~QDeclarativeRepeaterPrivate() \endcode */ +/*! + \qmlsignal Repeater::onItemAdded(int index, Item item) + \since Quick 1.1 + + This handler is called when an item is added to the repeater. The \a index + parameter holds the index at which the item has been inserted within the + repeater, and the \a item parameter holds the \l Item that has been added. +*/ + +/*! + \qmlsignal Repeater::onItemRemoved(int index, Item item) + \since Quick 1.1 + + This handler is called when an item is removed from the repeater. The \a index + parameter holds the index at which the item was removed from the repeater, + and the \a item parameter holds the \l Item that was removed. + + Do not keep a reference to \a item if it was created by this repeater, as + in these cases it will be deleted shortly after the handler is called. +*/ + QDeclarativeRepeater::QDeclarativeRepeater(QDeclarativeItem *parent) : QDeclarativeItem(*(new QDeclarativeRepeaterPrivate), parent) { @@ -160,26 +161,16 @@ QDeclarativeRepeater::~QDeclarativeRepeater() The model providing data for the repeater. - This property can be set to any of the following: + This property can be set to any of the supported \l {qmlmodels}{data models}: \list - \o A number that indicates the number of delegates to be created + \o A number that indicates the number of delegates to be created by the repeater \o A model (e.g. a ListModel item, or a QAbstractItemModel subclass) \o A string list \o An object list \endlist - In each case, the data element and the index is exposed to each instantiated - component. The index is always exposed as an accessible \c index property. - In the case of an object or string list, the data element (of type string - or object) is available as the \c modelData property. In the case of a Qt model, - all roles are available as named properties just like in the view classes. - - As a special case the model can also be merely a number. In this case it will - create that many instances of the component. They will also be assigned an index - based on the order they are created. - - Models can also be created directly in QML, using a \l{ListModel} or \l{XmlListModel}. + The type of model affects the properties that are exposed to the \l delegate. \sa {qmlmodels}{Data Models} */ @@ -243,8 +234,33 @@ void QDeclarativeRepeater::setModel(const QVariant &model) \default The delegate provides a template defining each item instantiated by the repeater. - The index is exposed as an accessible \c index property. Properties of the - model are also available depending upon the type of \l {qmlmodels}{Data Model}. + + Delegates are exposed to a read-only \c index property that indicates the index + of the delegate within the repeater. For example, the following \l Text delegate + displays the index of each repeated item: + + \table + \row + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml index + \o \image repeater-index.png + \endtable + + If the \l model is a \l{QStringList-based model}{string list} or + \l{QObjectList-based model}{object list}, the delegate is also exposed to + a read-only \c modelData property that holds the string or object data. For + example: + + \table + \row + \o \snippet doc/src/snippets/declarative/repeaters/repeater.qml modeldata + \o \image repeater-modeldata.png + \endtable + + If the \l model is a model object (such as a \l ListModel) the delegate + can access all model roles as named properties, in the same way that delegates + do for view classes like ListView. + + \sa {QML Data Models} */ QDeclarativeComponent *QDeclarativeRepeater::delegate() const { @@ -288,6 +304,21 @@ int QDeclarativeRepeater::count() const return 0; } +/*! + \qmlmethod Item Repeater::itemAt(index) + \since Quick 1.1 + + Returns the \l Item that has been created at the given \a index, or \c null + if no item exists at \a index. +*/ +QDeclarativeItem *QDeclarativeRepeater::itemAt(int index) const +{ + Q_D(const QDeclarativeRepeater); + if (index >= 0 && index < d->deletables.count()) + return d->deletables[index]; + return 0; + +} void QDeclarativeRepeater::componentComplete() { @@ -309,8 +340,13 @@ QVariant QDeclarativeRepeater::itemChange(GraphicsItemChange change, void QDeclarativeRepeater::clear() { Q_D(QDeclarativeRepeater); + bool complete = isComponentComplete(); + if (d->model) { - foreach (QDeclarativeItem *item, d->deletables) { + while (d->deletables.count() > 0) { + QDeclarativeItem *item = d->deletables.takeLast(); + if (complete) + emit itemRemoved(d->deletables.count()-1, item); d->model->release(item); } } @@ -335,6 +371,7 @@ void QDeclarativeRepeater::regenerate() item->setParentItem(parentItem()); item->stackBefore(this); d->deletables << item; + emit itemAdded(ii, item); } } } @@ -355,6 +392,7 @@ void QDeclarativeRepeater::itemsInserted(int index, int count) else item->stackBefore(this); d->deletables.insert(modelIndex, item); + emit itemAdded(modelIndex, item); } } emit countChanged(); @@ -367,6 +405,7 @@ void QDeclarativeRepeater::itemsRemoved(int index, int count) return; while (count--) { QDeclarativeItem *item = d->deletables.takeAt(index); + emit itemRemoved(index, item); if (item) d->model->release(item); else diff --git a/src/declarative/graphicsitems/qdeclarativerepeater_p.h b/src/declarative/graphicsitems/qdeclarativerepeater_p.h index ff58fa0..62552a6 100644 --- a/src/declarative/graphicsitems/qdeclarativerepeater_p.h +++ b/src/declarative/graphicsitems/qdeclarativerepeater_p.h @@ -72,10 +72,16 @@ public: int count() const; + Q_INVOKABLE Q_REVISION(1) QDeclarativeItem *itemAt(int index) const; + Q_SIGNALS: void modelChanged(); void delegateChanged(); void countChanged(); + + Q_REVISION(1) void itemAdded(int index, QDeclarativeItem *item); + Q_REVISION(1) void itemRemoved(int index, QDeclarativeItem *item); + private: void clear(); void regenerate(); diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 91a4d68..1b38c11 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -69,8 +69,11 @@ private slots: void numberModel(); void objectList(); void stringList(); - void dataModel(); + void dataModel_adding(); + void dataModel_removing(); + void dataModel_changes(); void itemModel(); + void resetModel(); void properties(); private: @@ -186,6 +189,11 @@ void tst_QDeclarativeRepeater::numberModel() QVERIFY(repeater != 0); QCOMPARE(repeater->parentItem()->childItems().count(), 5+1); + QVERIFY(!repeater->itemAt(-1)); + for (int i=0; icount(); i++) + QCOMPARE(repeater->itemAt(i), repeater->parentItem()->childItems().at(i)); + QVERIFY(!repeater->itemAt(repeater->count())); + QMetaObject::invokeMethod(canvas->rootObject(), "checkProperties"); QVERIFY(testObject->error() == false); @@ -223,6 +231,17 @@ void tst_QDeclarativeRepeater::objectList() QCOMPARE(repeater->property("errors").toInt(), 0);//If this fails either they are out of order or can't find the object's data QCOMPARE(repeater->property("instantiated").toInt(), 100); + QVERIFY(!repeater->itemAt(-1)); + for (int i=0; iitemAt(i), repeater->parentItem()->childItems().at(i)); + QVERIFY(!repeater->itemAt(data.count())); + + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + ctxt->setContextProperty("testData", QVariant::fromValue(data)); + QCOMPARE(addedSpy.count(), data.count()); + QCOMPARE(removedSpy.count(), data.count()); + qDeleteAll(data); delete canvas; } @@ -284,7 +303,69 @@ void tst_QDeclarativeRepeater::stringList() delete canvas; } -void tst_QDeclarativeRepeater::dataModel() +void tst_QDeclarativeRepeater::dataModel_adding() +{ + QDeclarativeView *canvas = createView(); + QDeclarativeContext *ctxt = canvas->rootContext(); + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); + + TestModel testModel; + ctxt->setContextProperty("testData", &testModel); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); + qApp->processEvents(); + + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + + QVERIFY(!repeater->itemAt(0)); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + + // add to empty model + testModel.addItem("two", "2"); + QCOMPARE(repeater->itemAt(0), container->childItems().at(0)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(0)); + addedSpy.clear(); + + // insert at start + testModel.insertItem(0, "one", "1"); + QCOMPARE(repeater->itemAt(0), container->childItems().at(0)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(0)); + addedSpy.clear(); + + // insert at end + testModel.insertItem(2, "four", "4"); + QCOMPARE(repeater->itemAt(2), container->childItems().at(2)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 2); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(2)); + addedSpy.clear(); + + // insert in middle + testModel.insertItem(2, "three", "3"); + QCOMPARE(repeater->itemAt(2), container->childItems().at(2)); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(addedSpy.count(), 1); + QCOMPARE(addedSpy.at(0).at(0).toInt(), 2); + QCOMPARE(addedSpy.at(0).at(1).value(), container->childItems().at(2)); + addedSpy.clear(); + + delete testObject; + delete canvas; +} + +void tst_QDeclarativeRepeater::dataModel_removing() { QDeclarativeView *canvas = createView(); QDeclarativeContext *ctxt = canvas->rootContext(); @@ -295,28 +376,84 @@ void tst_QDeclarativeRepeater::dataModel() testModel.addItem("one", "1"); testModel.addItem("two", "2"); testModel.addItem("three", "3"); + testModel.addItem("four", "4"); + testModel.addItem("five", "5"); ctxt->setContextProperty("testData", &testModel); - canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); qApp->processEvents(); QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); QVERIFY(repeater != 0); - QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); QVERIFY(container != 0); + QCOMPARE(container->childItems().count(), repeater->count()+1); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + + // remove at start + QDeclarativeItem *item = repeater->itemAt(0); + QCOMPARE(item, container->childItems().at(0)); + + testModel.removeItem(0); + QVERIFY(repeater->itemAt(0) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), 0); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); + + // remove at end + int lastIndex = testModel.count()-1; + item = repeater->itemAt(lastIndex); + QCOMPARE(item, container->childItems().at(lastIndex)); + + testModel.removeItem(lastIndex); + QVERIFY(repeater->itemAt(lastIndex) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), lastIndex); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); + + // remove from middle + item = repeater->itemAt(1); + QCOMPARE(item, container->childItems().at(1)); + + testModel.removeItem(1); + QVERIFY(repeater->itemAt(lastIndex) != item); + QCOMPARE(countSpy.count(), 1); countSpy.clear(); + QCOMPARE(removedSpy.count(), 1); + QCOMPARE(removedSpy.at(0).at(0).toInt(), 1); + QCOMPARE(removedSpy.at(0).at(1).value(), item); + removedSpy.clear(); - QCOMPARE(container->childItems().count(), 4); + delete testObject; + delete canvas; +} - QSignalSpy repeaterSpy(repeater, SIGNAL(countChanged())); - testModel.addItem("four", "4"); - QCOMPARE(container->childItems().count(), 5); - QCOMPARE(repeaterSpy.count(),1); +void tst_QDeclarativeRepeater::dataModel_changes() +{ + QDeclarativeView *canvas = createView(); + QDeclarativeContext *ctxt = canvas->rootContext(); + TestObject *testObject = new TestObject; + ctxt->setContextProperty("testObject", testObject); - testModel.removeItem(2); - QCOMPARE(container->childItems().count(), 4); - QCOMPARE(repeaterSpy.count(),2); + TestModel testModel; + testModel.addItem("one", "1"); + testModel.addItem("two", "2"); + testModel.addItem("three", "3"); + + ctxt->setContextProperty("testData", &testModel); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater2.qml")); + qApp->processEvents(); + + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + QCOMPARE(container->childItems().count(), repeater->count()+1); // Check that model changes are propagated QDeclarativeText *text = findItem(canvas->rootObject(), "myName", 1); @@ -377,6 +514,61 @@ void tst_QDeclarativeRepeater::itemModel() delete canvas; } +void tst_QDeclarativeRepeater::resetModel() +{ + QDeclarativeView *canvas = createView(); + + QStringList dataA; + for (int i=0; i<10; i++) + dataA << QString::number(i); + + QDeclarativeContext *ctxt = canvas->rootContext(); + ctxt->setContextProperty("testData", dataA); + canvas->setSource(QUrl::fromLocalFile(SRCDIR "/data/repeater1.qml")); + qApp->processEvents(); + QDeclarativeRepeater *repeater = findItem(canvas->rootObject(), "repeater"); + QVERIFY(repeater != 0); + QDeclarativeItem *container = findItem(canvas->rootObject(), "container"); + QVERIFY(container != 0); + + QCOMPARE(repeater->count(), dataA.count()); + + QSignalSpy countSpy(repeater, SIGNAL(countChanged())); + QSignalSpy addedSpy(repeater, SIGNAL(itemAdded(int,QDeclarativeItem*))); + QSignalSpy removedSpy(repeater, SIGNAL(itemRemoved(int,QDeclarativeItem*))); + + QStringList dataB; + for (int i=0; i<20; i++) + dataB << QString::number(i); + + // reset context property + ctxt->setContextProperty("testData", dataB); + QCOMPARE(repeater->count(), dataB.count()); + + QCOMPARE(countSpy.count(), 1); + QCOMPARE(removedSpy.count(), dataA.count()); + QCOMPARE(addedSpy.count(), dataB.count()); + for (int i=0; i(), repeater->itemAt(i)); + } + countSpy.clear(); + removedSpy.clear(); + addedSpy.clear(); + + // reset via setModel() + repeater->setModel(dataA); + QCOMPARE(repeater->count(), dataA.count()); + + QCOMPARE(countSpy.count(), 1); + QCOMPARE(removedSpy.count(), dataB.count()); + QCOMPARE(addedSpy.count(), dataA.count()); + for (int i=0; i(), repeater->itemAt(i)); + } +} + void tst_QDeclarativeRepeater::properties() { QDeclarativeEngine engine; -- cgit v0.12 From 1ba3e41f09ea719249286fede5d3fe96621ccb61 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 15:48:52 +1000 Subject: PathView: update modelCount before attempting to regenerate delegates. If the model is a VisualDataModel, the count will initally be zero and modelCount is not updated due to itemsInserted() before the component is completed. Task-number: QTBUG-16357 Reviewed-by: Bea Lam --- .../graphicsitems/qdeclarativepathview.cpp | 4 +++- .../declarative/qdeclarativepathview/data/vdm.qml | 28 ++++++++++++++++++++++ .../tst_qdeclarativepathview.cpp | 14 +++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativepathview/data/vdm.qml diff --git a/src/declarative/graphicsitems/qdeclarativepathview.cpp b/src/declarative/graphicsitems/qdeclarativepathview.cpp index e3987d0..74d3418 100644 --- a/src/declarative/graphicsitems/qdeclarativepathview.cpp +++ b/src/declarative/graphicsitems/qdeclarativepathview.cpp @@ -1318,8 +1318,10 @@ void QDeclarativePathView::componentComplete() // It is possible that a refill has already happended to to Path // bindings being handled in the componentComplete(). If so // don't do it again. - if (d->items.count() == 0) + if (d->items.count() == 0 && d->model) { + d->modelCount = d->model->count(); d->regenerate(); + } d->updateHighlight(); } diff --git a/tests/auto/declarative/qdeclarativepathview/data/vdm.qml b/tests/auto/declarative/qdeclarativepathview/data/vdm.qml new file mode 100644 index 0000000..012db3f --- /dev/null +++ b/tests/auto/declarative/qdeclarativepathview/data/vdm.qml @@ -0,0 +1,28 @@ +import QtQuick 1.0 + +PathView { + id: pathView + width: 240; height: 320 + + pathItemCount: 4 + preferredHighlightBegin : 0.5 + preferredHighlightEnd : 0.5 + + path: Path { + startX: 120; startY: 20; + PathLine { x: 120; y: 300 } + } + + ListModel { + id: mo + ListElement { value: "one" } + ListElement { value: "two" } + ListElement { value: "three" } + } + + model: VisualDataModel { + delegate: Text { text: model.value } + model : mo + } +} + diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 9193707..90b1056 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -87,6 +87,7 @@ private slots: void emptyModel(); void closed(); void pathUpdate(); + void visualDataModel(); private: QDeclarativeView *createView(); @@ -839,6 +840,19 @@ void tst_QDeclarativePathView::pathUpdate() delete canvas; } +void tst_QDeclarativePathView::visualDataModel() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/vdm.qml")); + + QDeclarativePathView *obj = qobject_cast(c.create()); + QVERIFY(obj != 0); + + QCOMPARE(obj->count(), 3); + + delete obj; +} + QDeclarativeView *tst_QDeclarativePathView::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From 05b9137fe1974aa123ce6d9c16b733e1f77d8269 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Thu, 6 Jan 2011 16:57:06 +1000 Subject: PathView crashed when the path is provided with undefined values. Task-number: QTBUG-16356 Reviewed-by: Bea Lam --- src/declarative/graphicsitems/qdeclarativepath.cpp | 8 +++++++- .../qdeclarativepathview/data/undefinedpath.qml | 17 +++++++++++++++++ .../qdeclarativepathview/tst_qdeclarativepathview.cpp | 14 ++++++++++++++ 3 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 tests/auto/declarative/qdeclarativepathview/data/undefinedpath.qml diff --git a/src/declarative/graphicsitems/qdeclarativepath.cpp b/src/declarative/graphicsitems/qdeclarativepath.cpp index 966c51b..e63a2c3 100644 --- a/src/declarative/graphicsitems/qdeclarativepath.cpp +++ b/src/declarative/graphicsitems/qdeclarativepath.cpp @@ -46,6 +46,8 @@ #include #include +#include +#include QT_BEGIN_NAMESPACE @@ -367,9 +369,11 @@ void QDeclarativePath::createPointCache() const { Q_D(const QDeclarativePath); qreal pathLength = d->_path.length(); + if (pathLength <= 0 || qIsNaN(pathLength)) + return; // more points means less jitter between items as they move along the // path, but takes longer to generate - const int points = int(pathLength*5); + const int points = qCeil(pathLength*5); const int lastElement = d->_path.elementCount() - 1; d->_pointCache.resize(points+1); @@ -418,6 +422,8 @@ QPointF QDeclarativePath::pointAt(qreal p) const Q_D(const QDeclarativePath); if (d->_pointCache.isEmpty()) { createPointCache(); + if (d->_pointCache.isEmpty()) + return QPointF(); } int idx = qRound(p*d->_pointCache.size()); if (idx >= d->_pointCache.size()) diff --git a/tests/auto/declarative/qdeclarativepathview/data/undefinedpath.qml b/tests/auto/declarative/qdeclarativepathview/data/undefinedpath.qml new file mode 100644 index 0000000..5a647cb --- /dev/null +++ b/tests/auto/declarative/qdeclarativepathview/data/undefinedpath.qml @@ -0,0 +1,17 @@ +import QtQuick 1.0 + +PathView { + id: pathView + width: 240; height: 200 + path: Path { + startX: pathView.undef/2.0; startY: 0 + PathLine { x: pathView.undef/2.0; y: 0 } + } + + delegate: Text { text: value } + model: ListModel { + ListElement { value: "one" } + ListElement { value: "two" } + ListElement { value: "three" } + } +} diff --git a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp index 90b1056..bd8baab 100644 --- a/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp +++ b/tests/auto/declarative/qdeclarativepathview/tst_qdeclarativepathview.cpp @@ -88,6 +88,7 @@ private slots: void closed(); void pathUpdate(); void visualDataModel(); + void undefinedPath(); private: QDeclarativeView *createView(); @@ -853,6 +854,19 @@ void tst_QDeclarativePathView::visualDataModel() delete obj; } +void tst_QDeclarativePathView::undefinedPath() +{ + QDeclarativeEngine engine; + QDeclarativeComponent c(&engine, QUrl::fromLocalFile(SRCDIR "/data/undefinedpath.qml")); + + QDeclarativePathView *obj = qobject_cast(c.create()); + QVERIFY(obj != 0); + + QCOMPARE(obj->count(), 3); + + delete obj; +} + QDeclarativeView *tst_QDeclarativePathView::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From 70d96d5d17c62fb97ce15967012527dd8b292316 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 6 Jan 2011 09:51:29 +0100 Subject: fix build with namespaces in new cookie jar table forgot the QT_END_NAMESPACE macro. --- src/network/access/qnetworkcookiejartlds_p.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/network/access/qnetworkcookiejartlds_p.h b/src/network/access/qnetworkcookiejartlds_p.h index fc1c75f..b06d881 100644 --- a/src/network/access/qnetworkcookiejartlds_p.h +++ b/src/network/access/qnetworkcookiejartlds_p.h @@ -6476,4 +6476,6 @@ static const char tldData[] = { "santafe.museum\0org.ws\0" }; +QT_END_NAMESPACE + #endif // QNETWORKCOOKIEJARTLD_P_H -- cgit v0.12 From 7ee36ca4cf6359ade995e974abd2adfcf4dc7612 Mon Sep 17 00:00:00 2001 From: Mark Brand Date: Thu, 6 Jan 2011 13:51:55 +0100 Subject: fix include path In many situations building succeeds without explicity including this dir in the include path, probably due to a side-effect of calling uic on the form in this project. However, it is known to fail at least on mingw-cross-env. Anyway, it makes sense to explcitly add this dir to the include path since a needed header resides here. Merge-request: 1016 Reviewed-by: Oswald Buddenhagen --- examples/painting/svggenerator/svggenerator.pro | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/painting/svggenerator/svggenerator.pro b/examples/painting/svggenerator/svggenerator.pro index e0e4895..2e67372 100644 --- a/examples/painting/svggenerator/svggenerator.pro +++ b/examples/painting/svggenerator/svggenerator.pro @@ -8,6 +8,8 @@ SOURCES = displaywidget.cpp \ QT += svg +INCLUDEPATH += $$PWD + # install target.path = $$[QT_INSTALL_EXAMPLES]/painting/svggenerator sources.files = $$SOURCES $$HEADERS $$RESOURCES $$FORMS svggenerator.pro -- cgit v0.12 From 5c3010cf467d437ccfc8a263bed167e979614504 Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 6 Jan 2011 14:01:53 +0100 Subject: qkeymapper_x11.cpp: fix compilation with LSB and without XKB Task-number: QTBUG-16312 Reviewed-by: Marius Storm-Olsen --- src/gui/kernel/qkeymapper_x11.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/gui/kernel/qkeymapper_x11.cpp b/src/gui/kernel/qkeymapper_x11.cpp index 825edbc..e085d11 100644 --- a/src/gui/kernel/qkeymapper_x11.cpp +++ b/src/gui/kernel/qkeymapper_x11.cpp @@ -61,13 +61,6 @@ #include -QT_BEGIN_NAMESPACE - -#ifndef QT_NO_XKB - -// bring in the auto-generated xkbLayoutData -#include "qkeymapper_x11_p.cpp" - #ifdef QT_LINUXBASE // LSB's IsKeypadKey define is wrong - see // http://bugs.linuxbase.org/show_bug.cgi?id=2521 @@ -80,6 +73,13 @@ QT_BEGIN_NAMESPACE (((KeySym)(keysym) >= 0x11000000) && ((KeySym)(keysym) <= 0x1100FFFF)) #endif +QT_BEGIN_NAMESPACE + +#ifndef QT_NO_XKB + +// bring in the auto-generated xkbLayoutData +#include "qkeymapper_x11_p.cpp" + QLocale q_getKeyboardLocale(const QByteArray &layoutName, const QByteArray &variantName) { int i = 0; @@ -92,7 +92,6 @@ QLocale q_getKeyboardLocale(const QByteArray &layoutName, const QByteArray &vari } #endif // QT_NO_XKB - // from qapplication_x11.cpp extern uchar qt_alt_mask; extern uchar qt_meta_mask; -- cgit v0.12 From 91596c9c08208690894ec11a3a99eac57ad17f2b Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Thu, 6 Jan 2011 14:51:04 +0100 Subject: QUrl::setUrl should call detach Task-number: QTBUG-16425 Reviewed-by: Gabriel Reviewed-by: Markus Goetz --- src/corelib/io/qurl.cpp | 1 + tests/auto/qurl/tst_qurl.cpp | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index 6a3037d..45f908d 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -4262,6 +4262,7 @@ void QUrl::setUrl(const QString &url) */ void QUrl::setUrl(const QString &url, ParsingMode parsingMode) { + detach(); // escape all reserved characters and delimiters // reserved = gen-delims / sub-delims if (parsingMode != TolerantMode) { diff --git a/tests/auto/qurl/tst_qurl.cpp b/tests/auto/qurl/tst_qurl.cpp index 63f9721..4354ffb 100644 --- a/tests/auto/qurl/tst_qurl.cpp +++ b/tests/auto/qurl/tst_qurl.cpp @@ -675,6 +675,14 @@ void tst_QUrl::setUrl() QCOMPARE(url.encodedPath().constData(), "text/javascript,d5%20%3D%20'five%5Cu0027s'%3B"); } + { //check it calls detach + QUrl u1("http://aaa.com"); + QUrl u2 = u1; + u2.setUrl("http://bbb.com"); + QCOMPARE(u1.host(), QString::fromLatin1("aaa.com")); + QCOMPARE(u2.host(), QString::fromLatin1("bbb.com")); + } + /* The tests below are copied from kdelibs/kdecore/tests/kurltest.cpp (an old version of) -- cgit v0.12 From 6374bc9790310b85299aab251d817aa2e5360d55 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Thu, 6 Jan 2011 15:17:49 +0100 Subject: Re-organized the elements page. Fixed misplaced elements. Task-number: QTBUG-16071 --- doc/src/declarative/elements.qdoc | 269 ++++++++++++++++++++++---------------- 1 file changed, 156 insertions(+), 113 deletions(-) diff --git a/doc/src/declarative/elements.qdoc b/doc/src/declarative/elements.qdoc index eaa6a82..7b1ca94 100644 --- a/doc/src/declarative/elements.qdoc +++ b/doc/src/declarative/elements.qdoc @@ -29,118 +29,161 @@ \page qdeclarativeelements.html \target elements \title QML Elements - \brief A dictionary of standard QML elements. - - This is a dictionary of all standard QML elements made available - in the Qt Declarative module. - - To see the QML elements listed by functional area, see the - \l{Groups Of Related QML Elements} page. - - \table - \header \o {2,1} \bold {Basic Visual Items} - \row \o \l {Item} \o Basic item element inherited by all visual items in QML - \row \o \l {Rectangle} \o Basic visual rectangle element - \row \o \l {Gradient} \o Defines a gradient between two or more colors - \row \o \l {GradientStop} \o Defines a color used in a \l {Gradient} - \row \o \l {Image} \o Allows the use of bitmaps to a scene - \row \o \l {BorderImage} (Item-specific) \o Defines an image as a border - \row \o \l {AnimatedImage} \o For playing animations stored as a series of frames - \row \o \l {Text} \o Allows the use of formatted text in a scene - \row \o \l {TextInput} \o Displays an editable line of text - \row \o \l {IntValidator} \o Validator for integer values - \row \o \l {DoubleValidator} \o Validator for non-integer values - \row \o \l {RegExpValidator} \o Validator for string regular expressions - \row \o \l {TextEdit} \o Displays multiple lines of editable formatted text - - \header \o {2,1} \bold {Basic Interaction Items} - \row \o \l {MouseArea} \o Handles mouse interactions - \row \o \l {FocusScope} \o For keyboard focus handling - \row \o \l {Flickable} \o Provides a surface that can be "flicked" - \row \o \l {Flipable} \o Provides a surface that produces flipping effects - \row \o \l {GestureArea} (experimental) \o Enables simple gesture handling - - \header \o {2,1} \bold {States} - \row \o \l {State} \o Defines sets of configurations of objects and properties - \row \o \l {PropertyChanges} \o Describes property changes within a state - \row \o \l {StateGroup} \o Contains a set of states and state transitions - \row \o \l {StateChangeScript} \o Allows script binding in a state - \row \o \l {ParentChange} (Item-specific) \o Re-parent an Item in a state change - \row \o \l {AnchorChanges} \o Change the anchors of an item in a state - - \header \o {2,1} \bold {Animation and Transitions} - \row \o \l {Behavior} \o Specifies a default animation for property changes - \row \o \l {SequentialAnimation} \o Runs animations sequentially - \row \o \l {ParallelAnimation} \o Runs animations in parallel - \row \o \l {PropertyAnimation} \o Animates property changes - \row \o \l {NumberAnimation} \o Animates properties of type qreal - \row \o \l {Vector3dAnimation} \o Animates properties of type QVector3d - \row \o \l {ColorAnimation} \o Animates color changes - \row \o \l {RotationAnimation} \o Animates rotations - \row \o \l {ParentAnimation} \o Animates parent changes - \row \o \l {AnchorAnimation} \o Animates anchor changes - \row \o \l {PauseAnimation} \o Pauses an animation - \row \o \l {SmoothedAnimation} \o Allows a property to smoothly track a value - \row \o \l {SpringAnimation} \o Allows a property to track a value in a spring-like motion - \row \o \l {PropertyAction} \o Sets immediate property changes during animation - \row \o \l {ScriptAction} \o Runs scripts during an animation - \row \o \l {Transition} \o Animates transitions during state changes - - \header \o {2,1} \bold {Working with Data} - \row \o \l {Binding} \o Binds any value to any property - \row \o \l {ListModel} \o Defines a list of data - \row \o \l {ListElement} \o Defines a data item in a \l {ListModel} - \row \o \l {VisualItemModel} \o Contains items that already defines its own visual delegate - \row \o \l {VisualDataModel} \o Encapsulates a model and a delegate - \row \o \l {Package} \o Collection that enables sharing of items within different views - \row \o \l {XmlListModel} \o Specifies a model using XPath expressions - \row \o \l {XmlRole} \o Specifies a role for an \l {XmlListModel} - - \header \o {2,1} \bold {Views} - \row \o \l {ListView} \o Provides a list visualization of a model - \row \o \l {GridView} \o Provides a grid visualization of a model - \row \o \l {PathView} \o Visualizes a model's contents along a path - \row \o \l {Path} \o Defines a path used by \l {PathView} - \row \o \l {PathLine} \o Defines a line in \l {Path} - \row \o \l {PathQuad} \o Defines a quadratic Bezier curve in a \l {Path} - \row \o \l {PathCubic} \o Defines a cubic Bezier curve in a \l {Path} - \row \o \l {PathAttribute} \o Allows the setting of attributes along a \l {Path} - \row \o \l {PathPercent} \o Modifies the item distribution along a \l {Path} - \row \o \l {WebView} \o Allows the addition of web content to a canvas - - \header \o {2,1} \bold {Positioners} - \row \o \l {Column} \o Arranges its children vertically - \row \o \l {Row} \o Arranges its children horizontally - \row \o \l {Grid} \o Positions its children in a grid - \row \o \l {Flow} \o Positions its children with wrapping support - - \header \o {2,1} \bold {Utility} - \row \o \l {Connections} \o Explicitly connects signals and signal handlers - \row \o \l {Component} \o Encapsulate QML items as a component - \row \o \l {Timer} \o Provides timed triggers - \row \o \l {QML:QtObject} {QtObject} \o Basic element containing only the objectName property - \row \o \l {QML:Qt} {Qt} \o The QML global Qt object provides useful enums and functions from Qt. - \row \o \l {WorkerScript} \o Enables the use of threads in QML - \row \o \l {Loader} \o Controls the loading of items or components - \row \o \l {Repeater} \o Uses a model to create multiples of components - \row \o \l {SystemPalette} \o Provides access to the Qt palettes - \row \o \l {FontLoader} \o Loads fonts by name or URL - \row \o \l {LayoutItem} \o Allows declarative UI elements inside Qt's Graphics View layouts - - \header \o {2,1} \bold {Transforms} - \row \o \l {Scale} \o Assigns item scaling behaviors - \row \o \l {Rotation} \o Assigns item rotation behaviors - \row \o \l {Translate} \o Assigns item translation behaviors - - \header \o {2,1} \bold {Effects} - \row \o \l {Particles} (experimental) \o Generates and animates particles - \row \o \l {ParticleMotionLinear} \o Adds linear motion behavior to \l {Particles} - \row \o \l {ParticleMotionGravity} \o Adds gravitational motion to \l {Particles} - \row \o \l {ParticleMotionWander} \o Adds varied motions to \l {Particles} - \endtable - - - + \brief A listing of standard QML elements. + +These are the functionally grouped lists of QML elements. + +Elements are declared with the their name and two curly braces. Elements may +be nested in elements, thereby creating a parent-child relationship between the +two elements. + +To see the QML elements listed by functional area, see the +\l{Groups Of Related QML Elements} page. + +\section1 Basic QML Elements +\list +\o \l {Item} - Basic item element inherited by QML elements +\o \l {Component} - Encapsulates QML elements during importing +\o \l {QML:QtObject} {QtObject} - Basic element containing only the objectName property +\endlist + +\section1 Graphical Elements +\list +\o \l {Rectangle} - A rectangle element +\o \l {Image} - For incorporating bitmaps into a scene +\o \l {BorderImage} - Allows the use of images as borders +\o \l {AnimatedImage} - For playing animations stored in a series of frames +\o \l {Gradient} - For defining a color gradient +\o \l {GradientStop} - Used to define a color within a \l {Gradient} +\o \l {SystemPalette} - Provides access to the Qt palettes +\endlist + +\section1 Text Handling Elements +\list +\o \l {Text} - For inserting formatted text into a scene +\o \l {TextInput} - Captures user key input +\o \l {TextEdit} - Displays multiple lines of editable formatted text +\o \l {IntValidator} - Validates values as integers +\o \l {DoubleValidator} - Validates real values +\o \l {RegExpValidator} - Validator for string regular expressions +\o \l {FontLoader} - Loads fonts by name or URL +\endlist + +\section1 Mouse and Interaction Area Elements +\list +\o \l {MouseArea} - Sets up an area for mouse interaction +\o \l {FocusScope} - Element that mediate keyboard focus changes +\o \l {Flickable} - Provides a surface that can be "flicked" +\o \l {Flipable} - Provides a surface that produces "flipping" effects +\o \l {GestureArea} - Enables simple gesture handling +\endlist + +\section1 Positioners and Repeater Elements +\list +\o \l {Column} - Arranges its children vertically +\o \l {Row} - Arranges its children horizontally +\o \l {Grid} - Positions its children in a grid +\o \l {Flow} - Positions its children with wrapping support +\o \l {Repeater} - Uses a model to create multiples of components +\endlist + +\section1 Transformation Elements +\list +\o \l {Scale} - Assigns item scaling behaviors +\o \l {Rotation} - Assigns item rotation behaviors +\o \l {Translate} - Assigns item translation behaviors +\endlist + +\section1 States +\list +\o \l {State} - Defines sets of configurations of objects and properties +\o \l {PropertyChanges} - Describes property changes within a state +\o \l {StateGroup} - Contains a set of states and state transitions +\o \l {StateChangeScript} - Allows script binding in a state +\o \l {ParentChange} - Re-parent an Item in a state change +\o \l {AnchorChanges} - Change the anchors of an item in a state +\endlist + +\section1 Animation and Transitions +\list +\o \l {Transition} - Animates transitions during state changes +\o \l {SequentialAnimation} - Runs animations sequentially +\o \l {ParallelAnimation} - Runs animations in parallel +\o \l {Behavior} - Specifies a default animation for property changes +\o \l {PropertyAction} - Sets immediate property changes during animation +\o \l {PauseAnimation} - Introduces a pause in an animation +\o \l {SmoothedAnimation} - Allows a property to smoothly track a value +\o \l {SpringAnimation} - Allows a property to track a value in a spring-like motion +\o \l {ScriptAction} - Runs scripts during an animation +\endlist + +Elements that animate properties based on data types +\list +\o \l {PropertyAnimation} - Animates property changes +\o \l {NumberAnimation} - Animates properties of type qreal +\o \l {Vector3dAnimation} - Animates properties of type QVector3d +\o \l {ColorAnimation} - Animates color changes +\o \l {RotationAnimation} - Animates rotations +\o \l {ParentAnimation} - Animates parent changes +\o \l {AnchorAnimation} - Animates anchor changes +\endlist + +\section1 Models and Data Handling +\list +\o \l {ListModel} - Defines a list of data +\o \l {ListElement} - Defines a data item in a \l {ListModel} +\o \l {VisualItemModel} - Contains items that already defines its own visual delegate +\o \l {VisualDataModel} - Encapsulates a model and a delegate +\o \l {XmlListModel} - Specifies a model using XPath expressions +\o \l {XmlRole} - Specifies a role for an \l {XmlListModel} +\o \l {Binding} - Binds any value to any property +\o \l {Package} - Collection that enables sharing of items within different views +\endlist + +\section1 Views +\list +\o \l {ListView} - Provides a list visualization of a model +\o \l {GridView} - Provides a grid visualization of a model +\o \l {WebView} - Allows the addition of web content to a canvas +\o \l {PathView} - Visualizes a model's contents along a path. See \l {Path Definition}{Path Elements} for more information. +\endlist + +\section1 Add-On Elements +These elements are not included in QML by default. Their respective QML bindings +should first be obtained. +\list +\o \l{QtWebKit QML Module} +\o \l{http://doc.qt.nokia.com/qtmobility-1.1.0/qml-plugins.html}{Mobility QML Plugins} +\endlist + +\section1 Path Definition +\list +\o \l {Path} - Defines a path used by \l {PathView} +\o \l {PathLine} - Defines a line in \l {Path} +\o \l {PathQuad} - Defines a quadratic Bezier curve in a \l {Path} +\o \l {PathCubic} - Defines a cubic Bezier curve in a \l {Path} +\o \l {PathAttribute} - Allows the setting of attributes along a \l {Path} +\o \l {PathPercent} - Modifies the item distribution along a \l {Path} +\endlist + +\section1 Utility +\list +\o \l {Connections} - Explicitly connects signals and signal handlers +\o \l {Timer} - Provides timed triggers +\o \l {QML:Qt} {Qt} - The QML global Qt object provides useful enums and functions from Qt. +\o \l {WorkerScript} - Enables the use of threads in QML +\o \l {Loader} - Controls the loading of items or components +\o \l {LayoutItem} - Allows declarative UI elements inside Qt's Graphics View layouts +\endlist + +\section1 Graphical Effects +\list +\o \l {Particles} - Generates and animates particles +\o \l {ParticleMotionLinear} - Adds linear motion behavior to \l {Particles} +\o \l {ParticleMotionGravity} - Adds gravitational motion to \l {Particles} +\o \l {ParticleMotionWander} - Adds varied motions to \l {Particles} +\endlist + */ @@ -148,7 +191,7 @@ \group qml-groups \title Groups Of Related QML Elements - \brief If you know what kind of QML element you want (Basic Visual, + \brief If you know what kind of QML element you want (Basic Visual, Interaction, Animation, etc), look here. This is a list of functional groups of QML elements. -- cgit v0.12 From 6d331b6ee7711cde2bf9adc1a584a45875c07983 Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 6 Jan 2011 15:34:48 +0100 Subject: Designer: Block QEvent::WinIdChange. As it causes an obscure deletion crash related to the formeditor rubberband on Mac. Reviewed-by: con --- tools/designer/src/components/formeditor/formwindowmanager.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/designer/src/components/formeditor/formwindowmanager.cpp b/tools/designer/src/components/formeditor/formwindowmanager.cpp index ce809ff..ed854cf 100644 --- a/tools/designer/src/components/formeditor/formwindowmanager.cpp +++ b/tools/designer/src/components/formeditor/formwindowmanager.cpp @@ -192,6 +192,7 @@ bool FormWindowManager::eventFilter(QObject *o, QEvent *e) case QEvent::ToolTip: case QEvent::WhatsThis: case QEvent::WhatsThisClicked: + case QEvent::WinIdChange: case QEvent::DynamicPropertyChange: case QEvent::HoverEnter: case QEvent::HoverLeave: -- cgit v0.12 From 66cfe2a776b7542fe1d8bae9c0d7bb5be79406fd Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Thu, 6 Jan 2011 15:16:03 +0000 Subject: Fix KERN-EXEC 0 panic on exit when bearer is searching for WLANs The access point scanner cancels itself in the destructor. This requires the handle to be valid, but it was closed in the symbian engine destructor immediately before deleting the AP scanner. Because of the way symbian active objects work, the crashing function is only called if there was an asynchronous request in progress. So it could be missed in cases where the scan completes faster than the test case. Task-number: QTBUG-16484 Reviewed-by: Markus Goetz --- src/plugins/bearer/symbian/symbianengine.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/plugins/bearer/symbian/symbianengine.cpp b/src/plugins/bearer/symbian/symbianengine.cpp index f025d86..a370d78 100644 --- a/src/plugins/bearer/symbian/symbianengine.cpp +++ b/src/plugins/bearer/symbian/symbianengine.cpp @@ -144,6 +144,10 @@ SymbianEngine::~SymbianEngine() { Cancel(); + //The scanner may be using the connection monitor so it needs to be + //deleted first while the handle is still valid. + delete ipAccessPointsAvailabilityScanner; + iConnectionMonitor.CancelNotifications(); iConnectionMonitor.Close(); @@ -151,8 +155,6 @@ SymbianEngine::~SymbianEngine() iCmManager.Close(); #endif - delete ipAccessPointsAvailabilityScanner; - // CCommsDatabase destructor uses cleanup stack. Since QNetworkConfigurationManager // is a global static, but the time we are here, E32Main() has been exited already and // the thread's default cleanup stack has been deleted. Without this line, a -- cgit v0.12 From 273cc18e59af6b495462cbe101652a444a2cc8f4 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Thu, 6 Jan 2011 17:04:37 +0100 Subject: licensing: exclude generated cookie jar table from license check This file is generated from the Public Suffix List, and thus under a different license. Reviewed-by: Markus Goetz --- tests/auto/headers/tst_headers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/auto/headers/tst_headers.cpp b/tests/auto/headers/tst_headers.cpp index 8c8bc2c..b889a37 100644 --- a/tests/auto/headers/tst_headers.cpp +++ b/tests/auto/headers/tst_headers.cpp @@ -176,7 +176,9 @@ void tst_Headers::allSourceFilesData() || sourceFile.endsWith(".ui.h") || sourceFile.endsWith("/src/corelib/global/qconfig.h") || sourceFile.endsWith("/src/corelib/global/qconfig.cpp") - || sourceFile.endsWith("/src/tools/uic/qclass_lib_map.h")) + || sourceFile.endsWith("/src/tools/uic/qclass_lib_map.h") + || sourceFile.endsWith("src/network/access/qnetworkcookiejartlds_p.h") + ) continue; QTest::newRow(qPrintable(sourceFile)) << sourceFile; -- cgit v0.12 From c527a1ee371c4758776217e7d16c75e20fe6f5aa Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Fri, 7 Jan 2011 10:24:54 +1000 Subject: Fix to register Repeater for QtQuick 1.1 Task-number: QTBUG-15161 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 4 ++ .../tst_qdeclarativerepeater.cpp | 46 ++++++++++++++++++++++ 2 files changed, 50 insertions(+) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index a462763..f06b256 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -175,6 +175,10 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType(); #endif + // QtQuick 1.1 items + qmlRegisterType("QtQuick",1,1,"Repeater"); + + qmlRegisterUncreatableType("QtQuick",1,0,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType("QtQuick",1,0,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); diff --git a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp index 1b38c11..0629076 100644 --- a/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp +++ b/tests/auto/declarative/qdeclarativerepeater/tst_qdeclarativerepeater.cpp @@ -75,6 +75,8 @@ private slots: void itemModel(); void resetModel(); void properties(); + void testQtQuick11Attributes(); + void testQtQuick11Attributes_data(); private: QDeclarativeView *createView(); @@ -599,6 +601,50 @@ void tst_QDeclarativeRepeater::properties() delete rootObject; } +void tst_QDeclarativeRepeater::testQtQuick11Attributes() +{ + QFETCH(QString, code); + QFETCH(QString, warning); + QFETCH(QString, error); + + QDeclarativeEngine engine; + QObject *obj; + + QDeclarativeComponent invalid(&engine); + invalid.setData("import QtQuick 1.0; Repeater { " + code.toUtf8() + " }", QUrl("")); + QTest::ignoreMessage(QtWarningMsg, warning.toUtf8()); + obj = invalid.create(); + QCOMPARE(invalid.errorString(), error); + delete obj; + + QDeclarativeComponent valid(&engine); + valid.setData("import QtQuick 1.1; Repeater { " + code.toUtf8() + " }", QUrl("")); + obj = valid.create(); + QVERIFY(obj); + QVERIFY(valid.errorString().isEmpty()); + delete obj; +} + +void tst_QDeclarativeRepeater::testQtQuick11Attributes_data() +{ + QTest::addColumn("code"); + QTest::addColumn("warning"); + QTest::addColumn("error"); + + QTest::newRow("itemAdded") << "onItemAdded: count" + << "QDeclarativeComponent: Component is not ready" + << ":1 Signal \"onItemAdded\" not available in QtQuick/Repeater 1.0\n"; + + QTest::newRow("itemRemoved") << "onItemRemoved: count" + << "QDeclarativeComponent: Component is not ready" + << ":1 Signal \"onItemRemoved\" not available in QtQuick/Repeater 1.0\n"; + + QTest::newRow("itemAt") << "Component.onCompleted: itemAt(0)" + << ":1: ReferenceError: Can't find variable: itemAt" + << ""; +} + + QDeclarativeView *tst_QDeclarativeRepeater::createView() { QDeclarativeView *canvas = new QDeclarativeView(0); -- cgit v0.12 From 8b45ca46095020c495b44d764bb439018a87d22a Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Fri, 7 Jan 2011 10:36:01 +1000 Subject: Add linkActivated signal to TextEdit Since TextEdit can also contain rich text with anchors, it should also have a linkActivated signal like Text does. Task-number: QTBUG-15283 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeitemsmodule.cpp | 1 + .../graphicsitems/qdeclarativetextedit.cpp | 16 +- .../graphicsitems/qdeclarativetextedit_p.h | 1 + .../data-X11/linkActivated.0.png | Bin 0 -> 609 bytes .../data-X11/linkActivated.1.png | Bin 0 -> 677 bytes .../data-X11/linkActivated.qml | 191 +++++++++++++++++++++ .../qdeclarativetextedit/data/linkActivated.0.png | Bin 0 -> 609 bytes .../qdeclarativetextedit/data/linkActivated.1.png | Bin 0 -> 677 bytes .../qdeclarativetextedit/data/linkActivated.qml | 191 +++++++++++++++++++++ .../qdeclarativetextedit/linkActivated.qml | 15 ++ 10 files changed, 412 insertions(+), 3 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index a462763..752e239 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -142,6 +142,7 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,0,"Scale"); qmlRegisterType("QtQuick",1,0,"Text"); qmlRegisterType("QtQuick",1,0,"TextEdit"); + qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT qmlRegisterType("QtQuick",1,0,"TextInput"); #endif diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index c1314ff..c71fd98 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -103,6 +103,14 @@ TextEdit { \sa Text, TextInput, {declarative/text/textselection}{Text Selection example} */ +/*! + \qmlsignal TextEdit::onLinkActivated(string link) + \since Quick 1.1 + + 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. +*/ QDeclarativeTextEdit::QDeclarativeTextEdit(QDeclarativeItem *parent) : QDeclarativePaintedItem(*(new QDeclarativeTextEditPrivate), parent) { @@ -894,11 +902,11 @@ void QDeclarativeTextEdit::setReadOnly(bool r) return; - Qt::TextInteractionFlags flags = Qt::NoTextInteraction; + Qt::TextInteractionFlags flags = Qt::LinksAccessibleByMouse; if (r) { - flags = Qt::TextSelectableByMouse; + flags = flags | Qt::TextSelectableByMouse; } else { - flags = Qt::TextEditorInteraction; + flags = flags | Qt::TextEditorInteraction; } d->control->setTextInteractionFlags(flags); if (!r) @@ -1260,6 +1268,7 @@ void QDeclarativeTextEditPrivate::init() control = new QTextControl(q); control->setIgnoreUnusedNavigationEvents(true); + control->setTextInteractionFlags(control->textInteractionFlags() | Qt::LinksAccessibleByMouse); // QTextControl follows the default text color // defined by the platform, declarative text @@ -1278,6 +1287,7 @@ void QDeclarativeTextEditPrivate::init() QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SLOT(updateSelectionMarkers())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorPositionChanged())); QObject::connect(control, SIGNAL(cursorPositionChanged()), q, SIGNAL(cursorRectangleChanged())); + QObject::connect(control, SIGNAL(linkActivated(QString)), q, SIGNAL(linkActivated(QString))); document = control->document(); document->setDefaultFont(font); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 691d995..37b24f7 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -221,6 +221,7 @@ Q_SIGNALS: void persistentSelectionChanged(bool isPersistentSelection); void textMarginChanged(qreal textMargin); void selectByMouseChanged(bool selectByMouse); + Q_REVISION(1) void linkActivated(const QString &link); public Q_SLOTS: void deselect(); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png new file mode 100644 index 0000000..7d0d0ae Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png new file mode 100644 index 0000000..7d612bf Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml new file mode 100644 index 0000000..8c7e380 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data-X11/linkActivated.qml @@ -0,0 +1,191 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "linkActivated.0.png" + } + Frame { + msec: 32 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 48 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 64 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 80 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 96 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 112 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 128 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 144 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 160 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 176 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 192 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 208 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 224 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 240 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 256 + hash: "53d97d0966197ea41364511dea13752f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 21; y: 13 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 272 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 288 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 304 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 22; y: 11 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 320 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 336 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 352 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 368 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 384 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 400 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 416 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 432 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 448 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 464 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 480 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 496 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 512 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 528 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 544 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 560 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 576 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 592 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 608 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png new file mode 100644 index 0000000..7d0d0ae Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png new file mode 100644 index 0000000..7d612bf Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml new file mode 100644 index 0000000..8c7e380 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/data/linkActivated.qml @@ -0,0 +1,191 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "linkActivated.0.png" + } + Frame { + msec: 32 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 48 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 64 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 80 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 96 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 112 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 128 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 144 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 160 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 176 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 192 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 208 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 224 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 240 + hash: "53d97d0966197ea41364511dea13752f" + } + Frame { + msec: 256 + hash: "53d97d0966197ea41364511dea13752f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 21; y: 13 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 272 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 288 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Frame { + msec: 304 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 22; y: 11 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 320 + hash: "9482227cbc77e9083218c1452e8644d8" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 23; y: 10 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 336 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 352 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 368 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 384 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 400 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 416 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 432 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 448 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 464 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 480 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 496 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 512 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 528 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 544 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 560 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 576 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 592 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } + Frame { + msec: 608 + hash: "29c47cec5d015e6cab0762c3db0fa714" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml new file mode 100644 index 0000000..177d475 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextedit/linkActivated.qml @@ -0,0 +1,15 @@ +import QtQuick 1.1 + +Rectangle{ + width: 100 + height: 100 + TextEdit{ + text: 'Click Me ' + onLinkActivated: txt.text=link; + } + Text{ + id: txt + y:50 + text: "unknown" + } +} -- cgit v0.12 From 9a186ba66506963b9d88518d5cea0846825ba494 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 11:27:25 +1000 Subject: Add PinchArea autotests. Task-number: QTBUG-15491 --- tests/auto/declarative/declarative.pro | 1 + .../declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index f0fcfa9..51597bd 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -45,6 +45,7 @@ SUBDIRS += \ qdeclarativemousearea \ qdeclarativeparticles \ qdeclarativepathview \ + qdeclarativepincharea \ qdeclarativepixmapcache \ qdeclarativepositioners \ qdeclarativeproperty \ diff --git a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp index d1015fc..f175033 100644 --- a/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp +++ b/tests/auto/declarative/qdeclarativepincharea/tst_qdeclarativepincharea.cpp @@ -229,7 +229,7 @@ void tst_QDeclarativePinchArea::scale() QTest::touchEvent(vp).move(0, p1).move(1, p2); QCOMPARE(root->property("scale").toReal(), 1.5); - QCOMPARE(root->property("center").toPointF(), QPointF(90, 90)); + QCOMPARE(root->property("center").toPointF(), QPointF(40, 40)); // blackrect is at 50,50 QCOMPARE(blackRect->scale(), 1.5); // scale beyond bound @@ -283,7 +283,7 @@ void tst_QDeclarativePinchArea::pan() p2 += QPoint(10,10); QTest::touchEvent(vp).move(0, p1).move(1, p2); - QCOMPARE(root->property("center").toPointF(), QPointF(110, 110)); + QCOMPARE(root->property("center").toPointF(), QPointF(60, 60)); // blackrect is at 50,50 QCOMPARE(blackRect->x(), 60.0); QCOMPARE(blackRect->y(), 60.0); -- cgit v0.12 From d57baa9be741e0db90e08cc39ba8d488f58c40f5 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 14:10:08 +1000 Subject: PinchArea API changes following review. Task-number: QTBUG-15491 Reviewed-by: Michael Brasser --- .../touchinteraction/pincharea/flickresize.qml | 6 ++-- .../graphicsitems/qdeclarativepincharea.cpp | 42 +++++++++++----------- .../graphicsitems/qdeclarativepincharea_p.h | 20 +++++------ .../qdeclarativepincharea/data/pinchproperties.qml | 2 +- 4 files changed, 35 insertions(+), 35 deletions(-) diff --git a/examples/declarative/touchinteraction/pincharea/flickresize.qml b/examples/declarative/touchinteraction/pincharea/flickresize.qml index 8f29d6d..aa426e7 100644 --- a/examples/declarative/touchinteraction/pincharea/flickresize.qml +++ b/examples/declarative/touchinteraction/pincharea/flickresize.qml @@ -56,11 +56,11 @@ Rectangle { height: Math.max(flick.contentHeight, flick.height) onPinchChanged: { // adjust content pos due to drag - flick.contentX += pinch.lastCenter.x - pinch.center.x - flick.contentY += pinch.lastCenter.y - pinch.center.y + flick.contentX += pinch.previousCenter.x - pinch.center.x + flick.contentY += pinch.previousCenter.y - pinch.center.y // resize content - var scale = 1.0 + pinch.scale - pinch.lastScale + var scale = 1.0 + pinch.scale - pinch.previousScale flick.resizeContent(flick.contentWidth * scale, flick.contentHeight * scale, pinch.center) } diff --git a/src/declarative/graphicsitems/qdeclarativepincharea.cpp b/src/declarative/graphicsitems/qdeclarativepincharea.cpp index 998c30d..436099e 100644 --- a/src/declarative/graphicsitems/qdeclarativepincharea.cpp +++ b/src/declarative/graphicsitems/qdeclarativepincharea.cpp @@ -58,11 +58,11 @@ QT_BEGIN_NAMESPACE \bold {The PinchEvent element was added in QtQuick 1.1} - The \c center, \c startCenter, \c lastCenter properties provide the center position between the two touch points. + The \c center, \c startCenter, \c previousCenter properties provide the center position between the two touch points. - The \c scale and \c lastScale properties provide the scale factor. + The \c scale and \c previousScale properties provide the scale factor. - The \c angle, \c lastAngle and \c rotation properties provide the angle between the two points and the amount of rotation. + The \c angle, \c previousAngle and \c rotation properties provide the angle between the two points and the amount of rotation. The \c point1, \c point2, \c startPoint1, \c startPoint2 properties provide the positions of the touch points. @@ -75,26 +75,26 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty QPointF PinchEvent::center \qmlproperty QPointF PinchEvent::startCenter - \qmlproperty QPointF PinchEvent::lastCenter + \qmlproperty QPointF PinchEvent::previousCenter These properties hold the position of the center point between the two touch points. \list \o \c center is the current center point - \o \c lastCenter is the center point of the previous event. + \o \c previousCenter is the center point of the previous event. \o \c startCenter is the center point when the gesture began \endlist */ /*! \qmlproperty real PinchEvent::scale - \qmlproperty real PinchEvent::lastScale + \qmlproperty real PinchEvent::previousScale These properties hold the scale factor determined by the change in distance between the two touch points. \list \o \c scale is the current scale factor. - \o \c lastScale is the scale factor of the previous event. + \o \c previousScale is the scale factor of the previous event. \endlist When a pinch gesture is started, the scale is 1.0. @@ -102,14 +102,14 @@ QT_BEGIN_NAMESPACE /*! \qmlproperty real PinchEvent::angle - \qmlproperty real PinchEvent::lastAngle + \qmlproperty real PinchEvent::previousAngle \qmlproperty real PinchEvent::rotation These properties hold the angle between the two touch points. \list \o \c angle is the current angle between the two points in the range -180 to 180. - \o \c lastAngle is the angle of the previous event. + \o \c previousAngle is the angle of the previous event. \o \c rotation is the total rotation since the pinch gesture started. \endlist @@ -169,7 +169,7 @@ QDeclarativePinchAreaPrivate::~QDeclarativePinchAreaPrivate() \list \o setting a \c pinch.target to provide automatic interaction with an element - \o using the onPinchStarted, onPinchChanged and onPinchFinished handlers + \o using the onPinchStarted, onPinchUpdated and onPinchFinished handlers \endlist \sa PinchEvent @@ -188,7 +188,7 @@ QDeclarativePinchAreaPrivate::~QDeclarativePinchAreaPrivate() */ /*! - \qmlsignal PinchArea::onPinchChanged() + \qmlsignal PinchArea::onPinchUpdated() This handler is called when the pinch area detects that a pinch gesture has changed. @@ -304,9 +304,9 @@ void QDeclarativePinchArea::updatePinch() QPointF pinchCenter = mapFromScene(d->sceneLastCenter); QDeclarativePinchEvent pe(pinchCenter, d->pinchLastScale, d->pinchLastAngle, rotationAngle); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(pinchCenter); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(pinchCenter); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->lastPoint1); @@ -352,9 +352,9 @@ void QDeclarativePinchArea::updatePinch() d->lastPoint2 = d->touchPoints.at(1).pos(); QDeclarativePinchEvent pe(d->pinchStartCenter, 1.0, angle, 0.0); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(d->pinchStartCenter); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(d->pinchStartCenter); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->lastPoint1); @@ -383,9 +383,9 @@ void QDeclarativePinchArea::updatePinch() QPointF pinchCenter = mapFromScene(sceneCenter); QDeclarativePinchEvent pe(pinchCenter, scale, angle, rotationAngle); pe.setStartCenter(d->pinchStartCenter); - pe.setLastCenter(mapFromScene(d->sceneLastCenter)); - pe.setLastAngle(d->pinchLastAngle); - pe.setLastScale(d->pinchLastScale); + pe.setPreviousCenter(mapFromScene(d->sceneLastCenter)); + pe.setPreviousAngle(d->pinchLastAngle); + pe.setPreviousScale(d->pinchLastScale); pe.setStartPoint1(mapFromScene(d->sceneStartPoint1)); pe.setStartPoint2(mapFromScene(d->sceneStartPoint2)); pe.setPoint1(d->touchPoints.at(0).pos()); @@ -395,7 +395,7 @@ void QDeclarativePinchArea::updatePinch() d->pinchLastAngle = angle; d->lastPoint1 = d->touchPoints.at(0).pos(); d->lastPoint2 = d->touchPoints.at(1).pos(); - emit pinchChanged(&pe); + emit pinchUpdated(&pe); if (d->pinch && d->pinch->target()) { qreal s = d->pinchStartScale * scale; s = qMin(qMax(pinch()->minimumScale(),s), pinch()->maximumScale()); diff --git a/src/declarative/graphicsitems/qdeclarativepincharea_p.h b/src/declarative/graphicsitems/qdeclarativepincharea_p.h index 9a73a17..cd5423d 100644 --- a/src/declarative/graphicsitems/qdeclarativepincharea_p.h +++ b/src/declarative/graphicsitems/qdeclarativepincharea_p.h @@ -193,11 +193,11 @@ class Q_AUTOTEST_EXPORT QDeclarativePinchEvent : public QObject Q_PROPERTY(QPointF center READ center) Q_PROPERTY(QPointF startCenter READ startCenter) - Q_PROPERTY(QPointF lastCenter READ lastCenter) + Q_PROPERTY(QPointF previousCenter READ previousCenter) Q_PROPERTY(qreal scale READ scale) - Q_PROPERTY(qreal lastScale READ lastScale) + Q_PROPERTY(qreal previousScale READ previousScale) Q_PROPERTY(qreal angle READ angle) - Q_PROPERTY(qreal lastAngle READ lastAngle) + Q_PROPERTY(qreal previousAngle READ previousAngle) Q_PROPERTY(qreal rotation READ rotation) Q_PROPERTY(QPointF point1 READ point1) Q_PROPERTY(QPointF startPoint1 READ startPoint1) @@ -212,14 +212,14 @@ public: QPointF center() const { return m_center; } QPointF startCenter() const { return m_startCenter; } void setStartCenter(QPointF c) { m_startCenter = c; } - QPointF lastCenter() const { return m_lastCenter; } - void setLastCenter(QPointF c) { m_lastCenter = c; } + QPointF previousCenter() const { return m_lastCenter; } + void setPreviousCenter(QPointF c) { m_lastCenter = c; } qreal scale() const { return m_scale; } - qreal lastScale() const { return m_lastScale; } - void setLastScale(qreal s) { m_lastScale = s; } + qreal previousScale() const { return m_lastScale; } + void setPreviousScale(qreal s) { m_lastScale = s; } qreal angle() const { return m_angle; } - qreal lastAngle() const { return m_lastAngle; } - void setLastAngle(qreal a) { m_lastAngle = a; } + qreal previousAngle() const { return m_lastAngle; } + void setPreviousAngle(qreal a) { m_lastAngle = a; } qreal rotation() const { return m_rotation; } QPointF point1() const { return m_point1; } void setPoint1(QPointF p) { m_point1 = p; } @@ -271,7 +271,7 @@ public: Q_SIGNALS: void enabledChanged(); void pinchStarted(QDeclarativePinchEvent *pinch); - void pinchChanged(QDeclarativePinchEvent *pinch); + void pinchUpdated(QDeclarativePinchEvent *pinch); void pinchFinished(QDeclarativePinchEvent *pinch); protected: diff --git a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml index f39ea06..0b59d9d 100644 --- a/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml +++ b/tests/auto/declarative/qdeclarativepincharea/data/pinchproperties.qml @@ -33,7 +33,7 @@ Rectangle { whiteRect.center = pinch.center whiteRect.scale = pinch.scale } - onPinchChanged: { + onPinchUpdated: { whiteRect.center = pinch.center whiteRect.scale = pinch.scale } -- cgit v0.12 From 5f4bf308ac7d4c81374f651103f85d45e0065d05 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Fri, 7 Jan 2011 14:11:43 +1000 Subject: Group all QtQuick 1.1 registrations together Task-number: QTBUG-15279 --- src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 5e04168..7db4d85 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -142,20 +142,16 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,0,"Scale"); qmlRegisterType("QtQuick",1,0,"Text"); qmlRegisterType("QtQuick",1,0,"TextEdit"); - qmlRegisterType("QtQuick",1,1,"TextEdit"); #ifndef QT_NO_LINEEDIT qmlRegisterType("QtQuick",1,0,"TextInput"); #endif qmlRegisterType("QtQuick",1,0,"ViewSection"); qmlRegisterType("QtQuick",1,0,"VisualDataModel"); qmlRegisterType("QtQuick",1,0,"VisualItemModel"); - qmlRegisterType("QtQuick",1,1,"PinchArea"); - qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); qmlRegisterType(); - qmlRegisterType(); qmlRegisterType(); qmlRegisterType("QtQuick",1,0,"QGraphicsWidget"); qmlRegisterExtendedType("QtQuick",1,0,"QGraphicsWidget"); @@ -176,13 +172,16 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType(); #endif - // QtQuick 1.1 items - qmlRegisterType("QtQuick",1,1,"Repeater"); - - qmlRegisterUncreatableType("QtQuick",1,0,"KeyNavigation",QDeclarativeKeyNavigationAttached::tr("KeyNavigation is only available via attached properties")); qmlRegisterUncreatableType("QtQuick",1,0,"Keys",QDeclarativeKeysAttached::tr("Keys is only available via attached properties")); + // QtQuick 1.1 items + qmlRegisterType("QtQuick",1,1,"PinchArea"); + qmlRegisterType("QtQuick",1,1,"Pinch"); + qmlRegisterType(); + qmlRegisterType("QtQuick",1,1,"Repeater"); + qmlRegisterType("QtQuick",1,1,"TextEdit"); + #ifndef QT_NO_IMPORT_QT47_QML #ifdef QT_NO_MOVIE qmlRegisterTypeNotAvailable("Qt",4,7,"AnimatedImage", -- cgit v0.12 From d3a6fcd9174b893aaac9db7d5e541ceb54b12402 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Thu, 23 Dec 2010 12:24:47 +1000 Subject: Introduce Qt.application.active property Replaces qmlviewer's runtime.activeWindow property. Task-number: QTBUG-13351 Reviewed-by: Martin Jones --- demos/declarative/snake/snake.qml | 2 +- doc/src/snippets/declarative/application.qml | 53 +++++++++ src/declarative/qml/qdeclarativeengine.cpp | 4 + src/declarative/util/qdeclarativeapplication.cpp | 118 +++++++++++++++++++++ src/declarative/util/qdeclarativeapplication_p.h | 83 +++++++++++++++ src/declarative/util/qdeclarativeutilmodule.cpp | 3 + src/declarative/util/util.pri | 2 + tests/auto/declarative/declarative.pro | 1 + .../qdeclarativeapplication.pro | 5 + .../tst_qdeclarativeapplication.cpp | 96 +++++++++++++++++ 10 files changed, 366 insertions(+), 1 deletion(-) create mode 100644 doc/src/snippets/declarative/application.qml create mode 100644 src/declarative/util/qdeclarativeapplication.cpp create mode 100644 src/declarative/util/qdeclarativeapplication_p.h create mode 100644 tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro create mode 100644 tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp diff --git a/demos/declarative/snake/snake.qml b/demos/declarative/snake/snake.qml index af86aac..366c172 100644 --- a/demos/declarative/snake/snake.qml +++ b/demos/declarative/snake/snake.qml @@ -105,7 +105,7 @@ Rectangle { source: "content/pics/pause.png" anchors.centerIn: parent; //opacity is deliberately not animated - opacity: activeGame && !runtime.isActiveWindow + opacity: activeGame && !Qt.application.active } Image { diff --git a/doc/src/snippets/declarative/application.qml b/doc/src/snippets/declarative/application.qml new file mode 100644 index 0000000..2820ff2 --- /dev/null +++ b/doc/src/snippets/declarative/application.qml @@ -0,0 +1,53 @@ +/**************************************************************************** +** +** 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:BSD$ +** You may use this file under the terms of the BSD license as follows: +** +** "Redistribution and use in source and binary forms, with or without +** modification, are permitted provided that the following conditions are +** met: +** * Redistributions of source code must retain the above copyright +** notice, this list of conditions and the following disclaimer. +** * Redistributions in binary form must reproduce the above copyright +** notice, this list of conditions and the following disclaimer in +** the documentation and/or other materials provided with the +** distribution. +** * Neither the name of Nokia Corporation and its Subsidiary(-ies) nor +** the names of its contributors may be used to endorse or promote +** products derived from this software without specific prior written +** permission. +** +** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE." +** $QT_END_LICENSE$ +** +****************************************************************************/ + +//! [document] +import QtQuick 1.1 + +Rectangle { + width: 300; height: 55 + color: Qt.application.active ? "white" : "lightgray" + Text { + text: "Application " + (Qt.application.active ? "active" : "inactive") + opacity: Qt.application.active ? 1.0 : 0.5 + anchors.centerIn: parent + } +} +//! [document] diff --git a/src/declarative/qml/qdeclarativeengine.cpp b/src/declarative/qml/qdeclarativeengine.cpp index 0a008ff..b940457 100644 --- a/src/declarative/qml/qdeclarativeengine.cpp +++ b/src/declarative/qml/qdeclarativeengine.cpp @@ -70,6 +70,7 @@ #include "private/qdeclarativeinclude_p.h" #include "private/qdeclarativenotifier_p.h" #include "private/qdeclarativedebugtrace_p.h" +#include "private/qdeclarativeapplication_p.h" #include #include @@ -521,6 +522,9 @@ void QDeclarativeEnginePrivate::init() listClass = new QDeclarativeListScriptClass(q); rootContext = new QDeclarativeContext(q,true); + QScriptValue applicationObject = objectClass->newQObject(new QDeclarativeApplication(q)); + scriptEngine.globalObject().property(QLatin1String("Qt")).setProperty(QLatin1String("application"), applicationObject); + if (QCoreApplication::instance()->thread() == q->thread() && QDeclarativeEngineDebugServer::isDebuggingEnabled()) { isDebugging = true; diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp new file mode 100644 index 0000000..53d196f --- /dev/null +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -0,0 +1,118 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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$ +** +****************************************************************************/ + +#include "qdeclarativeapplication_p.h" +#include +#include + +class QDeclarativeApplicationPrivate : public QObjectPrivate +{ + Q_DECLARE_PUBLIC(QDeclarativeApplication) +public: + QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0) {} + bool active; +}; + +/*! + \qmlclass Application QDeclarativeApplication + \since QtQuick 1.1 + \ingroup qml-utility-elements + \brief The Application element provides access to global application + state properties shared by many QML components. + + These properties include application activity property \c active. + + \section1 Example Usage + + The following example shows the simplest usage of the Application element. + + \snippet doc/src/snippets/declarative/application.qml document + +*/ + +QDeclarativeApplication::QDeclarativeApplication(QObject *parent) : QObject(*new QDeclarativeApplicationPrivate(), parent) +{ + if (qApp) + qApp->installEventFilter(this); +} + +QDeclarativeApplication::~QDeclarativeApplication() +{ +} + +/*! + \qmlproperty bool Application::active + + This property indicates whether the application is the top-most and focused + application, and user is able to interact with the application. The property + is false when the application is on the background, device keylock or screen + saver is active, the screen backlight is turned off, or global system dialog + is being displayed on top of the application. It can be used for stopping and + pausing animations, timers, active processing of data to save device battery + and free device memory and processor load when the application is not active. + This property is readonly. + +*/ +bool QDeclarativeApplication::active() const +{ + Q_D(const QDeclarativeApplication); + return d->active; +} + +bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) +{ + Q_UNUSED(obj) + Q_D(QDeclarativeApplication); + if (event->type() == QEvent::ApplicationActivate + || event->type() == QEvent::ApplicationDeactivate) { + bool active = d->active; + if (event->type() == QEvent::ApplicationActivate) + active = true; + else if (event->type() == QEvent::ApplicationDeactivate) + active = false; + + if (d->active != active) { + d->active = active; + emit activeChanged(); + } + } + return false; +} diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h new file mode 100644 index 0000000..59ea7fe --- /dev/null +++ b/src/declarative/util/qdeclarativeapplication_p.h @@ -0,0 +1,83 @@ +/**************************************************************************** +** +** 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 QtDeclarative 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 QDECLARATIVEAPPLICATION_P_H +#define QDECLARATIVEAPPLICATION_P_H + +#include +#include +#include + +QT_BEGIN_HEADER + +QT_BEGIN_NAMESPACE + +QT_MODULE(Declarative) + +class QDeclarativeApplicationPrivate; +class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject +{ + Q_OBJECT + Q_PROPERTY(bool active READ active NOTIFY activeChanged) + +public: + explicit QDeclarativeApplication(QObject *parent = 0); + virtual ~QDeclarativeApplication(); + bool active() const; + +protected: + bool eventFilter(QObject *obj, QEvent *event); + +Q_SIGNALS: + void activeChanged(); + +private: + Q_DISABLE_COPY(QDeclarativeApplication) + Q_DECLARE_PRIVATE(QDeclarativeApplication) +}; + +QT_END_NAMESPACE + +QML_DECLARE_TYPE(QDeclarativeApplication) + +QT_END_HEADER + +#endif // QDECLARATIVEAPPLICATION_P_H diff --git a/src/declarative/util/qdeclarativeutilmodule.cpp b/src/declarative/util/qdeclarativeutilmodule.cpp index 0544f22..5abf085 100644 --- a/src/declarative/util/qdeclarativeutilmodule.cpp +++ b/src/declarative/util/qdeclarativeutilmodule.cpp @@ -66,6 +66,7 @@ #include "private/qdeclarativetimer_p.h" #include "private/qdeclarativetransitionmanager_p_p.h" #include "private/qdeclarativetransition_p.h" +#include "private/qdeclarativeapplication_p.h" #include "qdeclarativeview.h" #include "qdeclarativeinfo.h" #include "private/qdeclarativetypenotavailable_p.h" @@ -75,6 +76,8 @@ void QDeclarativeUtilModule::defineModule() { + qmlRegisterUncreatableType("QtQuick",1,1,"Application", "Application is an abstract class"); + qmlRegisterType("QtQuick",1,0,"AnchorAnimation"); qmlRegisterType("QtQuick",1,0,"AnchorChanges"); qmlRegisterType("QtQuick",1,0,"Behavior"); diff --git a/src/declarative/util/util.pri b/src/declarative/util/util.pri index fd57144..62fa8f1 100644 --- a/src/declarative/util/util.pri +++ b/src/declarative/util/util.pri @@ -1,6 +1,7 @@ INCLUDEPATH += $$PWD SOURCES += \ + $$PWD/qdeclarativeapplication.cpp \ $$PWD/qdeclarativeutilmodule.cpp\ $$PWD/qdeclarativeview.cpp \ $$PWD/qdeclarativeconnections.cpp \ @@ -30,6 +31,7 @@ SOURCES += \ $$PWD/qlistmodelinterface.cpp HEADERS += \ + $$PWD/qdeclarativeapplication_p.h \ $$PWD/qdeclarativeutilmodule_p.h\ $$PWD/qdeclarativeview.h \ $$PWD/qdeclarativeconnections_p.h \ diff --git a/tests/auto/declarative/declarative.pro b/tests/auto/declarative/declarative.pro index 51597bd..1f0d32a 100644 --- a/tests/auto/declarative/declarative.pro +++ b/tests/auto/declarative/declarative.pro @@ -11,6 +11,7 @@ SUBDIRS += \ qdeclarativeanchors \ qdeclarativeanimatedimage \ qdeclarativeanimations \ + qdeclarativeapplication \ qdeclarativebehaviors \ qdeclarativebinding \ qdeclarativeborderimage \ diff --git a/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro b/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro new file mode 100644 index 0000000..91e5468 --- /dev/null +++ b/tests/auto/declarative/qdeclarativeapplication/qdeclarativeapplication.pro @@ -0,0 +1,5 @@ +load(qttest_p4) +contains(QT_CONFIG,declarative): QT += declarative gui +macx:CONFIG -= app_bundle + +SOURCES += tst_qdeclarativeapplication.cpp diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp new file mode 100644 index 0000000..0d069dc --- /dev/null +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp @@ -0,0 +1,96 @@ +/**************************************************************************** +** +** 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 test suite 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 +#include "../../../shared/util.h" +#include +#include +#include +#include +#include + +class tst_qdeclarativeapplication : public QObject +{ + Q_OBJECT +public: + tst_qdeclarativeapplication(); + +private slots: + void active(); + +private: + QDeclarativeEngine engine; +}; + +tst_qdeclarativeapplication::tst_qdeclarativeapplication() +{ +} + +void tst_qdeclarativeapplication::active() +{ + QDeclarativeComponent component(&engine); + component.setData("import QtQuick 1.0; Item { property bool active: Qt.application.active }", QUrl::fromLocalFile("")); + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item); + QGraphicsScene scene; + QGraphicsView view(&scene); + scene.addItem(item); + + // not active + QVERIFY(!item->property("active").toBool()); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); + + // active + view.show(); + QApplication::setActiveWindow(&view); + QTest::qWaitForWindowShown(&view); + QTRY_COMPARE(QApplication::activeWindow(), static_cast(&view)); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); + + // not active again + QApplication::setActiveWindow(0); + QVERIFY(!item->property("active").toBool()); + QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); +} + +QTEST_MAIN(tst_qdeclarativeapplication) + +#include "tst_qdeclarativeapplication.moc" -- cgit v0.12 From 0371e80ba76b7dcaf1809ba9345fd96610390222 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Tue, 4 Jan 2011 17:25:48 +1000 Subject: Add layoutDirection property to Qt.application element Task-number: QTBUG-16424 Reviewed-by: Martin Jones --- src/declarative/util/qdeclarativeapplication.cpp | 32 ++++++++++++++++++++-- src/declarative/util/qdeclarativeapplication_p.h | 3 ++ .../tst_qdeclarativeapplication.cpp | 23 ++++++++++++++++ 3 files changed, 56 insertions(+), 2 deletions(-) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index 53d196f..f724c16 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -47,8 +47,10 @@ class QDeclarativeApplicationPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeApplication) public: - QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0) {} + QDeclarativeApplicationPrivate() : active(QApplication::activeWindow() != 0), + layoutDirection(QApplication::layoutDirection()) {} bool active; + Qt::LayoutDirection layoutDirection; }; /*! @@ -58,7 +60,8 @@ public: \brief The Application element provides access to global application state properties shared by many QML components. - These properties include application activity property \c active. + These properties include application activity property \c active, + and default layout direction property \c layoutDirection. \section1 Example Usage @@ -97,6 +100,24 @@ bool QDeclarativeApplication::active() const return d->active; } +/*! + \qmlproperty bool Application::layoutDirection + + This property can be used to query the default layout direction of the + application. On system start-up, the default layout direction depends on the + application's language. The property has a value Qt.RightToLeft in locales + where text and graphic elements are read from right to left, and Qt.LeftToRight + where the reading direction flows from left to right. You can bind to the + property to customize your application layouts to support both layout + directions. This property is readonly. + +*/ +bool QDeclarativeApplication::layoutDirection() const +{ + Q_D(const QDeclarativeApplication); + return d->layoutDirection; +} + bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) { Q_UNUSED(obj) @@ -114,5 +135,12 @@ bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) emit activeChanged(); } } + if (event->type() == QEvent::LayoutDirectionChange) { + Qt::LayoutDirection direction = QApplication::layoutDirection(); + if (d->layoutDirection != direction) { + d->layoutDirection = direction; + emit layoutDirectionChanged(); + } + } return false; } diff --git a/src/declarative/util/qdeclarativeapplication_p.h b/src/declarative/util/qdeclarativeapplication_p.h index 59ea7fe..c5cd227 100644 --- a/src/declarative/util/qdeclarativeapplication_p.h +++ b/src/declarative/util/qdeclarativeapplication_p.h @@ -57,17 +57,20 @@ class Q_DECLARATIVE_PRIVATE_EXPORT QDeclarativeApplication : public QObject { Q_OBJECT Q_PROPERTY(bool active READ active NOTIFY activeChanged) + Q_PROPERTY(bool layoutDirection READ layoutDirection NOTIFY layoutDirectionChanged) public: explicit QDeclarativeApplication(QObject *parent = 0); virtual ~QDeclarativeApplication(); bool active() const; + bool layoutDirection() const; protected: bool eventFilter(QObject *obj, QEvent *event); Q_SIGNALS: void activeChanged(); + void layoutDirectionChanged(); private: Q_DISABLE_COPY(QDeclarativeApplication) diff --git a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp index 0d069dc..3011257 100644 --- a/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp +++ b/tests/auto/declarative/qdeclarativeapplication/tst_qdeclarativeapplication.cpp @@ -55,6 +55,7 @@ public: private slots: void active(); + void layoutDirection(); private: QDeclarativeEngine engine; @@ -91,6 +92,28 @@ void tst_qdeclarativeapplication::active() QCOMPARE(item->property("active").toBool(), QApplication::activeWindow() != 0); } +void tst_qdeclarativeapplication::layoutDirection() +{ + QDeclarativeComponent component(&engine); + component.setData("import QtQuick 1.0; Item { property bool layoutDirection: Qt.application.layoutDirection }", QUrl::fromLocalFile("")); + QDeclarativeItem *item = qobject_cast(component.create()); + QVERIFY(item); + QGraphicsScene scene; + QGraphicsView view(&scene); + scene.addItem(item); + + // not mirrored + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::LeftToRight); + + // mirrored + QApplication::setLayoutDirection(Qt::RightToLeft); + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::RightToLeft); + + // not mirrored again + QApplication::setLayoutDirection(Qt::LeftToRight); + QCOMPARE(Qt::LayoutDirection(item->property("layoutDirection").toInt()), Qt::LeftToRight); +} + QTEST_MAIN(tst_qdeclarativeapplication) #include "tst_qdeclarativeapplication.moc" -- cgit v0.12 From e185e5f008f6852bd7a79d74262717c8e377b918 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Wed, 5 Jan 2011 08:25:56 +0100 Subject: Restored old flushing behavior in -graphicssystem opengl on desktop. Change 284211ccbd2cbd recently introduced a fix for EGL, to prevent flushing when nothing has been rendered into the back buffer. However, the skip should only be done when there's no partial update support in the window surface. If there is partial update support we can still flush as usual. Reviewed-by: Gunnar Sletta --- src/opengl/qwindowsurface_gl.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/opengl/qwindowsurface_gl.cpp b/src/opengl/qwindowsurface_gl.cpp index b8716ce..7243f02 100644 --- a/src/opengl/qwindowsurface_gl.cpp +++ b/src/opengl/qwindowsurface_gl.cpp @@ -520,9 +520,10 @@ void QGLWindowSurface::flush(QWidget *widget, const QRegion &rgn, const QPoint & // did_paint is set to true in ::beginPaint. ::beginPaint means that we // at least cleared the background (= painted something). In EGL API it's a - // mistakte to call swapBuffers if nothing was painted. This check protects - // the flush func from being executed if it's for nothing. - if (!d_ptr->did_paint) + // mistake to call swapBuffers if nothing was painted unless + // EGL_BUFFER_PRESERVED is set. This check protects the flush func from + // being executed if it's for nothing. + if (!hasPartialUpdateSupport() && !d_ptr->did_paint) return; QWidget *parent = widget->internalWinId() ? widget : widget->nativeParentWidget(); -- cgit v0.12 From 84658ec4e650b12dcea6f886b530e66a195465cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20R=C3=B8dal?= Date: Thu, 6 Jan 2011 13:09:14 +0100 Subject: Fixed bug and performance problem in windowsstyle. QImage::fill(Qt::transparent) pre-4.8 is a bug, also using Format_ARGB32 is very unoptimal compared to Format_ARGB32_Premultiplied. Task-number: QTBUG-16439 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/styles/qwindowsstyle.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/styles/qwindowsstyle.cpp b/src/gui/styles/qwindowsstyle.cpp index 32a6d8d..4144b80 100644 --- a/src/gui/styles/qwindowsstyle.cpp +++ b/src/gui/styles/qwindowsstyle.cpp @@ -1395,8 +1395,8 @@ void QWindowsStyle::drawPrimitive(PrimitiveElement pe, const QStyleOption *opt, if (!QPixmapCache::find(pixmapName, pixmap)) { int border = size/5; int sqsize = 2*(size/2); - QImage image(sqsize, sqsize, QImage::Format_ARGB32); - image.fill(Qt::transparent); + QImage image(sqsize, sqsize, QImage::Format_ARGB32_Premultiplied); + image.fill(0); QPainter imagePainter(&image); QPolygon a; -- cgit v0.12 From 5780ff75c1e63322f3edd6158c08f1d944919cce Mon Sep 17 00:00:00 2001 From: Kai Koehne Date: Fri, 7 Jan 2011 08:47:51 +0100 Subject: QmlViewer: Remove unused class variables --- tools/qml/qmlruntime.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/qml/qmlruntime.h b/tools/qml/qmlruntime.h index b43aa54..a70ffc9 100644 --- a/tools/qml/qmlruntime.h +++ b/tools/qml/qmlruntime.h @@ -188,8 +188,6 @@ private: ScriptOptions m_scriptOptions; QDeclarativeTester *tester; - QNetworkReply *wgtreply; - QString wgtdir; NetworkAccessManagerFactory *namFactory; bool useQmlFileBrowser; -- cgit v0.12 From eea1c1a0d12920e3c0a0ffe5339e33055ffe0fdd Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Fri, 7 Jan 2011 18:37:47 +1000 Subject: Add missing Qt namespaces macros to qdeclarativeapplication.cpp source file Task-number: Reviewed-by: Aaron Kennedy --- src/declarative/util/qdeclarativeapplication.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/declarative/util/qdeclarativeapplication.cpp b/src/declarative/util/qdeclarativeapplication.cpp index f724c16..7559aa9 100644 --- a/src/declarative/util/qdeclarativeapplication.cpp +++ b/src/declarative/util/qdeclarativeapplication.cpp @@ -43,6 +43,8 @@ #include #include +QT_BEGIN_NAMESPACE + class QDeclarativeApplicationPrivate : public QObjectPrivate { Q_DECLARE_PUBLIC(QDeclarativeApplication) @@ -144,3 +146,5 @@ bool QDeclarativeApplication::eventFilter(QObject *obj, QEvent *event) } return false; } + +QT_END_NAMESPACE -- cgit v0.12 From 59b9bce59aacc2cf68a3800f4fcb486d136b91f9 Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 7 Jan 2011 09:54:35 +0100 Subject: Adding a link to the coding style wiki page. --- doc/src/qt-webpages.qdoc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/src/qt-webpages.qdoc b/doc/src/qt-webpages.qdoc index 0a03157..5799d69 100644 --- a/doc/src/qt-webpages.qdoc +++ b/doc/src/qt-webpages.qdoc @@ -244,3 +244,8 @@ \externalpage http://labs.qt.nokia.com \title Qt Labs */ + +/*! + \externalpage http://qt.gitorious.org/qt/pages/QtCodingStyle + \title Qt Coding Style +*/ -- cgit v0.12 From ec46ec7d5d4783fb450ed75e2f6a2ae3edca918e Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 7 Jan 2011 11:26:52 +0100 Subject: Revert "QNAM HTTP: Fix missing error() signal" We don't think this is the right solution. This reverts commit de72670c620e1193fa875bf1a4adee553700bacb. --- src/network/access/qhttpnetworkconnectionchannel.cpp | 20 +------------------- src/network/access/qhttpnetworkconnectionchannel_p.h | 1 - 2 files changed, 1 insertion(+), 20 deletions(-) diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index c4471eb..c8caad4 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp +++ b/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -66,7 +66,6 @@ QHttpNetworkConnectionChannel::QHttpNetworkConnectionChannel() , bytesTotal(0) , resendCurrent(false) , lastStatus(0) - , unhandledError(QNetworkReply::NoError) , pendingEncrypt(false) , reconnectAttempts(2) , authMethod(QAuthenticatorPrivate::None) @@ -643,23 +642,7 @@ void QHttpNetworkConnectionChannel::allDone() // slot connected to it. The socket will not fire readyRead signal, if we are already // in the slot connected to readyRead if (emitFinished) - { - // Check whether _q_error was invoked previously and if it left a socket - // error unhandled AND that there are no http errors. - // In case there are both socket errors and http errors, the socket error is suppressed. - // Http errors are handled in the QNetworkAccessHttpBackend. - if(unhandledError != QNetworkReply::NoError && reply->statusCode() == 200) { - QString errorString = connection->d_func()->errorDetail(unhandledError, socket, socket->errorString()); - qRegisterMetaType("QNetworkReply::NetworkError"); - QMetaObject::invokeMethod(reply, "finishedWithError", - Qt::QueuedConnection, - Q_ARG(QNetworkReply::NetworkError, unhandledError), - Q_ARG(QString, errorString)); - } else { - QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection); - } - unhandledError = QNetworkReply::NoError; // Reset the value - } + QMetaObject::invokeMethod(reply, "finished", Qt::QueuedConnection); // reset the reconnection attempts after we receive a complete reply. // in case of failures, each channel will attempt two reconnects before emitting error. reconnectAttempts = 2; @@ -981,7 +964,6 @@ void QHttpNetworkConnectionChannel::_q_error(QAbstractSocket::SocketError socket errorCode = QNetworkReply::RemoteHostClosedError; } } else { - unhandledError = QNetworkReply::RemoteHostClosedError; return; } break; diff --git a/src/network/access/qhttpnetworkconnectionchannel_p.h b/src/network/access/qhttpnetworkconnectionchannel_p.h index e1d42fb..fd18042 100644 --- a/src/network/access/qhttpnetworkconnectionchannel_p.h +++ b/src/network/access/qhttpnetworkconnectionchannel_p.h @@ -105,7 +105,6 @@ public: qint64 bytesTotal; bool resendCurrent; int lastStatus; // last status received on this channel - QNetworkReply::NetworkError unhandledError; // Stored code of an unhandled error. bool pendingEncrypt; // for https (send after encrypted) int reconnectAttempts; // maximum 2 reconnection attempts QAuthenticatorPrivate::Method authMethod; -- cgit v0.12 From 0d6eb2b59f626dbcb51209cc98ef74878fdf5437 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 7 Jan 2011 11:31:20 +0100 Subject: Revert "Fix QNetworkReply autotest cases for QT-3494" We don't think this is the right fix. This reverts commit 5d18d393808d7a4be56eb00ab9f1e9cda9e211c9. --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index 6cd9d3c..cff0ae9 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -2585,19 +2585,17 @@ void tst_QNetworkReply::ioGetFromHttpBrokenServer() void tst_QNetworkReply::ioGetFromHttpStatus100_data() { QTest::addColumn("dataToSend"); - QTest::addColumn("expectedError"); - QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; - QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; - QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n") << QNetworkReply::RemoteHostClosedError; - QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n") << QNetworkReply::RemoteHostClosedError; - QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; - QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n") << QNetworkReply::NoError; + QTest::newRow("normal") << QByteArray("HTTP/1.1 100 Continue\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); + QTest::newRow("minimal") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); + QTest::newRow("minimal2") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\r\n\r\n"); + QTest::newRow("minimal3") << QByteArray("HTTP/1.1 100 Continue\n\nHTTP/1.0 200 OK\n\n"); + QTest::newRow("with_headers") << QByteArray("HTTP/1.1 100 Continue\r\nBla: x\r\n\r\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); + QTest::newRow("with_headers2") << QByteArray("HTTP/1.1 100 Continue\nBla: x\n\nHTTP/1.1 200 OK\r\nContent-Length: 0\r\n\r\n"); } void tst_QNetworkReply::ioGetFromHttpStatus100() { QFETCH(QByteArray, dataToSend); - QFETCH(QNetworkReply::NetworkError, expectedError); MiniHttpServer server(dataToSend); server.doClose = true; @@ -2609,7 +2607,7 @@ void tst_QNetworkReply::ioGetFromHttpStatus100() QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); - QCOMPARE(reply->error(), expectedError); + QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); QVERIFY(reply->rawHeader("bla").isNull()); } @@ -2617,14 +2615,12 @@ void tst_QNetworkReply::ioGetFromHttpStatus100() void tst_QNetworkReply::ioGetFromHttpNoHeaders_data() { QTest::addColumn("dataToSend"); - QTest::addColumn("expectedError"); - QTest::newRow("justStatus+noheaders+disconnect") << QByteArray("HTTP/1.0 200 OK\r\n\r\n") << QNetworkReply::RemoteHostClosedError; + QTest::newRow("justStatus+noheaders+disconnect") << QByteArray("HTTP/1.0 200 OK\r\n\r\n"); } void tst_QNetworkReply::ioGetFromHttpNoHeaders() { QFETCH(QByteArray, dataToSend); - QFETCH(QNetworkReply::NetworkError, expectedError); MiniHttpServer server(dataToSend); server.doClose = true; @@ -2636,7 +2632,7 @@ void tst_QNetworkReply::ioGetFromHttpNoHeaders() QVERIFY(!QTestEventLoop::instance().timeout()); QCOMPARE(reply->url(), request.url()); - QCOMPARE(reply->error(), expectedError); + QCOMPARE(reply->error(), QNetworkReply::NoError); QCOMPARE(reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(), 200); } -- cgit v0.12 From 2371b6570ee4fa6296bb05e577c160bbab92e0b1 Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Fri, 7 Jan 2011 11:41:19 +0100 Subject: tst_qnetworkreply: Add EXPECT_FAIL for ioGetFromBuiltinHttp Reviewed-by: Peter Hartmann --- tests/auto/qnetworkreply/tst_qnetworkreply.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp index cff0ae9..5ac34ad 100644 --- a/tests/auto/qnetworkreply/tst_qnetworkreply.cpp +++ b/tests/auto/qnetworkreply/tst_qnetworkreply.cpp @@ -3795,6 +3795,8 @@ void tst_QNetworkReply::ioGetFromBuiltinHttp() const int maxRate = rate * 1024 * (100+allowedDeviation) / 100; qDebug() << minRate << "<="<< server.transferRate << "<=" << maxRate << "?"; QVERIFY(server.transferRate >= minRate); + QEXPECT_FAIL("http+limited", "Limiting is broken right now", Continue); + QEXPECT_FAIL("https+limited", "Limiting is broken right now", Continue); QVERIFY(server.transferRate <= maxRate); } } -- cgit v0.12 From 67267842ce658d956f11d52194566b6de1f84f9a Mon Sep 17 00:00:00 2001 From: Sergio Ahumada Date: Fri, 7 Jan 2011 12:37:12 +0100 Subject: Doc: Fixing typo --- src/gui/painting/qdrawhelper_ssse3.cpp | 2 +- src/gui/painting/qdrawingprimitive_sse2_p.h | 4 ++-- src/gui/painting/qpaintengine.cpp | 2 +- src/gui/painting/qpaintengine_raster.cpp | 4 ++-- src/gui/painting/qpainter.cpp | 2 +- src/gui/painting/qprintengine_ps.cpp | 2 +- src/gui/text/qfontengine_p.h | 2 +- src/gui/text/qtextdocument_p.cpp | 2 +- src/gui/text/qtextdocumentlayout.cpp | 2 +- src/gui/text/qtextengine.cpp | 2 +- src/gui/text/qtextlist.cpp | 2 +- src/gui/text/qzip.cpp | 2 +- src/gui/widgets/qabstractscrollarea.cpp | 2 +- src/gui/widgets/qabstractslider.cpp | 2 +- src/gui/widgets/qdatetimeedit.cpp | 2 +- src/gui/widgets/qdockarealayout.cpp | 2 +- src/gui/widgets/qdockarealayout_p.h | 2 +- src/gui/widgets/qdockwidget_p.h | 2 +- src/gui/widgets/qlinecontrol_p.h | 2 +- src/gui/widgets/qscrollarea.cpp | 2 +- src/gui/widgets/qsplitter.cpp | 2 +- 21 files changed, 23 insertions(+), 23 deletions(-) diff --git a/src/gui/painting/qdrawhelper_ssse3.cpp b/src/gui/painting/qdrawhelper_ssse3.cpp index fb5602e..01e0ccf 100644 --- a/src/gui/painting/qdrawhelper_ssse3.cpp +++ b/src/gui/painting/qdrawhelper_ssse3.cpp @@ -80,7 +80,7 @@ inline static void blend_pixel(quint32 &dst, const quint32 src) // 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: +// nullVector, half, one, colorMask are constant across the whole image/texture, and should be defined as: //const __m128i nullVector = _mm_set1_epi32(0); //const __m128i half = _mm_set1_epi16(0x80); //const __m128i one = _mm_set1_epi16(0xff); diff --git a/src/gui/painting/qdrawingprimitive_sse2_p.h b/src/gui/painting/qdrawingprimitive_sse2_p.h index d8f6bf5..a4614ad 100644 --- a/src/gui/painting/qdrawingprimitive_sse2_p.h +++ b/src/gui/painting/qdrawingprimitive_sse2_p.h @@ -129,7 +129,7 @@ QT_BEGIN_NAMESPACE } // 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: +// nullVector, half, one, colorMask are constant across the whole image/texture, and should be defined as: //const __m128i nullVector = _mm_set1_epi32(0); //const __m128i half = _mm_set1_epi16(0x80); //const __m128i one = _mm_set1_epi16(0xff); @@ -186,7 +186,7 @@ QT_BEGIN_NAMESPACE } // 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: +// nullVector, half, one, colorMask are constant across the whole image/texture, and should be defined as: //const __m128i nullVector = _mm_set1_epi32(0); //const __m128i half = _mm_set1_epi16(0x80); //const __m128i one = _mm_set1_epi16(0xff); diff --git a/src/gui/painting/qpaintengine.cpp b/src/gui/painting/qpaintengine.cpp index a2d0337..58bba35 100644 --- a/src/gui/painting/qpaintengine.cpp +++ b/src/gui/painting/qpaintengine.cpp @@ -992,7 +992,7 @@ void QPaintEngine::setSystemRect(const QRect &rect) /*! \internal - Retreives the rect for drawing within the backing store. This + Retrieves the rect for drawing within the backing store. This function should ONLY be used by the backing store. */ QRect QPaintEngine::systemRect() const diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 4d06c9f..a5d647d 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -1815,7 +1815,7 @@ void QRasterPaintEngine::fill(const QVectorPath &path, const QBrush &brush) ensureState(); if (s->flags.tx_noshear) { d->initializeRasterizer(&s->brushData); - // ### Is normalizing really nessesary here? + // ### Is normalizing really necessary here? const qreal *p = path.points(); QRectF r = QRectF(p[0], p[1], p[2] - p[0], p[7] - p[1]).normalized(); if (!r.isEmpty()) { @@ -3193,7 +3193,7 @@ void QRasterPaintEngine::drawGlyphsS60(const QPointF &p, const QTextItemInt &ti) #endif // Q_OS_SYMBIAN && QT_NO_FREETYPE /*! - * Returns true if the rectangle is completly within the current clip + * Returns true if the rectangle is completely within the current clip * state of the paint engine. */ bool QRasterPaintEnginePrivate::isUnclipped_normalized(const QRect &r) const diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index ab9707d..3f6586d 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -9085,7 +9085,7 @@ void QPainter::drawPixmapFragments(const PixmapFragment *fragments, int fragment QPainter::drawPixmapFragments() function. The variables \a x, \a y, \a width and \a height are used to calculate the target rectangle that is drawn. \a x and \a y denotes the center of the target rectangle. The \a - width and \a heigth in the target rectangle is scaled by the \a scaleX and + width and \a height in the target rectangle is scaled by the \a scaleX and \a scaleY values. The resulting target rectangle is then rotated \a rotation degrees around the \a x, \a y center point. diff --git a/src/gui/painting/qprintengine_ps.cpp b/src/gui/painting/qprintengine_ps.cpp index ca694ae..6fb2db5 100644 --- a/src/gui/painting/qprintengine_ps.cpp +++ b/src/gui/painting/qprintengine_ps.cpp @@ -908,7 +908,7 @@ void QPSPrintEngine::drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, con if (d->clipEnabled && d->allClipped) return; - // ### Optimise implementation! + // ### Optimize implementation! qreal yPos = r.y(); qreal yOff = p.y(); while(yPos < r.y() + r.height()) { diff --git a/src/gui/text/qfontengine_p.h b/src/gui/text/qfontengine_p.h index fc26eef..c9dd5bc 100644 --- a/src/gui/text/qfontengine_p.h +++ b/src/gui/text/qfontengine_p.h @@ -180,7 +180,7 @@ public: void addBitmapFontToPath(qreal x, qreal y, const QGlyphLayout &, QPainterPath *, QTextItem::RenderFlags); /** * Create a qimage with the alpha values for the glyph. - * Returns an image indexed_8 with index values ranging from 0=fully transparant to 255=opaque + * Returns an image indexed_8 with index values ranging from 0=fully transparent to 255=opaque */ virtual QImage alphaMapForGlyph(glyph_t); virtual QImage alphaMapForGlyph(glyph_t, const QTransform &t); diff --git a/src/gui/text/qtextdocument_p.cpp b/src/gui/text/qtextdocument_p.cpp index 0bdd20d..14d85b7 100644 --- a/src/gui/text/qtextdocument_p.cpp +++ b/src/gui/text/qtextdocument_p.cpp @@ -91,7 +91,7 @@ QT_BEGIN_NAMESPACE END_OF_PARA/START_OF_FRAME/END_OF_FRAME (see below). Lists are not in here, as they are treated specially. A list is just - a collection of (not neccessarily connected) blocks, that share the + a collection of (not necessarily connected) blocks, that share the same objectIndex() in the format that refers to the list format and object. diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp index ff14490..a1bea12 100644 --- a/src/gui/text/qtextdocumentlayout.cpp +++ b/src/gui/text/qtextdocumentlayout.cpp @@ -327,7 +327,7 @@ static inline bool isLineSeparatorBlockAfterTable(const QTextBlock &block, const /* -Optimisation strategies: +Optimization strategies: HTML layout: diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index 3bd6122..75dcf57 100644 --- a/src/gui/text/qtextengine.cpp +++ b/src/gui/text/qtextengine.cpp @@ -1879,7 +1879,7 @@ void QTextEngine::justify(const QScriptLine &line) if (end == layoutData->string.length()) return; // no justification at end of paragraph if (end && layoutData->items[findItem(end-1)].analysis.flags == QScriptAnalysis::LineOrParagraphSeparator) - return; // no justification at the end of an explicitely separated line + return; // no justification at the end of an explicitly separated line } // justify line diff --git a/src/gui/text/qtextlist.cpp b/src/gui/text/qtextlist.cpp index a0ff520..b66766e 100644 --- a/src/gui/text/qtextlist.cpp +++ b/src/gui/text/qtextlist.cpp @@ -235,7 +235,7 @@ QString QTextList::itemText(const QTextBlock &blockIt) const if (i % 4) { // c[i] == 4|5|9|40|50|90|400|500|900 if ((i-2) % 4) { - // c[i] == 4|9|40|90|400|900 => with substraction (IV, IX, XL, XC, ...) + // c[i] == 4|9|40|90|400|900 => with subtraction (IV, IX, XL, XC, ...) numDigits = 2; } else { diff --git a/src/gui/text/qzip.cpp b/src/gui/text/qzip.cpp index 6f099a9..c449588 100644 --- a/src/gui/text/qzip.cpp +++ b/src/gui/text/qzip.cpp @@ -825,7 +825,7 @@ int QZipReader::count() const /*! Returns a FileInfo of an entry in the zipfile. - The \a index is the index into the directoy listing of the zipfile. + The \a index is the index into the directory listing of the zipfile. Returns an invalid FileInfo if \a index is out of boundaries. \sa fileInfoList() diff --git a/src/gui/widgets/qabstractscrollarea.cpp b/src/gui/widgets/qabstractscrollarea.cpp index 30ce23b..4edbf2d 100644 --- a/src/gui/widgets/qabstractscrollarea.cpp +++ b/src/gui/widgets/qabstractscrollarea.cpp @@ -1012,7 +1012,7 @@ bool QAbstractScrollArea::event(QEvent *e) You can reimplement this function in a subclass, but we recommend using one of the specialized event handlers instead. - Specialised handlers for viewport events are: paintEvent(), + Specialized handlers for viewport events are: paintEvent(), mousePressEvent(), mouseReleaseEvent(), mouseDoubleClickEvent(), mouseMoveEvent(), wheelEvent(), dragEnterEvent(), dragMoveEvent(), dragLeaveEvent(), dropEvent(), contextMenuEvent(), and diff --git a/src/gui/widgets/qabstractslider.cpp b/src/gui/widgets/qabstractslider.cpp index a8b39f4..ee9a861 100644 --- a/src/gui/widgets/qabstractslider.cpp +++ b/src/gui/widgets/qabstractslider.cpp @@ -717,7 +717,7 @@ bool QAbstractSliderPrivate::scrollByDelta(Qt::Orientation orientation, Qt::Keyb offset_accumulated += stepsToScrollF; #ifndef Q_WS_MAC - // Dont't scroll more than one page in any case: + // Don't scroll more than one page in any case: stepsToScroll = qBound(-pageStep, int(offset_accumulated), pageStep); #else // Native UI-elements on Mac can scroll hundreds of lines at a time as diff --git a/src/gui/widgets/qdatetimeedit.cpp b/src/gui/widgets/qdatetimeedit.cpp index 8043747..4d52e38 100644 --- a/src/gui/widgets/qdatetimeedit.cpp +++ b/src/gui/widgets/qdatetimeedit.cpp @@ -902,7 +902,7 @@ void QDateTimeEdit::setDisplayFormat(const QString &format) /*! \property QDateTimeEdit::calendarPopup - \brief the current calender pop-up showing mode. + \brief the current calendar pop-up showing mode. \since 4.2 The calendar pop-up will be shown upon clicking the arrow button. diff --git a/src/gui/widgets/qdockarealayout.cpp b/src/gui/widgets/qdockarealayout.cpp index b540e76..867e5a3 100644 --- a/src/gui/widgets/qdockarealayout.cpp +++ b/src/gui/widgets/qdockarealayout.cpp @@ -3163,7 +3163,7 @@ int QDockAreaLayout::separatorMove(const QList &separator, const QPoint &or } #ifndef QT_NO_TABBAR -// Sets the correct positions for the seperator widgets +// Sets the correct positions for the separator widgets // Allocates new sepearator widgets with getSeparatorWidget void QDockAreaLayout::updateSeparatorWidgets() const { diff --git a/src/gui/widgets/qdockarealayout_p.h b/src/gui/widgets/qdockarealayout_p.h index 9cb77ba..37f3783 100644 --- a/src/gui/widgets/qdockarealayout_p.h +++ b/src/gui/widgets/qdockarealayout_p.h @@ -83,7 +83,7 @@ class QTabBar; // which then has one QDockAreaLayoutInfo as a child. (QDockAreaLayoutItem::subInfo) or // a widgetItem if this is a node of the tree (QDockAreaLayoutItem::widgetItem) // -// A path indetifies uniquely one object in this tree, the first number beeing the side and all the following +// A path indetifies uniquely one object in this tree, the first number being the side and all the following // indexes into the QDockAreaLayoutInfo::item_list. struct QDockAreaLayoutItem diff --git a/src/gui/widgets/qdockwidget_p.h b/src/gui/widgets/qdockwidget_p.h index d272b2c..655e216 100644 --- a/src/gui/widgets/qdockwidget_p.h +++ b/src/gui/widgets/qdockwidget_p.h @@ -169,7 +169,7 @@ private: QRect _titleArea; }; -/* The size hints of a QDockWidget will depend on wether it is docked or not. +/* The size hints of a QDockWidget will depend on whether it is docked or not. This layout item always returns the size hints as if the dock widget was docked. */ class QDockWidgetItem : public QWidgetItem diff --git a/src/gui/widgets/qlinecontrol_p.h b/src/gui/widgets/qlinecontrol_p.h index d881acf..dd8fb97 100644 --- a/src/gui/widgets/qlinecontrol_p.h +++ b/src/gui/widgets/qlinecontrol_p.h @@ -239,7 +239,7 @@ public: #ifndef QT_NO_COMPLETER QCompleter *completer() const { return m_completer; } - /* Note that you must set the widget for the completer seperately */ + /* Note that you must set the widget for the completer separately */ void setCompleter(const QCompleter *c) { m_completer = const_cast(c); } void complete(int key); #endif diff --git a/src/gui/widgets/qscrollarea.cpp b/src/gui/widgets/qscrollarea.cpp index 38e799e..64a0049 100644 --- a/src/gui/widgets/qscrollarea.cpp +++ b/src/gui/widgets/qscrollarea.cpp @@ -121,7 +121,7 @@ QT_BEGIN_NAMESPACE If a scroll area is used to display the contents of a widget that contains child widgets arranged in a layout, it is important to - realise that the size policy of the layout will also determine the + realize that the size policy of the layout will also determine the size of the widget. This is especially useful to know if you intend to dynamically change the contents of the layout. In such cases, setting the layout's \l{QLayout::sizeConstraint}{size constraint} diff --git a/src/gui/widgets/qsplitter.cpp b/src/gui/widgets/qsplitter.cpp index 88b7517..7775f39 100644 --- a/src/gui/widgets/qsplitter.cpp +++ b/src/gui/widgets/qsplitter.cpp @@ -124,7 +124,7 @@ QSplitterHandle::QSplitterHandle(Qt::Orientation orientation, QSplitter *parent) /*! Sets the orientation of the splitter handle to \a orientation. - This is usually propogated from the QSplitter. + This is usually propagated from the QSplitter. \sa QSplitter::setOrientation() */ -- cgit v0.12 From 8ffb49a4ac68b1c243b25343053e6e99f97ec2e7 Mon Sep 17 00:00:00 2001 From: Yoann Lopes Date: Fri, 7 Jan 2011 14:29:38 +0100 Subject: Fixes crash in QGraphicsItem's destructor. Crash introduced by 783a278f243c6411f5f32d11f2165b9eed9b6f8c. Autotest written by Niklas Kurkisuo Task-number: QTBUG-16374 Reviewed-by: TrustMe --- src/gui/graphicsview/qgraphicsitem.cpp | 4 +- tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 53 ++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 94e1a72..e52c970 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -5589,9 +5589,11 @@ void QGraphicsItemPrivate::clearSubFocus(QGraphicsItem *rootItem, QGraphicsItem // Reset sub focus chain. QGraphicsItem *parent = rootItem ? rootItem : q_ptr; do { - if (parent->d_ptr->subFocusItem != q_ptr || parent == stopItem) + if (parent->d_ptr->subFocusItem != q_ptr) break; parent->d_ptr->subFocusItem = 0; + if (parent == stopItem) + break; parent->d_ptr->subFocusItemChange(); } while (!parent->isPanel() && (parent = parent->d_ptr->parent)); } diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 0b29410..5daafd8 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -65,6 +65,7 @@ #include #include #include +#include #include "../../shared/util.h" @@ -469,6 +470,7 @@ private slots: void itemDiesDuringDraggingOperation(); void QTBUG_12112_focusItem(); void QTBUG_13473_sceneposchange(); + void QTBUG_16374_crashInDestructor(); private: QList paintedItems; @@ -11077,5 +11079,56 @@ void tst_QGraphicsItem::QTBUG_13473_sceneposchange() QCOMPARE(child->changes.count(QGraphicsItem::ItemScenePositionHasChanged), 2); } +class MyGraphicsWidget : public QGraphicsWidget { +Q_OBJECT +public: + MyGraphicsWidget() + : QGraphicsWidget(0) + { + QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(Qt::Vertical); + QLatin1String wiseWords("AZ BUKI VEDI"); + QString sentence(wiseWords); + QStringList words = sentence.split(QLatin1Char(' '), QString::SkipEmptyParts); + for (int i = 0; i < words.count(); ++i) { + QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget(this); + QLabel *label = new QLabel(words.at(i)); + proxy->setWidget(label); + proxy->setFocusPolicy(Qt::StrongFocus); + proxy->setFlag(QGraphicsItem::ItemAcceptsInputMethod, true); + if (i%2 == 0) + proxy->setVisible(false); + proxy->setFocus(); + lay->addItem(proxy); + } + setLayout(lay); + } + +}; + +class MyWidgetWindow : public QGraphicsWidget +{ +public: + MyWidgetWindow() + : QGraphicsWidget(0, Qt::Window) + { + QGraphicsLinearLayout *lay = new QGraphicsLinearLayout(Qt::Vertical); + MyGraphicsWidget *widget = new MyGraphicsWidget(); + lay->addItem(widget); + setLayout(lay); + } +}; + +void tst_QGraphicsItem::QTBUG_16374_crashInDestructor() +{ + QGraphicsScene scene; + QGraphicsView view(&scene); + + MyWidgetWindow win; + scene.addItem(&win); + + view.show(); + QTest::qWaitForWindowShown(&view); +} + QTEST_MAIN(tst_QGraphicsItem) #include "tst_qgraphicsitem.moc" -- cgit v0.12 From e4d86f23f4c1b9a5f960c0cb912256375e1c771d Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Fri, 7 Jan 2011 15:00:39 +0100 Subject: Added content and snippet code to Basic Elements overview page. Task-number: QTBUG-16071 --- doc/src/declarative/basicelements.qdoc | 97 ++++++++++++++++++++-- .../declarative/focus/focusscopewidget.qml | 2 + .../declarative/focus/myfocusscopewidget.qml | 4 +- doc/src/snippets/declarative/focus/mywidget.qml | 2 +- 4 files changed, 97 insertions(+), 8 deletions(-) diff --git a/doc/src/declarative/basicelements.qdoc b/doc/src/declarative/basicelements.qdoc index d0c16b6..4253e4c 100644 --- a/doc/src/declarative/basicelements.qdoc +++ b/doc/src/declarative/basicelements.qdoc @@ -26,12 +26,97 @@ ****************************************************************************/ /*! - \page qmlbasicelements.html - \ingroup qml-features - \contentspage QML Features - \previouspage {QML Basic Types}{Data Types} - \nextpage {Using QML Positioner and Repeater Items}{Component Layouts} +\page qmlbasicelements.html +\ingroup qml-features +\contentspage QML Features +\previouspage QML Syntax +\nextpage {QML Basic Types}{Data Types} - \title QML Basic Elements +\title QML Basic Elements +QML's basic elements allow the easy inclusion of objects into the +scene. + +\section1 Basic Elements +This is a list of some of the elements readily available for users. +\list +\o \l {Item} +\o \l {Rectangle} +\o \l {Image} +\o \l {Text} +\o \l {TextInput} +\o \l {TextEdit} +\o \l {FocusScope} +\o \l {Component} +\o \l {MouseArea} +\endlist + +For a complete list of QML elements, please visit the \l {QML Elements} page. + +\section1 Properties and Qt Declarative Module + +When using QML elements, keep in mind that elements may possess properties that +other elements also possess. This is because QML and its underlying engine is +implemented in C++ using Qt. More importantly, the chain of property inheritance +is directly due to QML's use of the \l {Qt Declarative Module} and Qt's +\l {Meta-Object System}{meta-object} and \l {The Property System}{property} systems. For example, visual elements that have C++ implementation are sublcasses of +\l {QDeclarativeItem}. As a result, elements such as \l {Rectangle} and +\l {Text} elements inherit properties such as \c clip and \c smooth. + +\section1 Item Element + +Many QML elements inherit \l Item properties. \c Item possesses important properties +such as \c focus, \c children, and dimension properties such as \c width and +\c height. Although \c Item has physical properties, it is not a visual element. +Using \c Item as the top-level QML element (as the screen) will not produce a +visual result, use the \l {Rectangle} element instead. Use the \c Item to create +opacity effects, such as when creating an invisible container to hold other +components. + +\section1 Rectangle Element + +The \l Rectangle element is the basic visual element, for displaying different +types of items onto the screen. The \c Rectangle is customizable and utilizes +other elements such as \l Gradient and \l BorderImage for displaying advanced +customized graphics. + +\section1 Image Element + +To insert an image into a QML scene, merely declare an \l Image element. The +\c Image element can load images in formats supported by Qt. + +\section1 Text Elements + +The \l Text and \l TextEdit elements display formatted text onto the screen. +\c TextEdit features multi-line editing while the \l TextInput element is for +single line text input. + +\section1 Using Elements as the Top-Level Component + +For creating components (or displaying a simple scene), there are different +elements that could be used as the top-level component. To display a simple scene, +a \l Rectangle as the top-level component may suffice. \l Rectangle, +\l FocusScope, \l Component, \l {QML:QtObject} {QtObject}, \l Item, are some of +the commonly used elements as the top-level component. + +When importing components, the top-level component is important because the +top-level component's properties are the only properties exposed to the parent. + +For example, a \c Button component may be implemented using different elements as +its top-level component. When this component is loaded into another QML scene, +the component will retain the top-level component's properties. If a non-visual +component is the top-level component, the visual properties should be aliased to +the top-level to display the component properly. + +A component implemented using a \c Rectangle as the top-level component: +\snippet doc/src/snippets/declarative/focus/mywidget.qml document + +A component that uses a \c FocusScope as the top-level component: +\snippet doc/src/snippets/declarative/focus/myfocusscopewidget.qml document +Note that the visual properties need to be passed to the parent. The +\l {Keyboard Focus in QML}{focus} article provides more details about the +\c FocusScope element. + +For more information on how to build upon QML elements, see the +\l{Importing Reusable Components} document. */ diff --git a/doc/src/snippets/declarative/focus/focusscopewidget.qml b/doc/src/snippets/declarative/focus/focusscopewidget.qml index 48e5750..3e35ec5 100644 --- a/doc/src/snippets/declarative/focus/focusscopewidget.qml +++ b/doc/src/snippets/declarative/focus/focusscopewidget.qml @@ -37,6 +37,7 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +//! [document] import QtQuick 1.0 //! [focusscope window] @@ -59,3 +60,4 @@ Rectangle { } //! [focusscope window] +//! [document] diff --git a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml index 231ae3a..cec4462 100644 --- a/doc/src/snippets/declarative/focus/myfocusscopewidget.qml +++ b/doc/src/snippets/declarative/focus/myfocusscopewidget.qml @@ -37,12 +37,13 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +//! [document] import QtQuick 1.0 //! [widget in focusscope] FocusScope { - //FocusScope needs to bind to visual properties of the children + //FocusScope needs to bind to visual properties of the Rectangle property alias color: rectangle.color x: rectangle.x; y: rectangle.y width: rectangle.width; height: rectangle.height @@ -64,3 +65,4 @@ FocusScope { } } //! [widget in focusscope] +//! [document] diff --git a/doc/src/snippets/declarative/focus/mywidget.qml b/doc/src/snippets/declarative/focus/mywidget.qml index bea723d..e0b22a1 100644 --- a/doc/src/snippets/declarative/focus/mywidget.qml +++ b/doc/src/snippets/declarative/focus/mywidget.qml @@ -37,10 +37,10 @@ ** $QT_END_LICENSE$ ** ****************************************************************************/ +//! [document] import QtQuick 1.0 //! [mywidget] -//MyWidget code Rectangle { id: widget color: "lightsteelblue"; width: 175; height: 25; radius: 10; smooth: true -- cgit v0.12 From 362a61cd821144141324d99cdbaf1ddd858076d9 Mon Sep 17 00:00:00 2001 From: Peter Hartmann Date: Fri, 7 Jan 2011 16:17:13 +0100 Subject: fix build with QT_NO_BEARERMANAGEMENT start() is only defined when using bearer management; that method calls open(), which we just call directly if not using bearer. Reviewed-by: Markus Goetz Task-number: QTBUG-16477 --- src/network/access/qnetworkaccessdatabackend.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/network/access/qnetworkaccessdatabackend.cpp b/src/network/access/qnetworkaccessdatabackend.cpp index 74aebdb..d2db2f2 100644 --- a/src/network/access/qnetworkaccessdatabackend.cpp +++ b/src/network/access/qnetworkaccessdatabackend.cpp @@ -124,7 +124,11 @@ bool QNetworkAccessDataBackend::waitForUpstreamBytesWritten(int) bool QNetworkAccessDataBackend::processRequestSynchronously() { +#ifndef QT_NO_BEARERMANAGEMENT start(); +#else + open(); +#endif return true; } -- cgit v0.12 From 64852122ba71bbb297b4f1e440f6fabee16ca2fe Mon Sep 17 00:00:00 2001 From: Jiang Jiang Date: Fri, 7 Jan 2011 16:15:25 +0100 Subject: Fix crash in QTextBlock::next()/previous() We should check not just p but also n in next()/previous(), which is what isValid() does. Otherwise n == 0 will cause crash in QFragmentMap. Task-number: QTBUG-16279 Reviewed-by: Eskil --- src/gui/text/qtextobject.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/text/qtextobject.cpp b/src/gui/text/qtextobject.cpp index ea2ef2d..4b92379 100644 --- a/src/gui/text/qtextobject.cpp +++ b/src/gui/text/qtextobject.cpp @@ -1488,7 +1488,7 @@ QTextBlock::iterator QTextBlock::end() const */ QTextBlock QTextBlock::next() const { - if (!p) + if (!isValid()) return QTextBlock(); return QTextBlock(p, p->blockMap().next(n)); @@ -1504,7 +1504,7 @@ QTextBlock QTextBlock::next() const */ QTextBlock QTextBlock::previous() const { - if (!p) + if (!isValid()) return QTextBlock(); return QTextBlock(p, p->blockMap().previous(n)); -- cgit v0.12 From 55b0db65877ef5cfb6616f11988c990e2c207bd6 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 7 Jan 2011 16:42:16 +0100 Subject: Examples: Fix compilation with namespace. --- examples/webkit/imageanalyzer/imageanalyzer.h | 6 +++--- examples/webkit/imageanalyzer/mainwindow.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/webkit/imageanalyzer/imageanalyzer.h b/examples/webkit/imageanalyzer/imageanalyzer.h index 1bb25dc..265a0c5 100644 --- a/examples/webkit/imageanalyzer/imageanalyzer.h +++ b/examples/webkit/imageanalyzer/imageanalyzer.h @@ -44,9 +44,9 @@ #include #include -class QNetworkAccessManager; -class QNetworkReply; -class QNetworkDiskCache; +QT_FORWARD_DECLARE_CLASS(QNetworkAccessManager) +QT_FORWARD_DECLARE_CLASS(QNetworkReply) +QT_FORWARD_DECLARE_CLASS(QNetworkDiskCache) //! [ ImageAnalyzer - public interface ] class ImageAnalyzer : public QObject diff --git a/examples/webkit/imageanalyzer/mainwindow.h b/examples/webkit/imageanalyzer/mainwindow.h index 076e586..dac7c56 100644 --- a/examples/webkit/imageanalyzer/mainwindow.h +++ b/examples/webkit/imageanalyzer/mainwindow.h @@ -45,7 +45,7 @@ #include class ImageAnalyzer; -class QNetworkDiskCache; +QT_FORWARD_DECLARE_CLASS(QNetworkDiskCache) class MainWin : public QWebView { -- cgit v0.12 From eab9b566d8e7cd98dd69cbcfc39393192a9e6efa Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Fri, 7 Jan 2011 16:43:46 +0100 Subject: CLucene: Use the right delete operator. Task-number: QTBUG-15787 Task-number: QTBUG-15788 --- tools/assistant/lib/fulltextsearch/qindexwriter.cpp | 2 +- tools/assistant/lib/fulltextsearch/qsort.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/assistant/lib/fulltextsearch/qindexwriter.cpp b/tools/assistant/lib/fulltextsearch/qindexwriter.cpp index 357569c..ee1c2dc 100644 --- a/tools/assistant/lib/fulltextsearch/qindexwriter.cpp +++ b/tools/assistant/lib/fulltextsearch/qindexwriter.cpp @@ -88,7 +88,7 @@ void QCLuceneIndexWriter::addIndexes(const QList &readers) readerArray[i] = (readers.at(i))->d->reader; d->writer->addIndexes(readerArray); - delete readerArray; + delete [] readerArray; } void QCLuceneIndexWriter::addDocument(QCLuceneDocument &doc, diff --git a/tools/assistant/lib/fulltextsearch/qsort.cpp b/tools/assistant/lib/fulltextsearch/qsort.cpp index d9375bf..3263195 100644 --- a/tools/assistant/lib/fulltextsearch/qsort.cpp +++ b/tools/assistant/lib/fulltextsearch/qsort.cpp @@ -84,7 +84,7 @@ void QCLuceneSort::setSort(const QStringList &fieldNames) for (int i = 0; i < fieldNames.count(); ++i) delete [] nameArray[i]; - delete nameArray; + delete [] nameArray; } void QCLuceneSort::setSort(const QString &field, bool reverse) -- cgit v0.12 From 272a144ed06a4c11e058404f872609f0b43b4dd6 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Fri, 31 Dec 2010 11:44:38 +1000 Subject: tst_networkselftest: add checks for echo, daytime --- tests/auto/networkselftest/tst_networkselftest.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/auto/networkselftest/tst_networkselftest.cpp b/tests/auto/networkselftest/tst_networkselftest.cpp index 5e9c50e..90387d0 100644 --- a/tests/auto/networkselftest/tst_networkselftest.cpp +++ b/tests/auto/networkselftest/tst_networkselftest.cpp @@ -398,6 +398,8 @@ void tst_NetworkSelfTest::serverReachability() void tst_NetworkSelfTest::remotePortsOpen_data() { QTest::addColumn("portNumber"); + QTest::newRow("echo") << 7; + QTest::newRow("daytime") << 13; QTest::newRow("ftp") << 21; QTest::newRow("ssh") << 22; QTest::newRow("imap") << 143; -- cgit v0.12 From e6286c54bd66c2db06687127fea69fcc398ffbde Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Tue, 4 Jan 2011 14:30:19 +1000 Subject: Remove garbage empty test. --- tests/auto/gui.pro | 1 - tests/auto/qtwidgets/.gitignore | 1 - tests/auto/qtwidgets/advanced.ui | 319 --------- tests/auto/qtwidgets/icons/big.png | Bin 1323 -> 0 bytes tests/auto/qtwidgets/icons/folder.png | Bin 4069 -> 0 bytes tests/auto/qtwidgets/icons/icon.bmp | Bin 246 -> 0 bytes tests/auto/qtwidgets/icons/icon.png | Bin 344 -> 0 bytes tests/auto/qtwidgets/mainwindow.cpp | 314 --------- tests/auto/qtwidgets/mainwindow.h | 80 --- tests/auto/qtwidgets/qtstyles.qrc | 8 - tests/auto/qtwidgets/qtwidgets.pro | 10 - tests/auto/qtwidgets/standard.ui | 1207 -------------------------------- tests/auto/qtwidgets/system.ui | 658 ----------------- tests/auto/qtwidgets/tst_qtwidgets.cpp | 112 --- 14 files changed, 2710 deletions(-) delete mode 100644 tests/auto/qtwidgets/.gitignore delete mode 100644 tests/auto/qtwidgets/advanced.ui delete mode 100644 tests/auto/qtwidgets/icons/big.png delete mode 100644 tests/auto/qtwidgets/icons/folder.png delete mode 100644 tests/auto/qtwidgets/icons/icon.bmp delete mode 100644 tests/auto/qtwidgets/icons/icon.png delete mode 100644 tests/auto/qtwidgets/mainwindow.cpp delete mode 100644 tests/auto/qtwidgets/mainwindow.h delete mode 100644 tests/auto/qtwidgets/qtstyles.qrc delete mode 100644 tests/auto/qtwidgets/qtwidgets.pro delete mode 100644 tests/auto/qtwidgets/standard.ui delete mode 100644 tests/auto/qtwidgets/system.ui delete mode 100644 tests/auto/qtwidgets/tst_qtwidgets.cpp diff --git a/tests/auto/gui.pro b/tests/auto/gui.pro index 2d9ea93..802e74a 100644 --- a/tests/auto/gui.pro +++ b/tests/auto/gui.pro @@ -197,7 +197,6 @@ SUBDIRS=\ qtreeview \ qtreewidget \ qtreewidgetitemiterator \ - qtwidgets \ qudpsocket \ qundogroup \ qundostack \ diff --git a/tests/auto/qtwidgets/.gitignore b/tests/auto/qtwidgets/.gitignore deleted file mode 100644 index d8e55c3..0000000 --- a/tests/auto/qtwidgets/.gitignore +++ /dev/null @@ -1 +0,0 @@ -tst_qtwidgets diff --git a/tests/auto/qtwidgets/advanced.ui b/tests/auto/qtwidgets/advanced.ui deleted file mode 100644 index ce27374..0000000 --- a/tests/auto/qtwidgets/advanced.ui +++ /dev/null @@ -1,319 +0,0 @@ - - - - - Advanced - - - Advanced - - - - 0 - 0 - 400 - 300 - - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - pushButton - - - - 1 - 1 - 80 - 23 - - - - - - - - - - - pushButton_2 - - - - 87 - 1 - 80 - 23 - - - - Text - - - - - - - checkBox - - - - 173 - 6 - 23 - 13 - - - - - - - - - - - - - - radioButton - - - - 202 - 6 - 22 - 12 - - - - - - - - - - - - - - checkBox_2 - - - - 230 - 3 - 44 - 18 - - - - Text - - - - - - - radioButton_2 - - - - 280 - 3 - 43 - 18 - - - - Text - - - - - - - - - - - - 1 - - - 6 - - - - - listWidget - - - - 1 - 1 - 186 - 91 - - - - - - - - listWidget_3 - - - - 193 - 96 - 188 - 60 - - - - - - - - treeWidget_2 - - - - 1 - 96 - 186 - 60 - - - - - - - - - - - 1 - - - 6 - - - - - listWidget_2 - - - - 1 - 1 - 186 - 43 - - - - - - - - treeWidget - - - - 1 - 48 - 186 - 43 - - - - - - - - - - - - tabWidget - - - - 9 - 201 - 382 - 90 - - - - - 0 - 90 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 380 - 63 - - - - Tab Page 1 - - - - - widget - - - - 0 - 0 - 459 - 66 - - - - Tab Page 2 - - - - - - - - - diff --git a/tests/auto/qtwidgets/icons/big.png b/tests/auto/qtwidgets/icons/big.png deleted file mode 100644 index 6032804..0000000 Binary files a/tests/auto/qtwidgets/icons/big.png and /dev/null differ diff --git a/tests/auto/qtwidgets/icons/folder.png b/tests/auto/qtwidgets/icons/folder.png deleted file mode 100644 index 981a25d..0000000 Binary files a/tests/auto/qtwidgets/icons/folder.png and /dev/null differ diff --git a/tests/auto/qtwidgets/icons/icon.bmp b/tests/auto/qtwidgets/icons/icon.bmp deleted file mode 100644 index 196de6a..0000000 Binary files a/tests/auto/qtwidgets/icons/icon.bmp and /dev/null differ diff --git a/tests/auto/qtwidgets/icons/icon.png b/tests/auto/qtwidgets/icons/icon.png deleted file mode 100644 index 8f9c562..0000000 Binary files a/tests/auto/qtwidgets/icons/icon.png and /dev/null differ diff --git a/tests/auto/qtwidgets/mainwindow.cpp b/tests/auto/qtwidgets/mainwindow.cpp deleted file mode 100644 index 341c416..0000000 --- a/tests/auto/qtwidgets/mainwindow.cpp +++ /dev/null @@ -1,314 +0,0 @@ -/**************************************************************************** -** -** 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 test suite 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 "mainwindow.h" -#include -#include - -StyleWidget::StyleWidget(QWidget *parent, Qt::WFlags f) - : QWidget(parent, f) -{ - QHBoxLayout *hbox = new QHBoxLayout(this); - QSplitter *spl = new QSplitter(this); - - // standard widgets - QWidget *leftWidget = new QWidget(this); - m_staWidget.setupUi(leftWidget); - - // advanced/system widgets - QGroupBox *rightWidget = new QGroupBox("Advanced", this); - QVBoxLayout *vbox = new QVBoxLayout(rightWidget); - QWidget *adv = new QWidget(rightWidget); - m_advWidget.setupUi(adv); - QWidget *sys = new QWidget(rightWidget); - m_sysWidget.setupUi(sys); - vbox->addWidget(adv); - vbox->addWidget(sys); - - spl->addWidget(leftWidget); - spl->addWidget(rightWidget); - - hbox->setMargin(4); - hbox->addWidget(spl); - - m_small1 = QIcon(":/icons/icon.bmp"); - m_small2 = QIcon(":/icons/icon.png"); - m_big = QIcon(":/icons/big.png"); - - addComboBoxItems(); - addTreeItems(); - addTreeListItems(); - addListItems(); - addTextEdit(); - setupOtherWidgets(); - setupButtons(); - - foreach(QWidget *w, qFindChildren(parentWidget())) - w->setWhatsThis(w->metaObject()->className()); -} - -StyleWidget::~StyleWidget() -{ - -} - -void StyleWidget::addTextEdit() -{ - m_staWidget.textEdit->setPlainText( - "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text"); - m_staWidget.textEdit_2->setPlainText( - "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text"); - m_staWidget.textEdit_3->setPlainText( - "Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text, Some Text" \ - "Some Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\nSome Text\n"); -} - -void StyleWidget::addComboBoxItems() -{ - m_staWidget.comboBox->addItem("Item 1"); - m_staWidget.comboBox->addItem("Item 2"); - m_staWidget.comboBox->addItem("Item 3"); - m_staWidget.comboBox->addItem("Item 4"); - m_staWidget.comboBox->addItem("Item 5"); -} - -void StyleWidget::addListItems() -{ - m_staWidget.listWidget->addItem("Item 1"); - m_staWidget.listWidget->addItem("Item 2"); - m_staWidget.listWidget->addItem("Item 3"); - m_staWidget.listWidget->addItem("Item 4"); - m_staWidget.listWidget->addItem("Item 5"); - - QListWidgetItem *tmp = new QListWidgetItem("Item 1", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 2", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 3", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 4", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - tmp = new QListWidgetItem("Item 5", m_staWidget.listWidget_2); - tmp->setCheckState(Qt::Checked); - - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_3); - tmp->setCheckState(Qt::Checked); - tmp->setIcon(m_small1); - - m_advWidget.listWidget->setViewMode(QListView::IconMode); - QIcon folder(":/icons/folder.png"); - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget); - tmp->setIcon(folder); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget); - tmp->setIcon(folder); - - tmp = new QListWidgetItem("Item 1", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 2", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 3", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 4", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); - tmp = new QListWidgetItem("Item 5", m_advWidget.listWidget_2); - tmp->setIcon(m_small1); -} - -void StyleWidget::setupOtherWidgets() -{ - m_sysWidget.tableWidget->setRowCount(100); - m_sysWidget.tableWidget->setColumnCount(100); -} - -void StyleWidget::addTreeItems() -{ - //standard tree - m_staWidget.treeWidget_2->setColumnCount(1); - m_staWidget.treeWidget_2->header()->hide(); - - QTreeWidgetItem *tmp; - QTreeWidgetItem *subtmp; - QTreeWidgetItem *root1 = new QTreeWidgetItem(m_staWidget.treeWidget_2); - root1->setText(0, "Root 1"); - QTreeWidgetItem *root2 = new QTreeWidgetItem(m_staWidget.treeWidget_2); - root2->setText(0, "Root 2"); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - } - } - - // standard checked tree - m_staWidget.treeWidget_4->setColumnCount(1); - m_staWidget.treeWidget_4->header()->hide(); - - root1 = new QTreeWidgetItem(m_staWidget.treeWidget_4); - root1->setText(0, "Root 1"); - root1->setCheckState(0, Qt::Checked); - root2 = new QTreeWidgetItem(m_staWidget.treeWidget_4); - root2->setText(0, "Root 2"); - root2->setCheckState(0, Qt::Checked); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - tmp->setCheckState(0, Qt::Checked); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - subtmp->setCheckState(0, Qt::Checked); - } - } - - // advanced (images) tree - m_advWidget.treeWidget_2->setColumnCount(1); - m_advWidget.treeWidget_2->header()->hide(); - - root1 = new QTreeWidgetItem(m_advWidget.treeWidget_2); - root1->setText(0, "Root 1"); - root1->setIcon(0, m_small1); - root2 = new QTreeWidgetItem(m_advWidget.treeWidget_2); - root2->setText(0, "Root 2"); - root2->setIcon(0, m_small1); - - for (int i=1; i<=10; ++i) - { - tmp = new QTreeWidgetItem(root1); - tmp->setText(0, QString("Item %1").arg(i)); - tmp->setIcon(0, m_small2); - for (int j=1; j<=5; ++j) - { - subtmp = new QTreeWidgetItem(tmp); - subtmp->setText(0, QString("Sub Item %1").arg(j)); - tmp->setIcon(0, m_small1); - } - } - -} - -void StyleWidget::addTreeListItems() -{ - //standard list - QTreeWidgetItem *tmp; - m_staWidget.treeWidget->setColumnCount(3); - m_staWidget.treeWidget->headerItem()->setText(0, "Col1"); - m_staWidget.treeWidget->headerItem()->setText(1, "Col2"); - m_staWidget.treeWidget->headerItem()->setText(2, "Col3"); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_staWidget.treeWidget); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setText(1, QString("Item%11").arg(i)); - tmp->setText(2, QString("Item%12").arg(i)); - } - - //standard checked list - m_staWidget.treeWidget_3->setColumnCount(3); - m_staWidget.treeWidget_3->headerItem()->setText(0, "Col1"); - m_staWidget.treeWidget_3->headerItem()->setText(1, "Col2"); - m_staWidget.treeWidget_3->headerItem()->setText(2, "Col3"); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_staWidget.treeWidget_3); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setCheckState(0, Qt::Checked); - tmp->setText(1, QString("Item%11").arg(i)); - tmp->setText(2, QString("Item%12").arg(i)); - } - - //with images - m_advWidget.treeWidget->setColumnCount(2); - m_advWidget.treeWidget->headerItem()->setText(0, "Col1"); - m_advWidget.treeWidget->headerItem()->setIcon(0, m_small2); - m_advWidget.treeWidget->headerItem()->setText(1, "Col2"); - m_advWidget.treeWidget->headerItem()->setIcon(1, m_small2); - - for (int i=1; i<10; ++i) - { - tmp = new QTreeWidgetItem(m_advWidget.treeWidget); - tmp->setText(0, QString("Item%1").arg(i)); - tmp->setIcon(0, m_small1); - tmp->setText(1, QString("Item%11").arg(i)); - } -} - -void StyleWidget::setupButtons() -{ - m_advWidget.pushButton->setIcon(m_small1); - m_advWidget.pushButton_2->setIcon(m_small1); - m_advWidget.checkBox->setIcon(m_small2); - m_advWidget.checkBox_2->setIcon(m_small2); - m_advWidget.radioButton->setIcon(m_small2); - m_advWidget.radioButton_2->setIcon(m_small2); - - // tab page images - m_advWidget.tabWidget->setTabIcon(0, m_small2); - m_advWidget.tabWidget->setTabIcon(1, m_small2); -} diff --git a/tests/auto/qtwidgets/mainwindow.h b/tests/auto/qtwidgets/mainwindow.h deleted file mode 100644 index 8a4521a..0000000 --- a/tests/auto/qtwidgets/mainwindow.h +++ /dev/null @@ -1,80 +0,0 @@ -/**************************************************************************** -** -** 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 test suite 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 MAINWINDOW_H -#define MAINWINDOW_H - -#include -#include -#include "ui_standard.h" -#include "ui_advanced.h" -#include "ui_system.h" - -class StyleWidget : public QWidget -{ - Q_OBJECT - -public: - StyleWidget(QWidget *parent = 0, Qt::WFlags f = 0); - ~StyleWidget(); - -public slots: - void onWhatsThis() { QWhatsThis::enterWhatsThisMode(); } - -private: - void addComboBoxItems(); - void addListItems(); - void addTextEdit(); - void setupOtherWidgets(); - void setupButtons(); - void addTreeItems(); - void addTreeListItems(); - - Ui::Standard m_staWidget; - Ui::Advanced m_advWidget; - Ui::System m_sysWidget; - - QIcon m_small1; - QIcon m_small2; - QIcon m_big; -}; - -#endif //MAINWINDOW_H - diff --git a/tests/auto/qtwidgets/qtstyles.qrc b/tests/auto/qtwidgets/qtstyles.qrc deleted file mode 100644 index 772891d..0000000 --- a/tests/auto/qtwidgets/qtstyles.qrc +++ /dev/null @@ -1,8 +0,0 @@ - - - ./icons/icon.png - ./icons/icon.bmp - ./icons/big.png - ./icons/folder.png - - diff --git a/tests/auto/qtwidgets/qtwidgets.pro b/tests/auto/qtwidgets/qtwidgets.pro deleted file mode 100644 index 9c33cd1..0000000 --- a/tests/auto/qtwidgets/qtwidgets.pro +++ /dev/null @@ -1,10 +0,0 @@ -load(qttest_p4) -symbian:TARGET.EPOCHEAPSIZE=0x200000 0xa00000 - -SOURCES += tst_qtwidgets.cpp mainwindow.cpp -HEADERS += mainwindow.h -QT += network -RESOURCES = qtstyles.qrc -FORMS += advanced.ui system.ui standard.ui - - diff --git a/tests/auto/qtwidgets/standard.ui b/tests/auto/qtwidgets/standard.ui deleted file mode 100644 index 9764a66..0000000 --- a/tests/auto/qtwidgets/standard.ui +++ /dev/null @@ -1,1207 +0,0 @@ - - - - - Standard - - - Standard - - - - 0 - 0 - 400 - 300 - - - - - - - - 0 - - - 0 - - - - - groupBox - - - - 0 - 0 - 400 - 300 - - - - Standard - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - - - - 1 - - - 6 - - - - - checkBox - - - - 1 - 1 - 114 - 3 - - - - Enabled &CheckBox - - - - - - - checkBox_2 - - - false - - - - 121 - 1 - 116 - 3 - - - - Disabled Check&Box - - - - - - - - - - - 243 - 1 - 80 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - comboBox - - - - 1 - 1 - 41 - 3 - - - - - - - - comboBox_2 - - - - 48 - 1 - 41 - 3 - - - - - - - - comboBox_3 - - - false - - - - 95 - 1 - 41 - 3 - - - - - - - - - - - - - 1 - - - 6 - - - - - pushButton - - - - 1 - 1 - 80 - 3 - - - - &Enabled - - - - - - - pushButton_2 - - - false - - - - 87 - 1 - 80 - 3 - - - - Di&sabled - - - - - - - - - - - 173 - 1 - 150 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - label - - - - 1 - 1 - 99 - 3 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Label with some text. - - - Qt::AutoText - - - - - - - label_2 - - - false - - - - 106 - 1 - 139 - 3 - - - - QFrame::NoFrame - - - QFrame::Plain - - - Disabled label with some text. - - - Qt::AutoText - - - - - - - - - - - 251 - 1 - 72 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - lineEdit - - - - 1 - 1 - 135 - 3 - - - - Enabled - - - QLineEdit::Normal - - - - - - - lineEdit_2 - - - false - - - - 142 - 1 - 134 - 3 - - - - Disabled - - - QLineEdit::Normal - - - - - - - spinBox - - - - 282 - 1 - 41 - 3 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - - - - - - 1 - - - 6 - - - - - radioButton - - - - 1 - 1 - 123 - 3 - - - - Enabled RadioButton - - - - - - - radioButton_2 - - - false - - - - 130 - 1 - 125 - 3 - - - - Disabled RadioButton - - - - - - - - - - - 261 - 1 - 62 - 3 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - horizontalScrollBar - - - - 1 - 1 - 90 - 3 - - - - - 0 - 0 - 0 - 0 - - - - - 90 - 0 - - - - Qt::Horizontal - - - - - - - horizontalScrollBar_2 - - - - 97 - 1 - 30 - 3 - - - - Qt::Horizontal - - - - - - - - - - - verticalScrollBar - - - - 333 - 1 - 17 - 37 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - - - - - slider - - - - 356 - 1 - 21 - 37 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - QSlider::TicksBelow - - - 0 - - - - - - - - - - - - 1 - - - 6 - - - - - slider_2 - - - - 1 - 6 - 90 - 16 - - - - Qt::Horizontal - - - QSlider::NoTicks - - - - - - - slider_3 - - - - 97 - 3 - 89 - 21 - - - - Qt::Horizontal - - - QSlider::TicksBelow - - - - - - - slider_4 - - - - 192 - 3 - 90 - 21 - - - - Qt::Horizontal - - - QSlider::TicksAbove - - - - - - - slider_5 - - - - 288 - 1 - 89 - 26 - - - - Qt::Horizontal - - - QSlider::TicksBothSides - - - - - - - - - - - - 1 - - - 6 - - - - - textEdit - - - - 1 - 1 - 89 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOff - - - - - - - textEdit_2 - - - - 96 - 1 - 90 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOff - - - Qt::ScrollBarAlwaysOn - - - - - - - textEdit_3 - - - - 192 - 1 - 89 - 100 - - - - - 0 - 100 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAlwaysOn - - - Qt::ScrollBarAlwaysOn - - - - - - - textEdit_4 - - - - 287 - 1 - 90 - 37 - - - - QFrame::StyledPanel - - - QFrame::Sunken - - - Qt::ScrollBarAsNeeded - - - Qt::ScrollBarAsNeeded - - - - - - - - - groupBox_2 - - - - 11 - 132 - 378 - 39 - - - - GroupBox - - - - - - - 9 - - - 6 - - - - - progressBar - - - - 11 - 20 - 356 - 8 - - - - 50 - - - false - - - - - - - - - - - - - 1 - - - 6 - - - - - listWidget - - - - 1 - 1 - 107 - 37 - - - - - - - - listWidget_2 - - - - 114 - 1 - 107 - 37 - - - - - - - - tabWidget - - - - 227 - 1 - 150 - 37 - - - - - 150 - 0 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - - - - - 0 - 0 - 148 - 10 - - - - Tab Page 1 - - - - - - - - - 0 - 0 - 116 - 56 - - - - Tab Page 2 - - - - - widget - - - - 0 - 0 - 116 - 56 - - - - Tab Page 3 - - - - - widget - - - - 0 - 0 - 146 - 36 - - - - Tab Page 4 - - - - - - - - - - tabWidget_2 - - - - 11 - 214 - 378 - 90 - - - - - 0 - 90 - - - - QTabWidget::North - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 376 - 63 - - - - Tab Page 1 - - - - - widget - - - - 0 - 0 - 424 - 66 - - - - Tab Page 2 - - - - - - - - - - - 1 - - - 6 - - - - - treeWidget_2 - - - - 192 - 1 - 185 - 18 - - - - - - - - treeWidget_3 - - - - 1 - 20 - 185 - 18 - - - - - - - - treeWidget - - - - 1 - 1 - 185 - 18 - - - - - - - - treeWidget_4 - - - - 192 - 20 - 185 - 18 - - - - - - - - - - - - - - diff --git a/tests/auto/qtwidgets/system.ui b/tests/auto/qtwidgets/system.ui deleted file mode 100644 index a641e0e..0000000 --- a/tests/auto/qtwidgets/system.ui +++ /dev/null @@ -1,658 +0,0 @@ - - - - - System - - - System - - - - 0 - 0 - 400 - 604 - - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - toolButton - - - - 340 - 138 - 15 - 19 - - - - ... - - - - - - - horizontalLine - - - - 1 - 146 - 333 - 3 - - - - QFrame::HLine - - - QFrame::Sunken - - - - - - - verticalLine - - - - 361 - 1 - 3 - 131 - - - - QFrame::VLine - - - QFrame::Sunken - - - - - - - - - - 1 - - - 6 - - - - - dateTimeEdit_2 - - - false - - - - 1 - 108 - 113 - 20 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - dateTimeEdit - - - - 1 - 41 - 113 - 20 - - - - QAbstractSpinBox::UpDownArrows - - - - - - - dial - - - - 120 - 1 - 114 - 100 - - - - Qt::Horizontal - - - - - - - lcdNumber - - - - 120 - 107 - 114 - 23 - - - - QFrame::Box - - - QFrame::Raised - - - QLCDNumber::Dec - - - QLCDNumber::Outline - - - - - - - lcdNumber_2 - - - false - - - - 240 - 107 - 113 - 23 - - - - QFrame::Box - - - QFrame::Raised - - - QLCDNumber::Dec - - - QLCDNumber::Outline - - - - - - - dial_2 - - - false - - - - 240 - 1 - 113 - 100 - - - - Qt::Horizontal - - - - - - - - - - - - - - 1 - - - 6 - - - - - tableWidget - - - - 1 - 1 - 256 - 193 - - - - - - - - toolBox - - - - 263 - 1 - 118 - 193 - - - - QFrame::Box - - - QFrame::Plain - - - 0 - - - - widget - - - - 0 - 0 - 98 - 119 - - - - Tool Page 1 - - - - - widget - - - - 0 - 0 - 115 - 56 - - - - Tool Page 2 - - - - - - - - - - tabWidget - - - - 9 - 375 - 382 - 220 - - - - QTabWidget::Rounded - - - - widget - - - - 0 - 0 - 378 - 196 - - - - Tab Page 1 - - - - - - - 9 - - - 6 - - - - - - - - 1 - - - 6 - - - - - comboBox_3 - - - - 1 - 1 - 332 - 20 - - - - - - - - - - - 1 - - - 6 - - - - - pushButton_5 - - - - 1 - 1 - 80 - 23 - - - - &Enabled - - - - - - - pushButton_6 - - - - 87 - 1 - 80 - 23 - - - - Di&sabled - - - - - - - - - - - 173 - 1 - 158 - 23 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - - 1 - - - 6 - - - - - radioButton_3 - - - - 1 - 2 - 123 - 18 - - - - Enabled RadioButton - - - - - - - radioButton_4 - - - - 130 - 2 - 125 - 18 - - - - Disabled RadioButton - - - - - - - - - - - 261 - 1 - 70 - 20 - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - progressBar - - - - 1 - 86 - 332 - 22 - - - - 24 - - - - - - - horizontalScrollBar - - - - 1 - 114 - 332 - 17 - - - - Qt::Horizontal - - - - - - - - - verticalScrollBar - - - - 349 - 9 - 17 - 132 - - - - - 0 - 1 - 0 - 0 - - - - Qt::Vertical - - - - - - - - - - - 9 - 147 - 334 - 40 - - - - Qt::Vertical - - - - 20 - 40 - - - - - - - - - widget - - - - 0 - 0 - 377 - 187 - - - - Tab Page 2 - - - - - - - - - diff --git a/tests/auto/qtwidgets/tst_qtwidgets.cpp b/tests/auto/qtwidgets/tst_qtwidgets.cpp deleted file mode 100644 index 501402b..0000000 --- a/tests/auto/qtwidgets/tst_qtwidgets.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/**************************************************************************** -** -** 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 test suite 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 -#include - -#include - - -#include "mainwindow.h" -#include "../network-settings.h" - -class tst_QtWidgets: public QObject -{ - Q_OBJECT - -public: - tst_QtWidgets(); - virtual ~tst_QtWidgets(); - -private slots: - void snapshot(); -}; - -tst_QtWidgets::tst_QtWidgets() -{ - Q_SET_DEFAULT_IAP -} - -tst_QtWidgets::~tst_QtWidgets() -{ -} - -void tst_QtWidgets::snapshot() -{ - QSKIP("Jesper will fix this test when he has time.", SkipAll); -#if 0 - StyleWidget widget(0, Qt::X11BypassWindowManagerHint); - widget.show(); - - QPixmap pix = QPixmap::grabWidget(&widget); - - QVERIFY(!pix.isNull()); - - QBuffer buf; - pix.save(&buf, "PNG"); - QVERIFY(buf.size() > 0); - - QString filename = "qtwidgets_" + QHostInfo::localHostName() + "_" + QDateTime::currentDateTime().toString("yyyy.MM.dd_hh.mm.ss") + ".png"; - - QFtp ftp; - ftp.connectToHost("qt-test-server.qt-test-net"); - ftp.login("ftptest", "password"); - ftp.cd("qtest/pics"); - ftp.put(buf.data(), filename, QFtp::Binary); - ftp.close(); - - int i = 0; - while (i < 100 && ftp.hasPendingCommands()) { - QCoreApplication::instance()->processEvents(); - QTest::qWait(250); - ++i; - } - QVERIFY2(ftp.error() == QFtp::NoError, ftp.errorString().toLocal8Bit().constData()); - QVERIFY(!ftp.hasPendingCommands()); -#endif -} - - - -QTEST_MAIN(tst_QtWidgets) - -#include "tst_qtwidgets.moc" -- cgit v0.12 From 026a24855ec16626ab101007719a836f5a4e3c47 Mon Sep 17 00:00:00 2001 From: Rohan McGovern Date: Thu, 6 Jan 2011 13:39:14 +1000 Subject: network tests: make IMAP, FTP testdata more flexible. Move all hardcoded IMAP/FTP fixtures into network-settings.h. Make it work with new and old network test server. Reviewed-by: Markus Goetz Task: QTBUG-15114 --- tests/auto/network-settings.h | 79 ++++++++++++++++---- .../qhttpsocketengine/tst_qhttpsocketengine.cpp | 10 +-- .../tst_qnativesocketengine.cpp | 2 +- .../tst_qsocks5socketengine.cpp | 12 +-- tests/auto/qsslsocket/tst_qsslsocket.cpp | 3 +- tests/auto/qtcpsocket/tst_qtcpsocket.cpp | 87 ++++++++++++++++------ 6 files changed, 142 insertions(+), 51 deletions(-) diff --git a/tests/auto/network-settings.h b/tests/auto/network-settings.h index 6730946..0cb8e3a 100644 --- a/tests/auto/network-settings.h +++ b/tests/auto/network-settings.h @@ -64,6 +64,7 @@ //#define SYMBIAN_WINSOCK_CONNECTIVITY #endif // Q_CC_NOKIAX86 +// FIXME: any reason we do this for symbian only, and not other platforms? class QtNetworkSettingsRecord { public: QtNetworkSettingsRecord() { } @@ -128,7 +129,6 @@ public: static QString wildcardServerName() { return "qt-test-server.wildcard.dev." + serverDomainName(); - //return "qttest.wildcard.dev." + serverDomainName(); } #ifdef QT_NETWORK_LIB @@ -149,8 +149,10 @@ public: } #endif - static QByteArray expectedReplyIMAP() + static bool compareReplyIMAP(QByteArray const& actual) { + QList expected; + #ifdef Q_OS_SYMBIAN loadTestSettings(); @@ -160,17 +162,35 @@ public: imapExpectedReply = entry->recordValue().toAscii(); imapExpectedReply.append('\r').append('\n'); } - return imapExpectedReply.data(); + expected << imapExpectedReply.data(); } #endif - QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ); - expected = expected.append(QtNetworkSettings::serverName().toAscii()); - expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); - return expected; + + // Mandriva; old test server + expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] " ) + .append(QtNetworkSettings::serverName().toAscii()) + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + + // Ubuntu 10.04; new test server + expected << QByteArray( "* OK " ) + .append(QtNetworkSettings::serverLocalName().toAscii()) + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + + // Feel free to add more as needed + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; } - static QByteArray expectedReplySSL() + static bool compareReplyIMAPSSL(QByteArray const& actual) { + QList expected; + #ifdef Q_OS_SYMBIAN loadTestSettings(); @@ -180,19 +200,46 @@ public: imapExpectedReplySsl = entry->recordValue().toAscii(); imapExpectedReplySsl.append('\r').append('\n'); } - return imapExpectedReplySsl.data(); + expected << imapExpectedReplySsl.data(); } #endif - QByteArray expected( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ); - expected = expected.append(QtNetworkSettings::serverName().toAscii()); - expected = expected.append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); - return expected; + // Mandriva; old test server + expected << QByteArray( "* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID AUTH=PLAIN SASL-IR] " ) + .append(QtNetworkSettings::serverName().toAscii()) + .append(" Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); + + // Ubuntu 10.04; new test server + expected << QByteArray( "* OK " ) + .append(QtNetworkSettings::serverLocalName().toAscii()) + .append(" Cyrus IMAP4 v2.2.13-Debian-2.2.13-19 server ready\r\n"); + + // Feel free to add more as needed + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; } - static QByteArray expectedReplyFtp() + static bool compareReplyFtp(QByteArray const& actual) { - QByteArray expected( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" ); - return expected; + QList expected; + + // A few different vsFTPd versions. + // Feel free to add more as needed + expected << QByteArray( "220 (vsFTPd 2.0.5)\r\n221 Goodbye.\r\n" ); + expected << QByteArray( "220 (vsFTPd 2.2.2)\r\n221 Goodbye.\r\n" ); + + Q_FOREACH (QByteArray const& ba, expected) { + if (ba == actual) { + return true; + } + } + + return false; } #ifdef Q_OS_SYMBIAN diff --git a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp index f86ba63..972185b 100644 --- a/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp +++ b/tests/auto/qhttpsocketengine/tst_qhttpsocketengine.cpp @@ -325,7 +325,7 @@ void tst_QHttpSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message @@ -455,7 +455,7 @@ void tst_QHttpSocketEngine::tcpSocketBlockingTest() // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), qPrintable(s)); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -530,8 +530,8 @@ void tst_QHttpSocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); - QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - QtNetworkSettings::expectedReplyIMAP().constData()); + QByteArray data = tcpSocketNonBlocking_data.at(0).toLatin1(); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(data), data.constData()); tcpSocketNonBlocking_data.clear(); @@ -713,7 +713,7 @@ void tst_QHttpSocketEngine::passwordAuth() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message diff --git a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp index 2b0b632..782c2f0 100644 --- a/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp +++ b/tests/auto/qnativesocketengine/tst_qnativesocketengine.cpp @@ -173,7 +173,7 @@ void tst_QNativeSocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message QByteArray array2 = "ZZZ LOGOUT\r\n"; diff --git a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp index 8f0cbc3..9da7197 100644 --- a/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp +++ b/tests/auto/qsocks5socketengine/tst_qsocks5socketengine.cpp @@ -336,7 +336,7 @@ void tst_QSocks5SocketEngine::simpleConnectToIMAP() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -596,7 +596,7 @@ void tst_QSocks5SocketEngine::tcpSocketBlockingTest() // Read greeting QVERIFY(socket.waitForReadyRead(5000)); QString s = socket.readLine(); - QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), s.toLatin1().constData()); // Write NOOP QCOMPARE((int) socket.write("1 NOOP\r\n", 8), 8); @@ -671,8 +671,8 @@ void tst_QSocks5SocketEngine::tcpSocketNonBlockingTest() // Read greeting QVERIFY(!tcpSocketNonBlocking_data.isEmpty()); - QCOMPARE(tcpSocketNonBlocking_data.at(0).toLatin1().constData(), - QtNetworkSettings::expectedReplyIMAP().constData()); + QByteArray data = tcpSocketNonBlocking_data.at(0).toLatin1(); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(data), data.constData()); tcpSocketNonBlocking_data.clear(); @@ -859,7 +859,7 @@ void tst_QSocks5SocketEngine::passwordAuth() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; @@ -927,7 +927,7 @@ void tst_QSocks5SocketEngine::passwordAuth2() QVERIFY(socketDevice.read(array.data(), array.size()) == available); // Check that the greeting is what we expect it to be - QCOMPARE(array.constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(array), array.constData()); // Write a logout message QByteArray array2 = "XXXX LOGOUT\r\n"; diff --git a/tests/auto/qsslsocket/tst_qsslsocket.cpp b/tests/auto/qsslsocket/tst_qsslsocket.cpp index d6a7a01..3223006 100644 --- a/tests/auto/qsslsocket/tst_qsslsocket.cpp +++ b/tests/auto/qsslsocket/tst_qsslsocket.cpp @@ -502,8 +502,9 @@ void tst_QSslSocket::simpleConnectWithIgnore() if (!socket.canReadLine()) enterLoop(10); - QCOMPARE(socket.readAll(), QtNetworkSettings::expectedReplySSL()); + QByteArray data = socket.readAll(); socket.disconnectFromHost(); + QVERIFY2(QtNetworkSettings::compareReplyIMAPSSL(data), data.constData()); } void tst_QSslSocket::sslErrors_data() diff --git a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp index 2dbe5b7..86069cd 100644 --- a/tests/auto/qtcpsocket/tst_qtcpsocket.cpp +++ b/tests/auto/qtcpsocket/tst_qtcpsocket.cpp @@ -95,6 +95,7 @@ #include "private/qhostinfo_p.h" #include "../network-settings.h" +#include "../../shared/util.h" Q_DECLARE_METATYPE(QAbstractSocket::SocketError) Q_DECLARE_METATYPE(QAbstractSocket::SocketState) @@ -222,6 +223,8 @@ protected slots: void proxyAuthenticationRequired(const QNetworkProxy &, QAuthenticator *auth); private: + QByteArray expectedReplyIMAP(); + void fetchExpectedReplyIMAP(); QTcpSocket *newSocket() const; QTcpSocket *nonBlockingIMAP_socket; QStringList nonBlockingIMAP_data; @@ -233,6 +236,8 @@ private: bool readingBody; QTime timer; + QByteArray expectedReplyIMAP_cached; + mutable int proxyAuthCalled; bool gotClosedSignal; @@ -658,8 +663,6 @@ void tst_QTcpSocket::nonBlockingIMAP() // Read greeting QVERIFY(!nonBlockingIMAP_data.isEmpty()); -// QCOMPARE(nonBlockingIMAP_data.at(0).toLatin1().constData(), -// "* OK fluke Cyrus IMAP4 v2.2.12 server ready\r\n"); QCOMPARE(nonBlockingIMAP_data.at(0).left(4).toLatin1().constData(), "* OK"); nonBlockingIMAP_data.clear(); @@ -787,6 +790,36 @@ void tst_QTcpSocket::delayedClose() delete socket; } + +//---------------------------------------------------------------------------------- + +QByteArray tst_QTcpSocket::expectedReplyIMAP() +{ + if (expectedReplyIMAP_cached.isEmpty()) { + fetchExpectedReplyIMAP(); + } + + return expectedReplyIMAP_cached; +} + +// Figure out how the current IMAP server responds +void tst_QTcpSocket::fetchExpectedReplyIMAP() +{ + QTcpSocket *socket = newSocket(); + socket->connectToHost(QtNetworkSettings::serverName(), 143); + QVERIFY2(socket->waitForConnected(10000), qPrintable(socket->errorString())); + QVERIFY2(socket->state() == QTcpSocket::ConnectedState, qPrintable(socket->errorString())); + + QTRY_VERIFY(socket->canReadLine()); + + QByteArray greeting = socket->readLine(); + delete socket; + + QVERIFY2(QtNetworkSettings::compareReplyIMAP(greeting), greeting.constData()); + + expectedReplyIMAP_cached = greeting; +} + //---------------------------------------------------------------------------------- void tst_QTcpSocket::partialRead() @@ -797,8 +830,8 @@ void tst_QTcpSocket::partialRead() QVERIFY(socket->state() == QTcpSocket::ConnectedState); char buf[512]; -// QByteArray greeting = "* OK fluke Cyrus IMAP4 v2.2.12 server ready"; - QByteArray greeting = "* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE"; + QByteArray greeting = expectedReplyIMAP(); + QVERIFY(!greeting.isEmpty()); for (int i = 0; i < 10; i += 2) { while (socket->bytesAvailable() < 2) @@ -821,8 +854,8 @@ void tst_QTcpSocket::unget() QVERIFY(socket->state() == QTcpSocket::ConnectedState); char buf[512]; -// QByteArray greeting = "* OK fluke Cyrus IMAP4 v2.2.12 server ready"; - QByteArray greeting = "* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE"; + QByteArray greeting = expectedReplyIMAP(); + QVERIFY(!greeting.isEmpty()); for (int i = 0; i < 10; i += 2) { while (socket->bytesAvailable() < 2) @@ -1244,13 +1277,17 @@ void tst_QTcpSocket::readLine() QVERIFY(socket->waitForReadyRead(10000)); char buffer[1024]; - int expectedReplySize = QtNetworkSettings::expectedReplyIMAP().size(); - Q_ASSERT(expectedReplySize >= 3); - QCOMPARE(socket->readLine(buffer, sizeof(buffer)), qint64(expectedReplySize)); - QCOMPARE((int) buffer[expectedReplySize-2], (int) '\r'); - QCOMPARE((int) buffer[expectedReplySize-1], (int) '\n'); - QCOMPARE((int) buffer[expectedReplySize], (int) '\0'); + qint64 linelen = socket->readLine(buffer, sizeof(buffer)); + QVERIFY(linelen >= 3); + QVERIFY(linelen < 1024); + + QByteArray reply = QByteArray::fromRawData(buffer, linelen); + QCOMPARE((int) buffer[linelen-2], (int) '\r'); + QCOMPARE((int) buffer[linelen-1], (int) '\n'); + QCOMPARE((int) buffer[linelen], (int) '\0'); + + QVERIFY2(QtNetworkSettings::compareReplyIMAP(reply), reply.constData()); QCOMPARE(socket->write("1 NOOP\r\n"), qint64(8)); @@ -1282,13 +1319,11 @@ void tst_QTcpSocket::readLine() void tst_QTcpSocket::readLineString() { QTcpSocket *socket = newSocket(); -// QByteArray expected("* OK fluke Cyrus IMAP4 v2.2.12 server ready\r\n"); - QByteArray expected("* OK [CAPABILITY IMAP4 IMAP4rev1 LITERAL+ ID STARTTLS LOGINDISABLED] qt-test-server.qt-test-net Cyrus IMAP4 v2.3.11-Mandriva-RPM-2.3.11-6mdv2008.1 server ready\r\n"); socket->connectToHost(QtNetworkSettings::serverName(), 143); QVERIFY(socket->waitForReadyRead(10000)); QByteArray arr = socket->readLine(); - QCOMPARE(arr, QtNetworkSettings::expectedReplyIMAP()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(arr), arr.constData()); delete socket; } @@ -1456,8 +1491,11 @@ void tst_QTcpSocket::atEnd() QVERIFY(!stream.atEnd()); QString greeting = stream.readLine(); QVERIFY(stream.atEnd()); -// QCOMPARE(greeting, QString("220 (vsFTPd 2.0.4)")); - QCOMPARE(greeting, QString("220 (vsFTPd 2.0.5)")); + + // Test server must use some vsFTPd 2.x.x version + QVERIFY2(greeting.length() == sizeof("220 (vsFTPd 2.x.x)")-1, qPrintable(greeting)); + QVERIFY2(greeting.startsWith("220 (vsFTPd 2."), qPrintable(greeting)); + QVERIFY2(greeting.endsWith(")"), qPrintable(greeting)); delete socket; } @@ -1522,7 +1560,8 @@ void tst_QTcpSocket::socketInAThread() TestThread thread; thread.start(); QVERIFY(thread.wait(15000)); - QCOMPARE(thread.data(), QtNetworkSettings::expectedReplyFtp()); + QByteArray data = thread.data(); + QVERIFY2(QtNetworkSettings::compareReplyFtp(data), data.constData()); } } @@ -1542,9 +1581,13 @@ void tst_QTcpSocket::socketsInThreads() QVERIFY(thread3.wait(15000)); QVERIFY(thread1.wait(15000)); - QCOMPARE(thread1.data(),QtNetworkSettings::expectedReplyFtp()); - QCOMPARE(thread2.data(),QtNetworkSettings::expectedReplyFtp()); - QCOMPARE(thread3.data(),QtNetworkSettings::expectedReplyFtp()); + QByteArray data1 = thread1.data(); + QByteArray data2 = thread2.data(); + QByteArray data3 = thread3.data(); + + QVERIFY2(QtNetworkSettings::compareReplyFtp(data1), data1.constData()); + QVERIFY2(QtNetworkSettings::compareReplyFtp(data2), data2.constData()); + QVERIFY2(QtNetworkSettings::compareReplyFtp(data3), data3.constData()); } } @@ -1846,7 +1889,7 @@ void tst_QTcpSocket::readyReadSignalsAfterWaitForReadyRead() QCOMPARE(readyReadSpy.count(), 1); QString s = socket->readLine(); - QCOMPARE(s.toLatin1().constData(), QtNetworkSettings::expectedReplyIMAP().constData()); + QVERIFY2(QtNetworkSettings::compareReplyIMAP(s.toLatin1()), s.toLatin1().constData()); QCOMPARE(socket->bytesAvailable(), qint64(0)); QCoreApplication::instance()->processEvents(); -- cgit v0.12 From 82ff3f484c7ec49e60b7fddf23794937974a6768 Mon Sep 17 00:00:00 2001 From: Bea Lam Date: Mon, 10 Jan 2011 12:13:00 +1000 Subject: Fix loaded() signal to be emitted only once Task-number: QTBUG-16319 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativeloader.cpp | 60 +++++++------- .../graphicsitems/qdeclarativeloader_p_p.h | 2 + .../qdeclarativeloader/tst_qdeclarativeloader.cpp | 94 +++++++++++++--------- 3 files changed, 89 insertions(+), 67 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeloader.cpp b/src/declarative/graphicsitems/qdeclarativeloader.cpp index 1119b92..22ec019 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader.cpp +++ b/src/declarative/graphicsitems/qdeclarativeloader.cpp @@ -48,7 +48,7 @@ QT_BEGIN_NAMESPACE QDeclarativeLoaderPrivate::QDeclarativeLoaderPrivate() - : item(0), component(0), ownComponent(false) + : item(0), component(0), ownComponent(false), isComponentComplete(false) { } @@ -262,6 +262,7 @@ void QDeclarativeLoader::setSource(const QUrl &url) d->clear(); d->source = url; + if (d->source.isEmpty()) { emit sourceChanged(); emit statusChanged(); @@ -272,18 +273,9 @@ void QDeclarativeLoader::setSource(const QUrl &url) d->component = new QDeclarativeComponent(qmlEngine(this), d->source, this); d->ownComponent = true; - if (!d->component->isLoading()) { - d->_q_sourceLoaded(); - } else { - connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), - this, SLOT(_q_sourceLoaded())); - connect(d->component, SIGNAL(progressChanged(qreal)), - this, SIGNAL(progressChanged())); - emit statusChanged(); - emit progressChanged(); - emit sourceChanged(); - emit itemChanged(); - } + + if (d->isComponentComplete) + d->load(); } /*! @@ -324,6 +316,7 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp) d->component = comp; d->ownComponent = false; + if (!d->component) { emit sourceChanged(); emit statusChanged(); @@ -332,18 +325,8 @@ void QDeclarativeLoader::setSourceComponent(QDeclarativeComponent *comp) return; } - if (!d->component->isLoading()) { - d->_q_sourceLoaded(); - } else { - connect(d->component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), - this, SLOT(_q_sourceLoaded())); - connect(d->component, SIGNAL(progressChanged(qreal)), - this, SIGNAL(progressChanged())); - emit progressChanged(); - emit sourceChanged(); - emit statusChanged(); - emit itemChanged(); - } + if (d->isComponentComplete) + d->load(); } void QDeclarativeLoader::resetSourceComponent() @@ -351,6 +334,27 @@ void QDeclarativeLoader::resetSourceComponent() setSourceComponent(0); } +void QDeclarativeLoaderPrivate::load() +{ + Q_Q(QDeclarativeLoader); + + if (!isComponentComplete || !component) + return; + + if (!component->isLoading()) { + _q_sourceLoaded(); + } else { + QObject::connect(component, SIGNAL(statusChanged(QDeclarativeComponent::Status)), + q, SLOT(_q_sourceLoaded())); + QObject::connect(component, SIGNAL(progressChanged(qreal)), + q, SIGNAL(progressChanged())); + emit q->statusChanged(); + emit q->progressChanged(); + emit q->sourceChanged(); + emit q->itemChanged(); + } +} + void QDeclarativeLoaderPrivate::_q_sourceLoaded() { Q_Q(QDeclarativeLoader); @@ -465,9 +469,11 @@ QDeclarativeLoader::Status QDeclarativeLoader::status() const void QDeclarativeLoader::componentComplete() { + Q_D(QDeclarativeLoader); + QDeclarativeItem::componentComplete(); - if (status() == Ready) - emit loaded(); + d->isComponentComplete = true; + d->load(); } diff --git a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h index 0d4c4d0..bc65781 100644 --- a/src/declarative/graphicsitems/qdeclarativeloader_p_p.h +++ b/src/declarative/graphicsitems/qdeclarativeloader_p_p.h @@ -72,11 +72,13 @@ public: void itemGeometryChanged(QDeclarativeItem *item, const QRectF &newGeometry, const QRectF &oldGeometry); void clear(); void initResize(); + void load(); QUrl source; QGraphicsObject *item; QDeclarativeComponent *component; bool ownComponent : 1; + bool isComponentComplete : 1; void _q_sourceLoaded(); void _q_updateSize(bool loaderGeometryChanged = true); diff --git a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp index 1bde55b..f6244e4 100644 --- a/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp +++ b/tests/auto/declarative/qdeclarativeloader/tst_qdeclarativeloader.cpp @@ -69,9 +69,8 @@ public: tst_QDeclarativeLoader(); private slots: - void url(); - void invalidUrl(); - void component(); + void sourceOrComponent(); + void sourceOrComponent_data(); void clear(); void urlToComponent(); void componentToUrl(); @@ -100,56 +99,71 @@ tst_QDeclarativeLoader::tst_QDeclarativeLoader() { } -void tst_QDeclarativeLoader::url() +void tst_QDeclarativeLoader::sourceOrComponent() { + QFETCH(QString, sourceDefinition); + QFETCH(QUrl, sourceUrl); + QFETCH(QString, errorString); + + bool error = !errorString.isEmpty(); + if (error) + QTest::ignoreMessage(QtWarningMsg, errorString.toUtf8().constData()); + QDeclarativeComponent component(&engine); - component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load: 0; onLoaded: did_load=123; source: \"Rect120x60.qml\" }"), TEST_FILE("")); + component.setData(QByteArray( + "import QtQuick 1.0\n" + "Loader {\n" + " property int onItemChangedCount: 0\n" + " property int onSourceChangedCount: 0\n" + " property int onStatusChangedCount: 0\n" + " property int onProgressChangedCount: 0\n" + " property int onLoadedCount: 0\n") + + sourceDefinition.toUtf8() + + QByteArray( + " onItemChanged: onItemChangedCount += 1\n" + " onSourceChanged: onSourceChangedCount += 1\n" + " onStatusChanged: onStatusChangedCount += 1\n" + " onProgressChanged: onProgressChangedCount += 1\n" + " onLoaded: onLoadedCount += 1\n" + "}") + , TEST_FILE("")); + QDeclarativeLoader *loader = qobject_cast(component.create()); QVERIFY(loader != 0); - QVERIFY(loader->item()); - QVERIFY(loader->source() == QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml")); + QCOMPARE(loader->item() == 0, error); + QCOMPARE(loader->source(), sourceUrl); QCOMPARE(loader->progress(), 1.0); - QCOMPARE(loader->status(), QDeclarativeLoader::Ready); - QCOMPARE(loader->property("did_load").toInt(), 123); - QCOMPARE(static_cast(loader)->children().count(), 1); - delete loader; -} + QCOMPARE(loader->status(), error ? QDeclarativeLoader::Error : QDeclarativeLoader::Ready); + QCOMPARE(static_cast(loader)->children().count(), error ? 0: 1); -void tst_QDeclarativeLoader::component() -{ - QDeclarativeComponent component(&engine, TEST_FILE("/SetSourceComponent.qml")); - QDeclarativeItem *item = qobject_cast(component.create()); - QVERIFY(item); + if (!error) { + QDeclarativeComponent *c = qobject_cast(loader->QGraphicsObject::children().at(0)); + QVERIFY(c); + QCOMPARE(loader->sourceComponent(), c); + } - QDeclarativeLoader *loader = qobject_cast(item->QGraphicsObject::children().at(1)); - QVERIFY(loader); - QVERIFY(loader->item()); - QCOMPARE(loader->progress(), 1.0); - QCOMPARE(loader->status(), QDeclarativeLoader::Ready); - QCOMPARE(static_cast(loader)->children().count(), 1); + QCOMPARE(loader->property("onSourceChangedCount").toInt(), 1); + QCOMPARE(loader->property("onStatusChangedCount").toInt(), 1); + QCOMPARE(loader->property("onProgressChangedCount").toInt(), 1); - QDeclarativeComponent *c = qobject_cast(item->QGraphicsObject::children().at(0)); - QVERIFY(c); - QCOMPARE(loader->sourceComponent(), c); + QCOMPARE(loader->property("onItemChangedCount").toInt(), error ? 0 : 1); + QCOMPARE(loader->property("onLoadedCount").toInt(), error ? 0 : 1); - delete item; + delete loader; } -void tst_QDeclarativeLoader::invalidUrl() +void tst_QDeclarativeLoader::sourceOrComponent_data() { - QTest::ignoreMessage(QtWarningMsg, QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found").toUtf8().constData()); + QTest::addColumn("sourceDefinition"); + QTest::addColumn("sourceUrl"); + QTest::addColumn("errorString"); - QDeclarativeComponent component(&engine); - component.setData(QByteArray("import QtQuick 1.0\nLoader { source: \"IDontExist.qml\" }"), TEST_FILE("")); - QDeclarativeLoader *loader = qobject_cast(component.create()); - QVERIFY(loader != 0); - QVERIFY(loader->item() == 0); - QCOMPARE(loader->progress(), 1.0); - QCOMPARE(loader->status(), QDeclarativeLoader::Error); - QCOMPARE(static_cast(loader)->children().count(), 0); + QTest::newRow("source") << "source: 'Rect120x60.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/Rect120x60.qml") << ""; + QTest::newRow("sourceComponent") << "Component { id: comp; Rectangle { width: 100; height: 50 } }\n sourceComponent: comp\n" << QUrl() << ""; - delete loader; + QTest::newRow("invalid source") << "source: 'IDontExist.qml'\n" << QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml") + << QString(QUrl::fromLocalFile(SRCDIR "/data/IDontExist.qml").toString() + ": File not found"); } void tst_QDeclarativeLoader::clear() @@ -446,7 +460,7 @@ void tst_QDeclarativeLoader::networkRequestUrl() server.serveDirectory(SRCDIR "/data"); QDeclarativeComponent component(&engine); - component.setData(QByteArray("import QtQuick 1.0\nLoader { property int did_load : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: did_load=123 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml")); + component.setData(QByteArray("import QtQuick 1.0\nLoader { property int signalCount : 0; source: \"http://127.0.0.1:14450/Rect120x60.qml\"; onLoaded: signalCount += 1 }"), QUrl::fromLocalFile(SRCDIR "/dummy.qml")); if (component.isError()) qDebug() << component.errors(); QDeclarativeLoader *loader = qobject_cast(component.create()); @@ -456,7 +470,7 @@ void tst_QDeclarativeLoader::networkRequestUrl() QVERIFY(loader->item()); QCOMPARE(loader->progress(), 1.0); - QCOMPARE(loader->property("did_load").toInt(), 123); + QCOMPARE(loader->property("signalCount").toInt(), 1); QCOMPARE(static_cast(loader)->children().count(), 1); delete loader; -- cgit v0.12 From 6db61ce39aa2fefaa9e22ca84edd8d140a5c6449 Mon Sep 17 00:00:00 2001 From: Martin Jones Date: Mon, 10 Jan 2011 13:00:54 +1000 Subject: Document property/method versioning in QML. Task-number: QTBUG-13451 Reviewed-by: Bea Lam --- doc/src/declarative/extending.qdoc | 69 ++++++++++++++++++++++++++++++++++ doc/src/declarative/qtdeclarative.qdoc | 15 ++++++++ 2 files changed, 84 insertions(+) diff --git a/doc/src/declarative/extending.qdoc b/doc/src/declarative/extending.qdoc index ff519f6..429997f 100644 --- a/doc/src/declarative/extending.qdoc +++ b/doc/src/declarative/extending.qdoc @@ -112,6 +112,75 @@ Person { \l {Extending QML - Adding Types Example} shows the complete code used to create the \c Person type. +\section1 QML Type Versioning + +In C++ adding a new method or property cannot break old applications. +In QML, however, new methods and properties can change what a name previously +resolved to to within a scope chain. + +For example, consider these two QML files + +\code +// main.qml +import QtQuick 1.0 +Item { + id: root + MyComponent {} +} +\endcode + +\code +// MyComponent.qml +import MyModule 1.0 +CppItem { + value: root.x +} +\endcode + +where CppItem maps to the C++ class QCppItem. + +If the author of QCppItem adds a "root" property to QCppItem in a new version of the module, +it will break the above program as \c root.x now resolves to a different value. +The solution is to allow the author of QCppItem to state that the new \c root property is +only available from a particular version of QCppItem onwards. This permits new properties +and features to be added to existing elements without breaking existing programs. + +QML enables this by allowing the properties, methods and signals of a class to be tagged with +a particular \e revision, so that they are only accessible if the relevant module version +is imported. In this case, the author can tag the \c root property as being added in +\e {revision 1} of the class, and register that revision in version 1.1 of the module. + +The REVISION tag is used to mark the \c root property as added in revision 1 of the class. +Methods such as Q_INVOKABLE's, signals and slots can also be tagged for a +revision using the \c Q_REVISION(x) macro: + +\code +class CppItem : public QObject +{ + Q_OBJECT + Q_PROPERTY(int root READ root WRITE setRoot NOTIFY rootChanged REVISION 1) + +signals: + Q_REVISION(1) void rootChanged(); +}; +\endcode + +To register the new class revision to a particular version the following function is used: + +\code +template +int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName) +\endcode + +To register \c CppItem version 1 for \c {MyModule 1.1}: + +\code +qmlRegisterType("MyModule", 1, 1, "CppItem") +\endcode + +\c root is only available when MyModule 1.1 is imported. + + \section1 Object and List Property Types \snippet examples/declarative/cppextensions/referenceexamples/properties/example.qml 0 diff --git a/doc/src/declarative/qtdeclarative.qdoc b/doc/src/declarative/qtdeclarative.qdoc index b0c6e06..5ab4319 100644 --- a/doc/src/declarative/qtdeclarative.qdoc +++ b/doc/src/declarative/qtdeclarative.qdoc @@ -85,6 +85,21 @@ Returns the QML type id. + There are two forms of this template function: + + \code + template + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + + template + int qmlRegisterType(const char *uri, int versionMajor, int versionMinor, const char *qmlName); + \endcode + + The former is the standard form which registers the type \e T as a new type. + The latter allows a particular revision of a class to be registered in + a specified version (see \l {QML Type Versioning}). + + For example, this registers a C++ class \c MySliderItem as a QML type named \c Slider for version 1.0 of a \l{QML Modules}{module} called "com.mycompany.qmlcomponents": -- cgit v0.12 From cbf6bfbff8c0643bc82bb2456214994931052bd6 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Fri, 7 Jan 2011 17:42:12 +1000 Subject: Add selection modes to TextEdit and TextInput. Add an overload for moveCursorSelection which takes a parameter specifying whether to update the selection with individual characters or whole words. Task-number: QTBUG-16283 Reviewed-by: Martin Jones --- .../graphicsitems/qdeclarativetextedit.cpp | 89 +++++++++-- .../graphicsitems/qdeclarativetextedit_p.h | 7 + .../graphicsitems/qdeclarativetextinput.cpp | 101 ++++++++++++- .../graphicsitems/qdeclarativetextinput_p.h | 7 + .../tst_qdeclarativetextedit.cpp | 164 ++++++++++++++++++++- .../tst_qdeclarativetextinput.cpp | 163 +++++++++++++++++++- 6 files changed, 512 insertions(+), 19 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp index 6a51a3c..7ea3dec 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp @@ -579,37 +579,108 @@ int QDeclarativeTextEdit::positionAt(int x, int y) const return r; } +void QDeclarativeTextEdit::moveCursorSelection(int pos) +{ + //Note that this is the same as setCursorPosition but with the KeepAnchor flag set + Q_D(QDeclarativeTextEdit); + QTextCursor cursor = d->control->textCursor(); + if (cursor.position() == pos) + return; + cursor.setPosition(pos, QTextCursor::KeepAnchor); + d->control->setTextCursor(cursor); +} + /*! - \qmlmethod int TextEdit::moveCursorSelection(int pos) + \qmlmethod void TextEdit::moveCursorSelection(int position, SelectionMode mode = TextEdit.SelectCharacters) + \since Quick 1.1 - Moves the cursor to \a position and updates the selection accordingly. - (To only move the cursor, set the \l cursorPosition property.) + Moves the cursor to \a position and updates the selection according to the optional \a mode + parameter. (To only move the cursor, set the \l cursorPosition property.) When this method is called it additionally sets either the selectionStart or the selectionEnd (whichever was at the previous cursor position) to the specified position. This allows you to easily extend and contract the selected text range. + The selection mode specifies whether the selection is updated on a per character or a per word + basis. If not specified the selection mode will default to TextEdit.SelectCharacters. + + \list + \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at + the previous cursor position) to the specified position. + \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all + words between the specified postion and the previous cursor position. Words partially in the + range are included. + \endlist + For example, take this sequence of calls: \code cursorPosition = 5 - moveCursorSelection(9) - moveCursorSelection(7) + moveCursorSelection(9, TextEdit.SelectCharacters) + moveCursorSelection(7, TextEdit.SelectCharacters) \endcode This moves the cursor to position 5, extend the selection end from 5 to 9 and then retract the selection end from 9 to 7, leaving the text from position 5 to 7 selected (the 6th and 7th characters). + + The same sequence with TextEdit.SelectWords will extend the selection start to a word boundary + before or on position 5 and extend the selection end to a word boundary past position 9, and + then if there is a word boundary between position 7 and 8 retract the selection end to that + boundary. If there is whitespace at position 7 the selection will be retracted further. */ -void QDeclarativeTextEdit::moveCursorSelection(int pos) +void QDeclarativeTextEdit::moveCursorSelection(int pos, SelectionMode mode) { - //Note that this is the same as setCursorPosition but with the KeepAnchor flag set Q_D(QDeclarativeTextEdit); QTextCursor cursor = d->control->textCursor(); if (cursor.position() == pos) return; - cursor.setPosition(pos, QTextCursor::KeepAnchor); + if (mode == SelectCharacters) { + cursor.setPosition(pos, QTextCursor::KeepAnchor); + } else if (cursor.anchor() < pos) { + cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == cursor.anchor()) { + cursor.movePosition(QTextCursor::NextWord, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::MoveAnchor); + } + cursor.setPosition(pos, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == pos) { + cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + + if (cursor.anchor() > cursor.position()) + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + } + } else if (cursor.anchor() > pos) { + cursor.setPosition(cursor.anchor(), QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == cursor.anchor()) { + cursor.movePosition(QTextCursor::PreviousWord, QTextCursor::MoveAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::MoveAnchor); + } + cursor.setPosition(pos, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::EndOfWord, QTextCursor::KeepAnchor); + if (cursor.position() == pos) { + cursor.movePosition(QTextCursor::NextWord, QTextCursor::KeepAnchor); + + if (cursor.anchor() < cursor.position()) + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } else { + cursor.movePosition(QTextCursor::PreviousCharacter, QTextCursor::KeepAnchor); + cursor.movePosition(QTextCursor::StartOfWord, QTextCursor::KeepAnchor); + } + } else { + cursor.setPosition(pos, QTextCursor::MoveAnchor); + } d->control->setTextCursor(cursor); } @@ -655,7 +726,7 @@ void QDeclarativeTextEdit::setCursorPosition(int pos) if (pos < 0 || pos > d->text.length()) return; QTextCursor cursor = d->control->textCursor(); - if (cursor.position() == pos) + if (cursor.position() == pos && cursor.anchor() == pos) return; cursor.setPosition(pos); d->control->setTextCursor(cursor); diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 37b24f7..6a05aa8 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -65,6 +65,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextEdit : public QDeclarativePaintedItem Q_ENUMS(HAlignment) Q_ENUMS(TextFormat) Q_ENUMS(WrapMode) + Q_ENUMS(SelectionMode) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) @@ -120,6 +121,11 @@ public: Wrap = QTextOption::WrapAtWordBoundaryOrAnywhere }; + enum SelectionMode { + SelectCharacters, + SelectWords + }; + Q_INVOKABLE void openSoftwareInputPanel(); Q_INVOKABLE void closeSoftwareInputPanel(); @@ -195,6 +201,7 @@ public: Q_INVOKABLE QRectF positionToRectangle(int) const; Q_INVOKABLE int positionAt(int x, int y) const; Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE Q_REVISION(1) void moveCursorSelection(int pos, SelectionMode mode); QRectF boundingRect() const; diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp index ac07d4b..491d219c4 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp +++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp @@ -50,6 +50,7 @@ #include #include #include +#include #ifndef QT_NO_LINEEDIT @@ -1320,35 +1321,119 @@ void QDeclarativeTextInput::setSelectByMouse(bool on) } } +void QDeclarativeTextInput::moveCursorSelection(int position) +{ + Q_D(QDeclarativeTextInput); + d->control->moveCursor(position, true); + d->updateHorizontalScroll(); +} /*! - \qmlmethod void TextInput::moveCursorSelection(int position) + \qmlmethod void TextInput::moveCursorSelection(int position, SelectionMode mode = TextInput.SelectCharacters) + \since Quick 1.1 - Moves the cursor to \a position and updates the selection accordingly. - (To only move the cursor, set the \l cursorPosition property.) + Moves the cursor to \a position and updates the selection according to the optional \a mode + parameter. (To only move the cursor, set the \l cursorPosition property.) When this method is called it additionally sets either the selectionStart or the selectionEnd (whichever was at the previous cursor position) to the specified position. This allows you to easily extend and contract the selected text range. + The selection mode specifies whether the selection is updated on a per character or a per word + basis. If not specified the selection mode will default to TextInput.SelectCharacters. + + \list + \o TextEdit.SelectCharacters - Sets either the selectionStart or selectionEnd (whichever was at + the previous cursor position) to the specified position. + \o TextEdit.SelectWords - Sets the selectionStart and selectionEnd to include all + words between the specified postion and the previous cursor position. Words partially in the + range are included. + \endlist + For example, take this sequence of calls: \code cursorPosition = 5 - moveCursorSelection(9) - moveCursorSelection(7) + moveCursorSelection(9, TextInput.SelectCharacters) + moveCursorSelection(7, TextInput.SelectCharacters) \endcode This moves the cursor to position 5, extend the selection end from 5 to 9 and then retract the selection end from 9 to 7, leaving the text from position 5 to 7 selected (the 6th and 7th characters). + + The same sequence with TextInput.SelectWords will extend the selection start to a word boundary + before or on position 5 and extend the selection end to a word boundary past position 9, and + then if there is a word boundary between position 7 and 8 retract the selection end to that + boundary. If there is whitespace at position 7 the selection will be retracted further. */ -void QDeclarativeTextInput::moveCursorSelection(int position) +void QDeclarativeTextInput::moveCursorSelection(int pos, SelectionMode mode) { Q_D(QDeclarativeTextInput); - d->control->moveCursor(position, true); - d->updateHorizontalScroll(); + + if (mode == SelectCharacters) { + d->control->moveCursor(pos, true); + } else if (pos != d->control->cursor()){ + int anchor; + if (!d->control->hasSelectedText()) + anchor = d->control->cursor(); + else if (d->control->selectionStart() == d->control->cursor()) + anchor = d->control->selectionEnd(); + else + anchor = d->control->selectionStart(); + + if (anchor < pos) { + QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text()); + finder.setPosition(anchor); + + if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) { + finder.toNextBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord) + finder.toPreviousBoundary(); + } + anchor = finder.position(); + + finder.setPosition(pos); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) { + finder.toPreviousBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord) + finder.toNextBoundary(); + } + int cursor = finder.position(); + + if (anchor < cursor) + d->control->setSelection(anchor, cursor - anchor); + else + d->control->moveCursor(pos, false); + + } else if (anchor > pos) { + QTextBoundaryFinder finder(QTextBoundaryFinder::Word, d->control->text()); + + finder.setPosition(anchor); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::EndWord)) { + finder.toPreviousBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::EndWord) + finder.toNextBoundary(); + } + anchor = finder.position(); + + finder.setPosition(pos); + if (!(finder.boundaryReasons() & QTextBoundaryFinder::StartWord)) { + finder.toNextBoundary(); + if (finder.boundaryReasons() != QTextBoundaryFinder::StartWord) + finder.toPreviousBoundary(); + } + int cursor = finder.position(); + + if (anchor > cursor) + d->control->setSelection(anchor, cursor - anchor); + else + d->control->moveCursor(pos, false); + } else { + d->control->moveCursor(pos, false); + } + } } /*! diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 878f040..25b8e66 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -63,6 +63,7 @@ class Q_AUTOTEST_EXPORT QDeclarativeTextInput : public QDeclarativePaintedItem Q_OBJECT Q_ENUMS(HAlignment) Q_ENUMS(EchoMode) + Q_ENUMS(SelectionMode) Q_PROPERTY(QString text READ text WRITE setText NOTIFY textChanged) Q_PROPERTY(QColor color READ color WRITE setColor NOTIFY colorChanged) @@ -112,10 +113,16 @@ public: AlignHCenter = Qt::AlignHCenter }; + enum SelectionMode { + SelectCharacters, + SelectWords + }; + //Auxilliary functions needed to control the TextInput from QML Q_INVOKABLE int positionAt(int x) const; Q_INVOKABLE QRectF positionToRectangle(int pos) const; Q_INVOKABLE void moveCursorSelection(int pos); + Q_INVOKABLE Q_REVISION(1) void moveCursorSelection(int pos, SelectionMode mode); Q_INVOKABLE void openSoftwareInputPanel(); Q_INVOKABLE void closeSoftwareInputPanel(); diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index 23c8a1b..7af008f 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -66,6 +66,8 @@ #define SRCDIR "." #endif +Q_DECLARE_METATYPE(QDeclarativeTextEdit::SelectionMode) + QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. @@ -107,6 +109,8 @@ private slots: void persistentSelection(); void focusOnPress(); void selection(); + void moveCursorSelection_data(); + void moveCursorSelection(); void mouseSelection_data(); void mouseSelection(); void inputMethodHints(); @@ -144,7 +148,9 @@ private: tst_qdeclarativetextedit::tst_qdeclarativetextedit() { standard << "the quick brown fox jumped over the lazy dog" - << "the quick brown fox\n jumped over the lazy dog"; + << "the quick brown fox\n jumped over the lazy dog" + << "Hello, world!" + << "!dlrow ,olleH"; richText << "the quick brown fox jumped over the lazy dog" << "the quick brown fox
jumped over the lazy dog
"; @@ -711,6 +717,162 @@ void tst_qdeclarativetextedit::selection() QVERIFY(textEditObject->selectedText().isNull()); } +void tst_qdeclarativetextedit::moveCursorSelection_data() +{ + QTest::addColumn("testStr"); + QTest::addColumn("cursorPosition"); + QTest::addColumn("movePosition"); + QTest::addColumn("mode"); + QTest::addColumn("selectionStart"); + QTest::addColumn("selectionEnd"); + QTest::addColumn("reversible"); + + QTest::newRow("(t)he|characters") + << standard[0] << 0 << 1 << QDeclarativeTextEdit::SelectCharacters << 0 << 1 << true; + QTest::newRow("do(g)|characters") + << standard[0] << 43 << 44 << QDeclarativeTextEdit::SelectCharacters << 43 << 44 << true; + QTest::newRow("jum(p)ed|characters") + << standard[0] << 23 << 24 << QDeclarativeTextEdit::SelectCharacters << 23 << 24 << true; + QTest::newRow("jumped( )over|characters") + << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectCharacters << 26 << 27 << true; + QTest::newRow("(the )|characters") + << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectCharacters << 0 << 4 << true; + QTest::newRow("( dog)|characters") + << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectCharacters << 40 << 44 << true; + QTest::newRow("( jumped )|characters") + << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectCharacters << 19 << 27 << true; + QTest::newRow("th(e qu)ick|characters") + << standard[0] << 2 << 6 << QDeclarativeTextEdit::SelectCharacters << 2 << 6 << true; + QTest::newRow("la(zy d)og|characters") + << standard[0] << 38 << 42 << QDeclarativeTextEdit::SelectCharacters << 38 << 42 << true; + QTest::newRow("jum(ped ov)er|characters") + << standard[0] << 23 << 29 << QDeclarativeTextEdit::SelectCharacters << 23 << 29 << true; + QTest::newRow("()the|characters") + << standard[0] << 0 << 0 << QDeclarativeTextEdit::SelectCharacters << 0 << 0 << true; + QTest::newRow("dog()|characters") + << standard[0] << 44 << 44 << QDeclarativeTextEdit::SelectCharacters << 44 << 44 << true; + QTest::newRow("jum()ped|characters") + << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectCharacters << 23 << 23 << true; + + QTest::newRow("(t)he|words") + << standard[0] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true; + QTest::newRow("do(g)|words") + << standard[0] << 43 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true; + QTest::newRow("jum(p)ed|words") + << standard[0] << 23 << 24 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true; + QTest::newRow("jumped( )over|words") + << standard[0] << 26 << 27 << QDeclarativeTextEdit::SelectWords << 27 << 27 << false; + QTest::newRow("jumped( )over|words,reversed") + << standard[0] << 27 << 26 << QDeclarativeTextEdit::SelectWords << 26 << 26 << false; + QTest::newRow("(the )|words") + << standard[0] << 0 << 4 << QDeclarativeTextEdit::SelectWords << 0 << 3 << true; + QTest::newRow("( dog)|words") + << standard[0] << 40 << 44 << QDeclarativeTextEdit::SelectWords << 41 << 44 << true; + QTest::newRow("( jumped )|words") + << standard[0] << 19 << 27 << QDeclarativeTextEdit::SelectWords << 20 << 26 << true; + QTest::newRow("th(e qu)ick|words") + << standard[0] << 2 << 6 << QDeclarativeTextEdit::SelectWords << 0 << 9 << true; + QTest::newRow("la(zy d)og|words") + << standard[0] << 38 << 42 << QDeclarativeTextEdit::SelectWords << 36 << 44 << true; + QTest::newRow("jum(ped ov)er|words") + << standard[0] << 23 << 29 << QDeclarativeTextEdit::SelectWords << 20 << 31 << true; + QTest::newRow("()the|words") + << standard[0] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true; + QTest::newRow("dog()|words") + << standard[0] << 44 << 44 << QDeclarativeTextEdit::SelectWords << 44 << 44 << true; + QTest::newRow("jum()ped|words") + << standard[0] << 23 << 23 << QDeclarativeTextEdit::SelectWords << 23 << 23 << true; + + QTest::newRow("Hello(,) |words") + << standard[2] << 5 << 6 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true; + QTest::newRow("Hello(, )|words") + << standard[2] << 5 << 7 << QDeclarativeTextEdit::SelectWords << 5 << 6 << true; + QTest::newRow("Hel(lo, )|words") + << standard[2] << 3 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true; + QTest::newRow("Hel(lo),|words") + << standard[2] << 3 << 5 << QDeclarativeTextEdit::SelectWords << 0 << 5 << true; + QTest::newRow("Hello(),|words") + << standard[2] << 5 << 5 << QDeclarativeTextEdit::SelectWords << 5 << 5 << true; + QTest::newRow("Hello,()|words") + << standard[2] << 6 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << true; + QTest::newRow("Hello,( )|words") + << standard[2] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false; + QTest::newRow("Hello,( )|words") + << standard[2] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false; + QTest::newRow("Hello,( world)|words") + << standard[2] << 6 << 12 << QDeclarativeTextEdit::SelectWords << 7 << 12 << true; + QTest::newRow("Hello,( world!)|words") + << standard[2] << 6 << 13 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true; + QTest::newRow("Hello(, world!)|words") + << standard[2] << 5 << 13 << QDeclarativeTextEdit::SelectWords << 5 << 13 << true; + QTest::newRow("world(!)|words") + << standard[2] << 12 << 13 << QDeclarativeTextEdit::SelectWords << 12 << 13 << true; + QTest::newRow("world!())|words") + << standard[2] << 13 << 13 << QDeclarativeTextEdit::SelectWords << 13 << 13 << true; + QTest::newRow("world()!)|words") + << standard[2] << 12 << 12 << QDeclarativeTextEdit::SelectWords << 12 << 12 << true; + + QTest::newRow("(,)olleH |words") + << standard[3] << 7 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true; + QTest::newRow("( ,)olleH|words") + << standard[3] << 6 << 8 << QDeclarativeTextEdit::SelectWords << 7 << 8 << true; + QTest::newRow("( ,ol)leH|words") + << standard[3] << 6 << 10 << QDeclarativeTextEdit::SelectWords << 7 << 13 << true; + QTest::newRow(",(ol)leH,|words") + << standard[3] << 8 << 10 << QDeclarativeTextEdit::SelectWords << 8 << 13 << true; + QTest::newRow(",()olleH|words") + << standard[3] << 8 << 8 << QDeclarativeTextEdit::SelectWords << 8 << 8 << true; + QTest::newRow("(),olleH|words") + << standard[3] << 7 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << true; + QTest::newRow("( ),olleH|words") + << standard[3] << 6 << 7 << QDeclarativeTextEdit::SelectWords << 7 << 7 << false; + QTest::newRow("( ),olleH|words,reversed") + << standard[3] << 7 << 6 << QDeclarativeTextEdit::SelectWords << 6 << 6 << false; + QTest::newRow("(dlrow ),olleH|words") + << standard[3] << 1 << 7 << QDeclarativeTextEdit::SelectWords << 1 << 6 << true; + QTest::newRow("(!dlrow ),olleH|words") + << standard[3] << 0 << 7 << QDeclarativeTextEdit::SelectWords << 0 << 6 << true; + QTest::newRow("(!dlrow ,)olleH|words") + << standard[3] << 0 << 8 << QDeclarativeTextEdit::SelectWords << 0 << 8 << true; + QTest::newRow("(!)dlrow|words") + << standard[3] << 0 << 1 << QDeclarativeTextEdit::SelectWords << 0 << 1 << true; + QTest::newRow("()!dlrow|words") + << standard[3] << 0 << 0 << QDeclarativeTextEdit::SelectWords << 0 << 0 << true; + QTest::newRow("!()dlrow|words") + << standard[3] << 1 << 1 << QDeclarativeTextEdit::SelectWords << 1 << 1 << true; +} + +void tst_qdeclarativetextedit::moveCursorSelection() +{ + QFETCH(QString, testStr); + QFETCH(int, cursorPosition); + QFETCH(int, movePosition); + QFETCH(QDeclarativeTextEdit::SelectionMode, mode); + QFETCH(int, selectionStart); + QFETCH(int, selectionEnd); + QFETCH(bool, reversible); + + QString componentStr = "import QtQuick 1.1\nTextEdit { text: \""+ testStr +"\"; }"; + QDeclarativeComponent textinputComponent(&engine); + textinputComponent.setData(componentStr.toLatin1(), QUrl()); + QDeclarativeTextEdit *texteditObject = qobject_cast(textinputComponent.create()); + QVERIFY(texteditObject != 0); + + texteditObject->setCursorPosition(cursorPosition); + texteditObject->moveCursorSelection(movePosition, mode); + + QCOMPARE(texteditObject->selectionStart(), selectionStart); + QCOMPARE(texteditObject->selectionEnd(), selectionEnd); + + if (reversible) { + texteditObject->setCursorPosition(movePosition); + texteditObject->moveCursorSelection(cursorPosition, mode); + + QCOMPARE(texteditObject->selectionStart(), selectionStart); + QCOMPARE(texteditObject->selectionEnd(), selectionEnd); + } +} + void tst_qdeclarativetextedit::mouseSelection_data() { QTest::addColumn("qmlfile"); diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index 160c3b6..1de695e 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -57,6 +57,8 @@ #define SRCDIR "." #endif +Q_DECLARE_METATYPE(QDeclarativeTextInput::SelectionMode) + QString createExpectedFileIfNotFound(const QString& filebasename, const QImage& actual) { // XXX This will be replaced by some clever persistent platform image store. @@ -87,6 +89,8 @@ private slots: void font(); void color(); void selection(); + void moveCursorSelection_data(); + void moveCursorSelection(); void horizontalAlignment_data(); void horizontalAlignment(); @@ -124,7 +128,8 @@ tst_qdeclarativetextinput::tst_qdeclarativetextinput() { standard << "the quick brown fox jumped over the lazy dog" << "It's supercalifragisiticexpialidocious!" - << "Hello, world!"; + << "Hello, world!" + << "!dlrow ,olleH"; colorStrings << "aliceblue" << "antiquewhite" @@ -415,6 +420,162 @@ void tst_qdeclarativetextinput::selection() delete textinputObject; } +void tst_qdeclarativetextinput::moveCursorSelection_data() +{ + QTest::addColumn("testStr"); + QTest::addColumn("cursorPosition"); + QTest::addColumn("movePosition"); + QTest::addColumn("mode"); + QTest::addColumn("selectionStart"); + QTest::addColumn("selectionEnd"); + QTest::addColumn("reversible"); + + QTest::newRow("(t)he|characters") + << standard[0] << 0 << 1 << QDeclarativeTextInput::SelectCharacters << 0 << 1 << true; + QTest::newRow("do(g)|characters") + << standard[0] << 43 << 44 << QDeclarativeTextInput::SelectCharacters << 43 << 44 << true; + QTest::newRow("jum(p)ed|characters") + << standard[0] << 23 << 24 << QDeclarativeTextInput::SelectCharacters << 23 << 24 << true; + QTest::newRow("jumped( )over|characters") + << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectCharacters << 26 << 27 << true; + QTest::newRow("(the )|characters") + << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectCharacters << 0 << 4 << true; + QTest::newRow("( dog)|characters") + << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectCharacters << 40 << 44 << true; + QTest::newRow("( jumped )|characters") + << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectCharacters << 19 << 27 << true; + QTest::newRow("th(e qu)ick|characters") + << standard[0] << 2 << 6 << QDeclarativeTextInput::SelectCharacters << 2 << 6 << true; + QTest::newRow("la(zy d)og|characters") + << standard[0] << 38 << 42 << QDeclarativeTextInput::SelectCharacters << 38 << 42 << true; + QTest::newRow("jum(ped ov)er|characters") + << standard[0] << 23 << 29 << QDeclarativeTextInput::SelectCharacters << 23 << 29 << true; + QTest::newRow("()the|characters") + << standard[0] << 0 << 0 << QDeclarativeTextInput::SelectCharacters << 0 << 0 << true; + QTest::newRow("dog()|characters") + << standard[0] << 44 << 44 << QDeclarativeTextInput::SelectCharacters << 44 << 44 << true; + QTest::newRow("jum()ped|characters") + << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectCharacters << 23 << 23 << true; + + QTest::newRow("(t)he|words") + << standard[0] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 3 << true; + QTest::newRow("do(g)|words") + << standard[0] << 43 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true; + QTest::newRow("jum(p)ed|words") + << standard[0] << 23 << 24 << QDeclarativeTextInput::SelectWords << 20 << 26 << true; + QTest::newRow("jumped( )over|words") + << standard[0] << 26 << 27 << QDeclarativeTextInput::SelectWords << 27 << 27 << false; + QTest::newRow("jumped( )over|words,reversed") + << standard[0] << 27 << 26 << QDeclarativeTextInput::SelectWords << 26 << 26 << false; + QTest::newRow("(the )|words") + << standard[0] << 0 << 4 << QDeclarativeTextInput::SelectWords << 0 << 3 << true; + QTest::newRow("( dog)|words") + << standard[0] << 40 << 44 << QDeclarativeTextInput::SelectWords << 41 << 44 << true; + QTest::newRow("( jumped )|words") + << standard[0] << 19 << 27 << QDeclarativeTextInput::SelectWords << 20 << 26 << true; + QTest::newRow("th(e qu)ick|words") + << standard[0] << 2 << 6 << QDeclarativeTextInput::SelectWords << 0 << 9 << true; + QTest::newRow("la(zy d)og|words") + << standard[0] << 38 << 42 << QDeclarativeTextInput::SelectWords << 36 << 44 << true; + QTest::newRow("jum(ped ov)er|words") + << standard[0] << 23 << 29 << QDeclarativeTextInput::SelectWords << 20 << 31 << true; + QTest::newRow("()the|words") + << standard[0] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true; + QTest::newRow("dog()|words") + << standard[0] << 44 << 44 << QDeclarativeTextInput::SelectWords << 44 << 44 << true; + QTest::newRow("jum()ped|words") + << standard[0] << 23 << 23 << QDeclarativeTextInput::SelectWords << 23 << 23 << true; + + QTest::newRow("Hello(,) |words") + << standard[2] << 5 << 6 << QDeclarativeTextInput::SelectWords << 5 << 6 << true; + QTest::newRow("Hello(, )|words") + << standard[2] << 5 << 7 << QDeclarativeTextInput::SelectWords << 5 << 6 << true; + QTest::newRow("Hel(lo, )|words") + << standard[2] << 3 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true; + QTest::newRow("Hel(lo),|words") + << standard[2] << 3 << 5 << QDeclarativeTextInput::SelectWords << 0 << 5 << true; + QTest::newRow("Hello(),|words") + << standard[2] << 5 << 5 << QDeclarativeTextInput::SelectWords << 5 << 5 << true; + QTest::newRow("Hello,()|words") + << standard[2] << 6 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << true; + QTest::newRow("Hello,( )|words") + << standard[2] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false; + QTest::newRow("Hello,( )|words,reversed") + << standard[2] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false; + QTest::newRow("Hello,( world)|words") + << standard[2] << 6 << 12 << QDeclarativeTextInput::SelectWords << 7 << 12 << true; + QTest::newRow("Hello,( world!)|words") + << standard[2] << 6 << 13 << QDeclarativeTextInput::SelectWords << 7 << 13 << true; + QTest::newRow("Hello(, world!)|words") + << standard[2] << 5 << 13 << QDeclarativeTextInput::SelectWords << 5 << 13 << true; + QTest::newRow("world(!)|words") + << standard[2] << 12 << 13 << QDeclarativeTextInput::SelectWords << 12 << 13 << true; + QTest::newRow("world!())|words") + << standard[2] << 13 << 13 << QDeclarativeTextInput::SelectWords << 13 << 13 << true; + QTest::newRow("world()!)|words") + << standard[2] << 12 << 12 << QDeclarativeTextInput::SelectWords << 12 << 12 << true; + + QTest::newRow("(,)olleH |words") + << standard[3] << 7 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true; + QTest::newRow("( ,)olleH|words") + << standard[3] << 6 << 8 << QDeclarativeTextInput::SelectWords << 7 << 8 << true; + QTest::newRow("( ,ol)leH|words") + << standard[3] << 6 << 10 << QDeclarativeTextInput::SelectWords << 7 << 13 << true; + QTest::newRow(",(ol)leH,|words") + << standard[3] << 8 << 10 << QDeclarativeTextInput::SelectWords << 8 << 13 << true; + QTest::newRow(",()olleH|words") + << standard[3] << 8 << 8 << QDeclarativeTextInput::SelectWords << 8 << 8 << true; + QTest::newRow("(),olleH|words") + << standard[3] << 7 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << true; + QTest::newRow("( ),olleH|words") + << standard[3] << 6 << 7 << QDeclarativeTextInput::SelectWords << 7 << 7 << false; + QTest::newRow("( ),olleH|words,reversed") + << standard[3] << 7 << 6 << QDeclarativeTextInput::SelectWords << 6 << 6 << false; + QTest::newRow("(dlrow ),olleH|words") + << standard[3] << 1 << 7 << QDeclarativeTextInput::SelectWords << 1 << 6 << true; + QTest::newRow("(!dlrow ),olleH|words") + << standard[3] << 0 << 7 << QDeclarativeTextInput::SelectWords << 0 << 6 << true; + QTest::newRow("(!dlrow ,)olleH|words") + << standard[3] << 0 << 8 << QDeclarativeTextInput::SelectWords << 0 << 8 << true; + QTest::newRow("(!)dlrow|words") + << standard[3] << 0 << 1 << QDeclarativeTextInput::SelectWords << 0 << 1 << true; + QTest::newRow("()!dlrow|words") + << standard[3] << 0 << 0 << QDeclarativeTextInput::SelectWords << 0 << 0 << true; + QTest::newRow("!()dlrow|words") + << standard[3] << 1 << 1 << QDeclarativeTextInput::SelectWords << 1 << 1 << true; +} + +void tst_qdeclarativetextinput::moveCursorSelection() +{ + QFETCH(QString, testStr); + QFETCH(int, cursorPosition); + QFETCH(int, movePosition); + QFETCH(QDeclarativeTextInput::SelectionMode, mode); + QFETCH(int, selectionStart); + QFETCH(int, selectionEnd); + QFETCH(bool, reversible); + + QString componentStr = "import QtQuick 1.1\nTextInput { text: \""+ testStr +"\"; }"; + QDeclarativeComponent textinputComponent(&engine); + textinputComponent.setData(componentStr.toLatin1(), QUrl()); + QDeclarativeTextInput *textinputObject = qobject_cast(textinputComponent.create()); + QVERIFY(textinputObject != 0); + + textinputObject->setCursorPosition(cursorPosition); + textinputObject->moveCursorSelection(movePosition, mode); + + QCOMPARE(textinputObject->selectionStart(), selectionStart); + QCOMPARE(textinputObject->selectionEnd(), selectionEnd); + + if (reversible) { + textinputObject->setCursorPosition(movePosition); + textinputObject->moveCursorSelection(cursorPosition, mode); + + QCOMPARE(textinputObject->selectionStart(), selectionStart); + QCOMPARE(textinputObject->selectionEnd(), selectionEnd); + } +} + void tst_qdeclarativetextinput::horizontalAlignment_data() { QTest::addColumn("hAlign"); -- cgit v0.12 From 279f701c7fd988a5dec4abca8e9da01dc629672b Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 10 Jan 2011 14:32:41 +1000 Subject: Update pathview test This updates the tests to match the correct behaviour as of 1ba3e41f09ea719249286fede5d3fe96621ccb61 Task-number: QTBUG-16357 --- .../data/test-pathview-2.0.png | Bin 1114 -> 1114 bytes .../data/test-pathview-2.1.png | Bin 1119 -> 1119 bytes .../data/test-pathview-2.2.png | Bin 1102 -> 1102 bytes .../data/test-pathview-2.3.png | Bin 1092 -> 1092 bytes .../data/test-pathview-2.4.png | Bin 1143 -> 1140 bytes .../data/test-pathview-2.5.png | Bin 1143 -> 1140 bytes .../qdeclarativepathview/data/test-pathview-2.qml | 394 ++++++++++----------- .../qdeclarativepathview/data/test-pathview.0.png | Bin 1169 -> 1169 bytes .../qdeclarativepathview/data/test-pathview.1.png | Bin 1172 -> 1172 bytes .../qdeclarativepathview/data/test-pathview.2.png | Bin 1201 -> 1201 bytes .../qdeclarativepathview/data/test-pathview.3.png | Bin 1164 -> 1164 bytes .../qdeclarativepathview/data/test-pathview.4.png | Bin 1226 -> 1227 bytes .../qdeclarativepathview/data/test-pathview.5.png | Bin 1192 -> 1184 bytes .../qdeclarativepathview/data/test-pathview.6.png | Bin 1188 -> 1188 bytes .../qdeclarativepathview/data/test-pathview.qml | 242 ++++++------- 15 files changed, 318 insertions(+), 318 deletions(-) diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png index 347e773..1b87edb 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png index 370ca80..4fc12d6 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png index 97e3906..d761a0c 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png index 5fa3c67..e22464f 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png index ce11c09..14f07be 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png index d155742..ba1ad34 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml index 304d5c7..9eaff18 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview-2.qml @@ -10,171 +10,171 @@ VisualTest { } Frame { msec: 32 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 48 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 64 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 80 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 96 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 112 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 128 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 144 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 160 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 176 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 192 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 208 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 224 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 240 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 256 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 272 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 288 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 304 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 320 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 336 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 352 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 368 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 384 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 400 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 416 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 432 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 448 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 464 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 480 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 496 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 512 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 528 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 544 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 560 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 576 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 592 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 608 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 624 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 640 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 656 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 672 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 688 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Mouse { type: 2 @@ -186,11 +186,11 @@ VisualTest { } Frame { msec: 704 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Frame { msec: 720 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Mouse { type: 5 @@ -202,7 +202,7 @@ VisualTest { } Frame { msec: 736 - hash: "fe6d7d28dbeef3cfbac3ac3c3e909216" + hash: "cc72b488dcdfa7c251782cbcae7ab1d5" } Mouse { type: 5 @@ -222,7 +222,7 @@ VisualTest { } Frame { msec: 752 - hash: "d2dda5bec262721d653e88ec3eaeca57" + hash: "ae9028c15de8ba4b02c733212d521c29" } Mouse { type: 5 @@ -254,7 +254,7 @@ VisualTest { } Frame { msec: 784 - hash: "0a178235529d721529e8dc3b439a64c9" + hash: "6a6c5551e3a5a08f5505eb0f61d9df36" } Mouse { type: 5 @@ -294,11 +294,11 @@ VisualTest { } Frame { msec: 848 - hash: "1ba9bc8c2b941fd0ec82f211eb559682" + hash: "a1e475643d0871bb7d63f8cf2e0b780d" } Frame { msec: 864 - hash: "ee8680df3c58a48f3fff4a8fc221e38c" + hash: "ba429e0c1a7f1624973813ae8be6b090" } Frame { msec: 880 @@ -310,11 +310,11 @@ VisualTest { } Frame { msec: 912 - hash: "f2400819feb116ae3b327284bbb292ff" + hash: "1910f67eb9180a866924fa8567afbdf5" } Frame { msec: 928 - hash: "5d9a3458cb59ede36e7b51bac869785a" + hash: "68c60f1bc67a1d1117be7ed305b61ae1" } Frame { msec: 944 @@ -330,7 +330,7 @@ VisualTest { } Frame { msec: 992 - hash: "493e3c7b0de4a7b4b46678fe4ce9a763" + hash: "2bcde5c7b2e1aac1439b379ed729f6e1" } Frame { msec: 1008 @@ -342,11 +342,11 @@ VisualTest { } Frame { msec: 1040 - hash: "4b28ebf737b8c4228771122d844b8166" + hash: "e615b8648d5449535b1f47ab770db423" } Frame { msec: 1056 - hash: "b04155316770a1265e5dc431e1b9a9a1" + hash: "877e6357cc9a183a0288aa1551e26179" } Frame { msec: 1072 @@ -354,7 +354,7 @@ VisualTest { } Frame { msec: 1088 - hash: "b3e7cbc83c65ec61c768757798b17c58" + hash: "d15e299030bc08097c3b9b4bbaace558" } Frame { msec: 1104 @@ -362,7 +362,7 @@ VisualTest { } Frame { msec: 1120 - hash: "77c3bbb94471cfbfd23cc3914d796dfc" + hash: "937c7e346463c58c909795fa382761d9" } Frame { msec: 1136 @@ -374,7 +374,7 @@ VisualTest { } Frame { msec: 1168 - hash: "bf9c02945fdee4b06353f8f7f4fca2a3" + hash: "5872891af6953f07a635698581695c58" } Frame { msec: 1184 @@ -394,7 +394,7 @@ VisualTest { } Frame { msec: 1248 - hash: "b6bdf2f21c4137d4b5f25e0fe728bba5" + hash: "d8de3485eb7fb1f3675a25d7f807d08e" } Frame { msec: 1264 @@ -422,7 +422,7 @@ VisualTest { } Frame { msec: 1360 - hash: "44cd80041a1965c8c60fdffd9ae19395" + hash: "ee9ac101215923305fa75ab4c99c8f36" } Frame { msec: 1376 @@ -434,11 +434,11 @@ VisualTest { } Frame { msec: 1408 - hash: "8da4613759e9bcb926a0c84556213eb5" + hash: "a9012dc82230c791bda1a7e6b7741896" } Frame { msec: 1424 - hash: "1085fcc81f0aed8508817839ca748359" + hash: "78774bdff6cef175dcb7a190e5f1bcab" } Frame { msec: 1440 @@ -454,11 +454,11 @@ VisualTest { } Frame { msec: 1488 - hash: "832c857f2e05f2f82308cbf91f7bf401" + hash: "d74aa07d0b66a5f2be42b9868d3cd8f2" } Frame { msec: 1504 - hash: "ca3e50cd337a07ef07f063be28fa6dc2" + hash: "ea4c8f35367ee6f7631aa6e6d8aead03" } Frame { msec: 1520 @@ -470,11 +470,11 @@ VisualTest { } Frame { msec: 1552 - hash: "bfa62672ee7fcd9c3a75b63198a4c2bf" + hash: "5361d1f1100c4815dca1b49046b44593" } Frame { msec: 1568 - hash: "cdaafe7f622c18c2409ac539649de1cd" + hash: "5cd97dc8a237fa92373eb50de8a3bd7b" } Frame { msec: 1584 @@ -482,15 +482,15 @@ VisualTest { } Frame { msec: 1600 - hash: "925c55a8564f2318f9de4bd406cb5b13" + hash: "7b3cd8f583e6045d2e923a34abfc3aeb" } Frame { msec: 1616 - hash: "466208a8f6ecf45393be01a6dd7f2b0f" + hash: "2146e67d469f1eb2071a1f04d8e9fc4e" } Frame { msec: 1632 - hash: "35cff8c0f4b503ba4948966079484feb" + hash: "26839de649101c7b3bc6d9b1131325e6" } Frame { msec: 1648 @@ -498,7 +498,7 @@ VisualTest { } Frame { msec: 1664 - hash: "b699165e354bcadfd0d914d9ecb3d2aa" + hash: "30bc1d78a0cbd29813ad9504b1f0864b" } Frame { msec: 1680 @@ -518,7 +518,7 @@ VisualTest { } Frame { msec: 1744 - hash: "a9dda9ebaa97133c671917473721272c" + hash: "864a4d26e719dd9fc0e3ce5c28d7726a" } Mouse { type: 2 @@ -638,7 +638,7 @@ VisualTest { } Frame { msec: 1872 - hash: "d82969ef0f4baf3c51e112e049cb1334" + hash: "57d5b71d5ff16f986c7df8d8405822b6" } Mouse { type: 5 @@ -650,7 +650,7 @@ VisualTest { } Frame { msec: 1888 - hash: "e746a3eb8527036b09afb9cdd3d15648" + hash: "6fd4123cfc8998cfc7716f3d928fb03f" } Mouse { type: 5 @@ -738,7 +738,7 @@ VisualTest { } Frame { msec: 1984 - hash: "f500232133ec07a3b833b06425379484" + hash: "d823492036431e23d8b6876baccec263" } Mouse { type: 5 @@ -758,7 +758,7 @@ VisualTest { } Frame { msec: 2000 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Mouse { type: 5 @@ -770,7 +770,7 @@ VisualTest { } Frame { msec: 2016 - hash: "1754875ee6a5712ffb8ce1bbae6d4ed1" + hash: "f87df2e12dfe2ebb5b093e21970885b4" } Mouse { type: 5 @@ -794,7 +794,7 @@ VisualTest { } Frame { msec: 2048 - hash: "ab3a64b41c67a0b8a6c0830c0e0cb797" + hash: "ba9d1850c5c43c9aec5660601ba21d2f" } Mouse { type: 5 @@ -806,7 +806,7 @@ VisualTest { } Frame { msec: 2064 - hash: "d05f721f1d7d23d6e0cc67993bf1fa8f" + hash: "8eb1f2c8c02c2acf4262e05000045649" } Mouse { type: 5 @@ -838,7 +838,7 @@ VisualTest { } Frame { msec: 2096 - hash: "f0ae80ed5965d7531d6a653c80eed444" + hash: "c55a189b05d87e8937d272f32bdc2481" } Mouse { type: 5 @@ -858,7 +858,7 @@ VisualTest { } Frame { msec: 2112 - hash: "1419fe55cc28ce9690846d4c03275fe7" + hash: "bb1515904f9b299402d1141445154430" } Mouse { type: 5 @@ -870,7 +870,7 @@ VisualTest { } Frame { msec: 2128 - hash: "2e22df53697a599b0e44fb2a3986dcd0" + hash: "93363142c5a05c52c21e771b2bce71f6" } Mouse { type: 5 @@ -946,7 +946,7 @@ VisualTest { } Frame { msec: 2304 - hash: "1419fe55cc28ce9690846d4c03275fe7" + hash: "bb1515904f9b299402d1141445154430" } Mouse { type: 5 @@ -978,7 +978,7 @@ VisualTest { } Frame { msec: 2336 - hash: "ab3a64b41c67a0b8a6c0830c0e0cb797" + hash: "ba9d1850c5c43c9aec5660601ba21d2f" } Mouse { type: 5 @@ -1002,31 +1002,31 @@ VisualTest { } Frame { msec: 2368 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2384 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2400 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2416 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2432 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2448 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Frame { msec: 2464 - hash: "0a0cd0433e206dfc923ec0d3617e04a1" + hash: "11d77567aeff20d8f62f2e4100603de3" } Mouse { type: 5 @@ -1070,7 +1070,7 @@ VisualTest { } Frame { msec: 2512 - hash: "360a47795f7f9389f82f2f55fa1fe83f" + hash: "2234e44042daf277bd5307635155117f" } Mouse { type: 5 @@ -1158,7 +1158,7 @@ VisualTest { } Frame { msec: 2608 - hash: "44a30531642ada65c052afe30874d7ba" + hash: "398e4a0ebc812b779b38c4541d33424c" } Frame { msec: 2624 @@ -1166,7 +1166,7 @@ VisualTest { } Frame { msec: 2640 - hash: "645e43948279d528020070125b71c33b" + hash: "0d09a6a0cce6d22c14bc41b8465e8ba0" } Frame { msec: 2656 @@ -1174,7 +1174,7 @@ VisualTest { } Frame { msec: 2672 - hash: "fa3b12e9869bf4254c8cdf6e5b10bb2d" + hash: "5329441c12424e5aa69ee0c5cff5926d" } Frame { msec: 2688 @@ -1182,11 +1182,11 @@ VisualTest { } Frame { msec: 2704 - hash: "79d70563c7e139d9f9785565219133c7" + hash: "aa8b21cdea3d0ae6a2e59a1b318da842" } Frame { msec: 2720 - hash: "0dc70772aa50445c1cb7dbd8ee0092b0" + hash: "dd142875acafdc8591a29bcd9f871dab" } Frame { msec: 2736 @@ -1198,7 +1198,7 @@ VisualTest { } Frame { msec: 2768 - hash: "e3972b3244e4a98c9ee4df2d4b623c12" + hash: "36217f04f3b1b70a9cf3fa4881b2def7" } Frame { msec: 2784 @@ -1210,11 +1210,11 @@ VisualTest { } Frame { msec: 2816 - hash: "47d757dab5c72cad08cb8026631d67e6" + hash: "7313fc37802c462ddd324a13c8fcdc9c" } Frame { msec: 2832 - hash: "8522a3b6202b303a9e65a9e136423e27" + hash: "961e84cbb3591cebdb5b83c2aa83887c" } Frame { msec: 2848 @@ -1226,7 +1226,7 @@ VisualTest { } Frame { msec: 2880 - hash: "579688ff6ec910570c0c0c60fdf44cf6" + hash: "943dfcee3f04c77fba2cec289a288c4b" } Frame { msec: 2896 @@ -1234,7 +1234,7 @@ VisualTest { } Frame { msec: 2912 - hash: "7ab8cf0d0b650e8f994a9beed8be29fb" + hash: "36be9a0d4376ece0b279a118a3fab364" } Frame { msec: 2928 @@ -1250,11 +1250,11 @@ VisualTest { } Frame { msec: 2976 - hash: "f0267f59e247e24e4cf9c56f8931112b" + hash: "b17faafb59a9d182faf00495736a7fac" } Frame { msec: 2992 - hash: "ddbc73e2df4da11d5122539a00c126de" + hash: "549eb98193f0e81aee716239f872a21c" } Frame { msec: 3008 @@ -1286,7 +1286,7 @@ VisualTest { } Frame { msec: 3120 - hash: "2ad733363d239d9a3ea1c31427a3b3fe" + hash: "9506c95e1febf3d781e6b1dbbaf640d3" } Frame { msec: 3136 @@ -1294,7 +1294,7 @@ VisualTest { } Frame { msec: 3152 - hash: "53b05d8be52a74c3a24b88779d4927bf" + hash: "adef134dc735305b673c6fa47a3d1a34" } Frame { msec: 3168 @@ -1310,11 +1310,11 @@ VisualTest { } Frame { msec: 3216 - hash: "8a7ab6dc549b247f3b897e098d784dd8" + hash: "036d247dd83e0fbfe4f65cbd79e9ab57" } Frame { msec: 3232 - hash: "0a3144254f66a6b005b95a026496cd32" + hash: "959270d536187e6b669263a57b260e78" } Frame { msec: 3248 @@ -1322,7 +1322,7 @@ VisualTest { } Frame { msec: 3264 - hash: "c17922ca04f5ce9916e2907a6c28bf8b" + hash: "42a9b43e2c66a5ef32c8b6564235c623" } Frame { msec: 3280 @@ -1330,11 +1330,11 @@ VisualTest { } Frame { msec: 3296 - hash: "1f41a314699151771d7d1ca672aaba8f" + hash: "cf5c7868e399fadac1642f47a0b4dbd2" } Frame { msec: 3312 - hash: "de94c2ad2e74036d975e8402dd8b06e9" + hash: "9c689254f44a6ced1c4962400613d4da" } Frame { msec: 3328 @@ -1358,7 +1358,7 @@ VisualTest { } Frame { msec: 3408 - hash: "2f3e7040a4966e56858312f6534e9e77" + hash: "f65c57211997139ae1473951333d7b35" } Frame { msec: 3424 @@ -1370,7 +1370,7 @@ VisualTest { } Frame { msec: 3456 - hash: "6639a15d4d23540ccf63c9bea0e1689e" + hash: "191115950915abcb338c3f4c17595840" } Frame { msec: 3472 @@ -1402,7 +1402,7 @@ VisualTest { } Frame { msec: 3584 - hash: "4b2706d1215f2b5b08ac87e40ba8c21b" + hash: "e9de53c430f9de55146ac6606d55d427" } Frame { msec: 3600 @@ -1418,19 +1418,19 @@ VisualTest { } Frame { msec: 3648 - hash: "14bdec5663d1a81fa617d3b81e19f8b4" + hash: "a44936319089e2379de34edf58b453c1" } Frame { msec: 3664 - hash: "3430047eca214a217aca0bd71814f4db" + hash: "c894ceaf318dd1afe29dcfe171aadf0f" } Frame { msec: 3680 - hash: "974c431fe7030990389c7fc719655cfd" + hash: "deea3a520f3fe43bf92f05a25f791458" } Frame { msec: 3696 - hash: "d38f3153b3cf39a278dc6948ff9ef71d" + hash: "176381c4acfacecd0d203b7ad8fbd7d4" } Frame { msec: 3712 @@ -1438,35 +1438,35 @@ VisualTest { } Frame { msec: 3728 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3744 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3760 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3776 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3792 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3808 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3824 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3840 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Frame { msec: 3856 @@ -1474,7 +1474,7 @@ VisualTest { } Frame { msec: 3872 - hash: "bf2de49dc940043a955a075dcda1b52b" + hash: "21f2e0c3ba2142d1baae9406858f1cea" } Mouse { type: 2 @@ -1486,11 +1486,11 @@ VisualTest { } Frame { msec: 3888 - hash: "cf72e9ae81dcf833f7a48ffa348b8966" + hash: "e66b75e5644018aecd321e498de08ca1" } Frame { msec: 3904 - hash: "cf72e9ae81dcf833f7a48ffa348b8966" + hash: "e66b75e5644018aecd321e498de08ca1" } Mouse { type: 5 @@ -1502,7 +1502,7 @@ VisualTest { } Frame { msec: 3920 - hash: "cf72e9ae81dcf833f7a48ffa348b8966" + hash: "eb346d68bd5b51a31ee2f5d807970d96" } Mouse { type: 5 @@ -1522,7 +1522,7 @@ VisualTest { } Frame { msec: 3936 - hash: "1cea11ee435caa8515797ee5c4fb79cb" + hash: "ffd30479d99b19926072fa94cdec6195" } Mouse { type: 5 @@ -1534,7 +1534,7 @@ VisualTest { } Frame { msec: 3952 - hash: "0da1743b066a73dd19aff6b60ef76830" + hash: "207efe4cbcebaedca1d2fc6726d46543" } Mouse { type: 5 @@ -1554,7 +1554,7 @@ VisualTest { } Frame { msec: 3968 - hash: "ddace1df123421675bc9153c4017cdd0" + hash: "f011a043293362d5affcbcdfe3c93131" } Mouse { type: 5 @@ -1566,7 +1566,7 @@ VisualTest { } Frame { msec: 3984 - hash: "0c57fe8eef4e41e326dbc82f7b6ae87b" + hash: "934ed8956abae51fd19352f23ef9a16a" } Mouse { type: 5 @@ -1586,151 +1586,151 @@ VisualTest { } Frame { msec: 4000 - hash: "53968b4b57c09fe0b47e720031c1eed7" + hash: "0daf00b242485319f5c9050b9cdb6775" } Frame { msec: 4016 - hash: "2ab593b498892bf8bacef875e524284f" + hash: "8111f56ae5cfcf1d6c934e134602a8dc" } Frame { msec: 4032 - hash: "da77708f525ab9d1d3f760595a1f9efa" + hash: "6f3f6c2ae3c36401d1d96a37bbd62c52" } Frame { msec: 4048 - hash: "ce73ecb012139dda8e21cb0dce95582a" + hash: "11cde9b9369addaa5ff140e3a0bbf9ac" } Frame { msec: 4064 - hash: "086754b023addbbecf3b361382133279" + hash: "fefd7d44805c330c606fcc23b691832e" } Frame { msec: 4080 - hash: "adcb9881f246993ff35af24f8750ea2f" + hash: "b9eb8f8a78485deafc04a9bac39e5c31" } Frame { msec: 4096 - hash: "974b423c99316c9a5b2e097bb3a42fcc" + hash: "f0be22ea55a6a9621718cb5e1b55e6f7" } Frame { msec: 4112 - hash: "e37263abe79b203cfc4306aa7e5c4853" + hash: "cb0d62b8c16406a0ff35feea3ff074b9" } Frame { msec: 4128 - hash: "0136eaf2704a5af80f8ba26bbb7f51da" + hash: "15bf986b1e4072ce48ef40651e11a93a" } Frame { msec: 4144 - hash: "55fe0338e24aa91790f2cd466464acae" + hash: "d29f81f0c8468ea045f1c21adca8c0e6" } Frame { msec: 4160 - hash: "9fa5eaebd34e2af136a2894f360301a5" + hash: "577f27fd6212bbb7394b64b0872d7e6e" } Frame { msec: 4176 - hash: "c48822e620b788947d8a5ec850d6313b" + hash: "f26c83a4ede9e04ceabf276fd2eeaa4d" } Frame { msec: 4192 - hash: "ec763070f81e115a5e471923aa539683" + hash: "34f449f3c29c4b0bb0972e8d3510452c" } Frame { msec: 4208 - hash: "2aa84ad9ef88313a4c63e91bba959920" + hash: "5cf950b9f0bb8c851a2865718bd3e6ec" } Frame { msec: 4224 - hash: "14cf7ba825d704c4acc72670fd868d6c" + hash: "202b5c9cd1717dfef0d1f667ca115571" } Frame { msec: 4240 - hash: "987bf945cd9c1cfe5bbb17442daa4f26" + hash: "5d703db8af0eeba0327177f79b0fd85b" } Frame { msec: 4256 - hash: "5d4d80565bf4f522c79044d0df55a1fd" + hash: "69e4fdbaba2ad4983edcbaad0ccfa905" } Frame { msec: 4272 - hash: "d0a5ec7ff2c5b64c6691888412d0cc6d" + hash: "c91389bd9e9c7fce2a8e5ffca851cf89" } Frame { msec: 4288 - hash: "93750528b6f27df22423eb957a07b55f" + hash: "5e2b94dda5af845a368032cc85e3167f" } Frame { msec: 4304 - hash: "65fd0474f918bac61b46fde8ed8e3b59" + hash: "5946e2bd9a32130fed9612d6152b7ddd" } Frame { msec: 4320 - hash: "cd15f6499863ef84f0ad3b2ff48d6406" + hash: "74f13b9111005e610028ea252132c1fc" } Frame { msec: 4336 - hash: "65101124208b062de9718b34fb43425b" + hash: "ba2a587b26fd3d92a368e3b63513e145" } Frame { msec: 4352 - hash: "cb42d683dc5e4020891601afb0a77947" + hash: "2047ecb0be3173846b7c09b7054bad07" } Frame { msec: 4368 - hash: "88fdddbf2f766ffff7e77c7612d9cfee" + hash: "db6993dfaad694f812130c112e9c78b6" } Frame { msec: 4384 - hash: "776c63f1bbc40624d7fedd6141fbdd97" + hash: "aea54cad7368b8511412f4d9fd1e8b07" } Frame { msec: 4400 - hash: "24f11b5abb33d8f180a56fca6f15ef45" + hash: "431d140c8e9a61f6c1fe7a044900b4b7" } Frame { msec: 4416 - hash: "71d9ab083d15b57336ee278793815713" + hash: "ed80bccd69ebd4326b01fdf46b56dd52" } Frame { msec: 4432 - hash: "b48e64cb1b8b39e7001af4e7c7d22098" + hash: "edd82b44bd2813f2bf20bbf8be4ad10d" } Frame { msec: 4448 - hash: "587ef2440cd021038cc902a3b1839ff4" + hash: "527b3fb45d585f70ef2ef2e78d2fff05" } Frame { msec: 4464 - hash: "99e0485247c907c5b6e0f8d5dc7b8977" + hash: "00b68c12c6cef0b523eeef8c7556a26c" } Frame { msec: 4480 - hash: "3b2496d61eefaa413f0688afed150749" + hash: "37c62b1c2c3d70220b1d7b28a57de0a5" } Frame { msec: 4496 - hash: "0144d27095182c58e50ae1ccdbfaa05e" + hash: "e73843907eb7ee18c59b5fe98022f542" } Frame { msec: 4512 - hash: "06237be375826d2434dc564dd2eaf165" + hash: "139d84bfdefd825a89ddd4150a72fa9f" } Frame { msec: 4528 - hash: "7235d512503b134ac267b7128163eea2" + hash: "779690a2e5291b7d64ceed193bf8e572" } Frame { msec: 4544 - hash: "5d5f7ff9bd0a4aa316b764bec8524fe0" + hash: "4ffd9beb48bd769d9e3b8ad3aedff08b" } Frame { msec: 4560 - hash: "9be01e649140f950cd882af2e8e1e27c" + hash: "b1edf784de34b42bd74390836db976b9" } Frame { msec: 4576 - hash: "0773e5d219d6fc4f2d385fd1bcd17f93" + hash: "78327706741822e6ba8b0b88be469422" } Frame { msec: 4592 @@ -1738,55 +1738,55 @@ VisualTest { } Frame { msec: 4608 - hash: "6f87571a59aa358755d80e94894fe7a9" + hash: "8274a35f384478ca2f018c5d914d428d" } Frame { msec: 4624 - hash: "0e31c55386e8838f52024c49d4929710" + hash: "70f4b77c65450eddfa61ebdf2dc75985" } Frame { msec: 4640 - hash: "7d6c89f5fae7990643687512f2294449" + hash: "2f95623085afc48094f122c290566440" } Frame { msec: 4656 - hash: "f8542ff33dbad93ed51a0801bd8af778" + hash: "8f671bd7878b897593eb8ae0358c8a01" } Frame { msec: 4672 - hash: "8bed907fe5b04eec118ac4e7759386ae" + hash: "64cf5c749c85d0e42b6c99f31da955b8" } Frame { msec: 4688 - hash: "d84facac927215d8d83bd9e375fbace1" + hash: "22e3394e779e25cc0d6c05bd2c6159d5" } Frame { msec: 4704 - hash: "f1c8b7dc9897713487fcc62c697f41ff" + hash: "42bc5633692228e48aa3ce3e3d8a7bbe" } Frame { msec: 4720 - hash: "611c45384b2abd883a4e3ec3bb30ebd3" + hash: "4dd05fce6984dbc6b6764b5e4189fd94" } Frame { msec: 4736 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4752 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4768 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4784 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4800 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4816 @@ -1794,62 +1794,62 @@ VisualTest { } Frame { msec: 4832 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4848 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4864 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4880 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4896 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4912 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4928 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4944 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4960 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4976 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 4992 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 5008 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 5024 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 5040 - hash: "63e075c2cac3770e657217989cc7d80f" + hash: "ca7b9bc30c728268b338848230a5a859" } Frame { msec: 5056 - hash: "34967fb7248c860643bdc01e0135309f" + hash: "d30be31c0f9d92aeba83ce345551005a" } } diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png index da688c7..af0e781 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png index 618d238..d3e98dc 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png index 0688ed1..9c6c1c3 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png index ec6e330..fc1574a 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png index 1692d17..f76ae14 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png index d70704d..f6b8e83 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png index f8f37c6..be041d8 100644 Binary files a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png and b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.6.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml index 3828e76..32c2a15 100644 --- a/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml +++ b/tests/auto/declarative/qmlvisual/qdeclarativepathview/data/test-pathview.qml @@ -226,7 +226,7 @@ VisualTest { } Frame { msec: 640 - hash: "6cdaa8ffc906ade671fe259711e76f24" + hash: "51c14d87d2cf89aaece5bd682008f67f" } Mouse { type: 5 @@ -258,7 +258,7 @@ VisualTest { } Frame { msec: 672 - hash: "76fdf4cb75376ec3a9e084d93765c5cb" + hash: "1bfd848a89a0477596b77903a173f728" } Mouse { type: 5 @@ -286,15 +286,15 @@ VisualTest { } Frame { msec: 688 - hash: "b12e86c13e012c5992930b3e559c337c" + hash: "f66f04b42b0db33b852a82030d647886" } Frame { msec: 704 - hash: "4056e78a59e8f1e030f3e3a51c436b46" + hash: "e1573c6fd92f0fc4e267a37f417d0bc0" } Frame { msec: 720 - hash: "c84781b7586943ef889b8911c23e91db" + hash: "017044987c781ad8bb4cd8242f9091ed" } Frame { msec: 736 @@ -306,7 +306,7 @@ VisualTest { } Frame { msec: 768 - hash: "ef6319b262fc299b14b40d1521f9c9c3" + hash: "cb9e1ef51c8367e0b8c71cfdb70906fa" } Frame { msec: 784 @@ -326,11 +326,11 @@ VisualTest { } Frame { msec: 848 - hash: "2e01e2e252ca9fb3e7107f04a3ba4031" + hash: "c684dc3153314fe3a73fa0dd09f27695" } Frame { msec: 864 - hash: "547a9f25404c2bf7737526faf67a459d" + hash: "f1d5e911a68f9922f29bb6ae14234da9" } Frame { msec: 880 @@ -490,7 +490,7 @@ VisualTest { } Frame { msec: 1248 - hash: "ac97616fc3c54711bb067cc72c15d4c5" + hash: "1cea77e58dbf1c9f321eab2f01f37be0" } Mouse { type: 5 @@ -554,7 +554,7 @@ VisualTest { } Frame { msec: 1312 - hash: "4e0a90dda433c1615ea367ec90917409" + hash: "11717eaf13ac83760984afa47bbd52f7" } Frame { msec: 1328 @@ -566,7 +566,7 @@ VisualTest { } Frame { msec: 1360 - hash: "0abbf36b5e3f2db9288bde05825dc111" + hash: "514d400cdc9c356a0de3c04649d885dc" } Frame { msec: 1376 @@ -574,11 +574,11 @@ VisualTest { } Frame { msec: 1392 - hash: "430d7719ebf3b5835af92683cff10e56" + hash: "ab04af0d0f0f0d4538ec58841306cea7" } Frame { msec: 1408 - hash: "411a8fe1ee3a0510574cbf6a69d23456" + hash: "5cbc813c467b453c3e8de177aaede5b6" } Frame { msec: 1424 @@ -602,7 +602,7 @@ VisualTest { } Frame { msec: 1504 - hash: "cf360de1c6649e45beb974ddbe436ea9" + hash: "24421668a7814c3db8b7d1e50d2e9137" } Frame { msec: 1520 @@ -626,11 +626,11 @@ VisualTest { } Frame { msec: 1600 - hash: "faf898388f87948fbacd74589cb18af0" + hash: "a4a436b32e96fe5f9c3309bd1cabe65a" } Frame { msec: 1616 - hash: "b818181b3fee6f5a35a0da6c0f8e240e" + hash: "cb801c9d2b7f04a0413898ea74c61f80" } Mouse { type: 2 @@ -694,7 +694,7 @@ VisualTest { } Frame { msec: 1680 - hash: "684a17820c3693d893f8199cd7c7076f" + hash: "38e396c6fa5754d0070e4fd17ab2dc8b" } Frame { msec: 1696 @@ -714,15 +714,15 @@ VisualTest { } Frame { msec: 1760 - hash: "c36b60f81e7de5c0e5a59655041adff2" + hash: "ba1a6b8e55d7c5d73b371c8821f8caa2" } Frame { msec: 1776 - hash: "297abbc6b38a1909324fcee6d8b1d908" + hash: "ec19910e0f7b3e218d5a1992a7d00c4a" } Frame { msec: 1792 - hash: "0af89e3bab7c517f375897239ea35153" + hash: "7ca87adb6f69c5530be9da6df6b1d9a9" } Frame { msec: 1808 @@ -730,27 +730,27 @@ VisualTest { } Frame { msec: 1824 - hash: "57e1e871cbbc627f2fb9bf5583c4f097" + hash: "3da4fe69c1d6904a36d95bcd43f52195" } Frame { msec: 1840 - hash: "5220aecdd1516d94f0698e79f17fee57" + hash: "3cdb89ceb3ee66349b8a19301cc58e3d" } Frame { msec: 1856 - hash: "f3d8c908e61e5d61bbeeb9c6b5e8a704" + hash: "98088442867a0f1ec90144c531c9c5fb" } Frame { msec: 1872 - hash: "f27867aeb39ef64ebd50b5d79b69337e" + hash: "22d87a7d6409e2ce659a869dce57eef8" } Frame { msec: 1888 - hash: "b807b4e74a0f008df3f4534901debe38" + hash: "c1466f188c724c889017db70e2d60153" } Frame { msec: 1904 - hash: "e19832a0a7fcd57efe46cb0102a8d418" + hash: "e5392d308078449277be8d2f57561551" } Frame { msec: 1920 @@ -762,15 +762,15 @@ VisualTest { } Frame { msec: 1952 - hash: "746c60e03c50dc2e28c62fe52a8dd9d2" + hash: "8d6a232f303e48c9366dbf265cedf958" } Frame { msec: 1968 - hash: "27d6da44b605cb38552147fdf451ef45" + hash: "c6bc2031a4c59eb7a5b34e663252e91c" } Frame { msec: 1984 - hash: "c41d5491c417531ee86ac6ec8571c6a8" + hash: "bf8be42cdcdcfd205c8cb7e937ff5d0d" } Frame { msec: 2000 @@ -782,11 +782,11 @@ VisualTest { } Frame { msec: 2032 - hash: "0850d4b73a664ee0f1ed6d6e0615ea80" + hash: "9a2c8dd1883824415f5825a2a5cf3d09" } Frame { msec: 2048 - hash: "ae6cb0bfda1cea70b3641251d0dc60c4" + hash: "78e31d9b30619ee5774d3cf10b5af762" } Frame { msec: 2064 @@ -798,7 +798,7 @@ VisualTest { } Frame { msec: 2096 - hash: "2081c1ffe35f20dd827b3d9f52be90b3" + hash: "6a2f7dde022d4044e8772b8fcc28b02e" } Frame { msec: 2112 @@ -806,11 +806,11 @@ VisualTest { } Frame { msec: 2128 - hash: "7f289e50f1bbd570b6bc2ca1998f8493" + hash: "662402cd180eb325c174b6935a9d3f0a" } Frame { msec: 2144 - hash: "8bb3a37f416032d40cb5f919abb42e30" + hash: "8eb192c9d01fe205ddcba2d5cadab65f" } Frame { msec: 2160 @@ -818,7 +818,7 @@ VisualTest { } Frame { msec: 2176 - hash: "d3e8aae08a2518c039d6bda80fc520a4" + hash: "bc0ee50215b6b31422ee423f7955770c" } Frame { msec: 2192 @@ -826,11 +826,11 @@ VisualTest { } Frame { msec: 2208 - hash: "8eebcff152288a4ab2a3e64fd7ba6f80" + hash: "0ce5216f041f657a96ae4693319bfad3" } Frame { msec: 2224 - hash: "85fe363271d480163fb7847a3501472f" + hash: "0370a09ab78439e9df487ea55853ef98" } Frame { msec: 2240 @@ -854,15 +854,15 @@ VisualTest { } Frame { msec: 2320 - hash: "029428301287e4c7cd2f8a1fa6a25381" + hash: "44ecad3423a36882755fad6fb79bc2c8" } Frame { msec: 2336 - hash: "aef25177af3511dc99004a1e37f7f5d3" + hash: "b3eaadeb9d3b008fcf21c58158e8b028" } Frame { msec: 2352 - hash: "f9e11fd7023a72366dacaaf19b2eb81c" + hash: "110b000fa3e122560480d466fe231b21" } Frame { msec: 2368 @@ -874,7 +874,7 @@ VisualTest { } Frame { msec: 2400 - hash: "39df3050c4100e8a4f6e648b4aa16ba7" + hash: "65c1f85d2086f5e6d95d9b99a84281a5" } Frame { msec: 2416 @@ -882,7 +882,7 @@ VisualTest { } Frame { msec: 2432 - hash: "54d50f6c980cb04a1634622a29a6f0e9" + hash: "f00ea591d697546b5afe4420b702db49" } Frame { msec: 2448 @@ -1274,7 +1274,7 @@ VisualTest { } Frame { msec: 3264 - hash: "849ffa1fdd718a48e9570b88987f9203" + hash: "dc7f5231d844b36e1429f1072080a60c" } Mouse { type: 5 @@ -1294,7 +1294,7 @@ VisualTest { } Frame { msec: 3280 - hash: "d497eff3c8879d30619630e7ffcbf5c9" + hash: "161410fe9eb458c717cfbb9ef0626535" } Mouse { type: 5 @@ -1314,7 +1314,7 @@ VisualTest { } Frame { msec: 3296 - hash: "b0679dfe2f631e41f5cc269bd16d742c" + hash: "91a884de3e19dc6ca7fcde32492b3ff1" } Mouse { type: 5 @@ -1354,7 +1354,7 @@ VisualTest { } Frame { msec: 3328 - hash: "ea3cff28ff3be273332b19a2b8acb95e" + hash: "ed299cd4ef2364ab1d7b702e2b0a7233" } Mouse { type: 5 @@ -1374,7 +1374,7 @@ VisualTest { } Frame { msec: 3344 - hash: "458decd62af57d333a07459c89e62393" + hash: "4346ad16720e853154bfc1a22d9e7f55" } Mouse { type: 5 @@ -1422,11 +1422,11 @@ VisualTest { } Frame { msec: 3408 - hash: "0f53231de64ac5b0503e92ad10155dea" + hash: "fb7b31720b9de8d820ce29d9861482dd" } Frame { msec: 3424 - hash: "f2be693c23ea0885d6e8180c3062ba76" + hash: "4bb82c8b498b41e0785bea6b2c52b5e6" } Frame { msec: 3440 @@ -1434,7 +1434,7 @@ VisualTest { } Frame { msec: 3456 - hash: "ba86efade16e8965f59f6257ae90d131" + hash: "04f3c7a5cb270405446cbb85da8c1c16" } Frame { msec: 3472 @@ -1446,23 +1446,23 @@ VisualTest { } Frame { msec: 3504 - hash: "c822447614f47b5e15ffad967964a061" + hash: "3b0dce0a781799bd24073a6dc9717f68" } Frame { msec: 3520 - hash: "5eb2e64f11847cc9360291e14e866611" + hash: "1f6fc9f37a02e54418d90307f06c5b6f" } Frame { msec: 3536 - hash: "545dcc2645b50d78c84c658880d0500c" + hash: "a1116c06874af67ff54d69009f78d4da" } Frame { msec: 3552 - hash: "9d984e07b99137b3cb57dd4df16b8237" + hash: "4717c402fc7ad0d3f44b9944672d2746" } Frame { msec: 3568 - hash: "da27085e7a3cccde7cc3db2d9c6cc2cd" + hash: "7a180273295e9a30f5e26cdb080b87f2" } Frame { msec: 3584 @@ -1470,7 +1470,7 @@ VisualTest { } Frame { msec: 3600 - hash: "bfb5ed7b65f36d80e3156560a0ec58b7" + hash: "3cee427f42e8ccd33e9fccd903ae6f1d" } Frame { msec: 3616 @@ -1478,7 +1478,7 @@ VisualTest { } Frame { msec: 3632 - hash: "1c36be8deb2079ed81f1718c92e44803" + hash: "25779cf68847c0a132ea4aed6a5ef4d3" } Frame { msec: 3648 @@ -1490,11 +1490,11 @@ VisualTest { } Frame { msec: 3680 - hash: "1551c4aae06a258bdadc9ef356724871" + hash: "9f3c20980b481806ce7c1b33c177a049" } Frame { msec: 3696 - hash: "526aec43f710e524d247f8a4b08c261c" + hash: "5fb403dc08f95fb0651dcd33d32ef6c0" } Mouse { type: 2 @@ -1514,7 +1514,7 @@ VisualTest { } Frame { msec: 3712 - hash: "b50ef7198c1831623ed2210e651ac618" + hash: "c6422e39ed268dd67846e55908bc6f21" } Mouse { type: 5 @@ -1586,7 +1586,7 @@ VisualTest { } Frame { msec: 3776 - hash: "ecf04273061af5f881925f3a33015fbb" + hash: "8c30751e1d1e443b5ad217151e8e8fc8" } Mouse { type: 5 @@ -1626,7 +1626,7 @@ VisualTest { } Frame { msec: 3808 - hash: "4a1dbbac65a3caac16b38c45be61003c" + hash: "e621e9486e10332d937417a0b6be6be7" } Mouse { type: 5 @@ -1706,7 +1706,7 @@ VisualTest { } Frame { msec: 3872 - hash: "fd2eab6b3a65713f057da22a412512c7" + hash: "f6495f86ae29c7a996b3302300e98f75" } Mouse { type: 5 @@ -1766,7 +1766,7 @@ VisualTest { } Frame { msec: 3920 - hash: "fd18bd5f8f09c995f122b8b4ecb80279" + hash: "3a303646ea0fd126ee00c847efa48d0c" } Mouse { type: 5 @@ -1854,7 +1854,7 @@ VisualTest { } Frame { msec: 4016 - hash: "b00b78122721ddcded2c7131cfe40d53" + hash: "3cc1355449b8ec7209537fedb0af43b1" } Frame { msec: 4032 @@ -1862,7 +1862,7 @@ VisualTest { } Frame { msec: 4048 - hash: "076fefc33455667af954dcc5a06017d3" + hash: "2f4e6b57c6a4fa1689e585214f35702a" } Frame { msec: 4064 @@ -1870,19 +1870,19 @@ VisualTest { } Frame { msec: 4080 - hash: "12e6711077da076b737aef1aaa336d42" + hash: "68165bd37b4cb1609d686a361ae54e06" } Frame { msec: 4096 - hash: "1e19329fb839a00faa3b95d13b7a9015" + hash: "436e81734e23502ef8604145d5892c41" } Frame { msec: 4112 - hash: "7469fb57ce0b7ea9a7cc6da14f6a245a" + hash: "93f005a5a6a989db3e1702fa4f11f6ee" } Frame { msec: 4128 - hash: "17e3aca0838e2ba75cc9b869bb969220" + hash: "7d00d2a606d92cb8c0726c14cba0f989" } Frame { msec: 4144 @@ -1994,7 +1994,7 @@ VisualTest { } Frame { msec: 4448 - hash: "a29d4b3fa16829823e63bf83e7b62aff" + hash: "96815da788d9968a173e7005d3ca8bff" } Mouse { type: 5 @@ -2014,7 +2014,7 @@ VisualTest { } Frame { msec: 4464 - hash: "d8f9d016318e0bd38d4654b4850da952" + hash: "6949c70729c3e43bc59cc12d4bb82d8f" } Mouse { type: 5 @@ -2034,7 +2034,7 @@ VisualTest { } Frame { msec: 4480 - hash: "13a2382e08ab10ecb40f9c24c682a797" + hash: "26ce66ebfa6eec9eab4d987ef4ec5d5f" } Mouse { type: 5 @@ -2054,7 +2054,7 @@ VisualTest { } Frame { msec: 4496 - hash: "cef145c5d105466f3913bb81bb2b58df" + hash: "46e206837a34ba4d418c4e1098b49fd8" } Mouse { type: 5 @@ -2074,7 +2074,7 @@ VisualTest { } Frame { msec: 4512 - hash: "9bc0a21266bebbf8fc3509e5f92dd77f" + hash: "ac7451dcd3f1359ca2850bd986c22994" } Mouse { type: 5 @@ -2086,7 +2086,7 @@ VisualTest { } Frame { msec: 4528 - hash: "e419dbe857667b014e4dd9b57b01bbe4" + hash: "f9179ba9c011bc1492daf0d22f7e85e0" } Mouse { type: 5 @@ -2098,7 +2098,7 @@ VisualTest { } Frame { msec: 4544 - hash: "411cb7a7f331161059faba4ae6549229" + hash: "8db5ba9548ecad76b889d9024f59b5cf" } Mouse { type: 5 @@ -2110,7 +2110,7 @@ VisualTest { } Frame { msec: 4560 - hash: "b008d6b2b444881c36521595f6b31539" + hash: "30375b9f69ca4ac1b67ff208fd18817f" } Mouse { type: 5 @@ -2122,7 +2122,7 @@ VisualTest { } Frame { msec: 4576 - hash: "77fcc3c74c3832ae6b80aec420cb06e0" + hash: "3ba2bd45231cdea3bd9f868c9d35f91e" } Mouse { type: 5 @@ -2142,59 +2142,59 @@ VisualTest { } Frame { msec: 4592 - hash: "41d1c54bc76caeae057fb1bdb3b93843" + hash: "50646478058ada031f29b5df661e734e" } Frame { msec: 4608 - hash: "03fdd91b352798b1ff958c23c0bc5f35" + hash: "ab6f2fb209650dbf83710f3299db8907" } Frame { msec: 4624 - hash: "2098ea8b55b54ca8dd648fb285c43ebf" + hash: "dbec24d44d19b834e9a4936c960c4295" } Frame { msec: 4640 - hash: "9929c509654819fd04da4e4b5c8e22b4" + hash: "09c41872193e4a6eab37b35ef4e90465" } Frame { msec: 4656 - hash: "c470d3a57c6b56f9f56b176823b27d53" + hash: "1778dc99de59e28a730a1439a7576abb" } Frame { msec: 4672 - hash: "37474b3a23f90dafee6b9e0043a702fa" + hash: "6dbbdb5b4e6c6870b5dd62b1b94f9dd3" } Frame { msec: 4688 - hash: "0fbb6a9fded011b010fa6f3a2819630c" + hash: "3b5cf826c12339c0c635ae1ffcd431e7" } Frame { msec: 4704 - hash: "6c5a7dad864999548257e4bf0ddc3687" + hash: "6d6068c26eea67214fd3529ab84ab5b5" } Frame { msec: 4720 - hash: "339bc42e559c66d07f37af5e06feacef" + hash: "54cbc4842acb46254746984936656c5b" } Frame { msec: 4736 - hash: "513dc773dc93275e32fa9ac61e6dcb46" + hash: "10707bae5274ad29ac3e4aea320a30bf" } Frame { msec: 4752 - hash: "b725c84435b1f387dc3f375280e39de6" + hash: "ad288c8afc21a87077bae47cbaed1a46" } Frame { msec: 4768 - hash: "f3d04b513df286aacb9ebdb107d7a0b4" + hash: "bc1c391b0d7a56276b7c082aa2882e47" } Frame { msec: 4784 - hash: "c22839005ed0cb6b2fa9c958d17fd948" + hash: "c62341687ca048da1551eb708c7e8a19" } Frame { msec: 4800 - hash: "2fb9a2d5d22a6d0ed567328ffaa512f0" + hash: "1a4e3bb688d6fcfe937f53f8179b21e0" } Frame { msec: 4816 @@ -2202,115 +2202,115 @@ VisualTest { } Frame { msec: 4832 - hash: "ba13b0b4790aec7084b5553fe0b0d72b" + hash: "0646877fe2f6935ca4b34495abed5919" } Frame { msec: 4848 - hash: "2bc983733d4004cc67a56d77e9f48e5d" + hash: "46899d9c0a188671d9b7ec01c827ad03" } Frame { msec: 4864 - hash: "0f729cbe41b155b6eef20a4be207b853" + hash: "85cd8aa6dfa28c5d2e10f1ff83644d8f" } Frame { msec: 4880 - hash: "c2ca47a7d70ef827029b32c11a052b83" + hash: "323711ddd10147f51d903f524195b9fe" } Frame { msec: 4896 - hash: "803aefca7f1cbd494d2d2f7e7eea9a3f" + hash: "ba6b46ac25a4f111c926522fc47d7367" } Frame { msec: 4912 - hash: "2641683e1fa9ed418ac89631be7922f1" + hash: "5dab5804d66b6aa8e4f73246c3b19557" } Frame { msec: 4928 - hash: "3d9370305ca147625828f7ee3b34ca33" + hash: "2cac21d8e33bc01431a6aedabba3ce18" } Frame { msec: 4944 - hash: "5cdfdd22a0dc1ed78035ae4b5e2e26a7" + hash: "e1edf4268e206a40543d1a6caa4d0b43" } Frame { msec: 4960 - hash: "2af663981b43dbe699849eff4731829a" + hash: "4989e920c0d173e68c3de730a5f4f877" } Frame { msec: 4976 - hash: "b159d3a09666327bd2d860bf56920734" + hash: "9840b722350840b56b096fda3a70f8e8" } Frame { msec: 4992 - hash: "a1ed6f686f4cda9aa59bfd49deb8a075" + hash: "261b7a66300ff2a9b761dd70d02ed490" } Frame { msec: 5008 - hash: "c5f1862e7cbb1dcd6b303e58c525ab5c" + hash: "7b6ffb01c050c31bfb433077c8336ed9" } Frame { msec: 5024 - hash: "3cc5e5d87067978961eee6e7b33ada06" + hash: "f8a20f8fe943b498dae9ba8fed113496" } Frame { msec: 5040 - hash: "74f3b0eae443bd9f171020fd973ca960" + hash: "e66b0f50bae2d0bba73f415af2c8dba1" } Frame { msec: 5056 - hash: "432037812ab1a09e0d0b32dfaf0f876e" + hash: "c82bb5035ff84c955f34f1189dcdbda4" } Frame { msec: 5072 - hash: "0eec7146b8df3b4892e89abd13b8bc9d" + hash: "8fce2628032b2a1f16373e721671ab8c" } Frame { msec: 5088 - hash: "a01dc5f4b4307aa66068d21159dd64d5" + hash: "e260e978d88301448eb56145e0fdfd07" } Frame { msec: 5104 - hash: "11eefdf5b1be8493a6ed9aaf519c7e17" + hash: "7c5d5bfdabf8b7f1d01fb1761ec976b3" } Frame { msec: 5120 - hash: "55ed797b82f5bca2ac2b5954c44c041e" + hash: "eeb8f15a4cbecf4013f48015ebb1840d" } Frame { msec: 5136 - hash: "498d4ca9faabf8b59e2359b60dc1aff2" + hash: "fb7bbed845f6fd5648c73431b0e4f65a" } Frame { msec: 5152 - hash: "78895368b141ab6d3a16f65f4389b2d5" + hash: "6e944ef5057031fc6a56ea27036c953a" } Frame { msec: 5168 - hash: "c73b27167bad79f3f3c5ebb64fa579c2" + hash: "0f96b7d876cb893081606ff93f7cf5c7" } Frame { msec: 5184 - hash: "fb05312d65155f0300f456d727698b80" + hash: "5904e4105e1108427a2826f24f82b293" } Frame { msec: 5200 - hash: "6e974736a0ecea6a71c1a7052a14fa20" + hash: "79a79fd11348a5a250d132a151446711" } Frame { msec: 5216 - hash: "f5daf5bec03d3e56c877e9b2dc5701b6" + hash: "edfed341f047b923aea434a3c31c8c27" } Frame { msec: 5232 - hash: "29793d2147563feb9ed0ebff18b303cd" + hash: "06e8e9e202b395dc3b230b1b7a982bf8" } Frame { msec: 5248 - hash: "5b63dfa3cb7ac0847f2e63f9d2a0b2b6" + hash: "d2ba2520683cdb64d366ab44a54b4668" } Frame { msec: 5264 - hash: "cf2f42dd9830d80f50df30e93a0b1ad2" + hash: "94b1e8a018f17f761de164a8acf4d68a" } Frame { msec: 5280 -- cgit v0.12 From 77cba04c244c47c77af04777de3b3172c309b541 Mon Sep 17 00:00:00 2001 From: Alan Alpert Date: Mon, 10 Jan 2011 15:01:11 +1000 Subject: Fix word selection in QLineControl Word selection occasionally selected the word beforehand as well, in both QLineEdit and TextInput. Visual Test included to verify behavior. Task-number: QTBUG-15818 Reviewed-by: Martin Jones --- src/gui/widgets/qlinecontrol.cpp | 4 +- .../data-X11/qtbug-15818.0.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.1.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.2.png | Bin 0 -> 573 bytes .../data-X11/qtbug-15818.3.png | Bin 0 -> 647 bytes .../data-X11/qtbug-15818.4.png | Bin 0 -> 647 bytes .../data-X11/qtbug-15818.5.png | Bin 0 -> 625 bytes .../qdeclarativetextinput/data-X11/qtbug-15818.qml | 1039 ++++++++++++++++++++ .../qdeclarativetextinput/qtbug-15818.qml | 13 + 9 files changed, 1054 insertions(+), 2 deletions(-) create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml create mode 100644 tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml diff --git a/src/gui/widgets/qlinecontrol.cpp b/src/gui/widgets/qlinecontrol.cpp index 5ea9dc4..12607c1 100644 --- a/src/gui/widgets/qlinecontrol.cpp +++ b/src/gui/widgets/qlinecontrol.cpp @@ -541,10 +541,10 @@ void QLineControl::draw(QPainter *painter, const QPoint &offset, const QRect &cl */ void QLineControl::selectWordAtPos(int cursor) { - int c = m_textLayout.previousCursorPosition(cursor, QTextLayout::SkipWords); + int c = m_textLayout.previousCursorPosition(cursor+1, QTextLayout::SkipWords); moveCursor(c, false); // ## text layout should support end of words. - int end = m_textLayout.nextCursorPosition(cursor, QTextLayout::SkipWords); + int end = m_textLayout.nextCursorPosition(c, QTextLayout::SkipWords); while (end > cursor && m_text[end-1].isSpace()) --end; moveCursor(end, true); diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.0.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.1.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png new file mode 100644 index 0000000..fc34b1a Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.2.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png new file mode 100644 index 0000000..fb2c90b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.3.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png new file mode 100644 index 0000000..fb2c90b Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.4.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png new file mode 100644 index 0000000..e2231ff Binary files /dev/null and b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.5.png differ diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml new file mode 100644 index 0000000..790dffa --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/data-X11/qtbug-15818.qml @@ -0,0 +1,1039 @@ +import Qt.VisualTest 4.7 + +VisualTest { + Frame { + msec: 0 + } + Frame { + msec: 16 + image: "qtbug-15818.0.png" + } + Frame { + msec: 32 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 48 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 64 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 80 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 96 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 112 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 128 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 144 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 160 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 176 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 192 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 208 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 224 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 240 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 256 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 272 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 288 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 304 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 320 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 336 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 352 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 368 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 384 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 400 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 416 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 432 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 448 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 464 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 480 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 496 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 512 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 528 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 544 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 560 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 576 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 592 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 608 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 624 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 640 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 656 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 672 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 688 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 704 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 720 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 736 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 752 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 768 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 784 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 800 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 816 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 832 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 848 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 864 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 880 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 26; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 896 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 912 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 928 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 944 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 960 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 976 + image: "qtbug-15818.1.png" + } + Frame { + msec: 992 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1008 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1024 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1040 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1056 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1072 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1088 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1104 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 27; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1120 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1136 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1152 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1168 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1184 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1200 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1216 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1232 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1248 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1264 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1280 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1296 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1312 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1328 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1344 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1360 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1376 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1392 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1408 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1424 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1440 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1456 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1472 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1488 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1504 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1520 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1536 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1552 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1568 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1584 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1600 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1616 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1632 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1648 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1664 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1680 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1696 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1712 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1728 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1744 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1760 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1776 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Frame { + msec: 1792 + hash: "8833dfac6aae78ce1309222cc4438e6f" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1808 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1824 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1840 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1856 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1872 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1888 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1904 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1920 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 1936 + image: "qtbug-15818.2.png" + } + Frame { + msec: 1952 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 1968 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 1984 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2000 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2016 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2032 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2048 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2064 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 43; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2080 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2096 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2112 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2128 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2144 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2160 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2176 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2192 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2208 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2224 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2240 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2256 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2272 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2288 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2304 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2320 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2336 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2352 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2368 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2384 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2400 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2416 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2432 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2448 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2464 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2480 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2496 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2512 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2528 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2544 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2560 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2576 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2592 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2608 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2624 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2640 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2656 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2672 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2688 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 2 + button: 1 + buttons: 1 + x: 54; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2704 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2720 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2736 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2752 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2768 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2784 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 5 + button: 0 + buttons: 1 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2800 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2816 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2832 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Frame { + msec: 2848 + hash: "0a63463fc1004efffd15f9524bcf3a29" + } + Mouse { + type: 4 + button: 1 + buttons: 1 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2864 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2880 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2896 + image: "qtbug-15818.3.png" + } + Frame { + msec: 2912 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2928 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2944 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2960 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 2976 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Mouse { + type: 3 + button: 1 + buttons: 0 + x: 55; y: 9 + modifiers: 0 + sendToViewport: true + } + Frame { + msec: 2992 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3008 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3024 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3040 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3056 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3072 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3088 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3104 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3120 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3136 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3152 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3168 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3184 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3200 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3216 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3232 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3248 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3264 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3280 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3296 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3312 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3328 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3344 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3360 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3376 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3392 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3408 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3424 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3440 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3456 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3472 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3488 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3504 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3520 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3536 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3552 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3568 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3584 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3600 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3616 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3632 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3648 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3664 + hash: "270462ec02bce658757e0ea4fb2136b1" + } + Frame { + msec: 3680 + hash: "270462ec02bce658757e0ea4fb2136b1" + } +} diff --git a/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml new file mode 100644 index 0000000..59710a4 --- /dev/null +++ b/tests/auto/declarative/qmlvisual/qdeclarativetextinput/qtbug-15818.qml @@ -0,0 +1,13 @@ +import QtQuick 1.1 +//Test that doubleclicking on the front of a word only selects that word, and not the word in front + +Item{ + width: 200 + height: 100 + TextInput{ + anchors.fill: parent + readOnly: true + selectByMouse: true + text: "abc a cba test" + } +} -- cgit v0.12 From 7aae8a569809208318ad06017eda39c860c1b2a9 Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 10 Jan 2011 15:29:03 +1000 Subject: Add no warnings label to qmlviewer warnings window Small developer usability improvement Task-number: Reviewed-by: Bea Lam --- tools/qml/loggerwidget.cpp | 15 +++++++++++++++ tools/qml/loggerwidget.h | 4 +++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/tools/qml/loggerwidget.cpp b/tools/qml/loggerwidget.cpp index f601d95..fb4fedc 100644 --- a/tools/qml/loggerwidget.cpp +++ b/tools/qml/loggerwidget.cpp @@ -45,6 +45,8 @@ #include #include #include +#include +#include #ifdef Q_WS_MAEMO_5 # include # include @@ -83,6 +85,14 @@ LoggerWidget::LoggerWidget(QWidget *parent) : setCentralWidget(m_plainTextEdit); #endif + m_noWarningsLabel = new QLabel(m_plainTextEdit); + m_noWarningsLabel->setText(tr("(No warnings)")); + m_noWarningsLabel->setAlignment(Qt::AlignVCenter | Qt::AlignHCenter); + QVBoxLayout *layout = new QVBoxLayout; + layout->addWidget(m_noWarningsLabel); + m_plainTextEdit->setLayout(layout); + connect(m_plainTextEdit, SIGNAL(textChanged()), this, SLOT(updateNoWarningsLabel())); + readSettings(); setupPreferencesMenu(); } @@ -207,4 +217,9 @@ void LoggerWidget::setupPreferencesMenu() } } +void LoggerWidget::updateNoWarningsLabel() +{ + m_noWarningsLabel->setVisible(m_plainTextEdit->toPlainText().length() == 0); +} + QT_END_NAMESPACE diff --git a/tools/qml/loggerwidget.h b/tools/qml/loggerwidget.h index 13c319f..27d4d0b 100644 --- a/tools/qml/loggerwidget.h +++ b/tools/qml/loggerwidget.h @@ -48,6 +48,7 @@ QT_BEGIN_NAMESPACE class QPlainTextEdit; +class QLabel; class QMenu; class QAction; @@ -66,6 +67,7 @@ public: public slots: void append(const QString &msg); + void updateNoWarningsLabel(); private slots: void warningsPreferenceChanged(QAction *action); @@ -86,7 +88,7 @@ private: QMenu *m_preferencesMenu; QAction *m_showWidgetAction; QPlainTextEdit *m_plainTextEdit; - + QLabel *m_noWarningsLabel; enum ConfigOrigin { CommandLineOrigin, SettingsOrigin }; ConfigOrigin m_visibilityOrigin; Visibility m_visibility; -- cgit v0.12 From 6a36f1f6299980cd0338009cb31e2a36cd40e44f Mon Sep 17 00:00:00 2001 From: Joona Petrell Date: Mon, 10 Jan 2011 15:40:11 +1000 Subject: Add property versioning checks for QtQuick 1.1 deselect() function Task-number: QTBUG-16059 Reviewed-by: Martin Jones --- src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp | 5 ++++- src/declarative/graphicsitems/qdeclarativetextedit_p.h | 2 +- src/declarative/graphicsitems/qdeclarativetextinput_p.h | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp index 7db4d85..0d386c6 100644 --- a/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitemsmodule.cpp @@ -179,8 +179,11 @@ void QDeclarativeItemModule::defineModule() qmlRegisterType("QtQuick",1,1,"PinchArea"); qmlRegisterType("QtQuick",1,1,"Pinch"); qmlRegisterType(); - qmlRegisterType("QtQuick",1,1,"Repeater"); + qmlRegisterType("QtQuick",1,1,"Repeater"); qmlRegisterType("QtQuick",1,1,"TextEdit"); +#ifndef QT_NO_LINEEDIT + qmlRegisterType("QtQuick",1,1,"TextInput"); +#endif #ifndef QT_NO_IMPORT_QT47_QML #ifdef QT_NO_MOVIE diff --git a/src/declarative/graphicsitems/qdeclarativetextedit_p.h b/src/declarative/graphicsitems/qdeclarativetextedit_p.h index 6a05aa8..3e86a05 100644 --- a/src/declarative/graphicsitems/qdeclarativetextedit_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextedit_p.h @@ -231,10 +231,10 @@ Q_SIGNALS: Q_REVISION(1) void linkActivated(const QString &link); public Q_SLOTS: - void deselect(); void selectAll(); void selectWord(); void select(int start, int end); + Q_REVISION(1) void deselect(); #ifndef QT_NO_CLIPBOARD void cut(); void copy(); diff --git a/src/declarative/graphicsitems/qdeclarativetextinput_p.h b/src/declarative/graphicsitems/qdeclarativetextinput_p.h index 25b8e66..5bff2ea 100644 --- a/src/declarative/graphicsitems/qdeclarativetextinput_p.h +++ b/src/declarative/graphicsitems/qdeclarativetextinput_p.h @@ -238,10 +238,10 @@ protected: void focusInEvent(QFocusEvent *event); public Q_SLOTS: - void deselect(); void selectAll(); void selectWord(); void select(int start, int end); + Q_REVISION(1) void deselect(); #ifndef QT_NO_CLIPBOARD void cut(); void copy(); -- cgit v0.12 From d281cea3a445aa244901decceffd7d653ed829c8 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 10 Jan 2011 10:36:41 +0200 Subject: QWidgets support for VGA screen Add pixelmetrics data for QS60Style to support VGA screensizes. Task-number: QT-4079 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 040ca4f..3ba8887 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -96,7 +96,8 @@ const layoutHeader QS60StylePrivate::m_layoutHeaders[] = { {320,240,1,19,"QVGA Portrait"}, {360,640,1,19,"NHD Landscape"}, {640,360,1,19,"NHD Portrait"}, -{352,800,1,12,"E90 Landscape"} +{352,800,1,12,"E90 Landscape"}, +{480,640,1,19,"VGA Landscape"} // *** End of generated data *** }; const int QS60StylePrivate::m_numberOfLayouts = @@ -109,6 +110,7 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { {7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} +{9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184} // *** End of generated data *** }; -- cgit v0.12 From 19b6e2b944a0d1eeef0fb707a00f567e4ee870e6 Mon Sep 17 00:00:00 2001 From: Sami Merila Date: Mon, 10 Jan 2011 11:32:15 +0200 Subject: Build failure fix (related to QT-4079) Change d281cea3a445aa244901decceffd7d653ed829c8 caused build failure, due to missing comma (one line missing from commit). Fixed by adding the missing change. Task-number: QT-4079 Reviewed-by: Miikka Heikkinen --- src/gui/styles/qs60style.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp index 3ba8887..4a4095d 100644 --- a/src/gui/styles/qs60style.cpp +++ b/src/gui/styles/qs60style.cpp @@ -109,7 +109,7 @@ const short QS60StylePrivate::data[][MAX_PIXELMETRICS] = { {5,0,-909,0,0,1,0,2,-1,8,14,22,15,15,7,164,-909,-909,-909,19,15,2,0,0,21,8,27,28,4,4,1,-909,-909,0,7,6,0,13,23,17,17,21,21,7,115,21,0,-909,-909,-909,-909,0,0,15,1,-909,0,0,-909,15,-909,-909,-909,-909,32,21,65,27,65,3,3,5,10,15,-909,5,58,13,5,0,4,4,7,9,4,4,-909,2,-909,-909,-909,-909,6,6,3,1,106}, {7,0,-909,0,0,2,0,5,-1,25,69,46,37,37,9,258,-909,-909,-909,23,19,26,0,0,32,25,72,44,5,5,2,-909,-909,0,7,21,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,25,2,-909,0,0,-909,25,-909,-909,-909,-909,87,27,77,35,77,13,3,6,8,19,-909,7,74,19,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, {7,0,-909,0,0,2,0,5,-1,25,68,46,37,37,9,258,-909,-909,-909,31,19,6,0,0,32,25,60,52,5,5,2,-909,-909,0,7,32,0,17,29,22,22,27,27,7,173,29,0,-909,-909,-909,-909,0,0,26,2,-909,0,0,-909,26,-909,-909,-909,-909,87,27,96,35,96,12,3,6,8,19,-909,7,74,22,7,0,5,5,8,12,5,5,-909,3,-909,-909,-909,-909,7,7,3,1,135}, -{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106} +{7,0,-909,0,0,2,0,2,-1,10,20,27,18,18,9,301,-909,-909,-909,29,18,5,0,0,35,7,32,30,5,5,2,-909,-909,0,2,8,0,16,28,21,21,26,26,2,170,26,0,-909,-909,-909,-909,0,0,21,6,-909,0,0,-909,-909,-909,-909,-909,-909,54,26,265,34,265,5,5,6,3,18,-909,7,72,19,7,0,5,6,8,11,6,5,-909,2,-909,-909,-909,-909,5,5,3,1,106}, {9,0,-909,0,0,2,0,5,-1,34,99,76,51,51,25,352,-909,-909,-909,29,25,7,0,0,43,34,42,76,7,7,2,-909,-909,0,9,14,0,23,39,30,30,37,37,9,391,40,0,-909,-909,-909,-909,0,0,29,2,-909,0,0,-909,29,-909,-909,-909,-909,115,37,96,48,96,19,19,9,1,25,-909,9,101,24,9,0,7,7,7,16,7,7,-909,3,-909,-909,-909,-909,9,9,3,1,184} // *** End of generated data *** }; -- cgit v0.12 From 963ada5805d61e318a04295b6d06e527b49cdb7a Mon Sep 17 00:00:00 2001 From: Jerome Pasion Date: Mon, 10 Jan 2011 11:06:48 +0100 Subject: Fix for qtdemo bug Task-number: QTBUG-15931 Reviewed-by: Kevin Wright --- tools/qdoc3/test/qt-html-templates.qdocconf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/qdoc3/test/qt-html-templates.qdocconf b/tools/qdoc3/test/qt-html-templates.qdocconf index 698164d..ff45451 100644 --- a/tools/qdoc3/test/qt-html-templates.qdocconf +++ b/tools/qdoc3/test/qt-html-templates.qdocconf @@ -74,8 +74,8 @@ HTML.postheader = "
\n" \ " \n" \ "
\n" \ " Close \n" \ - "

All | API | Articles | Examples

\n" \ - "

 results:

\n" \ + " \n" \ "
    \n" \ "
\n" \ "
\n" \ @@ -183,4 +183,4 @@ HTML.footer = "" \ " \n" \ "
\n" \ "
\n" \ - "
\n" \ No newline at end of file + "
\n" -- cgit v0.12 From 2b1b617664bfc78f6e95e53dc0f9749bd1f2d27a Mon Sep 17 00:00:00 2001 From: Shane Kearns Date: Fri, 7 Jan 2011 15:57:28 +0000 Subject: Fix handle leak in symbian QTimer implementation The timer handle was only being closed when a timer was cancelled, which resulted in a leak for one shot timers that have completed normally. Instead the timer is now closed in a destructor (closing null handles is safe, so it doesn't matter if the handle was never created - e.g. in the case of a zero timer) Also added a handle check before creating a timer to prevent a leak in case the start function is called twice in the backend. Task-number: QTBUG-16380 Reviewed-by: mread --- src/corelib/kernel/qeventdispatcher_symbian.cpp | 6 ++-- tests/auto/qtimer/tst_qtimer.cpp | 38 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/corelib/kernel/qeventdispatcher_symbian.cpp b/src/corelib/kernel/qeventdispatcher_symbian.cpp index bb9bd01..99c4087 100644 --- a/src/corelib/kernel/qeventdispatcher_symbian.cpp +++ b/src/corelib/kernel/qeventdispatcher_symbian.cpp @@ -217,13 +217,13 @@ QTimerActiveObject::QTimerActiveObject(QEventDispatcherSymbian *dispatcher, Symb QTimerActiveObject::~QTimerActiveObject() { Cancel(); + m_rTimer.Close(); //close of null handle is safe } void QTimerActiveObject::DoCancel() { if (m_timerInfo->interval > 0) { m_rTimer.Cancel(); - m_rTimer.Close(); } else { if (iStatus.Int() == KRequestPending) { TRequestStatus *status = &iStatus; @@ -302,7 +302,9 @@ void QTimerActiveObject::Start() CActiveScheduler::Add(this); m_timerInfo->msLeft = m_timerInfo->interval; if (m_timerInfo->interval > 0) { - m_rTimer.CreateLocal(); + if (!m_rTimer.Handle()) { + qt_symbian_throwIfError(m_rTimer.CreateLocal()); + } StartTimer(); } else { iStatus = KRequestPending; diff --git a/tests/auto/qtimer/tst_qtimer.cpp b/tests/auto/qtimer/tst_qtimer.cpp index 102308e..e964728 100644 --- a/tests/auto/qtimer/tst_qtimer.cpp +++ b/tests/auto/qtimer/tst_qtimer.cpp @@ -90,6 +90,9 @@ private slots: void QTBUG13633_dontBlockEvents(); void postedEventsShouldNotStarveTimers(); +#ifdef Q_OS_SYMBIAN + void handleLeaks(); +#endif }; class TimerHelper : public QObject @@ -750,5 +753,40 @@ void tst_QTimer::postedEventsShouldNotStarveTimers() QVERIFY(timerHelper.count > 5); } +#ifdef Q_OS_SYMBIAN +void tst_QTimer::handleLeaks() +{ + const int timercount = 5; + int processhandles_start; + int threadhandles_start; + RThread().HandleCount(processhandles_start, threadhandles_start); + { + TimerHelper timerHelper; + QList timers; + for (int i=0;isetSingleShot(true); + timer->start(i); //test both zero and normal timeouts + } + int processhandles_mid; + int threadhandles_mid; + RThread().HandleCount(processhandles_mid, threadhandles_mid); + qDebug() << threadhandles_mid - threadhandles_start << "new thread owned handles"; + QTest::qWait(100); + QCOMPARE(timerHelper.count, timercount); + qDeleteAll(timers); + } + int processhandles_end; + int threadhandles_end; + RThread().HandleCount(processhandles_end, threadhandles_end); + QCOMPARE(threadhandles_end, threadhandles_start); //RTimer::CreateLocal creates a thread owned handle + //Can not verify process handles because QObject::connect may create up to 2 mutexes + //from a QMutexPool (4 process owned handles with open C imp.) + //QCOMPARE(processhandles_end, processhandles_start); +} +#endif + QTEST_MAIN(tst_QTimer) #include "tst_qtimer.moc" -- cgit v0.12 From 7471178137e6fcc193ba55acdfb2bbeed33f8e7a Mon Sep 17 00:00:00 2001 From: Niklas Kurkisuo Date: Mon, 10 Jan 2011 12:17:27 +0100 Subject: Change QHostInfoCache to use QElapsedTime instead of QTime. Use QElapsedTime instead of QTime for performance gain. See QT-2965 for more info. Task-number: QTBUG-16468 Reviewed-by: Markus Goetz --- src/network/kernel/qhostinfo.cpp | 2 +- src/network/kernel/qhostinfo_p.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/network/kernel/qhostinfo.cpp b/src/network/kernel/qhostinfo.cpp index f984cf8..0c0e1cd 100644 --- a/src/network/kernel/qhostinfo.cpp +++ b/src/network/kernel/qhostinfo.cpp @@ -740,7 +740,7 @@ void QHostInfoCache::put(const QString &name, const QHostInfo &info) QHostInfoCacheElement* element = new QHostInfoCacheElement(); element->info = info; - element->age = QTime(); + element->age = QElapsedTimer(); element->age.start(); QMutexLocker locker(&this->mutex); diff --git a/src/network/kernel/qhostinfo_p.h b/src/network/kernel/qhostinfo_p.h index 85d14c2..8814bd8 100644 --- a/src/network/kernel/qhostinfo_p.h +++ b/src/network/kernel/qhostinfo_p.h @@ -68,7 +68,7 @@ #include "QtCore/qrunnable.h" #include "QtCore/qlist.h" #include "QtCore/qqueue.h" -#include +#include #include #endif @@ -135,7 +135,7 @@ private: bool enabled; struct QHostInfoCacheElement { QHostInfo info; - QTime age; + QElapsedTimer age; }; QCache cache; QMutex mutex; -- cgit v0.12 From d95b1dd15f7aed243d7177a2096eb58080359d55 Mon Sep 17 00:00:00 2001 From: David Boddie Date: Mon, 10 Jan 2011 13:40:21 +0100 Subject: Doc: Changed description to prevent confusion about managed widgets. --- src/gui/kernel/qlayout.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp index 5b526d4..fbede11 100644 --- a/src/gui/kernel/qlayout.cpp +++ b/src/gui/kernel/qlayout.cpp @@ -980,10 +980,10 @@ void QLayoutPrivate::reparentChildWidgets(QWidget *mw) /*! This function is called from \c addWidget() functions in - subclasses to add \a w as a child widget. + subclasses to add \a w as a managed widget of a layout. - If \a w is already in a layout, this function will give a warning - and remove \a w from the layout. This function must therefore be + If \a w is already managed by a layout, this function will give a warning + and remove \a w from that layout. This function must therefore be called before adding \a w to the layout's data structure. */ void QLayout::addChildWidget(QWidget *w) -- cgit v0.12 From 2c0f568061b3377ee55ff423c70d67a6341615ba Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Mon, 10 Jan 2011 14:00:59 +0100 Subject: tst_qhttpnetworkconnection: Compile fix --- .../qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp index 4a32a5a..321b787 100644 --- a/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp +++ b/tests/auto/qhttpnetworkconnection/tst_qhttpnetworkconnection.cpp @@ -178,7 +178,7 @@ void tst_QHttpNetworkConnection::head() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Head); QHttpNetworkReply *reply = connection.sendRequest(request); @@ -236,7 +236,7 @@ void tst_QHttpNetworkConnection::get() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); QHttpNetworkRequest request(protocol + host + path); QHttpNetworkReply *reply = connection.sendRequest(request); @@ -314,7 +314,7 @@ void tst_QHttpNetworkConnection::put() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Put); @@ -402,7 +402,7 @@ void tst_QHttpNetworkConnection::post() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); QHttpNetworkRequest request(protocol + host + path, QHttpNetworkRequest::Post); @@ -539,7 +539,7 @@ void tst_QHttpNetworkConnection::get401() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); connection.setProperty("setCredentials", setCredentials); connection.setProperty("username", username); connection.setProperty("password", password); @@ -609,7 +609,7 @@ void tst_QHttpNetworkConnection::compression() QHttpNetworkConnection connection(host, port, encrypt); QCOMPARE(connection.port(), port); QCOMPARE(connection.hostName(), host); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); QHttpNetworkRequest request(protocol + host + path); if (!autoCompress) @@ -701,7 +701,7 @@ void tst_QHttpNetworkConnection::ignoresslerror() QCOMPARE(connection.hostName(), host); if (ignoreInit) connection.ignoreSslErrors(); - QCOMPARE(connection.isEncrypted(), encrypt); + QCOMPARE(connection.isSsl(), encrypt); connection.setProperty("ignoreFromSignal", ignoreFromSignal); QHttpNetworkRequest request(protocol + host + path); -- cgit v0.12 From 7b49c37db01ca8f6308cead2b7209a7b480a5446 Mon Sep 17 00:00:00 2001 From: Adrian Constantin Date: Mon, 10 Jan 2011 12:27:35 +0200 Subject: For non-developer builds, skip test that requires private API Fix build break on harmattan. Reviewed-by: Lucian Varlan --- tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp index 6548158..0003eb6 100644 --- a/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp +++ b/tests/auto/qnetworkcookiejar/tst_qnetworkcookiejar.cpp @@ -433,6 +433,9 @@ void tst_QNetworkCookieJar::effectiveTLDs_data() void tst_QNetworkCookieJar::effectiveTLDs() { +#ifndef QT_BUILD_INTERNAL + QSKIP("Test requires private API", SkipAll); +#endif QFETCH(QString, domain); QFETCH(bool, isTLD); QCOMPARE(QNetworkCookieJarPrivate::isEffectiveTLD(domain), isTLD); -- cgit v0.12 From d62e9f4a6fe199ae790b1561fd4ba9ea84bd4d1e Mon Sep 17 00:00:00 2001 From: Jani Hautakangas Date: Mon, 10 Jan 2011 13:22:15 +0200 Subject: Setting WA_TranslucentBackground after winid() is ineffective on Symbian. Currently Symbian doesn't support semi-transparent EGL surfaces. WA_TranslucentBackground attribute is ineffective if set after EGL surface creation. To enable translucency in this case we need to recreate backing store to get raster surface which supports translucency. Task-number: QT-4416 Reviewed-by: Jason Barron --- src/gui/kernel/qwidget_s60.cpp | 8 ++++++++ src/gui/painting/qgraphicssystem_runtime.cpp | 3 ++- src/plugins/graphicssystems/openvg/qgraphicssystem_vg.cpp | 2 ++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp index d6ad3c3..d55c21e 100644 --- a/src/gui/kernel/qwidget_s60.cpp +++ b/src/gui/kernel/qwidget_s60.cpp @@ -780,6 +780,14 @@ void QWidgetPrivate::s60UpdateIsOpaque() if (window->SetTransparencyAlphaChannel() == KErrNone) { window->SetBackgroundColor(TRgb(255, 255, 255, 0)); extra->topextra->nativeWindowTransparencyEnabled = 1; + + if (extra->topextra->backingStore.data() && + QApplicationPrivate::graphics_system_name == QLatin1String("openvg")) { + // Semi-transparent EGL surfaces aren't supported. We need to + // recreate backing store to get translucent surface (raster surface). + extra->topextra->backingStore.create(q); + extra->topextra->backingStore.registerWidget(q); + } } } else if (extra->topextra->nativeWindowTransparencyEnabled) { window->SetTransparentRegion(TRegionFix<1>()); diff --git a/src/gui/painting/qgraphicssystem_runtime.cpp b/src/gui/painting/qgraphicssystem_runtime.cpp index a9fbbee..db3b0d8 100644 --- a/src/gui/painting/qgraphicssystem_runtime.cpp +++ b/src/gui/painting/qgraphicssystem_runtime.cpp @@ -322,7 +322,6 @@ QRuntimeGraphicsSystem::QRuntimeGraphicsSystem() : m_windowSurfaceDestroyPolicy(DestroyImmediately), m_graphicsSystem(0) { -